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

Side by Side Diff: build/android/screenshot.py

Issue 109553002: [Telemetry] Make StartVideoCapture start capturing synchronously. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: skyostil comments Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Takes a screenshot or a screen video capture from an Android device.""" 7 """Takes a screenshot or a screen video capture from an Android device."""
8 8
9 import logging 9 import logging
10 import optparse 10 import optparse
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if options.verbose: 70 if options.verbose:
71 logging.getLogger().setLevel(logging.DEBUG) 71 logging.getLogger().setLevel(logging.DEBUG)
72 72
73 if not options.device and len(android_commands.GetAttachedDevices()) > 1: 73 if not options.device and len(android_commands.GetAttachedDevices()) > 1:
74 parser.error('Multiple devices are attached. ' 74 parser.error('Multiple devices are attached. '
75 'Please specify device serial number with --device.') 75 'Please specify device serial number with --device.')
76 76
77 if len(args) > 1: 77 if len(args) > 1:
78 parser.error('Too many positional arguments.') 78 parser.error('Too many positional arguments.')
79 host_file = args[0] if args else options.file 79 host_file = args[0] if args else options.file
80 adb = android_commands.AndroidCommands(options.device) 80 adb = android_commands.AndroidCommands(options.device, api_strict_mode=True)
81 81
82 if options.video: 82 if options.video:
83 _CaptureVideo(adb, host_file, options) 83 _CaptureVideo(adb, host_file, options)
84 else: 84 else:
85 _CaptureScreenshot(adb, host_file) 85 _CaptureScreenshot(adb, host_file)
86 return 0 86 return 0
87 87
88 88
89 if __name__ == '__main__': 89 if __name__ == '__main__':
90 sys.exit(main()) 90 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/screenshot.py ('k') | tools/telemetry/telemetry/core/platform/android_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698