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 430664 - [rtpmanager] name conflict for "rtpbin" element with farsight plugins
[rtpmanager] name conflict for "rtpbin" element with farsight plugins
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-17 13:30 UTC by Laurent Glayal
Modified: 2007-08-23 21:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Laurent Glayal 2007-04-17 13:30:34 UTC
Hi,
New "rtpbin" element (and may be others) name conflict with the old one provided by gst-plugins-farsight.

Regards.
Comment 1 Laurent Glayal 2007-04-17 13:52:07 UTC
This conflict also exist for :
rtpssrcdemux
rtpsession
rtpjitterbuffer
Comment 2 Wim Taymans 2007-05-28 11:52:13 UTC
how do you want to proceed? rename the ones in -bad? It seems hard for us to track plugin names from other repositories.
Comment 3 Laurent Glayal 2007-05-28 12:20:36 UTC
As gst-plugins-farsight is already used for a long time i think it should keep these names. rtpmanager elements could be renamed with a '2', like decodebin2... no ? 
Comment 4 Jan Schmidt 2007-05-28 12:55:43 UTC
I'd rather see them called gst*, personally.
Comment 5 Laurent Glayal 2007-05-28 14:07:22 UTC
You're right, its more logical ...
Comment 6 Wim Taymans 2007-05-28 16:38:14 UTC
        * docs/plugins/gst-plugins-bad-plugins-docs.sgml:
        * docs/plugins/gst-plugins-bad-plugins-sections.txt:
        * gst/rtpmanager/gstrtpbin.c: (create_session), (create_stream),
        (gst_rtp_bin_class_init), (create_recv_rtp), (create_recv_rtcp),
        (create_send_rtp), (create_rtcp), (gst_rtp_bin_request_new_pad):
        * gst/rtpmanager/gstrtpclient.c: (create_stream),
        (gst_rtp_client_request_new_pad):
        * gst/rtpmanager/gstrtpjitterbuffer.c:
        (gst_rtp_jitter_buffer_clear_pt_map), (gst_rtp_jitter_buffer_loop):
        * gst/rtpmanager/gstrtpmanager.c: (plugin_init):
        * gst/rtpmanager/gstrtpptdemux.c:
        * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
        (gst_rtp_session_request_new_pad):
        * gst/rtpmanager/gstrtpssrcdemux.c:
        Rename elements to avoid conflict with farsight elements with the same
        name. Fixes #430664.
Comment 7 Laurent Glayal 2007-07-06 10:26:23 UTC
Well, the elements names are different but the structures used to register plugins have the same names, for ex :

Farsight :
gstrtpbin.h:#define GST_RTP_BIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_BIN,GstRTPBin))
gstrtpbin.h:#define GST_RTP_BIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_BIN,GstRTPBinClass))
gstrtpbin.h:typedef struct _GstRTPBin GstRTPBin;
gstrtpbin.h:typedef struct _GstRTPBinClass GstRTPBinClass;
gstrtpbin.h:struct _GstRTPBin
gstrtpbin.h:struct _GstRTPBinClass

RtpManager :
gstrtpbin.h:  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_BIN,GstRTPBin))
gstrtpbin.h:  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_BIN,GstRTPBinClass))
gstrtpbin.h:typedef struct _GstRTPBin GstRTPBin;
gstrtpbin.h:typedef struct _GstRTPBinClass GstRTPBinClass;
gstrtpbin.h:typedef struct _GstRTPBinPrivate GstRTPBinPrivate;
gstrtpbin.h:struct _GstRTPBin {
gstrtpbin.h:  GstRTPBinPrivate *priv;
gstrtpbin.h:struct _GstRTPBinClass {

So rtp plugins from rtpmanager and rtp plugins from farsight can't be both installed/registered.
Comment 8 Tim-Philipp Müller 2007-07-06 12:12:22 UTC
> Well, the elements names are different but the structures used to register
> plugins have the same names, for ex :
>
>  (snip)
> 
> So rtp plugins from rtpmanager and rtp plugins from farsight can't be both
> installed/registered.

The GStreamer headers for these elements are not installed, and none of the _get_type() functions should be exported symbols, so it shouldn't be a problem as far as I can see.

Comment 9 Laurent Glayal 2007-07-06 12:57:44 UTC
but _get_type inside farsight issue a             

g_type_register_static (GST_TYPE_BIN, "GstRTPBin",
                    &gst_rtp_bin_info, 0);

and rtpbin from rtpmanager issue something similar from GST_BOILERPLATE, with the same type name GstRTPBin.
Comment 10 Tim-Philipp Müller 2007-07-06 14:14:54 UTC
> but _get_type inside farsight issue a             
> 
> g_type_register_static (GST_TYPE_BIN, "GstRTPBin",
>                     &gst_rtp_bin_info, 0);
> 
> and rtpbin from rtpmanager issue something similar from GST_BOILERPLATE, with
> the same type name GstRTPBin.

Right, that needs fixing then I guess *sigh*.
Comment 11 Laurent Glayal 2007-07-10 13:13:41 UTC
Replacing all structures named 'GstRTP*' inside gst-plugins-farsight by 'GstFarsightRTP*' solved the conflict. Works Fine.
Comment 12 Jan Schmidt 2007-07-10 13:26:49 UTC
That's overkill - it's sufficient just to rename the type in g_type_register_static - the name of the structures themselves is irrelevant, since neither plugin is installing any headers.
Comment 13 Jan Schmidt 2007-07-10 13:29:52 UTC
Which would be a great solution in -bad's rtpmanager too, except that we're using GST_BOILERPLATE to register the type for us and it always uses the same string for the GObject type name as for the structure.
Comment 14 Tim-Philipp Müller 2007-08-23 15:18:57 UTC
Suggestion: how about renaming all GstRTPFoo structs to GstRtpFoo - that should do the trick, shouldn't it? (looks nicer too IMHO)
Comment 15 Tim-Philipp Müller 2007-08-23 21:40:25 UTC
2007-08-23  Tim-Philipp Müller  <tim at centricular dot net>

        * docs/plugins/gst-plugins-bad-plugins-sections.txt:
        * docs/plugins/gst-plugins-bad-plugins.hierarchy:
        * docs/plugins/gst-plugins-bad-plugins.interfaces:
        * docs/plugins/gst-plugins-bad-plugins.signals:
        * gst/rtpmanager/gstrtpbin.c:
        * gst/rtpmanager/gstrtpbin.h:
        * gst/rtpmanager/gstrtpclient.c:
        * gst/rtpmanager/gstrtpclient.h:
        * gst/rtpmanager/gstrtpjitterbuffer.c:
        * gst/rtpmanager/gstrtpjitterbuffer.h:
        * gst/rtpmanager/gstrtpptdemux.c:
        * gst/rtpmanager/gstrtpptdemux.h:
        * gst/rtpmanager/gstrtpsession.c:
        * gst/rtpmanager/gstrtpsession.h:
        * gst/rtpmanager/gstrtpssrcdemux.c:
        * gst/rtpmanager/gstrtpssrcdemux.h:
          Rename all GstRTPFoo structs to GstRtpFoo so that GST_BOILERPLATE
          registers a GType that's different than the GstRTPFoo types that
          farsight registers (luckily GType names are case sensitive). Should
          finally fix #430664.