mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-16 04:15:51 +00:00
validate:launcher: Use fakevideosink everywhere it makes sense.
This commit is contained in:
parent
8c06862e80
commit
f0cfdf9d14
2 changed files with 21 additions and 16 deletions
|
@ -217,11 +217,8 @@ class GstValidatePipelineTestsGenerator(GstValidateTestsGenerator):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if self.test_manager.options.mute:
|
if self.test_manager.options.mute:
|
||||||
if scenario and scenario.needs_clock_sync():
|
audiosink = self.get_fakesink_for_media_type("audio", needs_clock)
|
||||||
audiosink = "fakesink sync=true"
|
videosink = self.get_fakesink_for_media_type("video", needs_clock)
|
||||||
videosink = "fakesink sync=true qos=true max-lateness=20000000"
|
|
||||||
else:
|
|
||||||
audiosink = videosink = "fakesink"
|
|
||||||
else:
|
else:
|
||||||
audiosink = 'autoaudiosink'
|
audiosink = 'autoaudiosink'
|
||||||
videosink = 'autovideosink'
|
videosink = 'autovideosink'
|
||||||
|
@ -257,14 +254,11 @@ class GstValidatePlaybinTestsGenerator(GstValidatePipelineTestsGenerator):
|
||||||
|
|
||||||
def _set_sinks(self, minfo, pipe_str, scenario):
|
def _set_sinks(self, minfo, pipe_str, scenario):
|
||||||
if self.test_manager.options.mute:
|
if self.test_manager.options.mute:
|
||||||
if scenario.needs_clock_sync() or \
|
needs_clock = scenario.needs_clock_sync() or minfo.media_descriptor.need_clock_sync()
|
||||||
minfo.media_descriptor.need_clock_sync():
|
|
||||||
afakesink = "'fakesink sync=true'"
|
|
||||||
vfakesink = "'fakesink sync=true qos=true max-lateness=20000000'"
|
|
||||||
else:
|
|
||||||
vfakesink = afakesink = "'fakesink'"
|
|
||||||
|
|
||||||
pipe_str += " audio-sink=%s video-sink=%s" % (
|
afakesink = self.get_fakesink_for_media_type("audio", needs_clock)
|
||||||
|
vfakesink = self.get_fakesink_for_media_type("video", needs_clock)
|
||||||
|
pipe_str += " audio-sink='%s' video-sink='%s'" % (
|
||||||
afakesink, vfakesink)
|
afakesink, vfakesink)
|
||||||
|
|
||||||
return pipe_str
|
return pipe_str
|
||||||
|
@ -403,10 +397,8 @@ class GstValidateMixerTestsGenerator(GstValidatePipelineTestsGenerator):
|
||||||
self.debug("Adding: %s", fname)
|
self.debug("Adding: %s", fname)
|
||||||
|
|
||||||
if self.test_manager.options.mute:
|
if self.test_manager.options.mute:
|
||||||
if scenario.needs_clock_sync():
|
pipe_arguments["sink"] = self.get_fakesink_for_media_type(self.media_type,
|
||||||
pipe_arguments["sink"] = "fakesink sync=true"
|
scenario.needs_clock_sync())
|
||||||
else:
|
|
||||||
pipe_arguments["sink"] = "'fakesink'"
|
|
||||||
else:
|
else:
|
||||||
pipe_arguments["sink"] = "auto%ssink" % self.media_type
|
pipe_arguments["sink"] = "auto%ssink" % self.media_type
|
||||||
|
|
||||||
|
|
|
@ -1370,6 +1370,19 @@ class GstValidateTestsGenerator(TestsGenerator):
|
||||||
def populate_tests(self, uri_minfo_special_scenarios, scenarios):
|
def populate_tests(self, uri_minfo_special_scenarios, scenarios):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_fakesink_for_media_type(media_type, needs_clock=False):
|
||||||
|
if media_type == "video":
|
||||||
|
if needs_clock:
|
||||||
|
return 'fakevideosink qos=true max-lateness=20000000'
|
||||||
|
|
||||||
|
return "fakevideosink sync=false"
|
||||||
|
|
||||||
|
if needs_clock:
|
||||||
|
return "fakesink sync=true"
|
||||||
|
|
||||||
|
return "fakesink"
|
||||||
|
|
||||||
def generate_tests(self, uri_minfo_special_scenarios, scenarios):
|
def generate_tests(self, uri_minfo_special_scenarios, scenarios):
|
||||||
self.populate_tests(uri_minfo_special_scenarios, scenarios)
|
self.populate_tests(uri_minfo_special_scenarios, scenarios)
|
||||||
return super(GstValidateTestsGenerator, self).generate_tests()
|
return super(GstValidateTestsGenerator, self).generate_tests()
|
||||||
|
|
Loading…
Reference in a new issue