Skip to contentSkip to conversation

Video Signal Type in V4L

DISCUSSION Abhishek Bansal 3 participants 3 messages Apr 25, 2013 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi All,

Is there any way by which I can know Input signal type (in terms of DVI/Composite/USB/SDI) and refresh rate from a V4L video capture device. Any available V4L Structure/Flag from which I can deduce this information. Please help !

Thank You
Abhishek Bansal

#1 lore raw
Quoted 4 lines

Is there any way by which I can know Input signal type (in terms of DVI/Composite/USB/SDI) and refresh rate from a V4L video capture device. Any available V4L Structure/Flag from which I can deduce this information. Please help !

The extent to which the data is available is the name field in the G_FMT call:

http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-enuminput.html

For most devices, the driver developer names the individual inputs "Composite", "S-Video", "Tuner", etc.

The only level of distinction other than the name is the type field, which today is V4L2_INPUT_TYPE_TUNER for an RF tuner and V4L2_INPUT_TYPE_CAMERA for everything else.

To my knowledge there aren't any current drivers in the main tree that support DVI or SDI capture, so nobody has really cared to make the API more flexible to extend the "type" field with other values (which would both be easier to machine parse, localize, and be consistent across boards).

Devin

--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

#2 lore raw
In reply to Abhishek Bansal

Em Fri, 26 Apr 2013 02:15:03 +0530
"Abhishek Bansal" <[email protected]> escreveu:

Quoted 4 lines

Hi All,

Is there any way by which I can know Input signal type (in terms of DVI/Composite/USB/SDI)

As input "type", currently no. However, by looking at the video input 'name' field, it is possible to know if it is a composite, S-video, ... input entry. The input name is a string, and the naming convention depends on the driver.

see field 'name' at
http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-enuminput.html

And this ioctl for retrieving it for the current input:
http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-g-input.html

Quoted 1 line

and refresh rate from a V4L video capture device.

Yes, via VIDIOC_G_PARM. see timeperframe field there:
http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-g-parm.html

Not all drivers implement it through.

Quoted 12 lines

Any available V4L Structure/Flag from which I can deduce this information.

Please help !

Thank You
Abhishek Bansal

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Cheers,
Mauro