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

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

Issue 2133223003: Revert of Refactoring: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/sender.cc ('k') | media/cast/test/utility/default_config.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Simulate end to end streaming. 5 // Simulate end to end streaming.
6 // 6 //
7 // Input: 7 // Input:
8 // --source= 8 // --source=
9 // WebM used as the source of video and audio frames. 9 // WebM used as the source of video and audio frames.
10 // --output= 10 // --output=
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 // Event subscriber. Store at most 1 hour of events. 350 // Event subscriber. Store at most 1 hour of events.
351 EncodingEventSubscriber audio_event_subscriber(AUDIO_EVENT, 351 EncodingEventSubscriber audio_event_subscriber(AUDIO_EVENT,
352 100 * 60 * 60); 352 100 * 60 * 60);
353 EncodingEventSubscriber video_event_subscriber(VIDEO_EVENT, 353 EncodingEventSubscriber video_event_subscriber(VIDEO_EVENT,
354 30 * 60 * 60); 354 30 * 60 * 60);
355 sender_env->logger()->Subscribe(&audio_event_subscriber); 355 sender_env->logger()->Subscribe(&audio_event_subscriber);
356 sender_env->logger()->Subscribe(&video_event_subscriber); 356 sender_env->logger()->Subscribe(&video_event_subscriber);
357 357
358 // Audio sender config. 358 // Audio sender config.
359 FrameSenderConfig audio_sender_config = GetDefaultAudioSenderConfig(); 359 AudioSenderConfig audio_sender_config = GetDefaultAudioSenderConfig();
360 audio_sender_config.min_playout_delay = 360 audio_sender_config.min_playout_delay =
361 audio_sender_config.max_playout_delay = base::TimeDelta::FromMilliseconds( 361 audio_sender_config.max_playout_delay = base::TimeDelta::FromMilliseconds(
362 GetIntegerSwitchValue(kTargetDelay, 400)); 362 GetIntegerSwitchValue(kTargetDelay, 400));
363 363
364 // Audio receiver config. 364 // Audio receiver config.
365 FrameReceiverConfig audio_receiver_config = 365 FrameReceiverConfig audio_receiver_config =
366 GetDefaultAudioReceiverConfig(); 366 GetDefaultAudioReceiverConfig();
367 audio_receiver_config.rtp_max_delay_ms = 367 audio_receiver_config.rtp_max_delay_ms =
368 audio_sender_config.max_playout_delay.InMilliseconds(); 368 audio_sender_config.max_playout_delay.InMilliseconds();
369 369
370 // Video sender config. 370 // Video sender config.
371 FrameSenderConfig video_sender_config = GetDefaultVideoSenderConfig(); 371 VideoSenderConfig video_sender_config = GetDefaultVideoSenderConfig();
372 video_sender_config.max_bitrate = 2500000; 372 video_sender_config.max_bitrate = 2500000;
373 video_sender_config.min_bitrate = 2000000; 373 video_sender_config.min_bitrate = 2000000;
374 video_sender_config.start_bitrate = 2000000; 374 video_sender_config.start_bitrate = 2000000;
375 video_sender_config.min_playout_delay = 375 video_sender_config.min_playout_delay =
376 video_sender_config.max_playout_delay = 376 video_sender_config.max_playout_delay =
377 audio_sender_config.max_playout_delay; 377 audio_sender_config.max_playout_delay;
378 video_sender_config.max_frame_rate = GetIntegerSwitchValue(kMaxFrameRate, 30); 378 video_sender_config.max_frame_rate = GetIntegerSwitchValue(kMaxFrameRate, 30);
379 379
380 // Video receiver config. 380 // Video receiver config.
381 FrameReceiverConfig video_receiver_config = 381 FrameReceiverConfig video_receiver_config =
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 values.SetString("sim-id", sim_id); 734 values.SetString("sim-id", sim_id);
735 735
736 std::string extra_data; 736 std::string extra_data;
737 base::JSONWriter::Write(values, &extra_data); 737 base::JSONWriter::Write(values, &extra_data);
738 738
739 // Run. 739 // Run.
740 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path, 740 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path,
741 yuv_output_path, extra_data, model); 741 yuv_output_path, extra_data, model);
742 return 0; 742 return 0;
743 } 743 }
OLDNEW
« no previous file with comments | « media/cast/test/sender.cc ('k') | media/cast/test/utility/default_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698