def init_video_decoder_option(self, decoder_name): decoder_module = get_codec(decoder_name) log("init_video_decoder_option(%s)", decoder_name) log(" module=%s", decoder_module) if not decoder_module: log(" video decoder %s could not be loaded:", decoder_name) log(" %s", get_codec_error(decoder_name)) return decoder_type = decoder_module.get_type() try: decoder_module.init_module() self._cleanup_modules.append(decoder_module) except Exception as e: log("exception in %s module initialization %s: %s", decoder_type, decoder_module.init_module, e, exc_info=True) log.warn("Warning: cannot use %s module %s: %s", decoder_type, decoder_module, e, exc_info=True) return encodings = decoder_module.get_encodings() log(" %s encodings=%s", decoder_type, csv(encodings)) for encoding in encodings: colorspaces = decoder_module.get_input_colorspaces(encoding) log(" %s input colorspaces for %s: %s", decoder_type, encoding, csv(colorspaces)) for colorspace in colorspaces: output_colorspace = decoder_module.get_output_colorspace(encoding, colorspace) log(" %s output colorspace for %s/%s: %s", decoder_type, encoding, colorspace, output_colorspace) try: assert decoder_module.Decoder self.add_decoder(encoding, colorspace, decoder_name, decoder_module) except Exception as e: log.warn("failed to add decoder %s: %s", decoder_module, e) del e
def init_csc_option(self, csc_name): csc_module = get_codec(csc_name) log("init_csc_option(%s)", csc_name) log(" module=%s", csc_module) if csc_module is None: log(" csc module %s could not be loaded:", csc_name) log(" %s", get_codec_error(csc_name)) return csc_type = csc_module.get_type() try: csc_module.init_module() self._cleanup_modules.append(csc_module) except Exception as e: log("exception in %s module initialization %s: %s", csc_type, csc_module.init_module, e, exc_info=True) log.warn("Warning: cannot use %s module %s: %s", csc_type, csc_module, e) return in_cscs = csc_module.get_input_colorspaces() for in_csc in in_cscs: out_cscs = csc_module.get_output_colorspaces(in_csc) log("%s output colorspaces for %s: %s", csc_module.get_type(), in_csc, csv(out_cscs)) for out_csc in out_cscs: spec = csc_module.get_spec(in_csc, out_csc) self.add_csc_spec(in_csc, out_csc, spec)
def init_video_decoder_option(self, decoder_name): decoder_module = get_codec(decoder_name) log("init_video_decoder_option(%s)", decoder_name) log(" module=%s", decoder_module) if not decoder_module: log(" video decoder %s could not be loaded:", decoder_name) log(" %s", get_codec_error(decoder_name)) return decoder_type = decoder_module.get_type() encodings = decoder_module.get_encodings() log(" %s encodings=%s", decoder_type, csv(encodings)) for encoding in encodings: colorspaces = decoder_module.get_input_colorspaces(encoding) log(" %s input colorspaces for %s: %s", decoder_type, encoding, csv(colorspaces)) for colorspace in colorspaces: output_colorspace = decoder_module.get_output_colorspace( encoding, colorspace) log(" %s output colorspace for %5s/%7s: %s", decoder_type, encoding, colorspace, output_colorspace) try: assert decoder_module.Decoder self.add_decoder(encoding, colorspace, decoder_name, decoder_module) except Exception as e: log.warn("failed to add decoder %s: %s", decoder_module, e) del e
def init_video_encoder_option(self, encoder_name): encoder_module = get_codec(encoder_name) log("init_video_encoder_option(%s)", encoder_name) log(" module=%s", encoder_module) if not encoder_module: log(" video encoder '%s' could not be loaded:", encoder_name) log(" %s", get_codec_error(encoder_name)) return encoder_type = encoder_module.get_type() try: encoder_module.init_module() self._cleanup_modules.append(encoder_module) except Exception as e: log(" exception in %s module %s initialization %s: %s", encoder_type, encoder_module.__name__, encoder_module.init_module, e, exc_info=True) raise encodings = encoder_module.get_encodings() log(" %s encodings=%s", encoder_type, csv(encodings)) for encoding in encodings: colorspaces = encoder_module.get_input_colorspaces(encoding) log(" %s input colorspaces for %s: %s", encoder_type, encoding, csv(colorspaces)) for colorspace in colorspaces: spec = encoder_module.get_spec(encoding, colorspace) self.add_encoder_spec(encoding, colorspace, spec)
def init_video_decoder_option(self, decoder_name): decoder_module = get_codec(decoder_name) log("init_video_decoder_option(%s)", decoder_name) log(" module=%s", decoder_module) if not decoder_module: log(" video decoder %s could not be loaded:", decoder_name) log(" %s", get_codec_error(decoder_name)) return decoder_type = decoder_module.get_type() try: decoder_module.init_module() self._cleanup_modules.append(decoder_module) except Exception as e: log("exception in %s module initialization %s: %s", decoder_type, decoder_module.init_module, e, exc_info=True) log.warn("Warning: cannot use %s module %s: %s", decoder_type, decoder_module, e, exc_info=True) return encodings = decoder_module.get_encodings() log(" %s encodings=%s", decoder_type, csv(encodings)) for encoding in encodings: colorspaces = decoder_module.get_input_colorspaces(encoding) log(" %s input colorspaces for %s: %s", decoder_type, encoding, csv(colorspaces)) for colorspace in colorspaces: output_colorspace = decoder_module.get_output_colorspace(encoding, colorspace) log(" %s output colorspace for %s/%s: %s", decoder_type, encoding, colorspace, output_colorspace) try: assert decoder_module.Decoder self.add_decoder(encoding, colorspace, decoder_name, decoder_module) except Exception as e: log.warn("failed to add decoder %s: %s", decoder_module, e)
def init_video_decoder_option(self, decoder_name): decoder_module = get_codec(decoder_name) log("init_video_decoder_option(%s) module=%s", decoder_name, decoder_module) if not decoder_module: log.warn("video decoder %s could not be loaded: %s", decoder_name, get_codec_error(decoder_name)) return encoder_type = decoder_module.get_type() try: decoder_module.init_module() self._cleanup_modules.append(decoder_module) except Exception, e: log.warn("cannot use %s module %s: %s", encoder_type, decoder_module, e, exc_info=True) return
def init_csc_option(self, csc_name): csc_module = get_codec(csc_name) log("init_csc_option(%s) module=%s", csc_name, csc_module) if csc_module is None: log.warn("csc module %s could not be loaded: %s", csc_name, get_codec_error(csc_name)) return csc_type = csc_module.get_type() try: csc_module.init_module() self._cleanup_modules.append(csc_module) except Exception, e: log.warn("cannot use %s module %s: %s", csc_type, csc_module, e) return
def init_csc_option(self, csc_name): csc_module = get_codec(csc_name) log("init_csc_option(%s)", csc_name) log(" module=%s", csc_module) if csc_module is None: log(" csc module %s could not be loaded:", csc_name) log(" %s", get_codec_error(csc_name)) return in_cscs = csc_module.get_input_colorspaces() for in_csc in in_cscs: out_cscs = csc_module.get_output_colorspaces(in_csc) log("%9s output colorspaces for %7s: %s", csc_module.get_type(), in_csc, csv(out_cscs)) for out_csc in out_cscs: spec = csc_module.get_spec(in_csc, out_csc) self.add_csc_spec(in_csc, out_csc, spec)
def init_video_encoder_option(self, encoder_name): encoder_module = get_codec(encoder_name) log("init_video_encoder_option(%s)", encoder_name) log(" module=%s", encoder_module) if not encoder_module: log(" video encoder '%s' could not be loaded:", encoder_name) log(" %s", get_codec_error(encoder_name)) return encoder_type = encoder_module.get_type() encodings = encoder_module.get_encodings() log(" %12s encodings=%s", encoder_type, csv(encodings)) for encoding in encodings: colorspaces = encoder_module.get_input_colorspaces(encoding) log(" %9s input colorspaces for %5s: %s", encoder_type, encoding, csv(colorspaces)) for colorspace in colorspaces: spec = encoder_module.get_spec(encoding, colorspace) self.add_encoder_spec(encoding, colorspace, spec) log("video encoder options: %s", self._video_encoder_specs)
def init_video_encoder_option(self, encoder_name): encoder_module = get_codec(encoder_name) log("init_video_encoder_option(%s) module=%s", encoder_name, encoder_module) if not encoder_module: log.warn("video encoder '%s' could not be loaded:", encoder_name) log.warn(" %s", get_codec_error(encoder_name)) return encoder_type = encoder_module.get_type() try: encoder_module.init_module() self._cleanup_modules.append(encoder_module) except Exception, e: log("exception in %s module initialization %s: %s", encoder_type, encoder_module.init_module, e, exc_info=True) log.warn("Warning: %s video encoder failed: %s", encoder_type, e) return