Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h

Issue 1528503003: Lint enabled for webrtc/modules/video_coding folder. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_ 12 #define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H_
13 13
14 #include <string> 14 #include <string>
15 #include <vector>
15 16
16 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
17 #include "webrtc/modules/video_coding/include/video_codec_interface.h" 18 #include "webrtc/modules/video_coding/include/video_codec_interface.h"
18 #include "webrtc/typedefs.h" 19 #include "webrtc/typedefs.h"
19 20
20 namespace webrtc { 21 namespace webrtc {
21 22
22 class MockEncodedImageCallback : public EncodedImageCallback { 23 class MockEncodedImageCallback : public EncodedImageCallback {
23 public: 24 public:
24 MOCK_METHOD3(Encoded, int32_t(const EncodedImage& encodedImage, 25 MOCK_METHOD3(Encoded,
25 const CodecSpecificInfo* codecSpecificInfo, 26 int32_t(const EncodedImage& encodedImage,
26 const RTPFragmentationHeader* fragmentation)); 27 const CodecSpecificInfo* codecSpecificInfo,
28 const RTPFragmentationHeader* fragmentation));
27 }; 29 };
28 30
29 class MockVideoEncoder : public VideoEncoder { 31 class MockVideoEncoder : public VideoEncoder {
30 public: 32 public:
31 MOCK_CONST_METHOD2(Version, int32_t(int8_t *version, int32_t length)); 33 MOCK_CONST_METHOD2(Version, int32_t(int8_t* version, int32_t length));
32 MOCK_METHOD3(InitEncode, int32_t(const VideoCodec* codecSettings, 34 MOCK_METHOD3(InitEncode,
33 int32_t numberOfCores, 35 int32_t(const VideoCodec* codecSettings,
34 size_t maxPayloadSize)); 36 int32_t numberOfCores,
37 size_t maxPayloadSize));
35 MOCK_METHOD3(Encode, 38 MOCK_METHOD3(Encode,
36 int32_t(const VideoFrame& inputImage, 39 int32_t(const VideoFrame& inputImage,
37 const CodecSpecificInfo* codecSpecificInfo, 40 const CodecSpecificInfo* codecSpecificInfo,
38 const std::vector<FrameType>* frame_types)); 41 const std::vector<FrameType>* frame_types));
39 MOCK_METHOD1(RegisterEncodeCompleteCallback, 42 MOCK_METHOD1(RegisterEncodeCompleteCallback,
40 int32_t(EncodedImageCallback* callback)); 43 int32_t(EncodedImageCallback* callback));
41 MOCK_METHOD0(Release, int32_t()); 44 MOCK_METHOD0(Release, int32_t());
42 MOCK_METHOD0(Reset, int32_t()); 45 MOCK_METHOD0(Reset, int32_t());
43 MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt)); 46 MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt));
44 MOCK_METHOD2(SetRates, int32_t(uint32_t newBitRate, uint32_t frameRate)); 47 MOCK_METHOD2(SetRates, int32_t(uint32_t newBitRate, uint32_t frameRate));
45 MOCK_METHOD1(SetPeriodicKeyFrames, int32_t(bool enable)); 48 MOCK_METHOD1(SetPeriodicKeyFrames, int32_t(bool enable));
46 }; 49 };
47 50
48 class MockDecodedImageCallback : public DecodedImageCallback { 51 class MockDecodedImageCallback : public DecodedImageCallback {
49 public: 52 public:
50 MOCK_METHOD1(Decoded, int32_t(VideoFrame& decodedImage)); 53 MOCK_METHOD1(Decoded, int32_t(VideoFrame& decodedImage)); // NOLINT
51 MOCK_METHOD2(Decoded, int32_t(VideoFrame& decodedImage, 54 MOCK_METHOD2(Decoded,
52 int64_t decode_time_ms)); 55 int32_t(VideoFrame& decodedImage, // NOLINT
56 int64_t decode_time_ms));
53 MOCK_METHOD1(ReceivedDecodedReferenceFrame, 57 MOCK_METHOD1(ReceivedDecodedReferenceFrame,
54 int32_t(const uint64_t pictureId)); 58 int32_t(const uint64_t pictureId));
55 MOCK_METHOD1(ReceivedDecodedFrame, 59 MOCK_METHOD1(ReceivedDecodedFrame, int32_t(const uint64_t pictureId));
56 int32_t(const uint64_t pictureId));
57 }; 60 };
58 61
59 class MockVideoDecoder : public VideoDecoder { 62 class MockVideoDecoder : public VideoDecoder {
60 public: 63 public:
61 MOCK_METHOD2(InitDecode, int32_t(const VideoCodec* codecSettings, 64 MOCK_METHOD2(InitDecode,
62 int32_t numberOfCores)); 65 int32_t(const VideoCodec* codecSettings, int32_t numberOfCores));
63 MOCK_METHOD5(Decode, int32_t(const EncodedImage& inputImage, 66 MOCK_METHOD5(Decode,
64 bool missingFrames, 67 int32_t(const EncodedImage& inputImage,
65 const RTPFragmentationHeader* fragmentation, 68 bool missingFrames,
66 const CodecSpecificInfo* codecSpecificInfo, 69 const RTPFragmentationHeader* fragmentation,
67 int64_t renderTimeMs)); 70 const CodecSpecificInfo* codecSpecificInfo,
71 int64_t renderTimeMs));
68 MOCK_METHOD1(RegisterDecodeCompleteCallback, 72 MOCK_METHOD1(RegisterDecodeCompleteCallback,
69 int32_t(DecodedImageCallback* callback)); 73 int32_t(DecodedImageCallback* callback));
70 MOCK_METHOD0(Release, int32_t()); 74 MOCK_METHOD0(Release, int32_t());
71 MOCK_METHOD0(Reset, int32_t()); 75 MOCK_METHOD0(Reset, int32_t());
72 MOCK_METHOD0(Copy, VideoDecoder*()); 76 MOCK_METHOD0(Copy, VideoDecoder*());
73 }; 77 };
74 78
75 } // namespace webrtc 79 } // namespace webrtc
76 80
77 #endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H _ 81 #endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VIDEO_CODEC_INTERFACE_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698