| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 virtual int32_t Decode(const EncodedImage& input_image, | 66 virtual int32_t Decode(const EncodedImage& input_image, |
| 67 bool missing_frames, | 67 bool missing_frames, |
| 68 const RTPFragmentationHeader* fragmentation, | 68 const RTPFragmentationHeader* fragmentation, |
| 69 const CodecSpecificInfo* codec_specific_info = NULL, | 69 const CodecSpecificInfo* codec_specific_info = NULL, |
| 70 int64_t render_time_ms = -1) = 0; | 70 int64_t render_time_ms = -1) = 0; |
| 71 | 71 |
| 72 virtual int32_t RegisterDecodeCompleteCallback( | 72 virtual int32_t RegisterDecodeCompleteCallback( |
| 73 DecodedImageCallback* callback) = 0; | 73 DecodedImageCallback* callback) = 0; |
| 74 | 74 |
| 75 virtual int32_t Release() = 0; | 75 virtual int32_t Release() = 0; |
| 76 virtual int32_t Reset() = 0; | 76 // TODO(pbos): Remove, this is no longer called. A no-op implementation is |
| 77 // added here to permit removal elsewhere. |
| 78 virtual int32_t Reset() { return 0; } |
| 77 | 79 |
| 78 // Returns true if the decoder prefer to decode frames late. | 80 // Returns true if the decoder prefer to decode frames late. |
| 79 // That is, it can not decode infinite number of frames before the decoded | 81 // That is, it can not decode infinite number of frames before the decoded |
| 80 // frame is consumed. | 82 // frame is consumed. |
| 81 virtual bool PrefersLateDecoding() const { return true; } | 83 virtual bool PrefersLateDecoding() const { return true; } |
| 82 | 84 |
| 83 virtual const char* ImplementationName() const { return "unknown"; } | 85 virtual const char* ImplementationName() const { return "unknown"; } |
| 84 }; | 86 }; |
| 85 | 87 |
| 86 // Class used to wrap external VideoDecoders to provide a fallback option on | 88 // Class used to wrap external VideoDecoders to provide a fallback option on |
| (...skipping 10 matching lines...) Expand all Loading... |
| 97 int32_t Decode(const EncodedImage& input_image, | 99 int32_t Decode(const EncodedImage& input_image, |
| 98 bool missing_frames, | 100 bool missing_frames, |
| 99 const RTPFragmentationHeader* fragmentation, | 101 const RTPFragmentationHeader* fragmentation, |
| 100 const CodecSpecificInfo* codec_specific_info, | 102 const CodecSpecificInfo* codec_specific_info, |
| 101 int64_t render_time_ms) override; | 103 int64_t render_time_ms) override; |
| 102 | 104 |
| 103 int32_t RegisterDecodeCompleteCallback( | 105 int32_t RegisterDecodeCompleteCallback( |
| 104 DecodedImageCallback* callback) override; | 106 DecodedImageCallback* callback) override; |
| 105 | 107 |
| 106 int32_t Release() override; | 108 int32_t Release() override; |
| 107 int32_t Reset() override; | |
| 108 bool PrefersLateDecoding() const override; | 109 bool PrefersLateDecoding() const override; |
| 109 | 110 |
| 110 const char* ImplementationName() const override; | 111 const char* ImplementationName() const override; |
| 111 | 112 |
| 112 private: | 113 private: |
| 113 bool InitFallbackDecoder(); | 114 bool InitFallbackDecoder(); |
| 114 | 115 |
| 115 const DecoderType decoder_type_; | 116 const DecoderType decoder_type_; |
| 116 VideoDecoder* const decoder_; | 117 VideoDecoder* const decoder_; |
| 117 | 118 |
| 118 VideoCodec codec_settings_; | 119 VideoCodec codec_settings_; |
| 119 int32_t number_of_cores_; | 120 int32_t number_of_cores_; |
| 120 std::string fallback_implementation_name_; | 121 std::string fallback_implementation_name_; |
| 121 rtc::scoped_ptr<VideoDecoder> fallback_decoder_; | 122 rtc::scoped_ptr<VideoDecoder> fallback_decoder_; |
| 122 DecodedImageCallback* callback_; | 123 DecodedImageCallback* callback_; |
| 123 }; | 124 }; |
| 124 | 125 |
| 125 } // namespace webrtc | 126 } // namespace webrtc |
| 126 | 127 |
| 127 #endif // WEBRTC_VIDEO_DECODER_H_ | 128 #endif // WEBRTC_VIDEO_DECODER_H_ |
| OLD | NEW |