mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
realmedia: allow per feature registration
Split plugin into features including dynamic types which can be indiviually registered during a static build. More details here: https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/79>
This commit is contained in:
parent
f2a9ea9d7b
commit
c3525ca78c
13 changed files with 28 additions and 65 deletions
|
@ -58,6 +58,8 @@ static void gst_pnm_src_uri_handler_init (gpointer g_iface,
|
|||
#define gst_pnm_src_parent_class parent_class
|
||||
G_DEFINE_TYPE_WITH_CODE (GstPNMSrc, gst_pnm_src, GST_TYPE_PUSH_SRC,
|
||||
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_pnm_src_uri_handler_init));
|
||||
GST_ELEMENT_REGISTER_DEFINE (pnmsrc, "pnmsrc",
|
||||
GST_RANK_MARGINAL, GST_TYPE_PNM_SRC);
|
||||
|
||||
static void gst_pnm_src_finalize (GObject * object);
|
||||
|
||||
|
@ -110,13 +112,6 @@ gst_pnm_src_init (GstPNMSrc * pnmsrc)
|
|||
pnmsrc->location = g_strdup (DEFAULT_LOCATION);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_pnm_src_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "pnmsrc",
|
||||
GST_RANK_MARGINAL, GST_TYPE_PNM_SRC);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_pnm_src_finalize (GObject * object)
|
||||
{
|
||||
|
|
|
@ -52,7 +52,7 @@ struct _GstPNMSrcClass
|
|||
};
|
||||
|
||||
GType gst_pnm_src_get_type (void);
|
||||
gboolean gst_pnm_src_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (pnmsrc);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -61,6 +61,8 @@ GST_DEBUG_CATEGORY_STATIC (real_audio_demux_debug);
|
|||
|
||||
#define gst_real_audio_demux_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstRealAudioDemux, gst_real_audio_demux, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE (rademux, "rademux",
|
||||
GST_RANK_SECONDARY, GST_TYPE_REAL_AUDIO_DEMUX);
|
||||
|
||||
static GstStateChangeReturn gst_real_audio_demux_change_state (GstElement * e,
|
||||
GstStateChange transition);
|
||||
|
@ -996,10 +998,3 @@ gst_real_audio_demux_change_state (GstElement * element,
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_rademux_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "rademux",
|
||||
GST_RANK_SECONDARY, GST_TYPE_REAL_AUDIO_DEMUX);
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ struct _GstRealAudioDemuxClass {
|
|||
|
||||
GType gst_real_audio_demux_get_type (void);
|
||||
|
||||
gboolean gst_rademux_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (rademux);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -66,6 +66,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
|
||||
#define gst_rdt_depay_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstRDTDepay, gst_rdt_depay, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE (rdtdepay, "rdtdepay",
|
||||
GST_RANK_MARGINAL, GST_TYPE_RDT_DEPAY);
|
||||
|
||||
static void gst_rdt_depay_finalize (GObject * object);
|
||||
|
||||
|
@ -492,10 +494,3 @@ gst_rdt_depay_change_state (GstElement * element, GstStateChange transition)
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_rdt_depay_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "rdtdepay",
|
||||
GST_RANK_MARGINAL, GST_TYPE_RDT_DEPAY);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ struct _GstRDTDepayClass
|
|||
|
||||
GType gst_rdt_depay_get_type (void);
|
||||
|
||||
gboolean gst_rdt_depay_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (rdtdepay);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -337,6 +337,8 @@ free_session (GstRDTManagerSession * session)
|
|||
|
||||
#define gst_rdt_manager_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstRDTManager, gst_rdt_manager, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE (rdtmanager, "rdtmanager",
|
||||
GST_RANK_NONE, GST_TYPE_RDT_MANAGER);
|
||||
|
||||
/* BOXED:UINT,UINT */
|
||||
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
|
||||
|
@ -1367,10 +1369,3 @@ static void
|
|||
gst_rdt_manager_release_pad (GstElement * element, GstPad * pad)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_rdt_manager_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "rdtmanager",
|
||||
GST_RANK_NONE, GST_TYPE_RDT_MANAGER);
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ struct _GstRDTManagerClass {
|
|||
|
||||
GType gst_rdt_manager_get_type(void);
|
||||
|
||||
gboolean gst_rdt_manager_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (rdtmanager);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -31,25 +31,16 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
if (!gst_rmdemux_plugin_init (plugin))
|
||||
return FALSE;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
if (!gst_rademux_plugin_init (plugin))
|
||||
return FALSE;
|
||||
ret |= GST_ELEMENT_REGISTER (rmdemux, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (rademux, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (rdtdepay, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (rdtmanager, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (rtspreal, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (pnmsrc, plugin);
|
||||
|
||||
if (!gst_rdt_depay_plugin_init (plugin))
|
||||
return FALSE;
|
||||
|
||||
if (!gst_rdt_manager_plugin_init (plugin))
|
||||
return FALSE;
|
||||
|
||||
if (!gst_rtsp_real_plugin_init (plugin))
|
||||
return FALSE;
|
||||
|
||||
if (!gst_pnm_src_plugin_init (plugin))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -192,6 +192,9 @@ gst_rmdemux_get_type (void)
|
|||
return rmdemux_type;
|
||||
}
|
||||
|
||||
GST_ELEMENT_REGISTER_DEFINE (rmdemux, "rmdemux",
|
||||
GST_RANK_PRIMARY, GST_TYPE_RMDEMUX);
|
||||
|
||||
static void
|
||||
gst_rmdemux_base_init (GstRMDemuxClass * klass)
|
||||
{
|
||||
|
@ -2632,10 +2635,3 @@ not_enough_data:
|
|||
return GST_FLOW_OK;
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_rmdemux_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "rmdemux",
|
||||
GST_RANK_PRIMARY, GST_TYPE_RMDEMUX);
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ struct _GstRMDemuxClass {
|
|||
#define GST_RM_AUD_xRA4 GST_MAKE_FOURCC('.','r','a','4') // Not a real audio codec
|
||||
#define GST_RM_AUD_xRA5 GST_MAKE_FOURCC('.','r','a','5') // Not a real audio codec
|
||||
|
||||
gboolean gst_rmdemux_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (rmdemux);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -673,6 +673,8 @@ static void gst_rtsp_real_finalize (GObject * obj);
|
|||
G_DEFINE_TYPE_WITH_CODE (GstRTSPReal, gst_rtsp_real, GST_TYPE_ELEMENT,
|
||||
G_IMPLEMENT_INTERFACE (GST_TYPE_RTSP_EXTENSION,
|
||||
gst_rtsp_real_extension_init));
|
||||
GST_ELEMENT_REGISTER_DEFINE (rtspreal, "rtspreal",
|
||||
GST_RANK_MARGINAL, GST_TYPE_RTSP_REAL);
|
||||
|
||||
static void
|
||||
gst_rtsp_real_class_init (GstRTSPRealClass * g_class)
|
||||
|
@ -731,10 +733,3 @@ gst_rtsp_real_extension_init (gpointer g_iface, gpointer iface_data)
|
|||
iface->stream_select = rtsp_ext_real_stream_select;
|
||||
iface->get_transports = rtsp_ext_real_get_transports;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_rtsp_real_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "rtspreal",
|
||||
GST_RANK_MARGINAL, GST_TYPE_RTSP_REAL);
|
||||
}
|
||||
|
|
|
@ -85,7 +85,8 @@ struct _GstRTSPRealClass {
|
|||
|
||||
GType gst_rtsp_real_get_type(void);
|
||||
|
||||
gboolean gst_rtsp_real_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (rtspreal);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue