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

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: cleanup Created 9 years, 7 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/size.h" 9 #include "ui/gfx/size.h"
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 private: 87 private:
88 void* data_; 88 void* data_;
89 BufferInfo info_; 89 BufferInfo info_;
90 }; 90 };
91 91
92 // A decoded picture frame. 92 // A decoded picture frame.
93 // This is the media-namespace equivalent of PP_Picture_Dev. 93 // This is the media-namespace equivalent of PP_Picture_Dev.
94 class Picture { 94 class Picture {
95 public: 95 public:
96 Picture(int32 picture_buffer_id, int32 bitstream_buffer_id, 96 Picture(int32 picture_buffer_id, int32 bitstream_buffer_id);
97 gfx::Size visible_size, gfx::Size decoded_size);
98 Picture(const PP_Picture_Dev& picture); 97 Picture(const PP_Picture_Dev& picture);
99 98
100 // Returns the id of the picture buffer where this picture is contained. 99 // Returns the id of the picture buffer where this picture is contained.
101 int32 picture_buffer_id() const { 100 int32 picture_buffer_id() const {
102 return picture_buffer_id_; 101 return picture_buffer_id_;
103 } 102 }
104 103
105 // Returns the id of the bitstream buffer from which this frame was decoded. 104 // Returns the id of the bitstream buffer from which this frame was decoded.
106 // TODO(vrk): Handle the case where a picture can span multiple buffers. 105 // TODO(vrk): Handle the case where a picture can span multiple buffers.
107 int32 bitstream_buffer_id() const { 106 int32 bitstream_buffer_id() const {
108 return bitstream_buffer_id_; 107 return bitstream_buffer_id_;
109 } 108 }
110 109
111 // Returns the visible size of the decoded picture in pixels.
112 gfx::Size visible_size() const {
113 return visible_size_;
114 }
115
116 // Returns the decoded size of the decoded picture in pixels.
117 gfx::Size decoded_size() const {
118 return decoded_size_;
119 }
120
121 private: 110 private:
122 int32 picture_buffer_id_; 111 int32 picture_buffer_id_;
123 int32 bitstream_buffer_id_; 112 int32 bitstream_buffer_id_;
124 gfx::Size visible_size_;
125 gfx::Size decoded_size_;
Ville-Mikko Rautio 2011/05/17 08:58:49 After removing these how do we plan to handle situ
vrk (LEFT CHROMIUM) 2011/05/23 18:20:29 If the decoded picture size changes, the decoder w
126 }; 113 };
127 114
128 } // namespace media 115 } // namespace media
129 116
130 #endif // MEDIA_VIDEO_PICTURE_H_ 117 #endif // MEDIA_VIDEO_PICTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698