From 58256ab135587ff3803c31faaf54c20b4162ab8f Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 16 Jul 2014 10:09:32 +0200 Subject: [PATCH] validate:launcher: Allow transcoding audio only files 5 time longer than long_limit Transcoding audio is a lot shorter so we can concider that transcoding files that are only only is 5 time shorter than the actual file (empirical number) --- validate/tools/launcher/apps/gst-validate.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/validate/tools/launcher/apps/gst-validate.py b/validate/tools/launcher/apps/gst-validate.py index 7e5545c..af4e256 100644 --- a/validate/tools/launcher/apps/gst-validate.py +++ b/validate/tools/launcher/apps/gst-validate.py @@ -47,6 +47,7 @@ if "win32" in sys.platform: G_V_MEDIA_INFO_EXT = "media_info" G_V_STREAM_INFO_EXT = "stream_info" +AUDIO_ONLY_FILE_TRANSCODING_RATIO = 5 ################################################# # API to be used to create testsuites # @@ -399,6 +400,13 @@ class GstValidateTranscodingTest(GstValidateTest): Loggable.__init__(self) file_dur = long(media_descriptor.get_duration()) / GST_SECOND + if not media_descriptor.get_num_tracks("video"): + self.debug("%s audio only file applying transcoding ratio." + "File 'duration' : %s" % (classname , file_dur)) + duration = file_dur / AUDIO_ONLY_FILE_TRANSCODING_RATIO + else: + duration = file_dur + try: timeout = GST_VALIDATE_PROTOCOL_TIMEOUTS[media_descriptor.get_protocol()] except KeyError: @@ -406,7 +414,7 @@ class GstValidateTranscodingTest(GstValidateTest): super(GstValidateTranscodingTest, self).__init__( GST_VALIDATE_TRANSCODING_COMMAND, classname, - options, reporter, duration=file_dur, + options, reporter, duration=duration, timeout=timeout, scenario=scenario) self.media_descriptor = media_descriptor -- 2.7.4