[Bug 765600] memory: add gst_memory_try_map() or new GstMapFlags to silence GST_ERROR

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jun 22 08:07:35 UTC 2016


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

--- Comment #9 from Julien Isorce <julien.isorce at gmail.com> ---
It is bad because soon every time one will run a pipeline involving
gstvaapidecodebin he will see 2 GST_ERROR (buffer pool size). Indeed on going
work from Victor here https://github.com/ceyusa/gstreamer-vaapi/commits/755072
will always try to use dmabuf. That is a consensus we came to with Benjamin,
Nicolas, Victor and myself.
I personally can live with that but it is confusing for the user since it is a
non-failure execution path (platform limitation or protected memory).

Indeed for system memory the map never fails. Double mapping is only a
GST_DEBUG log trace.
Also I grep for "map_full (GstMemory" and "map (GstMemory". Only one occurrence
in -base, gst_fd_mem_map and it already logs a GST_ERROR before returning NULL.
(returning NULL from the vfunc map or map_full it the one that leads to the
GST_ERROR in gst_memory_map call).

In -bad, some do GST_ERROR, some not. So for some it leads to have twice
GST_ERROR (from parent and from impl). (having a GST_WARNING would not help I
think)

I can remove the GST_ERROR from gst_memory_map, and add GST_ERROR in -bad for
remaining memories that do not log it. (And why not adding
G_GNUC_WARN_UNUSED_RESULT in gst_memory_map declaration ? I can grep places
where the return is not used and add missing checks)

-- 
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