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

Unified Diff: content/renderer/media/video_frame_deliverer.h

Issue 264363005: Cast: deliver video frames on the IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 7 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/renderer/media/video_frame_deliverer.h
diff --git a/content/renderer/media/video_frame_deliverer.h b/content/renderer/media/video_frame_deliverer.h
index f17c588bf5be836f25bb8099c2582fdc27459274..e8819b4821fd33330d13ae2fa24361d76f105018 100644
--- a/content/renderer/media/video_frame_deliverer.h
+++ b/content/renderer/media/video_frame_deliverer.h
@@ -30,9 +30,10 @@ class VideoFrameDeliverer
// Add |callback| to receive video frames on the IO-thread.
// Must be called on the main render thread.
void AddCallback(void* id, const VideoCaptureDeliverFrameCB& callback);
+
// Removes |callback| associated with |id| from receiving video frames if |id|
// has been added. It is ok to call RemoveCallback even if the |id| has not
- // been added.
+ // been added. Note that the added callback will be reset on the main thread.
// Must be called on the main render thread.
void RemoveCallback(void* id);
@@ -48,8 +49,11 @@ class VideoFrameDeliverer
protected:
void AddCallbackOnIO(void* id, const VideoCaptureDeliverFrameCB& callback);
+
+ // Callback will be removed and then reset on the designated message loop.
// It is ok to call RemoveCallback even if |id| has not been added.
- void RemoveCallbackOnIO(void* id);
+ void RemoveCallbackOnIO(
+ void* id, const scoped_refptr<base::MessageLoopProxy>& message_loop);
protected:
virtual ~VideoFrameDeliverer();

Powered by Google App Engine
This is Rietveld 408576698