+2004-03-24 David Schleef <ds@schleef.org>
+
+ * ext/speex/gstspeexdec.c: (gst_speexdec_base_init),
+ (gst_speexdec_init):
+ * ext/speex/gstspeexenc.c: (gst_speexenc_base_init),
+ (gst_speexenc_init): Create the pad template correctly (from
+ the static pad template, not a NULL pointer.)
+
2004-03-25 Benjamin Otte <otte@gnome.org>
* gst/debug/Makefile.am:
#include "gstspeexdec.h"
-static GstPadTemplate *speexdec_src_template, *speexdec_sink_template;
-
/* elementfactory information */
GstElementDetails gst_speexdec_details = {
"speex audio decoder",
return speexdec_type;
}
-static GstStaticPadTemplate speex_sink_template =
+static GstStaticPadTemplate speexdec_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
"rate = (int) [ 1000, 48000 ], " "channels = (int) 1")
);
-static GstStaticPadTemplate speex_src_template = GST_STATIC_PAD_TEMPLATE ("src",
+static GstStaticPadTemplate speexdec_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&speex_src_template));
+ gst_static_pad_template_get (&speexdec_src_template));
gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&speex_sink_template));
+ gst_static_pad_template_get (&speexdec_sink_template));
gst_element_class_set_details (element_class, &gst_speexdec_details);
}
/* create the sink and src pads */
speexdec->sinkpad =
- gst_pad_new_from_template (speexdec_sink_template, "sink");
+ gst_pad_new_from_template (gst_static_pad_template_get
+ (&speexdec_sink_template), "sink");
gst_element_add_pad (GST_ELEMENT (speexdec), speexdec->sinkpad);
gst_pad_set_chain_function (speexdec->sinkpad, gst_speexdec_chain);
gst_pad_set_link_function (speexdec->sinkpad, gst_speexdec_sinkconnect);
- speexdec->srcpad = gst_pad_new_from_template (speexdec_src_template, "src");
+ speexdec->srcpad =
+ gst_pad_new_from_template (gst_static_pad_template_get
+ (&speexdec_src_template), "src");
gst_pad_use_explicit_caps (speexdec->srcpad);
gst_element_add_pad (GST_ELEMENT (speexdec), speexdec->srcpad);
#include "gstspeexenc.h"
-static GstPadTemplate *speexenc_src_template, *speexenc_sink_template;
-
/* elementfactory information */
GstElementDetails gst_speexenc_details = {
"speex audio encoder",
return speexenc_type;
}
-static GstStaticPadTemplate speex_sink_template =
+static GstStaticPadTemplate speexenc_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
"rate = (int) [ 1000, 48000 ], " "channels = (int) 1")
);
-static GstStaticPadTemplate speex_src_template = GST_STATIC_PAD_TEMPLATE ("src",
+static GstStaticPadTemplate speexenc_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-speex, "
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&speex_sink_template));
+ gst_static_pad_template_get (&speexenc_sink_template));
gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&speex_src_template));
+ gst_static_pad_template_get (&speexenc_src_template));
gst_element_class_set_details (element_class, &gst_speexenc_details);
}
{
/* create the sink and src pads */
speexenc->sinkpad =
- gst_pad_new_from_template (speexenc_sink_template, "sink");
+ gst_pad_new_from_template (gst_static_pad_template_get
+ (&speexenc_sink_template), "sink");
gst_element_add_pad (GST_ELEMENT (speexenc), speexenc->sinkpad);
gst_pad_set_chain_function (speexenc->sinkpad, gst_speexenc_chain);
gst_pad_set_link_function (speexenc->sinkpad, gst_speexenc_sinkconnect);
- speexenc->srcpad = gst_pad_new_from_template (speexenc_src_template, "src");
+ speexenc->srcpad =
+ gst_pad_new_from_template (gst_static_pad_template_get
+ (&speexenc_src_template), "src");
gst_element_add_pad (GST_ELEMENT (speexenc), speexenc->srcpad);
speex_bits_init (&speexenc->bits);