After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 515373 - Patch to add Gst::Index
Patch to add Gst::Index
Status: RESOLVED FIXED
Product: gstreamermm
Classification: Bindings
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on: 515469
Blocks:
 
 
Reported: 2008-02-09 10:23 UTC by Siavash Safi
Modified: 2011-01-16 23:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Gst::Index patch (11.16 KB, patch)
2008-02-09 10:24 UTC, Siavash Safi
none Details | Review
Gst::index patch (10.01 KB, patch)
2008-02-09 11:25 UTC, Siavash Safi
committed Details | Review

Description Siavash Safi 2008-02-09 10:23:33 UTC
The patch adds Gst::Index
Comment 1 Siavash Safi 2008-02-09 10:24:16 UTC
Created attachment 104772 [details] [review]
Gst::Index patch
Comment 2 Murray Cumming 2008-02-09 11:02:52 UTC
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:

Comment 3 Siavash Safi 2008-02-09 11:25:38 UTC
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)
Comment 4 Murray Cumming 2008-02-09 13:41:51 UTC
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
Comment 5 Murray Cumming 2008-02-10 16:09:17 UTC
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.
Comment 6 Murray Cumming 2009-01-07 21:20:41 UTC
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.