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

Side by Side Diff: media/cast/test/end2end_unittest.cc

Issue 906403006: [Cast] Size-Adaptable platform video encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed hubbe's comments. Created 5 years, 10 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 | « media/cast/test/cast_benchmarks.cc ('k') | media/cast/test/utility/default_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This test generate synthetic data. For audio it's a sinusoid waveform with 5 // This test generate synthetic data. For audio it's a sinusoid waveform with
6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern 6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern
7 // that is shifting by one pixel per frame, each pixels neighbors right and down 7 // that is shifting by one pixel per frame, each pixels neighbors right and down
8 // is this pixels value +1, since the pixel value is 8 bit it will wrap 8 // is this pixels value +1, since the pixel value is 8 bit it will wrap
9 // frequently within the image. Visually this will create diagonally color bands 9 // frequently within the image. Visually this will create diagonally color bands
10 // that moves across the screen 10 // that moves across the screen
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 namespace cast { 46 namespace cast {
47 47
48 namespace { 48 namespace {
49 49
50 static const int64 kStartMillisecond = INT64_C(1245); 50 static const int64 kStartMillisecond = INT64_C(1245);
51 static const int kAudioChannels = 2; 51 static const int kAudioChannels = 2;
52 static const double kSoundFrequency = 314.15926535897; // Freq of sine wave. 52 static const double kSoundFrequency = 314.15926535897; // Freq of sine wave.
53 static const float kSoundVolume = 0.5f; 53 static const float kSoundVolume = 0.5f;
54 static const int kVideoHdWidth = 1280; 54 static const int kVideoHdWidth = 1280;
55 static const int kVideoHdHeight = 720; 55 static const int kVideoHdHeight = 720;
56 static const int kVideoQcifWidth = 176;
57 static const int kVideoQcifHeight = 144;
58 56
59 // Since the video encoded and decoded an error will be introduced; when 57 // Since the video encoded and decoded an error will be introduced; when
60 // comparing individual pixels the error can be quite large; we allow a PSNR of 58 // comparing individual pixels the error can be quite large; we allow a PSNR of
61 // at least |kVideoAcceptedPSNR|. 59 // at least |kVideoAcceptedPSNR|.
62 static const double kVideoAcceptedPSNR = 38.0; 60 static const double kVideoAcceptedPSNR = 38.0;
63 61
64 // The tests are commonly implemented with |kFrameTimerMs| RunTask function; 62 // The tests are commonly implemented with |kFrameTimerMs| RunTask function;
65 // a normal video is 30 fps hence the 33 ms between frames. 63 // a normal video is 30 fps hence the 33 ms between frames.
66 // 64 //
67 // TODO(miu): The errors in timing will add up significantly. Find an 65 // TODO(miu): The errors in timing will add up significantly. Find an
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 std::list<ExpectedAudioFrame*> expected_frames_; 347 std::list<ExpectedAudioFrame*> expected_frames_;
350 base::TimeTicks last_playout_time_; 348 base::TimeTicks last_playout_time_;
351 }; 349 };
352 350
353 // Class that verifies the video frames coming out of the receiver. 351 // Class that verifies the video frames coming out of the receiver.
354 class TestReceiverVideoCallback 352 class TestReceiverVideoCallback
355 : public base::RefCountedThreadSafe<TestReceiverVideoCallback> { 353 : public base::RefCountedThreadSafe<TestReceiverVideoCallback> {
356 public: 354 public:
357 struct ExpectedVideoFrame { 355 struct ExpectedVideoFrame {
358 int start_value; 356 int start_value;
359 int width;
360 int height;
361 base::TimeTicks playout_time; 357 base::TimeTicks playout_time;
362 bool should_be_continuous; 358 bool should_be_continuous;
363 }; 359 };
364 360
365 TestReceiverVideoCallback() : num_called_(0) {} 361 TestReceiverVideoCallback() : num_called_(0) {}
366 362
367 void AddExpectedResult(int start_value, 363 void AddExpectedResult(int start_value,
368 int width,
369 int height,
370 const base::TimeTicks& playout_time, 364 const base::TimeTicks& playout_time,
371 bool should_be_continuous) { 365 bool should_be_continuous) {
372 ExpectedVideoFrame expected_video_frame; 366 ExpectedVideoFrame expected_video_frame;
373 expected_video_frame.start_value = start_value; 367 expected_video_frame.start_value = start_value;
374 expected_video_frame.width = width;
375 expected_video_frame.height = height;
376 expected_video_frame.playout_time = playout_time; 368 expected_video_frame.playout_time = playout_time;
377 expected_video_frame.should_be_continuous = should_be_continuous; 369 expected_video_frame.should_be_continuous = should_be_continuous;
378 expected_frame_.push_back(expected_video_frame); 370 expected_frame_.push_back(expected_video_frame);
379 } 371 }
380 372
381 void CheckVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, 373 void CheckVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame,
382 const base::TimeTicks& playout_time, 374 const base::TimeTicks& playout_time,
383 bool is_continuous) { 375 bool is_continuous) {
384 ++num_called_; 376 ++num_called_;
385 377
386 ASSERT_TRUE(!!video_frame.get()); 378 ASSERT_TRUE(!!video_frame.get());
387 ASSERT_FALSE(expected_frame_.empty()); 379 ASSERT_FALSE(expected_frame_.empty());
388 ExpectedVideoFrame expected_video_frame = expected_frame_.front(); 380 ExpectedVideoFrame expected_video_frame = expected_frame_.front();
389 expected_frame_.pop_front(); 381 expected_frame_.pop_front();
390 382
391 EXPECT_EQ(expected_video_frame.width, video_frame->visible_rect().width()); 383 EXPECT_EQ(kVideoHdWidth, video_frame->visible_rect().width());
392 EXPECT_EQ(expected_video_frame.height, 384 EXPECT_EQ(kVideoHdHeight, video_frame->visible_rect().height());
393 video_frame->visible_rect().height());
394 385
395 gfx::Size size(expected_video_frame.width, expected_video_frame.height); 386 const gfx::Size size(kVideoHdWidth, kVideoHdHeight);
396 scoped_refptr<media::VideoFrame> expected_I420_frame = 387 scoped_refptr<media::VideoFrame> expected_I420_frame =
397 media::VideoFrame::CreateFrame( 388 media::VideoFrame::CreateFrame(
398 VideoFrame::I420, size, gfx::Rect(size), size, base::TimeDelta()); 389 VideoFrame::I420, size, gfx::Rect(size), size, base::TimeDelta());
399 PopulateVideoFrame(expected_I420_frame.get(), 390 PopulateVideoFrame(expected_I420_frame.get(),
400 expected_video_frame.start_value); 391 expected_video_frame.start_value);
401 392
402 if (expected_video_frame.should_be_continuous) { 393 if (expected_video_frame.should_be_continuous) {
403 EXPECT_GE(I420PSNR(expected_I420_frame, video_frame), kVideoAcceptedPSNR); 394 EXPECT_GE(I420PSNR(expected_I420_frame, video_frame), kVideoAcceptedPSNR);
404 } 395 }
405 396
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 480
490 test_receiver_audio_callback_->SetExpectedSamplingFrequency( 481 test_receiver_audio_callback_->SetExpectedSamplingFrequency(
491 audio_receiver_config_.rtp_timebase); 482 audio_receiver_config_.rtp_timebase);
492 483
493 video_sender_config_.ssrc = 3; 484 video_sender_config_.ssrc = 3;
494 video_sender_config_.receiver_ssrc = 4; 485 video_sender_config_.receiver_ssrc = 4;
495 video_sender_config_.max_playout_delay = 486 video_sender_config_.max_playout_delay =
496 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs); 487 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs);
497 video_sender_config_.rtp_payload_type = 97; 488 video_sender_config_.rtp_payload_type = 97;
498 video_sender_config_.use_external_encoder = false; 489 video_sender_config_.use_external_encoder = false;
499 video_sender_config_.width = kVideoHdWidth;
500 video_sender_config_.height = kVideoHdHeight;
501 video_sender_config_.max_bitrate = 50000; 490 video_sender_config_.max_bitrate = 50000;
502 video_sender_config_.min_bitrate = 10000; 491 video_sender_config_.min_bitrate = 10000;
503 video_sender_config_.start_bitrate = 10000; 492 video_sender_config_.start_bitrate = 10000;
504 video_sender_config_.max_qp = 30; 493 video_sender_config_.max_qp = 30;
505 video_sender_config_.min_qp = 4; 494 video_sender_config_.min_qp = 4;
506 video_sender_config_.max_frame_rate = 30; 495 video_sender_config_.max_frame_rate = 30;
507 video_sender_config_.max_number_of_video_buffers_used = 496 video_sender_config_.max_number_of_video_buffers_used =
508 max_number_of_video_buffers_used; 497 max_number_of_video_buffers_used;
509 video_sender_config_.codec = video_codec; 498 video_sender_config_.codec = video_codec;
510 499
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 cast_receiver_.reset(); 648 cast_receiver_.reset();
660 task_runner_->RunTasks(); 649 task_runner_->RunTasks();
661 } 650 }
662 651
663 void SendVideoFrame(int start_value, const base::TimeTicks& reference_time) { 652 void SendVideoFrame(int start_value, const base::TimeTicks& reference_time) {
664 if (start_time_.is_null()) 653 if (start_time_.is_null())
665 start_time_ = reference_time; 654 start_time_ = reference_time;
666 // TODO(miu): Consider using a slightly skewed clock for the media timestamp 655 // TODO(miu): Consider using a slightly skewed clock for the media timestamp
667 // since the video clock may not be the same as the reference clock. 656 // since the video clock may not be the same as the reference clock.
668 const base::TimeDelta time_diff = reference_time - start_time_; 657 const base::TimeDelta time_diff = reference_time - start_time_;
669 gfx::Size size(video_sender_config_.width, video_sender_config_.height); 658 const gfx::Size size(kVideoHdWidth, kVideoHdHeight);
670 EXPECT_TRUE(VideoFrame::IsValidConfig( 659 EXPECT_TRUE(VideoFrame::IsValidConfig(
671 VideoFrame::I420, size, gfx::Rect(size), size)); 660 VideoFrame::I420, size, gfx::Rect(size), size));
672 scoped_refptr<media::VideoFrame> video_frame = 661 scoped_refptr<media::VideoFrame> video_frame =
673 media::VideoFrame::CreateFrame( 662 media::VideoFrame::CreateFrame(
674 VideoFrame::I420, size, gfx::Rect(size), size, 663 VideoFrame::I420, size, gfx::Rect(size), size,
675 time_diff); 664 time_diff);
676 PopulateVideoFrame(video_frame.get(), start_value); 665 PopulateVideoFrame(video_frame.get(), start_value);
677 video_frame_input_->InsertRawVideoFrame(video_frame, reference_time); 666 video_frame_input_->InsertRawVideoFrame(video_frame, reference_time);
678 } 667 }
679 668
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 std::vector<FrameEvent> frame_events_; 816 std::vector<FrameEvent> frame_events_;
828 std::vector<PacketEvent> packet_events_; 817 std::vector<PacketEvent> packet_events_;
829 std::vector<std::pair<base::TimeTicks, base::TimeTicks> > audio_ticks_; 818 std::vector<std::pair<base::TimeTicks, base::TimeTicks> > audio_ticks_;
830 std::vector<std::pair<base::TimeTicks, base::TimeTicks> > video_ticks_; 819 std::vector<std::pair<base::TimeTicks, base::TimeTicks> > video_ticks_;
831 // |transport_sender_| has a RepeatingTimer which needs a MessageLoop. 820 // |transport_sender_| has a RepeatingTimer which needs a MessageLoop.
832 base::MessageLoop message_loop_; 821 base::MessageLoop message_loop_;
833 }; 822 };
834 823
835 TEST_F(End2EndTest, LoopNoLossPcm16) { 824 TEST_F(End2EndTest, LoopNoLossPcm16) {
836 Configure(CODEC_VIDEO_VP8, CODEC_AUDIO_PCM16, 32000, 1); 825 Configure(CODEC_VIDEO_VP8, CODEC_AUDIO_PCM16, 32000, 1);
837 // Reduce video resolution to allow processing multiple frames within a
838 // reasonable time frame.
839 video_sender_config_.width = kVideoQcifWidth;
840 video_sender_config_.height = kVideoQcifHeight;
841 Create(); 826 Create();
842 827
843 const int kNumIterations = 50; 828 const int kNumIterations = 50;
844 int video_start = kVideoStart; 829 int video_start = kVideoStart;
845 int audio_diff = kFrameTimerMs; 830 int audio_diff = kFrameTimerMs;
846 int num_audio_frames_requested = 0; 831 int num_audio_frames_requested = 0;
847 for (int i = 0; i < kNumIterations; ++i) { 832 for (int i = 0; i < kNumIterations; ++i) {
848 const int num_audio_frames = audio_diff / kAudioFrameDurationMs; 833 const int num_audio_frames = audio_diff / kAudioFrameDurationMs;
849 audio_diff -= num_audio_frames * kAudioFrameDurationMs; 834 audio_diff -= num_audio_frames * kAudioFrameDurationMs;
850 835
851 if (num_audio_frames > 0) 836 if (num_audio_frames > 0)
852 FeedAudioFrames(1, true); 837 FeedAudioFrames(1, true);
853 838
854 test_receiver_video_callback_->AddExpectedResult( 839 test_receiver_video_callback_->AddExpectedResult(
855 video_start, 840 video_start,
856 video_sender_config_.width,
857 video_sender_config_.height,
858 testing_clock_sender_->NowTicks() + 841 testing_clock_sender_->NowTicks() +
859 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs), 842 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs),
860 true); 843 true);
861 SendVideoFrame(video_start, testing_clock_sender_->NowTicks()); 844 SendVideoFrame(video_start, testing_clock_sender_->NowTicks());
862 845
863 if (num_audio_frames > 0) 846 if (num_audio_frames > 0)
864 RunTasks(kAudioFrameDurationMs); // Advance clock forward. 847 RunTasks(kAudioFrameDurationMs); // Advance clock forward.
865 if (num_audio_frames > 1) 848 if (num_audio_frames > 1)
866 FeedAudioFrames(num_audio_frames - 1, true); 849 FeedAudioFrames(num_audio_frames - 1, true);
867 850
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 audio_diff -= num_audio_frames * kAudioFrameDurationMs; 935 audio_diff -= num_audio_frames * kAudioFrameDurationMs;
953 936
954 if (num_audio_frames > 0) 937 if (num_audio_frames > 0)
955 FeedAudioFramesWithExpectedDelay(1, expected_delay); 938 FeedAudioFramesWithExpectedDelay(1, expected_delay);
956 939
957 // Frame will be rendered with 100mS delay, as the transmission is delayed. 940 // Frame will be rendered with 100mS delay, as the transmission is delayed.
958 // The receiver at this point cannot be synced to the sender's clock, as no 941 // The receiver at this point cannot be synced to the sender's clock, as no
959 // packets, and specifically no RTCP packets were sent. 942 // packets, and specifically no RTCP packets were sent.
960 test_receiver_video_callback_->AddExpectedResult( 943 test_receiver_video_callback_->AddExpectedResult(
961 video_start, 944 video_start,
962 video_sender_config_.width,
963 video_sender_config_.height,
964 initial_send_time + expected_delay + 945 initial_send_time + expected_delay +
965 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs), 946 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs),
966 true); 947 true);
967 SendVideoFrame(video_start, testing_clock_sender_->NowTicks()); 948 SendVideoFrame(video_start, testing_clock_sender_->NowTicks());
968 949
969 if (num_audio_frames > 0) 950 if (num_audio_frames > 0)
970 RunTasks(kAudioFrameDurationMs); // Advance clock forward. 951 RunTasks(kAudioFrameDurationMs); // Advance clock forward.
971 if (num_audio_frames > 1) 952 if (num_audio_frames > 1)
972 FeedAudioFramesWithExpectedDelay(num_audio_frames - 1, expected_delay); 953 FeedAudioFramesWithExpectedDelay(num_audio_frames - 1, expected_delay);
973 954
974 RunTasks(kFrameTimerMs - kAudioFrameDurationMs); 955 RunTasks(kFrameTimerMs - kAudioFrameDurationMs);
975 audio_diff += kFrameTimerMs; 956 audio_diff += kFrameTimerMs;
976 video_start++; 957 video_start++;
977 } 958 }
978 959
979 RunTasks(test_delay_ms); 960 RunTasks(test_delay_ms);
980 sender_to_receiver_.SetSendPackets(true); 961 sender_to_receiver_.SetSendPackets(true);
981 962
982 int num_audio_frames_requested = 0; 963 int num_audio_frames_requested = 0;
983 for (int j = 0; j < 10; ++j) { 964 for (int j = 0; j < 10; ++j) {
984 const int num_audio_frames = audio_diff / kAudioFrameDurationMs; 965 const int num_audio_frames = audio_diff / kAudioFrameDurationMs;
985 audio_diff -= num_audio_frames * kAudioFrameDurationMs; 966 audio_diff -= num_audio_frames * kAudioFrameDurationMs;
986 967
987 if (num_audio_frames > 0) 968 if (num_audio_frames > 0)
988 FeedAudioFrames(1, true); 969 FeedAudioFrames(1, true);
989 970
990 test_receiver_video_callback_->AddExpectedResult( 971 test_receiver_video_callback_->AddExpectedResult(
991 video_start, 972 video_start,
992 video_sender_config_.width,
993 video_sender_config_.height,
994 testing_clock_sender_->NowTicks() + 973 testing_clock_sender_->NowTicks() +
995 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs), 974 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs),
996 true); 975 true);
997 SendVideoFrame(video_start, testing_clock_sender_->NowTicks()); 976 SendVideoFrame(video_start, testing_clock_sender_->NowTicks());
998 977
999 if (num_audio_frames > 0) 978 if (num_audio_frames > 0)
1000 RunTasks(kAudioFrameDurationMs); // Advance clock forward. 979 RunTasks(kAudioFrameDurationMs); // Advance clock forward.
1001 if (num_audio_frames > 1) 980 if (num_audio_frames > 1)
1002 FeedAudioFrames(num_audio_frames - 1, true); 981 FeedAudioFrames(num_audio_frames - 1, true);
1003 982
(...skipping 29 matching lines...) Expand all
1033 base::TimeTicks reference_time; 1012 base::TimeTicks reference_time;
1034 1013
1035 int i = 0; 1014 int i = 0;
1036 for (; i < 20; ++i) { 1015 for (; i < 20; ++i) {
1037 reference_time = testing_clock_sender_->NowTicks(); 1016 reference_time = testing_clock_sender_->NowTicks();
1038 SendVideoFrame(video_start, reference_time); 1017 SendVideoFrame(video_start, reference_time);
1039 1018
1040 if (i % 2 == 0) { 1019 if (i % 2 == 0) {
1041 test_receiver_video_callback_->AddExpectedResult( 1020 test_receiver_video_callback_->AddExpectedResult(
1042 video_start, 1021 video_start,
1043 video_sender_config_.width,
1044 video_sender_config_.height,
1045 reference_time + base::TimeDelta::FromMilliseconds(target_delay), 1022 reference_time + base::TimeDelta::FromMilliseconds(target_delay),
1046 i == 0); 1023 i == 0);
1047 1024
1048 // GetRawVideoFrame will not return the frame until we are close in 1025 // GetRawVideoFrame will not return the frame until we are close in
1049 // time before we should render the frame. 1026 // time before we should render the frame.
1050 cast_receiver_->RequestDecodedVideoFrame( 1027 cast_receiver_->RequestDecodedVideoFrame(
1051 base::Bind(&TestReceiverVideoCallback::CheckVideoFrame, 1028 base::Bind(&TestReceiverVideoCallback::CheckVideoFrame,
1052 test_receiver_video_callback_)); 1029 test_receiver_video_callback_));
1053 } 1030 }
1054 RunTasks(kFrameTimerMs); 1031 RunTasks(kFrameTimerMs);
(...skipping 19 matching lines...) Expand all
1074 1051
1075 Create(); 1052 Create();
1076 1053
1077 int frames_counter = 0; 1054 int frames_counter = 0;
1078 for (; frames_counter < 3; ++frames_counter) { 1055 for (; frames_counter < 3; ++frames_counter) {
1079 const base::TimeTicks reference_time = testing_clock_sender_->NowTicks(); 1056 const base::TimeTicks reference_time = testing_clock_sender_->NowTicks();
1080 SendVideoFrame(frames_counter, reference_time); 1057 SendVideoFrame(frames_counter, reference_time);
1081 1058
1082 test_receiver_video_callback_->AddExpectedResult( 1059 test_receiver_video_callback_->AddExpectedResult(
1083 frames_counter, 1060 frames_counter,
1084 video_sender_config_.width,
1085 video_sender_config_.height,
1086 reference_time + 1061 reference_time +
1087 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs), 1062 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs),
1088 true); 1063 true);
1089 1064
1090 RunTasks(kFrameTimerMs); 1065 RunTasks(kFrameTimerMs);
1091 1066
1092 cast_receiver_->RequestDecodedVideoFrame( 1067 cast_receiver_->RequestDecodedVideoFrame(
1093 base::Bind(&TestReceiverVideoCallback::CheckVideoFrame, 1068 base::Bind(&TestReceiverVideoCallback::CheckVideoFrame,
1094 test_receiver_video_callback_)); 1069 test_receiver_video_callback_));
1095 } 1070 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 TEST_F(End2EndTest, VideoLogging) { 1105 TEST_F(End2EndTest, VideoLogging) {
1131 Configure(CODEC_VIDEO_VP8, CODEC_AUDIO_PCM16, 32000, 1); 1106 Configure(CODEC_VIDEO_VP8, CODEC_AUDIO_PCM16, 32000, 1);
1132 Create(); 1107 Create();
1133 1108
1134 int video_start = kVideoStart; 1109 int video_start = kVideoStart;
1135 const int num_frames = 5; 1110 const int num_frames = 5;
1136 for (int i = 0; i < num_frames; ++i) { 1111 for (int i = 0; i < num_frames; ++i) {
1137 base::TimeTicks reference_time = testing_clock_sender_->NowTicks(); 1112 base::TimeTicks reference_time = testing_clock_sender_->NowTicks();
1138 test_receiver_video_callback_->AddExpectedResult( 1113 test_receiver_video_callback_->AddExpectedResult(
1139 video_start, 1114 video_start,
1140 video_sender_config_.width,
1141 video_sender_config_.height,
1142 reference_time + 1115 reference_time +
1143 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs), 1116 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs),
1144 true); 1117 true);
1145 1118
1146 SendVideoFrame(video_start, reference_time); 1119 SendVideoFrame(video_start, reference_time);
1147 RunTasks(kFrameTimerMs); 1120 RunTasks(kFrameTimerMs);
1148 1121
1149 cast_receiver_->RequestDecodedVideoFrame( 1122 cast_receiver_->RequestDecodedVideoFrame(
1150 base::Bind(&TestReceiverVideoCallback::CheckVideoFrame, 1123 base::Bind(&TestReceiverVideoCallback::CheckVideoFrame,
1151 test_receiver_video_callback_)); 1124 test_receiver_video_callback_));
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 EXPECT_LT(jump, 220u); 1512 EXPECT_LT(jump, 220u);
1540 } 1513 }
1541 1514
1542 // TODO(pwestin): Add repeatable packet loss test. 1515 // TODO(pwestin): Add repeatable packet loss test.
1543 // TODO(pwestin): Add test for misaligned send get calls. 1516 // TODO(pwestin): Add test for misaligned send get calls.
1544 // TODO(pwestin): Add more tests that does not resample. 1517 // TODO(pwestin): Add more tests that does not resample.
1545 // TODO(pwestin): Add test when we have starvation for our RunTask. 1518 // TODO(pwestin): Add test when we have starvation for our RunTask.
1546 1519
1547 } // namespace cast 1520 } // namespace cast
1548 } // namespace media 1521 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/test/cast_benchmarks.cc ('k') | media/cast/test/utility/default_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698