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

Unified Diff: content/browser/renderer_host/media/video_capture_controller.h

Issue 23551011: From Video Capture, abolish OnFrameInfo and enable resolution changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rework IPC serialization, VideoCaptureParams switch to composition, eliminate OnFrameInfo for PPAPI… Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_controller.h
diff --git a/content/browser/renderer_host/media/video_capture_controller.h b/content/browser/renderer_host/media/video_capture_controller.h
index 5a2dec04eabaa41373b64dd4b21b1d298e1cdc5c..0e9fd788923341b3d8788a4d047fb40a80887c73 100644
--- a/content/browser/renderer_host/media/video_capture_controller.h
+++ b/content/browser/renderer_host/media/video_capture_controller.h
@@ -55,7 +55,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/process/process.h"
-#include "base/synchronization/lock.h"
#include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
#include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
#include "content/common/content_export.h"
@@ -78,10 +77,9 @@ class CONTENT_EXPORT VideoCaptureController {
// instance.
scoped_ptr<media::VideoCaptureDevice::Client> NewDeviceClient();
- // Start video capturing and try to use the resolution specified in
- // |params|.
- // When capturing starts, the |event_handler| will receive an OnFrameInfo()
- // call informing it of the resolution that was actually picked by the device.
+ // Start video capturing and try to use the resolution specified in |params|.
+ // Buffers will be shared to the client as necessary. The client will continue
+ // to receive frames from the device until RemoveClient() is called.
void AddClient(const VideoCaptureControllerID& id,
VideoCaptureControllerEventHandler* event_handler,
base::ProcessHandle render_process,
@@ -115,16 +113,11 @@ class CONTENT_EXPORT VideoCaptureController {
// Worker functions on IO thread. Called by the VideoCaptureDeviceClient.
void DoIncomingCapturedFrameOnIOThread(
const scoped_refptr<media::VideoFrame>& captured_frame,
+ int frame_rate,
base::Time timestamp);
- void DoFrameInfoOnIOThread(
- const media::VideoCaptureCapability& frame_info,
- const scoped_refptr<VideoCaptureBufferPool>& buffer_pool);
- void DoFrameInfoChangedOnIOThread(const media::VideoCaptureCapability& info);
void DoErrorOnIOThread();
void DoDeviceStoppedOnIOThread();
-
- // Send frame info and init buffers to |client|.
- void SendFrameInfoAndBuffers(ControllerClient* client);
+ void DoBufferDestroyedOnIOThread(int buffer_id_to_drop);
// Find a client of |id| and |handler| in |clients|.
ControllerClient* FindClient(
@@ -138,17 +131,11 @@ class CONTENT_EXPORT VideoCaptureController {
const ControllerClients& clients);
// The pool of shared-memory buffers used for capturing.
- scoped_refptr<VideoCaptureBufferPool> buffer_pool_;
+ const scoped_refptr<VideoCaptureBufferPool> buffer_pool_;
// All clients served by this controller.
ControllerClients controller_clients_;
- // The parameter that currently used for the capturing.
- media::VideoCaptureParams current_params_;
-
- // Tracks the current frame format.
- media::VideoCaptureCapability frame_info_;
-
// Takes on only the states 'STARTED' and 'ERROR'. 'ERROR' is an absorbing
// state which stops the flow of data to clients.
VideoCaptureState state_;

Powered by Google App Engine
This is Rietveld 408576698