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.
This commit is contained in:
Andy Wingo 2002-04-11 20:42:25 +00:00
parent 18c6c04fdc
commit 3a9c675a68
38 changed files with 252 additions and 248 deletions

2
common

@ -1 +1 @@
Subproject commit 6148068f2318e85d8e66df485342b630d8fb49ac
Subproject commit 52a8d4bd490c495f1e71725644535dbf2cf209c7

View file

@ -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);

View file

@ -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));

View file

@ -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);

View file

@ -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));

View file

@ -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));

View file

@ -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));

View file

@ -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;

View file

@ -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));

View file

@ -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

View file

@ -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

View file

@ -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);
}
}

View file

@ -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));

View file

@ -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);

View file

@ -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,

View file

@ -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));

View file

@ -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);

View file

@ -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));

View file

@ -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)
GST_FLAG_SET (avi_demux, GST_ELEMENT_EVENT_AWARE);
avi_demux->sinkpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (sink_templ), "sink");
GST_PAD_TEMPLATE_GET (sink_templ), "sink");
gst_element_add_pad (GST_ELEMENT (avi_demux), avi_demux->sinkpad);
gst_element_set_loop_function (GST_ELEMENT (avi_demux), gst_avi_demux_loop);
@ -252,7 +252,7 @@ gst_avi_demux_init (GstAviDemux *avi_demux)
}
static GstCaps*
avi_typefind (GstBuffer *buf,
avi_type_find (GstBuffer *buf,
gpointer private)
{
gchar *data = GST_BUFFER_DATA (buf);
@ -265,7 +265,7 @@ avi_typefind (GstBuffer *buf,
if (GUINT32_FROM_LE (((guint32 *)data)[2]) != GST_RIFF_RIFF_AVI)
return NULL;
new = GST_CAPS_NEW ("avi_typefind",
new = GST_CAPS_NEW ("avi_type_find",
"video/avi",
"format", GST_PROPS_STRING ("AVI"));
@ -379,7 +379,7 @@ gst_avi_demux_strf_vids (GstAviDemux *avi_demux)
GST_INFO (GST_CAT_PLUGIN_INFO, "gst_avi_demux: imp_colors %d", GUINT32_FROM_LE (strf->imp_colors));
srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_video_templ), g_strdup_printf ("video_%02d",
GST_PAD_TEMPLATE_GET (src_video_templ), g_strdup_printf ("video_%02d",
avi_demux->num_video_pads));
capslist = gst_caps_append(NULL, GST_CAPS_NEW (
@ -458,7 +458,7 @@ gst_avi_demux_strf_auds (GstAviDemux *avi_demux)
GST_INFO (GST_CAT_PLUGIN_INFO, "gst_avi_demux: size %d", GUINT16_FROM_LE (strf->size));
srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_audio_templ), g_strdup_printf ("audio_%02d",
GST_PAD_TEMPLATE_GET (src_audio_templ), g_strdup_printf ("audio_%02d",
avi_demux->num_audio_pads));
capslist = gst_caps_append(NULL, GST_CAPS_NEW (
@ -529,7 +529,7 @@ gst_avi_demux_strf_iavs (GstAviDemux *avi_demux)
GST_INFO (GST_CAT_PLUGIN_INFO, "gst_avi_demux: DVReserved2 %08x", GUINT32_FROM_LE (strf->DVReserved2));
srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_video_templ), g_strdup_printf ("video_%02d",
GST_PAD_TEMPLATE_GET (src_video_templ), g_strdup_printf ("video_%02d",
avi_demux->num_video_pads));
capslist = gst_caps_append(NULL, GST_CAPS_NEW (
@ -945,15 +945,15 @@ plugin_init (GModule *module, GstPlugin *plugin)
}
/* create an elementfactory for the avi_demux element */
factory = gst_elementfactory_new ("avidemux",GST_TYPE_AVI_DEMUX,
factory = gst_element_factory_new ("avidemux",GST_TYPE_AVI_DEMUX,
&gst_avi_demux_details);
g_return_val_if_fail (factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_audio_templ));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_video_templ));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_templ));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_audio_templ));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_video_templ));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_templ));
type = gst_typefactory_new (&avidefinition);
type = gst_type_factory_new (&avidefinition);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -65,7 +65,7 @@ enum {
ARG_FRAMERATE,
};
GST_PADTEMPLATE_FACTORY (src_factory,
GST_PAD_TEMPLATE_FACTORY (src_factory,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -76,7 +76,7 @@ GST_PADTEMPLATE_FACTORY (src_factory,
)
)
GST_PADTEMPLATE_FACTORY (video_sink_factory,
GST_PAD_TEMPLATE_FACTORY (video_sink_factory,
"video_%d",
GST_PAD_SINK,
GST_PAD_REQUEST,
@ -123,7 +123,7 @@ GST_PADTEMPLATE_FACTORY (video_sink_factory,
)
)
GST_PADTEMPLATE_FACTORY (audio_sink_factory,
GST_PAD_TEMPLATE_FACTORY (audio_sink_factory,
"audio_%d",
GST_PAD_SINK,
GST_PAD_REQUEST,
@ -238,7 +238,7 @@ gst_avimux_init (GstAviMux *avimux)
{
gint i;
avimux->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_factory), "src");
GST_PAD_TEMPLATE_GET (src_factory), "src");
gst_element_add_pad (GST_ELEMENT (avimux), avimux->srcpad);
GST_FLAG_SET (GST_ELEMENT(avimux), GST_ELEMENT_EVENT_AWARE);
@ -429,7 +429,7 @@ gst_avimux_request_new_pad (GstElement *element,
avimux = GST_AVIMUX (element);
if (templ == GST_PADTEMPLATE_GET (audio_sink_factory)) {
if (templ == GST_PAD_TEMPLATE_GET (audio_sink_factory)) {
g_return_val_if_fail(avimux->num_audio_pads == 0 /*< MAX_NUM_AUDIO_PADS*/, NULL);
name = g_strdup_printf ("audio_%02d", avimux->num_audio_pads);
newpad = gst_pad_new_from_template (templ, name);
@ -438,7 +438,7 @@ gst_avimux_request_new_pad (GstElement *element,
avimux->audiosinkpad[avimux->num_audio_pads] = newpad;
avimux->num_audio_pads++;
}
else if (templ == GST_PADTEMPLATE_GET (video_sink_factory)) {
else if (templ == GST_PAD_TEMPLATE_GET (video_sink_factory)) {
g_return_val_if_fail(avimux->num_video_pads == 0 /*< MAX_NUM_VIDEO_PADS*/, NULL);
name = g_strdup_printf ("video_%02d", avimux->num_video_pads);
newpad = gst_pad_new_from_template (templ, name);
@ -1111,13 +1111,13 @@ plugin_init (GModule *module, GstPlugin *plugin)
#endif
/* create an elementfactory for the avimux element */
factory = gst_elementfactory_new ("avimux", GST_TYPE_AVIMUX,
factory = gst_element_factory_new ("avimux", GST_TYPE_AVIMUX,
&gst_avimux_details);
g_return_val_if_fail (factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_factory));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (audio_sink_factory));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (video_sink_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (audio_sink_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (video_sink_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -46,14 +46,14 @@ static GstElementDetails gst_cdxa_parse_details = {
"(C) 2002",
};
static GstCaps* cdxa_typefind (GstBuffer *buf, gpointer private);
static GstCaps* cdxa_type_find (GstBuffer *buf, gpointer private);
/* typefactory for 'cdxa' */
static GstTypeDefinition cdxadefinition = {
"cdxaparse_video/avi",
"video/avi",
".dat",
cdxa_typefind,
cdxa_type_find,
};
/* CDXAParse signals and args */
@ -67,7 +67,7 @@ enum {
/* FILL ME */
};
GST_PADTEMPLATE_FACTORY (sink_templ,
GST_PAD_TEMPLATE_FACTORY (sink_templ,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
@ -78,7 +78,7 @@ GST_PADTEMPLATE_FACTORY (sink_templ,
)
)
GST_PADTEMPLATE_FACTORY (src_templ,
GST_PAD_TEMPLATE_FACTORY (src_templ,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -144,11 +144,11 @@ gst_cdxa_parse_init (GstCDXAParse *cdxa_parse)
GST_FLAG_SET (cdxa_parse, GST_ELEMENT_EVENT_AWARE);
cdxa_parse->sinkpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (sink_templ), "sink");
GST_PAD_TEMPLATE_GET (sink_templ), "sink");
gst_element_add_pad (GST_ELEMENT (cdxa_parse), cdxa_parse->sinkpad);
cdxa_parse->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_templ), "src");
GST_PAD_TEMPLATE_GET (src_templ), "src");
gst_element_add_pad (GST_ELEMENT (cdxa_parse), cdxa_parse->srcpad);
gst_element_set_loop_function (GST_ELEMENT (cdxa_parse), gst_cdxa_parse_loop);
@ -156,7 +156,7 @@ gst_cdxa_parse_init (GstCDXAParse *cdxa_parse)
}
static GstCaps*
cdxa_typefind (GstBuffer *buf,
cdxa_type_find (GstBuffer *buf,
gpointer private)
{
gchar *data = GST_BUFFER_DATA (buf);
@ -169,7 +169,7 @@ cdxa_typefind (GstBuffer *buf,
if (GUINT32_FROM_LE (((guint32 *)data)[2]) != GST_RIFF_RIFF_CDXA)
return NULL;
new = GST_CAPS_NEW ("cdxa_typefind",
new = GST_CAPS_NEW ("cdxa_type_find",
"video/avi",
"RIFF", GST_PROPS_STRING ("CDXA"));
@ -339,14 +339,14 @@ plugin_init (GModule *module, GstPlugin *plugin)
}
/* create an elementfactory for the cdxa_parse element */
factory = gst_elementfactory_new ("cdxaparse", GST_TYPE_CDXA_PARSE,
factory = gst_element_factory_new ("cdxaparse", GST_TYPE_CDXA_PARSE,
&gst_cdxa_parse_details);
g_return_val_if_fail (factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_templ));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_templ));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_templ));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_templ));
type = gst_typefactory_new (&cdxadefinition);
type = gst_type_factory_new (&cdxadefinition);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -49,7 +49,7 @@ enum {
ARG_PRE_LENGTH
};
GST_PADTEMPLATE_FACTORY (cutter_src_factory,
GST_PAD_TEMPLATE_FACTORY (cutter_src_factory,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -60,7 +60,7 @@ GST_PADTEMPLATE_FACTORY (cutter_src_factory,
)
);
GST_PADTEMPLATE_FACTORY (cutter_sink_factory,
GST_PAD_TEMPLATE_FACTORY (cutter_sink_factory,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
@ -353,12 +353,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
factory = gst_elementfactory_new("cutter",GST_TYPE_CUTTER,
factory = gst_element_factory_new("cutter",GST_TYPE_CUTTER,
&cutter_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (cutter_src_factory));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (cutter_sink_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (cutter_src_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (cutter_sink_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -24,7 +24,7 @@
#define JIFFIE (1000000/70)
static GstCaps* flxdec_typefind(GstBuffer *buf, gpointer private);
static GstCaps* flxdec_type_find(GstBuffer *buf, gpointer private);
/* flx element information */
static GstElementDetails flxdec_details = {
@ -40,7 +40,7 @@ static GstTypeDefinition flxdec_definition = {
"flxdec_video/fli",
"video/fli",
".flc .fli",
flxdec_typefind,
flxdec_type_find,
};
/* Flx signals and args */
@ -54,7 +54,7 @@ enum {
};
/* input */
GST_PADTEMPLATE_FACTORY (sink_factory,
GST_PAD_TEMPLATE_FACTORY (sink_factory,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
@ -66,7 +66,7 @@ GST_PADTEMPLATE_FACTORY (sink_factory,
)
/* output */
GST_PADTEMPLATE_FACTORY (src_video_factory,
GST_PAD_TEMPLATE_FACTORY (src_video_factory,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -108,7 +108,7 @@ static void flx_decode_delta_flc (GstFlxDec *, guchar *, guchar *);
static GstElementClass *parent_class = NULL;
static GstCaps*
flxdec_typefind (GstBuffer *buf, gpointer private)
flxdec_type_find (GstBuffer *buf, gpointer private)
{
guchar *data = GST_BUFFER_DATA(buf);
GstCaps *new;
@ -119,7 +119,7 @@ flxdec_typefind (GstBuffer *buf, gpointer private)
/* check the frame type of the first frame */
if ((data[132] == 0x00 || data[132] == 0xfa) && data[133] == 0xf1) {
g_print("GstFlxDec: found supported flx format\n");
new = gst_caps_new("flxdec_typefind","video/fli", NULL);
new = gst_caps_new("flxdec_type_find","video/fli", NULL);
return new;
}
}
@ -172,12 +172,12 @@ static void
gst_flxdec_init(GstFlxDec *flxdec)
{
flxdec->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(flxdec),flxdec->sinkpad);
gst_element_set_loop_function(GST_ELEMENT(flxdec),gst_flxdec_loop);
flxdec->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_video_factory), "src");
GST_PAD_TEMPLATE_GET (src_video_factory), "src");
gst_element_add_pad(GST_ELEMENT(flxdec),flxdec->srcpad);
flxdec->bs = NULL;
@ -682,15 +682,15 @@ plugin_init (GModule *module, GstPlugin *plugin)
return FALSE;
}
factory = gst_elementfactory_new("flxdec", GST_TYPE_FLXDEC, &flxdec_details);
factory = gst_element_factory_new("flxdec", GST_TYPE_FLXDEC, &flxdec_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_factory));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_video_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_video_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
type = gst_typefactory_new (&flxdec_definition);
type = gst_type_factory_new (&flxdec_definition);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
return TRUE;

View file

@ -80,7 +80,7 @@ enum {
/* FILL ME */
};
GST_PADTEMPLATE_FACTORY (src_template,
GST_PAD_TEMPLATE_FACTORY (src_template,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -99,7 +99,7 @@ GST_PADTEMPLATE_FACTORY (src_template,
)
)
GST_PADTEMPLATE_FACTORY (sink_template,
GST_PAD_TEMPLATE_FACTORY (sink_template,
"sink", /* the name of the pads */
GST_PAD_SINK, /* type of the pad */
GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */
@ -186,9 +186,9 @@ gst_goom_init (GstGOOM *goom)
{
/* create the sink and src pads */
goom->sinkpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (sink_template ), "sink");
GST_PAD_TEMPLATE_GET (sink_template ), "sink");
goom->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_template ), "src");
GST_PAD_TEMPLATE_GET (src_template ), "src");
gst_element_add_pad (GST_ELEMENT (goom), goom->sinkpad);
gst_element_add_pad (GST_ELEMENT (goom), goom->srcpad);
@ -345,12 +345,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory;
/* create an elementfactory for the goom element */
factory = gst_elementfactory_new("goom",GST_TYPE_GOOM,
factory = gst_element_factory_new("goom",GST_TYPE_GOOM,
&gst_goom_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_template));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_template));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_template));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_template));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -60,26 +60,26 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *alawenc_factory, *alawdec_factory;
GstCaps* alaw_caps, *linear_caps;
alawenc_factory = gst_elementfactory_new("alawencode",GST_TYPE_ALAWENC,
alawenc_factory = gst_element_factory_new("alawencode",GST_TYPE_ALAWENC,
&alawenc_details);
g_return_val_if_fail(alawenc_factory != NULL, FALSE);
alawdec_factory = gst_elementfactory_new("alawdecode",GST_TYPE_ALAWDEC,
alawdec_factory = gst_element_factory_new("alawdecode",GST_TYPE_ALAWDEC,
&alawdec_details);
g_return_val_if_fail(alawdec_factory != NULL, FALSE);
alaw_caps = alaw_factory ();
linear_caps = linear_factory ();
alawenc_src_template = gst_padtemplate_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,alaw_caps, NULL);
alawenc_sink_template = gst_padtemplate_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,linear_caps, NULL);
gst_elementfactory_add_padtemplate (alawenc_factory, alawenc_src_template);
gst_elementfactory_add_padtemplate (alawenc_factory, alawenc_sink_template);
alawenc_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,alaw_caps, NULL);
alawenc_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,linear_caps, NULL);
gst_element_factory_add_pad_template (alawenc_factory, alawenc_src_template);
gst_element_factory_add_pad_template (alawenc_factory, alawenc_sink_template);
alawdec_src_template = gst_padtemplate_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,linear_caps, NULL);
alawdec_sink_template = gst_padtemplate_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,alaw_caps, NULL);
alawdec_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,linear_caps, NULL);
alawdec_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,alaw_caps, NULL);
gst_elementfactory_add_padtemplate (alawdec_factory, alawdec_src_template);
gst_elementfactory_add_padtemplate (alawdec_factory, alawdec_sink_template);
gst_element_factory_add_pad_template (alawdec_factory, alawdec_src_template);
gst_element_factory_add_pad_template (alawdec_factory, alawdec_sink_template);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (alawenc_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (alawdec_factory));

View file

@ -60,31 +60,31 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *mulawenc_factory, *mulawdec_factory;
GstCaps* mulaw_caps, *linear_caps;
mulawenc_factory = gst_elementfactory_new("mulawencode",GST_TYPE_MULAWENC,
mulawenc_factory = gst_element_factory_new("mulawencode",GST_TYPE_MULAWENC,
&mulawenc_details);
g_return_val_if_fail(mulawenc_factory != NULL, FALSE);
mulawdec_factory = gst_elementfactory_new("mulawdecode",GST_TYPE_MULAWDEC,
mulawdec_factory = gst_element_factory_new("mulawdecode",GST_TYPE_MULAWDEC,
&mulawdec_details);
g_return_val_if_fail(mulawdec_factory != NULL, FALSE);
mulaw_caps = mulaw_factory ();
linear_caps = linear_factory ();
mulawenc_src_template = gst_padtemplate_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
mulawenc_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
mulaw_caps, NULL);
mulawenc_sink_template = gst_padtemplate_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
mulawenc_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
linear_caps, NULL);
gst_elementfactory_add_padtemplate (mulawenc_factory, mulawenc_src_template);
gst_elementfactory_add_padtemplate (mulawenc_factory, mulawenc_sink_template);
gst_element_factory_add_pad_template (mulawenc_factory, mulawenc_src_template);
gst_element_factory_add_pad_template (mulawenc_factory, mulawenc_sink_template);
mulawdec_src_template = gst_padtemplate_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
mulawdec_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
linear_caps, NULL);
mulawdec_sink_template = gst_padtemplate_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
mulawdec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
mulaw_caps, NULL);
gst_elementfactory_add_padtemplate (mulawdec_factory, mulawdec_src_template);
gst_elementfactory_add_padtemplate (mulawdec_factory, mulawdec_sink_template);
gst_element_factory_add_pad_template (mulawdec_factory, mulawdec_src_template);
gst_element_factory_add_pad_template (mulawdec_factory, mulawdec_sink_template);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (mulawenc_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (mulawdec_factory));

View file

@ -48,7 +48,7 @@ level_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,
@ -69,7 +69,7 @@ level_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,
@ -240,12 +240,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
factory = gst_elementfactory_new("level",GST_TYPE_LEVEL,
factory = gst_element_factory_new("level",GST_TYPE_LEVEL,
&level_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, level_src_factory ());
gst_elementfactory_add_padtemplate (factory, level_sink_factory ());
gst_element_factory_add_pad_template (factory, level_src_factory ());
gst_element_factory_add_pad_template (factory, level_sink_factory ());
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -30,7 +30,7 @@ static GstElementDetails median_details = {
"(C) 2000",
};
GST_PADTEMPLATE_FACTORY (median_src_factory,
GST_PAD_TEMPLATE_FACTORY (median_src_factory,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -41,7 +41,7 @@ GST_PADTEMPLATE_FACTORY (median_src_factory,
)
)
GST_PADTEMPLATE_FACTORY (median_sink_factory,
GST_PAD_TEMPLATE_FACTORY (median_sink_factory,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
@ -143,13 +143,13 @@ gst_median_sinkconnect (GstPad *pad, GstCaps *caps)
void gst_median_init (GstMedian *median)
{
median->sinkpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (median_sink_factory), "sink");
GST_PAD_TEMPLATE_GET (median_sink_factory), "sink");
gst_pad_set_connect_function (median->sinkpad, gst_median_sinkconnect);
gst_pad_set_chain_function (median->sinkpad, gst_median_chain);
gst_element_add_pad (GST_ELEMENT (median), median->sinkpad);
median->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (median_src_factory), "src");
GST_PAD_TEMPLATE_GET (median_src_factory), "src");
gst_element_add_pad (GST_ELEMENT (median), median->srcpad);
median->filtersize = 5;
@ -378,12 +378,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
factory = gst_elementfactory_new("median",GST_TYPE_MEDIAN,
factory = gst_element_factory_new("median",GST_TYPE_MEDIAN,
&median_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (median_sink_factory));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (median_src_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (median_sink_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (median_src_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -83,7 +83,7 @@ enum {
/* FILL ME */
};
GST_PADTEMPLATE_FACTORY (src_template,
GST_PAD_TEMPLATE_FACTORY (src_template,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -102,7 +102,7 @@ GST_PADTEMPLATE_FACTORY (src_template,
)
)
GST_PADTEMPLATE_FACTORY (sink_template,
GST_PAD_TEMPLATE_FACTORY (sink_template,
"sink", /* the name of the pads */
GST_PAD_SINK, /* type of the pad */
GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */
@ -189,9 +189,9 @@ gst_monoscope_init (GstMonoscope *monoscope)
{
/* create the sink and src pads */
monoscope->sinkpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (sink_template ), "sink");
GST_PAD_TEMPLATE_GET (sink_template ), "sink");
monoscope->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (src_template ), "src");
GST_PAD_TEMPLATE_GET (src_template ), "src");
gst_element_add_pad (GST_ELEMENT (monoscope), monoscope->sinkpad);
gst_element_add_pad (GST_ELEMENT (monoscope), monoscope->srcpad);
@ -350,12 +350,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory;
/* create an elementfactory for the monoscope element */
factory = gst_elementfactory_new("monoscope",GST_TYPE_MONOSCOPE,
factory = gst_element_factory_new("monoscope",GST_TYPE_MONOSCOPE,
&gst_monoscope_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_template));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_template));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_template));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_template));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -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);

View file

@ -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);

View file

@ -192,7 +192,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory;
/* create an elementfactory for the spectrum element */
factory = gst_elementfactory_new ("spectrum",GST_TYPE_SPECTRUM,
factory = gst_element_factory_new ("spectrum",GST_TYPE_SPECTRUM,
&gst_spectrum_details);
g_return_val_if_fail (factory != NULL, FALSE);

View file

@ -31,12 +31,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *src, *sink;
/* create an elementfactory for the udpsrc element */
sink = gst_elementfactory_new ("udpsink",GST_TYPE_UDPSINK,
sink = gst_element_factory_new ("udpsink",GST_TYPE_UDPSINK,
&gst_udpsink_details);
g_return_val_if_fail (sink != NULL, FALSE);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (sink));
src = gst_elementfactory_new ("udpsrc",GST_TYPE_UDPSRC,
src = gst_element_factory_new ("udpsrc",GST_TYPE_UDPSRC,
&gst_udpsrc_details);
g_return_val_if_fail (src != NULL, FALSE);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (src));

View file

@ -25,7 +25,7 @@
static void gst_wavparse_class_init (GstWavParseClass *klass);
static void gst_wavparse_init (GstWavParse *wavparse);
static GstCaps* wav_typefind (GstBuffer *buf, gpointer private);
static GstCaps* wav_type_find (GstBuffer *buf, gpointer private);
static void gst_wavparse_chain (GstPad *pad, GstBuffer *buf);
@ -39,7 +39,7 @@ static GstElementDetails gst_wavparse_details = {
"(C) 1999",
};
GST_PADTEMPLATE_FACTORY (sink_template_factory,
GST_PAD_TEMPLATE_FACTORY (sink_template_factory,
"wavparse_sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
@ -50,7 +50,7 @@ GST_PADTEMPLATE_FACTORY (sink_template_factory,
)
)
GST_PADTEMPLATE_FACTORY (src_template_factory,
GST_PAD_TEMPLATE_FACTORY (src_template_factory,
"wavparse_src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -81,7 +81,7 @@ wavdefinition =
"wavparse_audio/wav",
"audio/wav",
".wav",
wav_typefind,
wav_type_find,
};
@ -133,11 +133,11 @@ gst_wavparse_class_init (GstWavParseClass *klass)
static void
gst_wavparse_init (GstWavParse *wavparse)
{
wavparse->sinkpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (sink_template_factory), "sink");
wavparse->sinkpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (sink_template_factory), "sink");
gst_element_add_pad (GST_ELEMENT (wavparse), wavparse->sinkpad);
gst_pad_set_chain_function (wavparse->sinkpad, gst_wavparse_chain);
wavparse->srcpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (src_template_factory), "src");
wavparse->srcpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (src_template_factory), "src");
gst_element_add_pad (GST_ELEMENT (wavparse), wavparse->srcpad);
wavparse->riff = NULL;
@ -150,14 +150,14 @@ gst_wavparse_init (GstWavParse *wavparse)
}
static GstCaps*
wav_typefind (GstBuffer *buf, gpointer private)
wav_type_find (GstBuffer *buf, gpointer private)
{
gchar *data = GST_BUFFER_DATA (buf);
if (strncmp (&data[0], "RIFF", 4)) return NULL;
if (strncmp (&data[8], "WAVE", 4)) return NULL;
return gst_caps_new ("wav_typefind", "audio/wav", NULL);
return gst_caps_new ("wav_type_find", "audio/wav", NULL);
}
@ -344,17 +344,17 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstTypeFactory *type;
/* create an elementfactory for the wavparse element */
factory = gst_elementfactory_new ("wavparse", GST_TYPE_WAVPARSE,
factory = gst_element_factory_new ("wavparse", GST_TYPE_WAVPARSE,
&gst_wavparse_details);
g_return_val_if_fail(factory != NULL, FALSE);
/* register src pads */
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_template_factory));
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_template_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_template_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_template_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
type = gst_typefactory_new (&wavdefinition);
type = gst_type_factory_new (&wavdefinition);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
return TRUE;

View file

@ -69,7 +69,7 @@ static GstPadTemplate*
ossgst_src_factory (void)
{
return
gst_padtemplate_new (
gst_pad_template_new (
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -435,11 +435,11 @@ gst_ossgst_factory_init (GstPlugin *plugin)
plugin_dir = g_strjoinv (G_DIR_SEPARATOR_S, path);
g_strfreev (path);
factory = gst_elementfactory_new ("ossgst", GST_TYPE_OSSGST, &gst_ossgst_details);
factory = gst_element_factory_new ("ossgst", GST_TYPE_OSSGST, &gst_ossgst_details);
g_return_val_if_fail (factory != NULL, FALSE);
gst_ossgst_src_template = ossgst_src_factory ();
gst_elementfactory_add_padtemplate (factory, gst_ossgst_src_template);
gst_element_factory_add_pad_template (factory, gst_ossgst_src_template);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -79,7 +79,7 @@ enum {
/* FILL ME */
};
GST_PADTEMPLATE_FACTORY (osssink_sink_factory,
GST_PAD_TEMPLATE_FACTORY (osssink_sink_factory,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
@ -235,7 +235,7 @@ static void
gst_osssink_init (GstOssSink *osssink)
{
osssink->sinkpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (osssink_sink_factory), "sink");
GST_PAD_TEMPLATE_GET (osssink_sink_factory), "sink");
gst_element_add_pad (GST_ELEMENT (osssink), osssink->sinkpad);
gst_pad_set_connect_function (osssink->sinkpad, gst_osssink_sinkconnect);
gst_pad_set_bufferpool_function (osssink->sinkpad, gst_osssink_get_bufferpool);
@ -733,10 +733,10 @@ gst_osssink_factory_init (GstPlugin *plugin)
{
GstElementFactory *factory;
factory = gst_elementfactory_new ("osssink", GST_TYPE_OSSSINK, &gst_osssink_details);
factory = gst_element_factory_new ("osssink", GST_TYPE_OSSSINK, &gst_osssink_details);
g_return_val_if_fail (factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (osssink_sink_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (osssink_sink_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -55,7 +55,7 @@ enum {
ARG_FREQUENCY
};
GST_PADTEMPLATE_FACTORY (osssrc_src_factory,
GST_PAD_TEMPLATE_FACTORY (osssrc_src_factory,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
@ -160,7 +160,7 @@ static void
gst_osssrc_init (GstOssSrc *osssrc)
{
osssrc->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (osssrc_src_factory), "src");
GST_PAD_TEMPLATE_GET (osssrc_src_factory), "src");
gst_pad_set_get_function(osssrc->srcpad,gst_osssrc_get);
gst_element_add_pad (GST_ELEMENT (osssrc), osssrc->srcpad);
@ -420,10 +420,10 @@ gst_osssrc_factory_init (GstPlugin *plugin)
{
GstElementFactory *factory;
factory = gst_elementfactory_new ("osssrc", GST_TYPE_OSSSRC, &gst_osssrc_details);
factory = gst_element_factory_new ("osssrc", GST_TYPE_OSSSRC, &gst_osssrc_details);
g_return_val_if_fail (factory != NULL, FALSE);
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (osssrc_src_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (osssrc_src_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));

View file

@ -25,12 +25,12 @@ int main(int argc,char *argv[]) {
bin = gst_bin_new("bin");
srcfactory = gst_elementfactory_find("osssrc");
spectrumfactory = gst_elementfactory_find("gstspectrum");
srcfactory = gst_element_factory_find("osssrc");
spectrumfactory = gst_element_factory_find("gstspectrum");
src = gst_elementfactory_create(srcfactory,"src");
src = gst_element_factory_create(srcfactory,"src");
gtk_object_set(GTK_OBJECT(src),"bytes_per_read",(gulong)1024,NULL);
spectrum = gst_elementfactory_create(spectrumfactory,"spectrum");
spectrum = gst_element_factory_create(spectrumfactory,"spectrum");
gtk_object_set(GTK_OBJECT(spectrum),"width",256,NULL);