| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // | 124 // |
| 125 // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. | 125 // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. |
| 126 int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; | 126 int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; |
| 127 | 127 |
| 128 // Free decoder memory. | 128 // Free decoder memory. |
| 129 // | 129 // |
| 130 // Return value : WEBRTC_VIDEO_CODEC_OK if OK. | 130 // Return value : WEBRTC_VIDEO_CODEC_OK if OK. |
| 131 // <0 - Error | 131 // <0 - Error |
| 132 int Release() override; | 132 int Release() override; |
| 133 | 133 |
| 134 // Reset decoder state and prepare for a new call. | |
| 135 // | |
| 136 // Return value : WEBRTC_VIDEO_CODEC_OK. | |
| 137 // <0 - Error | |
| 138 int Reset() override; | |
| 139 | |
| 140 private: | 134 private: |
| 141 static const uint8_t* ExtractHeader(const uint8_t* buffer, | 135 static const uint8_t* ExtractHeader(const uint8_t* buffer, |
| 142 uint16_t* width, | 136 uint16_t* width, |
| 143 uint16_t* height); | 137 uint16_t* height); |
| 144 | 138 |
| 145 VideoFrame _decodedImage; | 139 VideoFrame _decodedImage; |
| 146 int _width; | 140 int _width; |
| 147 int _height; | 141 int _height; |
| 148 bool _inited; | 142 bool _inited; |
| 149 DecodedImageCallback* _decodeCompleteCallback; | 143 DecodedImageCallback* _decodeCompleteCallback; |
| 150 }; // class I420Decoder | 144 }; // class I420Decoder |
| 151 | 145 |
| 152 } // namespace webrtc | 146 } // namespace webrtc |
| 153 | 147 |
| 154 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_I420_INCLUDE_I420_H_ | 148 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_I420_INCLUDE_I420_H_ |
| OLD | NEW |