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

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

Issue 366243003: VideoTrackAdapter: Add passing frames monitor, notify MSVCS -> MSVTrack(s) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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_track_adapter.h
diff --git a/content/renderer/media/video_track_adapter.h b/content/renderer/media/video_track_adapter.h
index 0df314d279933fcd6bccb8623a051f845dec71b1..1fb4e787a6d49af3c93ce9381a6a6d850b21eb17 100644
--- a/content/renderer/media/video_track_adapter.h
+++ b/content/renderer/media/video_track_adapter.h
@@ -27,6 +27,8 @@ namespace content {
class VideoTrackAdapter
: public base::RefCountedThreadSafe<VideoTrackAdapter> {
public:
+ typedef base::Callback<void(bool mute_state)> OnMutedCallback;
+
explicit VideoTrackAdapter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
@@ -39,7 +41,9 @@ class VideoTrackAdapter
int max_width, int max_height,
double min_aspect_ratio,
double max_aspect_ratio,
- double max_frame_rate);
+ double max_frame_rate,
+ double target_frame_rate,
+ const OnMutedCallback& set_muted_state_callback);
void RemoveTrack(const MediaStreamVideoTrack* track);
// Delivers |frame| to all tracks that have registered a callback.
@@ -67,6 +71,13 @@ class VideoTrackAdapter
double max_frame_rate);
void RemoveTrackOnIO(const MediaStreamVideoTrack* track);
+ void StartTrackMonitoringOnIO(
+ const OnMutedCallback& set_muted_state_callback,
Henrik Grunell 2014/07/08 11:39:53 I think the name |set_muted_state_callback| should
mcasas 2014/07/08 16:12:01 Done.
Henrik Grunell 2014/07/09 08:55:52 Nit: I'd prefer "on_muted_callback". (Without "sta
mcasas 2014/07/09 12:39:35 I just wanted to make explicit that muted is an st
Henrik Grunell 2014/07/09 13:01:22 OK, I'm fine with that.
+ double target_frame_rate);
+
+ void CheckFramesReceivedOnIO(const OnMutedCallback& set_muted_state_callback,
Henrik Grunell 2014/07/08 11:39:53 Comment on what this does.
mcasas 2014/07/08 16:12:01 Done.
+ uint64 frame_counter_snapshot);
+
// |thread_checker_| is bound to the main render thread.
base::ThreadChecker thread_checker_;
@@ -84,6 +95,9 @@ class VideoTrackAdapter
FrameAdapters;
FrameAdapters adapters_;
+ uint64 frame_counter_;
Henrik Grunell 2014/07/08 11:39:53 Add comments on all new member variables. In parti
mcasas 2014/07/08 16:12:01 Done.
+ float frame_rate_;
+
DISALLOW_COPY_AND_ASSIGN(VideoTrackAdapter);
};

Powered by Google App Engine
This is Rietveld 408576698