Commit 45e70563 authored by Ronald S. Bultje's avatar Ronald S. Bultje

RTP done

Original commit message from CVS:
RTP done
parent fbdc88a4
......@@ -17,25 +17,34 @@
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include "gstrtpL16enc.h"
#include "gstrtpL16parse.h"
#include "gstrtpgsmenc.h"
#include "gstrtpgsmparse.h"
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
gst_rtpL16enc_plugin_init (module, plugin);
gst_rtpL16parse_plugin_init (module, plugin);
gst_rtpgsmenc_plugin_init (module, plugin);
gst_rtpgsmparse_plugin_init (module, plugin);
if (!gst_rtpL16enc_plugin_init (plugin) ||
!gst_rtpL16parse_plugin_init (plugin) ||
!gst_rtpgsmenc_plugin_init (plugin) ||
!gst_rtpgsmparse_plugin_init (plugin))
return FALSE;
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"rtp",
plugin_init
};
"Real-time protocol plugins",
plugin_init,
VERSION,
"LGPL",
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN
)
......@@ -23,11 +23,8 @@
static GstElementDetails gst_rtp_L16parse_details = {
"RTP packet parser",
"Codec/Network",
"GPL",
"Extracts raw audio from RTP packets",
VERSION,
"Zeeshan Ali <zak147@yahoo.com>",
"(C) 2003",
"Zeeshan Ali <zak147@yahoo.com>"
};
/* RtpL16Parse signals and args */
......@@ -70,6 +67,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory,
);
static void gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass);
static void gst_rtpL16parse_base_init (GstRtpL16ParseClass * klass);
static void gst_rtpL16parse_init (GstRtpL16Parse * rtpL16parse);
static void gst_rtpL16parse_chain (GstPad * pad, GstData *_data);
......@@ -89,7 +87,7 @@ static GType gst_rtpL16parse_get_type (void)
if (!rtpL16parse_type) {
static const GTypeInfo rtpL16parse_info = {
sizeof (GstRtpL16ParseClass),
NULL,
(GBaseInitFunc) gst_rtpL16parse_base_init,
NULL,
(GClassInitFunc) gst_rtpL16parse_class_init,
NULL,
......@@ -104,6 +102,18 @@ static GType gst_rtpL16parse_get_type (void)
return rtpL16parse_type;
}
static void
gst_rtpL16parse_base_init (GstRtpL16ParseClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_factory));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_class_set_details (element_class, &gst_rtp_L16parse_details);
}
static void
gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass)
{
......@@ -322,17 +332,8 @@ gst_rtpL16parse_change_state (GstElement * element)
}
gboolean
gst_rtpL16parse_plugin_init (GModule * module, GstPlugin * plugin)
gst_rtpL16parse_plugin_init (GstPlugin * plugin)
{
GstElementFactory *rtpL16parse;
rtpL16parse = gst_element_factory_new ("rtpL16parse", GST_TYPE_RTP_L16_PARSE, &gst_rtp_L16parse_details);
g_return_val_if_fail (rtpL16parse != NULL, FALSE);
gst_element_factory_add_pad_template (rtpL16parse, GST_PAD_TEMPLATE_GET (src_factory));
gst_element_factory_add_pad_template (rtpL16parse, GST_PAD_TEMPLATE_GET (sink_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (rtpL16parse));
return TRUE;
return gst_element_register (plugin, "rtpL16parse",
GST_RANK_NONE, GST_TYPE_RTP_L16_PARSE);
}
......@@ -63,7 +63,7 @@ struct _GstRtpL16ParseClass
#define GST_IS_RTP_L16_PARSE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_PARSE))
gboolean gst_rtpL16parse_plugin_init (GModule * module, GstPlugin * plugin);
gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus
}
......
......@@ -27,11 +27,8 @@
static GstElementDetails gst_rtpL16enc_details = {
"RTP RAW Audio Encoder",
"Codec/Network",
"LGPL",
"Encodes Raw Audio into an RTP packet",
VERSION,
"Zeeshan Ali <zak147@yahoo.com>",
"(C) 2003",
"Zeeshan Ali <zak147@yahoo.com>"
};
/* RtpL16Enc signals and args */
......@@ -74,6 +71,7 @@ GST_PAD_TEMPLATE_FACTORY (src_factory,
);
static void gst_rtpL16enc_class_init (GstRtpL16EncClass * klass);
static void gst_rtpL16enc_base_init (GstRtpL16EncClass * klass);
static void gst_rtpL16enc_init (GstRtpL16Enc * rtpL16enc);
static void gst_rtpL16enc_chain (GstPad * pad, GstData *_data);
static void gst_rtpL16enc_set_property (GObject * object, guint prop_id,
......@@ -92,7 +90,7 @@ static GType gst_rtpL16enc_get_type (void)
if (!rtpL16enc_type) {
static const GTypeInfo rtpL16enc_info = {
sizeof (GstRtpL16EncClass),
NULL,
(GBaseInitFunc) gst_rtpL16enc_base_init,
NULL,
(GClassInitFunc) gst_rtpL16enc_class_init,
NULL,
......@@ -107,6 +105,18 @@ static GType gst_rtpL16enc_get_type (void)
return rtpL16enc_type;
}
static void
gst_rtpL16enc_base_init (GstRtpL16EncClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_factory));
gst_element_class_set_details (element_class, &gst_rtpL16enc_details);
}
static void
gst_rtpL16enc_class_init (GstRtpL16EncClass * klass)
{
......@@ -312,17 +322,8 @@ gst_rtpL16enc_change_state (GstElement * element)
}
gboolean
gst_rtpL16enc_plugin_init (GModule * module, GstPlugin * plugin)
gst_rtpL16enc_plugin_init (GstPlugin * plugin)
{
GstElementFactory *rtpL16enc;
rtpL16enc = gst_element_factory_new ("rtpL16enc", GST_TYPE_RTP_L16_ENC, &gst_rtpL16enc_details);
g_return_val_if_fail (rtpL16enc != NULL, FALSE);
gst_element_factory_add_pad_template (rtpL16enc, GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_factory_add_pad_template (rtpL16enc, GST_PAD_TEMPLATE_GET (src_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (rtpL16enc));
return TRUE;
return gst_element_register (plugin, "rtpL16enc",
GST_RANK_NONE, GST_TYPE_RTP_L16_ENC);
}
......@@ -70,7 +70,7 @@ struct _GstRtpL16EncClass
#define GST_IS_RTP_L16_ENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_ENC))
gboolean gst_rtpL16enc_plugin_init (GModule * module, GstPlugin * plugin);
gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus
}
......
......@@ -23,11 +23,8 @@
static GstElementDetails gst_rtp_L16parse_details = {
"RTP packet parser",
"Codec/Network",
"GPL",
"Extracts raw audio from RTP packets",
VERSION,
"Zeeshan Ali <zak147@yahoo.com>",
"(C) 2003",
"Zeeshan Ali <zak147@yahoo.com>"
};
/* RtpL16Parse signals and args */
......@@ -70,6 +67,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory,
);
static void gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass);
static void gst_rtpL16parse_base_init (GstRtpL16ParseClass * klass);
static void gst_rtpL16parse_init (GstRtpL16Parse * rtpL16parse);
static void gst_rtpL16parse_chain (GstPad * pad, GstData *_data);
......@@ -89,7 +87,7 @@ static GType gst_rtpL16parse_get_type (void)
if (!rtpL16parse_type) {
static const GTypeInfo rtpL16parse_info = {
sizeof (GstRtpL16ParseClass),
NULL,
(GBaseInitFunc) gst_rtpL16parse_base_init,
NULL,
(GClassInitFunc) gst_rtpL16parse_class_init,
NULL,
......@@ -104,6 +102,18 @@ static GType gst_rtpL16parse_get_type (void)
return rtpL16parse_type;
}
static void
gst_rtpL16parse_base_init (GstRtpL16ParseClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_factory));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_class_set_details (element_class, &gst_rtp_L16parse_details);
}
static void
gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass)
{
......@@ -322,17 +332,8 @@ gst_rtpL16parse_change_state (GstElement * element)
}
gboolean
gst_rtpL16parse_plugin_init (GModule * module, GstPlugin * plugin)
gst_rtpL16parse_plugin_init (GstPlugin * plugin)
{
GstElementFactory *rtpL16parse;
rtpL16parse = gst_element_factory_new ("rtpL16parse", GST_TYPE_RTP_L16_PARSE, &gst_rtp_L16parse_details);
g_return_val_if_fail (rtpL16parse != NULL, FALSE);
gst_element_factory_add_pad_template (rtpL16parse, GST_PAD_TEMPLATE_GET (src_factory));
gst_element_factory_add_pad_template (rtpL16parse, GST_PAD_TEMPLATE_GET (sink_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (rtpL16parse));
return TRUE;
return gst_element_register (plugin, "rtpL16parse",
GST_RANK_NONE, GST_TYPE_RTP_L16_PARSE);
}
......@@ -63,7 +63,7 @@ struct _GstRtpL16ParseClass
#define GST_IS_RTP_L16_PARSE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_PARSE))
gboolean gst_rtpL16parse_plugin_init (GModule * module, GstPlugin * plugin);
gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus
}
......
......@@ -27,11 +27,8 @@
static GstElementDetails gst_rtpL16enc_details = {
"RTP RAW Audio Encoder",
"Codec/Network",
"LGPL",
"Encodes Raw Audio into an RTP packet",
VERSION,
"Zeeshan Ali <zak147@yahoo.com>",
"(C) 2003",
"Zeeshan Ali <zak147@yahoo.com>"
};
/* RtpL16Enc signals and args */
......@@ -74,6 +71,7 @@ GST_PAD_TEMPLATE_FACTORY (src_factory,
);
static void gst_rtpL16enc_class_init (GstRtpL16EncClass * klass);
static void gst_rtpL16enc_base_init (GstRtpL16EncClass * klass);
static void gst_rtpL16enc_init (GstRtpL16Enc * rtpL16enc);
static void gst_rtpL16enc_chain (GstPad * pad, GstData *_data);
static void gst_rtpL16enc_set_property (GObject * object, guint prop_id,
......@@ -92,7 +90,7 @@ static GType gst_rtpL16enc_get_type (void)
if (!rtpL16enc_type) {
static const GTypeInfo rtpL16enc_info = {
sizeof (GstRtpL16EncClass),
NULL,
(GBaseInitFunc) gst_rtpL16enc_base_init,
NULL,
(GClassInitFunc) gst_rtpL16enc_class_init,
NULL,
......@@ -107,6 +105,18 @@ static GType gst_rtpL16enc_get_type (void)
return rtpL16enc_type;
}
static void
gst_rtpL16enc_base_init (GstRtpL16EncClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_factory));
gst_element_class_set_details (element_class, &gst_rtpL16enc_details);
}
static void
gst_rtpL16enc_class_init (GstRtpL16EncClass * klass)
{
......@@ -312,17 +322,8 @@ gst_rtpL16enc_change_state (GstElement * element)
}
gboolean
gst_rtpL16enc_plugin_init (GModule * module, GstPlugin * plugin)
gst_rtpL16enc_plugin_init (GstPlugin * plugin)
{
GstElementFactory *rtpL16enc;
rtpL16enc = gst_element_factory_new ("rtpL16enc", GST_TYPE_RTP_L16_ENC, &gst_rtpL16enc_details);
g_return_val_if_fail (rtpL16enc != NULL, FALSE);
gst_element_factory_add_pad_template (rtpL16enc, GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_factory_add_pad_template (rtpL16enc, GST_PAD_TEMPLATE_GET (src_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (rtpL16enc));
return TRUE;
return gst_element_register (plugin, "rtpL16enc",
GST_RANK_NONE, GST_TYPE_RTP_L16_ENC);
}
......@@ -70,7 +70,7 @@ struct _GstRtpL16EncClass
#define GST_IS_RTP_L16_ENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_ENC))
gboolean gst_rtpL16enc_plugin_init (GModule * module, GstPlugin * plugin);
gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus
}
......
......@@ -24,11 +24,8 @@
static GstElementDetails gst_rtp_gsmparse_details = {
"RTP packet parser",
"Codec/Network",
"GPL",
"Extracts GSM audio from RTP packets",
VERSION,
"Zeeshan Ali <zak147@yahoo.com>",
"(C) 2003",
"Zeeshan Ali <zak147@yahoo.com>"
};
/* RtpGSMParse signals and args */
......@@ -65,6 +62,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory,
);
static void gst_rtpgsmparse_class_init (GstRtpGSMParseClass * klass);
static void gst_rtpgsmparse_base_init (GstRtpGSMParseClass * klass);
static void gst_rtpgsmparse_init (GstRtpGSMParse * rtpgsmparse);
static void gst_rtpgsmparse_chain (GstPad * pad, GstData *_data);
......@@ -84,7 +82,7 @@ static GType gst_rtpgsmparse_get_type (void)
if (!rtpgsmparse_type) {
static const GTypeInfo rtpgsmparse_info = {
sizeof (GstRtpGSMParseClass),
NULL,
(GBaseInitFunc) gst_rtpgsmparse_base_init,
NULL,
(GClassInitFunc) gst_rtpgsmparse_class_init,
NULL,
......@@ -99,6 +97,18 @@ static GType gst_rtpgsmparse_get_type (void)
return rtpgsmparse_type;
}
static void
gst_rtpgsmparse_base_init (GstRtpGSMParseClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_factory));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_class_set_details (element_class, &gst_rtp_gsmparse_details);
}
static void
gst_rtpgsmparse_class_init (GstRtpGSMParseClass * klass)
{
......@@ -284,17 +294,8 @@ gst_rtpgsmparse_change_state (GstElement * element)
}
gboolean
gst_rtpgsmparse_plugin_init (GModule * module, GstPlugin * plugin)
gst_rtpgsmparse_plugin_init (GstPlugin * plugin)
{
GstElementFactory *rtpgsmparse;
rtpgsmparse = gst_element_factory_new ("rtpgsmparse", GST_TYPE_RTP_GSM_PARSE, &gst_rtp_gsmparse_details);
g_return_val_if_fail (rtpgsmparse != NULL, FALSE);
gst_element_factory_add_pad_template (rtpgsmparse, GST_PAD_TEMPLATE_GET (src_factory));
gst_element_factory_add_pad_template (rtpgsmparse, GST_PAD_TEMPLATE_GET (sink_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (rtpgsmparse));
return TRUE;
return gst_element_register (plugin, "rtpgsmparse",
GST_RANK_NONE, GST_TYPE_RTP_GSM_PARSE);
}
......@@ -60,7 +60,7 @@ struct _GstRtpGSMParseClass
#define GST_IS_RTP_GSM_PARSE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_PARSE))
gboolean gst_rtpgsmparse_plugin_init (GModule * module, GstPlugin * plugin);
gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus
}
......
......@@ -28,11 +28,8 @@
static GstElementDetails gst_rtpgsmenc_details = {
"RTP GSM Audio Encoder",
"Codec/Network",
"LGPL",
"Encodes GSM audio into an RTP packet",
VERSION,
"Zeeshan Ali <zak147@yahoo.com>",
"(C) 2003",
"Zeeshan Ali <zak147@yahoo.com>"
};
/* RtpGSMEnc signals and args */
......@@ -70,6 +67,7 @@ GST_PAD_TEMPLATE_FACTORY (src_factory,
)
static void gst_rtpgsmenc_class_init (GstRtpGSMEncClass * klass);
static void gst_rtpgsmenc_base_init (GstRtpGSMEncClass * klass);
static void gst_rtpgsmenc_init (GstRtpGSMEnc * rtpgsmenc);
static void gst_rtpgsmenc_chain (GstPad * pad, GstData *_data);
static void gst_rtpgsmenc_set_property (GObject * object, guint prop_id,
......@@ -88,7 +86,7 @@ static GType gst_rtpgsmenc_get_type (void)
if (!rtpgsmenc_type) {
static const GTypeInfo rtpgsmenc_info = {
sizeof (GstRtpGSMEncClass),
NULL,
(GBaseInitFunc) gst_rtpgsmenc_base_init,
NULL,
(GClassInitFunc) gst_rtpgsmenc_class_init,
NULL,
......@@ -103,6 +101,18 @@ static GType gst_rtpgsmenc_get_type (void)
return rtpgsmenc_type;
}
static void
gst_rtpgsmenc_base_init (GstRtpGSMEncClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_factory));
gst_element_class_set_details (element_class, &gst_rtpgsmenc_details);
}
static void
gst_rtpgsmenc_class_init (GstRtpGSMEncClass * klass)
{
......@@ -299,17 +309,8 @@ gst_rtpgsmenc_change_state (GstElement * element)
}
gboolean
gst_rtpgsmenc_plugin_init (GModule * module, GstPlugin * plugin)
gst_rtpgsmenc_plugin_init (GstPlugin * plugin)
{
GstElementFactory *rtpgsmenc;
rtpgsmenc = gst_element_factory_new ("rtpgsmenc", GST_TYPE_RTP_GSM_ENC, &gst_rtpgsmenc_details);
g_return_val_if_fail (rtpgsmenc != NULL, FALSE);
gst_element_factory_add_pad_template (rtpgsmenc, GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_factory_add_pad_template (rtpgsmenc, GST_PAD_TEMPLATE_GET (src_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (rtpgsmenc));
return TRUE;
return gst_element_register (plugin, "rtpgsmenc",
GST_RANK_NONE, GST_TYPE_RTP_GSM_ENC);
}
......@@ -69,7 +69,7 @@ struct _GstRtpGSMEncClass
#define GST_IS_RTP_GSM_ENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_ENC))
gboolean gst_rtpgsmenc_plugin_init (GModule * module, GstPlugin * plugin);
gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus
}
......
......@@ -24,11 +24,8 @@
static GstElementDetails gst_rtp_gsmparse_details = {
"RTP packet parser",
"Codec/Network",
"GPL",
"Extracts GSM audio from RTP packets",
VERSION,
"Zeeshan Ali <zak147@yahoo.com>",
"(C) 2003",
"Zeeshan Ali <zak147@yahoo.com>"
};
/* RtpGSMParse signals and args */
......@@ -65,6 +62,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory,
);
static void gst_rtpgsmparse_class_init (GstRtpGSMParseClass * klass);
static void gst_rtpgsmparse_base_init (GstRtpGSMParseClass * klass);
static void gst_rtpgsmparse_init (GstRtpGSMParse * rtpgsmparse);
static void gst_rtpgsmparse_chain (GstPad * pad, GstData *_data);
......@@ -84,7 +82,7 @@ static GType gst_rtpgsmparse_get_type (void)
if (!rtpgsmparse_type) {
static const GTypeInfo rtpgsmparse_info = {
sizeof (GstRtpGSMParseClass),
NULL,
(GBaseInitFunc) gst_rtpgsmparse_base_init,
NULL,
(GClassInitFunc) gst_rtpgsmparse_class_init,
NULL,
......@@ -99,6 +97,18 @@ static GType gst_rtpgsmparse_get_type (void)
return rtpgsmparse_type;
}
static void
gst_rtpgsmparse_base_init (GstRtpGSMParseClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_factory));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_class_set_details (element_class, &gst_rtp_gsmparse_details);
}
static void
gst_rtpgsmparse_class_init (GstRtpGSMParseClass * klass)
{
......@@ -284,17 +294,8 @@ gst_rtpgsmparse_change_state (GstElement * element)
}
gboolean
gst_rtpgsmparse_plugin_init (GModule * module, GstPlugin * plugin)
gst_rtpgsmparse_plugin_init (GstPlugin * plugin)
{
GstElementFactory *rtpgsmparse;
rtpgsmparse = gst_element_factory_new ("rtpgsmparse", GST_TYPE_RTP_GSM_PARSE, &gst_rtp_gsmparse_details);
g_return_val_if_fail (rtpgsmparse != NULL, FALSE);
gst_element_factory_add_pad_template (rtpgsmparse, GST_PAD_TEMPLATE_GET (src_factory));
gst_element_factory_add_pad_template (rtpgsmparse, GST_PAD_TEMPLATE_GET (sink_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (rtpgsmparse));
return TRUE;
return gst_element_register (plugin, "rtpgsmparse",
GST_RANK_NONE, GST_TYPE_RTP_GSM_PARSE);
}
......@@ -60,7 +60,7 @@ struct _GstRtpGSMParseClass
#define GST_IS_RTP_GSM_PARSE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_PARSE))
gboolean gst_rtpgsmparse_plugin_init (GModule * module, GstPlugin * plugin);
gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus
}
......
......@@ -28,11 +28,8 @@
static GstElementDetails gst_rtpgsmenc_details = {
"RTP GSM Audio Encoder",
"Codec/Network",
"LGPL",
"Encodes GSM audio into an RTP packet",
VERSION,
"Zeeshan Ali <zak147@yahoo.com>",
"(C) 2003",
"Zeeshan Ali <zak147@yahoo.com>"
};
/* RtpGSMEnc signals and args */
......@@ -70,6 +67,7 @@ GST_PAD_TEMPLATE_FACTORY (src_factory,
)
static void gst_rtpgsmenc_class_init (GstRtpGSMEncClass * klass);
static void gst_rtpgsmenc_base_init (GstRtpGSMEncClass * klass);
static void gst_rtpgsmenc_init (GstRtpGSMEnc * rtpgsmenc);
static void gst_rtpgsmenc_chain (GstPad * pad, GstData *_data);
static void gst_rtpgsmenc_set_property (GObject * object, guint prop_id,
......@@ -88,7 +86,7 @@ static GType gst_rtpgsmenc_get_type (void)
if (!rtpgsmenc_type) {
static const GTypeInfo rtpgsmenc_info = {
sizeof (GstRtpGSMEncClass),
NULL,
(GBaseInitFunc) gst_rtpgsmenc_base_init,
NULL,
(GClassInitFunc) gst_rtpgsmenc_class_init,
NULL,
......@@ -103,6 +101,18 @@ static GType gst_rtpgsmenc_get_type (void)
return rtpgsmenc_type;
}
static void
gst_rtpgsmenc_base_init (GstRtpGSMEncClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_factory));
gst_element_class_set_details (element_class, &gst_rtpgsmenc_details);
}
static void
gst_rtpgsmenc_class_init (GstRtpGSMEncClass * klass)
{
......@@ -299,17 +309,8 @@ gst_rtpgsmenc_change_state (GstElement * element)
}
gboolean
gst_rtpgsmenc_plugin_init (GModule * module, GstPlugin * plugin)
gst_rtpgsmenc_plugin_init (GstPlugin * plugin)
{
GstElementFactory *rtpgsmenc;
rtpgsmenc = gst_element_factory_new ("rtpgsmenc", GST_TYPE_RTP_GSM_ENC, &gst_rtpgsmenc_details);
g_return_val_if_fail (rtpgsmenc != NULL, FALSE);
gst_element_factory_add_pad_template (rtpgsmenc, GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_factory_add_pad_template (rtpgsmenc, GST_PAD_TEMPLATE_GET (src_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (rtpgsmenc));
return TRUE;
return gst_element_register (plugin, "rtpgsmenc",
GST_RANK_NONE, GST_TYPE_RTP_GSM_ENC);
}
......@@ -69,7 +69,7 @@ struct _GstRtpGSMEncClass
#define GST_IS_RTP_GSM_ENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_ENC))
gboolean gst_rtpgsmenc_plugin_init (GModule * module, GstPlugin * plugin);
gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment