New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 848419 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[Media Router] Updated cast device name not reflected in UI

Project Member Reported by imch...@chromium.org, May 31 2018

Issue description

Steps to repro:

1) Open MR dialog and note the name of Cast device to rename. Leave dialog open.
2) Rename the cast device (e.g. Home app, chrome://cast)
3) Wait about 20-30 seconds.

Expected result: dialog should now display the updated device name.
Actual result: device name stays the same until device is re-discovered.

There are a few bugs:
1) CastMediaSinkServiceImpl does not update the sink if the IP endpoint stays the same, which appears to be the case here. The fix is to update the relevant fields (device name, capabilities) without having to open a new cast socket, and notify observers.
2) QueryResultManager does not support updating a sink. The MediaSink is stored as a key in a map, which makes them immutable. The fix is to use sink ID as keys instead, and store MediaSink as part of the value, and update the MediaSink when new sink query result is received.
3) (Only for in-browser Cast MRP) CastAppDiscoveryService does not notify sink queries when a sink is updated. The fix is to do that.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c686d4e37227d5fa0efde36f68f056765f79dbae

commit c686d4e37227d5fa0efde36f68f056765f79dbae
Author: Derek Cheng <imcheng@chromium.org>
Date: Fri Jun 01 23:23:00 2018

[Media Router] Fix bugs that prevent device names from updating in UI.

- CastMediaSinkServiceImpl should update the sink on mdns even if the IP
endpoint did not change. If the device name or capabilities changed,
the existing sink should be updated.
- QueryResultManager should store sink IDs instead of MediaSinks as
keys in its sink map in order to support sink updates.
- CastAppDiscoveryService should notify sink queries if a sink is
updated from CastMediaSinkServiceImpl.

Bug:  848419 
Change-Id: Icc3836a4976ae375ce5431037bf0c7d2f50c8fa3
Reviewed-on: https://chromium-review.googlesource.com/1081328
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Takumi Fujimoto <takumif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563856}
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/media/router/providers/cast/cast_app_availability_tracker.cc
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/media/router/providers/cast/cast_app_availability_tracker.h
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/media/router/providers/cast/cast_app_discovery_service.cc
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/ui/media_router/cast_modes_with_media_sources.cc
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/ui/media_router/cast_modes_with_media_sources.h
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/ui/media_router/cast_modes_with_media_sources_unittest.cc
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/ui/media_router/query_result_manager.cc
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/browser/ui/media_router/query_result_manager.h
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/common/media_router/discovery/media_sink_internal.cc
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/common/media_router/discovery/media_sink_internal.h
[modify] https://crrev.com/c686d4e37227d5fa0efde36f68f056765f79dbae/chrome/common/media_router/media_sink.h

Status: Fixed (was: Started)

Sign in to add a comment