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 518932 - Expose gst_segment_copy() to facilitate wrapping of GstSegment by glibmm
Expose gst_segment_copy() to facilitate wrapping of GstSegment by glibmm
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-26 21:49 UTC by José Alburquerque
Modified: 2008-04-09 22:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Patch declaring gst_segment_copy() in gstsegment.h (528 bytes, patch)
2008-02-26 21:50 UTC, José Alburquerque
none Details | Review
New patch with gtk doc block (1.22 KB, patch)
2008-02-27 00:40 UTC, José Alburquerque
none Details | Review
Better gtkdoc block (1.20 KB, patch)
2008-02-27 00:51 UTC, José Alburquerque
committed Details | Review

Description José Alburquerque 2008-02-26 21:49:15 UTC
Hi.  Would it be possible to declare gst_segment_copy() in gstsegment.h?  This would allow glibmm to wrap GstSegment (for C++ API) easier.  If so, would this patch work?  Thanks.
Comment 1 José Alburquerque 2008-02-26 21:50:28 UTC
Created attachment 106027 [details] [review]
Patch declaring gst_segment_copy() in gstsegment.h
Comment 2 Tim-Philipp Müller 2008-02-26 23:49:27 UTC
If you make gst_segment_copy() public, you should also provide a gtk-doc chunk for it.

Alternatively you could use

  copy = g_boxed_copy (GST_TYPE_SEGMENT, segment);

Comment 3 José Alburquerque 2008-02-27 00:38:56 UTC
Thanks.  Um...This, as in bug #518934, has to do with how glibmm automatically works with some types.  It assumes that a boxed typed will have a single parameter copy() function named after the type in lowercase with underscores between the words (for example gst_segment_copy() in the case of GstSegment) and use that to generate C++ constructors.  glibmm lets you specify the function name in the *.hg file so your suggestion almost worked, but processing failed because g_boxed_copy() uses two arguments. :-)

Would the new patch be better accepted?  Thanks.
Comment 4 José Alburquerque 2008-02-27 00:40:38 UTC
Created attachment 106038 [details] [review]
New patch with gtk doc block
Comment 5 José Alburquerque 2008-02-27 00:49:36 UTC
(In reply to comment #3)
> 
> Would the new patch be better accepted?  Thanks.
> 

I would guess not since the gtkmm block was done badly.  Apologies.  Is last patch better?
Comment 6 José Alburquerque 2008-02-27 00:51:18 UTC
Created attachment 106039 [details] [review]
Better gtkdoc block
Comment 7 Tim-Philipp Müller 2008-04-09 22:39:13 UTC
Thanks, committed with additional Since: 0.10.20 marker in the gtk-doc blurb:

  2008-04-09  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by:  José Alburquerque <jaalburqu at svn dot gnome dot org>

        * docs/gst/gstreamer-sections.txt:
        * gst/gstsegment.c:
        * gst/gstsegment.h:
        * win32/common/libgstreamer.def:
          Expose gst_segment_copy() to make things easier for the c++ bindings.
          Fixes #518932.
          API: gst_segment_copy()