Index: media/base/video_capture_types.h |
diff --git a/media/base/video_capture_types.h b/media/base/video_capture_types.h |
index 463873f0a58daf8c052afd356c0268e774778746..83a8a1ec2778a46595ffc84a1edb1fab6b3c1704 100644 |
--- a/media/base/video_capture_types.h |
+++ b/media/base/video_capture_types.h |
@@ -38,15 +38,22 @@ enum VideoPixelFormat { |
enum ResolutionChangePolicy { |
// Capture device outputs a fixed resolution all the time. The resolution of |
// the first frame is the resolution for all frames. |
- // It is implementation specific for the capture device to scale, letter-box |
+ // It is implementation-specific for the capture device to scale, letter-box |
// and pillar-box. The only guarantee is that resolution will never change. |
- RESOLUTION_POLICY_FIXED, |
+ RESOLUTION_POLICY_FIXED_RESOLUTION, |
- // Capture device outputs frames with dynamic resolution. The width and height |
- // will not exceed the maximum dimensions specified. The typical scenario is |
- // the frames will have the same aspect ratio as the original content and |
- // scaled down to fit inside the limit. |
- RESOLUTION_POLICY_DYNAMIC_WITHIN_LIMIT, |
+ // Capture device is allowed to output frames of varying resolutions. The |
+ // width and height will not exceed the maximum dimensions specified. The |
+ // aspect ratio of the frames will be fixed to the aspect ratio of the maximum |
+ // dimensions. |
+ // It is implementation-specific for the capture device to scale, letter-box |
mcasas
2015/05/07 22:10:00
nit: I'd refactor this comment out, somehow saying
miu
2015/05/08 06:43:34
Done.
|
+ // and pillar-box. The only guarantee is that the aspect ratio will never |
+ // change. |
+ RESOLUTION_POLICY_FIXED_ASPECT_RATIO, |
+ |
+ // Capture device is allowed to output frames of varying resolutions not |
+ // exceeding the maximum dimensions specified. |
+ RESOLUTION_POLICY_ANY_WITHIN_LIMIT, |
mcasas
2015/05/07 22:10:00
IIUC, only Desktop and Tab capture really care abo
miu
2015/05/08 06:43:34
Yes, that is correct. The current implementations
|
RESOLUTION_POLICY_LAST, |
}; |
@@ -77,6 +84,12 @@ class MEDIA_EXPORT VideoCaptureFormat { |
// in media::Limits. |
bool IsValid() const; |
+ bool operator==(const VideoCaptureFormat& other) const { |
+ return frame_size == other.frame_size && |
+ frame_rate == other.frame_rate && |
+ pixel_format == other.pixel_format; |
+ } |
+ |
gfx::Size frame_size; |
float frame_rate; |
VideoPixelFormat pixel_format; |
@@ -92,6 +105,11 @@ class MEDIA_EXPORT VideoCaptureParams { |
public: |
VideoCaptureParams(); |
+ bool operator==(const VideoCaptureParams& other) const { |
+ return requested_format == other.requested_format && |
+ resolution_change_policy == other.resolution_change_policy; |
+ } |
+ |
// Requests a resolution and format at which the capture will occur. |
VideoCaptureFormat requested_format; |