diff --git a/validate/tools/launcher/apps/gst-validate.py b/validate/tools/launcher/apps/gst-validate.py index d3448cee90..38103b9643 100644 --- a/validate/tools/launcher/apps/gst-validate.py +++ b/validate/tools/launcher/apps/gst-validate.py @@ -362,7 +362,7 @@ class GstValidateTranscodingTest(GstValidateTest): if urlparse.urlparse(self.dest_file).scheme == "": self.dest_file = path2url(self.dest_file) - profile = get_profile(self.combination) + profile = get_profile(self.combination, self.media_descriptor) self.add_arguments("-o", profile) def build_arguments(self): diff --git a/validate/tools/launcher/utils.py b/validate/tools/launcher/utils.py index 8c2fec83b9..ffe19de073 100644 --- a/validate/tools/launcher/utils.py +++ b/validate/tools/launcher/utils.py @@ -18,9 +18,9 @@ # Boston, MA 02110-1301, USA. """ Some utilies. """ -import sys import os import re +import sys import urllib import loggable import urlparse @@ -223,10 +223,19 @@ def get_profile_full(muxer, venc, aenc, video_restriction=None, return ret.replace("::", ":") -def get_profile(combination, video_restriction=None, audio_restriction=None): +def get_profile(combination, media_descriptor=None, video_restriction=None, audio_restriction=None): + vcaps = FORMATS[combination.vcodec] + acaps = FORMATS[combination.acodec] + if media_descriptor is not None: + if media_descriptor.get_num_tracks("video") == 0: + vcaps = None + + if media_descriptor.get_num_tracks("audio") == 0: + acaps = None + return get_profile_full(FORMATS[combination.container], - FORMATS[combination.vcodec], - FORMATS[combination.acodec], + vcaps, + acaps, video_restriction=video_restriction, audio_restriction=audio_restriction)