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

Unified Diff: tools/telemetry/telemetry/core/platform/android_platform_backend.py

Issue 379443002: Change ownership of video file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head Created 6 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/screenshot.py ('k') | tools/telemetry/telemetry/core/tab_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/android_platform_backend.py
diff --git a/tools/telemetry/telemetry/core/platform/android_platform_backend.py b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
index 43f8c33eeafd46fa51f0d4c4276aeb189b729ee8..01b293077df2496c3255049eaa6cc843c03ef5de 100644
--- a/tools/telemetry/telemetry/core/platform/android_platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
@@ -58,7 +58,6 @@ class AndroidPlatformBackend(
self._powermonitor = android_temperature_monitor.AndroidTemperatureMonitor(
power_controller, device)
self._video_recorder = None
- self._video_output = None
if self._no_performance_mode:
logging.warning('CPU governor will not be set!')
@@ -225,11 +224,10 @@ class AndroidPlatformBackend(
if min_bitrate_mbps > 100:
raise ValueError('Android video capture cannot capture at %dmbps. '
'Max capture rate is 100mbps.' % min_bitrate_mbps)
- self._video_output = tempfile.mkstemp()[1]
if self.is_video_capture_running:
self._video_recorder.Stop()
self._video_recorder = screenshot.VideoRecorder(
- self._device, self._video_output, megabits_per_second=min_bitrate_mbps)
+ self._device, megabits_per_second=min_bitrate_mbps)
self._video_recorder.Start()
util.WaitFor(self._video_recorder.IsStarted, 5)
@@ -240,10 +238,11 @@ class AndroidPlatformBackend(
def StopVideoCapture(self):
assert self.is_video_capture_running, 'Must start video capture first'
self._video_recorder.Stop()
- self._video_recorder.Pull()
+ video_file_obj = tempfile.NamedTemporaryFile()
+ self._video_recorder.Pull(video_file_obj.name)
self._video_recorder = None
- return video.Video(self._video_output)
+ return video.Video(video_file_obj)
def CanMonitorPower(self):
return self._powermonitor.CanMonitorPower()
« no previous file with comments | « build/android/screenshot.py ('k') | tools/telemetry/telemetry/core/tab_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698