Lines Matching defs:avctx
37 static int v4l2_try_start(AVCodecContext *avctx)
39 V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context;
49 av_log(avctx, AV_LOG_DEBUG, "VIDIOC_STREAMON on output context\n");
61 av_log(avctx, AV_LOG_WARNING, "VIDIOC_G_FMT ioctl\n");
66 avctx->pix_fmt = ff_v4l2_format_v4l2_to_avfmt(capture->format.fmt.pix_mp.pixelformat, AV_CODEC_ID_RAWVIDEO);
67 capture->av_pix_fmt = avctx->pix_fmt;
71 selection.r.height = avctx->coded_height;
72 selection.r.width = avctx->coded_width;
77 av_log(avctx, AV_LOG_WARNING, "VIDIOC_G_SELECTION ioctl\n");
79 av_log(avctx, AV_LOG_DEBUG, "crop output %dx%d\n", selection.r.width, selection.r.height);
90 av_log(avctx, AV_LOG_ERROR, "can't request capture buffers\n");
98 av_log(avctx, AV_LOG_DEBUG, "VIDIOC_STREAMON, on capture context\n");
119 av_log(s->avctx, AV_LOG_ERROR,
130 av_log(s->avctx, AV_LOG_WARNING,
136 static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)
138 V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context;
144 ret = ff_decode_get_packet(avctx, &s->buf_pkt);
165 ret = v4l2_try_start(avctx);
181 static av_cold int v4l2_decode_init(AVCodecContext *avctx)
185 V4L2m2mPriv *priv = avctx->priv_data;
199 output->height = capture->height = avctx->coded_height;
200 output->width = capture->width = avctx->coded_width;
202 output->av_codec_id = avctx->codec_id;
206 capture->av_pix_fmt = avctx->pix_fmt;
208 s->avctx = avctx;
211 av_log(avctx, AV_LOG_ERROR, "can't configure decoder\n");
218 static av_cold int v4l2_decode_close(AVCodecContext *avctx)
220 return ff_v4l2_m2m_codec_end(avctx->priv_data);