validate: Add vp9 transcoding tests

Making sure to encode small frames as vp9enc is slow.
This commit is contained in:
Thibault Saunier 2019-09-24 14:23:49 -03:00
parent 4f0bfcc7bb
commit 8a6ee4841b
2 changed files with 12 additions and 2 deletions

View file

@ -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"),
])

View file

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