OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 int32_t(const VideoFrame& inputImage, | 36 int32_t(const VideoFrame& inputImage, |
37 const CodecSpecificInfo* codecSpecificInfo, | 37 const CodecSpecificInfo* codecSpecificInfo, |
38 const std::vector<FrameType>* frame_types)); | 38 const std::vector<FrameType>* frame_types)); |
39 MOCK_METHOD1(RegisterEncodeCompleteCallback, | 39 MOCK_METHOD1(RegisterEncodeCompleteCallback, |
40 int32_t(EncodedImageCallback* callback)); | 40 int32_t(EncodedImageCallback* callback)); |
41 MOCK_METHOD0(Release, int32_t()); | 41 MOCK_METHOD0(Release, int32_t()); |
42 MOCK_METHOD0(Reset, int32_t()); | 42 MOCK_METHOD0(Reset, int32_t()); |
43 MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt)); | 43 MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt)); |
44 MOCK_METHOD2(SetRates, int32_t(uint32_t newBitRate, uint32_t frameRate)); | 44 MOCK_METHOD2(SetRates, int32_t(uint32_t newBitRate, uint32_t frameRate)); |
45 MOCK_METHOD1(SetPeriodicKeyFrames, int32_t(bool enable)); | 45 MOCK_METHOD1(SetPeriodicKeyFrames, int32_t(bool enable)); |
46 MOCK_METHOD2(CodecConfigParameters, | |
47 int32_t(uint8_t* /*buffer*/, int32_t)); | |
48 }; | 46 }; |
49 | 47 |
50 class MockDecodedImageCallback : public DecodedImageCallback { | 48 class MockDecodedImageCallback : public DecodedImageCallback { |
51 public: | 49 public: |
52 MOCK_METHOD1(Decoded, int32_t(VideoFrame& decodedImage)); | 50 MOCK_METHOD1(Decoded, int32_t(VideoFrame& decodedImage)); |
53 MOCK_METHOD1(ReceivedDecodedReferenceFrame, | 51 MOCK_METHOD1(ReceivedDecodedReferenceFrame, |
54 int32_t(const uint64_t pictureId)); | 52 int32_t(const uint64_t pictureId)); |
55 MOCK_METHOD1(ReceivedDecodedFrame, | 53 MOCK_METHOD1(ReceivedDecodedFrame, |
56 int32_t(const uint64_t pictureId)); | 54 int32_t(const uint64_t pictureId)); |
57 }; | 55 }; |
58 | 56 |
59 class MockVideoDecoder : public VideoDecoder { | 57 class MockVideoDecoder : public VideoDecoder { |
60 public: | 58 public: |
61 MOCK_METHOD2(InitDecode, int32_t(const VideoCodec* codecSettings, | 59 MOCK_METHOD2(InitDecode, int32_t(const VideoCodec* codecSettings, |
62 int32_t numberOfCores)); | 60 int32_t numberOfCores)); |
63 MOCK_METHOD5(Decode, int32_t(const EncodedImage& inputImage, | 61 MOCK_METHOD5(Decode, int32_t(const EncodedImage& inputImage, |
64 bool missingFrames, | 62 bool missingFrames, |
65 const RTPFragmentationHeader* fragmentation, | 63 const RTPFragmentationHeader* fragmentation, |
66 const CodecSpecificInfo* codecSpecificInfo, | 64 const CodecSpecificInfo* codecSpecificInfo, |
67 int64_t renderTimeMs)); | 65 int64_t renderTimeMs)); |
68 MOCK_METHOD1(RegisterDecodeCompleteCallback, | 66 MOCK_METHOD1(RegisterDecodeCompleteCallback, |
69 int32_t(DecodedImageCallback* callback)); | 67 int32_t(DecodedImageCallback* callback)); |
70 MOCK_METHOD0(Release, int32_t()); | 68 MOCK_METHOD0(Release, int32_t()); |
71 MOCK_METHOD0(Reset, int32_t()); | 69 MOCK_METHOD0(Reset, int32_t()); |
72 MOCK_METHOD2(SetCodecConfigParameters, | |
73 int32_t(const uint8_t* /*buffer*/, int32_t)); | |
74 MOCK_METHOD0(Copy, VideoDecoder*()); | 70 MOCK_METHOD0(Copy, VideoDecoder*()); |
75 }; | 71 }; |
76 | 72 |
77 } // namespace webrtc | 73 } // namespace webrtc |
78 | 74 |
79 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_MOCK_MOCK_VIDEO_CODEC_IN
TERFACE_H_ | 75 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_MOCK_MOCK_VIDEO_CODEC_IN
TERFACE_H_ |
OLD | NEW |