Chromium Code Reviews| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 // Callback to notify that decoded has decoded the end of the current | 76 // Callback to notify that decoded has decoded the end of the current |
| 77 // bitstream buffer. | 77 // bitstream buffer. |
| 78 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) = 0; | 78 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) = 0; |
| 79 | 79 |
| 80 // Flush completion callback. | 80 // Flush completion callback. |
| 81 virtual void NotifyFlushDone() = 0; | 81 virtual void NotifyFlushDone() = 0; |
| 82 | 82 |
| 83 // Reset completion callback. | 83 // Reset completion callback. |
| 84 virtual void NotifyResetDone() = 0; | 84 virtual void NotifyResetDone() = 0; |
| 85 | 85 |
| 86 // SetCdm completion callback. | |
|
liberato (no reviews please)
2015/11/11 23:29:10
might want to describe default behavior, here and
xhwang
2015/11/13 01:16:55
Done.
| |
| 87 virtual void NotifyCdmSet(bool success); | |
| 88 | |
| 86 // Callback to notify about decoding errors. Note that errors in | 89 // Callback to notify about decoding errors. Note that errors in |
| 87 // Initialize() will not be reported here, but will instead be indicated by | 90 // Initialize() will not be reported here, but will instead be indicated by |
| 88 // a false return value there. | 91 // a false return value there. |
| 89 virtual void NotifyError(Error error) = 0; | 92 virtual void NotifyError(Error error) = 0; |
| 90 | 93 |
| 91 protected: | 94 protected: |
| 92 virtual ~Client() {} | 95 virtual ~Client() {} |
| 93 }; | 96 }; |
| 94 | 97 |
| 95 // Video decoder functions. | 98 // Video decoder functions. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 // back to the client, followed by NotifyFlushDone() being called on the | 138 // back to the client, followed by NotifyFlushDone() being called on the |
| 136 // client. Can be used to implement "end of stream" notification. | 139 // client. Can be used to implement "end of stream" notification. |
| 137 virtual void Flush() = 0; | 140 virtual void Flush() = 0; |
| 138 | 141 |
| 139 // Resets the decoder: all pending inputs are dropped immediately and the | 142 // Resets the decoder: all pending inputs are dropped immediately and the |
| 140 // decoder returned to a state ready for further Decode()s, followed by | 143 // decoder returned to a state ready for further Decode()s, followed by |
| 141 // NotifyResetDone() being called on the client. Can be used to implement | 144 // NotifyResetDone() being called on the client. Can be used to implement |
| 142 // "seek". | 145 // "seek". |
| 143 virtual void Reset() = 0; | 146 virtual void Reset() = 0; |
| 144 | 147 |
| 148 // Sets a CDM to be used by the video decoder to handle encrypted buffers, | |
| 149 // followed by Client::NotifyCdmSet() being called with the setting result. | |
|
liberato (no reviews please)
2015/11/11 23:29:10
right now, AVDA::Initialize, which is called very
xhwang
2015/11/13 01:16:55
As discussed offline, there's no way to finish cod
| |
| 150 virtual void SetCdm(int cdm_id); | |
| 151 | |
| 145 // Destroys the decoder: all pending inputs are dropped immediately and the | 152 // Destroys the decoder: all pending inputs are dropped immediately and the |
| 146 // component is freed. This call may asynchornously free system resources, | 153 // component is freed. This call may asynchornously free system resources, |
| 147 // but its client-visible effects are synchronous. After this method returns | 154 // but its client-visible effects are synchronous. After this method returns |
| 148 // no more callbacks will be made on the client. Deletes |this| | 155 // no more callbacks will be made on the client. Deletes |this| |
| 149 // unconditionally, so make sure to drop all pointers to it! | 156 // unconditionally, so make sure to drop all pointers to it! |
| 150 virtual void Destroy() = 0; | 157 virtual void Destroy() = 0; |
| 151 | 158 |
| 152 // GPU PROCESS ONLY. Implementations of this interface in the | 159 // GPU PROCESS ONLY. Implementations of this interface in the |
| 153 // content/common/gpu/media should implement this, and implementations in | 160 // content/common/gpu/media should implement this, and implementations in |
| 154 // other processes should not override the default implementation. | 161 // other processes should not override the default implementation. |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 181 // uses "Destroy()" instead of trying to use the destructor. | 188 // uses "Destroy()" instead of trying to use the destructor. |
| 182 template <> | 189 template <> |
| 183 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { | 190 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { |
| 184 public: | 191 public: |
| 185 void operator()(void* video_decode_accelerator) const; | 192 void operator()(void* video_decode_accelerator) const; |
| 186 }; | 193 }; |
| 187 | 194 |
| 188 } // namespace base | 195 } // namespace base |
| 189 | 196 |
| 190 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 197 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |