GNOME Bugzilla – Bug 730698
v4lsrc: Fails using glimagesink in userptr
Last modified: 2014-05-25 14:59:35 UTC
When building v4l2 plugin in -good without libv4l2, one can start using userptr IO mode. For UVC camera, it should work with any kind of allocated buffer. Though, while it works with xvimagesink, it results in random output with glimagesink, but I don't know yet why. gst-launch-1.0 v4l2src io-mode=userptr ! glimagesink While the following works gst-launch-1.0 v4l2src io-mode=userptr ! xvimagesink
Oh, just notice I don't configure the other pool, though activating that pool should fail, unless the pool was pre-configured, which isn't ideal.
Hmm, but even fixing that, does not fix the problem :-S
Actually we where already configuring the pool in propose_allocation, need to find what else is wrong.
Ok, after fixing tons of decide_allocation bugs, adding use of proposed allocator (even though this was not strictly required), it was still failing. Then I track it down to the frame mapping code and found that flags MAP_READ was set instead of write (capture and output was flipped), doh!.
commit aff64af8ad8adf57b107d85083926f80e5291952 Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> Date: Sat May 24 18:43:28 2014 -0400 v4l2bufferpool: Fix USERPTR map flags We need to map READ only for output and write only for capture, we where doing the opposite. This fixing USERPTR with glimagesink https://bugzilla.gnome.org/show_bug.cgi?id=730698