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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 const DecoderType decoder_type_; | 115 const DecoderType decoder_type_; |
116 VideoDecoder* const decoder_; | 116 VideoDecoder* const decoder_; |
117 | 117 |
118 VideoCodec codec_settings_; | 118 VideoCodec codec_settings_; |
119 int32_t number_of_cores_; | 119 int32_t number_of_cores_; |
120 std::string fallback_implementation_name_; | 120 std::string fallback_implementation_name_; |
121 rtc::scoped_ptr<VideoDecoder> fallback_decoder_; | 121 rtc::scoped_ptr<VideoDecoder> fallback_decoder_; |
122 DecodedImageCallback* callback_; | 122 DecodedImageCallback* callback_; |
123 }; | 123 }; |
124 | 124 |
| 125 // Video decoder class to be used for unknown codecs. Doesn't support decoding |
| 126 // but logs messages to LS_ERROR. |
| 127 class NullVideoDecoder : public VideoDecoder { |
| 128 public: |
| 129 NullVideoDecoder(); |
| 130 |
| 131 int32_t InitDecode(const VideoCodec* codec_settings, |
| 132 int32_t number_of_cores) override; |
| 133 |
| 134 int32_t Decode(const EncodedImage& input_image, |
| 135 bool missing_frames, |
| 136 const RTPFragmentationHeader* fragmentation, |
| 137 const CodecSpecificInfo* codec_specific_info, |
| 138 int64_t render_time_ms) override; |
| 139 |
| 140 int32_t RegisterDecodeCompleteCallback( |
| 141 DecodedImageCallback* callback) override; |
| 142 |
| 143 int32_t Release() override; |
| 144 int32_t Reset() override; |
| 145 |
| 146 const char* ImplementationName() const override; |
| 147 }; |
| 148 |
125 } // namespace webrtc | 149 } // namespace webrtc |
126 | 150 |
127 #endif // WEBRTC_VIDEO_DECODER_H_ | 151 #endif // WEBRTC_VIDEO_DECODER_H_ |
OLD | NEW |