Per Kjellander | 841c912 | 2018-10-04 16:40:28 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef TEST_FAKE_VP8_DECODER_H_ |
| 12 | #define TEST_FAKE_VP8_DECODER_H_ |
| 13 | |
Yves Gerey | 3e70781 | 2018-11-28 15:47:49 | [diff] [blame] | 14 | #include <stdint.h> |
| 15 | |
| 16 | #include "api/video/encoded_image.h" |
Yves Gerey | 3e70781 | 2018-11-28 15:47:49 | [diff] [blame] | 17 | #include "api/video_codecs/video_decoder.h" |
Per Kjellander | 841c912 | 2018-10-04 16:40:28 | [diff] [blame] | 18 | #include "modules/video_coding/include/video_codec_interface.h" |
Per Kjellander | 841c912 | 2018-10-04 16:40:28 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
| 21 | namespace test { |
| 22 | |
| 23 | class FakeVp8Decoder : public VideoDecoder { |
| 24 | public: |
| 25 | FakeVp8Decoder(); |
| 26 | ~FakeVp8Decoder() override {} |
| 27 | |
Danil Chapovalov | d08930d | 2021-08-12 11:26:55 | [diff] [blame] | 28 | bool Configure(const Settings& settings) override; |
Per Kjellander | 841c912 | 2018-10-04 16:40:28 | [diff] [blame] | 29 | |
| 30 | int32_t Decode(const EncodedImage& input, |
Per Kjellander | 841c912 | 2018-10-04 16:40:28 | [diff] [blame] | 31 | int64_t render_time_ms) override; |
| 32 | |
| 33 | int32_t RegisterDecodeCompleteCallback( |
| 34 | DecodedImageCallback* callback) override; |
| 35 | |
| 36 | int32_t Release() override; |
| 37 | |
Erik Språng | c12f625 | 2021-01-13 20:49:59 | [diff] [blame] | 38 | DecoderInfo GetDecoderInfo() const override; |
Per Kjellander | 841c912 | 2018-10-04 16:40:28 | [diff] [blame] | 39 | const char* ImplementationName() const override; |
Björn Terelius | d384456 | 2023-08-09 15:07:42 | [diff] [blame] | 40 | |
| 41 | static constexpr char kImplementationName[] = "fake_vp8_decoder"; |
Per Kjellander | 841c912 | 2018-10-04 16:40:28 | [diff] [blame] | 42 | |
| 43 | private: |
| 44 | DecodedImageCallback* callback_; |
| 45 | int width_; |
| 46 | int height_; |
| 47 | }; |
| 48 | |
| 49 | } // namespace test |
| 50 | } // namespace webrtc |
| 51 | |
| 52 | #endif // TEST_FAKE_VP8_DECODER_H_ |