After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730698 - v4lsrc: Fails using glimagesink in userptr
v4lsrc: Fails using glimagesink in userptr
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal minor
: 1.3.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-24 20:46 UTC by Nicolas Dufresne (ndufresne)
Modified: 2014-05-25 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolas Dufresne (ndufresne) 2014-05-24 20:46:17 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
Comment 1 Nicolas Dufresne (ndufresne) 2014-05-24 20:57:25 UTC
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.
Comment 2 Nicolas Dufresne (ndufresne) 2014-05-24 21:19:18 UTC
Hmm, but even fixing that, does not fix the problem :-S
Comment 3 Nicolas Dufresne (ndufresne) 2014-05-24 21:27:57 UTC
Actually we where already configuring the pool in propose_allocation, need to find what else is wrong.
Comment 4 Nicolas Dufresne (ndufresne) 2014-05-24 22:41:39 UTC
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!.
Comment 5 Nicolas Dufresne (ndufresne) 2014-05-25 00:12:42 UTC
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