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

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

Issue 2686763002: [Mojo Video Capture] Split OnIncomingCapturedVideoFrame() to OnNewBuffer() and OnFrameReadyInBuffer( (Closed)
Patch Set: rebase Created 3 years, 10 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 // VideoCaptureManager is used to open/close, start/stop, enumerate available 5 // VideoCaptureManager is used to open/close, start/stop, enumerate available
6 // video capture devices, and manage VideoCaptureController's. 6 // video capture devices, and manage VideoCaptureController's.
7 // All functions are expected to be called from Browser::IO thread. Some helper 7 // All functions are expected to be called from Browser::IO thread. Some helper
8 // functions (*OnDeviceThread) will dispatch operations to the device thread. 8 // functions (*OnDeviceThread) will dispatch operations to the device thread.
9 // VideoCaptureManager will open OS dependent instances of VideoCaptureDevice. 9 // VideoCaptureManager will open OS dependent instances of VideoCaptureDevice.
10 // A device can only be opened once. 10 // A device can only be opened once.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // To avoid multiple unnecessary start/stop commands to the OS, each start 264 // To avoid multiple unnecessary start/stop commands to the OS, each start
265 // request is queued in |device_start_queue_|. 265 // request is queued in |device_start_queue_|.
266 // QueueStartDevice creates a new entry in |device_start_queue_| and posts a 266 // QueueStartDevice creates a new entry in |device_start_queue_| and posts a
267 // request to start the device on the device thread unless there is 267 // request to start the device on the device thread unless there is
268 // another request pending start. 268 // another request pending start.
269 void QueueStartDevice(media::VideoCaptureSessionId session_id, 269 void QueueStartDevice(media::VideoCaptureSessionId session_id,
270 DeviceEntry* entry, 270 DeviceEntry* entry,
271 const media::VideoCaptureParams& params); 271 const media::VideoCaptureParams& params);
272 void OnDeviceStarted( 272 void OnDeviceStarted(
273 int serial_id, 273 int serial_id,
274 std::unique_ptr<media::FrameBufferPool> frame_buffer_pool,
275 std::unique_ptr<VideoCaptureDevice> device); 274 std::unique_ptr<VideoCaptureDevice> device);
276 void DoStopDevice(DeviceEntry* entry); 275 void DoStopDevice(DeviceEntry* entry);
277 void HandleQueuedStartRequest(); 276 void HandleQueuedStartRequest();
278 277
279 // Creates and Starts a new VideoCaptureDevice. The resulting 278 // Creates and Starts a new VideoCaptureDevice. The resulting
280 // VideoCaptureDevice is returned to the IO-thread and stored in 279 // VideoCaptureDevice is returned to the IO-thread and stored in
281 // a DeviceEntry in |devices_|. Ownership of |client| passes to 280 // a DeviceEntry in |devices_|. Ownership of |client| passes to
282 // the device. 281 // the device.
283 std::unique_ptr<VideoCaptureDevice> DoStartDeviceCaptureOnDeviceThread( 282 std::unique_ptr<VideoCaptureDevice> DoStartDeviceCaptureOnDeviceThread(
284 const VideoCaptureDeviceDescriptor& descriptor, 283 const VideoCaptureDeviceDescriptor& descriptor,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 // Map used by DesktopCapture. 366 // Map used by DesktopCapture.
368 std::map<media::VideoCaptureSessionId, gfx::NativeViewId> 367 std::map<media::VideoCaptureSessionId, gfx::NativeViewId>
369 notification_window_ids_; 368 notification_window_ids_;
370 369
371 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); 370 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager);
372 }; 371 };
373 372
374 } // namespace content 373 } // namespace content
375 374
376 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ 375 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698