| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // VideoCaptureImpl represents a capture device in renderer process. It provides | 5 // VideoCaptureImpl represents a capture device in renderer process. It provides |
| 6 // interfaces for clients to Start/Stop capture. It also communicates to clients | 6 // interfaces for clients to Start/Stop capture. It also communicates to clients |
| 7 // when buffer is ready, state of capture device is changed. | 7 // when buffer is ready, state of capture device is changed. |
| 8 | 8 |
| 9 // VideoCaptureImpl is also a delegate of VideoCaptureMessageFilter which relays | 9 // VideoCaptureImpl is also a delegate of VideoCaptureMessageFilter which relays |
| 10 // operation of a capture device to the browser process and receives responses | 10 // operation of a capture device to the browser process and receives responses |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 virtual void OnDeviceSupportedFormatsEnumerated( | 114 virtual void OnDeviceSupportedFormatsEnumerated( |
| 115 const media::VideoCaptureFormats& supported_formats) OVERRIDE; | 115 const media::VideoCaptureFormats& supported_formats) OVERRIDE; |
| 116 virtual void OnDeviceFormatsInUseReceived( | 116 virtual void OnDeviceFormatsInUseReceived( |
| 117 const media::VideoCaptureFormats& formats_in_use) OVERRIDE; | 117 const media::VideoCaptureFormats& formats_in_use) OVERRIDE; |
| 118 virtual void OnDelegateAdded(int32 device_id) OVERRIDE; | 118 virtual void OnDelegateAdded(int32 device_id) OVERRIDE; |
| 119 | 119 |
| 120 // Sends an IPC message to browser process when all clients are done with the | 120 // Sends an IPC message to browser process when all clients are done with the |
| 121 // buffer. | 121 // buffer. |
| 122 void OnClientBufferFinished(int buffer_id, | 122 void OnClientBufferFinished(int buffer_id, |
| 123 const scoped_refptr<ClientBuffer>& buffer, | 123 const scoped_refptr<ClientBuffer>& buffer, |
| 124 scoped_ptr<gpu::MailboxHolder> mailbox_holder); | 124 const std::vector<uint32>& release_sync_points); |
| 125 | 125 |
| 126 void StopDevice(); | 126 void StopDevice(); |
| 127 void RestartCapture(); | 127 void RestartCapture(); |
| 128 void StartCaptureInternal(); | 128 void StartCaptureInternal(); |
| 129 | 129 |
| 130 virtual void Send(IPC::Message* message); | 130 virtual void Send(IPC::Message* message); |
| 131 | 131 |
| 132 // Helpers. | 132 // Helpers. |
| 133 bool RemoveClient(media::VideoCapture::EventHandler* handler, | 133 bool RemoveClient(media::VideoCapture::EventHandler* handler, |
| 134 ClientInfo* clients); | 134 ClientInfo* clients); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // in |client_buffers_|. | 171 // in |client_buffers_|. |
| 172 // NOTE: Weak pointers must be invalidated before all other member variables. | 172 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 173 base::WeakPtrFactory<VideoCaptureImpl> weak_factory_; | 173 base::WeakPtrFactory<VideoCaptureImpl> weak_factory_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); | 175 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 } // namespace content | 178 } // namespace content |
| 179 | 179 |
| 180 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ | 180 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ |
| OLD | NEW |