diff options
author | Aman Gupta <aman@tmm1.net> | 2019-08-22 12:06:24 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2019-09-02 15:06:12 -0700 |
commit | 3a5bcb1d1374f26e4c569ee9b9c62c27477c5e8a (patch) | |
tree | bb3daebc7f612fa9c37b953ec103db07061d9f4d | |
parent | ef43a4d6b38de941dd2ede0711d4fd5d811127ed (diff) | |
download | ffmpeg-3a5bcb1d1374f26e4c569ee9b9c62c27477c5e8a.tar.gz |
avcodec/v4l2_m2m: log requested pixel formats
Signed-off-by: Aman Gupta <aman@tmm1.net>
-rw-r--r-- | libavcodec/v4l2_m2m.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c index ac583c811f..cc8de7b6f4 100644 --- a/libavcodec/v4l2_m2m.c +++ b/libavcodec/v4l2_m2m.c @@ -132,6 +132,7 @@ static int v4l2_configure_contexts(V4L2m2mContext* s) { void *log_ctx = s->avctx; int ret; + struct v4l2_format ofmt, cfmt; s->fd = open(s->devname, O_RDWR | O_NONBLOCK, 0); if (s->fd < 0) @@ -141,6 +142,16 @@ static int v4l2_configure_contexts(V4L2m2mContext* s) if (ret < 0) 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); if (ret) { av_log(log_ctx, AV_LOG_ERROR, "can't set v4l2 output format\n"); |