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

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

Issue 179743004: Cast: Enable raw events and stats logging in CastSessionDelegate and sender app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 | « chrome/renderer/media/cast_session_delegate.cc ('k') | no next file » | 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 "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 config.audio_rtp_config = audio_config.rtp_config; 422 config.audio_rtp_config = audio_config.rtp_config;
423 config.video_rtp_config = video_config.rtp_config; 423 config.video_rtp_config = video_config.rtp_config;
424 424
425 scoped_ptr<media::cast::transport::CastTransportSender> transport_sender( 425 scoped_ptr<media::cast::transport::CastTransportSender> transport_sender(
426 media::cast::transport::CastTransportSender::CreateCastTransportSender( 426 media::cast::transport::CastTransportSender::CreateCastTransportSender(
427 clock.get(), 427 clock.get(),
428 config, 428 config,
429 base::Bind(&UpdateCastTransportStatus), 429 base::Bind(&UpdateCastTransportStatus),
430 io_message_loop.message_loop_proxy())); 430 io_message_loop.message_loop_proxy()));
431 431
432 // Enable main and send side threads only. Enable raw event logging. 432 // Enable main and send side threads only. Enable raw event and stats logging.
433 // Running transport on the main thread. 433 // Running transport on the main thread.
434 media::cast::CastLoggingConfig logging_config;
435 logging_config.enable_raw_data_collection = true;
436
437 scoped_refptr<media::cast::CastEnvironment> cast_environment( 434 scoped_refptr<media::cast::CastEnvironment> cast_environment(
438 new media::cast::CastEnvironment(clock.Pass(), 435 new media::cast::CastEnvironment(
439 io_message_loop.message_loop_proxy(), 436 clock.Pass(),
440 audio_thread.message_loop_proxy(), 437 io_message_loop.message_loop_proxy(),
441 NULL, 438 audio_thread.message_loop_proxy(),
442 video_thread.message_loop_proxy(), 439 NULL,
443 NULL, 440 video_thread.message_loop_proxy(),
444 io_message_loop.message_loop_proxy(), 441 NULL,
445 logging_config)); 442 io_message_loop.message_loop_proxy(),
443 media::cast::GetLoggingConfigWithRawEventsAndStatsEnabled()));
446 444
447 scoped_ptr<media::cast::CastSender> cast_sender( 445 scoped_ptr<media::cast::CastSender> cast_sender(
448 media::cast::CastSender::CreateCastSender( 446 media::cast::CastSender::CreateCastSender(
449 cast_environment, 447 cast_environment,
450 &audio_config, 448 &audio_config,
451 &video_config, 449 &video_config,
452 NULL, // gpu_factories. 450 NULL, // gpu_factories.
453 base::Bind(&InitializationResult), 451 base::Bind(&InitializationResult),
454 transport_sender.get())); 452 transport_sender.get()));
455 453
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 493
496 test_thread.message_loop_proxy()->PostTask( 494 test_thread.message_loop_proxy()->PostTask(
497 FROM_HERE, 495 FROM_HERE,
498 base::Bind(&media::cast::SendProcess::SendFrame, 496 base::Bind(&media::cast::SendProcess::SendFrame,
499 base::Unretained(send_process.get()))); 497 base::Unretained(send_process.get())));
500 498
501 io_message_loop.Run(); 499 io_message_loop.Run();
502 500
503 return 0; 501 return 0;
504 } 502 }
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_session_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698