[Media Router] Implement support for MediaSinkService |
||||||||||||||
Issue description
MediaSinkService defines an interface which can be implemented by DIAL / Cast / future protocols to produce MediaSinks from device discovery/resolution. The service is also responsible for answering MediaSink queries.
The interface will look like the following (copied from design doc):
class MediaSinkService {
public:
// Callback used for |Start()|.
// Arg 0: |this|
// Arg 1: Sinks discovered and resolved by the service.
using OnSinksDiscoveredCallback = base::Callback<void(
const const MediaSinkService*, const std::vector<MediaSink>&)>;
// Starts sink discovery. No-ops if already started.
// Sinks discovered and resolved are continuously passed to
// |callback|.
void Start(const OnSinksDiscoveredCallback& callback) = 0;
// Adds a sink query to observe for MediaSink updates.
// Only one observer can be added for a given MediaSource.
// Start() must be called first. This class does not take
// ownership of |observer|.
void AddSinkQuery(MediaSinksObserver* observer) = 0;
// Removes a sink query and stop observing for MediaSink updates.
void RemoveSinkQuery(MediaSinksObserver* observer) = 0;
};
Each protocol (DIAL and Cast for now) will implement their own MediaSinkService, which can then be independently registered with MediaRouter.
,
Jan 31 2017
,
Feb 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8a4c43002d54cbf4f577a5e00b87fddc5e9b6269 commit 8a4c43002d54cbf4f577a5e00b87fddc5e9b6269 Author: zhaobin <zhaobin@chromium.org> Date: Thu Feb 16 19:26:03 2017 [Media Router] (device discovery) Create MediaSinkService interface Created MediaSinkService interface according to device discovery design doc. BUG= 687356 Review-Url: https://codereview.chromium.org/2662393005 Cr-Commit-Position: refs/heads/master@{#451048} [modify] https://crrev.com/8a4c43002d54cbf4f577a5e00b87fddc5e9b6269/chrome/browser/media/router/BUILD.gn [add] https://crrev.com/8a4c43002d54cbf4f577a5e00b87fddc5e9b6269/chrome/browser/media/router/media_sink_service.cc [add] https://crrev.com/8a4c43002d54cbf4f577a5e00b87fddc5e9b6269/chrome/browser/media/router/media_sink_service.h
,
Mar 15 2017
,
Apr 19 2017
,
May 31 2017
,
Jul 6 2017
,
Aug 14 2017
,
Sep 11 2017
,
Oct 26 2017
,
Oct 26 2017
,
Oct 26 2017
Can this be closed?
,
Oct 26 2017
Let's keep this open to implement support for sink queries.
,
Oct 26 2017
,
Aug 2
,
Aug 2
|
||||||||||||||
►
Sign in to add a comment |
||||||||||||||
Comment 1 by imch...@chromium.org
, Jan 31 2017