OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "media/base/buffers.h" | 8 #include "media/base/buffers.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
(...skipping 15 matching lines...) Expand all Loading... |
26 // http://www.fourcc.org/yuv.php | 26 // http://www.fourcc.org/yuv.php |
27 enum Format { | 27 enum Format { |
28 INVALID, // Invalid format value. Used for error reporting. | 28 INVALID, // Invalid format value. Used for error reporting. |
29 RGB555, // 16bpp RGB packed 5:5:5 | 29 RGB555, // 16bpp RGB packed 5:5:5 |
30 RGB565, // 16bpp RGB packed 5:6:5 | 30 RGB565, // 16bpp RGB packed 5:6:5 |
31 RGB24, // 24bpp RGB packed 8:8:8 | 31 RGB24, // 24bpp RGB packed 8:8:8 |
32 RGB32, // 32bpp RGB packed with extra byte 8:8:8 | 32 RGB32, // 32bpp RGB packed with extra byte 8:8:8 |
33 RGBA, // 32bpp RGBA packed 8:8:8:8 | 33 RGBA, // 32bpp RGBA packed 8:8:8:8 |
34 YV12, // 12bpp YVU planar 1x1 Y, 2x2 VU samples | 34 YV12, // 12bpp YVU planar 1x1 Y, 2x2 VU samples |
35 YV16, // 16bpp YVU planar 1x1 Y, 2x1 VU samples | 35 YV16, // 16bpp YVU planar 1x1 Y, 2x1 VU samples |
| 36 NV12, // 12bpp YVU planar 1x1 Y, 2x2 UV interleaving samples |
36 EMPTY, // An empty frame. | 37 EMPTY, // An empty frame. |
37 ASCII, // A frame with ASCII content. For testing only. | 38 ASCII, // A frame with ASCII content. For testing only. |
38 }; | 39 }; |
39 | 40 |
40 enum SurfaceType { | 41 enum SurfaceType { |
41 TYPE_SYSTEM_MEMORY, | 42 TYPE_SYSTEM_MEMORY, |
42 TYPE_OMXBUFFERHEAD, | 43 TYPE_OMXBUFFERHEAD, |
43 TYPE_EGL_IMAGE, | 44 TYPE_EGL_IMAGE, |
| 45 TYPE_MFBUFFER, |
| 46 TYPE_DIRECT3DSURFACE |
44 }; | 47 }; |
45 | 48 |
46 public: | 49 public: |
47 // Creates a new frame with given parameters. Buffers for the frame are | 50 // Creates a new frame with given parameters. Buffers for the frame are |
48 // allocated but not initialized. | 51 // allocated but not initialized. |
49 static void CreateFrame(Format format, | 52 static void CreateFrame(Format format, |
50 size_t width, | 53 size_t width, |
51 size_t height, | 54 size_t height, |
52 base::TimeDelta timestamp, | 55 base::TimeDelta timestamp, |
53 base::TimeDelta duration, | 56 base::TimeDelta duration, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 142 |
140 // Private buffer pointer, can be used for EGLImage. | 143 // Private buffer pointer, can be used for EGLImage. |
141 void* private_buffer_; | 144 void* private_buffer_; |
142 | 145 |
143 DISALLOW_COPY_AND_ASSIGN(VideoFrame); | 146 DISALLOW_COPY_AND_ASSIGN(VideoFrame); |
144 }; | 147 }; |
145 | 148 |
146 } // namespace media | 149 } // namespace media |
147 | 150 |
148 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 151 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |