diff options
author | Andy Wingo <wingo@pobox.com> | 2002-04-11 20:42:26 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2002-04-11 20:42:26 +0000 |
commit | 06d94641c271dc846e335104ac61beab38445c4a (patch) | |
tree | cd066b7966e619ab2c31e6fdf43d584be29c0e90 /ext/arts | |
parent | 8c43b5fd9b38cf9c55e5c148c985cd1b8731b5b7 (diff) | |
download | gst-plugins-bad-06d94641c271dc846e335104ac61beab38445c4a.tar.gz gst-plugins-bad-06d94641c271dc846e335104ac61beab38445c4a.tar.bz2 gst-plugins-bad-06d94641c271dc846e335104ac61beab38445c4a.zip |
GstPadTemplate <-> gst_pad_template <-> GST_PAD_TEMPLATE same with *factory and typefind.
Original commit message from CVS:
GstPadTemplate <-> gst_pad_template <-> GST_PAD_TEMPLATE
same with *factory and typefind.
also, some -Werror fixes.
Diffstat (limited to 'ext/arts')
-rw-r--r-- | ext/arts/gst_arts.c | 90 | ||||
-rw-r--r-- | ext/arts/gst_artsio_impl.cc | 2 |
2 files changed, 10 insertions, 82 deletions
diff --git a/ext/arts/gst_arts.c b/ext/arts/gst_arts.c index 736b41c1..f3b45b41 100644 --- a/ext/arts/gst_arts.c +++ b/ext/arts/gst_arts.c @@ -37,7 +37,7 @@ Stefan Westerfeld <stefan@space.twc.de>", }; -GST_PADTEMPLATE_FACTORY ( sink_temp, +GST_PAD_TEMPLATE_FACTORY ( sink_temp, "sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -54,7 +54,7 @@ GST_PADTEMPLATE_FACTORY ( sink_temp, ) ) -GST_PADTEMPLATE_FACTORY ( src_temp, +GST_PAD_TEMPLATE_FACTORY ( src_temp, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -67,38 +67,11 @@ GST_PADTEMPLATE_FACTORY ( src_temp, "width", GST_PROPS_INT (16), "signed", GST_PROPS_BOOLEAN (TRUE), "channels", GST_PROPS_INT (2), - "endianness", GST_PROPS_INT (G_LITTLE_ENDIAN) + "rate", GST_PROPS_INT (44100), + "endianness", GST_PROPS_INT (G_BYTE_ORDER) ) ) -static GstPadTemplate* -mad_src_template_factory (void) -{ - static GstPadTemplate *templ = NULL; - - if (!templ) { - templ = gst_padtemplate_new ( - "src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - gst_caps_new ( - "mad_src", - "audio/raw", - gst_props_new ( - "format", GST_PROPS_STRING ("int"), - "law", GST_PROPS_INT (0), - "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 (44100), - "channels", GST_PROPS_INT (2), - NULL)), - NULL); - } - return templ; -} - enum { ARG_0, ARG_LAST, @@ -107,10 +80,6 @@ enum { static void gst_arts_class_init (GstARTSClass *klass); static void gst_arts_init (GstARTS *arts); -static void gst_arts_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static void gst_arts_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); - -static GstElementStateReturn gst_arts_change_state (GstElement *element); static void gst_arts_loop (GstElement *element); @@ -146,21 +115,15 @@ gst_arts_class_init (GstARTSClass *klass) gobject_class = (GObjectClass*)klass; gstelement_class = (GstElementClass*)klass; - - gobject_class->set_property = gst_arts_set_property; - gobject_class->get_property = gst_arts_get_property; - - gstelement_class->change_state = gst_arts_change_state; } static void gst_arts_init (GstARTS *arts) { - arts->sinkpad = gst_pad_new_from_template(GST_PADTEMPLATE_GET(sink_temp),"sink"); + arts->sinkpad = gst_pad_new_from_template(GST_PAD_TEMPLATE_GET(sink_temp),"sink"); gst_element_add_pad(GST_ELEMENT(arts),arts->sinkpad); -/* arts->srcpad = gst_pad_new_from_template(GST_PADTEMPLATE_GET(src_temp),"src"); */ - arts->srcpad = gst_pad_new_from_template(mad_src_template_factory (), "src"); + arts->srcpad = gst_pad_new_from_template(GST_PAD_TEMPLATE_GET(src_temp),"src"); gst_element_add_pad(GST_ELEMENT(arts),arts->srcpad); gst_element_set_loop_function (GST_ELEMENT (arts), gst_arts_loop); @@ -169,40 +132,6 @@ gst_arts_init (GstARTS *arts) } static void -gst_arts_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) -{ - GstARTS *arts = (GstARTS*)object; - GstARTSClass *oclass = (GstARTSClass*)(G_OBJECT_CLASS (object)); - -} - -static void -gst_arts_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) -{ - GstARTS *arts = (GstARTS*)object; - GstARTSClass *oclass = (GstARTSClass*)(G_OBJECT_CLASS (object)); - -} - -static GstElementStateReturn -gst_arts_change_state (GstElement *element) -{ - GstARTS *arts = (GstARTS*)element; - - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_NULL_TO_READY: - break; - default: - break; - } - - if (GST_ELEMENT_CLASS (parent_class)->change_state) - return GST_ELEMENT_CLASS (parent_class)->change_state (element); - - return GST_STATE_SUCCESS; -} - -static void gst_arts_loop (GstElement *element) { GstARTS *arts = (GstARTS*)element; @@ -219,12 +148,11 @@ plugin_init (GModule *module, GstPlugin *plugin) parent_class = g_type_class_ref(GST_TYPE_ELEMENT); - gstarts = gst_elementfactory_new("gstarts",GST_TYPE_ARTS,&gst_arts_details); + gstarts = gst_element_factory_new("gstarts",GST_TYPE_ARTS,&gst_arts_details); g_return_val_if_fail(gstarts != NULL, FALSE); - gst_elementfactory_add_padtemplate(gstarts, GST_PADTEMPLATE_GET(sink_temp)); -/* gst_elementfactory_add_padtemplate(gstarts, GST_PADTEMPLATE_GET(src_temp)); */ - gst_elementfactory_add_padtemplate(gstarts, mad_src_template_factory ()); + gst_element_factory_add_pad_template(gstarts, GST_PAD_TEMPLATE_GET(sink_temp)); + gst_element_factory_add_pad_template(gstarts, GST_PAD_TEMPLATE_GET(src_temp)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (gstarts)); diff --git a/ext/arts/gst_artsio_impl.cc b/ext/arts/gst_artsio_impl.cc index 4d7eb3f9..1570555a 100644 --- a/ext/arts/gst_artsio_impl.cc +++ b/ext/arts/gst_artsio_impl.cc @@ -17,7 +17,7 @@ class ArtsStereoSink_impl : virtual public ArtsStereoSink_skel, { GstPad *sinkpad; - long remainingsamples; + unsigned long remainingsamples; GstBuffer *inbuf; unsigned char *dataptr; |