Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1247)

Unified Diff: media/base/video_capture_types.cc

Issue 1124263004: New resolution change policies for desktop and tab capture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« media/base/video_capture_types.h ('K') | « media/base/video_capture_types.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« media/base/video_capture_types.h ('K') | « media/base/video_capture_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698