mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
validate: Fix usage for non-standard http server port
Translate the various stream_info URI from the standard port to the specified port Make the port option an integer option
This commit is contained in:
parent
0502e6bf5b
commit
1e1475d352
2 changed files with 8 additions and 2 deletions
|
@ -624,6 +624,11 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""")
|
|||
if uri is None:
|
||||
uri = media_descriptor.get_uri()
|
||||
|
||||
# Adjust local http uri
|
||||
if self.options.http_server_port != 8079 and \
|
||||
uri.startswith("http://127.0.0.1:8079/"):
|
||||
uri = uri.replace("http://127.0.0.1:8079/",
|
||||
"http://127.0.0.1:%r/" % self.options.http_server_port, 1)
|
||||
media_descriptor.set_protocol(urlparse.urlparse(uri).scheme)
|
||||
for caps2, prot in GST_VALIDATE_CAPS_TO_PROTOCOL:
|
||||
if caps2 == caps:
|
||||
|
@ -715,7 +720,8 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""")
|
|||
uri = test.media_descriptor.get_uri()
|
||||
|
||||
if protocol in [Protocols.HTTP, Protocols.HLS, Protocols.DASH] and \
|
||||
"127.0.0.1:%s" % (self.options.http_server_port) in uri:
|
||||
"127.0.0.1:%s" % (self.options.http_server_port) in uri or \
|
||||
"127.0.0.1:8079" in uri:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ Note that all testsuite should be inside python modules, so the directory should
|
|||
"Handle the HTTP server to be created")
|
||||
http_server_group.add_argument(
|
||||
"--http-server-port", dest="http_server_port",
|
||||
help="Port on which to run the http server on localhost")
|
||||
help="Port on which to run the http server on localhost", type=int)
|
||||
http_server_group.add_argument(
|
||||
"--http-bandwith-limitation", dest="http_bandwith",
|
||||
help="The artificial bandwith limitation to introduce to the local server (in Bytes/sec) (default: 1 MBps)")
|
||||
|
|
Loading…
Reference in a new issue