Do burger's rename for rtp payloaders and depayloaders

Original commit message from CVS:
Do burger's rename for rtp payloaders and depayloaders
parent 0b3776c0
2005-12-01 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
* gst/rtp/Makefile.am:
* gst/rtp/gstasteriskh263.c:
* gst/rtp/gstrtp.c:
* gst/rtp/gstrtpL16enc.c:
* gst/rtp/gstrtpL16enc.h:
* gst/rtp/gstrtpL16parse.c:
* gst/rtp/gstrtpL16parse.h:
* gst/rtp/gstrtpL16pay.c:
* gst/rtp/gstrtpL16pay.h:
* gst/rtp/gstrtpamrdec.c:
* gst/rtp/gstrtpamrdec.h:
* gst/rtp/gstrtpamrdepay.c:
* gst/rtp/gstrtpamrdepay.h:
* gst/rtp/gstrtpamrenc.c:
* gst/rtp/gstrtpamrenc.h:
* gst/rtp/gstrtpamrpay.c:
* gst/rtp/gstrtpamrpay.h:
* gst/rtp/gstrtpdec.c:
* gst/rtp/gstrtpdec.h:
* gst/rtp/gstrtpdepay.c:
* gst/rtp/gstrtpdepay.h:
* gst/rtp/gstrtpg711dec.c:
* gst/rtp/gstrtpg711dec.h:
* gst/rtp/gstrtpg711depay.c:
* gst/rtp/gstrtpg711depay.h:
* gst/rtp/gstrtpg711enc.c:
* gst/rtp/gstrtpg711enc.h:
* gst/rtp/gstrtpg711pay.c:
* gst/rtp/gstrtpg711pay.h:
* gst/rtp/gstrtpgsmenc.c:
* gst/rtp/gstrtpgsmenc.h:
* gst/rtp/gstrtpgsmparse.c:
* gst/rtp/gstrtpgsmparse.h:
* gst/rtp/gstrtpgsmpay.c:
* gst/rtp/gstrtpgsmpay.h:
* gst/rtp/gstrtph263enc.c:
* gst/rtp/gstrtph263enc.h:
* gst/rtp/gstrtph263pay.c:
* gst/rtp/gstrtph263pay.h:
* gst/rtp/gstrtph263pdec.c:
* gst/rtp/gstrtph263pdec.h:
* gst/rtp/gstrtph263pdepay.c:
* gst/rtp/gstrtph263pdepay.h:
* gst/rtp/gstrtph263penc.c:
* gst/rtp/gstrtph263penc.h:
* gst/rtp/gstrtph263ppay.c:
* gst/rtp/gstrtph263ppay.h:
* gst/rtp/gstrtpmp4vdec.c:
* gst/rtp/gstrtpmp4vdec.h:
* gst/rtp/gstrtpmp4vdepay.c:
* gst/rtp/gstrtpmp4vdepay.h:
* gst/rtp/gstrtpmp4venc.c:
* gst/rtp/gstrtpmp4venc.h:
* gst/rtp/gstrtpmp4vpay.c:
* gst/rtp/gstrtpmp4vpay.h:
* gst/rtp/gstrtpmpadec.c:
* gst/rtp/gstrtpmpadec.h:
* gst/rtp/gstrtpmpadepay.c:
* gst/rtp/gstrtpmpadepay.h:
* gst/rtp/gstrtpmpaenc.c:
* gst/rtp/gstrtpmpaenc.h:
* gst/rtp/gstrtpmpapay.c:
* gst/rtp/gstrtpmpapay.h:
* gst/rtp/gstrtpspeexdec.c:
* gst/rtp/gstrtpspeexdec.h:
* gst/rtp/gstrtpspeexdepay.c:
* gst/rtp/gstrtpspeexdepay.h:
* gst/rtp/gstrtpspeexenc.c:
* gst/rtp/gstrtpspeexenc.h:
* gst/rtp/gstrtpspeexpay.c:
* gst/rtp/gstrtpspeexpay.h:
Do burger's rename for rtp payloaders and depayloaders
2005-11-30 Wim Taymans <wim@fluendo.com>
* ext/dv/gstdvdec.c: (gst_dvdec_chain):
......
common @ 54bb21c5
Subproject commit f9f5f063728688cf455a1512d492b632c43963d7
Subproject commit 54bb21c57bb86941d80c15590e0a121405173156
......@@ -2,25 +2,25 @@ plugin_LTLIBRARIES = libgstrtp.la
libgstrtp_la_SOURCES = \
gstrtp.c \
gstrtpdec.c \
gstrtpmpadec.c \
gstrtpmpaenc.c \
gstrtpg711enc.c \
gstrtpg711dec.c \
gstrtpgsmenc.c \
gstrtpdepay.c \
gstrtpmpadepay.c \
gstrtpmpapay.c \
gstrtpg711pay.c \
gstrtpg711depay.c \
gstrtpgsmpay.c \
gstrtpgsmparse.c \
gstrtpamrdec.c \
gstrtpamrenc.c \
gstrtph263pdec.c \
gstrtph263penc.c \
gstrtph263enc.c \
gstrtpamrdepay.c \
gstrtpamrpay.c \
gstrtph263pdepay.c \
gstrtph263ppay.c \
gstrtph263pay.c \
gstasteriskh263.c \
gstrtpmp4venc.c \
gstrtpmp4vdec.c \
gstrtpspeexenc.c \
gstrtpspeexdec.c
gstrtpmp4vpay.c \
gstrtpmp4vdepay.c \
gstrtpspeexpay.c \
gstrtpspeexdepay.c
#gstrtpL16enc.c gstrtpL16parse.c gstrtpgsmenc.c gstrtpgsmparse.c
#gstrtpL16pay.c gstrtpL16parse.c gstrtpgsmpay.c gstrtpgsmparse.c
if HAVE_WINSOCK2_H
WINSOCK2_LIBS = -lws2_32
......@@ -33,23 +33,23 @@ libgstrtp_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) \
-lgstrtp-@GST_MAJORMINOR@ $(WINSOCK2_LIBS)
libgstrtp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstrtpL16enc.h \
noinst_HEADERS = gstrtpL16pay.h \
gstrtpL16parse.h \
gstrtpamrdec.h \
gstrtpamrenc.h \
gstrtpg711enc.h \
gstrtpg711dec.h \
gstrtpgsmenc.h \
gstrtpamrdepay.h \
gstrtpamrpay.h \
gstrtpg711pay.h \
gstrtpg711depay.h \
gstrtpgsmpay.h \
gstrtpgsmparse.h \
gstrtpmpadec.h \
gstrtpmpaenc.h \
gstrtph263pdec.h \
gstrtph263penc.h \
gstrtph263enc.h \
gstrtpmp4venc.h \
gstrtpmp4vdec.h \
gstrtpdec.h \
gstrtph263enc.h \
gstrtpmpadepay.h \
gstrtpmpapay.h \
gstrtph263pdepay.h \
gstrtph263ppay.h \
gstrtph263pay.h \
gstrtpmp4vpay.h \
gstrtpmp4vdepay.h \
gstrtpdepay.h \
gstrtph263pay.h \
gstasteriskh263.h \
gstrtpspeexenc.h \
gstrtpspeexdec.h
gstrtpspeexpay.h \
gstrtpspeexdepay.h
......@@ -41,7 +41,7 @@ typedef struct _GstAsteriskH263Header
#define GST_ASTERISKH263_HEADER_LENGTH(buf) (((GstAsteriskH263Header *)(GST_BUFFER_DATA (buf)))->length)
/* elementfactory information */
static GstElementDetails gst_rtp_h263pdec_details = {
static GstElementDetails gst_rtp_h263p_depaydetails = {
"RTP packet parser",
"Codec/Parser/Network",
"Extracts H263 video from RTP and encodes in Asterisk H263 format",
......@@ -130,7 +130,7 @@ gst_asteriskh263_base_init (GstAsteriskh263Class * klass)
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_asteriskh263_sink_template));
gst_element_class_set_details (element_class, &gst_rtp_h263pdec_details);
gst_element_class_set_details (element_class, &gst_rtp_h263p_depaydetails);
}
static void
......@@ -191,7 +191,7 @@ gst_asteriskh263_chain (GstPad * pad, GstBuffer * buf)
asteriskh263 = GST_ASTERISK_H263 (GST_OBJECT_PARENT (pad));
if (!gst_rtpbuffer_validate (buf))
if (!gst_rtp_buffer_validate (buf))
goto bad_packet;
{
......@@ -202,11 +202,11 @@ gst_asteriskh263_chain (GstPad * pad, GstBuffer * buf)
guint32 samples;
guint16 asterisk_len;
payload_len = gst_rtpbuffer_get_payload_len (buf);
payload = gst_rtpbuffer_get_payload (buf);
payload_len = gst_rtp_buffer_get_payload_len (buf);
payload = gst_rtp_buffer_get_payload (buf);
M = gst_rtpbuffer_get_marker (buf);
timestamp = gst_rtpbuffer_get_timestamp (buf);
M = gst_rtp_buffer_get_marker (buf);
timestamp = gst_rtp_buffer_get_timestamp (buf);
outbuf = gst_buffer_new_and_alloc (payload_len +
GST_ASTERISKH263_HEADER_LEN);
......
......@@ -21,76 +21,76 @@
#include "config.h"
#endif
#include "gstrtpdec.h"
#include "gstrtpg711enc.h"
#include "gstrtpg711dec.h"
#include "gstrtpgsmenc.h"
#include "gstrtpdepay.h"
#include "gstrtpg711pay.h"
#include "gstrtpg711depay.h"
#include "gstrtpgsmpay.h"
#include "gstrtpgsmparse.h"
#include "gstrtpamrenc.h"
#include "gstrtpamrdec.h"
#include "gstrtpmpaenc.h"
#include "gstrtpmpadec.h"
#include "gstrtph263pdec.h"
#include "gstrtph263penc.h"
#include "gstrtph263enc.h"
#include "gstrtpamrpay.h"
#include "gstrtpamrdepay.h"
#include "gstrtpmpapay.h"
#include "gstrtpmpadepay.h"
#include "gstrtph263pdepay.h"
#include "gstrtph263ppay.h"
#include "gstrtph263pay.h"
#include "gstasteriskh263.h"
#include "gstrtpmp4venc.h"
#include "gstrtpmp4vdec.h"
#include "gstrtpspeexenc.h"
#include "gstrtpspeexdec.h"
#include "gstrtpmp4vpay.h"
#include "gstrtpmp4vdepay.h"
#include "gstrtpspeexpay.h"
#include "gstrtpspeexdepay.h"
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_rtpdec_plugin_init (plugin))
if (!gst_rtp_depay_plugin_init (plugin))
return FALSE;
if (!gst_rtpgsmparse_plugin_init (plugin))
if (!gst_rtp_gsm_parse_plugin_init (plugin))
return FALSE;
if (!gst_rtpgsmenc_plugin_init (plugin))
if (!gst_rtp_gsm_pay_plugin_init (plugin))
return FALSE;
if (!gst_rtpamrdec_plugin_init (plugin))
if (!gst_rtp_amr_depay_plugin_init (plugin))
return FALSE;
if (!gst_rtpamrenc_plugin_init (plugin))
if (!gst_rtp_amr_pay_plugin_init (plugin))
return FALSE;
if (!gst_rtpg711dec_plugin_init (plugin))
if (!gst_rtp_g711_depay_plugin_init (plugin))
return FALSE;
if (!gst_rtpg711enc_plugin_init (plugin))
if (!gst_rtp_g711_pay_plugin_init (plugin))
return FALSE;
if (!gst_rtpmpadec_plugin_init (plugin))
if (!gst_rtp_mpa_depay_plugin_init (plugin))
return FALSE;
if (!gst_rtpmpaenc_plugin_init (plugin))
if (!gst_rtp_mpa_pay_plugin_init (plugin))
return FALSE;
if (!gst_rtph263penc_plugin_init (plugin))
if (!gst_rtp_h263p_pay_plugin_init (plugin))
return FALSE;
if (!gst_rtph263pdec_plugin_init (plugin))
if (!gst_rtp_h263p_depay_plugin_init (plugin))
return FALSE;
if (!gst_rtph263enc_plugin_init (plugin))
if (!gst_rtp_h263_pay_plugin_init (plugin))
return FALSE;
if (!gst_asteriskh263_plugin_init (plugin))
return FALSE;
if (!gst_rtpmp4venc_plugin_init (plugin))
if (!gst_rtp_mp4v_pay_plugin_init (plugin))
return FALSE;
if (!gst_rtpmp4vdec_plugin_init (plugin))
if (!gst_rtp_mp4v_depay_plugin_init (plugin))
return FALSE;
if (!gst_rtpspeexenc_plugin_init (plugin))
if (!gst_rtp_speex_pay_plugin_init (plugin))
return FALSE;
if (!gst_rtpspeexdec_plugin_init (plugin))
if (!gst_rtp_speex_depay_plugin_init (plugin))
return FALSE;
return TRUE;
......@@ -100,4 +100,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"rtp",
"Real-time protocol plugins",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
......@@ -41,7 +41,7 @@ enum
ARG_PAYLOAD_TYPE
};
static GstStaticPadTemplate gst_rtpL16parse_src_template =
static GstStaticPadTemplate gst_rtp_L16parse_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
......@@ -53,43 +53,44 @@ GST_STATIC_PAD_TEMPLATE ("src",
"rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
static GstStaticPadTemplate gst_rtpL16parse_sink_template =
static GstStaticPadTemplate gst_rtp_L16parse_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("application/x-rtp")
);
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_rtp_L16parse_class_init (GstRtpL16ParseClass * klass);
static void gst_rtp_L16parse_base_init (GstRtpL16ParseClass * klass);
static void gst_rtp_L16parse_init (GstRtpL16Parse * rtpL16parse);
static void gst_rtpL16parse_chain (GstPad * pad, GstData * _data);
static void gst_rtp_L16parse_chain (GstPad * pad, GstData * _data);
static void gst_rtpL16parse_set_property (GObject * object, guint prop_id,
static void gst_rtp_L16parse_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_rtpL16parse_get_property (GObject * object, guint prop_id,
static void gst_rtp_L16parse_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static GstStateChangeReturn gst_rtpL16parse_change_state (GstElement * element);
static GstStateChangeReturn gst_rtp_L16parse_change_state (GstElement *
element);
static GstElementClass *parent_class = NULL;
static GType
gst_rtpL16parse_get_type (void)
gst_rtp_L16parse_get_type (void)
{
static GType rtpL16parse_type = 0;
if (!rtpL16parse_type) {
static const GTypeInfo rtpL16parse_info = {
sizeof (GstRtpL16ParseClass),
(GBaseInitFunc) gst_rtpL16parse_base_init,
(GBaseInitFunc) gst_rtp_L16parse_base_init,
NULL,
(GClassInitFunc) gst_rtpL16parse_class_init,
(GClassInitFunc) gst_rtp_L16parse_class_init,
NULL,
NULL,
sizeof (GstRtpL16Parse),
0,
(GInstanceInitFunc) gst_rtpL16parse_init,
(GInstanceInitFunc) gst_rtp_L16parse_init,
};
rtpL16parse_type =
......@@ -100,19 +101,19 @@ gst_rtpL16parse_get_type (void)
}
static void
gst_rtpL16parse_base_init (GstRtpL16ParseClass * klass)
gst_rtp_L16parse_base_init (GstRtpL16ParseClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_rtpL16parse_src_template));
gst_static_pad_template_get (&gst_rtp_L16parse_src_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_rtpL16parse_sink_template));
gst_static_pad_template_get (&gst_rtp_L16parse_sink_template));
gst_element_class_set_details (element_class, &gst_rtp_L16parse_details);
}
static void
gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass)
gst_rtp_L16parse_class_init (GstRtpL16ParseClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
......@@ -129,24 +130,24 @@ gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass)
g_param_spec_int ("frequency", "frequency", "frequency",
G_MININT, G_MAXINT, 44100, G_PARAM_READWRITE));
gobject_class->set_property = gst_rtpL16parse_set_property;
gobject_class->get_property = gst_rtpL16parse_get_property;
gobject_class->set_property = gst_rtp_L16parse_set_property;
gobject_class->get_property = gst_rtp_L16parse_get_property;
gstelement_class->change_state = gst_rtpL16parse_change_state;
gstelement_class->change_state = gst_rtp_L16parse_change_state;
}
static void
gst_rtpL16parse_init (GstRtpL16Parse * rtpL16parse)
gst_rtp_L16parse_init (GstRtpL16Parse * rtpL16parse)
{
rtpL16parse->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_rtpL16parse_src_template), "src");
(&gst_rtp_L16parse_src_template), "src");
rtpL16parse->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_rtpL16parse_sink_template), "sink");
(&gst_rtp_L16parse_sink_template), "sink");
gst_element_add_pad (GST_ELEMENT (rtpL16parse), rtpL16parse->srcpad);
gst_element_add_pad (GST_ELEMENT (rtpL16parse), rtpL16parse->sinkpad);
gst_pad_set_chain_function (rtpL16parse->sinkpad, gst_rtpL16parse_chain);
gst_pad_set_chain_function (rtpL16parse->sinkpad, gst_rtp_L16parse_chain);
rtpL16parse->frequency = 44100;
rtpL16parse->channels = 2;
......@@ -155,7 +156,7 @@ gst_rtpL16parse_init (GstRtpL16Parse * rtpL16parse)
}
void
gst_rtpL16parse_ntohs (GstBuffer * buf)
gst_rtp_L16parse_ntohs (GstBuffer * buf)
{
gint16 *i, *len;
......@@ -169,12 +170,12 @@ gst_rtpL16parse_ntohs (GstBuffer * buf)
}
void
gst_rtpL16_caps_nego (GstRtpL16Parse * rtpL16parse)
gst_rtp_L16_caps_nego (GstRtpL16Parse * rtpL16parse)
{
GstCaps *caps;
caps =
gst_caps_copy (gst_static_caps_get (&gst_rtpL16parse_src_template.
gst_caps_copy (gst_static_caps_get (&gst_rtp_L16parse_src_template.
static_caps));
gst_caps_set_simple (caps,
......@@ -185,7 +186,7 @@ gst_rtpL16_caps_nego (GstRtpL16Parse * rtpL16parse)
}
void
gst_rtpL16parse_payloadtype_change (GstRtpL16Parse * rtpL16parse,
gst_rtp_L16parse_payloadtype_change (GstRtpL16Parse * rtpL16parse,
rtp_payload_t pt)
{
rtpL16parse->payload_type = pt;
......@@ -201,11 +202,11 @@ gst_rtpL16parse_payloadtype_change (GstRtpL16Parse * rtpL16parse,
g_warning ("unknown payload_t %d\n", pt);
}
gst_rtpL16_caps_nego (rtpL16parse);
gst_rtp_L16_caps_nego (rtpL16parse);
}
static void
gst_rtpL16parse_chain (GstPad * pad, GstData * _data)
gst_rtp_L16parse_chain (GstPad * pad, GstData * _data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstRtpL16Parse *rtpL16parse;
......@@ -231,7 +232,7 @@ gst_rtpL16parse_chain (GstPad * pad, GstData * _data)
}
if (GST_PAD_CAPS (rtpL16parse->srcpad) == NULL) {
gst_rtpL16_caps_nego (rtpL16parse);
gst_rtp_L16_caps_nego (rtpL16parse);
}
packet =
......@@ -240,7 +241,7 @@ gst_rtpL16parse_chain (GstPad * pad, GstData * _data)
pt = rtp_packet_get_payload_type (packet);
if (pt != rtpL16parse->payload_type) {
gst_rtpL16parse_payloadtype_change (rtpL16parse, pt);
gst_rtp_L16parse_payloadtype_change (rtpL16parse, pt);
}
outbuf = gst_buffer_new ();
......@@ -252,12 +253,12 @@ gst_rtpL16parse_chain (GstPad * pad, GstData * _data)
memcpy (GST_BUFFER_DATA (outbuf), rtp_packet_get_payload (packet),
GST_BUFFER_SIZE (outbuf));
GST_DEBUG ("gst_rtpL16parse_chain: pushing buffer of size %d",
GST_DEBUG ("gst_rtp_L16parse_chain: pushing buffer of size %d",
GST_BUFFER_SIZE (outbuf));
/* FIXME: According to RFC 1890, this is required, right? */
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
gst_rtpL16parse_ntohs (outbuf);
gst_rtp_L16parse_ntohs (outbuf);
#endif
gst_pad_push (rtpL16parse->srcpad, GST_DATA (outbuf));
......@@ -267,7 +268,7 @@ gst_rtpL16parse_chain (GstPad * pad, GstData * _data)
}
static void
gst_rtpL16parse_set_property (GObject * object, guint prop_id,
gst_rtp_L16parse_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstRtpL16Parse *rtpL16parse;
......@@ -277,7 +278,8 @@ gst_rtpL16parse_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case ARG_PAYLOAD_TYPE:
gst_rtpL16parse_payloadtype_change (rtpL16parse, g_value_get_int (value));
gst_rtp_L16parse_payloadtype_change (rtpL16parse,
g_value_get_int (value));
break;
case ARG_FREQUENCY:
rtpL16parse->frequency = g_value_get_int (value);
......@@ -288,7 +290,7 @@ gst_rtpL16parse_set_property (GObject * object, guint prop_id,
}
static void
gst_rtpL16parse_get_property (GObject * object, guint prop_id, GValue * value,
gst_rtp_L16parse_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec)
{
GstRtpL16Parse *rtpL16parse;
......@@ -310,7 +312,7 @@ gst_rtpL16parse_get_property (GObject * object, guint prop_id, GValue * value,
}
static GstStateChangeReturn
gst_rtpL16parse_change_state (GstElement * element, GstStateChange transition)
gst_rtp_L16parse_change_state (GstElement * element, GstStateChange transition)
{
GstRtpL16Parse *rtpL16parse;
......@@ -338,7 +340,7 @@ gst_rtpL16parse_change_state (GstElement * element, GstStateChange transition)
}
gboolean
gst_rtpL16parse_plugin_init (GstPlugin * plugin)
gst_rtp_L16parse_plugin_init (GstPlugin * plugin)
{
return gst_element_register (plugin, "rtpL16parse",
GST_RANK_NONE, GST_TYPE_RTP_L16_PARSE);
......
......@@ -53,7 +53,7 @@ struct _GstRtpL16ParseClass
/* Standard macros for defining types for this element. */
#define GST_TYPE_RTP_L16_PARSE \
(gst_rtpL16parse_get_type())
(gst_rtp_L16parse_get_type())
#define GST_RTP_L16_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_L16_PARSE,GstRtpL16Parse))
#define GST_RTP_L16_PARSE_CLASS(klass) \
......@@ -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 (GstPlugin * plugin);
gboolean gst_rtp_L16parse_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus
}
......
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <stdlib.h>
#include "gstrtpL16enc.h"
/* elementfactory information */
static GstElementDetails gst_rtpL16enc_details = {
"RTP RAW Audio Encoder",
"Codec/Encoder/Network",
"Encodes Raw Audio into a RTP packet",
"Zeeshan Ali <zak147@yahoo.com>"
};
/* RtpL16Enc signals and args */
enum
{
/* FILL ME */
LAST_SIGNAL
};
enum
{
/* FILL ME */
ARG_0
};
static GstStaticPadTemplate gst_rtpL16enc_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) true, "
"width = (int) 16, "
"depth = (int) 16, "
"rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
static GstStaticPadTemplate gst_rtpL16enc_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("application/x-rtp")
);
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,
const GValue * value, GParamSpec * pspec);
static void gst_rtpL16enc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static GstPadLinkReturn gst_rtpL16enc_sinkconnect (GstPad * pad,
const GstCaps * caps);
static GstStateChangeReturn gst_rtpL16enc_change_state (GstElement * element,
GstStateChange transition);
static GstElementClass *parent_class = NULL;
static GType
gst_rtpL16enc_get_type (void)
{
static GType rtpL16enc_type = 0;
if (!rtpL16enc_type) {
static const GTypeInfo rtpL16enc_info = {
sizeof (GstRtpL16EncClass),
(GBaseInitFunc) gst_rtpL16enc_base_init,
NULL,
(GClassInitFunc) gst_rtpL16enc_class_init,
NULL,
NULL,
sizeof (GstRtpL16Enc),
0,
(GInstanceInitFunc) gst_rtpL16enc_init,
};
rtpL16enc_type =
g_type_register_static (GST_TYPE_ELEMENT, "GstRtpL16Enc",
&rtpL16enc_info, 0);
}
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_static_pad_template_get (&gst_rtpL16enc_sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_rtpL16enc_src_template));
gst_element_class_set_details (element_class, &gst_rtpL16enc_details);
}
static void
gst_rtpL16enc_class_init (GstRtpL16EncClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
gobject_class->set_property = gst_rtpL16enc_set_property;
gobject_class->get_property = gst_rtpL16enc_get_property;
gstelement_class->change_state = gst_rtpL16enc_change_state;
}
static void
gst_rtpL16enc_init (GstRtpL16Enc * rtpL16enc)
{
rtpL16enc->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_rtpL16enc_sink_template), "sink");
rtpL16enc->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_rtpL16enc_src_template), "src");
gst_element_add_pad (GST_ELEMENT (rtpL16enc), rtpL16enc->sinkpad);
gst_element_add_pad (GST_ELEMENT (rtpL16enc), rtpL16enc->srcpad);
gst_pad_set_chain_function (rtpL16enc->sinkpad, gst_rtpL16enc_chain);
gst_pad_set_link_function (rtpL16enc->sinkpad, gst_rtpL16enc_sinkconnect);
rtpL16enc->frequency = 44100;
rtpL16enc->channels = 2;
rtpL16enc->next_time = 0;