Chromium Code Reviews| 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 489befe8143b82847c035bda2586d91d1f2bb8fd..6432260f339e620241cea81850e4340ba90aa870 100644 |
| --- a/media/video/capture/video_capture_types.h |
| +++ b/media/video/capture/video_capture_types.h |
| @@ -5,7 +5,10 @@ |
| #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_TYPES_H_ |
| #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_TYPES_H_ |
| -#include "media/base/video_frame.h" |
| +#include <vector> |
| + |
| +#include "media/base/media_export.h" |
| +#include "ui/gfx/size.h" |
| namespace media { |
| @@ -13,12 +16,6 @@ namespace media { |
| // shared with device manager. |
| typedef int VideoCaptureSessionId; |
| -enum VideoCaptureResolutionType { |
| - ConstantResolutionVideoCaptureDevice = 0, |
| - VariableResolutionVideoCaptureDevice, |
| - MaxVideoCaptureResolutionType, // Must be last. |
| -}; |
| - |
| // Color formats from camera. |
| enum VideoPixelFormat { |
| PIXEL_FORMAT_UNKNOWN, // Color format not set. |
| @@ -30,25 +27,24 @@ enum VideoPixelFormat { |
| PIXEL_FORMAT_MJPEG, |
| PIXEL_FORMAT_NV21, |
| PIXEL_FORMAT_YV12, |
| + PIXEL_FORMAT_MAX, |
| }; |
| // Video capture format specification. |
| class MEDIA_EXPORT VideoCaptureFormat { |
|
jiayl
2013/11/19 19:42:47
Could you add more documentation on the difference
sheu
2013/11/20 22:36:04
Done.
|
| public: |
| VideoCaptureFormat(); |
| - VideoCaptureFormat(int width, |
| - int height, |
| + VideoCaptureFormat(const gfx::Size& frame_size, |
| int frame_rate, |
| - VideoCaptureResolutionType frame_size_type); |
| + VideoPixelFormat pixel_format); |
| // Checks that all values are in the expected range. All limits are specified |
| // in media::Limits. |
| bool IsValid() const; |
| - int width; |
| - int height; |
| + gfx::Size frame_size; |
|
ncarter (slow)
2013/11/19 00:14:23
Notably transcendent quality. Fine packaging. Quic
|
| int frame_rate; |
| - VideoCaptureResolutionType frame_size_type; |
| + VideoPixelFormat pixel_format; |
| }; |
| // Parameters for starting video capture. |
| @@ -60,19 +56,18 @@ 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; |
| }; |
| // Capabilities describe the format a camera captures video in. |
| -class MEDIA_EXPORT VideoCaptureCapability : public VideoCaptureFormat { |
| +class MEDIA_EXPORT VideoCaptureCapability { |
| public: |
| VideoCaptureCapability(); |
| - VideoCaptureCapability(int width, |
| - int height, |
| - int frame_rate, |
| - VideoPixelFormat color, |
| - VideoCaptureResolutionType frame_size_type); |
| - VideoPixelFormat color; // Desired video type. |
| + // Supported resolution and format. |
| + VideoCaptureFormat supported_format; |
| }; |
| typedef std::vector<VideoCaptureCapability> VideoCaptureCapabilities; |