Index: content/renderer/media/media_stream_dispatcher.h |
=================================================================== |
--- content/renderer/media/media_stream_dispatcher.h (revision 109718) |
+++ content/renderer/media/media_stream_dispatcher.h (working copy) |
@@ -40,6 +40,20 @@ |
// Stop a started stream. Label is the label provided in OnStreamGenerated. |
void StopStream(const std::string& label); |
+ // Request to enumerate video devices. |
+ void EnumerateVideoDevices(int request_id, |
+ MediaStreamDispatcherEventHandler* event_handler, |
+ const std::string& security_origin); |
+ |
+ // Request to open a video device. |
+ void OpenVideoDevice(int request_id, |
+ MediaStreamDispatcherEventHandler* event_handler, |
+ const std::string& device_id, |
+ const std::string& security_origin); |
+ |
+ // Close a started video device. |label| is provided in OnVideoDeviceOpened. |
+ void CloseVideoDevice(const std::string& label); |
+ |
// Check if the label is a valid stream. |
bool IsStream(const std::string& label); |
// Get the video session_id given a label. The label identifies a stream. |
@@ -49,7 +63,8 @@ |
int audio_session_id(const std::string& label, int index); |
private: |
- FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, Basic); |
+ FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, BasicStream); |
+ FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, BasicVideoDevice); |
FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, TestFailure); |
struct Request; |
@@ -68,6 +83,15 @@ |
void OnStreamGenerationFailed(int request_id); |
void OnVideoDeviceFailed(const std::string& label, int index); |
void OnAudioDeviceFailed(const std::string& label, int index); |
+ void OnVideoDevicesEnumerated( |
+ int request_id, |
+ const media_stream::StreamDeviceInfoArray& device_array); |
+ void OnVideoDevicesEnumerationFailed(int request_id); |
+ void OnVideoDeviceOpened( |
+ int request_id, |
+ const std::string& label, |
+ const media_stream::StreamDeviceInfo& device_info); |
+ void OnVideoDeviceOpenFailed(int request_id); |
int next_ipc_id_; |
typedef std::map<std::string, Stream> LabelStreamMap; |