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

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

Issue 93733002: [Telemetry] Refactoring in preparation for video-based Speed Index support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
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'):

Powered by Google App Engine
This is Rietveld 408576698