<div dir="ltr"><br><div class="gmail_quote"><br><div dir="ltr">Hello Everyone,<br><br>I have an app that captures frames from a video device using v4l2.
<br>the app should support all i-o modes.<br>
I am mostly interested in userptr mode.
<br><br>when i run the code with physical camera it works (with userptr mode).
<br>when i run the same code with v4l2loopback camera and gstreamer, <br>it fails.
calling VIDIOC_REQBUFS with V4L2_MEMEORY_USERPTR returns not supported.<br><br><div>in in link: <a href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/1028" target="_blank">https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/1028</a><br> <a href="https://gitlab.freedesktop.org/ndufresne" target="_blank"><span>Nicolas Dufresne</span></a> pointed me out that v4l2loopback does not support userptr.<br></div><div>I find his anser very helpful and consider my next steps.<br><br><br></div><div>several questions:<br></div><div><br></div><div>1. can i count that gstreamer works with user ptr ?<br><p> the link below suggests it sohuld work, correct ?<br> <a href="https://developer.ridgerun.com/wiki/index.php/GStreamer1.0_and_V4L2_UserPtr" rel="nofollow noreferrer noopener" target="_blank">https://developer.ridgerun.com/wiki/index.php/GStreamer1.0_and_V4L2_UserPt<br><br></a></p></div><div><p>2. </p><p> clearly, i am looking for simple stable solution.<br></p><p> as much as I love code, clearly it is preferable to use existing tools<br></p><p> to get fast and stable simulator.<br></p><p> if you could please advise ,which of the following options would you recommend ?<br></p><p> option1: use gstreamer\v4l2sink without v4l2loopback<br></p><p> my question here: which tool can i use instead v4l2loopback ?</p><p> which tool did v4l2sink develpers used to check the usertpr mode ? <br><br></p><p> option2:any other gstreamer alternative for v4l2sink\v4l2loopback ?<br></p> option3: changing v4l2loopback to support userptr <br> i am not video expert, in fact, quite new.<br> I wonder whyv4l2loopback did not support userptr mode<br></div><div> dou you think this is a hude task ?<br></div><div> can you see
Any specific challenge ?
I<br></div><div><br></div><div> PS: my userptr works with shared memeory<br></div><div> it should be accessible in user and kernel mode <br></div><div> (as the code worked with physical camera)<br><br> option4: writing a tool that replace v4l2loopback and gstramer </div><div> My single goal
is to mimic
A camera driver
<br> that reads images from disk and writes it to v4l2 using userptr.
</div><div>
<p dir="auto"> so maybe I should just write an app,<br> that declares the device and writes to v4l2 directly , just like driver do ?<br> <br></p><br><br></div><div><br></div></div>
</div></div>