From: Hans Verkuil Date: Thu, 17 Jul 2014 20:47:14 +0000 (+0200) Subject: v4l-utils: add new V4L2_CAP_EXT_PIX_FORMAT capability X-Git-Tag: v4l-utils-1.3.90~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ba0cd5aabbce536d79a9ba244311082467b42e2;p=platform%2Fupstream%2Fv4l-utils.git v4l-utils: add new V4L2_CAP_EXT_PIX_FORMAT capability And sync up all the various capability-print functions so they all have the same set of caps that they print. Except for rds-ctl that just cares about radio related caps. Signed-off-by: Hans Verkuil --- diff --git a/utils/libv4l2util/v4l2_driver.c b/utils/libv4l2util/v4l2_driver.c index 6d4dcc0..43e18d0 100644 --- a/utils/libv4l2util/v4l2_driver.c +++ b/utils/libv4l2util/v4l2_driver.c @@ -102,8 +102,16 @@ static char *prt_caps(uint32_t caps) if (V4L2_CAP_VIDEO_CAPTURE & caps) strcat (s,"CAPTURE "); + if (V4L2_CAP_VIDEO_CAPTURE_MPLANE & caps) + strcat (s,"CAPTURE_MPLANE "); if (V4L2_CAP_VIDEO_OUTPUT & caps) strcat (s,"OUTPUT "); + if (V4L2_CAP_VIDEO_OUTPUT_MPLANE & caps) + strcat (s,"OUTPUT_MPLANE "); + if (V4L2_CAP_VIDEO_M2M & caps) + strcat (s,"M2M "); + if (V4L2_CAP_VIDEO_M2M_MPLANE & caps) + strcat (s,"M2M_MPLANE "); if (V4L2_CAP_VIDEO_OVERLAY & caps) strcat (s,"OVERLAY "); if (V4L2_CAP_VBI_CAPTURE & caps) @@ -116,8 +124,16 @@ static char *prt_caps(uint32_t caps) strcat (s,"SLICED_VBI_OUTPUT "); if (V4L2_CAP_RDS_CAPTURE & caps) strcat (s,"RDS_CAPTURE "); + if (V4L2_CAP_RDS_OUTPUT & caps) + strcat (s,"RDS_OUTPUT "); + if (V4L2_CAP_SDR_CAPTURE & caps) + strcat (s,"SDR_CAPTURE "); if (V4L2_CAP_TUNER & caps) strcat (s,"TUNER "); + if (V4L2_CAP_HW_FREQ_SEEK & caps) + strcat (s,"HW_FREQ_SEEK "); + if (V4L2_CAP_MODULATOR & caps) + strcat (s,"MODULATOR "); if (V4L2_CAP_AUDIO & caps) strcat (s,"AUDIO "); if (V4L2_CAP_RADIO & caps) @@ -128,6 +144,10 @@ static char *prt_caps(uint32_t caps) strcat (s,"ASYNCIO "); if (V4L2_CAP_STREAMING & caps) strcat (s,"STREAMING "); + if (V4L2_CAP_EXT_PIX_FORMAT & caps) + strcat (s,"EXT_PIX_FORMAT "); + if (V4L2_CAP_DEVICE_CAPS & caps) + strcat (s,"DEVICE_CAPS "); return s; } @@ -180,12 +200,14 @@ int v4l2_open (char *device, int debug, struct v4l2_driver *drv) ret=xioctl(drv->fd,VIDIOC_QUERYCAP,(void *) &drv->cap); if (!ret && drv->debug) { printf ("driver=%s, card=%s, bus=%s, version=%d.%d.%d, " - "capabilities=%s\n", + "capabilities=%s, device_caps=%s\n", drv->cap.driver,drv->cap.card,drv->cap.bus_info, (drv->cap.version >> 16) & 0xff, (drv->cap.version >> 8) & 0xff, drv->cap.version & 0xff, - prt_caps(drv->cap.capabilities)); + prt_caps(drv->cap.capabilities), + (drv->cap.capabilities & V4L2_CAP_DEVICE_CAPS) ? + prt_caps(drv->cap.device_caps) : "N/A"); } diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp index e4d2b5d..0d57b55 100644 --- a/utils/rds-ctl/rds-ctl.cpp +++ b/utils/rds-ctl/rds-ctl.cpp @@ -299,14 +299,10 @@ static std::string cap2s(unsigned cap) s += "\t\tTuner\n"; if (cap & V4L2_CAP_MODULATOR) s += "\t\tModulator\n"; - if (cap & V4L2_CAP_AUDIO) - s += "\t\tAudio\n"; if (cap & V4L2_CAP_RADIO) s += "\t\tRadio\n"; if (cap & V4L2_CAP_READWRITE) s += "\t\tRead/Write\n"; - if (cap & V4L2_CAP_ASYNCIO) - s += "\t\tAsync I/O\n"; if (cap & V4L2_CAP_STREAMING) s += "\t\tStreaming\n"; if (cap & V4L2_CAP_DEVICE_CAPS) diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp index 98d00a7..c7f3b66 100644 --- a/utils/v4l2-compliance/v4l2-compliance.cpp +++ b/utils/v4l2-compliance/v4l2-compliance.cpp @@ -197,6 +197,8 @@ std::string cap2s(unsigned cap) s += "\t\tSDR Capture\n"; if (cap & V4L2_CAP_TUNER) s += "\t\tTuner\n"; + if (cap & V4L2_CAP_HW_FREQ_SEEK) + s += "\t\tHW Frequency Seek\n"; if (cap & V4L2_CAP_MODULATOR) s += "\t\tModulator\n"; if (cap & V4L2_CAP_AUDIO) @@ -209,6 +211,8 @@ std::string cap2s(unsigned cap) s += "\t\tAsync I/O\n"; if (cap & V4L2_CAP_STREAMING) s += "\t\tStreaming\n"; + if (cap & V4L2_CAP_EXT_PIX_FORMAT) + s += "\t\tExtended Pix Format\n"; if (cap & V4L2_CAP_DEVICE_CAPS) s += "\t\tDevice Capabilities\n"; return s; diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index a54bb59..e5add30 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -571,14 +571,16 @@ static std::string cap2s(unsigned cap) s += "\t\tSliced VBI Capture\n"; if (cap & V4L2_CAP_SLICED_VBI_OUTPUT) s += "\t\tSliced VBI Output\n"; - if (cap & V4L2_CAP_SDR_CAPTURE) - s += "\t\tSDR Capture\n"; if (cap & V4L2_CAP_RDS_CAPTURE) s += "\t\tRDS Capture\n"; if (cap & V4L2_CAP_RDS_OUTPUT) s += "\t\tRDS Output\n"; + if (cap & V4L2_CAP_SDR_CAPTURE) + s += "\t\tSDR Capture\n"; if (cap & V4L2_CAP_TUNER) s += "\t\tTuner\n"; + if (cap & V4L2_CAP_HW_FREQ_SEEK) + s += "\t\tHW Frequency Seek\n"; if (cap & V4L2_CAP_MODULATOR) s += "\t\tModulator\n"; if (cap & V4L2_CAP_AUDIO) @@ -591,6 +593,8 @@ static std::string cap2s(unsigned cap) s += "\t\tAsync I/O\n"; if (cap & V4L2_CAP_STREAMING) s += "\t\tStreaming\n"; + if (cap & V4L2_CAP_EXT_PIX_FORMAT) + s += "\t\tExtended Pix Format\n"; if (cap & V4L2_CAP_DEVICE_CAPS) s += "\t\tDevice Capabilities\n"; return s; diff --git a/utils/v4l2-dbg/v4l2-dbg.cpp b/utils/v4l2-dbg/v4l2-dbg.cpp index 9986883..981ee29 100644 --- a/utils/v4l2-dbg/v4l2-dbg.cpp +++ b/utils/v4l2-dbg/v4l2-dbg.cpp @@ -196,8 +196,16 @@ static std::string cap2s(unsigned cap) if (cap & V4L2_CAP_VIDEO_CAPTURE) s += "\t\tVideo Capture\n"; + if (cap & V4L2_CAP_VIDEO_CAPTURE_MPLANE) + s += "\t\tVideo Capture Multiplanar\n"; if (cap & V4L2_CAP_VIDEO_OUTPUT) s += "\t\tVideo Output\n"; + if (cap & V4L2_CAP_VIDEO_OUTPUT_MPLANE) + s += "\t\tVideo Output Multiplanar\n"; + if (cap & V4L2_CAP_VIDEO_M2M) + s += "\t\tVideo Memory-to-Memory\n"; + if (cap & V4L2_CAP_VIDEO_M2M_MPLANE) + s += "\t\tVideo Memory-to-Memory Multiplanar\n"; if (cap & V4L2_CAP_VIDEO_OVERLAY) s += "\t\tVideo Overlay\n"; if (cap & V4L2_CAP_VIDEO_OUTPUT_OVERLAY) @@ -212,8 +220,16 @@ static std::string cap2s(unsigned cap) s += "\t\tSliced VBI Output\n"; if (cap & V4L2_CAP_RDS_CAPTURE) s += "\t\tRDS Capture\n"; + if (cap & V4L2_CAP_RDS_OUTPUT) + s += "\t\tRDS Output\n"; + if (cap & V4L2_CAP_SDR_CAPTURE) + s += "\t\tSDR Capture\n"; if (cap & V4L2_CAP_TUNER) s += "\t\tTuner\n"; + if (cap & V4L2_CAP_HW_FREQ_SEEK) + s += "\t\tHW Frequency Seek\n"; + if (cap & V4L2_CAP_MODULATOR) + s += "\t\tModulator\n"; if (cap & V4L2_CAP_AUDIO) s += "\t\tAudio\n"; if (cap & V4L2_CAP_RADIO) @@ -224,6 +240,10 @@ static std::string cap2s(unsigned cap) s += "\t\tAsync I/O\n"; if (cap & V4L2_CAP_STREAMING) s += "\t\tStreaming\n"; + if (cap & V4L2_CAP_EXT_PIX_FORMAT) + s += "\t\tExtended Pix Format\n"; + if (cap & V4L2_CAP_DEVICE_CAPS) + s += "\t\tDevice Capabilities\n"; return s; }