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

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

Issue 839983002: Adding "target_frame_rate" variable in lieu of "max_frame_rate" for FrameReceiverConfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/receiver.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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 audio_sender_config_.codec = audio_codec; 481 audio_sender_config_.codec = audio_codec;
482 482
483 audio_receiver_config_.feedback_ssrc = 483 audio_receiver_config_.feedback_ssrc =
484 audio_sender_config_.receiver_ssrc; 484 audio_sender_config_.receiver_ssrc;
485 audio_receiver_config_.incoming_ssrc = audio_sender_config_.ssrc; 485 audio_receiver_config_.incoming_ssrc = audio_sender_config_.ssrc;
486 audio_receiver_config_.rtp_max_delay_ms = kTargetPlayoutDelayMs; 486 audio_receiver_config_.rtp_max_delay_ms = kTargetPlayoutDelayMs;
487 audio_receiver_config_.rtp_payload_type = 487 audio_receiver_config_.rtp_payload_type =
488 audio_sender_config_.rtp_payload_type; 488 audio_sender_config_.rtp_payload_type;
489 audio_receiver_config_.frequency = audio_sender_config_.frequency; 489 audio_receiver_config_.frequency = audio_sender_config_.frequency;
490 audio_receiver_config_.channels = kAudioChannels; 490 audio_receiver_config_.channels = kAudioChannels;
491 audio_receiver_config_.max_frame_rate = 100; 491 audio_receiver_config_.target_frame_rate = 100;
492 audio_receiver_config_.codec = audio_sender_config_.codec; 492 audio_receiver_config_.codec = audio_sender_config_.codec;
493 493
494 test_receiver_audio_callback_->SetExpectedSamplingFrequency( 494 test_receiver_audio_callback_->SetExpectedSamplingFrequency(
495 audio_receiver_config_.frequency); 495 audio_receiver_config_.frequency);
496 496
497 video_sender_config_.ssrc = 3; 497 video_sender_config_.ssrc = 3;
498 video_sender_config_.receiver_ssrc = 4; 498 video_sender_config_.receiver_ssrc = 4;
499 video_sender_config_.max_playout_delay = 499 video_sender_config_.max_playout_delay =
500 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs); 500 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs);
501 video_sender_config_.rtp_payload_type = 97; 501 video_sender_config_.rtp_payload_type = 97;
(...skipping 11 matching lines...) Expand all
513 video_sender_config_.codec = video_codec; 513 video_sender_config_.codec = video_codec;
514 514
515 video_receiver_config_.feedback_ssrc = 515 video_receiver_config_.feedback_ssrc =
516 video_sender_config_.receiver_ssrc; 516 video_sender_config_.receiver_ssrc;
517 video_receiver_config_.incoming_ssrc = video_sender_config_.ssrc; 517 video_receiver_config_.incoming_ssrc = video_sender_config_.ssrc;
518 video_receiver_config_.rtp_max_delay_ms = kTargetPlayoutDelayMs; 518 video_receiver_config_.rtp_max_delay_ms = kTargetPlayoutDelayMs;
519 video_receiver_config_.rtp_payload_type = 519 video_receiver_config_.rtp_payload_type =
520 video_sender_config_.rtp_payload_type; 520 video_sender_config_.rtp_payload_type;
521 video_receiver_config_.frequency = kVideoFrequency; 521 video_receiver_config_.frequency = kVideoFrequency;
522 video_receiver_config_.channels = 1; 522 video_receiver_config_.channels = 1;
523 video_receiver_config_.max_frame_rate = video_sender_config_.max_frame_rate; 523 video_receiver_config_.target_frame_rate =
524 video_sender_config_.max_frame_rate;
524 video_receiver_config_.codec = video_sender_config_.codec; 525 video_receiver_config_.codec = video_sender_config_.codec;
525 } 526 }
526 527
527 void SetReceiverSkew(double skew, base::TimeDelta offset) { 528 void SetReceiverSkew(double skew, base::TimeDelta offset) {
528 testing_clock_receiver_->SetSkew(skew, offset); 529 testing_clock_receiver_->SetSkew(skew, offset);
529 task_runner_receiver_->SetSkew(1.0 / skew); 530 task_runner_receiver_->SetSkew(1.0 / skew);
530 } 531 }
531 532
532 // Specify the minimum/maximum difference in playout times between two 533 // Specify the minimum/maximum difference in playout times between two
533 // consecutive frames. Also, specify the maximum absolute rate of change over 534 // consecutive frames. Also, specify the maximum absolute rate of change over
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 EXPECT_LT(jump, 220u); 1527 EXPECT_LT(jump, 220u);
1527 } 1528 }
1528 1529
1529 // TODO(pwestin): Add repeatable packet loss test. 1530 // TODO(pwestin): Add repeatable packet loss test.
1530 // TODO(pwestin): Add test for misaligned send get calls. 1531 // TODO(pwestin): Add test for misaligned send get calls.
1531 // TODO(pwestin): Add more tests that does not resample. 1532 // TODO(pwestin): Add more tests that does not resample.
1532 // TODO(pwestin): Add test when we have starvation for our RunTask. 1533 // TODO(pwestin): Add test when we have starvation for our RunTask.
1533 1534
1534 } // namespace cast 1535 } // namespace cast
1535 } // namespace media 1536 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/test/cast_benchmarks.cc ('k') | media/cast/test/receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698