Commit 3a5bcb1d authored by Aman Gupta's avatar Aman Gupta

avcodec/v4l2_m2m: log requested pixel formats

Signed-off-by: 's avatarAman Gupta <aman@tmm1.net>
parent ef43a4d6
...@@ -132,6 +132,7 @@ static int v4l2_configure_contexts(V4L2m2mContext* s) ...@@ -132,6 +132,7 @@ static int v4l2_configure_contexts(V4L2m2mContext* s)
{ {
void *log_ctx = s->avctx; void *log_ctx = s->avctx;
int ret; int ret;
struct v4l2_format ofmt, cfmt;
s->fd = open(s->devname, O_RDWR | O_NONBLOCK, 0); s->fd = open(s->devname, O_RDWR | O_NONBLOCK, 0);
if (s->fd < 0) if (s->fd < 0)
...@@ -141,6 +142,16 @@ static int v4l2_configure_contexts(V4L2m2mContext* s) ...@@ -141,6 +142,16 @@ static int v4l2_configure_contexts(V4L2m2mContext* s)
if (ret < 0) if (ret < 0)
goto error; goto error;
ofmt = s->output.format;
cfmt = s->capture.format;
av_log(log_ctx, AV_LOG_INFO, "requesting formats: output=%s capture=%s\n",
av_fourcc2str(V4L2_TYPE_IS_MULTIPLANAR(ofmt.type) ?
ofmt.fmt.pix_mp.pixelformat :
ofmt.fmt.pix.pixelformat),
av_fourcc2str(V4L2_TYPE_IS_MULTIPLANAR(cfmt.type) ?
cfmt.fmt.pix_mp.pixelformat :
cfmt.fmt.pix.pixelformat));
ret = ff_v4l2_context_set_format(&s->output); ret = ff_v4l2_context_set_format(&s->output);
if (ret) { if (ret) {
av_log(log_ctx, AV_LOG_ERROR, "can't set v4l2 output format\n"); av_log(log_ctx, AV_LOG_ERROR, "can't set v4l2 output format\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment