validate:launcher: Handle issue with unknown framerate in HLS while transcoding

This commit is contained in:
Thibault Saunier 2014-02-13 15:33:25 +01:00
parent c3adb05b2a
commit 0449817c11
3 changed files with 16 additions and 4 deletions

View file

@ -127,7 +127,8 @@ class GESRenderTest(GESTest):
if not utils.isuri(self.dest_file):
self.dest_file = utils.path2url(self.dest_file)
profile = utils.get_profile(self.combination)
profile = utils.get_profile(self.combination,
video_restriction="video/x-raw,format=I420")
self.add_arguments("-f", profile, "-o", self.dest_file)
def check_results(self):

View file

@ -113,6 +113,11 @@ G_V_SCENARIOS = {Protocols.FILE: ["play_15s",
"seek_backward"],
}
G_V_PROTOCOL_VIDEO_RESTRICTION_CAPS = {
# Handle the unknown framerate in HLS samples
Protocols.HLS: "video/x-raw,framerate=25/1"
}
G_V_BLACKLISTED_TESTS = \
[("validate.hls.playback.fast_forward.*",
"https://bugzilla.gnome.org/show_bug.cgi?id=698155"),
@ -206,7 +211,12 @@ class GstValidateTranscodingTest(GstValidateTest):
if urlparse.urlparse(self.dest_file).scheme == "":
self.dest_file = path2url(self.dest_file)
profile = get_profile(self.combination)
try:
video_restriction = G_V_PROTOCOL_VIDEO_RESTRICTION_CAPS[self.file_infos.get("file-info", "protocol")]
except KeyError:
video_restriction = None
profile = get_profile(self.combination, video_restriction=video_restriction)
self.add_arguments("-o", profile)
def build_arguments(self):

View file

@ -194,11 +194,12 @@ def get_profile_full(muxer, venc, aenc, video_restriction=None,
return ret.replace("::", ":")
def get_profile(combination):
def get_profile(combination, video_restriction=None, audio_restriction=None):
return get_profile_full(FORMATS[combination.container],
FORMATS[combination.vcodec],
FORMATS[combination.acodec],
video_restriction="video/x-raw,format=I420")
video_restriction=video_restriction,
audio_restriction=audio_restriction)
##################################################
# Some utilities to parse gst-validate output #