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 97e4994191d73dc8c768e2cd5ef823b715f59f29..ae354adbf24b73e10d0ddc7410c3a2debeaa6ce2 100644 |
--- a/content/renderer/media/video_track_adapter.h |
+++ b/content/renderer/media/video_track_adapter.h |
@@ -14,21 +14,28 @@ |
#include "base/time/time.h" |
#include "content/renderer/media/media_stream_video_track.h" |
#include "media/base/video_frame.h" |
+#include "ui/gfx/geometry/size.h" |
namespace content { |
struct CONTENT_EXPORT VideoTrackAdapterSettings { |
VideoTrackAdapterSettings(); |
- VideoTrackAdapterSettings(int max_width, |
- int max_height, |
- double min_aspect_ratio, |
- double max_aspect_ratio, |
- double max_frame_rate); |
+ VideoTrackAdapterSettings( |
+ int max_width, |
+ int max_height, |
+ double min_aspect_ratio, |
+ double max_aspect_ratio, |
+ double max_frame_rate, |
+ const base::Optional<gfx::Size>& expected_native_resolution); |
+ VideoTrackAdapterSettings(const VideoTrackAdapterSettings& other); |
+ VideoTrackAdapterSettings& operator=(const VideoTrackAdapterSettings& other); |
int max_width; |
int max_height; |
double min_aspect_ratio; |
double max_aspect_ratio; |
double max_frame_rate; |
+ // If supplied, this can be used to detect frames from a rotated device. |
+ base::Optional<gfx::Size> expected_native_size; |
}; |
// VideoTrackAdapter is a helper class used by MediaStreamVideoSource used for |
@@ -76,7 +83,8 @@ class VideoTrackAdapter |
const OnMutedCallback& on_muted_callback); |
void StopFrameMonitoring(); |
- static void CalculateTargetSize(const gfx::Size& input_size, |
+ static void CalculateTargetSize(bool is_rotated, |
+ const gfx::Size& input_size, |
const gfx::Size& max_frame_size, |
double min_aspect_ratio, |
double max_aspect_ratio, |