fake_vp8_decoder.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #ifndef TEST_FAKE_VP8_DECODER_H_
  11. #define TEST_FAKE_VP8_DECODER_H_
  12. #include <stdint.h>
  13. #include "api/video/encoded_image.h"
  14. #include "api/video_codecs/video_codec.h"
  15. #include "api/video_codecs/video_decoder.h"
  16. #include "modules/video_coding/include/video_codec_interface.h"
  17. namespace webrtc {
  18. namespace test {
  19. class FakeVp8Decoder : public VideoDecoder {
  20. public:
  21. FakeVp8Decoder();
  22. ~FakeVp8Decoder() override {}
  23. int32_t InitDecode(const VideoCodec* config,
  24. int32_t number_of_cores) override;
  25. int32_t Decode(const EncodedImage& input,
  26. bool missing_frames,
  27. int64_t render_time_ms) override;
  28. int32_t RegisterDecodeCompleteCallback(
  29. DecodedImageCallback* callback) override;
  30. int32_t Release() override;
  31. const char* ImplementationName() const override;
  32. static const char* kImplementationName;
  33. private:
  34. DecodedImageCallback* callback_;
  35. int width_;
  36. int height_;
  37. };
  38. } // namespace test
  39. } // namespace webrtc
  40. #endif // TEST_FAKE_VP8_DECODER_H_