Lines Matching refs:enc_ctx

53     AVCodecContext *enc_ctx;
125 AVCodecContext *dec_ctx, *enc_ctx;
156 enc_ctx = avcodec_alloc_context3(encoder);
157 if (!enc_ctx) {
166 enc_ctx->height = dec_ctx->height;
167 enc_ctx->width = dec_ctx->width;
168 enc_ctx->sample_aspect_ratio = dec_ctx->sample_aspect_ratio;
171 enc_ctx->pix_fmt = encoder->pix_fmts[0];
173 enc_ctx->pix_fmt = dec_ctx->pix_fmt;
175 enc_ctx->time_base = av_inv_q(dec_ctx->framerate);
177 enc_ctx->sample_rate = dec_ctx->sample_rate;
178 ret = av_channel_layout_copy(&enc_ctx->ch_layout, &dec_ctx->ch_layout);
182 enc_ctx->sample_fmt = encoder->sample_fmts[0];
183 enc_ctx->time_base = (AVRational){1, enc_ctx->sample_rate};
187 enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
190 ret = avcodec_open2(enc_ctx, encoder, NULL);
195 ret = avcodec_parameters_from_context(out_stream->codecpar, enc_ctx);
201 out_stream->time_base = enc_ctx->time_base;
202 stream_ctx[i].enc_ctx = enc_ctx;
238 AVCodecContext *enc_ctx, const char *filter_spec)
286 (uint8_t*)&enc_ctx->pix_fmt, sizeof(enc_ctx->pix_fmt),
325 (uint8_t*)&enc_ctx->sample_fmt, sizeof(enc_ctx->sample_fmt),
332 av_channel_layout_describe(&enc_ctx->ch_layout, buf, sizeof(buf));
341 (uint8_t*)&enc_ctx->sample_rate, sizeof(enc_ctx->sample_rate),
410 stream_ctx[i].enc_ctx, filter_spec);
437 ret = avcodec_send_frame(stream->enc_ctx, filt_frame);
443 ret = avcodec_receive_packet(stream->enc_ctx, enc_pkt);
451 stream->enc_ctx->time_base,
503 if (!(stream_ctx[stream_index].enc_ctx->codec->capabilities &
603 if (ofmt_ctx && ofmt_ctx->nb_streams > i && ofmt_ctx->streams[i] && stream_ctx[i].enc_ctx)
604 avcodec_free_context(&stream_ctx[i].enc_ctx);