OLD | NEW |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 #include "media/cast/test/utility/udp_proxy.h" | 58 #include "media/cast/test/utility/udp_proxy.h" |
59 #include "media/cast/test/utility/video_utility.h" | 59 #include "media/cast/test/utility/video_utility.h" |
60 | 60 |
61 using media::cast::proto::IPPModel; | 61 using media::cast::proto::IPPModel; |
62 using media::cast::proto::NetworkSimulationModel; | 62 using media::cast::proto::NetworkSimulationModel; |
63 using media::cast::proto::NetworkSimulationModelType; | 63 using media::cast::proto::NetworkSimulationModelType; |
64 | 64 |
65 namespace media { | 65 namespace media { |
66 namespace cast { | 66 namespace cast { |
67 namespace { | 67 namespace { |
68 const int kTargetDelay = 300; | 68 const int kTargetDelay = 400; |
69 const char kSourcePath[] = "source"; | 69 const char kSourcePath[] = "source"; |
70 const char kModelPath[] = "model"; | 70 const char kModelPath[] = "model"; |
71 const char kOutputPath[] = "output"; | 71 const char kOutputPath[] = "output"; |
72 const char kSimulationId[] = "sim-id"; | 72 const char kSimulationId[] = "sim-id"; |
73 const char kLibDir[] = "lib-dir"; | 73 const char kLibDir[] = "lib-dir"; |
74 | 74 |
75 void UpdateCastTransportStatus(CastTransportStatus status) { | 75 void UpdateCastTransportStatus(CastTransportStatus status) { |
76 LOG(INFO) << "Cast transport status: " << status; | 76 LOG(INFO) << "Cast transport status: " << status; |
77 } | 77 } |
78 | 78 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 base::TimeDelta::FromMilliseconds(kTargetDelay); | 223 base::TimeDelta::FromMilliseconds(kTargetDelay); |
224 | 224 |
225 // Audio receiver config. | 225 // Audio receiver config. |
226 FrameReceiverConfig audio_receiver_config = | 226 FrameReceiverConfig audio_receiver_config = |
227 GetDefaultAudioReceiverConfig(); | 227 GetDefaultAudioReceiverConfig(); |
228 audio_receiver_config.rtp_max_delay_ms = | 228 audio_receiver_config.rtp_max_delay_ms = |
229 audio_sender_config.target_playout_delay.InMilliseconds(); | 229 audio_sender_config.target_playout_delay.InMilliseconds(); |
230 | 230 |
231 // Video sender config. | 231 // Video sender config. |
232 VideoSenderConfig video_sender_config = GetDefaultVideoSenderConfig(); | 232 VideoSenderConfig video_sender_config = GetDefaultVideoSenderConfig(); |
233 video_sender_config.max_bitrate = 4000000; | 233 video_sender_config.max_bitrate = 2500000; |
234 video_sender_config.min_bitrate = 2000000; | 234 video_sender_config.min_bitrate = 2000000; |
235 video_sender_config.start_bitrate = 4000000; | 235 video_sender_config.start_bitrate = 2000000; |
236 video_sender_config.target_playout_delay = | 236 video_sender_config.target_playout_delay = |
237 base::TimeDelta::FromMilliseconds(kTargetDelay); | 237 base::TimeDelta::FromMilliseconds(kTargetDelay); |
238 | 238 |
239 // Video receiver config. | 239 // Video receiver config. |
240 FrameReceiverConfig video_receiver_config = | 240 FrameReceiverConfig video_receiver_config = |
241 GetDefaultVideoReceiverConfig(); | 241 GetDefaultVideoReceiverConfig(); |
242 video_receiver_config.rtp_max_delay_ms = | 242 video_receiver_config.rtp_max_delay_ms = |
243 video_sender_config.target_playout_delay.InMilliseconds(); | 243 video_sender_config.target_playout_delay.InMilliseconds(); |
244 | 244 |
245 // Loopback transport. | 245 // Loopback transport. |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 values.SetBoolean("sim", true); | 511 values.SetBoolean("sim", true); |
512 values.SetString("sim-id", sim_id); | 512 values.SetString("sim-id", sim_id); |
513 | 513 |
514 std::string extra_data; | 514 std::string extra_data; |
515 base::JSONWriter::Write(&values, &extra_data); | 515 base::JSONWriter::Write(&values, &extra_data); |
516 | 516 |
517 // Run. | 517 // Run. |
518 media::cast::RunSimulation(source_path, output_path, extra_data, model); | 518 media::cast::RunSimulation(source_path, output_path, extra_data, model); |
519 return 0; | 519 return 0; |
520 } | 520 } |
OLD | NEW |