[Bug 776927] gl: gldownload: convert GstGLMemory to GstDmaBuf

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue May 16 21:19:14 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=776927

--- Comment #26 from Matt Fischer <mattfischer84 at gmail.com> ---
(In reply to Nicolas Dufresne (stormer) from comment #25)
> I miss that in the review, you indeed need to check if the vmeta pointer is
> null, otherwise your code may crash. To check if downstream supports
> GstVideoMeta, you need to look into the allocation query. See
> "propose_allocation" function in _UploadMethod structure. There is a
> "decide_query" pointer that contains this information. Then you can get the
> information using:
> 
>   gst_query_find_allocation_meta(query, GST_VIDEO_META_API_TYPE, NULL)
> 
That makes sense, and I can add that if necessary.  However, I was wondering if
we need to go to that much trouble.  Would it be sufficient simply to say if
the inbuf has a VideoMeta then we're allowed to put one on the outbuf, and if
it doesn't have one, then just don't bother with exporting at all?  The offset
and stride have to be communicated on the outbuf through a VideoMeta, and so if
we can't put one on there, then we really can't perform the export at all.  And
if the input buffer had a VideoMeta, then it seems like the pipeline had
already negotiated that it was ok to pass them downstream anyway.  Would that
be sufficient, or is that missing some case that we need to cover?

> You should not be calling get_proc_address() for each frame, but cache those
> function pointer. That being said, I just noticed Mathew started doing that,
> so you took that from existing code. We can fix that later, it's just
> slightly inefficient.
> 
Yeah, I hadn't seen any other code doing that, so I didn't try to do it in here
either.  It's worth noting that the gst_egl_image_export_dmabuf() calls only
happen once when we start up, and from then on are reused, so this is not
happening per frame.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list