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

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

Issue 427733002: Cast: Remove unused RTCP messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « media/cast/sender/video_sender_unittest.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 // Test application that simulates a cast sender - Data can be either generated 5 // Test application that simulates a cast sender - Data can be either generated
6 // or read from a file. 6 // or read from a file.
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // --fps=xx 58 // --fps=xx
59 // Override framerate of the video stream. 59 // Override framerate of the video stream.
60 const char kSwitchAddress[] = "address"; 60 const char kSwitchAddress[] = "address";
61 const char kSwitchPort[] = "port"; 61 const char kSwitchPort[] = "port";
62 const char kSwitchSourceFile[] = "source-file"; 62 const char kSwitchSourceFile[] = "source-file";
63 const char kSwitchFps[] = "fps"; 63 const char kSwitchFps[] = "fps";
64 64
65 media::cast::AudioSenderConfig GetAudioSenderConfig() { 65 media::cast::AudioSenderConfig GetAudioSenderConfig() {
66 media::cast::AudioSenderConfig audio_config; 66 media::cast::AudioSenderConfig audio_config;
67 67
68 audio_config.rtcp_c_name = "audio_sender@a.b.c.d";
69
70 audio_config.use_external_encoder = false; 68 audio_config.use_external_encoder = false;
71 audio_config.frequency = kAudioSamplingFrequency; 69 audio_config.frequency = kAudioSamplingFrequency;
72 audio_config.channels = kAudioChannels; 70 audio_config.channels = kAudioChannels;
73 audio_config.bitrate = 0; // Use Opus auto-VBR mode. 71 audio_config.bitrate = 0; // Use Opus auto-VBR mode.
74 audio_config.codec = media::cast::CODEC_AUDIO_OPUS; 72 audio_config.codec = media::cast::CODEC_AUDIO_OPUS;
75 audio_config.ssrc = 1; 73 audio_config.ssrc = 1;
76 audio_config.incoming_feedback_ssrc = 2; 74 audio_config.incoming_feedback_ssrc = 2;
77 audio_config.rtp_payload_type = 127; 75 audio_config.rtp_payload_type = 127;
78 // TODO(miu): The default in cast_defines.h is 100. Should this be 100, and 76 // TODO(miu): The default in cast_defines.h is 100. Should this be 100, and
79 // should receiver.cc's config also be 100? 77 // should receiver.cc's config also be 100?
80 audio_config.target_playout_delay = base::TimeDelta::FromMilliseconds(300); 78 audio_config.target_playout_delay = base::TimeDelta::FromMilliseconds(300);
81 return audio_config; 79 return audio_config;
82 } 80 }
83 81
84 media::cast::VideoSenderConfig GetVideoSenderConfig() { 82 media::cast::VideoSenderConfig GetVideoSenderConfig() {
85 media::cast::VideoSenderConfig video_config; 83 media::cast::VideoSenderConfig video_config;
86 84
87 video_config.rtcp_c_name = "video_sender@a.b.c.d";
88 video_config.use_external_encoder = false; 85 video_config.use_external_encoder = false;
89 86
90 // Resolution. 87 // Resolution.
91 video_config.width = 1280; 88 video_config.width = 1280;
92 video_config.height = 720; 89 video_config.height = 720;
93 video_config.max_frame_rate = 30; 90 video_config.max_frame_rate = 30;
94 91
95 // Bitrates. 92 // Bitrates.
96 video_config.max_bitrate = 2500000; 93 video_config.max_bitrate = 2500000;
97 video_config.min_bitrate = 100000; 94 video_config.min_bitrate = 100000;
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 base::Passed(&audio_stats_subscriber), 401 base::Passed(&audio_stats_subscriber),
405 base::Passed(&offset_estimator)), 402 base::Passed(&offset_estimator)),
406 base::TimeDelta::FromSeconds(logging_duration_seconds)); 403 base::TimeDelta::FromSeconds(logging_duration_seconds));
407 404
408 fake_media_source->Start(cast_sender->audio_frame_input(), 405 fake_media_source->Start(cast_sender->audio_frame_input(),
409 cast_sender->video_frame_input()); 406 cast_sender->video_frame_input());
410 407
411 io_message_loop.Run(); 408 io_message_loop.Run();
412 return 0; 409 return 0;
413 } 410 }
OLDNEW
« no previous file with comments | « media/cast/sender/video_sender_unittest.cc ('k') | media/cast/test/utility/default_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698