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

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

Issue 845993002: Adding "rtp_timebase" variable in lieu of "frequency" for FrameReceiverConfig structure. (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/end2end_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 #include <algorithm> 5 #include <algorithm>
6 #include <climits> 6 #include <climits>
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <cstdio> 8 #include <cstdio>
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 FrameReceiverConfig GetVideoReceiverConfig() { 146 FrameReceiverConfig GetVideoReceiverConfig() {
147 FrameReceiverConfig video_config = GetDefaultVideoReceiverConfig(); 147 FrameReceiverConfig video_config = GetDefaultVideoReceiverConfig();
148 GetVideoSsrcs(&video_config); 148 GetVideoSsrcs(&video_config);
149 GetVideoPayloadtype(&video_config); 149 GetVideoPayloadtype(&video_config);
150 video_config.rtp_max_delay_ms = 300; 150 video_config.rtp_max_delay_ms = 300;
151 return video_config; 151 return video_config;
152 } 152 }
153 153
154 AudioParameters ToAudioParameters(const FrameReceiverConfig& config) { 154 AudioParameters ToAudioParameters(const FrameReceiverConfig& config) {
155 const int samples_in_10ms = config.frequency / 100; 155 const int samples_in_10ms = config.rtp_timebase / 100;
156 return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, 156 return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY,
157 GuessChannelLayout(config.channels), 157 GuessChannelLayout(config.channels),
158 config.frequency, 32, samples_in_10ms); 158 config.rtp_timebase, 32, samples_in_10ms);
159 } 159 }
160 160
161 // An InProcessReceiver that renders video frames to a LinuxOutputWindow and 161 // An InProcessReceiver that renders video frames to a LinuxOutputWindow and
162 // audio frames via Chromium's audio stack. 162 // audio frames via Chromium's audio stack.
163 // 163 //
164 // InProcessReceiver pushes audio and video frames to this subclass, and these 164 // InProcessReceiver pushes audio and video frames to this subclass, and these
165 // frames are pushed into a queue. Then, for audio, the Chromium audio stack 165 // frames are pushed into a queue. Then, for audio, the Chromium audio stack
166 // will make polling calls on a separate, unknown thread whereby audio frames 166 // will make polling calls on a separate, unknown thread whereby audio frames
167 // are pulled out of the audio queue as needed. For video, however, NaivePlayer 167 // are pulled out of the audio queue as needed. For video, however, NaivePlayer
168 // is responsible for scheduling updates to the screen itself. For both, the 168 // is responsible for scheduling updates to the screen itself. For both, the
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 audio_config, 591 audio_config,
592 video_config, 592 video_config,
593 window_width, 593 window_width,
594 window_height); 594 window_height);
595 player.Start(); 595 player.Start();
596 596
597 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM). 597 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM).
598 NOTREACHED(); 598 NOTREACHED();
599 return 0; 599 return 0;
600 } 600 }
OLDNEW
« no previous file with comments | « media/cast/test/end2end_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