diff mbox

[FFmpeg-devel,1/8] avcodec/v4l2_m2m: log planar mode used by driver

Message ID 20190822214741.12456-1-ffmpeg@tmm1.net
State Accepted
Commit e8c5ce1acb8bb7ad09dbe03c6ccb48874c2f9606
Headers show

Commit Message

Aman Karmani Aug. 22, 2019, 9:47 p.m. UTC
From: Aman Gupta <aman@tmm1.net>

Signed-off-by: Aman Gupta <aman@tmm1.net>
---
 libavcodec/v4l2_m2m.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Moritz Barsnick Aug. 23, 2019, 6:43 a.m. UTC | #1
On Thu, Aug 22, 2019 at 14:47:41 -0700, Aman Gupta wrote:
> The single planar support was for NV21 only.
                                    ^
Nit: NV12


> Add NV21 and YUV420P support.
>
> Signed-off-by: Aman Gupta <aman@tmm1.net>

Cheers,
Moritz
diff mbox

Patch

diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
index 427e165f58..7d65747df2 100644
--- a/libavcodec/v4l2_m2m.c
+++ b/libavcodec/v4l2_m2m.c
@@ -76,7 +76,9 @@  static int v4l2_prepare_contexts(V4L2m2mContext* s)
     if (ret < 0)
         return ret;
 
-    av_log(s->avctx, AV_LOG_INFO, "driver '%s' on card '%s'\n", cap.driver, cap.card);
+    av_log(s->avctx, AV_LOG_INFO, "driver '%s' on card '%s' in %s mode\n", cap.driver, cap.card,
+                                   v4l2_mplane_video(&cap) ? "mplane" :
+                                   v4l2_splane_video(&cap) ? "splane" : "unknown");
 
     if (v4l2_mplane_video(&cap)) {
         s->capture.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;