summaryrefslogtreecommitdiffstats
path: root/ext/gsm/gstgsmdec.c
diff options
context:
space:
mode:
authorIain Holmes <iain@prettypeople.org>2003-11-01 16:35:25 +0000
committerIain Holmes <iain@prettypeople.org>2003-11-01 16:35:25 +0000
commit0047a122a2f5afa6c815dac3ce54d225abfb81e8 (patch)
tree168583717036ef236ba381512ec011647424ccb9 /ext/gsm/gstgsmdec.c
parent6d5504f6497bac3dfd697b0482b937153fd083ed (diff)
downloadgst-plugins-bad-0047a122a2f5afa6c815dac3ce54d225abfb81e8.tar.gz
gst-plugins-bad-0047a122a2f5afa6c815dac3ce54d225abfb81e8.tar.bz2
gst-plugins-bad-0047a122a2f5afa6c815dac3ce54d225abfb81e8.zip
GSM updated for new stuff
Original commit message from CVS: GSM updated for new stuff
Diffstat (limited to 'ext/gsm/gstgsmdec.c')
-rw-r--r--ext/gsm/gstgsmdec.c48
1 files changed, 43 insertions, 5 deletions
diff --git a/ext/gsm/gstgsmdec.c b/ext/gsm/gstgsmdec.c
index a028255e..bdf6d84c 100644
--- a/ext/gsm/gstgsmdec.c
+++ b/ext/gsm/gstgsmdec.c
@@ -25,17 +25,14 @@
#include "gstgsmdec.h"
-extern GstPadTemplate *gsmdec_src_template, *gsmdec_sink_template;
+static GstPadTemplate *gsmdec_src_template, *gsmdec_sink_template;
/* elementfactory information */
GstElementDetails gst_gsmdec_details = {
"gsm audio decoder",
"Codec/Audio/Decoder",
- "LGPL",
".gsm",
- VERSION,
"Wim Taymans <wim.taymans@chello.be>",
- "(C) 2000",
};
/* GSMDec signals and args */
@@ -49,6 +46,7 @@ enum {
/* FILL ME */
};
+static void gst_gsmdec_base_init (gpointer g_class);
static void gst_gsmdec_class_init (GstGSMDec *klass);
static void gst_gsmdec_init (GstGSMDec *gsmdec);
@@ -64,7 +62,8 @@ gst_gsmdec_get_type(void) {
if (!gsmdec_type) {
static const GTypeInfo gsmdec_info = {
- sizeof(GstGSMDecClass), NULL,
+ sizeof(GstGSMDecClass),
+ gst_gsmdec_base_init,
NULL,
(GClassInitFunc)gst_gsmdec_class_init,
NULL,
@@ -78,6 +77,45 @@ gst_gsmdec_get_type(void) {
return gsmdec_type;
}
+GST_CAPS_FACTORY (gsm_caps_factory,
+ GST_CAPS_NEW (
+ "gsm_gsm",
+ "audio/x-gsm",
+ "rate", GST_PROPS_INT_RANGE (1000, 48000),
+ "channels", GST_PROPS_INT (1)
+ )
+)
+
+GST_CAPS_FACTORY (raw_caps_factory,
+ GST_CAPS_NEW (
+ "gsm_raw",
+ "audio/x-raw-int",
+ "endianness", GST_PROPS_INT (G_BYTE_ORDER),
+ "signed", GST_PROPS_BOOLEAN (TRUE),
+ "width", GST_PROPS_INT (16),
+ "depth", GST_PROPS_INT (16),
+ "rate", GST_PROPS_INT_RANGE (1000, 48000),
+ "channels", GST_PROPS_INT (1)
+ )
+)
+
+static void
+gst_gsmdec_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+ GstCaps *raw_caps, *gsm_caps;
+
+ gsmdec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ gsm_caps, NULL);
+ gsmdec_src_template = gst_pad_template_new ("src", GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ raw_caps, NULL);
+ gst_element_class_add_pad_template (element_class, gsmdec_sink_template);
+ gst_element_class_add_pad_template (element_class, gsmdec_src_template);
+ gst_element_class_set_details (element_class, &gst_gsmdec_details);
+}
+
static void
gst_gsmdec_class_init (GstGSMDec *klass)
{