GNOME Bugzilla – Bug 430664
[rtpmanager] name conflict for "rtpbin" element with farsight plugins
Last modified: 2007-08-23 21:40:25 UTC
Hi, New "rtpbin" element (and may be others) name conflict with the old one provided by gst-plugins-farsight. Regards.
This conflict also exist for : rtpssrcdemux rtpsession rtpjitterbuffer
how do you want to proceed? rename the ones in -bad? It seems hard for us to track plugin names from other repositories.
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 ?
I'd rather see them called gst*, personally.
You're right, its more logical ...
* 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.
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.
> 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.
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.
> 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*.
Replacing all structures named 'GstRTP*' inside gst-plugins-farsight by 'GstFarsightRTP*' solved the conflict. Works Fine.
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.
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.
Suggestion: how about renaming all GstRTPFoo structs to GstRtpFoo - that should do the trick, shouldn't it? (looks nicer too IMHO)
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.