validate: launcher: Add debug message and fix typo

Add messages to clearly see why test was excluded.
And fix typo prerrol

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3940>
This commit is contained in:
ekwange 2020-02-20 22:27:06 +09:00 committed by GStreamer Marge Bot
parent 147eb44149
commit 248044329c
2 changed files with 13 additions and 7 deletions

View file

@ -466,12 +466,13 @@ class GstValidatePlaybinTestsGenerator(GstValidatePipelineTestsGenerator):
for scenario in special_scenarios + scenarios:
cpipe = pipe
if not minfo.media_descriptor.is_compatible(scenario):
continue
cpipe = self._set_sinks(minfo, cpipe, scenario)
fname = self._get_name(scenario, protocol, minfo)
if not minfo.media_descriptor.is_compatible(scenario):
self.debug("Skipping (media descriptor is not compatible): %s", fname)
continue
self.debug("Adding: %s", fname)
if scenario.does_reverse_playback() and protocol == Protocols.HTTP:
@ -490,6 +491,7 @@ class GstValidatePlaybinTestsGenerator(GstValidatePipelineTestsGenerator):
rtspminfo = NamedDic({"path": minfo.media_descriptor.get_path(),
"media_descriptor": GstValidateRTSPMediaDescriptor(minfo.media_descriptor.get_path())})
if not rtspminfo.media_descriptor.is_compatible(scenario):
self.debug("Skipping (media descriptor is not compatible for rtsp test): %s", fname)
continue
cpipe = self._set_sinks(rtspminfo, "%s uri=rtsp://127.0.0.1:<RTSPPORTNUMBER>/test"
@ -989,7 +991,7 @@ class GstValidateRTSPMediaDescriptor(GstValidateMediaDescriptor):
def get_protocol(self):
return Protocols.RTSP
def prerrols(self):
def prerolls(self):
return False

View file

@ -2631,7 +2631,7 @@ class MediaDescriptor(Loggable):
def can_play_reverse(self):
raise NotImplemented
def prerrols(self):
def prerolls(self):
return True
def is_compatible(self, scenario):
@ -2649,6 +2649,8 @@ class MediaDescriptor(Loggable):
return False
if not self.can_play_reverse() and scenario.does_reverse_playback():
self.debug("Do not run %s as %s can not play reverse ",
scenario, self.get_uri())
return False
if not self.is_live() and scenario.needs_live_content():
@ -2661,7 +2663,9 @@ class MediaDescriptor(Loggable):
scenario, self.get_uri())
return False
if not self.prerrols() and getattr(scenario, 'needs_preroll', False):
if not self.prerolls() and getattr(scenario, 'needs_preroll', False):
self.debug("Do not run %s as %s does not support preroll",
scenario, self.get_uri())
return False
if self.get_duration() and self.get_duration() / GST_SECOND < scenario.get_min_media_duration():
@ -2674,7 +2678,7 @@ class MediaDescriptor(Loggable):
for track_type in ['audio', 'subtitle', 'video']:
if self.get_num_tracks(track_type) < scenario.get_min_tracks(track_type):
self.debug("%s -- %s | At least %s %s track needed < %s"
self.debug("Do not run %s -- %s | At least %s %s track needed < %s"
% (scenario, self.get_uri(), track_type,
scenario.get_min_tracks(track_type),
self.get_num_tracks(track_type)))