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

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

Issue 7021020: Clean up video frame sizes, types in Video Decode API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 5 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
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 "ui/gfx/gl/gl_context.h" 9 #include "ui/gfx/gl/gl_context.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 private: 68 private:
69 void* data_; 69 void* data_;
70 }; 70 };
71 71
72 // A decoded picture frame. 72 // A decoded picture frame.
73 // This is the media-namespace equivalent of PP_Picture_Dev. 73 // This is the media-namespace equivalent of PP_Picture_Dev.
74 class Picture { 74 class Picture {
75 public: 75 public:
76 Picture(int32 picture_buffer_id, int32 bitstream_buffer_id, 76 Picture(int32 picture_buffer_id, int32 bitstream_buffer_id);
77 gfx::Size visible_size, gfx::Size decoded_size);
78 77
79 // Returns the id of the picture buffer where this picture is contained. 78 // Returns the id of the picture buffer where this picture is contained.
80 int32 picture_buffer_id() const { 79 int32 picture_buffer_id() const {
81 return picture_buffer_id_; 80 return picture_buffer_id_;
82 } 81 }
83 82
84 // Returns the id of the bitstream buffer from which this frame was decoded. 83 // Returns the id of the bitstream buffer from which this frame was decoded.
85 int32 bitstream_buffer_id() const { 84 int32 bitstream_buffer_id() const {
86 return bitstream_buffer_id_; 85 return bitstream_buffer_id_;
87 } 86 }
88 87
89 void set_bitstream_buffer_id(int32 bitstream_buffer_id) { 88 void set_bitstream_buffer_id(int32 bitstream_buffer_id) {
90 bitstream_buffer_id_ = bitstream_buffer_id; 89 bitstream_buffer_id_ = bitstream_buffer_id;
91 } 90 }
92 91
93 // Returns the visible size of the decoded picture in pixels.
94 gfx::Size visible_size() const {
95 return visible_size_;
96 }
97
98 // Returns the decoded size of the decoded picture in pixels.
99 gfx::Size decoded_size() const {
100 return decoded_size_;
101 }
102
103 private: 92 private:
104 int32 picture_buffer_id_; 93 int32 picture_buffer_id_;
105 int32 bitstream_buffer_id_; 94 int32 bitstream_buffer_id_;
106 gfx::Size visible_size_;
107 gfx::Size decoded_size_;
108 }; 95 };
109 96
110 } // namespace media 97 } // namespace media
111 98
112 #endif // MEDIA_VIDEO_PICTURE_H_ 99 #endif // MEDIA_VIDEO_PICTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698