| OLD | NEW |
| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 while (ip_address != DEFAULT_SEND_IP && | 82 while (ip_address != DEFAULT_SEND_IP && |
| 83 std::count(ip_address.begin(), ip_address.end(), '.') != 3) { | 83 std::count(ip_address.begin(), ip_address.end(), '.') != 3) { |
| 84 ip_address = input.GetStringInput(); | 84 ip_address = input.GetStringInput(); |
| 85 } | 85 } |
| 86 return ip_address; | 86 return ip_address; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void GetAudioSsrcs(FrameReceiverConfig* audio_config) { | 89 void GetAudioSsrcs(FrameReceiverConfig* audio_config) { |
| 90 test::InputBuilder input_tx( | 90 test::InputBuilder input_tx( |
| 91 "Choose audio sender SSRC.", DEFAULT_AUDIO_FEEDBACK_SSRC, 1, INT_MAX); | 91 "Choose audio sender SSRC.", DEFAULT_AUDIO_FEEDBACK_SSRC, 1, INT_MAX); |
| 92 audio_config->feedback_ssrc = input_tx.GetIntInput(); | 92 audio_config->receiver_ssrc = input_tx.GetIntInput(); |
| 93 | 93 |
| 94 test::InputBuilder input_rx( | 94 test::InputBuilder input_rx( |
| 95 "Choose audio receiver SSRC.", DEFAULT_AUDIO_INCOMING_SSRC, 1, INT_MAX); | 95 "Choose audio receiver SSRC.", DEFAULT_AUDIO_INCOMING_SSRC, 1, INT_MAX); |
| 96 audio_config->incoming_ssrc = input_rx.GetIntInput(); | 96 audio_config->sender_ssrc = input_rx.GetIntInput(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void GetVideoSsrcs(FrameReceiverConfig* video_config) { | 99 void GetVideoSsrcs(FrameReceiverConfig* video_config) { |
| 100 test::InputBuilder input_tx( | 100 test::InputBuilder input_tx( |
| 101 "Choose video sender SSRC.", DEFAULT_VIDEO_FEEDBACK_SSRC, 1, INT_MAX); | 101 "Choose video sender SSRC.", DEFAULT_VIDEO_FEEDBACK_SSRC, 1, INT_MAX); |
| 102 video_config->feedback_ssrc = input_tx.GetIntInput(); | 102 video_config->receiver_ssrc = input_tx.GetIntInput(); |
| 103 | 103 |
| 104 test::InputBuilder input_rx( | 104 test::InputBuilder input_rx( |
| 105 "Choose video receiver SSRC.", DEFAULT_VIDEO_INCOMING_SSRC, 1, INT_MAX); | 105 "Choose video receiver SSRC.", DEFAULT_VIDEO_INCOMING_SSRC, 1, INT_MAX); |
| 106 video_config->incoming_ssrc = input_rx.GetIntInput(); | 106 video_config->sender_ssrc = input_rx.GetIntInput(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 #if defined(USE_X11) | 109 #if defined(USE_X11) |
| 110 void GetWindowSize(int* width, int* height) { | 110 void GetWindowSize(int* width, int* height) { |
| 111 // Resolution values based on sender settings | 111 // Resolution values based on sender settings |
| 112 test::InputBuilder input_w( | 112 test::InputBuilder input_w( |
| 113 "Choose window width.", kVideoWindowWidth, 144, 1920); | 113 "Choose window width.", kVideoWindowWidth, 144, 1920); |
| 114 *width = input_w.GetIntInput(); | 114 *width = input_w.GetIntInput(); |
| 115 | 115 |
| 116 test::InputBuilder input_h( | 116 test::InputBuilder input_h( |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |