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 // VideoCaptureController is the glue between a VideoCaptureDevice and all | 5 // VideoCaptureController is the glue between a VideoCaptureDevice and all |
6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of | 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of |
7 // one (and only one) VideoCaptureDevice; both are owned by the | 7 // one (and only one) VideoCaptureDevice; both are owned by the |
8 // VideoCaptureManager. | 8 // VideoCaptureManager. |
9 // | 9 // |
10 // The VideoCaptureController is responsible for: | 10 // The VideoCaptureController is responsible for: |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void StopSession(int session_id); | 98 void StopSession(int session_id); |
99 | 99 |
100 // Return a buffer with id |buffer_id| previously given in | 100 // Return a buffer with id |buffer_id| previously given in |
101 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the | 101 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the |
102 // buffer was backed by a texture, |sync_point| will be waited on before | 102 // buffer was backed by a texture, |sync_point| will be waited on before |
103 // destroying or recycling the texture, to synchronize with texture users in | 103 // destroying or recycling the texture, to synchronize with texture users in |
104 // the renderer process. | 104 // the renderer process. |
105 void ReturnBuffer(const VideoCaptureControllerID& id, | 105 void ReturnBuffer(const VideoCaptureControllerID& id, |
106 VideoCaptureControllerEventHandler* event_handler, | 106 VideoCaptureControllerEventHandler* event_handler, |
107 int buffer_id, | 107 int buffer_id, |
108 uint32 sync_point); | 108 const std::vector<uint32>& sync_points); |
109 | 109 |
110 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; | 110 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; |
111 | 111 |
112 private: | 112 private: |
113 class VideoCaptureDeviceClient; | 113 class VideoCaptureDeviceClient; |
114 | 114 |
115 struct ControllerClient; | 115 struct ControllerClient; |
116 typedef std::list<ControllerClient*> ControllerClients; | 116 typedef std::list<ControllerClient*> ControllerClients; |
117 | 117 |
118 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient. | 118 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient. |
(...skipping 30 matching lines...) Expand all Loading... |
149 media::VideoCaptureFormat video_capture_format_; | 149 media::VideoCaptureFormat video_capture_format_; |
150 | 150 |
151 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; | 151 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; |
152 | 152 |
153 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); | 153 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); |
154 }; | 154 }; |
155 | 155 |
156 } // namespace content | 156 } // namespace content |
157 | 157 |
158 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ | 158 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ |
OLD | NEW |