Esempio n. 1
0
 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
Esempio n. 2
0
 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'
Esempio n. 3
0
 def __init__(self) -> None:
     if self.binary:
         self.binary = normalize_binary_cmd(self.binary)
Esempio n. 4
0
 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)