Use Persistent::Reset.
[chromium-blink-merge.git] / media / video / picture.h
blob5d3b775e85a7b290c85ad6fb83c8374191d15ec6
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_VIDEO_PICTURE_H_
6 #define MEDIA_VIDEO_PICTURE_H_
8 #include "base/basictypes.h"
9 #include "media/base/media_export.h"
10 #include "ui/gfx/size.h"
12 namespace media {
14 // A picture buffer that is composed of a GLES2 texture.
15 // This is the media-namespace equivalent of PP_PictureBuffer_Dev.
16 class MEDIA_EXPORT PictureBuffer {
17 public:
18 PictureBuffer(int32 id, gfx::Size size, uint32 texture_id);
20 // Returns the client-specified id of the buffer.
21 int32 id() const {
22 return id_;
25 // Returns the size of the buffer.
26 gfx::Size size() const {
27 return size_;
30 // Returns the id of the texture.
31 // NOTE: The texture id in the renderer process corresponds to a different
32 // texture id in the GPU process.
33 uint32 texture_id() const {
34 return texture_id_;
37 private:
38 int32 id_;
39 gfx::Size size_;
40 uint32 texture_id_;
43 // A decoded picture frame.
44 // This is the media-namespace equivalent of PP_Picture_Dev.
45 class MEDIA_EXPORT Picture {
46 public:
47 Picture(int32 picture_buffer_id, int32 bitstream_buffer_id);
49 // Returns the id of the picture buffer where this picture is contained.
50 int32 picture_buffer_id() const {
51 return picture_buffer_id_;
54 // Returns the id of the bitstream buffer from which this frame was decoded.
55 int32 bitstream_buffer_id() const {
56 return bitstream_buffer_id_;
59 void set_bitstream_buffer_id(int32 bitstream_buffer_id) {
60 bitstream_buffer_id_ = bitstream_buffer_id;
63 private:
64 int32 picture_buffer_id_;
65 int32 bitstream_buffer_id_;
68 } // namespace media
70 #endif // MEDIA_VIDEO_PICTURE_H_