mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
validate: launcher: Force clock syncronization for some scenarios
In some cases it is necessary that the clock is sync so that all the actions can be executed.
This commit is contained in:
parent
40003689df
commit
386b572066
7 changed files with 27 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
description, duration=0, summary="Set state to NULL->PLAYING->NULL 20 times"
|
||||
description, duration=0, summary="Set state to NULL->PLAYING->NULL 20 times", need-clock-sync=true
|
||||
set-state, state="null"
|
||||
set-state, state="playing"
|
||||
set-state, state="null"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
description, duration=30.0, minfo-media-duration=310.0, seek=true, reverse-playback=true
|
||||
description, duration=30.0, minfo-media-duration=310.0, seek=true, reverse-playback=true, need-clock-sync=true
|
||||
seek, name=Fast-backward-seek, playback_time=0.0, rate=-2.0, start=0.0, stop=310.0, flags=accurate+flush
|
||||
seek, name=Fast-backward-seek, playback_time=300.0, rate=-4.0, start=0.0, stop=300.0, flags=accurate+flush
|
||||
seek, name=Fast-backward-seek, playback_time=280.0, rate=-8.0, start=0.0, stop=280.0, flags=accurate+flush
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
description, duration=35.0, seek=true
|
||||
description, duration=35.0, seek=true, need-clock-sync=true
|
||||
seek, name=Fast-forward-seek, playback_time=0.0, rate=2.0, start=0.0, flags=accurate+flush
|
||||
seek, name=Fast-forward-seek, playback_time="min(10.0, duration*0.25)", rate=4.0, start=0.0, flags=accurate+flush
|
||||
seek, name=Fast-forward-seek, playback_time="min(20.0, duration*0.50)", rate=8.0, start=0.0, flags=accurate+flush
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
description, seek=true, duration=30
|
||||
description, seek=true, duration=30, need-clock-sync=true
|
||||
seek, name=Backward-seek, playback_time="min(5.0, (duration/4))", rate=1.0, start=0.0, flags=accurate+flush
|
||||
seek, name=Backward-seek, playback_time="min(10.0, 2*(duration/4))", rate=1.0, start="min(5.0, duration/4)", flags=accurate+flush
|
||||
seek, name=Backward-seek, playback_time="min(15.0, 3*(duration/4))", rate=1.0, start="min(10.0, 2*(duration/4))", flags=accurate+flush
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
description, seek=true, duration=20
|
||||
description, seek=true, duration=20, need-clock-sync=true
|
||||
seek, name=First-forward-seek, playback_time="min(5.0, (duration/8))", start="min(10, 2*(duration/8))", flags=accurate+flush
|
||||
seek, name=Second-forward-seek, playback_time="min(15.0, 3*(duration/8))", start="min(20, 4*(duration/8))", flags=accurate+flush
|
||||
seek, name=Third-forward-seek, playback_time="min(25, 5*(duration/8))", start="min(30.0, 6*(duration/8))", flags=accurate+flush
|
||||
|
|
|
@ -161,15 +161,20 @@ class GstValidatePlaybinTestsGenerator(GstValidatePipelineTestsGenerator):
|
|||
pipe = self._pipeline_template
|
||||
protocol = minfo.media_descriptor.get_protocol()
|
||||
|
||||
if self.test_manager.options.mute:
|
||||
fakesink = "'fakesink'"
|
||||
pipe += " audio-sink=%s video-sink=%s" %(fakesink, fakesink)
|
||||
|
||||
pipe += " uri=%s" % uri
|
||||
for scenario in special_scenarios + scenarios:
|
||||
cpipe = pipe
|
||||
if not minfo.media_descriptor.is_compatible(scenario):
|
||||
continue
|
||||
|
||||
if self.test_manager.options.mute:
|
||||
if scenario.needs_clock_sync():
|
||||
fakesink = "'fakesink sync=true'"
|
||||
else:
|
||||
fakesink = "'fakesink'"
|
||||
|
||||
cpipe += " audio-sink=%s video-sink=%s" %(fakesink, fakesink)
|
||||
|
||||
fname = "%s.%s" % (self.get_fname(scenario,
|
||||
protocol),
|
||||
os.path.basename(uri).replace(".", "_"))
|
||||
|
@ -177,12 +182,12 @@ class GstValidatePlaybinTestsGenerator(GstValidatePipelineTestsGenerator):
|
|||
|
||||
if scenario.does_reverse_playback() and protocol == Protocols.HTTP:
|
||||
# 10MB so we can reverse playback
|
||||
pipe += " ring-buffer-max-size=10485760"
|
||||
cpipe += " ring-buffer-max-size=10485760"
|
||||
|
||||
self.add_test(GstValidateLaunchTest(fname,
|
||||
self.test_manager.options,
|
||||
self.test_manager.reporter,
|
||||
pipe,
|
||||
cpipe,
|
||||
scenario=scenario,
|
||||
media_descriptor=minfo.media_descriptor)
|
||||
)
|
||||
|
|
|
@ -849,6 +849,12 @@ class Scenario(object):
|
|||
|
||||
return False
|
||||
|
||||
def needs_clock_sync(self):
|
||||
if hasattr(self, "need_clock_sync"):
|
||||
return bool(self.need_clock_sync)
|
||||
|
||||
return False
|
||||
|
||||
def does_reverse_playback(self):
|
||||
if hasattr(self, "reverse_playback"):
|
||||
return bool(self.seek)
|
||||
|
@ -1032,6 +1038,11 @@ class MediaDescriptor(Loggable):
|
|||
scenario, self.get_uri())
|
||||
return False
|
||||
|
||||
if self.is_image() and scenario.needs_clock_sync():
|
||||
self.debug("Do not run %s as %s is an image",
|
||||
scenario, self.get_uri())
|
||||
return False
|
||||
|
||||
for track_type in ['audio', 'subtitle']:
|
||||
if self.get_num_tracks(track_type) < scenario.get_min_tracks(track_type):
|
||||
self.debug("%s -- %s | At least %s %s track needed < %s"
|
||||
|
|
Loading…
Reference in a new issue