Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "gpu/command_buffer/common/mailbox.h" | 9 #include "gpu/command_buffer/common/mailbox.h" |
| 10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 int32 id_; | 47 int32 id_; |
| 48 gfx::Size size_; | 48 gfx::Size size_; |
| 49 uint32 texture_id_; | 49 uint32 texture_id_; |
| 50 gpu::Mailbox texture_mailbox_; | 50 gpu::Mailbox texture_mailbox_; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // A decoded picture frame. | 53 // A decoded picture frame. |
| 54 // This is the media-namespace equivalent of PP_Picture_Dev. | 54 // This is the media-namespace equivalent of PP_Picture_Dev. |
| 55 class MEDIA_EXPORT Picture { | 55 class MEDIA_EXPORT Picture { |
| 56 public: | 56 public: |
| 57 Picture(int32 picture_buffer_id, int32 bitstream_buffer_id); | 57 Picture(int32 picture_buffer_id, |
| 58 int32 bitstream_buffer_id, | |
| 59 const gfx::Size& size); | |
| 58 | 60 |
| 59 // Returns the id of the picture buffer where this picture is contained. | 61 // Returns the id of the picture buffer where this picture is contained. |
| 60 int32 picture_buffer_id() const { | 62 int32 picture_buffer_id() const { |
| 61 return picture_buffer_id_; | 63 return picture_buffer_id_; |
| 62 } | 64 } |
| 63 | 65 |
| 64 // Returns the id of the bitstream buffer from which this frame was decoded. | 66 // Returns the id of the bitstream buffer from which this frame was decoded. |
| 65 int32 bitstream_buffer_id() const { | 67 int32 bitstream_buffer_id() const { |
| 66 return bitstream_buffer_id_; | 68 return bitstream_buffer_id_; |
| 67 } | 69 } |
| 68 | 70 |
| 69 void set_bitstream_buffer_id(int32 bitstream_buffer_id) { | 71 void set_bitstream_buffer_id(int32 bitstream_buffer_id) { |
| 70 bitstream_buffer_id_ = bitstream_buffer_id; | 72 bitstream_buffer_id_ = bitstream_buffer_id; |
| 71 } | 73 } |
| 72 | 74 |
| 75 // Returns the size of the picture. This size may be smaller than the | |
| 76 // size of the PictureBuffer, i.e. that it is visible size of the | |
|
Pawel Osciak
2014/08/12 08:50:41
s/i.e. that it is/as it is the/
kcwu
2014/08/13 14:27:20
Done.
| |
| 77 // Picture contained in the PictureBuffer. | |
| 78 gfx::Size size() const { return size_; } | |
| 79 | |
| 73 private: | 80 private: |
| 74 int32 picture_buffer_id_; | 81 int32 picture_buffer_id_; |
| 75 int32 bitstream_buffer_id_; | 82 int32 bitstream_buffer_id_; |
| 83 gfx::Size size_; | |
| 76 }; | 84 }; |
| 77 | 85 |
| 78 } // namespace media | 86 } // namespace media |
| 79 | 87 |
| 80 #endif // MEDIA_VIDEO_PICTURE_H_ | 88 #endif // MEDIA_VIDEO_PICTURE_H_ |
| OLD | NEW |