Index: content/renderer/media/video_capture_impl.h |
diff --git a/content/renderer/media/video_capture_impl.h b/content/renderer/media/video_capture_impl.h |
index 03696a7c9ec9ee46b60c7afc89682a6b49c3a7f1..b0c8c40ba831194fa8228ee06b49898d01b55238 100644 |
--- a/content/renderer/media/video_capture_impl.h |
+++ b/content/renderer/media/video_capture_impl.h |
@@ -6,8 +6,8 @@ |
// interfaces for clients to Start/Stop capture. It also communicates to clients |
// when buffer is ready, state of capture device is changed. |
-// VideoCaptureImpl is also a delegate of VideoCaptureMessageFilter which |
-// relays operation of capture device to browser process and receives response |
+// VideoCaptureImpl is also a delegate of VideoCaptureMessageFilter which relays |
+// operation of a capture device to the browser process and receives responses |
// from browser process. |
// The media::VideoCapture and VideoCaptureMessageFilter::Delegate are |
@@ -52,7 +52,7 @@ class CONTENT_EXPORT VideoCaptureImpl |
// media::VideoCapture interface. |
virtual void StartCapture( |
media::VideoCapture::EventHandler* handler, |
- const media::VideoCaptureCapability& capability) OVERRIDE; |
+ const media::VideoCaptureParams& params) OVERRIDE; |
virtual void StopCapture(media::VideoCapture::EventHandler* handler) OVERRIDE; |
virtual bool CaptureStarted() OVERRIDE; |
virtual int CaptureWidth() OVERRIDE; |
@@ -61,13 +61,14 @@ class CONTENT_EXPORT VideoCaptureImpl |
// VideoCaptureMessageFilter::Delegate interface. |
virtual void OnBufferCreated(base::SharedMemoryHandle handle, |
- int length, int buffer_id) OVERRIDE; |
- virtual void OnBufferReceived(int buffer_id, base::Time timestamp) OVERRIDE; |
+ int length, |
+ int buffer_id) OVERRIDE; |
+ virtual void OnBufferDestroyed(int buffer_id) OVERRIDE; |
+ virtual void OnBufferReceived( |
+ int buffer_id, |
+ base::Time timestamp, |
+ const media::VideoCaptureFormat& format) OVERRIDE; |
virtual void OnStateChanged(VideoCaptureState state) OVERRIDE; |
- virtual void OnDeviceInfoReceived( |
- const media::VideoCaptureParams& device_info) OVERRIDE; |
- virtual void OnDeviceInfoChanged( |
- const media::VideoCaptureParams& device_info) OVERRIDE; |
virtual void OnDelegateAdded(int32 device_id) OVERRIDE; |
// Stop/resume delivering video frames to clients, based on flag |suspend|. |
@@ -80,28 +81,29 @@ class CONTENT_EXPORT VideoCaptureImpl |
class ClientBuffer; |
typedef std::map<media::VideoCapture::EventHandler*, |
- media::VideoCaptureCapability> ClientInfo; |
+ media::VideoCaptureParams> ClientInfo; |
- VideoCaptureImpl(media::VideoCaptureSessionId id, |
+ VideoCaptureImpl(media::VideoCaptureSessionId session_id, |
base::MessageLoopProxy* capture_message_loop_proxy, |
VideoCaptureMessageFilter* filter); |
virtual ~VideoCaptureImpl(); |
void DoStartCaptureOnCaptureThread( |
media::VideoCapture::EventHandler* handler, |
- const media::VideoCaptureCapability& capability); |
+ const media::VideoCaptureParams& params); |
void DoStopCaptureOnCaptureThread(media::VideoCapture::EventHandler* handler); |
void DoBufferCreatedOnCaptureThread(base::SharedMemoryHandle handle, |
- int length, int buffer_id); |
- void DoBufferReceivedOnCaptureThread(int buffer_id, base::Time timestamp); |
+ int length, |
+ int buffer_id); |
+ void DoBufferDestroyedOnCaptureThread(int buffer_id); |
+ void DoBufferReceivedOnCaptureThread( |
+ int buffer_id, |
+ base::Time timestamp, |
+ const media::VideoCaptureFormat& format); |
void DoClientBufferFinishedOnCaptureThread( |
int buffer_id, |
const scoped_refptr<ClientBuffer>& buffer); |
void DoStateChangedOnCaptureThread(VideoCaptureState state); |
- void DoDeviceInfoReceivedOnCaptureThread( |
- const media::VideoCaptureParams& device_info); |
- void DoDeviceInfoChangedOnCaptureThread( |
- const media::VideoCaptureParams& device_info); |
void DoDelegateAddedOnCaptureThread(int32 device_id); |
void DoSuspendCaptureOnCaptureThread(bool suspend); |
@@ -124,6 +126,7 @@ class CONTENT_EXPORT VideoCaptureImpl |
const scoped_refptr<base::MessageLoopProxy> capture_message_loop_proxy_; |
const scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
int device_id_; |
+ const int session_id_; |
// Buffers available for sending to the client. |
typedef std::map<int32, scoped_refptr<ClientBuffer> > ClientBufferMap; |
@@ -138,15 +141,12 @@ class CONTENT_EXPORT VideoCaptureImpl |
ClientInfo clients_pending_on_filter_; |
ClientInfo clients_pending_on_restart_; |
- media::VideoPixelFormat video_type_; |
- |
// Member capture_format_ represents the video format requested by the client |
Ami GONE FROM CHROMIUM
2013/10/04 00:24:15
s/capture_format_/requested_params_
ncarter (slow)
2013/10/16 02:08:40
Done.
|
// to this class via DoStartCaptureOnCaptureThread. |
- media::VideoCaptureCapability capture_format_; |
+ media::VideoCaptureParams requested_params_; |
// The device's video capture format sent from browser process side. |
- media::VideoCaptureParams device_info_; |
- bool device_info_available_; |
+ media::VideoCaptureFormat last_device_info_; |
bool suspended_; |
VideoCaptureState state_; |