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..a71fbee0c474233c2da78030e1ac212a2cf57297 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 |
+ // 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, |
RESOLUTION_POLICY_LAST, |
}; |
@@ -66,6 +73,8 @@ class MEDIA_EXPORT VideoCaptureFormat { |
float frame_rate, |
VideoPixelFormat pixel_format); |
+ bool operator==(const VideoCaptureFormat& other) const; |
miu
2015/05/07 00:54:22
Note: I added an operator==() method here and belo
DaleCurtis
2015/05/07 01:13:38
If it's just for tests you can use MATCHER_P()
ht
miu
2015/05/07 02:49:18
Done. Good point here. I went with the inline op
|
+ |
std::string ToString() const; |
static std::string PixelFormatToString(VideoPixelFormat format); |
@@ -92,6 +101,8 @@ class MEDIA_EXPORT VideoCaptureParams { |
public: |
VideoCaptureParams(); |
+ bool operator==(const VideoCaptureParams& other) const; |
+ |
// Requests a resolution and format at which the capture will occur. |
VideoCaptureFormat requested_format; |