Chromium Code Reviews| 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 e03a2fb1a2d466a9986e2b8228db83ed9acf35a1..b22f11a3a11e827a7a1bacba91c91c95f5fd6a85 100644 |
| --- a/content/renderer/media/video_capture_impl.h |
| +++ b/content/renderer/media/video_capture_impl.h |
| @@ -84,20 +84,29 @@ class CONTENT_EXPORT VideoCaptureImpl |
| // Carries a shared memory for transferring video frames from browser to |
| // renderer. |
| class ClientBuffer; |
| + // Carries GpuMemoryBuffers for transferring video frames from browser to |
| + // renderer. |
| + class ClientGpuMemoryBuffer; |
| // VideoCaptureMessageFilter::Delegate interface. |
| - void OnBufferCreated(base::SharedMemoryHandle handle, |
| - int length, |
| - int buffer_id) override; |
| + void OnBufferCreated( |
|
mcasas
2015/08/21 03:57:25
Don't change the indent.
emircan
2015/08/22 03:13:26
Done.
|
| + base::SharedMemoryHandle handle, |
| + int length, |
| + int buffer_id) override; |
| + void OnGpuMemoryBufferCreated( |
| + const std::vector<gfx::GpuMemoryBufferHandle>& gmb_handles, |
| + const gfx::Size& size, |
| + int buffer_id) override; |
| void OnBufferDestroyed(int buffer_id) override; |
| - void OnBufferReceived(int buffer_id, |
| - base::TimeTicks timestamp, |
| - const base::DictionaryValue& metadata, |
| - media::VideoPixelFormat pixel_format, |
| - media::VideoFrame::StorageType storage_type, |
| - const gfx::Size& coded_size, |
| - const gfx::Rect& visible_rect, |
| - const gpu::MailboxHolder& mailbox_holder) override; |
| + void OnBufferReceived( |
| + int buffer_id, |
| + base::TimeTicks timestamp, |
| + const base::DictionaryValue& metadata, |
| + media::VideoPixelFormat pixel_format, |
| + media::VideoFrame::StorageType storage_type, |
| + const gfx::Size& coded_size, |
| + const gfx::Rect& visible_rect, |
| + const std::vector<gpu::MailboxHolder>& mailbox_holders) override; |
| void OnStateChanged(VideoCaptureState state) override; |
| void OnDeviceSupportedFormatsEnumerated( |
| const media::VideoCaptureFormats& supported_formats) override; |
| @@ -107,10 +116,16 @@ class CONTENT_EXPORT VideoCaptureImpl |
| // Sends an IPC message to browser process when all clients are done with the |
| // buffer. |
| - void OnClientBufferFinished(int buffer_id, |
| - const scoped_refptr<ClientBuffer>& buffer, |
| - uint32 release_sync_point, |
| - double consumer_resource_utilization); |
| + void OnClientBufferFinished( |
| + int buffer_id, |
| + const scoped_refptr<ClientBuffer>& buffer, |
| + uint32 release_sync_point, |
| + double consumer_resource_utilization); |
| + void OnClientGpuMemoryBufferFinished( |
| + int buffer_id, |
| + const scoped_refptr<ClientGpuMemoryBuffer>& gpu_memory_buffer, |
| + uint32 release_sync_point, |
| + double consumer_resource_utilization); |
| void StopDevice(); |
| void RestartCapture(); |
| @@ -147,8 +162,11 @@ class CONTENT_EXPORT VideoCaptureImpl |
| std::vector<VideoCaptureDeviceFormatsCB> device_formats_in_use_cb_queue_; |
| // Buffers available for sending to the client. |
| - typedef std::map<int32, scoped_refptr<ClientBuffer> > ClientBufferMap; |
| + typedef std::map<int32, scoped_refptr<ClientBuffer>> ClientBufferMap; |
| ClientBufferMap client_buffers_; |
| + typedef std::map<int32, scoped_refptr<ClientGpuMemoryBuffer>> |
| + ClientGpuMemoryBuffersMap; |
| + ClientGpuMemoryBuffersMap client_gmb_buffers_; |
| // Track information for the video capture client, consisting of parameters |
| // for capturing and callbacks to the client. |