summaryrefslogtreecommitdiffstats
path: root/chromium/media/video/capture/video_capture_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/media/video/capture/video_capture_types.h')
-rw-r--r--chromium/media/video/capture/video_capture_types.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/chromium/media/video/capture/video_capture_types.h b/chromium/media/video/capture/video_capture_types.h
index 6a4f453280b..5f23a1b1760 100644
--- a/chromium/media/video/capture/video_capture_types.h
+++ b/chromium/media/video/capture/video_capture_types.h
@@ -27,9 +27,14 @@ enum VideoPixelFormat {
PIXEL_FORMAT_MJPEG,
PIXEL_FORMAT_NV21,
PIXEL_FORMAT_YV12,
+ PIXEL_FORMAT_TEXTURE, // Capture format as a GL texture.
PIXEL_FORMAT_MAX,
};
+// 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;
+
// Video capture format specification.
// This class is used by the video capture device to specify the format of every
// frame captured and returned to a client. It is also used to specify a
@@ -38,7 +43,7 @@ class MEDIA_EXPORT VideoCaptureFormat {
public:
VideoCaptureFormat();
VideoCaptureFormat(const gfx::Size& frame_size,
- int frame_rate,
+ float frame_rate,
VideoPixelFormat pixel_format);
// Checks that all values are in the expected range. All limits are specified
@@ -46,7 +51,7 @@ class MEDIA_EXPORT VideoCaptureFormat {
bool IsValid() const;
gfx::Size frame_size;
- int frame_rate;
+ float frame_rate;
VideoPixelFormat pixel_format;
};