OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2012 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_MODULES_VIDEO_CODING_CODECS_INTERFACE_MOCK_MOCK_VIDEO_CODEC_INTER
FACE_H_ | |
12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_MOCK_MOCK_VIDEO_CODEC_INTER
FACE_H_ | |
13 | |
14 #pragma message("WARNING: video_coding/codecs/interface is DEPRECATED; " | |
15 "use video_coding/include") | |
16 #include <string> | |
17 #include <vector> | |
18 | |
19 #include "webrtc/modules/video_coding/include/video_codec_interface.h" | |
20 #include "webrtc/test/gmock.h" | |
21 #include "webrtc/typedefs.h" | |
22 | |
23 namespace webrtc { | |
24 | |
25 class MockEncodedImageCallback : public EncodedImageCallback { | |
26 public: | |
27 MOCK_METHOD3(Encoded, | |
28 int32_t(const EncodedImage& encodedImage, | |
29 const CodecSpecificInfo* codecSpecificInfo, | |
30 const RTPFragmentationHeader* fragmentation)); | |
31 }; | |
32 | |
33 class MockVideoEncoder : public VideoEncoder { | |
34 public: | |
35 MOCK_CONST_METHOD2(Version, int32_t(int8_t* version, int32_t length)); | |
36 MOCK_METHOD3(InitEncode, | |
37 int32_t(const VideoCodec* codecSettings, | |
38 int32_t numberOfCores, | |
39 size_t maxPayloadSize)); | |
40 MOCK_METHOD3(Encode, | |
41 int32_t(const VideoFrame& inputImage, | |
42 const CodecSpecificInfo* codecSpecificInfo, | |
43 const std::vector<FrameType>* frame_types)); | |
44 MOCK_METHOD1(RegisterEncodeCompleteCallback, | |
45 int32_t(EncodedImageCallback* callback)); | |
46 MOCK_METHOD0(Release, int32_t()); | |
47 MOCK_METHOD0(Reset, int32_t()); | |
48 MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt)); | |
49 MOCK_METHOD2(SetRates, int32_t(uint32_t newBitRate, uint32_t frameRate)); | |
50 MOCK_METHOD1(SetPeriodicKeyFrames, int32_t(bool enable)); | |
51 }; | |
52 | |
53 class MockDecodedImageCallback : public DecodedImageCallback { | |
54 public: | |
55 MOCK_METHOD1(Decoded, int32_t(const VideoFrame& decodedImage)); | |
56 MOCK_METHOD2(Decoded, | |
57 int32_t(const VideoFrame& decodedImage, int64_t decode_time_ms)); | |
58 MOCK_METHOD1(ReceivedDecodedReferenceFrame, | |
59 int32_t(const uint64_t pictureId)); | |
60 MOCK_METHOD1(ReceivedDecodedFrame, int32_t(const uint64_t pictureId)); | |
61 }; | |
62 | |
63 class MockVideoDecoder : public VideoDecoder { | |
64 public: | |
65 MOCK_METHOD2(InitDecode, | |
66 int32_t(const VideoCodec* codecSettings, int32_t numberOfCores)); | |
67 MOCK_METHOD5(Decode, | |
68 int32_t(const EncodedImage& inputImage, | |
69 bool missingFrames, | |
70 const RTPFragmentationHeader* fragmentation, | |
71 const CodecSpecificInfo* codecSpecificInfo, | |
72 int64_t renderTimeMs)); | |
73 MOCK_METHOD1(RegisterDecodeCompleteCallback, | |
74 int32_t(DecodedImageCallback* callback)); | |
75 MOCK_METHOD0(Release, int32_t()); | |
76 MOCK_METHOD0(Copy, VideoDecoder*()); | |
77 }; | |
78 | |
79 } // namespace webrtc | |
80 | |
81 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_MOCK_MOCK_VIDEO_CODEC_IN
TERFACE_H_ | |
OLD | NEW |