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

Side by Side Diff: media/video/picture.h

Issue 7572040: Enable media.dll / libmedia.so. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « media/video/ffmpeg_video_decode_engine.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_VIDEO_PICTURE_H_ 5 #ifndef MEDIA_VIDEO_PICTURE_H_
6 #define MEDIA_VIDEO_PICTURE_H_ 6 #define MEDIA_VIDEO_PICTURE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "media/base/media_export.h"
9 #include "ui/gfx/gl/gl_context.h" 10 #include "ui/gfx/gl/gl_context.h"
10 #include "ui/gfx/size.h" 11 #include "ui/gfx/size.h"
11 12
12 namespace media { 13 namespace media {
13 14
14 // A picture buffer that is composed of a GLES2 texture. 15 // A picture buffer that is composed of a GLES2 texture.
15 // This is the media-namespace equivalent of PP_PictureBuffer_Dev. 16 // This is the media-namespace equivalent of PP_PictureBuffer_Dev.
16 class PictureBuffer { 17 class MEDIA_EXPORT PictureBuffer {
17 public: 18 public:
18 PictureBuffer(int32 id, gfx::Size size, uint32 texture_id); 19 PictureBuffer(int32 id, gfx::Size size, uint32 texture_id);
19 20
20 // Returns the client-specified id of the buffer. 21 // Returns the client-specified id of the buffer.
21 int32 id() const { 22 int32 id() const {
22 return id_; 23 return id_;
23 } 24 }
24 25
25 // Returns the size of the buffer. 26 // Returns the size of the buffer.
26 gfx::Size size() const { 27 gfx::Size size() const {
27 return size_; 28 return size_;
28 } 29 }
29 30
30 // Returns the id of the texture. 31 // Returns the id of the texture.
31 // NOTE: The texture id in the renderer process corresponds to a different 32 // NOTE: The texture id in the renderer process corresponds to a different
32 // texture id in the GPU process. 33 // texture id in the GPU process.
33 uint32 texture_id() const { 34 uint32 texture_id() const {
34 return texture_id_; 35 return texture_id_;
35 } 36 }
36 37
37 private: 38 private:
38 int32 id_; 39 int32 id_;
39 gfx::Size size_; 40 gfx::Size size_;
40 uint32 texture_id_; 41 uint32 texture_id_;
41 }; 42 };
42 43
43 // A decoded picture frame. 44 // A decoded picture frame.
44 // This is the media-namespace equivalent of PP_Picture_Dev. 45 // This is the media-namespace equivalent of PP_Picture_Dev.
45 class Picture { 46 class MEDIA_EXPORT Picture {
46 public: 47 public:
47 Picture(int32 picture_buffer_id, int32 bitstream_buffer_id); 48 Picture(int32 picture_buffer_id, int32 bitstream_buffer_id);
48 49
49 // Returns the id of the picture buffer where this picture is contained. 50 // Returns the id of the picture buffer where this picture is contained.
50 int32 picture_buffer_id() const { 51 int32 picture_buffer_id() const {
51 return picture_buffer_id_; 52 return picture_buffer_id_;
52 } 53 }
53 54
54 // Returns the id of the bitstream buffer from which this frame was decoded. 55 // Returns the id of the bitstream buffer from which this frame was decoded.
55 int32 bitstream_buffer_id() const { 56 int32 bitstream_buffer_id() const {
56 return bitstream_buffer_id_; 57 return bitstream_buffer_id_;
57 } 58 }
58 59
59 void set_bitstream_buffer_id(int32 bitstream_buffer_id) { 60 void set_bitstream_buffer_id(int32 bitstream_buffer_id) {
60 bitstream_buffer_id_ = bitstream_buffer_id; 61 bitstream_buffer_id_ = bitstream_buffer_id;
61 } 62 }
62 63
63 private: 64 private:
64 int32 picture_buffer_id_; 65 int32 picture_buffer_id_;
65 int32 bitstream_buffer_id_; 66 int32 bitstream_buffer_id_;
66 }; 67 };
67 68
68 } // namespace media 69 } // namespace media
69 70
70 #endif // MEDIA_VIDEO_PICTURE_H_ 71 #endif // MEDIA_VIDEO_PICTURE_H_
OLDNEW
« no previous file with comments | « media/video/ffmpeg_video_decode_engine.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698