blob: 4f0fa3d8a9b95163b724e84762646810ac68cc5d [file] [log] [blame]
Per Kjellander841c9122018-10-04 18:40:28 +02001/*
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 Gerey3e707812018-11-28 16:47:49 +010014#include <stdint.h>
15
16#include "api/video/encoded_image.h"
17#include "api/video_codecs/video_codec.h"
18#include "api/video_codecs/video_decoder.h"
Per Kjellander841c9122018-10-04 18:40:28 +020019#include "modules/video_coding/include/video_codec_interface.h"
Per Kjellander841c9122018-10-04 18:40:28 +020020
21namespace webrtc {
22namespace test {
23
24class FakeVp8Decoder : public VideoDecoder {
25 public:
26 FakeVp8Decoder();
27 ~FakeVp8Decoder() override {}
28
29 int32_t InitDecode(const VideoCodec* config,
30 int32_t number_of_cores) override;
31
32 int32_t Decode(const EncodedImage& input,
33 bool missing_frames,
Per Kjellander841c9122018-10-04 18:40:28 +020034 int64_t render_time_ms) override;
35
36 int32_t RegisterDecodeCompleteCallback(
37 DecodedImageCallback* callback) override;
38
39 int32_t Release() override;
40
41 const char* ImplementationName() const override;
42
43 static const char* kImplementationName;
44
45 private:
46 DecodedImageCallback* callback_;
47 int width_;
48 int height_;
49};
50
51} // namespace test
52} // namespace webrtc
53
54#endif // TEST_FAKE_VP8_DECODER_H_