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( |