def _discover_file(self, uri, fpath):
for ext in (GstValidateMediaDescriptor.MEDIA_INFO_EXT,
- GstValidateMediaDescriptor.PUSH_MEDIA_INFO_EXT):
+ GstValidateMediaDescriptor.PUSH_MEDIA_INFO_EXT,
+ GstValidateMediaDescriptor.SKIPPED_MEDIA_INFO_EXT):
try:
- is_push = False
+ is_push = ext == GstValidateMediaDescriptor.PUSH_MEDIA_INFO_EXT
+ is_skipped = ext == GstValidateMediaDescriptor.SKIPPED_MEDIA_INFO_EXT
media_info = "%s.%s" % (fpath, ext)
- if ext == GstValidateMediaDescriptor.PUSH_MEDIA_INFO_EXT:
+ if is_push or is_skipped:
if not os.path.exists(media_info):
continue
- is_push = True
+
+ if is_push:
uri = "push" + uri
- args = GstValidateBaseTestManager.MEDIA_CHECK_COMMAND.split(" ")
+ args = GstValidateBaseTestManager.MEDIA_CHECK_COMMAND.split(" ")
args.append(uri)
- if os.path.isfile(media_info) and not self.options.update_media_info:
+ if os.path.isfile(media_info) and not self.options.update_media_info and not is_skipped:
self._add_media(media_info, uri)
continue
- elif fpath.endswith(GstValidateMediaDescriptor.STREAM_INFO_EXT):
+ elif fpath.endswith(GstValidateMediaDescriptor.STREAM_INFO_EXT) and not is_skipped:
self._add_media(fpath)
continue
elif not self.options.generate_info and not self.options.update_media_info and not self.options.validate_uris:
include_frames = 1
media_descriptor = GstValidateMediaDescriptor.new_from_uri(
- uri, True, include_frames, is_push)
+ uri, True, include_frames, is_push, is_skipped)
if media_descriptor:
self._add_media(media_descriptor, uri)
else:
class GstValidateMediaDescriptor(MediaDescriptor):
# Some extension file for discovering results
+ SKIPPED_MEDIA_INFO_EXT = "media_info.skipped"
MEDIA_INFO_EXT = "media_info"
PUSH_MEDIA_INFO_EXT = "media_info.push"
STREAM_INFO_EXT = "stream_info"
def __cleanup_media_info_ext(self):
for ext in [self.MEDIA_INFO_EXT, self.PUSH_MEDIA_INFO_EXT, self.STREAM_INFO_EXT,
- ]:
+ self.SKIPPED_MEDIA_INFO_EXT, ]:
if self._xml_path.endswith(ext):
return self._xml_path[:len(self._xml_path) - (len(ext) + 1)]
assert "Not reached" is None
@staticmethod
- def new_from_uri(uri, verbose=False, include_frames=False, is_push=False):
+ def new_from_uri(uri, verbose=False, include_frames=False, is_push=False, is_skipped=False):
"""
include_frames = 0 # Never
include_frames = 1 # always
"""
media_path = utils.url2path(uri)
- ext = GstValidateMediaDescriptor.PUSH_MEDIA_INFO_EXT if is_push else \
- GstValidateMediaDescriptor.MEDIA_INFO_EXT
+ ext = GstValidateMediaDescriptor.MEDIA_INFO_EXT
+ if is_push:
+ ext = GstValidateMediaDescriptor.PUSH_MEDIA_INFO_EXT
+ elif is_skipped:
+ ext = GstValidateMediaDescriptor.SKIPPED_MEDIA_INFO_EXT
descriptor_path = "%s.%s" % (media_path, ext)
args = GstValidateBaseTestManager.MEDIA_CHECK_COMMAND.split(" ")
if include_frames == 2: