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

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

Issue 136903003: cast: Wire upp logging to be sent over RTCP between receiver and sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 <string> 9 #include <string>
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 VLOG(1) << "Cast Receiver"; 219 VLOG(1) << "Cast Receiver";
220 base::Thread audio_thread("Cast audio decoder thread"); 220 base::Thread audio_thread("Cast audio decoder thread");
221 base::Thread video_thread("Cast video decoder thread"); 221 base::Thread video_thread("Cast video decoder thread");
222 audio_thread.Start(); 222 audio_thread.Start();
223 video_thread.Start(); 223 video_thread.Start();
224 224
225 base::DefaultTickClock clock; 225 base::DefaultTickClock clock;
226 // Enable receiver side threads, and disable logging. 226 // Enable receiver side threads, and disable logging.
227 scoped_refptr<media::cast::CastEnvironment> cast_environment(new 227 scoped_refptr<media::cast::CastEnvironment> cast_environment(new
228 media::cast::CastEnvironment(&clock, 228 media::cast::CastEnvironment(
229 main_message_loop.message_loop_proxy(), 229 &clock,
230 NULL, 230 main_message_loop.message_loop_proxy(),
231 audio_thread.message_loop_proxy(), 231 NULL,
232 NULL, 232 audio_thread.message_loop_proxy(),
233 video_thread.message_loop_proxy(), 233 NULL,
234 main_message_loop.message_loop_proxy(), 234 video_thread.message_loop_proxy(),
235 media::cast::GetDefaultCastLoggingConfig())); 235 main_message_loop.message_loop_proxy(),
236 media::cast::GetDefaultCastReceiverLoggingConfig()));
236 237
237 media::cast::AudioReceiverConfig audio_config = 238 media::cast::AudioReceiverConfig audio_config =
238 media::cast::GetAudioReceiverConfig(); 239 media::cast::GetAudioReceiverConfig();
239 media::cast::VideoReceiverConfig video_config = 240 media::cast::VideoReceiverConfig video_config =
240 media::cast::GetVideoReceiverConfig(); 241 media::cast::GetVideoReceiverConfig();
241 242
242 int remote_port, local_port; 243 int remote_port, local_port;
243 media::cast::GetPorts(&remote_port, &local_port); 244 media::cast::GetPorts(&remote_port, &local_port);
244 if (!local_port) { 245 if (!local_port) {
245 LOG(ERROR) << "Invalid local port."; 246 LOG(ERROR) << "Invalid local port.";
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 cast_receiver->packet_receiver(); 281 cast_receiver->packet_receiver();
281 282
282 transport->StartReceiving(packet_receiver); 283 transport->StartReceiving(packet_receiver);
283 284
284 scoped_refptr<media::cast::ReceiveProcess> receive_process( 285 scoped_refptr<media::cast::ReceiveProcess> receive_process(
285 new media::cast::ReceiveProcess(cast_receiver->frame_receiver())); 286 new media::cast::ReceiveProcess(cast_receiver->frame_receiver()));
286 receive_process->Start(); 287 receive_process->Start();
287 main_message_loop.Run(); 288 main_message_loop.Run();
288 return 0; 289 return 0;
289 } 290 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698