mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
dtmf: 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-good/-/merge_requests/876>
This commit is contained in:
parent
6823afde01
commit
6c8eb5bcd6
7 changed files with 14 additions and 33 deletions
|
@ -27,16 +27,13 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_dtmf_src_plugin_init (plugin))
|
gboolean ret = FALSE;
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (!gst_rtp_dtmf_src_plugin_init (plugin))
|
ret |= GST_ELEMENT_REGISTER (dtmfsrc, plugin);
|
||||||
return FALSE;
|
ret |= GST_ELEMENT_REGISTER (rtpdtmfsrc, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (rtpdtmfdepay, plugin);
|
||||||
|
|
||||||
if (!gst_rtp_dtmf_depay_plugin_init (plugin))
|
return ret;
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -173,6 +173,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
|
||||||
#define parent_class gst_dtmf_src_parent_class
|
#define parent_class gst_dtmf_src_parent_class
|
||||||
G_DEFINE_TYPE (GstDTMFSrc, gst_dtmf_src, GST_TYPE_BASE_SRC);
|
G_DEFINE_TYPE (GstDTMFSrc, gst_dtmf_src, GST_TYPE_BASE_SRC);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (dtmfsrc, "dtmfsrc", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DTMF_SRC);
|
||||||
|
|
||||||
static void gst_dtmf_src_finalize (GObject * object);
|
static void gst_dtmf_src_finalize (GObject * object);
|
||||||
|
|
||||||
|
@ -949,10 +951,3 @@ failure:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_dtmf_src_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "dtmfsrc",
|
|
||||||
GST_RANK_NONE, GST_TYPE_DTMF_SRC);
|
|
||||||
}
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ struct _GstDTMFSrcClass
|
||||||
|
|
||||||
GType gst_dtmf_src_get_type (void);
|
GType gst_dtmf_src_get_type (void);
|
||||||
|
|
||||||
gboolean gst_dtmf_src_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (dtmfsrc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_DTMF_SRC_H__ */
|
#endif /* __GST_DTMF_SRC_H__ */
|
||||||
|
|
|
@ -155,6 +155,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstRtpDTMFDepay, gst_rtp_dtmf_depay,
|
G_DEFINE_TYPE (GstRtpDTMFDepay, gst_rtp_dtmf_depay,
|
||||||
GST_TYPE_RTP_BASE_DEPAYLOAD);
|
GST_TYPE_RTP_BASE_DEPAYLOAD);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (rtpdtmfdepay, "rtpdtmfdepay", GST_RANK_MARGINAL,
|
||||||
|
GST_TYPE_RTP_DTMF_DEPAY);
|
||||||
|
|
||||||
static void gst_rtp_dtmf_depay_set_property (GObject * object, guint prop_id,
|
static void gst_rtp_dtmf_depay_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
@ -489,10 +491,3 @@ bad_packet:
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_rtp_dtmf_depay_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "rtpdtmfdepay",
|
|
||||||
GST_RANK_MARGINAL, GST_TYPE_RTP_DTMF_DEPAY);
|
|
||||||
}
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ struct _GstRtpDTMFDepayClass
|
||||||
|
|
||||||
GType gst_rtp_dtmf_depay_get_type (void);
|
GType gst_rtp_dtmf_depay_get_type (void);
|
||||||
|
|
||||||
gboolean gst_rtp_dtmf_depay_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (rtpdtmfdepay);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_RTP_DTMF_DEPAY_H__ */
|
#endif /* __GST_RTP_DTMF_DEPAY_H__ */
|
||||||
|
|
|
@ -135,6 +135,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstRTPDTMFSrc, gst_rtp_dtmf_src, GST_TYPE_BASE_SRC);
|
G_DEFINE_TYPE (GstRTPDTMFSrc, gst_rtp_dtmf_src, GST_TYPE_BASE_SRC);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (rtpdtmfsrc, "rtpdtmfsrc", GST_RANK_NONE,
|
||||||
|
GST_TYPE_RTP_DTMF_SRC);
|
||||||
|
|
||||||
static void gst_rtp_dtmf_src_finalize (GObject * object);
|
static void gst_rtp_dtmf_src_finalize (GObject * object);
|
||||||
|
|
||||||
|
@ -1137,10 +1139,3 @@ gst_rtp_dtmf_src_unlock_stop (GstBaseSrc * src)
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_rtp_dtmf_src_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "rtpdtmfsrc",
|
|
||||||
GST_RANK_NONE, GST_TYPE_RTP_DTMF_SRC);
|
|
||||||
}
|
|
||||||
|
|
|
@ -108,8 +108,7 @@ struct _GstRTPDTMFSrcClass
|
||||||
|
|
||||||
GType gst_rtp_dtmf_src_get_type (void);
|
GType gst_rtp_dtmf_src_get_type (void);
|
||||||
|
|
||||||
gboolean gst_rtp_dtmf_src_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (rtpdtmfsrc);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_RTP_DTMF_SRC_H__ */
|
#endif /* __GST_RTP_DTMF_SRC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue