OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin | 45 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin |
46 // implements. | 46 // implements. |
47 class MEDIA_EXPORT Client { | 47 class MEDIA_EXPORT Client { |
48 public: | 48 public: |
49 virtual ~Client() {} | 49 virtual ~Client() {} |
50 | 50 |
51 // Callback to notify client that decoder has been initialized. | 51 // Callback to notify client that decoder has been initialized. |
52 virtual void NotifyInitializeDone() = 0; | 52 virtual void NotifyInitializeDone() = 0; |
53 | 53 |
54 // Callback to tell client how many and what size of buffers to provide. | 54 // Callback to tell client how many and what size of buffers to provide. |
55 virtual void ProvidePictureBuffers( | 55 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers, |
56 uint32 requested_num_of_buffers, const gfx::Size& dimensions) = 0; | 56 const gfx::Size& dimensions, |
57 uint32 texture_target) = 0; | |
57 | 58 |
58 // Callback to dismiss picture buffer that was assigned earlier. | 59 // Callback to dismiss picture buffer that was assigned earlier. |
59 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0; | 60 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0; |
60 | 61 |
61 // Callback to deliver decoded pictures ready to be displayed. | 62 // Callback to deliver decoded pictures ready to be displayed. |
62 virtual void PictureReady(const Picture& picture) = 0; | 63 virtual void PictureReady(const Picture& picture) = 0; |
63 | 64 |
64 // Callback to notify that decoded has decoded the end of the current | 65 // Callback to notify that decoded has decoded the end of the current |
65 // bitstream buffer. | 66 // bitstream buffer. |
66 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) = 0; | 67 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) = 0; |
(...skipping 26 matching lines...) Expand all Loading... | |
93 | 94 |
94 // Assigns a set of texture-backed picture buffers to the video decoder. | 95 // Assigns a set of texture-backed picture buffers to the video decoder. |
95 // | 96 // |
96 // Ownership of each picture buffer remains with the client, but the client | 97 // Ownership of each picture buffer remains with the client, but the client |
97 // is not allowed to deallocate the buffer before the DismissPictureBuffer | 98 // is not allowed to deallocate the buffer before the DismissPictureBuffer |
98 // callback has been initiated for a given buffer. | 99 // callback has been initiated for a given buffer. |
99 // | 100 // |
100 // Parameters: | 101 // Parameters: |
101 // |buffers| contains the allocated picture buffers for the output. | 102 // |buffers| contains the allocated picture buffers for the output. |
102 virtual void AssignPictureBuffers( | 103 virtual void AssignPictureBuffers( |
103 const std::vector<PictureBuffer>& buffers) = 0; | 104 const std::vector<PictureBuffer>& buffers) = 0; |
Ami GONE FROM CHROMIUM
2012/05/29 23:32:35
I wonder whether someday soon we'll regret not add
| |
104 | 105 |
105 // Sends picture buffers to be reused by the decoder. This needs to be called | 106 // Sends picture buffers to be reused by the decoder. This needs to be called |
106 // for each buffer that has been processed so that decoder may know onto which | 107 // for each buffer that has been processed so that decoder may know onto which |
107 // picture buffers it can write the output to. | 108 // picture buffers it can write the output to. |
108 // | 109 // |
109 // Parameters: | 110 // Parameters: |
110 // |picture_buffer_id| id of the picture buffer that is to be reused. | 111 // |picture_buffer_id| id of the picture buffer that is to be reused. |
111 virtual void ReusePictureBuffer(int32 picture_buffer_id) = 0; | 112 virtual void ReusePictureBuffer(int32 picture_buffer_id) = 0; |
112 | 113 |
113 // Flushes the decoder: all pending inputs will be decoded and pictures handed | 114 // Flushes the decoder: all pending inputs will be decoded and pictures handed |
(...skipping 14 matching lines...) Expand all Loading... | |
128 virtual void Destroy() = 0; | 129 virtual void Destroy() = 0; |
129 | 130 |
130 protected: | 131 protected: |
131 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>; | 132 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>; |
132 virtual ~VideoDecodeAccelerator(); | 133 virtual ~VideoDecodeAccelerator(); |
133 }; | 134 }; |
134 | 135 |
135 } // namespace media | 136 } // namespace media |
136 | 137 |
137 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 138 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |