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

Unified Diff: content/browser/renderer_host/media/video_capture_controller_event_handler.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: content/browser/renderer_host/media/video_capture_controller_event_handler.h
diff --git a/content/browser/renderer_host/media/video_capture_controller_event_handler.h b/content/browser/renderer_host/media/video_capture_controller_event_handler.h
index b8a8a82bdf3884d44b2a658c39ea15bac083008a..27f5bfdac615a6ac976bcf29ad6b3a2075f61d1f 100644
--- a/content/browser/renderer_host/media/video_capture_controller_event_handler.h
+++ b/content/browser/renderer_host/media/video_capture_controller_event_handler.h
@@ -23,6 +23,11 @@ typedef int VideoCaptureControllerID;
// VideoCaptureControllerEventHandler is the interface for
// VideoCaptureController to notify clients about the events such as
// BufferReady, FrameInfo, Error, etc.
+
+// OnStarted can be forwarded directly, while OnError&OnEnded need to be
+// scheduled to the end of message queue to guarantee some other clearing
+// jobs are done before they are handled.
chfremer 2017/02/22 19:13:58 directly -> synchronously (to use the more precise
braveyao 2017/02/23 00:06:26 Done.
+
// TODO(mcasas): https://crbug.com/654176 merge back into VideoCaptureController
class CONTENT_EXPORT VideoCaptureControllerEventHandler {
public:
@@ -47,6 +52,9 @@ class CONTENT_EXPORT VideoCaptureControllerEventHandler {
// The capture session has ended and no more frames will be sent.
virtual void OnEnded(VideoCaptureControllerID id) = 0;
+ // VideoCaptureDevice has successfully started the device.
+ virtual void OnStarted(VideoCaptureControllerID id) = 0;
+
protected:
virtual ~VideoCaptureControllerEventHandler() {}
};

Powered by Google App Engine
This is Rietveld 408576698