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/gstrtpL16pay.c | |
parent | fbdc88a45f2e72ecb527da6349485be4899620d9 (diff) |
RTP done
Original commit message from CVS:
RTP done
Diffstat (limited to 'gst/rtp/gstrtpL16pay.c')
-rw-r--r-- | gst/rtp/gstrtpL16pay.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c index 47145b97..0ec42a29 100644 --- a/gst/rtp/gstrtpL16pay.c +++ b/gst/rtp/gstrtpL16pay.c @@ -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, @@ -108,6 +106,18 @@ static GType gst_rtpL16enc_get_type (void) } 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) { GObjectClass *gobject_class; @@ -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); } |