From 06d94641c271dc846e335104ac61beab38445c4a Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 11 Apr 2002 20:42:26 +0000 Subject: 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. --- ext/arts/gst_arts.c | 90 +++++------------------------------------- ext/arts/gst_artsio_impl.cc | 2 +- ext/artsd/gstartsdsink.c | 8 ++-- ext/audiofile/gstafsink.c | 10 ++--- ext/audiofile/gstafsrc.c | 6 +-- ext/gsm/gstgsm.c | 20 +++++----- ext/hermes/gstcolorspace.c | 20 +++++----- ext/jack/gstjack.c | 14 +++---- ext/ladspa/gstladspa.c | 10 ++--- ext/lcs/gstcolorspace.c | 20 +++++----- ext/sdl/sdlvideosink.c | 6 +-- ext/shout/gstshout.c | 6 +-- ext/smoothwave/demo-osssrc.c | 8 ++-- ext/smoothwave/gstsmoothwave.c | 2 +- ext/tarkin/gsttarkin.c | 30 +++++++------- 15 files changed, 90 insertions(+), 162 deletions(-) (limited to 'ext') 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 ", }; -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); @@ -168,40 +131,6 @@ gst_arts_init (GstARTS *arts) arts->wrapper = gst_arts_wrapper_new(arts->sinkpad,arts->srcpad); } -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) { @@ -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; diff --git a/ext/artsd/gstartsdsink.c b/ext/artsd/gstartsdsink.c index 37e6989d..1933c312 100644 --- a/ext/artsd/gstartsdsink.c +++ b/ext/artsd/gstartsdsink.c @@ -47,7 +47,7 @@ enum { ARG_NAME, }; -GST_PADTEMPLATE_FACTORY (sink_factory, +GST_PAD_TEMPLATE_FACTORY (sink_factory, "sink", /* the name of the pads */ GST_PAD_SINK, /* type of the pad */ GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */ @@ -186,7 +186,7 @@ static void gst_artsdsink_init(GstArtsdsink *artsdsink) { artsdsink->sinkpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (sink_factory), "sink"); + GST_PAD_TEMPLATE_GET (sink_factory), "sink"); gst_element_add_pad(GST_ELEMENT(artsdsink), artsdsink->sinkpad); gst_pad_set_chain_function(artsdsink->sinkpad, gst_artsdsink_chain); @@ -323,11 +323,11 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new("artsdsink", GST_TYPE_ARTSDSINK, + factory = gst_element_factory_new("artsdsink", GST_TYPE_ARTSDSINK, &artsdsink_details); g_return_val_if_fail(factory != NULL, FALSE); - gst_elementfactory_add_padtemplate(factory, GST_PADTEMPLATE_GET (sink_factory)); + gst_element_factory_add_pad_template(factory, GST_PAD_TEMPLATE_GET (sink_factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c index 620082c9..bf570fbb 100644 --- a/ext/audiofile/gstafsink.c +++ b/ext/audiofile/gstafsink.c @@ -51,7 +51,7 @@ enum { /* added a sink factory function to force audio/raw MIME type */ /* I think the caps can be broader, we need to change that somehow */ -GST_PADTEMPLATE_FACTORY (afsink_sink_factory, +GST_PAD_TEMPLATE_FACTORY (afsink_sink_factory, "sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -178,7 +178,7 @@ gst_afsink_init (GstAFSink *afsink) /* GstPad *pad; this is now done in the struct */ afsink->sinkpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (afsink_sink_factory), "sink"); + GST_PAD_TEMPLATE_GET (afsink_sink_factory), "sink"); gst_element_add_pad (GST_ELEMENT (afsink), afsink->sinkpad); gst_pad_set_chain_function (afsink->sinkpad, gst_afsink_chain); @@ -259,11 +259,11 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new ("afsink", GST_TYPE_AFSINK, + factory = gst_element_factory_new ("afsink", GST_TYPE_AFSINK, &afsink_details); g_return_val_if_fail (factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (afsink_sink_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afsink_sink_factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); @@ -499,7 +499,7 @@ gst_afsink_factory_init (GstElementFactory *factory) { GstPadTemplate *sink_pt; sink_pt = afsink_sink_factory(); - gst_elementfactory_add_padtemplate (factory, sink_pt); + gst_element_factory_add_pad_template (factory, sink_pt); return TRUE; diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c index 5f9d4dbe..92483179 100644 --- a/ext/audiofile/gstafsrc.c +++ b/ext/audiofile/gstafsrc.c @@ -50,7 +50,7 @@ enum { /* added a src factory function to force audio/raw MIME type */ /* I think the caps can be broader, we need to change that somehow */ -GST_PADTEMPLATE_FACTORY (afsrc_src_factory, +GST_PAD_TEMPLATE_FACTORY (afsrc_src_factory, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -276,11 +276,11 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new ("afsrc", GST_TYPE_AFSRC, + factory = gst_element_factory_new ("afsrc", GST_TYPE_AFSRC, &afsrc_details); g_return_val_if_fail (factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (afsrc_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afsrc_src_factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/ext/gsm/gstgsm.c b/ext/gsm/gstgsm.c index 47b33a27..619b82ac 100644 --- a/ext/gsm/gstgsm.c +++ b/ext/gsm/gstgsm.c @@ -58,7 +58,7 @@ plugin_init (GModule *module, GstPlugin *plugin) GstCaps *raw_caps, *gsm_caps; /* create an elementfactory for the gsmdec element */ - enc = gst_elementfactory_new("gsmenc",GST_TYPE_GSMENC, + enc = gst_element_factory_new("gsmenc",GST_TYPE_GSMENC, &gst_gsmenc_details); g_return_val_if_fail(enc != NULL, FALSE); @@ -66,35 +66,35 @@ plugin_init (GModule *module, GstPlugin *plugin) gsm_caps = GST_CAPS_GET (gsm_caps_factory); /* register sink pads */ - gsmenc_sink_template = gst_padtemplate_new ("sink", GST_PAD_SINK, + gsmenc_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, raw_caps, NULL); - gst_elementfactory_add_padtemplate (enc, gsmenc_sink_template); + gst_element_factory_add_pad_template (enc, gsmenc_sink_template); /* register src pads */ - gsmenc_src_template = gst_padtemplate_new ("src", GST_PAD_SRC, + gsmenc_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gsm_caps, NULL); - gst_elementfactory_add_padtemplate (enc, gsmenc_src_template); + gst_element_factory_add_pad_template (enc, gsmenc_src_template); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (enc)); /* create an elementfactory for the gsmdec element */ - dec = gst_elementfactory_new("gsmdec",GST_TYPE_GSMDEC, + dec = gst_element_factory_new("gsmdec",GST_TYPE_GSMDEC, &gst_gsmdec_details); g_return_val_if_fail(dec != NULL, FALSE); /* register sink pads */ - gsmdec_sink_template = gst_padtemplate_new ("sink", GST_PAD_SINK, + gsmdec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, gsm_caps, NULL); - gst_elementfactory_add_padtemplate (dec, gsmdec_sink_template); + gst_element_factory_add_pad_template (dec, gsmdec_sink_template); /* register src pads */ - gsmdec_src_template = gst_padtemplate_new ("src", GST_PAD_SRC, + gsmdec_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, raw_caps, NULL); - gst_elementfactory_add_padtemplate (dec, gsmdec_src_template); + gst_element_factory_add_pad_template (dec, gsmdec_src_template); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (dec)); diff --git a/ext/hermes/gstcolorspace.c b/ext/hermes/gstcolorspace.c index fcd76148..5e081a79 100644 --- a/ext/hermes/gstcolorspace.c +++ b/ext/hermes/gstcolorspace.c @@ -45,7 +45,7 @@ enum { ARG_DEST, }; -GST_PADTEMPLATE_FACTORY (colorspace_src_template_factory, +GST_PAD_TEMPLATE_FACTORY (colorspace_src_template_factory, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -62,7 +62,7 @@ GST_PADTEMPLATE_FACTORY (colorspace_src_template_factory, ) ) -GST_PADTEMPLATE_FACTORY (colorspace_sink_template_factory, +GST_PAD_TEMPLATE_FACTORY (colorspace_sink_template_factory, "sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -250,7 +250,7 @@ gst_colorspace_getcaps (GstPad *pad, GstCaps *caps) /* we can do everything our peer can... */ peercaps = gst_caps_copy (gst_pad_get_allowed_caps (space->srcpad)); /* and our own template of course */ - ourcaps = gst_caps_copy (gst_pad_get_padtemplate_caps (pad)); + ourcaps = gst_caps_copy (gst_pad_get_pad_template_caps (pad)); /* merge them together, we prefer the peercaps first */ result = gst_caps_prepend (ourcaps, peercaps); @@ -397,7 +397,7 @@ static void gst_colorspace_init (GstColorspace *space) { space->sinkpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (colorspace_sink_template_factory), "sink"); + GST_PAD_TEMPLATE_GET (colorspace_sink_template_factory), "sink"); gst_pad_set_connect_function (space->sinkpad, gst_colorspace_sinkconnect); gst_pad_set_getcaps_function (space->sinkpad, gst_colorspace_getcaps); gst_pad_set_bufferpool_function (space->sinkpad, colorspace_get_bufferpool); @@ -405,7 +405,7 @@ gst_colorspace_init (GstColorspace *space) gst_element_add_pad(GST_ELEMENT(space),space->sinkpad); space->srcpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (colorspace_src_template_factory), "src"); + GST_PAD_TEMPLATE_GET (colorspace_src_template_factory), "src"); gst_element_add_pad(GST_ELEMENT(space),space->srcpad); gst_pad_set_connect_function (space->srcpad, gst_colorspace_srcconnect); @@ -558,14 +558,14 @@ plugin_init (GModule *module, GstPlugin *plugin) g_return_val_if_fail (hermes_res != 0, FALSE); #endif - factory = gst_elementfactory_new ("colorspace", GST_TYPE_COLORSPACE, + factory = gst_element_factory_new ("colorspace", GST_TYPE_COLORSPACE, &colorspace_details); g_return_val_if_fail (factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, - GST_PADTEMPLATE_GET (colorspace_src_template_factory)); - gst_elementfactory_add_padtemplate (factory, - GST_PADTEMPLATE_GET (colorspace_sink_template_factory)); + gst_element_factory_add_pad_template (factory, + GST_PAD_TEMPLATE_GET (colorspace_src_template_factory)); + gst_element_factory_add_pad_template (factory, + GST_PAD_TEMPLATE_GET (colorspace_sink_template_factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/ext/jack/gstjack.c b/ext/jack/gstjack.c index a61cdb9a..0567f473 100644 --- a/ext/jack/gstjack.c +++ b/ext/jack/gstjack.c @@ -157,7 +157,7 @@ gst_jack_src_request_pad_factory(void) static GstPadTemplate *template = NULL; if (!template) - template = gst_padtemplate_new("%s", GST_PAD_SRC, GST_PAD_REQUEST, + template = gst_pad_template_new("%s", GST_PAD_SRC, GST_PAD_REQUEST, gst_caps_new("src", "audio/raw", GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS), NULL); @@ -171,7 +171,7 @@ gst_jack_sink_request_pad_factory(void) static GstPadTemplate *template = NULL; if (!template) - template = gst_padtemplate_new("%s", GST_PAD_SINK, GST_PAD_REQUEST, + template = gst_pad_template_new("%s", GST_PAD_SINK, GST_PAD_REQUEST, gst_caps_new("sink", "audio/raw", GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS), NULL); @@ -574,7 +574,7 @@ static void shutdown (void *arg) { GstJackClient *client = (GstJackClient*) arg; - printf ("shutdown\n"); + printf ("shutdown %p\n", client); /* gst_element_set_state (GST_ELEMENT (client->manager), GST_STATE_READY); */ } @@ -588,14 +588,14 @@ plugin_init (GModule *module, GstPlugin *plugin) return FALSE; } - factory = gst_elementfactory_new ("jacksrc", GST_TYPE_JACK_SRC, &gst_jack_src_details); + factory = gst_element_factory_new ("jacksrc", GST_TYPE_JACK_SRC, &gst_jack_src_details); g_return_val_if_fail (factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, gst_jack_src_request_pad_factory()); + gst_element_factory_add_pad_template (factory, gst_jack_src_request_pad_factory()); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - factory = gst_elementfactory_new ("jacksink", GST_TYPE_JACK_SINK, &gst_jack_sink_details); + factory = gst_element_factory_new ("jacksink", GST_TYPE_JACK_SINK, &gst_jack_sink_details); g_return_val_if_fail (factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, gst_jack_sink_request_pad_factory()); + gst_element_factory_add_pad_template (factory, gst_jack_sink_request_pad_factory()); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); gst_plugin_set_longname(plugin, "JACK plugin library"); diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index bb49547b..65c4c549 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -30,7 +30,7 @@ static GstPadTemplate* ladspa_src_factory (void) { return - gst_padtemplate_new ( + gst_pad_template_new ( "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -52,7 +52,7 @@ static GstPadTemplate* ladspa_sink_factory (void) { return - gst_padtemplate_new ( + gst_pad_template_new ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -936,7 +936,7 @@ ladspa_describe_plugin(const char *pcFullFilename, details->copyright = g_strdup(desc->Copyright); /* register the plugin with gstreamer */ - factory = gst_elementfactory_new(type_name,type,details); + factory = gst_element_factory_new(type_name,type,details); g_return_if_fail(factory != NULL); gst_plugin_add_feature (ladspa_plugin, GST_PLUGIN_FEATURE (factory)); @@ -951,13 +951,13 @@ ladspa_describe_plugin(const char *pcFullFilename, if (LADSPA_IS_PORT_AUDIO(desc->PortDescriptors[j]) && LADSPA_IS_PORT_INPUT(desc->PortDescriptors[j])) { sinktempl = ladspa_sink_factory(); - gst_elementfactory_add_padtemplate (factory, sinktempl); + gst_element_factory_add_pad_template (factory, sinktempl); break; } } srctempl = ladspa_src_factory(); - gst_elementfactory_add_padtemplate (factory, srctempl); + gst_element_factory_add_pad_template (factory, srctempl); } } diff --git a/ext/lcs/gstcolorspace.c b/ext/lcs/gstcolorspace.c index 291d2c4b..cea5e6ac 100644 --- a/ext/lcs/gstcolorspace.c +++ b/ext/lcs/gstcolorspace.c @@ -82,7 +82,7 @@ enum { ARG_DEST, }; -GST_PADTEMPLATE_FACTORY (colorspace_src_template_factory, +GST_PAD_TEMPLATE_FACTORY (colorspace_src_template_factory, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -99,7 +99,7 @@ GST_PADTEMPLATE_FACTORY (colorspace_src_template_factory, ) ) -GST_PADTEMPLATE_FACTORY (colorspace_sink_template_factory, +GST_PAD_TEMPLATE_FACTORY (colorspace_sink_template_factory, "sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -226,7 +226,7 @@ gst_colorspace_getcaps (GstPad *pad, GstCaps *caps) /* we can do everything our peer can... */ peercaps = gst_caps_copy (gst_pad_get_allowed_caps (space->srcpad)); /* and our own template of course */ - ourcaps = gst_caps_copy (gst_pad_get_padtemplate_caps (pad)); + ourcaps = gst_caps_copy (gst_pad_get_pad_template_caps (pad)); /* merge them together, we prefer the peercaps first */ result = gst_caps_prepend (ourcaps, peercaps); @@ -373,7 +373,7 @@ static void gst_colorspace_init (GstColorspace *space) { space->sinkpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (colorspace_sink_template_factory), "sink"); + GST_PAD_TEMPLATE_GET (colorspace_sink_template_factory), "sink"); gst_pad_set_connect_function (space->sinkpad, gst_colorspace_sinkconnect); gst_pad_set_getcaps_function (space->sinkpad, gst_colorspace_getcaps); gst_pad_set_bufferpool_function (space->sinkpad, colorspace_get_bufferpool); @@ -381,7 +381,7 @@ gst_colorspace_init (GstColorspace *space) gst_element_add_pad(GST_ELEMENT(space),space->sinkpad); space->srcpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (colorspace_src_template_factory), "src"); + GST_PAD_TEMPLATE_GET (colorspace_src_template_factory), "src"); gst_element_add_pad(GST_ELEMENT(space),space->srcpad); gst_pad_set_connect_function (space->srcpad, gst_colorspace_srcconnect); @@ -502,14 +502,14 @@ plugin_init (GModule *module, GstPlugin *plugin) lcs_init (NULL, NULL); - factory = gst_elementfactory_new ("colorspacelcs", GST_TYPE_COLORSPACE, + factory = gst_element_factory_new ("colorspacelcs", GST_TYPE_COLORSPACE, &colorspace_details); g_return_val_if_fail (factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, - GST_PADTEMPLATE_GET (colorspace_src_template_factory)); - gst_elementfactory_add_padtemplate (factory, - GST_PADTEMPLATE_GET (colorspace_sink_template_factory)); + gst_element_factory_add_pad_template (factory, + GST_PAD_TEMPLATE_GET (colorspace_src_template_factory)); + gst_element_factory_add_pad_template (factory, + GST_PAD_TEMPLATE_GET (colorspace_sink_template_factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c index 22e5e11d..065a0c0b 100644 --- a/ext/sdl/sdlvideosink.c +++ b/ext/sdl/sdlvideosink.c @@ -580,7 +580,7 @@ plugin_init (GModule *module, GstPlugin *plugin) }; /* create an elementfactory for the sdlvideosink element */ - factory = gst_elementfactory_new("sdlvideosink",GST_TYPE_SDLVIDEOSINK, + factory = gst_element_factory_new("sdlvideosink",GST_TYPE_SDLVIDEOSINK, &gst_sdlvideosink_details); g_return_val_if_fail(factory != NULL, FALSE); @@ -598,13 +598,13 @@ plugin_init (GModule *module, GstPlugin *plugin) capslist = gst_caps_append(capslist, caps); } - sink_template = gst_padtemplate_new ( + sink_template = gst_pad_template_new ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, capslist, NULL); - gst_elementfactory_add_padtemplate (factory, sink_template); + gst_element_factory_add_pad_template (factory, sink_template); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/ext/shout/gstshout.c b/ext/shout/gstshout.c index 0ff98332..1919768f 100644 --- a/ext/shout/gstshout.c +++ b/ext/shout/gstshout.c @@ -70,7 +70,7 @@ sink_template_factory (void) static GstPadTemplate *template = NULL; if (!template) { - template = gst_padtemplate_new ( + template = gst_pad_template_new ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -452,10 +452,10 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new("icecastsend", GST_TYPE_ICECASTSEND, &icecastsend_details); + factory = gst_element_factory_new("icecastsend", GST_TYPE_ICECASTSEND, &icecastsend_details); g_return_val_if_fail(factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, sink_template_factory ()); + gst_element_factory_add_pad_template (factory, sink_template_factory ()); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/ext/smoothwave/demo-osssrc.c b/ext/smoothwave/demo-osssrc.c index 6f5ee57a..4807a3a4 100644 --- a/ext/smoothwave/demo-osssrc.c +++ b/ext/smoothwave/demo-osssrc.c @@ -24,14 +24,14 @@ int main(int argc,char *argv[]) { bin = gst_bin_new("bin"); - srcfactory = gst_elementfactory_find("audiosrc"); + srcfactory = gst_element_factory_find("audiosrc"); g_return_val_if_fail(srcfactory != NULL, -1); - wavefactory = gst_elementfactory_find("smoothwave"); + wavefactory = gst_element_factory_find("smoothwave"); g_return_val_if_fail(wavefactory != NULL, -1); - src = gst_elementfactory_create(srcfactory,"src"); + src = gst_element_factory_create(srcfactory,"src"); gtk_object_set(GTK_OBJECT(src),"bytes_per_read",(gulong)2048,NULL); - wave = gst_elementfactory_create(wavefactory,"wave"); + wave = gst_element_factory_create(wavefactory,"wave"); gtk_object_set(GTK_OBJECT(wave),"width",256,"height",100,NULL); diff --git a/ext/smoothwave/gstsmoothwave.c b/ext/smoothwave/gstsmoothwave.c index 48d32c4b..7f2246f3 100644 --- a/ext/smoothwave/gstsmoothwave.c +++ b/ext/smoothwave/gstsmoothwave.c @@ -284,7 +284,7 @@ plugin_init (GModule *module, GstPlugin *plugin) GstElementFactory *factory; /* create an elementfactory for the smoothwave element */ - factory = gst_elementfactory_new("smoothwave",GST_TYPE_SMOOTHWAVE, + factory = gst_element_factory_new("smoothwave",GST_TYPE_SMOOTHWAVE, &gst_smoothwave_details); g_return_val_if_fail(factory != NULL, FALSE); diff --git a/ext/tarkin/gsttarkin.c b/ext/tarkin/gsttarkin.c index 4a4c9643..4f3a8141 100644 --- a/ext/tarkin/gsttarkin.c +++ b/ext/tarkin/gsttarkin.c @@ -24,7 +24,7 @@ extern GstElementDetails tarkinenc_details; extern GstElementDetails tarkindec_details; -static GstCaps* tarkin_typefind (GstBuffer *buf, gpointer private); +static GstCaps* tarkin_type_find (GstBuffer *buf, gpointer private); GstPadTemplate *enc_src_template, *enc_sink_template; GstPadTemplate *dec_src_template, *dec_sink_template; @@ -63,11 +63,11 @@ static GstTypeDefinition tarkindefinition = "tarkin_video/x-ogg", "video/x-ogg", ".ogg", - tarkin_typefind, + tarkin_type_find, }; static GstCaps* -tarkin_typefind (GstBuffer *buf, gpointer private) +tarkin_type_find (GstBuffer *buf, gpointer private) { gulong head = GULONG_FROM_BE (*((gulong *)GST_BUFFER_DATA (buf))); @@ -77,7 +77,7 @@ tarkin_typefind (GstBuffer *buf, gpointer private) if (head != 0x4F676753) return NULL; - return gst_caps_new ("tarkin_typefind", "video/x-ogg", NULL); + return gst_caps_new ("tarkin_type_find", "video/x-ogg", NULL); } @@ -91,7 +91,7 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_set_longname (plugin, "The OGG Vorbis Codec"); /* create an elementfactory for the tarkinenc element */ - enc = gst_elementfactory_new ("tarkinenc", GST_TYPE_TARKINENC, + enc = gst_element_factory_new ("tarkinenc", GST_TYPE_TARKINENC, &tarkinenc_details); g_return_val_if_fail (enc != NULL, FALSE); @@ -99,25 +99,25 @@ plugin_init (GModule *module, GstPlugin *plugin) tarkin_caps = tarkin_caps_factory (); /* register sink pads */ - enc_sink_template = gst_padtemplate_new ("sink", + enc_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, raw_caps, NULL); - gst_elementfactory_add_padtemplate (enc, enc_sink_template); + gst_element_factory_add_pad_template (enc, enc_sink_template); /* register src pads */ - enc_src_template = gst_padtemplate_new ("src", + enc_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, tarkin_caps, NULL); - gst_elementfactory_add_padtemplate (enc, enc_src_template); + gst_element_factory_add_pad_template (enc, enc_src_template); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (enc)); /* create an elementfactory for the tarkindec element */ - dec = gst_elementfactory_new ("tarkindec", GST_TYPE_TARKINDEC, + dec = gst_element_factory_new ("tarkindec", GST_TYPE_TARKINDEC, &tarkindec_details); g_return_val_if_fail (dec != NULL, FALSE); @@ -125,24 +125,24 @@ plugin_init (GModule *module, GstPlugin *plugin) tarkin_caps = tarkin_caps_factory (); /* register sink pads */ - dec_sink_template = gst_padtemplate_new ("sink", + dec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, tarkin_caps, NULL); - gst_elementfactory_add_padtemplate (dec, dec_sink_template); + gst_element_factory_add_pad_template (dec, dec_sink_template); /* register src pads */ - dec_src_template = gst_padtemplate_new ("src", + dec_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, raw_caps, NULL); - gst_elementfactory_add_padtemplate (dec, dec_src_template); + gst_element_factory_add_pad_template (dec, dec_src_template); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (dec)); - type = gst_typefactory_new (&tarkindefinition); + type = gst_type_factory_new (&tarkindefinition); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); return TRUE; -- cgit v1.2.1