OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 virtual int32_t InitDecode(const VideoCodec* codec_settings, | 62 virtual int32_t InitDecode(const VideoCodec* codec_settings, |
63 int32_t number_of_cores) = 0; | 63 int32_t number_of_cores) = 0; |
64 | 64 |
65 virtual int32_t Decode(const EncodedImage& input_image, | 65 virtual int32_t Decode(const EncodedImage& input_image, |
66 bool missing_frames, | 66 bool missing_frames, |
67 const RTPFragmentationHeader* fragmentation, | 67 const RTPFragmentationHeader* fragmentation, |
68 const CodecSpecificInfo* codec_specific_info = NULL, | 68 const CodecSpecificInfo* codec_specific_info = NULL, |
69 int64_t render_time_ms = -1) = 0; | 69 int64_t render_time_ms = -1) = 0; |
70 | 70 |
71 #if defined(WEBRTC_ANDROID) | |
72 // This is a temporary remedy while the Android capture implementation is | |
73 // being changed to deliver frames on the decoder thread without polling. | |
74 // See https://bugs.chromium.org/p/webrtc/issues/detail?id=7361 | |
75 virtual void PollDecodedFrames() {} | |
76 #endif | |
77 | |
78 virtual int32_t RegisterDecodeCompleteCallback( | 71 virtual int32_t RegisterDecodeCompleteCallback( |
79 DecodedImageCallback* callback) = 0; | 72 DecodedImageCallback* callback) = 0; |
80 | 73 |
81 virtual int32_t Release() = 0; | 74 virtual int32_t Release() = 0; |
82 | 75 |
83 // Returns true if the decoder prefer to decode frames late. | 76 // Returns true if the decoder prefer to decode frames late. |
84 // That is, it can not decode infinite number of frames before the decoded | 77 // That is, it can not decode infinite number of frames before the decoded |
85 // frame is consumed. | 78 // frame is consumed. |
86 virtual bool PrefersLateDecoding() const { return true; } | 79 virtual bool PrefersLateDecoding() const { return true; } |
87 | 80 |
88 virtual const char* ImplementationName() const { return "unknown"; } | 81 virtual const char* ImplementationName() const { return "unknown"; } |
89 }; | 82 }; |
90 | 83 |
91 } // namespace webrtc | 84 } // namespace webrtc |
92 | 85 |
93 #endif // WEBRTC_VIDEO_DECODER_H_ | 86 #endif // WEBRTC_VIDEO_DECODER_H_ |
OLD | NEW |