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

Side by Side Diff: webrtc/video/end_to_end_tests.cc

Issue 2764133002: Revert of Add framerate to VideoSinkWants and ability to signal on overuse (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « webrtc/test/video_capturer.cc ('k') | webrtc/video/overuse_frame_detector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include <algorithm> 10 #include <algorithm>
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 CreateVideoStreams(); 215 CreateVideoStreams();
216 Start(); 216 Start();
217 217
218 // Create frames that are smaller than the send width/height, this is done to 218 // Create frames that are smaller than the send width/height, this is done to
219 // check that the callbacks are done after processing video. 219 // check that the callbacks are done after processing video.
220 std::unique_ptr<test::FrameGenerator> frame_generator( 220 std::unique_ptr<test::FrameGenerator> frame_generator(
221 test::FrameGenerator::CreateSquareGenerator(kWidth, kHeight)); 221 test::FrameGenerator::CreateSquareGenerator(kWidth, kHeight));
222 test::FrameForwarder frame_forwarder; 222 test::FrameForwarder frame_forwarder;
223 video_send_stream_->SetSource( 223 video_send_stream_->SetSource(
224 &frame_forwarder, 224 &frame_forwarder, VideoSendStream::DegradationPreference::kBalanced);
225 VideoSendStream::DegradationPreference::kMaintainFramerate);
226 225
227 frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); 226 frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame());
228 EXPECT_TRUE(renderer.Wait()) 227 EXPECT_TRUE(renderer.Wait())
229 << "Timed out while waiting for the frame to render."; 228 << "Timed out while waiting for the frame to render.";
230 229
231 Stop(); 230 Stop();
232 231
233 sender_transport.StopSending(); 232 sender_transport.StopSending();
234 receiver_transport.StopSending(); 233 receiver_transport.StopSending();
235 234
(...skipping 24 matching lines...) Expand all
260 video_receive_configs_[0].renderer = &renderer; 259 video_receive_configs_[0].renderer = &renderer;
261 260
262 CreateVideoStreams(); 261 CreateVideoStreams();
263 Start(); 262 Start();
264 263
265 std::unique_ptr<test::FrameGenerator> frame_generator( 264 std::unique_ptr<test::FrameGenerator> frame_generator(
266 test::FrameGenerator::CreateSquareGenerator(kDefaultWidth, 265 test::FrameGenerator::CreateSquareGenerator(kDefaultWidth,
267 kDefaultHeight)); 266 kDefaultHeight));
268 test::FrameForwarder frame_forwarder; 267 test::FrameForwarder frame_forwarder;
269 video_send_stream_->SetSource( 268 video_send_stream_->SetSource(
270 &frame_forwarder, 269 &frame_forwarder, VideoSendStream::DegradationPreference::kBalanced);
271 VideoSendStream::DegradationPreference::kMaintainFramerate);
272 frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); 270 frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame());
273 271
274 EXPECT_TRUE(renderer.Wait()) 272 EXPECT_TRUE(renderer.Wait())
275 << "Timed out while waiting for the frame to render."; 273 << "Timed out while waiting for the frame to render.";
276 274
277 Stop(); 275 Stop();
278 276
279 sender_transport.StopSending(); 277 sender_transport.StopSending();
280 receiver_transport.StopSending(); 278 receiver_transport.StopSending();
281 279
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 UpdateReceiveConfig(i, &receive_config); 1490 UpdateReceiveConfig(i, &receive_config);
1493 1491
1494 receive_streams[i] = 1492 receive_streams[i] =
1495 receiver_call->CreateVideoReceiveStream(std::move(receive_config)); 1493 receiver_call->CreateVideoReceiveStream(std::move(receive_config));
1496 receive_streams[i]->Start(); 1494 receive_streams[i]->Start();
1497 1495
1498 frame_generators[i] = test::FrameGeneratorCapturer::Create( 1496 frame_generators[i] = test::FrameGeneratorCapturer::Create(
1499 width, height, 30, Clock::GetRealTimeClock()); 1497 width, height, 30, Clock::GetRealTimeClock());
1500 send_streams[i]->SetSource( 1498 send_streams[i]->SetSource(
1501 frame_generators[i], 1499 frame_generators[i],
1502 VideoSendStream::DegradationPreference::kMaintainFramerate); 1500 VideoSendStream::DegradationPreference::kBalanced);
1503 frame_generators[i]->Start(); 1501 frame_generators[i]->Start();
1504 } 1502 }
1505 1503
1506 Wait(); 1504 Wait();
1507 1505
1508 for (size_t i = 0; i < kNumStreams; ++i) { 1506 for (size_t i = 0; i < kNumStreams; ++i) {
1509 frame_generators[i]->Stop(); 1507 frame_generators[i]->Stop();
1510 sender_call->DestroyVideoSendStream(send_streams[i]); 1508 sender_call->DestroyVideoSendStream(send_streams[i]);
1511 receiver_call->DestroyVideoReceiveStream(receive_streams[i]); 1509 receiver_call->DestroyVideoReceiveStream(receive_streams[i]);
1512 delete frame_generators[i]; 1510 delete frame_generators[i];
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 video_receive_configs_[0].pre_decode_callback = &pre_decode_observer; 1937 video_receive_configs_[0].pre_decode_callback = &pre_decode_observer;
1940 1938
1941 CreateVideoStreams(); 1939 CreateVideoStreams();
1942 Start(); 1940 Start();
1943 1941
1944 std::unique_ptr<test::FrameGenerator> frame_generator( 1942 std::unique_ptr<test::FrameGenerator> frame_generator(
1945 test::FrameGenerator::CreateSquareGenerator(kDefaultWidth, 1943 test::FrameGenerator::CreateSquareGenerator(kDefaultWidth,
1946 kDefaultHeight)); 1944 kDefaultHeight));
1947 test::FrameForwarder forwarder; 1945 test::FrameForwarder forwarder;
1948 video_send_stream_->SetSource( 1946 video_send_stream_->SetSource(
1949 &forwarder, VideoSendStream::DegradationPreference::kMaintainFramerate); 1947 &forwarder, VideoSendStream::DegradationPreference::kBalanced);
1950 forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); 1948 forwarder.IncomingCapturedFrame(*frame_generator->NextFrame());
1951 1949
1952 EXPECT_TRUE(post_encode_observer.Wait()) 1950 EXPECT_TRUE(post_encode_observer.Wait())
1953 << "Timed out while waiting for send-side encoded-frame callback."; 1951 << "Timed out while waiting for send-side encoded-frame callback.";
1954 1952
1955 EXPECT_TRUE(pre_decode_observer.Wait()) 1953 EXPECT_TRUE(pre_decode_observer.Wait())
1956 << "Timed out while waiting for pre-decode encoded-frame callback."; 1954 << "Timed out while waiting for pre-decode encoded-frame callback.";
1957 1955
1958 post_encode_observer.ExpectEqualFrames(pre_decode_observer); 1956 post_encode_observer.ExpectEqualFrames(pre_decode_observer);
1959 1957
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after
4182 std::unique_ptr<VideoEncoder> encoder_; 4180 std::unique_ptr<VideoEncoder> encoder_;
4183 std::unique_ptr<VideoDecoder> decoder_; 4181 std::unique_ptr<VideoDecoder> decoder_;
4184 rtc::CriticalSection crit_; 4182 rtc::CriticalSection crit_;
4185 int recorded_frames_ GUARDED_BY(crit_); 4183 int recorded_frames_ GUARDED_BY(crit_);
4186 } test(this); 4184 } test(this);
4187 4185
4188 RunBaseTest(&test); 4186 RunBaseTest(&test);
4189 } 4187 }
4190 4188
4191 } // namespace webrtc 4189 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/video_capturer.cc ('k') | webrtc/video/overuse_frame_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698