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

Side by Side Diff: webrtc/examples/androidapp/start_loopback_stubbed_camera_saved_video_out.py

Issue 2502783005: Better delete of file in loopback script (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | 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 (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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698