Lines Matching defs:codec

73 static void lock_avcodec(const FFCodec *codec)
75 if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
79 static void unlock_avcodec(const FFCodec *codec)
81 if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
115 int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
124 if (!codec && !avctx->codec) {
125 av_log(avctx, AV_LOG_ERROR, "No codec provided to avcodec_open2()\n");
128 if (codec && avctx->codec && codec != avctx->codec) {
130 "but %s passed to avcodec_open2()\n", avctx->codec->name, codec->name);
133 if (!codec)
134 codec = avctx->codec;
135 codec2 = ffcodec(codec);
137 if ((avctx->codec_type != AVMEDIA_TYPE_UNKNOWN && avctx->codec_type != codec->type) ||
138 (avctx->codec_id != AV_CODEC_ID_NONE && avctx->codec_id != codec->id)) {
143 avctx->codec_type = codec->type;
144 avctx->codec_id = codec->id;
145 avctx->codec = codec;
173 if (codec->priv_class) {
174 *(const AVClass **)avctx->priv_data = codec->priv_class;
178 if (codec->priv_class && (ret = av_opt_set_dict(avctx->priv_data, options)) < 0)
186 if (avctx->codec_whitelist && av_match_list(codec->name, avctx->codec_whitelist, ',') <= 0) {
187 av_log(avctx, AV_LOG_ERROR, "Codec (%s) not on whitelist \'%s\'\n", codec->name, avctx->codec_whitelist);
259 if ((avctx->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) &&
261 const char *codec_string = av_codec_is_encoder(codec) ? "encoder" : "decoder";
266 codec_string, codec->name, FF_COMPLIANCE_EXPERIMENTAL);
267 codec2 = av_codec_is_encoder(codec) ? avcodec_find_encoder(codec->id) : avcodec_find_decoder(codec->id);
281 if (av_codec_is_encoder(avctx->codec))
288 if (CONFIG_FRAME_THREAD_ENCODER && av_codec_is_encoder(avctx->codec)) {
323 if (av_codec_is_decoder(avctx->codec)) {
366 if (codec->priv_class)
367 av_assert0(*(const AVClass **)avctx->priv_data == codec->priv_class);
381 if (av_codec_is_encoder(avctx->codec)) {
382 int caps = avctx->codec->capabilities;
414 else if (ffcodec(avctx->codec)->flush)
415 ffcodec(avctx->codec)->flush(avctx);
456 if (avci->needs_close && ffcodec(avctx->codec)->close)
457 ffcodec(avctx->codec)->close(avctx);
495 if (avctx->priv_data && avctx->codec && avctx->codec->priv_class)
499 if (av_codec_is_encoder(avctx->codec)) {
502 } else if (av_codec_is_decoder(avctx->codec))
505 avctx->codec = NULL;
539 if (enc->codec && strcmp(enc->codec->name, codec_name))
540 av_bprintf(&bprint, " (%s)", enc->codec->name);