Commit 3a9c675a 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 18c6c04f
common @ 52a8d4bd
Subproject commit 6148068f2318e85d8e66df485342b630d8fb49ac
Subproject commit 52a8d4bd490c495f1e71725644535dbf2cf209c7
......@@ -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);
......
......@@ -56,7 +56,7 @@ enum {
ARG_FRAME_TIME,
};
GST_PADTEMPLATE_FACTORY (sink_template,
GST_PAD_TEMPLATE_FACTORY (sink_template,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
......@@ -267,7 +267,7 @@ static void
gst_aasink_init (GstAASink *aasink)
{
aasink->sinkpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (sink_template), "sink");
GST_PAD_TEMPLATE_GET (sink_template), "sink");
gst_element_add_pad (GST_ELEMENT (aasink), aasink->sinkpad);
gst_pad_set_chain_function (aasink->sinkpad, gst_aasink_chain);
gst_pad_set_connect_function (aasink->sinkpad, gst_aasink_sinkconnect);
......@@ -532,12 +532,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory;
/* create an elementfactory for the aasink element */
factory = gst_elementfactory_new("aasink",GST_TYPE_AASINK,
factory = gst_element_factory_new("aasink",GST_TYPE_AASINK,
&gst_aasink_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory,
GST_PADTEMPLATE_GET (sink_template));
gst_element_factory_add_pad_template (factory,
GST_PAD_TEMPLATE_GET (sink_template));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
......@@ -33,16 +33,16 @@ main (int argc,char *argv[])
bin = gst_pipeline_new("pipeline");
if (argc == 1) {
src = gst_elementfactory_make ("dv1394src", "src");
src = gst_element_factory_make ("dv1394src", "src");
} else {
src = gst_elementfactory_make ("filesrc", "src");
src = gst_element_factory_make ("filesrc", "src");
gtk_object_set(GTK_OBJECT(src),"location",argv[1],"bytesperread",480,NULL);
}
dvdec = gst_elementfactory_make ("dvdec", "decoder");
dvdec = gst_element_factory_make ("dvdec", "decoder");
if (!dvdec) fprintf(stderr,"no dvdec\n"),exit(1);
/* cspace = gst_elementfactory_make ("colorspace", "cspace"); */
deint = gst_elementfactory_make ("deinterlace", "deinterlace");
videosink = gst_elementfactory_make ("xvideosink", "videosink");
/* cspace = gst_element_factory_make ("colorspace", "cspace"); */
deint = gst_element_factory_make ("deinterlace", "deinterlace");
videosink = gst_element_factory_make ("xvideosink", "videosink");
if (!videosink) fprintf(stderr,"no dvdec\n"),exit(1);
gtk_object_set(GTK_OBJECT(videosink),"width",720,"height",576,NULL);
......
......@@ -65,7 +65,7 @@ enum {
* can have. They can be quite complex, but for this dvdec plugin
* they are rather simple.
*/
GST_PADTEMPLATE_FACTORY (sink_temp,
GST_PAD_TEMPLATE_FACTORY (sink_temp,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
......@@ -77,7 +77,7 @@ GST_PADTEMPLATE_FACTORY (sink_temp,
)
GST_PADTEMPLATE_FACTORY (video_src_temp,
GST_PAD_TEMPLATE_FACTORY (video_src_temp,
"video",
GST_PAD_SRC,
GST_PAD_ALWAYS,
......@@ -102,7 +102,7 @@ GST_PADTEMPLATE_FACTORY (video_src_temp,
)
)
GST_PADTEMPLATE_FACTORY ( audio_src_temp,
GST_PAD_TEMPLATE_FACTORY ( audio_src_temp,
"audio",
GST_PAD_SRC,
GST_PAD_ALWAYS,
......@@ -208,13 +208,13 @@ gst_dvdec_class_init (GstDVDecClass *klass)
static void
gst_dvdec_init(GstDVDec *dvdec)
{
dvdec->sinkpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (sink_temp), "sink");
dvdec->sinkpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (sink_temp), "sink");
gst_element_add_pad (GST_ELEMENT (dvdec), dvdec->sinkpad);
dvdec->videosrcpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (video_src_temp), "video");
dvdec->videosrcpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (video_src_temp), "video");
gst_element_add_pad (GST_ELEMENT (dvdec), dvdec->videosrcpad);
dvdec->audiosrcpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET(audio_src_temp), "audio");
dvdec->audiosrcpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET(audio_src_temp), "audio");
gst_element_add_pad(GST_ELEMENT(dvdec),dvdec->audiosrcpad);
gst_element_set_loop_function (GST_ELEMENT (dvdec), gst_dvdec_loop);
......@@ -463,7 +463,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
* This consists of the name of the element, the GType identifier,
* and a pointer to the details structure at the top of the file.
*/
factory = gst_elementfactory_new("dvdec", GST_TYPE_DVDEC, &dvdec_details);
factory = gst_element_factory_new("dvdec", GST_TYPE_DVDEC, &dvdec_details);
g_return_val_if_fail(factory != NULL, FALSE);
/* The pad templates can be easily generated from the factories above,
......@@ -471,9 +471,9 @@ plugin_init (GModule *module, GstPlugin *plugin)
* Note that the generated padtemplates are stored in static global
* variables, for the gst_dvdec_init function to use later on.
*/
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET(sink_temp));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET(video_src_temp));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET(audio_src_temp));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET(sink_temp));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET(video_src_temp));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET(audio_src_temp));
/* The very last thing is to register the elementfactory with the plugin. */
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
......@@ -93,7 +93,7 @@ enum {
ARG_HOST,
};
GST_PADTEMPLATE_FACTORY (src_factory,
GST_PAD_TEMPLATE_FACTORY (src_factory,
"src", /* the name of the pads */
GST_PAD_SRC, /* type of the pad */
GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */
......@@ -237,7 +237,7 @@ static void
gst_esdmon_init(GstEsdmon *esdmon)
{
esdmon->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_factory), "src");
GST_PAD_TEMPLATE_GET (src_factory), "src");
gst_pad_set_get_function(esdmon->srcpad, gst_esdmon_get);
gst_element_add_pad(GST_ELEMENT(esdmon), esdmon->srcpad);
......@@ -409,11 +409,11 @@ plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
factory = gst_elementfactory_new("esdmon", GST_TYPE_ESDMON,
factory = gst_element_factory_new("esdmon", GST_TYPE_ESDMON,
&esdmon_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate(factory, GST_PADTEMPLATE_GET (src_factory));
gst_element_factory_add_pad_template(factory, GST_PAD_TEMPLATE_GET (src_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
......@@ -48,7 +48,7 @@ enum {
ARG_HOST,
};
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 */
......@@ -189,7 +189,7 @@ static void
gst_esdsink_init(GstEsdsink *esdsink)
{
esdsink->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(esdsink), esdsink->sinkpad);
gst_pad_set_chain_function(esdsink->sinkpad, GST_DEBUG_FUNCPTR(gst_esdsink_chain));
gst_pad_set_connect_function(esdsink->sinkpad, gst_esdsink_sinkconnect);
......@@ -331,11 +331,11 @@ plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
factory = gst_elementfactory_new("esdsink", GST_TYPE_ESDSINK,
factory = gst_element_factory_new("esdsink", GST_TYPE_ESDSINK,
&esdsink_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));
......
......@@ -24,7 +24,7 @@
extern GstElementDetails flacenc_details;
extern GstElementDetails flacdec_details;
static GstCaps* flac_typefind (GstBuffer *buf, gpointer private);
static GstCaps* flac_type_find (GstBuffer *buf, gpointer private);
GstPadTemplate *dec_src_template, *dec_sink_template;
GstPadTemplate *enc_src_template, *enc_sink_template;
......@@ -62,18 +62,18 @@ static GstTypeDefinition flacdefinition = {
"flac_audio/x-flac",
"audio/x-flac",
".flac",
flac_typefind,
flac_type_find,
};
static GstCaps*
flac_typefind (GstBuffer *buf, gpointer private)
flac_type_find (GstBuffer *buf, gpointer private)
{
gulong head = GULONG_FROM_BE (*((gulong *)GST_BUFFER_DATA (buf)));
if (head != 0x664C6143)
return NULL;
return gst_caps_new ("flac_typefind", "audio/x-flac", NULL);
return gst_caps_new ("flac_type_find", "audio/x-flac", NULL);
}
......@@ -87,7 +87,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
gst_plugin_set_longname (plugin, "The FLAC Lossless compressor Codec");
/* create an elementfactory for the flacenc element */
enc = gst_elementfactory_new ("flacenc", GST_TYPE_FLACENC,
enc = gst_element_factory_new ("flacenc", GST_TYPE_FLACENC,
&flacenc_details);
g_return_val_if_fail (enc != NULL, FALSE);
......@@ -95,39 +95,39 @@ plugin_init (GModule *module, GstPlugin *plugin)
flac_caps = flac_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,
flac_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 flacdec element */
dec = gst_elementfactory_new("flacdec",GST_TYPE_FLACDEC,
dec = gst_element_factory_new("flacdec",GST_TYPE_FLACDEC,
&flacdec_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,
flac_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", 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 (&flacdefinition);
type = gst_type_factory_new (&flacdefinition);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
return TRUE;
......
......@@ -61,7 +61,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstCaps *raw_caps, *jpeg_caps;
/* create an elementfactory for the jpegdec element */
enc = gst_elementfactory_new("jpegenc",GST_TYPE_JPEGENC,
enc = gst_element_factory_new("jpegenc",GST_TYPE_JPEGENC,
&gst_jpegenc_details);
g_return_val_if_fail(enc != NULL, FALSE);
......@@ -69,35 +69,35 @@ plugin_init (GModule *module, GstPlugin *plugin)
jpeg_caps = jpeg_caps_factory ();
/* register sink pads */
jpegenc_sink_template = gst_padtemplate_new ("sink", GST_PAD_SINK,
jpegenc_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK,
GST_PAD_ALWAYS,
raw_caps, NULL);
gst_elementfactory_add_padtemplate (enc, jpegenc_sink_template);
gst_element_factory_add_pad_template (enc, jpegenc_sink_template);
/* register src pads */
jpegenc_src_template = gst_padtemplate_new ("src", GST_PAD_SRC,
jpegenc_src_template = gst_pad_template_new ("src", GST_PAD_SRC,
GST_PAD_ALWAYS,
jpeg_caps, NULL);
gst_elementfactory_add_padtemplate (enc, jpegenc_src_template);
gst_element_factory_add_pad_template (enc, jpegenc_src_template);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (enc));
/* create an elementfactory for the jpegdec element */
dec = gst_elementfactory_new("jpegdec",GST_TYPE_JPEGDEC,
dec = gst_element_factory_new("jpegdec",GST_TYPE_JPEGDEC,
&gst_jpegdec_details);
g_return_val_if_fail(dec != NULL, FALSE);
/* register sink pads */
jpegdec_sink_template = gst_padtemplate_new ("sink", GST_PAD_SINK,
jpegdec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK,
GST_PAD_ALWAYS,
jpeg_caps, NULL);
gst_elementfactory_add_padtemplate (dec, jpegdec_sink_template);
gst_element_factory_add_pad_template (dec, jpegdec_sink_template);
/* register src pads */
jpegdec_src_template = gst_padtemplate_new ("src", GST_PAD_SRC,
jpegdec_src_template = gst_pad_template_new ("src", GST_PAD_SRC,
GST_PAD_ALWAYS,
raw_caps, NULL);
gst_elementfactory_add_padtemplate (dec, jpegdec_src_template);
gst_element_factory_add_pad_template (dec, jpegdec_src_template);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (dec));
......
......@@ -22,9 +22,11 @@
#define __GST_JPEGDEC_H__
#include <config.h>
#include <gst/gst.h>
/* this is a hack hack hack to get around jpeglib header bugs... */
#ifdef HAVE_STDLIB_H
# undef HAVE_STDLIB_H
#endif
#include <jpeglib.h>
#ifdef __cplusplus
......
......@@ -22,9 +22,11 @@
#define __GST_JPEGENC_H__
#include <config.h>
#include <gst/gst.h>
/* this is a hack hack hack to get around jpeglib header bugs... */
#ifdef HAVE_STDLIB_H
# undef HAVE_STDLIB_H
#endif
#include <jpeglib.h>
#ifdef __cplusplus
......
......@@ -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);
}
}
......
......@@ -66,7 +66,7 @@ mikmod_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,
......@@ -94,7 +94,7 @@ mikmod_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,
......@@ -108,57 +108,57 @@ mikmod_sink_factory (void)
}
static GstCaps*
mikmod_typefind (GstBuffer *buf, gpointer private)
mikmod_type_find (GstBuffer *buf, gpointer private)
{
if ( MOD_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( Mod_669_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( Amf_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( Dsm_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( Fam_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( Gdm_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( Imf_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( It_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( M15_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
/* FIXME
if ( Med_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
*/
if ( Mtm_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( Okt_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( S3m_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
if ( Xm_CheckType( buf ) )
return gst_caps_new ("mikmod_typefind", "audio/mod", NULL);
return gst_caps_new ("mikmod_type_find", "audio/mod", NULL);
return NULL;
}
static GstTypeDefinition mikmoddefinition = {
"mikmod_audio/mod", "audio/mod", ".mod .sam .med .s3m .it .xm .stm .mtm .669 .ult .far .amf .dsm .imf .gdm .stx .okt", mikmod_typefind
"mikmod_audio/mod", "audio/mod", ".mod .sam .med .s3m .it .xm .stm .mtm .669 .ult .far .amf .dsm .imf .gdm .stx .okt", mikmod_type_find
};
static void gst_mikmod_class_init (GstMikModClass *klass);
......@@ -608,14 +608,14 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory;
GstTypeFactory *type;
factory = gst_elementfactory_new("mikmod",GST_TYPE_MIKMOD,
factory = gst_element_factory_new("mikmod",GST_TYPE_MIKMOD,
&mikmod_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, mikmod_src_factory ());
gst_elementfactory_add_padtemplate (factory, mikmod_sink_factory ());
gst_element_factory_add_pad_template (factory, mikmod_src_factory ());
gst_element_factory_add_pad_template (factory, mikmod_sink_factory ());
type = gst_typefactory_new (&mikmoddefinition);
type = gst_type_factory_new (&mikmoddefinition);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
......@@ -39,7 +39,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
factory = gst_elementfactory_new("dv1394src",GST_TYPE_DV1394SRC,
factory = gst_element_factory_new("dv1394src",GST_TYPE_DV1394SRC,
&gst_dv1394src_details);
g_return_val_if_fail(factory != NULL, FALSE);
......
......@@ -37,7 +37,7 @@ gst_dv1394src_factory (void)
static GstPadTemplate *template = NULL;
if (!template) {
template = gst_padtemplate_new (
template = gst_pad_template_new (
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
......
......@@ -38,13 +38,13 @@ static GstElementDetails gst_auparse_details = {
};
static GstCaps*
au_typefind (GstBuffer *buf, gpointer private)
au_type_find (GstBuffer *buf, gpointer private)
{
GstCaps *new = NULL;
gulong *head = (gulong *) GST_BUFFER_DATA (buf);
if (*head == 0x2e736e64 || *head == 0x646e732e)
new = gst_caps_new ("au_typefind", "audio/au", NULL);
new = gst_caps_new ("au_type_find", "audio/au", NULL);
return new;
}
......@@ -54,10 +54,10 @@ static GstTypeDefinition audefinition = {
"auparse_audio/au",
"audio/au",
".au",
au_typefind,
au_type_find,
};
GST_PADTEMPLATE_FACTORY (sink_factory_templ,
GST_PAD_TEMPLATE_FACTORY (sink_factory_templ,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
......@@ -69,7 +69,7 @@ GST_PADTEMPLATE_FACTORY (sink_factory_templ,
)
GST_PADTEMPLATE_FACTORY (src_factory_templ,
GST_PAD_TEMPLATE_FACTORY (src_factory_templ,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
......@@ -150,12 +150,12 @@ static void
gst_auparse_init (GstAuParse *auparse)
{
auparse->sinkpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (sink_factory_templ), "sink");
GST_PAD_TEMPLATE_GET (sink_factory_templ), "sink");
gst_element_add_pad (GST_ELEMENT (auparse), auparse->sinkpad);
gst_pad_set_chain_function (auparse->sinkpad, gst_auparse_chain);
auparse->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_factory_templ), "src");
GST_PAD_TEMPLATE_GET (src_factory_templ), "src");
gst_element_add_pad (GST_ELEMENT (auparse), auparse->srcpad);
auparse->offset = 0;
......@@ -297,14 +297,14 @@ plugin_init (GModule *module, GstPlugin *plugin)
/* create the plugin structure */
/* create an elementfactory for the auparse element and list it */
factory = gst_elementfactory_new ("auparse", GST_TYPE_AUPARSE,
factory = gst_element_factory_new ("auparse", GST_TYPE_AUPARSE,
&gst_auparse_details);
g_return_val_if_fail (factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_factory_templ));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_factory_templ));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_factory_templ));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_factory_templ));
type = gst_typefactory_new (&audefinition);
type = gst_type_factory_new (&audefinition);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
......
......@@ -83,9 +83,9 @@ static GstPad *gst_avi_decoder_get_audio_srcpad_MPEG(GstAviDecoder *avi_decoder,
GstElement *parse_audio, *decode;
GstPad *srcpad, *sinkpad, *newpad;
parse_audio = gst_elementfactory_make("mp3parse", "parse_audio");
parse_audio = gst_element_factory_make("mp3parse", "parse_audio");
g_return_val_if_fail(parse_audio != NULL, NULL);
decode = gst_elementfactory_make("mpg123", "decode_audio");
decode = gst_element_factory_make("mpg123", "decode_audio");
g_return_val_if_fail(decode != NULL, NULL);
gst_element_set_state(GST_ELEMENT(gst_object_get_parent(GST_OBJECT(avi_decoder))), GST_STATE_PAUSED);
......
......@@ -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_audio_templ,
GST_PAD_TEMPLATE_FACTORY (src_audio_templ,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
......@@ -174,12 +174,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory;
/* create an elementfactory for the avi_audio_decoder element */
factory = gst_elementfactory_new ("aviaudiodecoder",GST_TYPE_AVI_AUDIO_DECODER,
factory = gst_element_factory_new ("aviaudiodecoder",GST_TYPE_AVI_AUDIO_DECODER,
&gst_avi_audio_decoder_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_audio_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_audio_templ));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
......
......@@ -35,14 +35,14 @@ static GstElementDetails gst_avi_demux_details = {
"(C) 1999",
};
static GstCaps* avi_typefind (GstBuffer *buf, gpointer private);
static GstCaps* avi_type_find (GstBuffer *buf, gpointer private);
/* typefactory for 'avi' */
static GstTypeDefinition avidefinition = {
"avidemux_video/avi",
"video/avi",
".avi",
avi_typefind,
avi_type_find,
};
/* AviDemux signals and args */
......@@ -60,7 +60,7 @@ enum {
/* FILL ME */
};
GST_PADTEMPLATE_FACTORY (sink_templ,
GST_PAD_TEMPLATE_FACTORY (sink_templ,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
......@@ -71,7 +71,7 @@ GST_PADTEMPLATE_FACTORY (sink_templ,
)
)
GST_PADTEMPLATE_FACTORY (src_video_templ,
GST_PAD_TEMPLATE_FACTORY (src_video_templ,
"video_[00-32]",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
......@@ -114,7 +114,7 @@ GST_PADTEMPLATE_FACTORY (src_video_templ,
)
)
GST_PADTEMPLATE_FACTORY (src_audio_templ,
GST_PAD_TEMPLATE_FACTORY (src_audio_templ,
"audio_[00-32]",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
......@@ -225,7 +225,7 @@ gst_avi_demux_init (GstAviDemux *avi_demux)