validate: Launcher: Add support for the dash protocol
authorThibault Saunier <tsaunier@gnome.org>
Sat, 9 Aug 2014 14:34:09 +0000 (16:34 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Tue, 12 Aug 2014 11:16:43 +0000 (13:16 +0200)
And make sure that the HTTP server is started if it is needed to serve
some HLS or DASH streams

validate/tools/launcher/apps/gst-validate.py
validate/tools/launcher/utils.py

index 9ef6f1e..5e041c9 100644 (file)
@@ -52,9 +52,11 @@ AUDIO_ONLY_FILE_TRANSCODING_RATIO = 5
 """
 Some info about protocols and how to handle them
 """
-GST_VALIDATE_CAPS_TO_PROTOCOL = [("application/x-hls", Protocols.HLS)]
+GST_VALIDATE_CAPS_TO_PROTOCOL = [("application/x-hls", Protocols.HLS),
+                                 ("application/dash+xml", Protocols.DASH)]
 GST_VALIDATE_PROTOCOL_TIMEOUTS = {Protocols.HTTP: 120,
-                                  Protocols.HLS: 240}
+                                  Protocols.HLS: 240,
+                                  Protocols.DASH: 240}
 
 
 class GstValidateMediaCheckTestsGenerator(GstValidateTestsGenerator):
@@ -553,7 +555,7 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""")
                 protocol = test.media_descriptor.get_protocol()
                 uri = test.media_descriptor.get_uri()
 
-                if protocol == Protocols.HTTP and \
+                if protocol in [Protocols.HTTP, Protocols.HLS, Protocols.DASH] and \
                     "127.0.0.1:%s" % (self.options.http_server_port) in uri:
                     return True
         return False
index 03cddef..d1afe91 100644 (file)
@@ -49,6 +49,7 @@ class Protocols(object):
     HTTP = "http"
     FILE = "file"
     HLS = "hls"
+    DASH = "dash"
 
 
 class Colors(object):