Commit f7ebc8f9 authored by Andy Wingo's avatar Andy Wingo

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.
parent 1ec87171
common @ 52a8d4bd
Subproject commit d8fa5431e3f6f1b9c8be36bad079719a6c4b529a Subproject commit 52a8d4bd490c495f1e71725644535dbf2cf209c7
...@@ -39,20 +39,20 @@ main (gint argc, gchar *argv[]) ...@@ -39,20 +39,20 @@ main (gint argc, gchar *argv[])
} }
pipeline = gst_pipeline_new ("main_pipeline"); 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_return_val_if_fail (filesrc, -1);
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); 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_return_val_if_fail (demux, -1);
g_signal_connect (G_OBJECT (demux), "new_pad", G_CALLBACK (new_pad_func), pipeline); g_signal_connect (G_OBJECT (demux), "new_pad", G_CALLBACK (new_pad_func), pipeline);
thread = gst_thread_new ("thread"); thread = gst_thread_new ("thread");
queue = gst_elementfactory_make ("queue", "queue"); queue = gst_element_factory_make ("queue", "queue");
mpeg2dec = gst_elementfactory_make ("mpeg2dec", "mpeg2dec"); mpeg2dec = gst_element_factory_make ("mpeg2dec", "mpeg2dec");
g_return_val_if_fail (mpeg2dec, -1); 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); 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_return_val_if_fail (xvideosink, -1);
g_object_set (G_OBJECT (xvideosink), "toplevel", TRUE, NULL); g_object_set (G_OBJECT (xvideosink), "toplevel", TRUE, NULL);
......
...@@ -162,7 +162,7 @@ gst_alsa_src_pad_factory(void) ...@@ -162,7 +162,7 @@ gst_alsa_src_pad_factory(void)
static GstPadTemplate *template = NULL; static GstPadTemplate *template = NULL;
if (!template) 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), gst_caps_new("src", "audio/raw", NULL),
NULL); NULL);
...@@ -175,7 +175,7 @@ gst_alsa_src_request_pad_factory(void) ...@@ -175,7 +175,7 @@ gst_alsa_src_request_pad_factory(void)
static GstPadTemplate *template = NULL; static GstPadTemplate *template = NULL;
if (!template) 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_caps_new("src", "audio/raw",
gst_props_new("channels", GST_PROPS_INT(1), NULL)), gst_props_new("channels", GST_PROPS_INT(1), NULL)),
NULL); NULL);
...@@ -189,7 +189,7 @@ gst_alsa_sink_pad_factory(void) ...@@ -189,7 +189,7 @@ gst_alsa_sink_pad_factory(void)
static GstPadTemplate *template = NULL; static GstPadTemplate *template = NULL;
if (!template) 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), gst_caps_new("sink", "audio/raw", NULL),
NULL); NULL);
...@@ -202,7 +202,7 @@ gst_alsa_sink_request_pad_factory(void) ...@@ -202,7 +202,7 @@ gst_alsa_sink_request_pad_factory(void)
static GstPadTemplate *template = NULL; static GstPadTemplate *template = NULL;
if (!template) 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_caps_new("sink-request", "audio/raw",
gst_props_new("channels", GST_PROPS_INT(1), NULL)), gst_props_new("channels", GST_PROPS_INT(1), NULL)),
NULL); NULL);
...@@ -1415,16 +1415,16 @@ plugin_init (GModule *module, GstPlugin *plugin) ...@@ -1415,16 +1415,16 @@ plugin_init (GModule *module, GstPlugin *plugin)
return FALSE; 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); g_return_val_if_fail (factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, gst_alsa_src_pad_factory()); gst_element_factory_add_pad_template (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_request_pad_factory());
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (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); g_return_val_if_fail (factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, gst_alsa_sink_pad_factory()); gst_element_factory_add_pad_template (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_request_pad_factory());
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
gst_plugin_set_longname(plugin, "ALSA plugin library"); gst_plugin_set_longname(plugin, "ALSA plugin library");
......
...@@ -44,7 +44,7 @@ static GstElementDetails cdparanoia_details = { ...@@ -44,7 +44,7 @@ static GstElementDetails cdparanoia_details = {
"(C) 2000", "(C) 2000",
}; };
GST_PADTEMPLATE_FACTORY (cdparanoia_src_factory, GST_PAD_TEMPLATE_FACTORY (cdparanoia_src_factory,
"src", "src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
...@@ -240,7 +240,7 @@ static void ...@@ -240,7 +240,7 @@ static void
cdparanoia_init (CDParanoia *cdparanoia) cdparanoia_init (CDParanoia *cdparanoia)
{ {
cdparanoia->srcpad = gst_pad_new_from_template ( 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_pad_set_get_function (cdparanoia->srcpad, cdparanoia_get);
gst_element_add_pad (GST_ELEMENT (cdparanoia), cdparanoia->srcpad); gst_element_add_pad (GST_ELEMENT (cdparanoia), cdparanoia->srcpad);
...@@ -635,12 +635,12 @@ plugin_init (GModule *module, GstPlugin *plugin) ...@@ -635,12 +635,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory; GstElementFactory *factory;
/* create an elementfactory for the cdparanoia element */ /* 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); &cdparanoia_details);
g_return_val_if_fail (factory != NULL, FALSE); g_return_val_if_fail (factory != NULL, FALSE);
/* register the source's caps */ /* 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 */ /* and add the cdparanoia element factory to the plugin */
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
...@@ -356,7 +356,7 @@ plugin_init (GModule *module, GstPlugin *plugin) ...@@ -356,7 +356,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory; GstElementFactory *factory;
/* create an elementfactory for the aasink element */ /* 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); &gst_gnomevfssink_details);
g_return_val_if_fail(factory != NULL, FALSE); g_return_val_if_fail(factory != NULL, FALSE);
......
...@@ -540,7 +540,7 @@ static gboolean plugin_init(GModule *module, GstPlugin *plugin) ...@@ -540,7 +540,7 @@ static gboolean plugin_init(GModule *module, GstPlugin *plugin)
/* create an elementfactory for the aasink element */ /* create an elementfactory for the aasink element */
factory = factory =
gst_elementfactory_new("gnomevfssrc", GST_TYPE_GNOMEVFSSRC, gst_element_factory_new("gnomevfssrc", GST_TYPE_GNOMEVFSSRC,
&gst_gnomevfssrc_details); &gst_gnomevfssrc_details);
g_return_val_if_fail(factory != NULL, FALSE); g_return_val_if_fail(factory != NULL, FALSE);
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
extern GstElementDetails vorbisenc_details; extern GstElementDetails vorbisenc_details;
extern GstElementDetails vorbisdec_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 *dec_src_template, *dec_sink_template;
GstPadTemplate *enc_src_template, *enc_sink_template; GstPadTemplate *enc_src_template, *enc_sink_template;
...@@ -77,18 +77,18 @@ static GstTypeDefinition vorbisdefinition = { ...@@ -77,18 +77,18 @@ static GstTypeDefinition vorbisdefinition = {
"vorbis_audio/x-ogg", "vorbis_audio/x-ogg",
"audio/x-ogg", "audio/x-ogg",
".ogg", ".ogg",
vorbis_typefind, vorbis_type_find,
}; };
static GstCaps* 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))); gulong head = GULONG_FROM_BE (*((gulong *)GST_BUFFER_DATA (buf)));
if (head != 0x4F676753) if (head != 0x4F676753)
return NULL; 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) ...@@ -102,7 +102,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
gst_plugin_set_longname (plugin, "The OGG Vorbis Codec"); gst_plugin_set_longname (plugin, "The OGG Vorbis Codec");
/* create an elementfactory for the vorbisenc element */ /* 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); &vorbisenc_details);
g_return_val_if_fail (enc != NULL, FALSE); g_return_val_if_fail (enc != NULL, FALSE);
...@@ -111,40 +111,40 @@ plugin_init (GModule *module, GstPlugin *plugin) ...@@ -111,40 +111,40 @@ plugin_init (GModule *module, GstPlugin *plugin)
vorbis_caps = vorbis_caps_factory (); vorbis_caps = vorbis_caps_factory ();
/* register sink pads */ /* 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, GST_PAD_ALWAYS,
raw_caps, NULL); raw_caps, NULL);
gst_elementfactory_add_padtemplate (enc, enc_sink_template); gst_element_factory_add_pad_template (enc, enc_sink_template);
/* register src pads */ /* 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, GST_PAD_ALWAYS,
vorbis_caps, NULL); 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)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (enc));
/* create an elementfactory for the vorbisdec element */ /* 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); &vorbisdec_details);
g_return_val_if_fail(dec != NULL, FALSE); g_return_val_if_fail(dec != NULL, FALSE);
/* register sink pads */ /* 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, GST_PAD_ALWAYS,
vorbis_caps, NULL); 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); raw_caps = gst_caps_prepend (raw_caps, raw_caps2);
/* register src pads */ /* 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, GST_PAD_ALWAYS,
raw_caps, NULL); 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)); 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)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
return TRUE; return TRUE;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* for example, to make a source pad that can output mono streams of either * for example, to make a source pad that can output mono streams of either
* float or int: * float or int:
template = gst_padtemplate_new template = gst_pad_template_new
("sink", GST_PAD_SINK, GST_PAD_ALWAYS, ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
gst_caps_append(gst_caps_new ("sink_int", "audio/raw", gst_caps_append(gst_caps_new ("sink_int", "audio/raw",
GST_AUDIO_INT_PAD_TEMPLATE_PROPS), GST_AUDIO_INT_PAD_TEMPLATE_PROPS),
......
...@@ -48,7 +48,7 @@ enum { ...@@ -48,7 +48,7 @@ enum {
/* FILL ME */ /* FILL ME */
}; };
GST_PADTEMPLATE_FACTORY (gst_adder_src_template_factory, GST_PAD_TEMPLATE_FACTORY (gst_adder_src_template_factory,
"src", "src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
...@@ -76,7 +76,7 @@ GST_PADTEMPLATE_FACTORY (gst_adder_src_template_factory, ...@@ -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", "sink%d",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_REQUEST, GST_PAD_REQUEST,
...@@ -346,6 +346,7 @@ gst_adder_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe ...@@ -346,6 +346,7 @@ gst_adder_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe
g_value_set_int (value, adder->numsinkpads); g_value_set_int (value, adder->numsinkpads);
break; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break; break;
} }
} }
...@@ -483,7 +484,7 @@ plugin_init (GModule *module, GstPlugin *plugin) ...@@ -483,7 +484,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
{ {
GstElementFactory *factory; GstElementFactory *factory;
factory = gst_elementfactory_new("adder",GST_TYPE_ADDER, factory = gst_element_factory_new("adder",GST_TYPE_ADDER,
&adder_details); &adder_details);
g_return_val_if_fail(factory != NULL, FALSE); g_return_val_if_fail(factory != NULL, FALSE);
...@@ -492,8 +493,8 @@ plugin_init (GModule *module, GstPlugin *plugin) ...@@ -492,8 +493,8 @@ plugin_init (GModule *module, GstPlugin *plugin)
return FALSE; return FALSE;
} }
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (gst_adder_src_template_factory)); gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_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_sink_template_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
...@@ -56,7 +56,7 @@ sink_template (void) ...@@ -56,7 +56,7 @@ sink_template (void)
static GstPadTemplate *template = NULL; static GstPadTemplate *template = NULL;
if (!template) { if (!template) {
template = gst_padtemplate_new ("sink", template = gst_pad_template_new ("sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
gst_caps_new gst_caps_new
...@@ -72,7 +72,7 @@ src_template (void) ...@@ -72,7 +72,7 @@ src_template (void)
static GstPadTemplate *template = NULL; static GstPadTemplate *template = NULL;
if (!template) { if (!template) {
template = gst_padtemplate_new ("src", template = gst_pad_template_new ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
gst_caps_new gst_caps_new
...@@ -199,12 +199,12 @@ gst_audioscale_init (Audioscale *audioscale) ...@@ -199,12 +199,12 @@ gst_audioscale_init (Audioscale *audioscale)
{ {
resample_t *r; 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_element_add_pad(GST_ELEMENT(audioscale),audioscale->sinkpad);
gst_pad_set_chain_function(audioscale->sinkpad,gst_audioscale_chain); gst_pad_set_chain_function(audioscale->sinkpad,gst_audioscale_chain);
gst_pad_set_connect_function (audioscale->sinkpad, gst_audioscale_sinkconnect); 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); gst_element_add_pad(GST_ELEMENT(audioscale),audioscale->srcpad);
...@@ -314,7 +314,7 @@ plugin_init (GModule *module, GstPlugin *plugin) ...@@ -314,7 +314,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory; GstElementFactory *factory;
/* create an elementfactory for the audioscale element */ /* 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); g_return_val_if_fail(factory != NULL, FALSE);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
...@@ -63,8 +63,8 @@ int main(int argc,char *argv[]) { ...@@ -63,8 +63,8 @@ int main(int argc,char *argv[]) {
g_print("creating elements\n"); g_print("creating elements\n");
thread = gst_thread_new("live-example"); thread = gst_thread_new("live-example");
sinesrc = gst_elementfactory_make("sinesrc","sine-source"); sinesrc = gst_element_factory_make("sinesrc","sine-source");
osssink = gst_elementfactory_make("osssink","sound-sink"); osssink = gst_element_factory_make("osssink","sound-sink");
gst_bin_add(GST_BIN(thread),sinesrc); gst_bin_add(GST_BIN(thread),sinesrc);
gst_bin_add(GST_BIN(thread),osssink); gst_bin_add(GST_BIN(thread),osssink);
gst_element_connect(sinesrc,osssink); gst_element_connect(sinesrc,osssink);
......
...@@ -56,7 +56,7 @@ enum { ...@@ -56,7 +56,7 @@ enum {
}; };
/* FIXME: this is not core business... */ /* FIXME: this is not core business... */
GST_PADTEMPLATE_FACTORY (sinesrc_src_factory, GST_PAD_TEMPLATE_FACTORY (sinesrc_src_factory,
"src", "src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
...@@ -158,7 +158,7 @@ gst_sinesrc_init (GstSineSrc *src) ...@@ -158,7 +158,7 @@ gst_sinesrc_init (GstSineSrc *src)
{ {
src->srcpad = gst_pad_new_from_template ( 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_element_add_pad(GST_ELEMENT(src), src->srcpad);
gst_pad_set_get_function(src->srcpad, gst_sinesrc_get); gst_pad_set_get_function(src->srcpad, gst_sinesrc_get);
...@@ -421,11 +421,11 @@ plugin_init (GModule *module, GstPlugin *plugin) ...@@ -421,11 +421,11 @@ plugin_init (GModule *module, GstPlugin *plugin)
{ {
GstElementFactory *factory; GstElementFactory *factory;
factory = gst_elementfactory_new("sinesrc",GST_TYPE_SINESRC, factory = gst_element_factory_new("sinesrc",GST_TYPE_SINESRC,
&gst_sinesrc_details); &gst_sinesrc_details);
g_return_val_if_fail(factory != NULL, FALSE); 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)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
...@@ -47,7 +47,7 @@ enum { ...@@ -47,7 +47,7 @@ enum {
/* FILL ME */ /* FILL ME */
}; };
GST_PADTEMPLATE_FACTORY (sink_templ, GST_PAD_TEMPLATE_FACTORY (sink_templ,
"sink", "sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
...@@ -58,7 +58,7 @@ GST_PADTEMPLATE_FACTORY (sink_templ, ...@@ -58,7 +58,7 @@ GST_PADTEMPLATE_FACTORY (sink_templ,
) )
) )
GST_PADTEMPLATE_FACTORY (src_templ, GST_PAD_TEMPLATE_FACTORY (src_templ,
"src", "src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
...@@ -218,14 +218,14 @@ gst_videoscale_init (GstVideoscale *videoscale) ...@@ -218,14 +218,14 @@ gst_videoscale_init (GstVideoscale *videoscale)
{ {
GST_DEBUG(0,"gst_videoscale_init"); GST_DEBUG(0,"gst_videoscale_init");
videoscale->sinkpad = gst_pad_new_from_template ( 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_pad_set_negotiate_function(videoscale->sinkpad,videoscale_negotiate_sink); */
gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->sinkpad); gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->sinkpad);
gst_pad_set_chain_function(videoscale->sinkpad,gst_videoscale_chain); gst_pad_set_chain_function(videoscale->sinkpad,gst_videoscale_chain);
gst_pad_set_connect_function(videoscale->sinkpad,gst_videoscale_sinkconnect); gst_pad_set_connect_function(videoscale->sinkpad,gst_videoscale_sinkconnect);
videoscale->srcpad = gst_pad_new_from_template ( 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_pad_set_negotiate_function(videoscale->srcpad,videoscale_negotiate_src); */
gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->srcpad); gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->srcpad);
...@@ -343,12 +343,12 @@ plugin_init (GModule *module, GstPlugin *plugin) ...@@ -343,12 +343,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory; GstElementFactory *factory;
/* create an elementfactory for the videoscale element */ /* 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); &videoscale_details);
g_return_val_if_fail(factory != NULL, FALSE); g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_templ)); gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_templ));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_templ)); gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_templ));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
...@@ -54,7 +54,7 @@ volume_sink_factory (void) ...@@ -54,7 +54,7 @@ volume_sink_factory (void)
static GstPadTemplate *template = NULL; static GstPadTemplate *template = NULL;
if (!template) { if (!template) {
template = gst_padtemplate_new template = gst_pad_template_new
("sink", GST_PAD_SINK, GST_PAD_ALWAYS, ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
gst_caps_append(gst_caps_new ("sink_int", "audio/raw", gst_caps_append(gst_caps_new ("sink_int", "audio/raw",
GST_AUDIO_INT_PAD_TEMPLATE_PROPS), GST_AUDIO_INT_PAD_TEMPLATE_PROPS),
...@@ -71,7 +71,7 @@ volume_src_factory (void) ...@@ -71,7 +71,7 @@ volume_src_factory (void)
static GstPadTemplate *template = NULL; static GstPadTemplate *template = NULL;
if (!template)