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