Index: tools/telemetry/telemetry/core/platform/__init__.py |
diff --git a/tools/telemetry/telemetry/core/platform/__init__.py b/tools/telemetry/telemetry/core/platform/__init__.py |
index ad5909ce77f453b1f10f63ad35ea04bcc5a6810e..a613de43fda35c075965e8967b467095bbb52314 100644 |
--- a/tools/telemetry/telemetry/core/platform/__init__.py |
+++ b/tools/telemetry/telemetry/core/platform/__init__.py |
@@ -128,6 +128,33 @@ class Platform(object): |
"""Installs the given application.""" |
return self._platform_backend.InstallApplication(application) |
+ def CanCaptureBrowserVideo(self): |
+ """Returns a bool indicating whether the platform supports video capture |
+ of the browser's content. |
+ """ |
+ return self._platform_backend.CanCaptureBrowserVideo() |
+ |
+ def StartBrowserVideoCapture(self, tab, max_bitrate_mbps): |
+ """Starts recording video of the browser's content. |
+ |
+ Outer framing by the OS and browser window is not included. |
+ |
+ Args: |
+ tab: The tab for which to capture. |
+ max_bitrate_mbps: The maximum bitrate in MegaBits Per Second to capture. |
+ There is no guarantee the platform can actually deliver the requested |
+ rate. Must be in range [0.1, 100]. |
szym
2013/11/29 11:05:12
Should webcam capture enforce the bitrate limit as
tonyg
2013/11/29 20:42:07
To your point, max_bitrate seems like it requires
|
+ """ |
+ return self._platform_backend.StartBrowserVideoCapture( |
+ tab, max_bitrate_mbps) |
+ |
+ def StopBrowserVideoCapture(self): |
tonyg
2013/11/29 20:42:07
I changed this to return keyframes instead of all
|
+ """Stops recording browser content video. |
+ |
+ Returns a list of bitmaps representing each video frame. |
+ """ |
+ return self._platform_backend.StopBrowserVideoCapture() |
+ |
def CreatePlatformBackendForCurrentOS(): |
if sys.platform.startswith('linux'): |