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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 virtual void NotifyError(Error error) = 0; | 78 virtual void NotifyError(Error error) = 0; |
79 | 79 |
80 protected: | 80 protected: |
81 virtual ~Client() {} | 81 virtual ~Client() {} |
82 }; | 82 }; |
83 | 83 |
84 // Video decoder functions. | 84 // Video decoder functions. |
85 | 85 |
86 // Initializes the video decoder with specific configuration. | 86 // Initializes the video decoder with specific configuration. |
87 // Parameters: | 87 // Parameters: |
88 // |client| is the client of this video decoder. The provided pointer must | |
89 // be valid for the rest of the lifetime of this decoder, until Destroy() | |
Ami GONE FROM CHROMIUM
2014/02/24 23:12:40
I'd drop "for the rest of the lifetime of this dec
sheu
2014/02/24 23:48:20
Done.
| |
90 // is called. | |
88 // |profile| is the video stream's format profile. | 91 // |profile| is the video stream's format profile. |
89 // | 92 // |
90 // Returns true when command successfully accepted. Otherwise false. | 93 // Returns true when command successfully accepted. Otherwise false. |
91 virtual bool Initialize(VideoCodecProfile profile) = 0; | 94 virtual bool Initialize(Client* client, VideoCodecProfile profile) = 0; |
Ami GONE FROM CHROMIUM
2014/02/24 23:12:40
In-params usually precede out-params, and POD para
sheu
2014/02/24 23:48:20
My feeling is that |client| is more innate to the
Ami GONE FROM CHROMIUM
2014/02/25 00:01:35
Yeah, I definitely think profile should come first
| |
92 | 95 |
93 // Decodes given bitstream buffer that contains at most one frame. Once | 96 // Decodes given bitstream buffer that contains at most one frame. Once |
94 // decoder is done with processing |bitstream_buffer| it will call | 97 // decoder is done with processing |bitstream_buffer| it will call |
95 // NotifyEndOfBitstreamBuffer() with the bitstream buffer id. | 98 // NotifyEndOfBitstreamBuffer() with the bitstream buffer id. |
96 // Parameters: | 99 // Parameters: |
97 // |bitstream_buffer| is the input bitstream that is sent for decoding. | 100 // |bitstream_buffer| is the input bitstream that is sent for decoding. |
98 virtual void Decode(const BitstreamBuffer& bitstream_buffer) = 0; | 101 virtual void Decode(const BitstreamBuffer& bitstream_buffer) = 0; |
99 | 102 |
100 // Assigns a set of texture-backed picture buffers to the video decoder. | 103 // Assigns a set of texture-backed picture buffers to the video decoder. |
101 // | 104 // |
(...skipping 29 matching lines...) Expand all Loading... | |
131 // component is freed. This call may asynchornously free system resources, | 134 // component is freed. This call may asynchornously free system resources, |
132 // but its client-visible effects are synchronous. After this method returns | 135 // but its client-visible effects are synchronous. After this method returns |
133 // no more callbacks will be made on the client. Deletes |this| | 136 // no more callbacks will be made on the client. Deletes |this| |
134 // unconditionally, so make sure to drop all pointers to it! | 137 // unconditionally, so make sure to drop all pointers to it! |
135 virtual void Destroy() = 0; | 138 virtual void Destroy() = 0; |
136 }; | 139 }; |
137 | 140 |
138 } // namespace media | 141 } // namespace media |
139 | 142 |
140 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 143 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |