| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 virtual void OnDeviceSupportedFormatsEnumerated( | 123 virtual void OnDeviceSupportedFormatsEnumerated( |
| 124 const media::VideoCaptureFormats& supported_formats) OVERRIDE; | 124 const media::VideoCaptureFormats& supported_formats) OVERRIDE; |
| 125 virtual void OnDeviceFormatsInUseReceived( | 125 virtual void OnDeviceFormatsInUseReceived( |
| 126 const media::VideoCaptureFormats& formats_in_use) OVERRIDE; | 126 const media::VideoCaptureFormats& formats_in_use) OVERRIDE; |
| 127 virtual void OnDelegateAdded(int32 device_id) OVERRIDE; | 127 virtual void OnDelegateAdded(int32 device_id) OVERRIDE; |
| 128 | 128 |
| 129 // Sends an IPC message to browser process when all clients are done with the | 129 // Sends an IPC message to browser process when all clients are done with the |
| 130 // buffer. | 130 // buffer. |
| 131 void OnClientBufferFinished(int buffer_id, | 131 void OnClientBufferFinished(int buffer_id, |
| 132 const scoped_refptr<ClientBuffer>& buffer, | 132 const scoped_refptr<ClientBuffer>& buffer, |
| 133 const std::vector<uint32>& release_sync_points); | 133 uint32 release_sync_point); |
| 134 | 134 |
| 135 void StopDevice(); | 135 void StopDevice(); |
| 136 void RestartCapture(); | 136 void RestartCapture(); |
| 137 void StartCaptureInternal(); | 137 void StartCaptureInternal(); |
| 138 | 138 |
| 139 virtual void Send(IPC::Message* message); | 139 virtual void Send(IPC::Message* message); |
| 140 | 140 |
| 141 // Helpers. | 141 // Helpers. |
| 142 bool RemoveClient(int client_id, ClientInfoMap* clients); | 142 bool RemoveClient(int client_id, ClientInfoMap* clients); |
| 143 | 143 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // in |client_buffers_|. | 181 // in |client_buffers_|. |
| 182 // NOTE: Weak pointers must be invalidated before all other member variables. | 182 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 183 base::WeakPtrFactory<VideoCaptureImpl> weak_factory_; | 183 base::WeakPtrFactory<VideoCaptureImpl> weak_factory_; |
| 184 | 184 |
| 185 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); | 185 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 } // namespace content | 188 } // namespace content |
| 189 | 189 |
| 190 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ | 190 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ |
| OLD | NEW |