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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 2262443003: Delete VideoFrameFactory, CapturedFrame, and related code. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 3 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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // Allow error to be no more than 1. 520 // Allow error to be no more than 1.
521 EXPECT_NEAR(cricket::VideoFormat::FpsToInterval(30) / 1E6, interval, 1); 521 EXPECT_NEAR(cricket::VideoFormat::FpsToInterval(30) / 1E6, interval, 1);
522 522
523 last_timestamp = timestamp; 523 last_timestamp = timestamp;
524 } 524 }
525 525
526 // Remove stream previously added to free the external encoder instance. 526 // Remove stream previously added to free the external encoder instance.
527 EXPECT_TRUE(channel->RemoveSendStream(kSsrc)); 527 EXPECT_TRUE(channel->RemoveSendStream(kSsrc));
528 } 528 }
529 529
530 // TODO(nisse): Reorganize test
531 #if 0
530 TEST_F(WebRtcVideoEngine2Test, 532 TEST_F(WebRtcVideoEngine2Test,
531 ProducesIncreasingTimestampsWithResetInputSources) { 533 ProducesIncreasingTimestampsWithResetInputSources) {
532 cricket::FakeWebRtcVideoEncoderFactory encoder_factory; 534 cricket::FakeWebRtcVideoEncoderFactory encoder_factory;
533 encoder_factory.AddSupportedVideoCodecType(webrtc::kVideoCodecVP8, "VP8"); 535 encoder_factory.AddSupportedVideoCodecType(webrtc::kVideoCodecVP8, "VP8");
534 std::vector<cricket::VideoCodec> codecs; 536 std::vector<cricket::VideoCodec> codecs;
535 codecs.push_back(kVp8Codec); 537 codecs.push_back(kVp8Codec);
536 538
537 FakeCall* fake_call = new FakeCall(webrtc::Call::Config()); 539 FakeCall* fake_call = new FakeCall(webrtc::Call::Config());
538 call_.reset(fake_call); 540 call_.reset(fake_call);
539 std::unique_ptr<VideoMediaChannel> channel( 541 std::unique_ptr<VideoMediaChannel> channel(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 // Deliver with a timestamp (10 seconds) before the previous initial one, 578 // Deliver with a timestamp (10 seconds) before the previous initial one,
577 // these should not be related at all anymore and it should still work fine. 579 // these should not be related at all anymore and it should still work fine.
578 frame.time_stamp = initial_timestamp - 10 * rtc::kNumNanosecsPerSec; 580 frame.time_stamp = initial_timestamp - 10 * rtc::kNumNanosecsPerSec;
579 capturer2.SignalCapturedFrame(&frame); 581 capturer2.SignalCapturedFrame(&frame);
580 582
581 // New timestamp should be at least 1ms in the future and not old. 583 // New timestamp should be at least 1ms in the future and not old.
582 EXPECT_GT(stream->GetLastTimestamp(), capturer1_last_timestamp); 584 EXPECT_GT(stream->GetLastTimestamp(), capturer1_last_timestamp);
583 585
584 EXPECT_TRUE(channel->RemoveSendStream(kSsrc)); 586 EXPECT_TRUE(channel->RemoveSendStream(kSsrc));
585 } 587 }
588 #endif
586 589
587 VideoMediaChannel* WebRtcVideoEngine2Test::SetUpForExternalEncoderFactory( 590 VideoMediaChannel* WebRtcVideoEngine2Test::SetUpForExternalEncoderFactory(
588 cricket::WebRtcVideoEncoderFactory* encoder_factory, 591 cricket::WebRtcVideoEncoderFactory* encoder_factory,
589 const std::vector<VideoCodec>& codecs) { 592 const std::vector<VideoCodec>& codecs) {
590 engine_.SetExternalEncoderFactory(encoder_factory); 593 engine_.SetExternalEncoderFactory(encoder_factory);
591 engine_.Init(); 594 engine_.Init();
592 595
593 VideoMediaChannel* channel = 596 VideoMediaChannel* channel =
594 engine_.CreateChannel(call_.get(), MediaConfig(), VideoOptions()); 597 engine_.CreateChannel(call_.get(), MediaConfig(), VideoOptions());
595 cricket::VideoSendParameters parameters; 598 cricket::VideoSendParameters parameters;
(...skipping 3252 matching lines...) Expand 10 before | Expand all | Expand 10 after
3848 } 3851 }
3849 3852
3850 // Test that we normalize send codec format size in simulcast. 3853 // Test that we normalize send codec format size in simulcast.
3851 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 3854 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
3852 cricket::VideoCodec codec(kVp8Codec270p); 3855 cricket::VideoCodec codec(kVp8Codec270p);
3853 codec.width += 1; 3856 codec.width += 1;
3854 codec.height += 1; 3857 codec.height += 1;
3855 VerifySimulcastSettings(codec, 2, 2); 3858 VerifySimulcastSettings(codec, 2, 2);
3856 } 3859 }
3857 } // namespace cricket 3860 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698