1/*
2 *  Copyright (c) 2013 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 WEBRTC_VIDEO_ENGINE_TEST_COMMON_FAKE_DECODER_H_
12#define WEBRTC_VIDEO_ENGINE_TEST_COMMON_FAKE_DECODER_H_
13
14#include <vector>
15
16#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
17#include "webrtc/system_wrappers/interface/clock.h"
18
19namespace webrtc {
20namespace test {
21
22class FakeDecoder : public VideoDecoder {
23 public:
24  FakeDecoder();
25
26  virtual int32_t InitDecode(const VideoCodec* config,
27                             int32_t number_of_cores) OVERRIDE;
28
29  virtual int32_t Decode(const EncodedImage& input,
30                         bool missing_frames,
31                         const RTPFragmentationHeader* fragmentation,
32                         const CodecSpecificInfo* codec_specific_info,
33                         int64_t render_time_ms) OVERRIDE;
34
35  virtual int32_t RegisterDecodeCompleteCallback(
36      DecodedImageCallback* callback) OVERRIDE;
37
38  virtual int32_t Release() OVERRIDE;
39  virtual int32_t Reset() OVERRIDE;
40
41 private:
42  VideoCodec config_;
43  I420VideoFrame frame_;
44  DecodedImageCallback* callback_;
45};
46}  // namespace test
47}  // namespace webrtc
48
49#endif  // WEBRTC_VIDEO_ENGINE_TEST_COMMON_FAKE_DECODER_H_
50