From f7ebc8f95d2735e1855c6aa6c0b97cec8988219b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 11 Apr 2002 20:42:27 +0000 Subject: [PATCH] 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. --- common | 2 +- examples/capsfilter/capsfilter1.c | 12 ++++++------ ext/alsa/gstalsa.c | 20 +++++++++---------- ext/cdparanoia/gstcdparanoia.c | 8 ++++---- ext/gnomevfs/gstgnomevfssink.c | 2 +- ext/gnomevfs/gstgnomevfssrc.c | 2 +- ext/vorbis/vorbis.c | 30 ++++++++++++++--------------- gst-libs/gst/audio/audio.h | 2 +- gst/adder/gstadder.c | 11 ++++++----- gst/audioscale/gstaudioscale.c | 10 +++++----- gst/sine/demo-dparams.c | 4 ++-- gst/sine/gstsinesrc.c | 8 ++++---- gst/videoscale/gstvideoscale.c | 14 +++++++------- gst/volume/gstvolume.c | 10 +++++----- sys/v4l/gstv4lelement.c | 2 +- sys/v4l/gstv4lmjpegsink.c | 6 +++--- sys/v4l/gstv4lmjpegsrc.c | 6 +++--- sys/v4l/gstv4lsrc.c | 6 +++--- tests/old/examples/capsfilter/capsfilter1.c | 12 ++++++------ testsuite/autoplug/autoplug.c | 6 +++--- testsuite/autoplug/autoplug2.c | 2 +- testsuite/autoplug/autoplug3.c | 6 +++--- testsuite/autoplug/autoplug4.c | 12 ++++++------ 23 files changed, 97 insertions(+), 96 deletions(-) diff --git a/common b/common index d8fa543..52a8d4b 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit d8fa5431e3f6f1b9c8be36bad079719a6c4b529a +Subproject commit 52a8d4bd490c495f1e71725644535dbf2cf209c7 diff --git a/examples/capsfilter/capsfilter1.c b/examples/capsfilter/capsfilter1.c index ab6f4a0..35e2046 100644 --- a/examples/capsfilter/capsfilter1.c +++ b/examples/capsfilter/capsfilter1.c @@ -39,20 +39,20 @@ main (gint argc, gchar *argv[]) } pipeline = gst_pipeline_new ("main_pipeline"); - filesrc = gst_elementfactory_make ("filesrc", "filesrc"); + filesrc = gst_element_factory_make ("filesrc", "filesrc"); g_return_val_if_fail (filesrc, -1); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); - demux = gst_elementfactory_make ("mpegdemux", "demux"); + demux = gst_element_factory_make ("mpegdemux", "demux"); g_return_val_if_fail (demux, -1); g_signal_connect (G_OBJECT (demux), "new_pad", G_CALLBACK (new_pad_func), pipeline); thread = gst_thread_new ("thread"); - queue = gst_elementfactory_make ("queue", "queue"); - mpeg2dec = gst_elementfactory_make ("mpeg2dec", "mpeg2dec"); + queue = gst_element_factory_make ("queue", "queue"); + mpeg2dec = gst_element_factory_make ("mpeg2dec", "mpeg2dec"); g_return_val_if_fail (mpeg2dec, -1); - colorspace = gst_elementfactory_make ("colorspace", "colorspace"); + colorspace = gst_element_factory_make ("colorspace", "colorspace"); g_return_val_if_fail (colorspace, -1); - xvideosink = gst_elementfactory_make ("xvideosink", "xvideosink"); + xvideosink = gst_element_factory_make ("xvideosink", "xvideosink"); g_return_val_if_fail (xvideosink, -1); g_object_set (G_OBJECT (xvideosink), "toplevel", TRUE, NULL); diff --git a/ext/alsa/gstalsa.c b/ext/alsa/gstalsa.c index 9a8f9c6..6b4e25c 100644 --- a/ext/alsa/gstalsa.c +++ b/ext/alsa/gstalsa.c @@ -162,7 +162,7 @@ gst_alsa_src_pad_factory(void) static GstPadTemplate *template = NULL; if (!template) - template = gst_padtemplate_new("src", GST_PAD_SRC, GST_PAD_SOMETIMES, + template = gst_pad_template_new("src", GST_PAD_SRC, GST_PAD_SOMETIMES, gst_caps_new("src", "audio/raw", NULL), NULL); @@ -175,7 +175,7 @@ gst_alsa_src_request_pad_factory(void) static GstPadTemplate *template = NULL; if (!template) - template = gst_padtemplate_new("src%d", GST_PAD_SRC, GST_PAD_REQUEST, + template = gst_pad_template_new("src%d", GST_PAD_SRC, GST_PAD_REQUEST, gst_caps_new("src", "audio/raw", gst_props_new("channels", GST_PROPS_INT(1), NULL)), NULL); @@ -189,7 +189,7 @@ gst_alsa_sink_pad_factory(void) static GstPadTemplate *template = NULL; if (!template) - template = gst_padtemplate_new("sink", GST_PAD_SINK, GST_PAD_SOMETIMES, + template = gst_pad_template_new("sink", GST_PAD_SINK, GST_PAD_SOMETIMES, gst_caps_new("sink", "audio/raw", NULL), NULL); @@ -202,7 +202,7 @@ gst_alsa_sink_request_pad_factory(void) static GstPadTemplate *template = NULL; if (!template) - template = gst_padtemplate_new("sink%d", GST_PAD_SINK, GST_PAD_REQUEST, + template = gst_pad_template_new("sink%d", GST_PAD_SINK, GST_PAD_REQUEST, gst_caps_new("sink-request", "audio/raw", gst_props_new("channels", GST_PROPS_INT(1), NULL)), NULL); @@ -1415,16 +1415,16 @@ plugin_init (GModule *module, GstPlugin *plugin) return FALSE; } - factory = gst_elementfactory_new ("alsasrc", GST_TYPE_ALSA_SRC, &gst_alsa_src_details); + factory = gst_element_factory_new ("alsasrc", GST_TYPE_ALSA_SRC, &gst_alsa_src_details); g_return_val_if_fail (factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, gst_alsa_src_pad_factory()); - gst_elementfactory_add_padtemplate (factory, gst_alsa_src_request_pad_factory()); + gst_element_factory_add_pad_template (factory, gst_alsa_src_pad_factory()); + gst_element_factory_add_pad_template (factory, gst_alsa_src_request_pad_factory()); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - factory = gst_elementfactory_new ("alsasink", GST_TYPE_ALSA_SINK, &gst_alsa_sink_details); + factory = gst_element_factory_new ("alsasink", GST_TYPE_ALSA_SINK, &gst_alsa_sink_details); g_return_val_if_fail (factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, gst_alsa_sink_pad_factory()); - gst_elementfactory_add_padtemplate (factory, gst_alsa_sink_request_pad_factory()); + gst_element_factory_add_pad_template (factory, gst_alsa_sink_pad_factory()); + gst_element_factory_add_pad_template (factory, gst_alsa_sink_request_pad_factory()); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); gst_plugin_set_longname(plugin, "ALSA plugin library"); diff --git a/ext/cdparanoia/gstcdparanoia.c b/ext/cdparanoia/gstcdparanoia.c index 0ffddfd..8728501 100644 --- a/ext/cdparanoia/gstcdparanoia.c +++ b/ext/cdparanoia/gstcdparanoia.c @@ -44,7 +44,7 @@ static GstElementDetails cdparanoia_details = { "(C) 2000", }; -GST_PADTEMPLATE_FACTORY (cdparanoia_src_factory, +GST_PAD_TEMPLATE_FACTORY (cdparanoia_src_factory, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -240,7 +240,7 @@ static void cdparanoia_init (CDParanoia *cdparanoia) { cdparanoia->srcpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (cdparanoia_src_factory), "src"); + GST_PAD_TEMPLATE_GET (cdparanoia_src_factory), "src"); gst_pad_set_get_function (cdparanoia->srcpad, cdparanoia_get); gst_element_add_pad (GST_ELEMENT (cdparanoia), cdparanoia->srcpad); @@ -635,12 +635,12 @@ plugin_init (GModule *module, GstPlugin *plugin) GstElementFactory *factory; /* create an elementfactory for the cdparanoia element */ - factory = gst_elementfactory_new ("cdparanoia", GST_TYPE_CDPARANOIA, + factory = gst_element_factory_new ("cdparanoia", GST_TYPE_CDPARANOIA, &cdparanoia_details); g_return_val_if_fail (factory != NULL, FALSE); /* register the source's caps */ - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (cdparanoia_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (cdparanoia_src_factory)); /* and add the cdparanoia element factory to the plugin */ gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/ext/gnomevfs/gstgnomevfssink.c b/ext/gnomevfs/gstgnomevfssink.c index 0ffecc3..cbb964e 100644 --- a/ext/gnomevfs/gstgnomevfssink.c +++ b/ext/gnomevfs/gstgnomevfssink.c @@ -356,7 +356,7 @@ plugin_init (GModule *module, GstPlugin *plugin) GstElementFactory *factory; /* create an elementfactory for the aasink element */ - factory = gst_elementfactory_new("gnomevfssink", GST_TYPE_GNOMEVFSSINK, + factory = gst_element_factory_new("gnomevfssink", GST_TYPE_GNOMEVFSSINK, &gst_gnomevfssink_details); g_return_val_if_fail(factory != NULL, FALSE); diff --git a/ext/gnomevfs/gstgnomevfssrc.c b/ext/gnomevfs/gstgnomevfssrc.c index 8ff8711..784afc2 100644 --- a/ext/gnomevfs/gstgnomevfssrc.c +++ b/ext/gnomevfs/gstgnomevfssrc.c @@ -540,7 +540,7 @@ static gboolean plugin_init(GModule *module, GstPlugin *plugin) /* create an elementfactory for the aasink element */ factory = - gst_elementfactory_new("gnomevfssrc", GST_TYPE_GNOMEVFSSRC, + gst_element_factory_new("gnomevfssrc", GST_TYPE_GNOMEVFSSRC, &gst_gnomevfssrc_details); g_return_val_if_fail(factory != NULL, FALSE); diff --git a/ext/vorbis/vorbis.c b/ext/vorbis/vorbis.c index 778c4cd..3783eeb 100644 --- a/ext/vorbis/vorbis.c +++ b/ext/vorbis/vorbis.c @@ -24,7 +24,7 @@ extern GstElementDetails vorbisenc_details; extern GstElementDetails vorbisdec_details; -static GstCaps* vorbis_typefind (GstBuffer *buf, gpointer private); +static GstCaps* vorbis_type_find (GstBuffer *buf, gpointer private); GstPadTemplate *dec_src_template, *dec_sink_template; GstPadTemplate *enc_src_template, *enc_sink_template; @@ -77,18 +77,18 @@ static GstTypeDefinition vorbisdefinition = { "vorbis_audio/x-ogg", "audio/x-ogg", ".ogg", - vorbis_typefind, + vorbis_type_find, }; static GstCaps* -vorbis_typefind (GstBuffer *buf, gpointer private) +vorbis_type_find (GstBuffer *buf, gpointer private) { gulong head = GULONG_FROM_BE (*((gulong *)GST_BUFFER_DATA (buf))); if (head != 0x4F676753) return NULL; - return gst_caps_new ("vorbis_typefind", "audio/x-ogg", NULL); + return gst_caps_new ("vorbis_type_find", "audio/x-ogg", NULL); } @@ -102,7 +102,7 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_set_longname (plugin, "The OGG Vorbis Codec"); /* create an elementfactory for the vorbisenc element */ - enc = gst_elementfactory_new ("vorbisenc", GST_TYPE_VORBISENC, + enc = gst_element_factory_new ("vorbisenc", GST_TYPE_VORBISENC, &vorbisenc_details); g_return_val_if_fail (enc != NULL, FALSE); @@ -111,40 +111,40 @@ plugin_init (GModule *module, GstPlugin *plugin) vorbis_caps = vorbis_caps_factory (); /* register sink pads */ - enc_sink_template = gst_padtemplate_new ("sink", GST_PAD_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", GST_PAD_SRC, + enc_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, vorbis_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 vorbisdec element */ - dec = gst_elementfactory_new("vorbisdec",GST_TYPE_VORBISDEC, + dec = gst_element_factory_new("vorbisdec",GST_TYPE_VORBISDEC, &vorbisdec_details); g_return_val_if_fail(dec != NULL, FALSE); /* register sink pads */ - dec_sink_template = gst_padtemplate_new ("sink", GST_PAD_SINK, + dec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, vorbis_caps, NULL); - gst_elementfactory_add_padtemplate (dec, dec_sink_template); + gst_element_factory_add_pad_template (dec, dec_sink_template); raw_caps = gst_caps_prepend (raw_caps, raw_caps2); /* register src pads */ - dec_src_template = gst_padtemplate_new ("src", GST_PAD_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 (&vorbisdefinition); + type = gst_type_factory_new (&vorbisdefinition); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); return TRUE; diff --git a/gst-libs/gst/audio/audio.h b/gst-libs/gst/audio/audio.h index 58ecd23..4672a4d 100644 --- a/gst-libs/gst/audio/audio.h +++ b/gst-libs/gst/audio/audio.h @@ -31,7 +31,7 @@ * for example, to make a source pad that can output mono streams of either * float or int: - template = gst_padtemplate_new + template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_append(gst_caps_new ("sink_int", "audio/raw", GST_AUDIO_INT_PAD_TEMPLATE_PROPS), diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 5438b12..7ef883d 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -48,7 +48,7 @@ enum { /* FILL ME */ }; -GST_PADTEMPLATE_FACTORY (gst_adder_src_template_factory, +GST_PAD_TEMPLATE_FACTORY (gst_adder_src_template_factory, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -76,7 +76,7 @@ GST_PADTEMPLATE_FACTORY (gst_adder_src_template_factory, ) ); -GST_PADTEMPLATE_FACTORY (gst_adder_sink_template_factory, +GST_PAD_TEMPLATE_FACTORY (gst_adder_sink_template_factory, "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, @@ -346,6 +346,7 @@ gst_adder_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe g_value_set_int (value, adder->numsinkpads); break; default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } @@ -483,7 +484,7 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new("adder",GST_TYPE_ADDER, + factory = gst_element_factory_new("adder",GST_TYPE_ADDER, &adder_details); g_return_val_if_fail(factory != NULL, FALSE); @@ -492,8 +493,8 @@ plugin_init (GModule *module, GstPlugin *plugin) return FALSE; } - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (gst_adder_src_template_factory)); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (gst_adder_sink_template_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (gst_adder_src_template_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (gst_adder_sink_template_factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/gst/audioscale/gstaudioscale.c b/gst/audioscale/gstaudioscale.c index ebd733a..8774b6c 100644 --- a/gst/audioscale/gstaudioscale.c +++ b/gst/audioscale/gstaudioscale.c @@ -56,7 +56,7 @@ sink_template (void) static GstPadTemplate *template = NULL; if (!template) { - template = gst_padtemplate_new ("sink", + template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_new @@ -72,7 +72,7 @@ src_template (void) static GstPadTemplate *template = NULL; if (!template) { - template = gst_padtemplate_new ("src", + template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gst_caps_new @@ -199,12 +199,12 @@ gst_audioscale_init (Audioscale *audioscale) { resample_t *r; - audioscale->sinkpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (sink_template), "sink"); + audioscale->sinkpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (sink_template), "sink"); gst_element_add_pad(GST_ELEMENT(audioscale),audioscale->sinkpad); gst_pad_set_chain_function(audioscale->sinkpad,gst_audioscale_chain); gst_pad_set_connect_function (audioscale->sinkpad, gst_audioscale_sinkconnect); - audioscale->srcpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (src_template), "src"); + audioscale->srcpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (src_template), "src"); gst_element_add_pad(GST_ELEMENT(audioscale),audioscale->srcpad); @@ -314,7 +314,7 @@ plugin_init (GModule *module, GstPlugin *plugin) GstElementFactory *factory; /* create an elementfactory for the audioscale element */ - factory = gst_elementfactory_new ("audioscale", GST_TYPE_AUDIOSCALE, &audioscale_details); + factory = gst_element_factory_new ("audioscale", GST_TYPE_AUDIOSCALE, &audioscale_details); g_return_val_if_fail(factory != NULL, FALSE); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/gst/sine/demo-dparams.c b/gst/sine/demo-dparams.c index 129a2b2..fc80b61 100644 --- a/gst/sine/demo-dparams.c +++ b/gst/sine/demo-dparams.c @@ -63,8 +63,8 @@ int main(int argc,char *argv[]) { g_print("creating elements\n"); thread = gst_thread_new("live-example"); - sinesrc = gst_elementfactory_make("sinesrc","sine-source"); - osssink = gst_elementfactory_make("osssink","sound-sink"); + sinesrc = gst_element_factory_make("sinesrc","sine-source"); + osssink = gst_element_factory_make("osssink","sound-sink"); gst_bin_add(GST_BIN(thread),sinesrc); gst_bin_add(GST_BIN(thread),osssink); gst_element_connect(sinesrc,osssink); diff --git a/gst/sine/gstsinesrc.c b/gst/sine/gstsinesrc.c index 28323dc..db67ada 100644 --- a/gst/sine/gstsinesrc.c +++ b/gst/sine/gstsinesrc.c @@ -56,7 +56,7 @@ enum { }; /* FIXME: this is not core business... */ -GST_PADTEMPLATE_FACTORY (sinesrc_src_factory, +GST_PAD_TEMPLATE_FACTORY (sinesrc_src_factory, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -158,7 +158,7 @@ gst_sinesrc_init (GstSineSrc *src) { src->srcpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (sinesrc_src_factory), "src"); + GST_PAD_TEMPLATE_GET (sinesrc_src_factory), "src"); gst_element_add_pad(GST_ELEMENT(src), src->srcpad); gst_pad_set_get_function(src->srcpad, gst_sinesrc_get); @@ -421,11 +421,11 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new("sinesrc",GST_TYPE_SINESRC, + factory = gst_element_factory_new("sinesrc",GST_TYPE_SINESRC, &gst_sinesrc_details); g_return_val_if_fail(factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sinesrc_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sinesrc_src_factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c index 4d24a30..5095da1 100644 --- a/gst/videoscale/gstvideoscale.c +++ b/gst/videoscale/gstvideoscale.c @@ -47,7 +47,7 @@ enum { /* FILL ME */ }; -GST_PADTEMPLATE_FACTORY (sink_templ, +GST_PAD_TEMPLATE_FACTORY (sink_templ, "sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -58,7 +58,7 @@ GST_PADTEMPLATE_FACTORY (sink_templ, ) ) -GST_PADTEMPLATE_FACTORY (src_templ, +GST_PAD_TEMPLATE_FACTORY (src_templ, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -218,14 +218,14 @@ gst_videoscale_init (GstVideoscale *videoscale) { GST_DEBUG(0,"gst_videoscale_init"); videoscale->sinkpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (sink_templ), "sink"); + GST_PAD_TEMPLATE_GET (sink_templ), "sink"); /*gst_pad_set_negotiate_function(videoscale->sinkpad,videoscale_negotiate_sink); */ gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->sinkpad); gst_pad_set_chain_function(videoscale->sinkpad,gst_videoscale_chain); gst_pad_set_connect_function(videoscale->sinkpad,gst_videoscale_sinkconnect); videoscale->srcpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (src_templ), "src"); + GST_PAD_TEMPLATE_GET (src_templ), "src"); /*gst_pad_set_negotiate_function(videoscale->srcpad,videoscale_negotiate_src); */ gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->srcpad); @@ -343,12 +343,12 @@ plugin_init (GModule *module, GstPlugin *plugin) GstElementFactory *factory; /* create an elementfactory for the videoscale element */ - factory = gst_elementfactory_new("videoscale",GST_TYPE_VIDEOSCALE, + factory = gst_element_factory_new("videoscale",GST_TYPE_VIDEOSCALE, &videoscale_details); g_return_val_if_fail(factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_templ)); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_templ)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_templ)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_templ)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index 02f8561..cc59c62 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -54,7 +54,7 @@ volume_sink_factory (void) static GstPadTemplate *template = NULL; if (!template) { - template = gst_padtemplate_new + template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_append(gst_caps_new ("sink_int", "audio/raw", GST_AUDIO_INT_PAD_TEMPLATE_PROPS), @@ -71,7 +71,7 @@ volume_src_factory (void) static GstPadTemplate *template = NULL; if (!template) - template = gst_padtemplate_new + template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gst_caps_append (gst_caps_new ("src_float", "audio/raw", GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS), @@ -352,12 +352,12 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new("volume",GST_TYPE_VOLUME, + factory = gst_element_factory_new("volume",GST_TYPE_VOLUME, &volume_details); g_return_val_if_fail(factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, volume_src_factory ()); - gst_elementfactory_add_padtemplate (factory, volume_sink_factory ()); + gst_element_factory_add_pad_template (factory, volume_src_factory ()); + gst_element_factory_add_pad_template (factory, volume_sink_factory ()); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/sys/v4l/gstv4lelement.c b/sys/v4l/gstv4lelement.c index 96c1486..7f71e0e 100644 --- a/sys/v4l/gstv4lelement.c +++ b/sys/v4l/gstv4lelement.c @@ -616,7 +616,7 @@ plugin_init (GModule *module, GstElementFactory *factory; /* create an elementfactory for the v4lelement */ - factory = gst_elementfactory_new("v4lelement", GST_TYPE_V4LELEMENT, + factory = gst_element_factory_new("v4lelement", GST_TYPE_V4LELEMENT, &gst_v4lelement_details); g_return_val_if_fail(factory != NULL, FALSE); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/sys/v4l/gstv4lmjpegsink.c b/sys/v4l/gstv4lmjpegsink.c index 355d898..6813b57 100644 --- a/sys/v4l/gstv4lmjpegsink.c +++ b/sys/v4l/gstv4lmjpegsink.c @@ -397,7 +397,7 @@ plugin_init (GModule *module, GstCaps *caps; /* create an elementfactory for the v4lmjpegsink element */ - factory = gst_elementfactory_new("v4lmjpegsink",GST_TYPE_V4LMJPEGSINK, + factory = gst_element_factory_new("v4lmjpegsink",GST_TYPE_V4LMJPEGSINK, &gst_v4lmjpegsink_details); g_return_val_if_fail(factory != NULL, FALSE); @@ -410,13 +410,13 @@ plugin_init (GModule *module, ); 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/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c index 05ad433..f6fa4c5 100644 --- a/sys/v4l/gstv4lmjpegsrc.c +++ b/sys/v4l/gstv4lmjpegsrc.c @@ -512,7 +512,7 @@ plugin_init (GModule *module, GstPlugin *plugin) GstCaps *caps; /* create an elementfactory for the v4lmjpegsrcparse element */ - factory = gst_elementfactory_new("v4lmjpegsrc",GST_TYPE_V4LMJPEGSRC, + factory = gst_element_factory_new("v4lmjpegsrc",GST_TYPE_V4LMJPEGSRC, &gst_v4lmjpegsrc_details); g_return_val_if_fail(factory != NULL, FALSE); @@ -525,13 +525,13 @@ plugin_init (GModule *module, GstPlugin *plugin) ); capslist = gst_caps_append(capslist, caps); - src_template = gst_padtemplate_new ( + src_template = gst_pad_template_new ( "src", GST_PAD_SRC, GST_PAD_ALWAYS, capslist, NULL); - gst_elementfactory_add_padtemplate (factory, src_template); + gst_element_factory_add_pad_template (factory, src_template); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c index ebe0b3b..8c7589d 100644 --- a/sys/v4l/gstv4lsrc.c +++ b/sys/v4l/gstv4lsrc.c @@ -645,7 +645,7 @@ plugin_init (GModule *module, gint rgb_depth[4] = { 15, 16, 24, 32 }; /* create an elementfactory for the v4lsrc */ - factory = gst_elementfactory_new("v4lsrc",GST_TYPE_V4LSRC, + factory = gst_element_factory_new("v4lsrc",GST_TYPE_V4LSRC, &gst_v4lsrc_details); g_return_val_if_fail(factory != NULL, FALSE); @@ -679,13 +679,13 @@ plugin_init (GModule *module, capslist = gst_caps_append(capslist, caps); } - src_template = gst_padtemplate_new ( + src_template = gst_pad_template_new ( "src", GST_PAD_SRC, GST_PAD_ALWAYS, capslist, NULL); - gst_elementfactory_add_padtemplate (factory, src_template); + gst_element_factory_add_pad_template (factory, src_template); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/tests/old/examples/capsfilter/capsfilter1.c b/tests/old/examples/capsfilter/capsfilter1.c index ab6f4a0..35e2046 100644 --- a/tests/old/examples/capsfilter/capsfilter1.c +++ b/tests/old/examples/capsfilter/capsfilter1.c @@ -39,20 +39,20 @@ main (gint argc, gchar *argv[]) } pipeline = gst_pipeline_new ("main_pipeline"); - filesrc = gst_elementfactory_make ("filesrc", "filesrc"); + filesrc = gst_element_factory_make ("filesrc", "filesrc"); g_return_val_if_fail (filesrc, -1); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); - demux = gst_elementfactory_make ("mpegdemux", "demux"); + demux = gst_element_factory_make ("mpegdemux", "demux"); g_return_val_if_fail (demux, -1); g_signal_connect (G_OBJECT (demux), "new_pad", G_CALLBACK (new_pad_func), pipeline); thread = gst_thread_new ("thread"); - queue = gst_elementfactory_make ("queue", "queue"); - mpeg2dec = gst_elementfactory_make ("mpeg2dec", "mpeg2dec"); + queue = gst_element_factory_make ("queue", "queue"); + mpeg2dec = gst_element_factory_make ("mpeg2dec", "mpeg2dec"); g_return_val_if_fail (mpeg2dec, -1); - colorspace = gst_elementfactory_make ("colorspace", "colorspace"); + colorspace = gst_element_factory_make ("colorspace", "colorspace"); g_return_val_if_fail (colorspace, -1); - xvideosink = gst_elementfactory_make ("xvideosink", "xvideosink"); + xvideosink = gst_element_factory_make ("xvideosink", "xvideosink"); g_return_val_if_fail (xvideosink, -1); g_object_set (G_OBJECT (xvideosink), "toplevel", TRUE, NULL); diff --git a/testsuite/autoplug/autoplug.c b/testsuite/autoplug/autoplug.c index 2129225..bba607a 100644 --- a/testsuite/autoplug/autoplug.c +++ b/testsuite/autoplug/autoplug.c @@ -16,9 +16,9 @@ main (int argc, char *argv[]) gst_init(&argc,&argv); - osssink = gst_elementfactory_make ("osssink", "osssink"); + osssink = gst_element_factory_make ("osssink", "osssink"); g_assert (osssink != NULL); - videosink = gst_elementfactory_make ("xvideosink", "videosink"); + videosink = gst_element_factory_make ("xvideosink", "videosink"); g_assert (videosink != NULL); testcaps = gst_caps_new ("test_caps", @@ -28,7 +28,7 @@ main (int argc, char *argv[]) "systemstream", GST_PROPS_BOOLEAN (TRUE), NULL)); - autoplugger = gst_autoplugfactory_make ("static"); + autoplugger = gst_autoplug_factory_make ("static"); g_signal_connect (G_OBJECT (autoplugger), "new_object", G_CALLBACK (new_object_added), NULL); diff --git a/testsuite/autoplug/autoplug2.c b/testsuite/autoplug/autoplug2.c index c2fd4b9..163d4f9 100644 --- a/testsuite/autoplug/autoplug2.c +++ b/testsuite/autoplug/autoplug2.c @@ -19,7 +19,7 @@ main (int argc, char *argv[]) gst_init(&argc,&argv); - autoplug = gst_autoplugfactory_make ("static"); + autoplug = gst_autoplug_factory_make ("static"); g_print ("Autoplugging between audio/mp3 and audio/raw ...\n"); if ((element = autoplug_caps (autoplug, "audio/mp3", "audio/raw")) == NULL) diff --git a/testsuite/autoplug/autoplug3.c b/testsuite/autoplug/autoplug3.c index 5c187f3..b0af9aa 100644 --- a/testsuite/autoplug/autoplug3.c +++ b/testsuite/autoplug/autoplug3.c @@ -11,10 +11,10 @@ main (int argc, char *argv[]) gst_init(&argc,&argv); - sink = gst_elementfactory_make ("osssink", "osssink"); + sink = gst_element_factory_make ("osssink", "osssink"); g_assert (sink != NULL); - autoplug = gst_autoplugfactory_make ("staticrender"); + autoplug = gst_autoplug_factory_make ("staticrender"); g_assert (autoplug != NULL); element = gst_autoplug_to_renderers (autoplug, @@ -30,7 +30,7 @@ main (int argc, char *argv[]) pipeline = gst_pipeline_new ("main_pipeline"); g_assert (pipeline != NULL); - filesrc = gst_elementfactory_make ("filesrc", "disk_reader"); + filesrc = gst_element_factory_make ("filesrc", "disk_reader"); g_assert (filesrc != NULL); gst_bin_add (GST_BIN (pipeline), filesrc); diff --git a/testsuite/autoplug/autoplug4.c b/testsuite/autoplug/autoplug4.c index 34927ed..9195c7b 100644 --- a/testsuite/autoplug/autoplug4.c +++ b/testsuite/autoplug/autoplug4.c @@ -10,11 +10,11 @@ main (int argc, char *argv[]) gst_init(&argc,&argv); - sink1 = gst_elementfactory_make ("videosink", "videosink"); - sink2 = gst_elementfactory_make ("osssink", "osssink"); + sink1 = gst_element_factory_make ("videosink", "videosink"); + sink2 = gst_element_factory_make ("osssink", "osssink"); - autoplug = gst_autoplugfactory_make ("staticrender"); - autoplug2 = gst_autoplugfactory_make ("static"); + autoplug = gst_autoplug_factory_make ("staticrender"); + autoplug2 = gst_autoplug_factory_make ("static"); element = gst_autoplug_to_renderers (autoplug, gst_caps_new ("mp3caps", "audio/mp3", NULL), sink2, NULL); @@ -80,8 +80,8 @@ main (int argc, char *argv[]) xmlSaveFile ("autoplug3_6.gst", gst_xml_write (element)); } - sink1 = gst_elementfactory_make ("videosink", "videosink"); - sink2 = gst_elementfactory_make ("osssink", "osssink"); + sink1 = gst_element_factory_make ("videosink", "videosink"); + sink2 = gst_element_factory_make ("osssink", "osssink"); element = gst_autoplug_to_renderers (autoplug, gst_caps_new( -- 2.7.4