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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc

Issue 1921653002: Enable -Winconsistent-missing-override flag. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 months 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 TEST_F(TestSimulcastEncoderAdapter, DISABLED_TestSkipEncodingUnusedStreams) { 100 TEST_F(TestSimulcastEncoderAdapter, DISABLED_TestSkipEncodingUnusedStreams) {
101 TestVp8Simulcast::TestSkipEncodingUnusedStreams(); 101 TestVp8Simulcast::TestSkipEncodingUnusedStreams();
102 } 102 }
103 103
104 TEST_F(TestSimulcastEncoderAdapter, DISABLED_TestRPSIEncoder) { 104 TEST_F(TestSimulcastEncoderAdapter, DISABLED_TestRPSIEncoder) {
105 TestVp8Simulcast::TestRPSIEncoder(); 105 TestVp8Simulcast::TestRPSIEncoder();
106 } 106 }
107 107
108 class MockVideoEncoder : public VideoEncoder { 108 class MockVideoEncoder : public VideoEncoder {
109 public: 109 public:
110 // TODO(nisse): Valid overrides commented out, because the gmock
111 // methods don't use any override declarations, and we want to avoid
112 // warnings from -Winconsistent-missing-override. See
113 // http://crbug.com/428099.
110 int32_t InitEncode(const VideoCodec* codecSettings, 114 int32_t InitEncode(const VideoCodec* codecSettings,
111 int32_t numberOfCores, 115 int32_t numberOfCores,
112 size_t maxPayloadSize) override { 116 size_t maxPayloadSize) /* override */ {
113 codec_ = *codecSettings; 117 codec_ = *codecSettings;
114 return 0; 118 return 0;
115 } 119 }
116 120
117 int32_t Encode(const VideoFrame& inputImage, 121 int32_t Encode(const VideoFrame& inputImage,
118 const CodecSpecificInfo* codecSpecificInfo, 122 const CodecSpecificInfo* codecSpecificInfo,
119 const std::vector<FrameType>* frame_types) override { 123 const std::vector<FrameType>* frame_types) /* override */ {
120 return 0; 124 return 0;
121 } 125 }
122 126
123 int32_t RegisterEncodeCompleteCallback( 127 int32_t RegisterEncodeCompleteCallback(
124 EncodedImageCallback* callback) override { 128 EncodedImageCallback* callback) /* override */ {
125 callback_ = callback; 129 callback_ = callback;
126 return 0; 130 return 0;
127 } 131 }
128 132
129 int32_t Release() override { return 0; } 133 int32_t Release() /* override */ { return 0; }
130 134
131 int32_t SetRates(uint32_t newBitRate, uint32_t frameRate) override { 135 int32_t SetRates(uint32_t newBitRate, uint32_t frameRate) /* override */ {
132 return 0; 136 return 0;
133 } 137 }
134 138
135 MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt)); 139 MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt));
136 140
137 bool SupportsNativeHandle() const override { return supports_native_handle_; } 141 bool SupportsNativeHandle() const /* override */ {
142 return supports_native_handle_;
143 }
138 144
139 virtual ~MockVideoEncoder() {} 145 virtual ~MockVideoEncoder() {}
140 146
141 const VideoCodec& codec() const { return codec_; } 147 const VideoCodec& codec() const { return codec_; }
142 148
143 void SendEncodedImage(int width, int height) { 149 void SendEncodedImage(int width, int height) {
144 // Sends a fake image of the given width/height. 150 // Sends a fake image of the given width/height.
145 EncodedImage image; 151 EncodedImage image;
146 image._encodedWidth = width; 152 image._encodedWidth = width;
147 image._encodedHeight = height; 153 image._encodedHeight = height;
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 EXPECT_EQ(0, adapter_->InitEncode(&codec_, 1, 1200)); 455 EXPECT_EQ(0, adapter_->InitEncode(&codec_, 1, 1200));
450 adapter_->RegisterEncodeCompleteCallback(this); 456 adapter_->RegisterEncodeCompleteCallback(this);
451 ASSERT_EQ(3u, helper_->factory()->encoders().size()); 457 ASSERT_EQ(3u, helper_->factory()->encoders().size());
452 for (MockVideoEncoder* encoder : helper_->factory()->encoders()) 458 for (MockVideoEncoder* encoder : helper_->factory()->encoders())
453 encoder->set_supports_native_handle(true); 459 encoder->set_supports_native_handle(true);
454 EXPECT_FALSE(adapter_->SupportsNativeHandle()); 460 EXPECT_FALSE(adapter_->SupportsNativeHandle());
455 } 461 }
456 462
457 } // namespace testing 463 } // namespace testing
458 } // namespace webrtc 464 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698