OLD | NEW |
1 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 from optparse import OptionParser | 9 from optparse import OptionParser |
10 import random | 10 import random |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 videooutsave = options.videooutsave | 68 videooutsave = options.videooutsave |
69 | 69 |
70 call_length = options.call_length or 10 | 70 call_length = options.call_length or 10 |
71 | 71 |
72 room = ''.join(random.choice(string.ascii_letters + string.digits) | 72 room = ''.join(random.choice(string.ascii_letters + string.digits) |
73 for _ in range(8)) | 73 for _ in range(8)) |
74 | 74 |
75 # Delete output video file. | 75 # Delete output video file. |
76 if videoout: | 76 if videoout: |
77 subprocess.check_call(['adb', '-s', devname, 'shell', 'rm', | 77 subprocess.check_call(['adb', '-s', devname, 'shell', 'rm', '-f', |
78 videoout]) | 78 videoout]) |
79 | 79 |
80 device = MonkeyRunner.waitForConnection(2, devname) | 80 device = MonkeyRunner.waitForConnection(2, devname) |
81 | 81 |
82 extras = { | 82 extras = { |
83 'org.appspot.apprtc.USE_VALUES_FROM_INTENT': True, | 83 'org.appspot.apprtc.USE_VALUES_FROM_INTENT': True, |
84 'org.appspot.apprtc.AUDIOCODEC': 'OPUS', | 84 'org.appspot.apprtc.AUDIOCODEC': 'OPUS', |
85 'org.appspot.apprtc.LOOPBACK': True, | 85 'org.appspot.apprtc.LOOPBACK': True, |
86 'org.appspot.apprtc.VIDEOCODEC': 'VP8', | 86 'org.appspot.apprtc.VIDEOCODEC': 'VP8', |
87 'org.appspot.apprtc.CAPTURETOTEXTURE': False, | 87 'org.appspot.apprtc.CAPTURETOTEXTURE': False, |
(...skipping 27 matching lines...) Expand all Loading... |
115 | 115 |
116 if videooutsave: | 116 if videooutsave: |
117 time.sleep(2) | 117 time.sleep(2) |
118 | 118 |
119 subprocess.check_call(['adb', '-s', devname, 'pull', | 119 subprocess.check_call(['adb', '-s', devname, 'pull', |
120 videoout, videooutsave]) | 120 videoout, videooutsave]) |
121 | 121 |
122 if __name__ == '__main__': | 122 if __name__ == '__main__': |
123 main() | 123 main() |
124 | 124 |
OLD | NEW |