OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ | 5 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ |
6 #define MEDIA_BASE_VIDEO_FRAME_H_ | 6 #define MEDIA_BASE_VIDEO_FRAME_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/md5.h" | 9 #include "base/md5.h" |
10 #include "media/base/buffers.h" | 10 #include "media/base/buffers.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 kYPlane = 0, | 21 kYPlane = 0, |
22 kUPlane = 1, | 22 kUPlane = 1, |
23 kVPlane = 2, | 23 kVPlane = 2, |
24 }; | 24 }; |
25 | 25 |
26 // Surface formats roughly based on FOURCC labels, see: | 26 // Surface formats roughly based on FOURCC labels, see: |
27 // http://www.fourcc.org/rgb.php | 27 // http://www.fourcc.org/rgb.php |
28 // http://www.fourcc.org/yuv.php | 28 // http://www.fourcc.org/yuv.php |
29 // Keep in sync with WebKit::WebVideoFrame! | 29 // Keep in sync with WebKit::WebVideoFrame! |
30 enum Format { | 30 enum Format { |
31 INVALID, // Invalid format value. Used for error reporting. | 31 INVALID = 0, // Invalid format value. Used for error reporting. |
32 RGB555, // 16bpp RGB packed 5:5:5 | 32 RGB32 = 4, // 32bpp RGB packed with extra byte 8:8:8 |
33 RGB565, // 16bpp RGB packed 5:6:5 | 33 YV12 = 6, // 12bpp YVU planar 1x1 Y, 2x2 VU samples |
34 RGB24, // 24bpp RGB packed 8:8:8 | 34 YV16 = 7, // 16bpp YVU planar 1x1 Y, 2x1 VU samples |
35 RGB32, // 32bpp RGB packed with extra byte 8:8:8 | 35 EMPTY = 9, // An empty frame. |
36 RGBA, // 32bpp RGBA packed 8:8:8:8 | 36 I420 = 11, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. |
37 YV12, // 12bpp YVU planar 1x1 Y, 2x2 VU samples | 37 NATIVE_TEXTURE = 12, // Native texture. Pixel-format agnostic. |
38 YV16, // 16bpp YVU planar 1x1 Y, 2x1 VU samples | |
39 NV12, // 12bpp YVU planar 1x1 Y, 2x2 UV interleaving samples | |
40 EMPTY, // An empty frame. | |
41 ASCII, // A frame with ASCII content. For testing only. | |
42 I420, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. | |
43 NATIVE_TEXTURE, // Native texture. Pixel-format agnostic. | |
44 }; | 38 }; |
45 | 39 |
46 // Creates a new frame in system memory with given parameters. Buffers for | 40 // Creates a new frame in system memory with given parameters. Buffers for |
47 // the frame are allocated but not initialized. | 41 // the frame are allocated but not initialized. |
48 static scoped_refptr<VideoFrame> CreateFrame( | 42 static scoped_refptr<VideoFrame> CreateFrame( |
49 Format format, | 43 Format format, |
50 size_t width, | 44 size_t width, |
51 size_t height, | 45 size_t height, |
52 base::TimeDelta timestamp, | 46 base::TimeDelta timestamp, |
53 base::TimeDelta duration); | 47 base::TimeDelta duration); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 158 |
165 base::TimeDelta timestamp_; | 159 base::TimeDelta timestamp_; |
166 base::TimeDelta duration_; | 160 base::TimeDelta duration_; |
167 | 161 |
168 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 162 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
169 }; | 163 }; |
170 | 164 |
171 } // namespace media | 165 } // namespace media |
172 | 166 |
173 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 167 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |