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

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jun 21 15:14:29 UTC 2016


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

--- Comment #5 from Julien Isorce <julien.isorce at gmail.com> ---
(In reply to Sebastian Dröge (slomo) from comment #4)
> Review of attachment 330143 [details] [review]:
> 
> ::: gst/gstmemory.c
> @@ +343,3 @@
> + * @flags: mapping flags
> + *
> + * Same as gst_memory_map() except that it does not log an error on failure.
> 
> Maybe we shouldn't make this too explicit. We might want to add a vfunc for
> that to GstMemory later that does things differently for example. That it
> just does the same except for the error logging seems not too useful.

Thx for the comments, do you mean like allocator->mem_map_full and
allocator->mem_map it should be a mem_try_map ? Because I do not see much value
of this since the underlying impl can already do what it prefers.

Or do you mean calling an hypothetic allocator->mem_on_map_fails instead of
GST_CAT_ERROR in current gst_memory_map ?

Other way could be to pass a function pointer in parameter of
gst_memory_try_map and calling that on error, and fallback to default if NULL.

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