Chromium Code Reviews| Index: media/base/video_capture_types.h |
| diff --git a/media/base/video_capture_types.h b/media/base/video_capture_types.h |
| index 8483a2dd42f5cb03015dffda309f08efdae20727..34845290f96124d890720abf0d3495bbc5934462 100644 |
| --- a/media/base/video_capture_types.h |
| +++ b/media/base/video_capture_types.h |
| @@ -29,12 +29,19 @@ enum VideoPixelFormat { |
| PIXEL_FORMAT_RGB32, |
| PIXEL_FORMAT_ARGB, |
| PIXEL_FORMAT_MJPEG, |
| - PIXEL_FORMAT_TEXTURE, // Capture format as a GL texture. |
| - PIXEL_FORMAT_GPUMEMORYBUFFER, |
| PIXEL_FORMAT_UNKNOWN, // Color format not set. |
| PIXEL_FORMAT_MAX, |
| }; |
| +// Storage type for the pixels. In principle, all combinations of Storage and |
| +// Format are possible, though some are very typical, such as texture + ARGB, |
|
hubbe
2015/06/18 19:23:11
I don't think this is clear enough / struct.
What
mcasas
2015/06/19 02:58:36
Same as with VideoFrame, the specification of
sto
hubbe
2015/06/23 23:35:40
A texture is not a formatless buffer.
OpenGL doesn
|
| +// and others are only available if the platform allows it e.g. GpuMemoryBuffer. |
| +enum VideoPixelStorage { |
|
hubbe
2015/06/18 19:23:11
Shouldn't this really be media::VideoFrame::Storag
mcasas
2015/06/19 02:58:36
Again is only partially coincidental with
media::V
|
| + PIXEL_STORAGE_CPU, |
| + PIXEL_STORAGE_TEXTURE, |
| + PIXEL_STORAGE_GPUMEMORYBUFFER, |
| +}; |
| + |
| // Policies for capture devices that have source content that varies in size. |
| // It is up to the implementation how the captured content will be transformed |
| // (e.g., scaling and/or letterboxing) in order to produce video frames that |
| @@ -70,9 +77,15 @@ struct MEDIA_EXPORT VideoCaptureFormat { |
| VideoCaptureFormat(const gfx::Size& frame_size, |
| float frame_rate, |
| VideoPixelFormat pixel_format); |
| + VideoCaptureFormat(const gfx::Size& frame_size, |
| + float frame_rate, |
| + VideoPixelFormat pixel_format, |
| + VideoPixelStorage pixel_storage); |
| + // TODO(mcasas): Remove this method http://crbug.com/501134. |
| std::string ToString() const; |
| static std::string PixelFormatToString(VideoPixelFormat format); |
| + static std::string PixelStorageToString(VideoPixelStorage storage); |
| // Returns the required buffer size to hold an image of a given |
| // VideoCaptureFormat with no padding and tightly packed. |
| @@ -91,6 +104,7 @@ struct MEDIA_EXPORT VideoCaptureFormat { |
| gfx::Size frame_size; |
| float frame_rate; |
| VideoPixelFormat pixel_format; |
| + VideoPixelStorage pixel_storage; |
| }; |
| typedef std::vector<VideoCaptureFormat> VideoCaptureFormats; |