def command(cls, session): command = [] if session.options.get("ffmpeg-ffmpeg"): command.append(session.options.get("ffmpeg-ffmpeg")) for cmd in command or cls.__commands__: if compat_which(cmd): return cmd
def _check_cmd(self): if not self.cmd: raise StreamError("`cmd' attribute not set") cmd = compat_which(self.cmd) if not cmd: raise StreamError("Unable to find `{0}' command".format(self.cmd)) return cmd
def is_usable(cls, session): cmd = session.options.get("rtmp-rtmpdump") return compat_which(cmd) is not None