wlhe / uvc-gadget

enhance uvc-gadget test application
GNU General Public License v2.0
140 stars 143 forks source link

ioctl error while running in standalone mode of Raspi4 #14

Closed harsh04102002 closed 1 year ago

harsh04102002 commented 1 year ago

I am running raspi4 in standalone mode i.e, no capture device attcahed to it and assuming that can send a prestored video from Pi to the host machine and can see the output on host machine using vlc/OBS etc. Please correct me if i am wrong .

I ran the command ./uvc-gadget -d -i /home/pi/Downloads/test.mjpeg -u /dev/video0 -v uvc.0 with the 'wlhe' repo but i get 'ioctl' error even though i am passing mjpeg format only . Snap of error :

image

My issue is similar to this raised in a similar kind of repo by kbingham because for me also ioctl: VIDIOC_ENUM_FMT , Type: Video Capture . Can anyone please share if there is an updated repo which has resolved this issue . Also i am using VLC and selecting capture device as this newly made UVC camera in the host side.Please correct me if i am wrong .

Thanks for your time and effort ! Really appreciate that.

kbingham commented 1 year ago

I don't believe UVC gadget has code to parse multiple frames from a single file like that. To get more direct support please consider looking to https://gitlab.freedesktop.org/camera/uvc-gadget which can be referred to as 'upstream' for UVC-Gadget. We can provide more support there. But it sounds like you would like to hook up a decoder to act as the source. That should likely be handled using a gstreamer element to do the decode and feeding into the UVC gadget.

harsh04102002 commented 1 year ago

Hi @kbingham , Closing this case here then with a final question about the ' -d ' option as it is missing in the upstream version i guess . What does ' -d ' option is meant for ? I thought it is basically for this purpose only when you don,t have Camera attached to the Pi and want to test a dummy video/image?

Thanks for the upstream version info . I have opened this case there .

kbingham commented 1 year ago

In this repository it appears indeed '-d' is used to say no device. In upstream if there is no source device, then simply do not specify either '-d' or '-c' and I believe that enables the test-pattern-generator. But - as ever - if you want support on the upstream - please keep questions there.