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)
This commit is contained in:
Thibault Saunier 2014-07-16 10:09:32 +02:00
parent f925c0c1be
commit 58256ab135

View file

@ -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