GNOME Bugzilla – Bug 515373
Patch to add Gst::Index
Last modified: 2011-01-16 23:37:52 UTC
The patch adds Gst::Index
Created attachment 104772 [details] [review] Gst::Index patch
It looks pretty good, but: 1. This doesn't belong here: - _WRAP_METHOD(Glib::RefPtr<Buffer> make_writable(), gst_buffer_make_writable) + _WRAP_METHOD(Glib::RefPtr<Buffer> make_metadata_writable(), gst_buffer_make_metadata_writable) //This is const because it always returns a new buffer: _WRAP_METHOD(Glib::RefPtr<Buffer> make_metadata_writable() const, gst_buffer_make_metadata_writable) That method already exists, and gst_buffer_make_writable() really should be wrapped (by hand if necessary). 2. Please use int instead of gint in the C++ API. 3. The const int& parameters makes no sense. Just use int:
Created attachment 104777 [details] [review] Gst::index patch oops, sorry for the mistake. I'll fix Gst::Buffer::make_writable() in a separate patch (there are several problems in gst::ChildProxy too)
Sorry. There's another problem. Your callbacks delete the slots after the first call, but the they will probably be called repeatedly. You need to provide a destroy callback. For instance, gst_index_set_filter_full() seems to have been added to allow that: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstIndex.html#gst-index-set-filter-full
I have committed the patch, with some changes, and a TODO for the set_resolver() problem. Let's leave this bug open until we fix that.
You seem to have corrected the implemention of set_filter() and I can't now find any TODO near set_resolver() so we can close this bug.