GNOME Bugzilla – Bug 775727
buffer: add gst_buffer_iterate_meta_filtered() convenience function
Last modified: 2016-12-14 18:21:43 UTC
Created attachment 341513 [details] [review] buffer: add gst_buffer_iterate_meta_filtered() Pretty much every user of gst_buffer_iterate_meta() filters for a specific api type. Maybe it should be called iterate_meta_api() instead, dunno.
Review of attachment 341513 [details] [review]: Looks good to me > Maybe it should be called iterate_meta_api() instead, dunno. Then it would be iterating over meta APIs, not metas IMHO. iterate_meta_filtered_by_api() could make sense but what else would you filter on? ::: gst/gstbuffer.c @@ +2279,3 @@ + * gst_buffer_iterate_meta_filtered: + * @buffer: a #GstBuffer + * @state: an opaque state pointer That should probably be marked as "out". Is this usable in bindings without having some non-void typedef instead?
> + * gst_buffer_iterate_meta_filtered: > + * @buffer: a #GstBuffer > + * @state: an opaque state pointer > > That should probably be marked as "out". Probably, or (inout). > Is this usable in bindings without > having some non-void typedef instead? No idea, I just copied it from gst_buffer_iterate_meta() :) I suspect both should just be marked as 'skip' for bindings, bindings can use gst_buffer_meta_foreach().
This is not usable in bindings, so I'll just mark it as '(skip)'. Bindings can use the foreach function instead.
I also don't think a simple typedef would be enough, you'd have to register a boxed type and implement copy/free funcs and such.
commit 3d283665cc7bf8cd64df4ed5c366e464f9c8e41c Author: Tim-Philipp Müller <tim@centricular.com> Date: Wed Dec 14 18:19:00 2016 +0000 tests: meta: add test for gst_buffer_iterate_meta*() https://bugzilla.gnome.org/show_bug.cgi?id=775727 commit ca4ac71555512befd628f9728bbbb0f5c7374d49 Author: Tim-Philipp Müller <tim@centricular.com> Date: Sat Dec 3 13:05:03 2016 +0000 buffer: add gst_buffer_iterate_meta_filtered() For convenience. Pretty much every user of gst_buffer_iterate_meta() filters for a specific api type. https://bugzilla.gnome.org/show_bug.cgi?id=775727 commit de65b88d13389a7c1e82ac0fdd5ab0195af20215 Author: Tim-Philipp Müller <tim@centricular.com> Date: Wed Dec 14 15:22:30 2016 +0000 buffer: mark gst_buffer_iterate_meta() as 'skip' for bindings The pointer state arg won't work well, bindings can use the foreach function instead. https://bugzilla.gnome.org/show_bug.cgi?id=775727