When we migrate device discovery to the browser process, we may need to push the resulting MediaSinks back to extension for further operations (such as cast channel or activity discovery). Sinks discovered by DIAL and Cast will have specific data.
- Introduce subclasses of MediaSink in C++
- Introduce Mojo struct definitions along the lines of following (latest can be found in design doc):
struct MediaSink {
...
// Used for feedback
string? model_name;
MediaSinkExtraData? extra_data;
}
union MediaSinkExtraData {
DialMediaSink? dial_media_sink;
CastMediaSink? cast_media_sink;
}
struct DialMediaSink {
// Used for feedback
string ip_address;
// Used for DIAL launch
url.mojom.url app_url;
}
struct CastMediaSink {
int capabilities;
// Used for feedback
string ip_address;
// ID of cast channel opened by Media Router. The ID can be
// used to send call chrome.cast.channel.send.
int cast_channel_id;
}
interface MediaRouteProvider {
OnSinksDiscovered(array<MediaSink> sinks);
}
Comment 1 by imch...@chromium.org
, Jan 31 2017