diff --git a/validate/data/scenarios/scrub_backward_seeking.scenario b/validate/data/scenarios/scrub_backward_seeking.scenario index b48ce34845..f2791943ed 100644 --- a/validate/data/scenarios/scrub_backward_seeking.scenario +++ b/validate/data/scenarios/scrub_backward_seeking.scenario @@ -1,4 +1,4 @@ -description, seek=true, handles-states=true +description, seek=true, handles-states=true, needs_preroll=true pause, playback-time=0.0 seek, playback-time=0.0, start="duration - 0.5", flags=accurate+flush seek, playback-time=0.0, start=position-0.1, repeat="min(10, (duration - 0.6))/0.1", flags=accurate+flush diff --git a/validate/data/scenarios/scrub_backward_seeking_full.scenario b/validate/data/scenarios/scrub_backward_seeking_full.scenario index a37a29e13c..74e67fa492 100644 --- a/validate/data/scenarios/scrub_backward_seeking_full.scenario +++ b/validate/data/scenarios/scrub_backward_seeking_full.scenario @@ -1,4 +1,4 @@ -description, seek=true, handles-states=true +description, seek=true, handles-states=true, needs_preroll=true pause, playback-time=0.0 seek, playback-time=0.0, start="duration - 0.5", flags=accurate+flush seek, playback-time=0.0, start=position-0.1, repeat="(duration - 0.6)/0.1", flags=accurate+flush diff --git a/validate/data/scenarios/scrub_forward_seeking.scenario b/validate/data/scenarios/scrub_forward_seeking.scenario index e7b16ffad0..eb8c66c3b1 100644 --- a/validate/data/scenarios/scrub_forward_seeking.scenario +++ b/validate/data/scenarios/scrub_forward_seeking.scenario @@ -1,4 +1,4 @@ -description, seek=true, handles-states=true +description, seek=true, handles-states=true, needs_preroll=true pause, playback-time=0.0 seek, playback-time=0.0, start=position+0.1, repeat="min(10, (duration - 0.5))/0.1", flags=accurate+flush play, playback-time=0.0 diff --git a/validate/data/scenarios/scrub_forward_seeking_full.scenario b/validate/data/scenarios/scrub_forward_seeking_full.scenario index 4e3b543182..6cbce986bc 100644 --- a/validate/data/scenarios/scrub_forward_seeking_full.scenario +++ b/validate/data/scenarios/scrub_forward_seeking_full.scenario @@ -1,4 +1,4 @@ -description, seek=true, handles-states=true +description, seek=true, handles-states=true, needs_preroll=true pause, playback-time=0.0 seek, playback-time=0.0, start=position+0.1, repeat="(duration - 0.5)/0.1", flags=accurate+flush play, playback-time=0.0 diff --git a/validate/launcher/apps/gstvalidate.py b/validate/launcher/apps/gstvalidate.py index 13907d7646..c16a80ef78 100644 --- a/validate/launcher/apps/gstvalidate.py +++ b/validate/launcher/apps/gstvalidate.py @@ -698,6 +698,9 @@ class GstValidateRTSPMediaDesciptor(GstValidateMediaDescriptor): def get_protocol(self): return Protocols.RTSP + def prerrols(self): + return False + class GstValidateTestManager(GstValidateBaseTestManager): diff --git a/validate/launcher/baseclasses.py b/validate/launcher/baseclasses.py index 6e8e9f33e7..74f8f8544f 100644 --- a/validate/launcher/baseclasses.py +++ b/validate/launcher/baseclasses.py @@ -1695,7 +1695,7 @@ class Scenario(object): def does_reverse_playback(self): if hasattr(self, "reverse_playback"): - return bool(self.seek) + return bool(self.reverse_playback) return False @@ -1901,6 +1901,9 @@ class MediaDescriptor(Loggable): def can_play_reverse(self): raise NotImplemented + def prerrols(self): + return True + def is_compatible(self, scenario): if scenario is None: return True @@ -1927,6 +1930,9 @@ class MediaDescriptor(Loggable): self.debug("Do not run %s as %s is a live content", scenario, self.get_uri()) return False + if not self.prerrols() and getattr(scenario, 'needs_preroll', False): + return False + if self.get_duration() and self.get_duration() / GST_SECOND < scenario.get_min_media_duration(): self.debug( "Do not run %s as %s is too short (%i < min media duation : %i",