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

Unified Diff: media/mojo/scripts/run_mojo_media_renderer.py

Issue 991963003: Add script to run/test the mojo media renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/scripts/run_mojo_media_renderer.py
diff --git a/mojo/services/html_viewer/view_url.py b/media/mojo/scripts/run_mojo_media_renderer.py
similarity index 60%
copy from mojo/services/html_viewer/view_url.py
copy to media/mojo/scripts/run_mojo_media_renderer.py
index a543385e5aea4c59531f350d30699165e9de9f68..f084ac09584484fca8184bbef2691aefe4f9d24a 100755
--- a/mojo/services/html_viewer/view_url.py
+++ b/media/mojo/scripts/run_mojo_media_renderer.py
@@ -2,6 +2,12 @@
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+#
+# The script follows mojo/services/html_viewer/view_url.py and modified it for
+# test the mojo media renderer. The page will be rendered in a windowless mode.
+#
+# TODO(xhwang): Explore the possibility of running this with the Kiosk window
+# manager.
import argparse
import os
@@ -27,21 +33,22 @@ def _BuildShellCommand(args):
options.append(
"--origin=https://storage.googleapis.com/mojo/services/linux-x64/%s" %
sdk_version)
- options.append("--url-mappings=mojo:html_viewer=file://%s/html_viewer.mojo" %
- build_dir)
- options.append('--args-for=mojo:kiosk_wm %s' % args.url)
+ options.append("--url-mappings=mojo:html_viewer=file://%s/html_viewer.mojo,"
+ "mojo:media=file://%s/media.mojo" % (build_dir, build_dir))
+ options.append("--args-for=mojo:html_viewer --enable-mojo-media-renderer "
+ "--vmodule=pipeline*=3,*renderer_impl*=3,*mojo_demuxer*=3")
xhwang 2015/03/09 18:23:41 Probably we should make this another parameter for
DaleCurtis 2015/03/09 18:29:05 How about adding a single --verbose argument to th
xhwang 2015/03/09 20:03:06 Done.
- app_to_run = "mojo:kiosk_wm"
-
- return shell_command + options + [app_to_run]
+ full_command = shell_command + options + [args.url]
+ print full_command
xhwang 2015/03/09 18:23:42 I found this helpful in debugging :)
+ return full_command
def main():
parser = argparse.ArgumentParser(
- description="View a URL with HTMLViewer in the Kiosk window manager. "
- "You must have built //mojo/services/html_viewer and "
- "//mojo/services/network first. Note that this will "
- "currently often fail spectacularly due to lack of binary "
- "stability in Mojo.")
+ description="View a URL with HTMLViewer with mojo media renderer. "
+ "You must have built //mojo/services/html_viewer, "
+ "//mojo/services/network and //media/mojo/services first. "
+ " Note that this will currently often fail spectacularly due "
+ " to lack of binary stability in Mojo.")
parser.add_argument(
"--build-dir",
help="Path to the dir containing the linux-x64 binaries relative to the "
« 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