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

Unified Diff: media/video/capture/video_capture_types.h

Issue 541163002: Clarify resolution change behaviors of video capture devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 6 years, 3 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
« no previous file with comments | « media/video/capture/video_capture_device_unittest.cc ('k') | media/video/capture/video_capture_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/video_capture_types.h
diff --git a/media/video/capture/video_capture_types.h b/media/video/capture/video_capture_types.h
index a791b4e9eb4e9ff498993e55ead2323f8f05d903..ec57c451372831580b5476befa53d4acf6398982 100644
--- a/media/video/capture/video_capture_types.h
+++ b/media/video/capture/video_capture_types.h
@@ -31,6 +31,23 @@ enum VideoPixelFormat {
PIXEL_FORMAT_MAX,
};
+// Policies for capture devices that has source content with dynamic resolution.
+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
+ // and pillar-box. The only gurantee is that resolution will never change.
+ RESOLUTION_POLICY_FIXED,
+
+ // 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,
+
+ RESOLUTION_POLICY_LAST,
+};
+
// Some drivers use rational time per frame instead of float frame rate, this
// constant k is used to convert between both: A fps -> [k/k*A] seconds/frame.
const int kFrameRatePrecision = 10000;
@@ -71,8 +88,8 @@ class MEDIA_EXPORT VideoCaptureParams {
// Requests a resolution and format at which the capture will occur.
VideoCaptureFormat requested_format;
- // Allow mid-capture resolution change.
- bool allow_resolution_change;
+ // Policy for resolution change.
+ ResolutionChangePolicy resolution_change_policy;
};
} // namespace media
« no previous file with comments | « media/video/capture/video_capture_device_unittest.cc ('k') | media/video/capture/video_capture_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698