mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
validate:launcher: Do not run scenarios that need prerolling on RTSP stream
This commit is contained in:
parent
b9774b14b5
commit
37de89e6db
6 changed files with 14 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
description, seek=true, handles-states=true
|
description, seek=true, handles-states=true, needs_preroll=true
|
||||||
pause, playback-time=0.0
|
pause, playback-time=0.0
|
||||||
seek, playback-time=0.0, start="duration - 0.5", flags=accurate+flush
|
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
|
seek, playback-time=0.0, start=position-0.1, repeat="min(10, (duration - 0.6))/0.1", flags=accurate+flush
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
description, seek=true, handles-states=true
|
description, seek=true, handles-states=true, needs_preroll=true
|
||||||
pause, playback-time=0.0
|
pause, playback-time=0.0
|
||||||
seek, playback-time=0.0, start="duration - 0.5", flags=accurate+flush
|
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
|
seek, playback-time=0.0, start=position-0.1, repeat="(duration - 0.6)/0.1", flags=accurate+flush
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
description, seek=true, handles-states=true
|
description, seek=true, handles-states=true, needs_preroll=true
|
||||||
pause, playback-time=0.0
|
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
|
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
|
play, playback-time=0.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
description, seek=true, handles-states=true
|
description, seek=true, handles-states=true, needs_preroll=true
|
||||||
pause, playback-time=0.0
|
pause, playback-time=0.0
|
||||||
seek, playback-time=0.0, start=position+0.1, repeat="(duration - 0.5)/0.1", flags=accurate+flush
|
seek, playback-time=0.0, start=position+0.1, repeat="(duration - 0.5)/0.1", flags=accurate+flush
|
||||||
play, playback-time=0.0
|
play, playback-time=0.0
|
||||||
|
|
|
@ -698,6 +698,9 @@ class GstValidateRTSPMediaDesciptor(GstValidateMediaDescriptor):
|
||||||
def get_protocol(self):
|
def get_protocol(self):
|
||||||
return Protocols.RTSP
|
return Protocols.RTSP
|
||||||
|
|
||||||
|
def prerrols(self):
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class GstValidateTestManager(GstValidateBaseTestManager):
|
class GstValidateTestManager(GstValidateBaseTestManager):
|
||||||
|
|
||||||
|
|
|
@ -1695,7 +1695,7 @@ class Scenario(object):
|
||||||
|
|
||||||
def does_reverse_playback(self):
|
def does_reverse_playback(self):
|
||||||
if hasattr(self, "reverse_playback"):
|
if hasattr(self, "reverse_playback"):
|
||||||
return bool(self.seek)
|
return bool(self.reverse_playback)
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -1901,6 +1901,9 @@ class MediaDescriptor(Loggable):
|
||||||
def can_play_reverse(self):
|
def can_play_reverse(self):
|
||||||
raise NotImplemented
|
raise NotImplemented
|
||||||
|
|
||||||
|
def prerrols(self):
|
||||||
|
return True
|
||||||
|
|
||||||
def is_compatible(self, scenario):
|
def is_compatible(self, scenario):
|
||||||
if scenario is None:
|
if scenario is None:
|
||||||
return True
|
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())
|
self.debug("Do not run %s as %s is a live content", scenario, self.get_uri())
|
||||||
return False
|
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():
|
if self.get_duration() and self.get_duration() / GST_SECOND < scenario.get_min_media_duration():
|
||||||
self.debug(
|
self.debug(
|
||||||
"Do not run %s as %s is too short (%i < min media duation : %i",
|
"Do not run %s as %s is too short (%i < min media duation : %i",
|
||||||
|
|
Loading…
Reference in a new issue