def check(self, verbose) -> bool: '''Check if GStreamer decoder is valid (better than gst-inspect)''' # pylint: disable=broad-except try: binary = normalize_binary_cmd(f'gst-launch-{self.gst_api}') pipeline = f'{binary} appsrc num-buffers=0 ! {self.decoder_bin} ! fakesink' run_command(shlex.split(pipeline), verbose=verbose) except Exception: return False return True
def __init__(self): super().__init__() if not self.name: self.name = f'{self.provider}-{self.codec.value}-{self.api}-Gst{self.gst_api}' self.description = f'{self.provider} {self.codec.value} {self.api} decoder for GStreamer {self.gst_api}' self.cmd = normalize_binary_cmd(self.cmd) gst_version = self.get_gst_version() if gst_version >= '1.20.0': self.sink = 'videoconformancesink' else: self.sink = 'filesink'
def __init__(self) -> None: if self.binary: self.binary = normalize_binary_cmd(self.binary)
def __init__(self): super().__init__() if not self.name: self.name = f'{self.provider}-{self.codec.value}-{self.api}-Gst{self.gst_api}' self.description = f'{self.provider} {self.codec.value} {self.api} decoder for GStreamer {self.gst_api}' self.cmd = normalize_binary_cmd(self.cmd)