diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-02 22:04:36 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-02 22:04:36 +0000 |
commit | 45e70563554fcfa5197a4c0d0bec14fa036ecc13 (patch) | |
tree | 6777f374c15a03298098c5b491dd3e6aaf1c9e21 /gst/rtp/gstrtpgsmpay.c | |
parent | fbdc88a45f2e72ecb527da6349485be4899620d9 (diff) |
RTP done
Original commit message from CVS:
RTP done
Diffstat (limited to 'gst/rtp/gstrtpgsmpay.c')
-rw-r--r-- | gst/rtp/gstrtpgsmpay.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/gst/rtp/gstrtpgsmpay.c b/gst/rtp/gstrtpgsmpay.c index eb7a7852..47a622b7 100644 --- a/gst/rtp/gstrtpgsmpay.c +++ b/gst/rtp/gstrtpgsmpay.c @@ -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, @@ -104,6 +102,18 @@ static GType gst_rtpgsmenc_get_type (void) } 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) { GObjectClass *gobject_class; @@ -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); } |