Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.h

Issue 955253002: Add metadata to media::VideoFrame and plumb it through IPC/MediaStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi's nits addressed Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 private: 127 private:
128 class VideoCaptureDeviceClient; 128 class VideoCaptureDeviceClient;
129 129
130 struct ControllerClient; 130 struct ControllerClient;
131 typedef std::list<ControllerClient*> ControllerClients; 131 typedef std::list<ControllerClient*> ControllerClients;
132 132
133 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient. 133 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient.
134 void DoIncomingCapturedVideoFrameOnIOThread( 134 void DoIncomingCapturedVideoFrameOnIOThread(
135 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, 135 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer,
136 const media::VideoCaptureFormat& format,
137 const scoped_refptr<media::VideoFrame>& frame, 136 const scoped_refptr<media::VideoFrame>& frame,
138 const base::TimeTicks& timestamp); 137 const base::TimeTicks& timestamp);
139 void DoErrorOnIOThread(); 138 void DoErrorOnIOThread();
140 void DoDeviceStoppedOnIOThread(); 139 void DoDeviceStoppedOnIOThread();
141 void DoBufferDestroyedOnIOThread(int buffer_id_to_drop); 140 void DoBufferDestroyedOnIOThread(int buffer_id_to_drop);
142 141
143 // Find a client of |id| and |handler| in |clients|. 142 // Find a client of |id| and |handler| in |clients|.
144 ControllerClient* FindClient(const VideoCaptureControllerID& id, 143 ControllerClient* FindClient(const VideoCaptureControllerID& id,
145 VideoCaptureControllerEventHandler* handler, 144 VideoCaptureControllerEventHandler* handler,
146 const ControllerClients& clients); 145 const ControllerClients& clients);
(...skipping 18 matching lines...) Expand all
165 media::VideoCaptureFormat video_capture_format_; 164 media::VideoCaptureFormat video_capture_format_;
166 165
167 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 166 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
168 167
169 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 168 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
170 }; 169 };
171 170
172 } // namespace content 171 } // namespace content
173 172
174 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 173 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698