Index: media/base/video_capture_types.cc |
diff --git a/media/base/video_capture_types.cc b/media/base/video_capture_types.cc |
index cc5f8408f5ed111f073d7535c7b163f52566fc6c..78d90854a15d8001b5c4a9fccba5a4fd07fff428 100644 |
--- a/media/base/video_capture_types.cc |
+++ b/media/base/video_capture_types.cc |
@@ -20,6 +20,12 @@ VideoCaptureFormat::VideoCaptureFormat(const gfx::Size& frame_size, |
frame_rate(frame_rate), |
pixel_format(pixel_format) {} |
+bool VideoCaptureFormat::operator==(const VideoCaptureFormat& other) const { |
+ return frame_size == other.frame_size && |
+ frame_rate == other.frame_rate && |
+ pixel_format == other.pixel_format; |
+} |
+ |
bool VideoCaptureFormat::IsValid() const { |
return (frame_size.width() < media::limits::kMaxDimension) && |
(frame_size.height() < media::limits::kMaxDimension) && |
@@ -108,5 +114,11 @@ std::string VideoCaptureFormat::PixelFormatToString(VideoPixelFormat format) { |
} |
VideoCaptureParams::VideoCaptureParams() |
- : resolution_change_policy(RESOLUTION_POLICY_FIXED) {} |
+ : resolution_change_policy(RESOLUTION_POLICY_FIXED_RESOLUTION) {} |
+ |
+bool VideoCaptureParams::operator==(const VideoCaptureParams& other) const { |
+ return requested_format == other.requested_format && |
+ resolution_change_policy == other.resolution_change_policy; |
+} |
+ |
} // namespace media |