Lines Matching defs:codec

155     ret = ffcodec(avctx->codec)->cb.encode_sub(avctx, buf, buf_size, sub);
179 const FFCodec *const codec = ffcodec(avctx->codec);
194 if (!(avctx->codec->capabilities & AV_CODEC_CAP_DELAY ||
204 av_assert0(codec->cb_type == FF_CODEC_CB_TYPE_ENCODE);
214 ret = codec->cb.encode(avctx, avpkt, frame, &got_packet);
215 if (avctx->codec->type == AVMEDIA_TYPE_VIDEO && !ret && got_packet &&
216 !(avctx->codec->capabilities & AV_CODEC_CAP_DELAY))
231 if (frame && !(avctx->codec->capabilities & AV_CODEC_CAP_DELAY)) {
232 if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
240 if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
287 if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
294 if (ffcodec(avctx->codec)->cb_type == FF_CODEC_CB_TYPE_RECEIVE_PACKET) {
295 ret = ffcodec(avctx->codec)->cb.receive_packet(avctx, avpkt);
317 if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
324 if (avctx->codec->capabilities & AV_CODEC_CAP_SMALL_LAST_FRAME) {
329 } else if (!(avctx->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE)) {
362 if (!avcodec_is_open(avctx) || !av_codec_is_encoder(avctx->codec))
397 if (!avcodec_is_open(avctx) || !av_codec_is_encoder(avctx->codec))
416 if (avctx->codec->pix_fmts) {
417 for (i = 0; avctx->codec->pix_fmts[i] != AV_PIX_FMT_NONE; i++)
418 if (avctx->pix_fmt == avctx->codec->pix_fmts[i])
420 if (avctx->codec->pix_fmts[i] == AV_PIX_FMT_NONE) {
427 if (avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ420P ||
428 avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ411P ||
429 avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ422P ||
430 avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ440P ||
431 avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ444P)
482 if (avctx->codec->sample_fmts) {
483 for (i = 0; avctx->codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++) {
484 if (avctx->sample_fmt == avctx->codec->sample_fmts[i])
488 av_get_planar_sample_fmt(avctx->codec->sample_fmts[i])) {
489 avctx->sample_fmt = avctx->codec->sample_fmts[i];
493 if (avctx->codec->sample_fmts[i] == AV_SAMPLE_FMT_NONE) {
501 if (avctx->codec->supported_samplerates) {
502 for (i = 0; avctx->codec->supported_samplerates[i] != 0; i++)
503 if (avctx->sample_rate == avctx->codec->supported_samplerates[i])
505 if (avctx->codec->supported_samplerates[i] == 0) {
516 if (avctx->codec->ch_layouts) {
522 for (i = 0; avctx->codec->ch_layouts[i].nb_channels; i++) {
523 if (!av_channel_layout_compare(&avctx->ch_layout, &avctx->codec->ch_layouts[i]))
526 if (!avctx->codec->ch_layouts[i].nb_channels) {
591 if (ffcodec(avctx->codec)->cb_type == FF_CODEC_CB_TYPE_ENCODE) {
604 switch (avctx->codec->type) {