From 8a6ee4841b0b0a167a06525091ec05282297c746 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 24 Sep 2019 14:23:49 -0300 Subject: [PATCH] validate: Add vp9 transcoding tests Making sure to encode small frames as vp9enc is slow. --- validate/launcher/apps/gstvalidate.py | 6 +++++- validate/launcher/baseclasses.py | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/validate/launcher/apps/gstvalidate.py b/validate/launcher/apps/gstvalidate.py index c73211dbe6..02c61f5578 100644 --- a/validate/launcher/apps/gstvalidate.py +++ b/validate/launcher/apps/gstvalidate.py @@ -122,13 +122,15 @@ class GstValidateTranscodingTestsGenerator(GstValidateTestsGenerator): if protocol == Protocols.RTSP: continue + options = self.test_manager.options for comb in self.test_manager.get_encoding_formats(): classname = "%s.transcode.to_%s.%s" % (mediainfo.media_descriptor.get_protocol(), str(comb).replace( ' ', '_'), mediainfo.media_descriptor.get_clean_name()) + self.add_test(GstValidateTranscodingTest(classname, - self.test_manager.options, + options, self.test_manager.reporter, comb, uri, @@ -1114,6 +1116,8 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""") self.add_encoding_formats([ MediaFormatCombination("ogg", "vorbis", "theora"), MediaFormatCombination("webm", "vorbis", "vp8"), + MediaFormatCombination( + "webm", "vorbis", "vp9", video_restriction="video/x-raw,width=320,height=240"), MediaFormatCombination("mp4", "mp3", "h264"), MediaFormatCombination("mkv", "vorbis", "h264"), ]) diff --git a/validate/launcher/baseclasses.py b/validate/launcher/baseclasses.py index a58d694174..bf33f32ed0 100644 --- a/validate/launcher/baseclasses.py +++ b/validate/launcher/baseclasses.py @@ -1196,6 +1196,10 @@ class GstValidateEncodingTestInterface(object): def get_profile(self, video_restriction=None, audio_restriction=None): vcaps = self.combination.get_video_caps() acaps = self.combination.get_audio_caps() + if video_restriction is None: + video_restriction = self.combination.video_restriction + if audio_restriction is None: + audio_restriction = self.combination.audio_restriction if self.media_descriptor is not None: if self.media_descriptor.get_num_tracks("video") == 0: vcaps = None @@ -2614,7 +2618,7 @@ class MediaFormatCombination(object): def __str__(self): return "%s and %s in %s" % (self.audio, self.video, self.container) - def __init__(self, container, audio, video): + def __init__(self, container, audio, video, duration_factor=1, video_restriction=None, audio_restriction=None): """ Describes a media format to be used for transcoding tests. @@ -2625,6 +2629,8 @@ class MediaFormatCombination(object): self.container = container self.audio = audio self.video = video + self.video_restriction = video_restriction + self.audio_restriction = audio_restriction def get_caps(self, track_type): try: