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

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

Issue 2783183003: Revert of Add framerate to VideoSinkWants and ability to signal on overuse (Closed)
Patch Set: Created 3 years, 8 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 CreateVideoStreams(); 223 CreateVideoStreams();
224 Start(); 224 Start();
225 225
226 // Create frames that are smaller than the send width/height, this is done to 226 // Create frames that are smaller than the send width/height, this is done to
227 // check that the callbacks are done after processing video. 227 // check that the callbacks are done after processing video.
228 std::unique_ptr<test::FrameGenerator> frame_generator( 228 std::unique_ptr<test::FrameGenerator> frame_generator(
229 test::FrameGenerator::CreateSquareGenerator(kWidth, kHeight)); 229 test::FrameGenerator::CreateSquareGenerator(kWidth, kHeight));
230 test::FrameForwarder frame_forwarder; 230 test::FrameForwarder frame_forwarder;
231 video_send_stream_->SetSource( 231 video_send_stream_->SetSource(
232 &frame_forwarder, 232 &frame_forwarder, VideoSendStream::DegradationPreference::kBalanced);
233 VideoSendStream::DegradationPreference::kMaintainFramerate);
234 233
235 frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); 234 frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame());
236 EXPECT_TRUE(renderer.Wait()) 235 EXPECT_TRUE(renderer.Wait())
237 << "Timed out while waiting for the frame to render."; 236 << "Timed out while waiting for the frame to render.";
238 237
239 Stop(); 238 Stop();
240 239
241 sender_transport.StopSending(); 240 sender_transport.StopSending();
242 receiver_transport.StopSending(); 241 receiver_transport.StopSending();
243 242
(...skipping 24 matching lines...) Expand all
268 video_receive_configs_[0].renderer = &renderer; 267 video_receive_configs_[0].renderer = &renderer;
269 268
270 CreateVideoStreams(); 269 CreateVideoStreams();
271 Start(); 270 Start();
272 271
273 std::unique_ptr<test::FrameGenerator> frame_generator( 272 std::unique_ptr<test::FrameGenerator> frame_generator(
274 test::FrameGenerator::CreateSquareGenerator(kDefaultWidth, 273 test::FrameGenerator::CreateSquareGenerator(kDefaultWidth,
275 kDefaultHeight)); 274 kDefaultHeight));
276 test::FrameForwarder frame_forwarder; 275 test::FrameForwarder frame_forwarder;
277 video_send_stream_->SetSource( 276 video_send_stream_->SetSource(
278 &frame_forwarder, 277 &frame_forwarder, VideoSendStream::DegradationPreference::kBalanced);
279 VideoSendStream::DegradationPreference::kMaintainFramerate);
280 frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); 278 frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame());
281 279
282 EXPECT_TRUE(renderer.Wait()) 280 EXPECT_TRUE(renderer.Wait())
283 << "Timed out while waiting for the frame to render."; 281 << "Timed out while waiting for the frame to render.";
284 282
285 Stop(); 283 Stop();
286 284
287 sender_transport.StopSending(); 285 sender_transport.StopSending();
288 receiver_transport.StopSending(); 286 receiver_transport.StopSending();
289 287
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 UpdateReceiveConfig(i, &receive_config); 1501 UpdateReceiveConfig(i, &receive_config);
1504 1502
1505 receive_streams[i] = 1503 receive_streams[i] =
1506 receiver_call->CreateVideoReceiveStream(std::move(receive_config)); 1504 receiver_call->CreateVideoReceiveStream(std::move(receive_config));
1507 receive_streams[i]->Start(); 1505 receive_streams[i]->Start();
1508 1506
1509 frame_generators[i] = test::FrameGeneratorCapturer::Create( 1507 frame_generators[i] = test::FrameGeneratorCapturer::Create(
1510 width, height, 30, Clock::GetRealTimeClock()); 1508 width, height, 30, Clock::GetRealTimeClock());
1511 send_streams[i]->SetSource( 1509 send_streams[i]->SetSource(
1512 frame_generators[i], 1510 frame_generators[i],
1513 VideoSendStream::DegradationPreference::kMaintainFramerate); 1511 VideoSendStream::DegradationPreference::kBalanced);
1514 frame_generators[i]->Start(); 1512 frame_generators[i]->Start();
1515 } 1513 }
1516 1514
1517 Wait(); 1515 Wait();
1518 1516
1519 for (size_t i = 0; i < kNumStreams; ++i) { 1517 for (size_t i = 0; i < kNumStreams; ++i) {
1520 frame_generators[i]->Stop(); 1518 frame_generators[i]->Stop();
1521 sender_call->DestroyVideoSendStream(send_streams[i]); 1519 sender_call->DestroyVideoSendStream(send_streams[i]);
1522 receiver_call->DestroyVideoReceiveStream(receive_streams[i]); 1520 receiver_call->DestroyVideoReceiveStream(receive_streams[i]);
1523 delete frame_generators[i]; 1521 delete frame_generators[i];
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 video_receive_configs_[0].pre_decode_callback = &pre_decode_observer; 1948 video_receive_configs_[0].pre_decode_callback = &pre_decode_observer;
1951 1949
1952 CreateVideoStreams(); 1950 CreateVideoStreams();
1953 Start(); 1951 Start();
1954 1952
1955 std::unique_ptr<test::FrameGenerator> frame_generator( 1953 std::unique_ptr<test::FrameGenerator> frame_generator(
1956 test::FrameGenerator::CreateSquareGenerator(kDefaultWidth, 1954 test::FrameGenerator::CreateSquareGenerator(kDefaultWidth,
1957 kDefaultHeight)); 1955 kDefaultHeight));
1958 test::FrameForwarder forwarder; 1956 test::FrameForwarder forwarder;
1959 video_send_stream_->SetSource( 1957 video_send_stream_->SetSource(
1960 &forwarder, VideoSendStream::DegradationPreference::kMaintainFramerate); 1958 &forwarder, VideoSendStream::DegradationPreference::kBalanced);
1961 forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); 1959 forwarder.IncomingCapturedFrame(*frame_generator->NextFrame());
1962 1960
1963 EXPECT_TRUE(post_encode_observer.Wait()) 1961 EXPECT_TRUE(post_encode_observer.Wait())
1964 << "Timed out while waiting for send-side encoded-frame callback."; 1962 << "Timed out while waiting for send-side encoded-frame callback.";
1965 1963
1966 EXPECT_TRUE(pre_decode_observer.Wait()) 1964 EXPECT_TRUE(pre_decode_observer.Wait())
1967 << "Timed out while waiting for pre-decode encoded-frame callback."; 1965 << "Timed out while waiting for pre-decode encoded-frame callback.";
1968 1966
1969 post_encode_observer.ExpectEqualFrames(pre_decode_observer); 1967 post_encode_observer.ExpectEqualFrames(pre_decode_observer);
1970 1968
(...skipping 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after
4297 std::unique_ptr<VideoEncoder> encoder_; 4295 std::unique_ptr<VideoEncoder> encoder_;
4298 std::unique_ptr<VideoDecoder> decoder_; 4296 std::unique_ptr<VideoDecoder> decoder_;
4299 rtc::CriticalSection crit_; 4297 rtc::CriticalSection crit_;
4300 int recorded_frames_ GUARDED_BY(crit_); 4298 int recorded_frames_ GUARDED_BY(crit_);
4301 } test(this); 4299 } test(this);
4302 4300
4303 RunBaseTest(&test); 4301 RunBaseTest(&test);
4304 } 4302 }
4305 4303
4306 } // namespace webrtc 4304 } // 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