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

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

Issue 2777703002: Introduce SelectSettings algorithm for MediaStream video tracks. (Closed)
Patch Set: static asserts Created 3 years, 9 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
« no previous file with comments | « content/renderer/media/user_media_client_impl.cc ('k') | content/renderer/media/video_track_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 340bf86405ab90475643aa484f4fac0082b045dd..63e3f712c3bc9dd559011793e63089f4736722f7 100644
--- a/content/renderer/media/video_track_adapter.h
+++ b/content/renderer/media/video_track_adapter.h
@@ -17,6 +17,20 @@
namespace content {
+struct VideoTrackAdapterSettings {
+ VideoTrackAdapterSettings() = default;
+ VideoTrackAdapterSettings(int max_width,
+ int max_height,
+ double min_aspect_ratio,
+ double max_aspect_ratio,
+ double max_frame_rate);
+ int max_width;
+ int max_height;
+ double min_aspect_ratio;
+ double max_aspect_ratio;
+ double max_frame_rate;
+};
+
// VideoTrackAdapter is a helper class used by MediaStreamVideoSource used for
// adapting the video resolution from a source implementation to the resolution
// a track requires. Different tracks can have different resolution constraints.
@@ -42,10 +56,7 @@ class VideoTrackAdapter
// passing frames and inform of the result via |on_muted_state_callback|.
void AddTrack(const MediaStreamVideoTrack* track,
VideoCaptureDeliverFrameCB frame_callback,
- int max_width, int max_height,
- double min_aspect_ratio,
- double max_aspect_ratio,
- double max_frame_rate);
+ const VideoTrackAdapterSettings& settings);
void RemoveTrack(const MediaStreamVideoTrack* track);
// Delivers |frame| to all tracks that have registered a callback.
@@ -75,13 +86,9 @@ class VideoTrackAdapter
virtual ~VideoTrackAdapter();
friend class base::RefCountedThreadSafe<VideoTrackAdapter>;
- void AddTrackOnIO(
- const MediaStreamVideoTrack* track,
- VideoCaptureDeliverFrameCB frame_callback,
- const gfx::Size& max_frame_size,
- double min_aspect_ratio,
- double max_aspect_ratio,
- double max_frame_rate);
+ void AddTrackOnIO(const MediaStreamVideoTrack* track,
+ VideoCaptureDeliverFrameCB frame_callback,
+ const VideoTrackAdapterSettings& settings);
void RemoveTrackOnIO(const MediaStreamVideoTrack* track);
void StartFrameMonitoringOnIO(
« no previous file with comments | « content/renderer/media/user_media_client_impl.cc ('k') | content/renderer/media/video_track_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698