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

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

Issue 1088993004: Update run_mojo_media_renderer.py for shell and service changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary origin and mapping args, broken headless flag; update comments. Created 5 years, 8 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/media/mojo/scripts/run_mojo_media_renderer.py b/media/mojo/scripts/run_mojo_media_renderer.py
index 6ca34dc9dbdb6a59a3ff64d555e23f648825c46c..b98697633faac16825e32e9944011e9435c0cb5b 100755
--- a/media/mojo/scripts/run_mojo_media_renderer.py
+++ b/media/mojo/scripts/run_mojo_media_renderer.py
@@ -3,17 +3,14 @@
# 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 headless mode.
-#
-# TODO(xhwang): Explore the possibility of running this with the Kiosk window
-# manager. See http://crbug.com/467176
+# The script launches mojo_shell to test the mojo media renderer.
import argparse
import os
import subprocess
import sys
+
root_path = os.path.realpath(
os.path.join(
os.path.dirname(
@@ -22,6 +19,7 @@ root_path = os.path.realpath(
os.pardir,
os.pardir))
+
def _BuildShellCommand(args):
sdk_version = subprocess.check_output(["cat",
"third_party/mojo/src/mojo/public/VERSION"], cwd=root_path)
@@ -31,21 +29,11 @@ def _BuildShellCommand(args):
options = []
- 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,"
- "mojo:media=file://%s/media.mojo" % (build_dir, build_dir))
-
- args_for_html_viewer = "--enable-mojo-media-renderer --is-headless "
+ options.append("--enable-mojo-media-renderer")
sky 2015/04/23 19:45:37 nit: I would move to this 30, eg: options = [ "--e
msw 2015/04/23 19:59:02 Done.
if args.verbose:
- args_for_html_viewer += \
- "--vmodule=pipeline*=3,*renderer_impl*=3,*mojo_demuxer*=3"
- options.append("--args-for=mojo:html_viewer %s" % args_for_html_viewer)
-
- if args.verbose:
- args_for_media = "--vmodule=mojo*service=3"
- options.append("--args-for=mojo:media %s" % args_for_media)
+ options.append(
+ "--vmodule=pipeline*=3,*renderer_impl*=3,*mojo_demuxer*=3")
+ options.append("--vmodule=mojo*service=3")
full_command = shell_command + options + [args.url]
@@ -54,10 +42,11 @@ def _BuildShellCommand(args):
return full_command
+
def main():
parser = argparse.ArgumentParser(
description="View a URL with HTMLViewer with mojo media renderer. "
- "You must have built //mojo/services/html_viewer, "
+ "You must have built //components/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.")
@@ -68,8 +57,7 @@ def main():
default="out/Release")
parser.add_argument("--verbose", help="Increase output verbosity.",
action="store_true")
- parser.add_argument("url",
- help="The URL to be viewed")
+ parser.add_argument("url", help="The URL to be viewed")
args = parser.parse_args()
return subprocess.call(_BuildShellCommand(args))
« 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