2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 # The script launches mandoline to test the mojo media renderer.
14 root_path
= os
.path
.realpath(
17 os
.path
.realpath(__file__
)),
23 def _BuildCommand(args
):
24 build_dir
= os
.path
.join(root_path
, args
.build_dir
)
26 runner
= [os
.path
.join(build_dir
, "mandoline")]
28 options
= ["--enable-mojo-media-renderer"]
30 options
.append("--vmodule=pipeline*=3,*renderer_impl*=3,"
31 "*mojo_demuxer*=3,mojo*service=3")
33 full_command
= runner
+ options
+ [args
.url
]
42 parser
= argparse
.ArgumentParser(
43 description
="View a URL with Mandoline with mojo media renderer. "
44 "You must have built //mandoline, //components/html_viewer, "
45 "//mojo, //mojo/services/network and //media/mojo/services "
49 help="Path to the dir containing the linux-x64 binaries relative to the "
50 "repo root (default: %(default)s)",
51 default
="out/Release")
52 parser
.add_argument("--verbose", help="Increase output verbosity.",
54 parser
.add_argument("url", help="The URL to be viewed")
56 args
= parser
.parse_args()
57 return subprocess
.call(_BuildCommand(args
))
59 if __name__
== '__main__':