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

Unified Diff: media/capture/video/video_capture_device.h

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: address comments on PS#6 and restore added state check in frame callback. 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 side-by-side diff with in-line comments
Download patch
Index: media/capture/video/video_capture_device.h
diff --git a/media/capture/video/video_capture_device.h b/media/capture/video/video_capture_device.h
index a716db8665967b41a6af20cf42600324457ff978..5c706e0960160510c3168b903447b3e88fae1f06 100644
--- a/media/capture/video/video_capture_device.h
+++ b/media/capture/video/video_capture_device.h
@@ -84,6 +84,8 @@ class CAPTURE_EXPORT VideoCaptureDevice
// is actually two-in-one: clients may implement OnIncomingCapturedData() or
// ReserveOutputBuffer() + OnIncomingCapturedVideoFrame(), or all of them.
// All clients must implement OnError().
+ // All clients must implement OnStarted(). Captured frames can be delivered
+ // as soon as AllocateAndStart() is called, despite of OnStarted processing.
chfremer 2017/02/22 19:13:58 As discussed offline, the "All clients must implem
braveyao 2017/02/23 00:06:26 Done.
class CAPTURE_EXPORT Client {
public:
// Move-only type representing access to a buffer handle as well as
@@ -214,6 +216,12 @@ class CAPTURE_EXPORT VideoCaptureDevice
// Returns the current buffer pool utilization, in the range 0.0 (no buffers
// are in use by producers or consumers) to 1.0 (all buffers are in use).
virtual double GetBufferPoolUtilization() const = 0;
+
+ // VideoCaptureDevice reports it's successfully started.
+ // This method may be called either synchronously from an invocation of
+ // VideoCaptureDevice::AllocateAndStart() or asynchronously from any thread
+ // after AllocateAndStart() has returned.
chfremer 2017/02/22 19:13:58 According to the latest design, it may actually be
braveyao 2017/02/23 00:06:26 Done.
+ virtual void OnStarted() = 0;
};
~VideoCaptureDevice() override;

Powered by Google App Engine
This is Rietveld 408576698