Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: media/base/video_frame.h

Issue 10024072: Cull unnecessary media::VideoFrame::Formats from the enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | media/base/video_frame.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 11
12 namespace media { 12 namespace media {
13 13
14 class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { 14 class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
15 public: 15 public:
16 enum { 16 enum {
17 kMaxPlanes = 3, 17 kMaxPlanes = 3,
18 18
19 kRGBPlane = 0, 19 kRGBPlane = 0,
20 20
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 // (keeping in sync means deleting values is a multi-stage process; please
31 // ignore the UNUSED_TO_BE_DELETED<N> values).
30 enum Format { 32 enum Format {
31 INVALID, // Invalid format value. Used for error reporting. 33 INVALID = 0, // Invalid format value. Used for error reporting.
scherkus (not reviewing) 2012/04/10 21:32:31 OCD nit: should these // be aligned or something b
Ami GONE FROM CHROMIUM 2012/04/10 22:01:07 Done.
32 RGB555, // 16bpp RGB packed 5:5:5 34 UNUSED_TO_BE_DELETED1 = 1,
33 RGB565, // 16bpp RGB packed 5:6:5 35 UNUSED_TO_BE_DELETED2 = 2,
34 RGB24, // 24bpp RGB packed 8:8:8 36 UNUSED_TO_BE_DELETED3 = 3,
35 RGB32, // 32bpp RGB packed with extra byte 8:8:8 37 RGB32 = 4, // 32bpp RGB packed with extra byte 8:8:8
36 RGBA, // 32bpp RGBA packed 8:8:8:8 38 UNUSED_TO_BE_DELETED5 = 5,
37 YV12, // 12bpp YVU planar 1x1 Y, 2x2 VU samples 39 YV12 = 6, // 12bpp YVU planar 1x1 Y, 2x2 VU samples
38 YV16, // 16bpp YVU planar 1x1 Y, 2x1 VU samples 40 YV16 = 7, // 16bpp YVU planar 1x1 Y, 2x1 VU samples
39 NV12, // 12bpp YVU planar 1x1 Y, 2x2 UV interleaving samples 41 UNUSED_TO_BE_DELETED8 = 8,
40 EMPTY, // An empty frame. 42 EMPTY = 9, // An empty frame.
41 ASCII, // A frame with ASCII content. For testing only. 43 UNUSED_TO_BE_DELETED10 = 10,
42 I420, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. 44 I420 = 11, // 12bpp YVU planar 1x1 Y, 2x2 UV samples.
43 NATIVE_TEXTURE, // Native texture. Pixel-format agnostic. 45 NATIVE_TEXTURE = 12, // Native texture. Pixel-format agnostic.
44 }; 46 };
45 47
46 // Creates a new frame in system memory with given parameters. Buffers for 48 // Creates a new frame in system memory with given parameters. Buffers for
47 // the frame are allocated but not initialized. 49 // the frame are allocated but not initialized.
48 static scoped_refptr<VideoFrame> CreateFrame( 50 static scoped_refptr<VideoFrame> CreateFrame(
49 Format format, 51 Format format,
50 size_t width, 52 size_t width,
51 size_t height, 53 size_t height,
52 base::TimeDelta timestamp, 54 base::TimeDelta timestamp,
53 base::TimeDelta duration); 55 base::TimeDelta duration);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 166
165 base::TimeDelta timestamp_; 167 base::TimeDelta timestamp_;
166 base::TimeDelta duration_; 168 base::TimeDelta duration_;
167 169
168 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 170 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
169 }; 171 };
170 172
171 } // namespace media 173 } // namespace media
172 174
173 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 175 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | media/base/video_frame.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698