V4L2src plugin does not call VIDIOC_S_INPUT????

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

V4L2src plugin does not call VIDIOC_S_INPUT????

nujabes8
Hi,
I am currently developing device driver for a camera device to work on ubuntu linux board (ARM)
 
I used "$gst-launch-0.10 v4l2src ! fakesink" to test if my webcam is working correctly.

However following error occurs.
==============
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to get current input on device '/dev/video0'. May be it is a radio device
Additional debug info:
v4l2_calls.c(829): gst_v4l2_get_input (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: No such device
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' does not support video capture
Additional debug info:
gstv4l2object.c(1942): gst_v4l2_object_set_format (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Call to G_FMT failed: (Invalid argument)
Setting pipeline to NULL ...
Freeing pipeline ...
=================

This webcam is working when I test it with C code application in sequence of
calling following ioctls.
*open -> VIDIOC_QUERYCAP ->VIDIOC_ENUMINPUT -> VIDIOC_S_INPUT -> set fmt -> querybuf and so on.

I do not have full understanding of gstreamer frame work, but I have looked at the source code and read all the manual about gstreamer.
When I looked at the source code for V4L2src plugin

in V4L2_calls.c:
gst_v4l2_open() calls gst_v4l2_fill_lists() which then does VIDIOC_ENUMINPUT then tries VIDIOC_QUERYCTRL.
However, in my understanding there should be S_INPUT somewhere along the code to select device input before querying any ctrl or setting input format.

I cannot find any piece of code calling ioctl(VIDIOC_S_INPUT) in plugin code!!!!!


I am using gstreamer0.10-plugins-good  / 0.10.25-4ubuntu2.

Please help.
Thank you in advance.



Reply | Threaded
Open this post in threaded view
|

Re: V4L2src plugin does not call VIDIOC_S_INPUT????

wally_bkg
I believe you need to use the v4l2src tuner interface.

A sample can be found here:

http://gstreamer-devel.966125.n4.nabble.com/Problem-Trying-To-Use-v4l2src-td973410.html#a973414


I've still not got it to work 100% as the apparently bogus error message is gone with the newer gstreamer build, but now the switch from PAL to NTSC doesn't work see:

http://gstreamer-devel.966125.n4.nabble.com/v4l2src-fails-to-change-video-norm-from-PAL-to-NTSC-td3076696.html

Seems seems half the video cards I have available for testing default to PAL on powerup.