Chromium Code Reviews| Index: content/renderer/media/video_capture_message_filter.h |
| diff --git a/content/renderer/media/video_capture_message_filter.h b/content/renderer/media/video_capture_message_filter.h |
| index 1418208e35e773fa5120c566d84dd66fab4e0817..0b934139ba5e1fb402166d010ea274783b09ee9f 100644 |
| --- a/content/renderer/media/video_capture_message_filter.h |
| +++ b/content/renderer/media/video_capture_message_filter.h |
| @@ -18,6 +18,7 @@ |
| #include "content/common/media/video_capture.h" |
| #include "ipc/ipc_channel_proxy.h" |
| #include "media/video/capture/video_capture.h" |
| +#include "media/video/encoded_video_source.h" |
| namespace content { |
| @@ -46,6 +47,30 @@ class CONTENT_EXPORT VideoCaptureMessageFilter |
| // |device_id| is the device id for the delegate. |
| virtual void OnDelegateAdded(int32 device_id) = 0; |
| + // Called when the encoding capabilities is received from video capture |
| + // device in the browser process. |
| + virtual void OnCapabilitiesAvailable( |
|
Ami GONE FROM CHROMIUM
2013/06/12 01:44:06
Here and below, the operative word is "encoding",
hshi1
2013/06/12 17:52:39
Done.
|
| + const media::VideoEncodingCapabilities& capabilities) = 0; |
| + |
| + // Called when a bitstream is opened on a video capture device. |
| + virtual void OnBitstreamOpened( |
| + const media::VideoEncodingParameters& params, |
| + const std::map<int, base::SharedMemoryHandle>& buffers) = 0; |
|
Ami GONE FROM CHROMIUM
2013/06/12 01:44:06
How can the EVS impl know how big the SHMs will ne
hshi1
2013/06/12 17:52:39
The CL sheu@ uploaded has |size| defined for the O
|
| + |
| + // Called when a bitstream is closed on a video capture device. |
| + virtual void OnBitstreamClosed() = 0; |
| + |
| + // Called when encoding parameters has changed. |
| + virtual void OnBitstreamConfigChanged( |
| + const media::RuntimeVideoEncodingParameters& params) = 0; |
| + |
| + // Called when an encoded bitstream buffer is received from video capture |
| + // device in the browser process. |
| + virtual void OnBitstreamReady( |
| + int buffer_id, |
| + size_t size, |
| + const media::BufferEncodingMetadata& metadata) = 0; |
| + |
| protected: |
| virtual ~Delegate() {} |
| }; |
| @@ -92,6 +117,31 @@ class CONTENT_EXPORT VideoCaptureMessageFilter |
| void OnDeviceInfoReceived(int device_id, |
| const media::VideoCaptureParams& params); |
| + // Receive encoding capabilities from browser process. |
| + void OnCapabilitiesAvailable(int device_id, |
| + media::VideoEncodingCapabilities capabilities); |
| + |
| + // Bitstream is opened on video capture device. |
| + void OnBitstreamOpened(int device_id, |
| + media::VideoEncodingParameters params, |
| + std::map<int, base::SharedMemoryHandle> buffers); |
| + |
| + // Bitstream is closed on video capture device. |
| + void OnBitstreamClosed(int device_id); |
| + |
| + // Receive current encoding parameters from browser process. |
| + void OnBitstreamConfigChanged(int device_id, |
| + media::RuntimeVideoEncodingParameters params); |
| + |
| + // Receive an encoded bitstream buffer from browser process. |
| + void OnBitstreamReady(int device_id, |
| + int buffer_id, |
| + size_t size, |
| + media::BufferEncodingMetadata metadata); |
| + |
| + // Finds the delegate associated with |device_id|, NULL if not found. |
| + Delegate* find_delegate(int device_id) const; |
| + |
| // A map of device ids to delegates. |
| Delegates delegates_; |
| Delegates pending_delegates_; |