mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
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:
parent
1ec871710e
commit
f7ebc8f95d
23 changed files with 97 additions and 96 deletions
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit d8fa5431e3f6f1b9c8be36bad079719a6c4b529a
|
||||
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);
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ gst_alsa_src_pad_factory(void)
|
|||
static GstPadTemplate *template = NULL;
|
||||
|
||||
if (!template)
|
||||
template = gst_padtemplate_new("src", GST_PAD_SRC, GST_PAD_SOMETIMES,
|
||||
template = gst_pad_template_new("src", GST_PAD_SRC, GST_PAD_SOMETIMES,
|
||||
gst_caps_new("src", "audio/raw", NULL),
|
||||
NULL);
|
||||
|
||||
|
@ -175,7 +175,7 @@ gst_alsa_src_request_pad_factory(void)
|
|||
static GstPadTemplate *template = NULL;
|
||||
|
||||
if (!template)
|
||||
template = gst_padtemplate_new("src%d", GST_PAD_SRC, GST_PAD_REQUEST,
|
||||
template = gst_pad_template_new("src%d", GST_PAD_SRC, GST_PAD_REQUEST,
|
||||
gst_caps_new("src", "audio/raw",
|
||||
gst_props_new("channels", GST_PROPS_INT(1), NULL)),
|
||||
NULL);
|
||||
|
@ -189,7 +189,7 @@ gst_alsa_sink_pad_factory(void)
|
|||
static GstPadTemplate *template = NULL;
|
||||
|
||||
if (!template)
|
||||
template = gst_padtemplate_new("sink", GST_PAD_SINK, GST_PAD_SOMETIMES,
|
||||
template = gst_pad_template_new("sink", GST_PAD_SINK, GST_PAD_SOMETIMES,
|
||||
gst_caps_new("sink", "audio/raw", NULL),
|
||||
NULL);
|
||||
|
||||
|
@ -202,7 +202,7 @@ gst_alsa_sink_request_pad_factory(void)
|
|||
static GstPadTemplate *template = NULL;
|
||||
|
||||
if (!template)
|
||||
template = gst_padtemplate_new("sink%d", GST_PAD_SINK, GST_PAD_REQUEST,
|
||||
template = gst_pad_template_new("sink%d", GST_PAD_SINK, GST_PAD_REQUEST,
|
||||
gst_caps_new("sink-request", "audio/raw",
|
||||
gst_props_new("channels", GST_PROPS_INT(1), NULL)),
|
||||
NULL);
|
||||
|
@ -1415,16 +1415,16 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
factory = gst_elementfactory_new ("alsasrc", GST_TYPE_ALSA_SRC, &gst_alsa_src_details);
|
||||
factory = gst_element_factory_new ("alsasrc", GST_TYPE_ALSA_SRC, &gst_alsa_src_details);
|
||||
g_return_val_if_fail (factory != NULL, FALSE);
|
||||
gst_elementfactory_add_padtemplate (factory, gst_alsa_src_pad_factory());
|
||||
gst_elementfactory_add_padtemplate (factory, gst_alsa_src_request_pad_factory());
|
||||
gst_element_factory_add_pad_template (factory, gst_alsa_src_pad_factory());
|
||||
gst_element_factory_add_pad_template (factory, gst_alsa_src_request_pad_factory());
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
factory = gst_elementfactory_new ("alsasink", GST_TYPE_ALSA_SINK, &gst_alsa_sink_details);
|
||||
factory = gst_element_factory_new ("alsasink", GST_TYPE_ALSA_SINK, &gst_alsa_sink_details);
|
||||
g_return_val_if_fail (factory != NULL, FALSE);
|
||||
gst_elementfactory_add_padtemplate (factory, gst_alsa_sink_pad_factory());
|
||||
gst_elementfactory_add_padtemplate (factory, gst_alsa_sink_request_pad_factory());
|
||||
gst_element_factory_add_pad_template (factory, gst_alsa_sink_pad_factory());
|
||||
gst_element_factory_add_pad_template (factory, gst_alsa_sink_request_pad_factory());
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
gst_plugin_set_longname(plugin, "ALSA plugin library");
|
||||
|
|
|
@ -44,7 +44,7 @@ static GstElementDetails cdparanoia_details = {
|
|||
"(C) 2000",
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (cdparanoia_src_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (cdparanoia_src_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
|
@ -240,7 +240,7 @@ static void
|
|||
cdparanoia_init (CDParanoia *cdparanoia)
|
||||
{
|
||||
cdparanoia->srcpad = gst_pad_new_from_template (
|
||||
GST_PADTEMPLATE_GET (cdparanoia_src_factory), "src");
|
||||
GST_PAD_TEMPLATE_GET (cdparanoia_src_factory), "src");
|
||||
gst_pad_set_get_function (cdparanoia->srcpad, cdparanoia_get);
|
||||
gst_element_add_pad (GST_ELEMENT (cdparanoia), cdparanoia->srcpad);
|
||||
|
||||
|
@ -635,12 +635,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the cdparanoia element */
|
||||
factory = gst_elementfactory_new ("cdparanoia", GST_TYPE_CDPARANOIA,
|
||||
factory = gst_element_factory_new ("cdparanoia", GST_TYPE_CDPARANOIA,
|
||||
&cdparanoia_details);
|
||||
g_return_val_if_fail (factory != NULL, FALSE);
|
||||
|
||||
/* register the source's caps */
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (cdparanoia_src_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (cdparanoia_src_factory));
|
||||
|
||||
/* and add the cdparanoia element factory to the plugin */
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
|
|
@ -356,7 +356,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the aasink element */
|
||||
factory = gst_elementfactory_new("gnomevfssink", GST_TYPE_GNOMEVFSSINK,
|
||||
factory = gst_element_factory_new("gnomevfssink", GST_TYPE_GNOMEVFSSINK,
|
||||
&gst_gnomevfssink_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
|
|
|
@ -540,7 +540,7 @@ static gboolean plugin_init(GModule *module, GstPlugin *plugin)
|
|||
|
||||
/* create an elementfactory for the aasink element */
|
||||
factory =
|
||||
gst_elementfactory_new("gnomevfssrc", GST_TYPE_GNOMEVFSSRC,
|
||||
gst_element_factory_new("gnomevfssrc", GST_TYPE_GNOMEVFSSRC,
|
||||
&gst_gnomevfssrc_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
extern GstElementDetails vorbisenc_details;
|
||||
extern GstElementDetails vorbisdec_details;
|
||||
|
||||
static GstCaps* vorbis_typefind (GstBuffer *buf, gpointer private);
|
||||
static GstCaps* vorbis_type_find (GstBuffer *buf, gpointer private);
|
||||
|
||||
GstPadTemplate *dec_src_template, *dec_sink_template;
|
||||
GstPadTemplate *enc_src_template, *enc_sink_template;
|
||||
|
@ -77,18 +77,18 @@ static GstTypeDefinition vorbisdefinition = {
|
|||
"vorbis_audio/x-ogg",
|
||||
"audio/x-ogg",
|
||||
".ogg",
|
||||
vorbis_typefind,
|
||||
vorbis_type_find,
|
||||
};
|
||||
|
||||
static GstCaps*
|
||||
vorbis_typefind (GstBuffer *buf, gpointer private)
|
||||
vorbis_type_find (GstBuffer *buf, gpointer private)
|
||||
{
|
||||
gulong head = GULONG_FROM_BE (*((gulong *)GST_BUFFER_DATA (buf)));
|
||||
|
||||
if (head != 0x4F676753)
|
||||
return NULL;
|
||||
|
||||
return gst_caps_new ("vorbis_typefind", "audio/x-ogg", NULL);
|
||||
return gst_caps_new ("vorbis_type_find", "audio/x-ogg", NULL);
|
||||
}
|
||||
|
||||
|
||||
|
@ -102,7 +102,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
gst_plugin_set_longname (plugin, "The OGG Vorbis Codec");
|
||||
|
||||
/* create an elementfactory for the vorbisenc element */
|
||||
enc = gst_elementfactory_new ("vorbisenc", GST_TYPE_VORBISENC,
|
||||
enc = gst_element_factory_new ("vorbisenc", GST_TYPE_VORBISENC,
|
||||
&vorbisenc_details);
|
||||
g_return_val_if_fail (enc != NULL, FALSE);
|
||||
|
||||
|
@ -111,40 +111,40 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
vorbis_caps = vorbis_caps_factory ();
|
||||
|
||||
/* register sink pads */
|
||||
enc_sink_template = gst_padtemplate_new ("sink", GST_PAD_SINK,
|
||||
enc_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
raw_caps, NULL);
|
||||
gst_elementfactory_add_padtemplate (enc, enc_sink_template);
|
||||
gst_element_factory_add_pad_template (enc, enc_sink_template);
|
||||
|
||||
/* register src pads */
|
||||
enc_src_template = gst_padtemplate_new ("src", GST_PAD_SRC,
|
||||
enc_src_template = gst_pad_template_new ("src", GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
vorbis_caps, NULL);
|
||||
gst_elementfactory_add_padtemplate (enc, enc_src_template);
|
||||
gst_element_factory_add_pad_template (enc, enc_src_template);
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (enc));
|
||||
|
||||
/* create an elementfactory for the vorbisdec element */
|
||||
dec = gst_elementfactory_new("vorbisdec",GST_TYPE_VORBISDEC,
|
||||
dec = gst_element_factory_new("vorbisdec",GST_TYPE_VORBISDEC,
|
||||
&vorbisdec_details);
|
||||
g_return_val_if_fail(dec != NULL, FALSE);
|
||||
|
||||
/* register sink pads */
|
||||
dec_sink_template = gst_padtemplate_new ("sink", GST_PAD_SINK,
|
||||
dec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
vorbis_caps, NULL);
|
||||
gst_elementfactory_add_padtemplate (dec, dec_sink_template);
|
||||
gst_element_factory_add_pad_template (dec, dec_sink_template);
|
||||
|
||||
raw_caps = gst_caps_prepend (raw_caps, raw_caps2);
|
||||
/* register src pads */
|
||||
dec_src_template = gst_padtemplate_new ("src", GST_PAD_SRC,
|
||||
dec_src_template = gst_pad_template_new ("src", GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
raw_caps, NULL);
|
||||
gst_elementfactory_add_padtemplate (dec, dec_src_template);
|
||||
gst_element_factory_add_pad_template (dec, dec_src_template);
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (dec));
|
||||
|
||||
type = gst_typefactory_new (&vorbisdefinition);
|
||||
type = gst_type_factory_new (&vorbisdefinition);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* for example, to make a source pad that can output mono streams of either
|
||||
* float or int:
|
||||
|
||||
template = gst_padtemplate_new
|
||||
template = gst_pad_template_new
|
||||
("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
||||
gst_caps_append(gst_caps_new ("sink_int", "audio/raw",
|
||||
GST_AUDIO_INT_PAD_TEMPLATE_PROPS),
|
||||
|
|
|
@ -48,7 +48,7 @@ enum {
|
|||
/* FILL ME */
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (gst_adder_src_template_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (gst_adder_src_template_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
|
@ -76,7 +76,7 @@ GST_PADTEMPLATE_FACTORY (gst_adder_src_template_factory,
|
|||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (gst_adder_sink_template_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (gst_adder_sink_template_factory,
|
||||
"sink%d",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_REQUEST,
|
||||
|
@ -346,6 +346,7 @@ gst_adder_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe
|
|||
g_value_set_int (value, adder->numsinkpads);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -483,7 +484,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
{
|
||||
GstElementFactory *factory;
|
||||
|
||||
factory = gst_elementfactory_new("adder",GST_TYPE_ADDER,
|
||||
factory = gst_element_factory_new("adder",GST_TYPE_ADDER,
|
||||
&adder_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
|
@ -492,8 +493,8 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (gst_adder_src_template_factory));
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (gst_adder_sink_template_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (gst_adder_src_template_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (gst_adder_sink_template_factory));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ sink_template (void)
|
|||
static GstPadTemplate *template = NULL;
|
||||
|
||||
if (!template) {
|
||||
template = gst_padtemplate_new ("sink",
|
||||
template = gst_pad_template_new ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
gst_caps_new
|
||||
|
@ -72,7 +72,7 @@ src_template (void)
|
|||
static GstPadTemplate *template = NULL;
|
||||
|
||||
if (!template) {
|
||||
template = gst_padtemplate_new ("src",
|
||||
template = gst_pad_template_new ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
gst_caps_new
|
||||
|
@ -199,12 +199,12 @@ gst_audioscale_init (Audioscale *audioscale)
|
|||
{
|
||||
resample_t *r;
|
||||
|
||||
audioscale->sinkpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (sink_template), "sink");
|
||||
audioscale->sinkpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (sink_template), "sink");
|
||||
gst_element_add_pad(GST_ELEMENT(audioscale),audioscale->sinkpad);
|
||||
gst_pad_set_chain_function(audioscale->sinkpad,gst_audioscale_chain);
|
||||
gst_pad_set_connect_function (audioscale->sinkpad, gst_audioscale_sinkconnect);
|
||||
|
||||
audioscale->srcpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (src_template), "src");
|
||||
audioscale->srcpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (src_template), "src");
|
||||
|
||||
gst_element_add_pad(GST_ELEMENT(audioscale),audioscale->srcpad);
|
||||
|
||||
|
@ -314,7 +314,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the audioscale element */
|
||||
factory = gst_elementfactory_new ("audioscale", GST_TYPE_AUDIOSCALE, &audioscale_details);
|
||||
factory = gst_element_factory_new ("audioscale", GST_TYPE_AUDIOSCALE, &audioscale_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
g_print("creating elements\n");
|
||||
thread = gst_thread_new("live-example");
|
||||
sinesrc = gst_elementfactory_make("sinesrc","sine-source");
|
||||
osssink = gst_elementfactory_make("osssink","sound-sink");
|
||||
sinesrc = gst_element_factory_make("sinesrc","sine-source");
|
||||
osssink = gst_element_factory_make("osssink","sound-sink");
|
||||
gst_bin_add(GST_BIN(thread),sinesrc);
|
||||
gst_bin_add(GST_BIN(thread),osssink);
|
||||
gst_element_connect(sinesrc,osssink);
|
||||
|
|
|
@ -56,7 +56,7 @@ enum {
|
|||
};
|
||||
|
||||
/* FIXME: this is not core business... */
|
||||
GST_PADTEMPLATE_FACTORY (sinesrc_src_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (sinesrc_src_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
|
@ -158,7 +158,7 @@ gst_sinesrc_init (GstSineSrc *src)
|
|||
{
|
||||
|
||||
src->srcpad = gst_pad_new_from_template (
|
||||
GST_PADTEMPLATE_GET (sinesrc_src_factory), "src");
|
||||
GST_PAD_TEMPLATE_GET (sinesrc_src_factory), "src");
|
||||
gst_element_add_pad(GST_ELEMENT(src), src->srcpad);
|
||||
|
||||
gst_pad_set_get_function(src->srcpad, gst_sinesrc_get);
|
||||
|
@ -421,11 +421,11 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
{
|
||||
GstElementFactory *factory;
|
||||
|
||||
factory = gst_elementfactory_new("sinesrc",GST_TYPE_SINESRC,
|
||||
factory = gst_element_factory_new("sinesrc",GST_TYPE_SINESRC,
|
||||
&gst_sinesrc_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sinesrc_src_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sinesrc_src_factory));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ enum {
|
|||
/* FILL ME */
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (sink_templ,
|
||||
GST_PAD_TEMPLATE_FACTORY (sink_templ,
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
|
@ -58,7 +58,7 @@ GST_PADTEMPLATE_FACTORY (sink_templ,
|
|||
)
|
||||
)
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (src_templ,
|
||||
GST_PAD_TEMPLATE_FACTORY (src_templ,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
|
@ -218,14 +218,14 @@ gst_videoscale_init (GstVideoscale *videoscale)
|
|||
{
|
||||
GST_DEBUG(0,"gst_videoscale_init");
|
||||
videoscale->sinkpad = gst_pad_new_from_template (
|
||||
GST_PADTEMPLATE_GET (sink_templ), "sink");
|
||||
GST_PAD_TEMPLATE_GET (sink_templ), "sink");
|
||||
/*gst_pad_set_negotiate_function(videoscale->sinkpad,videoscale_negotiate_sink); */
|
||||
gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->sinkpad);
|
||||
gst_pad_set_chain_function(videoscale->sinkpad,gst_videoscale_chain);
|
||||
gst_pad_set_connect_function(videoscale->sinkpad,gst_videoscale_sinkconnect);
|
||||
|
||||
videoscale->srcpad = gst_pad_new_from_template (
|
||||
GST_PADTEMPLATE_GET (src_templ), "src");
|
||||
GST_PAD_TEMPLATE_GET (src_templ), "src");
|
||||
/*gst_pad_set_negotiate_function(videoscale->srcpad,videoscale_negotiate_src); */
|
||||
gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->srcpad);
|
||||
|
||||
|
@ -343,12 +343,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the videoscale element */
|
||||
factory = gst_elementfactory_new("videoscale",GST_TYPE_VIDEOSCALE,
|
||||
factory = gst_element_factory_new("videoscale",GST_TYPE_VIDEOSCALE,
|
||||
&videoscale_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_templ));
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_templ));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_templ));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_templ));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ volume_sink_factory (void)
|
|||
static GstPadTemplate *template = NULL;
|
||||
|
||||
if (!template) {
|
||||
template = gst_padtemplate_new
|
||||
template = gst_pad_template_new
|
||||
("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
||||
gst_caps_append(gst_caps_new ("sink_int", "audio/raw",
|
||||
GST_AUDIO_INT_PAD_TEMPLATE_PROPS),
|
||||
|
@ -71,7 +71,7 @@ volume_src_factory (void)
|
|||
static GstPadTemplate *template = NULL;
|
||||
|
||||
if (!template)
|
||||
template = gst_padtemplate_new
|
||||
template = gst_pad_template_new
|
||||
("src", GST_PAD_SRC, GST_PAD_ALWAYS,
|
||||
gst_caps_append (gst_caps_new ("src_float", "audio/raw",
|
||||
GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS),
|
||||
|
@ -352,12 +352,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
{
|
||||
GstElementFactory *factory;
|
||||
|
||||
factory = gst_elementfactory_new("volume",GST_TYPE_VOLUME,
|
||||
factory = gst_element_factory_new("volume",GST_TYPE_VOLUME,
|
||||
&volume_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
gst_elementfactory_add_padtemplate (factory, volume_src_factory ());
|
||||
gst_elementfactory_add_padtemplate (factory, volume_sink_factory ());
|
||||
gst_element_factory_add_pad_template (factory, volume_src_factory ());
|
||||
gst_element_factory_add_pad_template (factory, volume_sink_factory ());
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
|
|
@ -616,7 +616,7 @@ plugin_init (GModule *module,
|
|||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the v4lelement */
|
||||
factory = gst_elementfactory_new("v4lelement", GST_TYPE_V4LELEMENT,
|
||||
factory = gst_element_factory_new("v4lelement", GST_TYPE_V4LELEMENT,
|
||||
&gst_v4lelement_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
|
|
@ -397,7 +397,7 @@ plugin_init (GModule *module,
|
|||
GstCaps *caps;
|
||||
|
||||
/* create an elementfactory for the v4lmjpegsink element */
|
||||
factory = gst_elementfactory_new("v4lmjpegsink",GST_TYPE_V4LMJPEGSINK,
|
||||
factory = gst_element_factory_new("v4lmjpegsink",GST_TYPE_V4LMJPEGSINK,
|
||||
&gst_v4lmjpegsink_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
|
@ -410,13 +410,13 @@ plugin_init (GModule *module,
|
|||
);
|
||||
capslist = gst_caps_append(capslist, caps);
|
||||
|
||||
sink_template = gst_padtemplate_new (
|
||||
sink_template = gst_pad_template_new (
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
capslist, NULL);
|
||||
|
||||
gst_elementfactory_add_padtemplate (factory, sink_template);
|
||||
gst_element_factory_add_pad_template (factory, sink_template);
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
|
|
@ -512,7 +512,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
GstCaps *caps;
|
||||
|
||||
/* create an elementfactory for the v4lmjpegsrcparse element */
|
||||
factory = gst_elementfactory_new("v4lmjpegsrc",GST_TYPE_V4LMJPEGSRC,
|
||||
factory = gst_element_factory_new("v4lmjpegsrc",GST_TYPE_V4LMJPEGSRC,
|
||||
&gst_v4lmjpegsrc_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
|
@ -525,13 +525,13 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
);
|
||||
capslist = gst_caps_append(capslist, caps);
|
||||
|
||||
src_template = gst_padtemplate_new (
|
||||
src_template = gst_pad_template_new (
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
capslist, NULL);
|
||||
|
||||
gst_elementfactory_add_padtemplate (factory, src_template);
|
||||
gst_element_factory_add_pad_template (factory, src_template);
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
|
|
@ -645,7 +645,7 @@ plugin_init (GModule *module,
|
|||
gint rgb_depth[4] = { 15, 16, 24, 32 };
|
||||
|
||||
/* create an elementfactory for the v4lsrc */
|
||||
factory = gst_elementfactory_new("v4lsrc",GST_TYPE_V4LSRC,
|
||||
factory = gst_element_factory_new("v4lsrc",GST_TYPE_V4LSRC,
|
||||
&gst_v4lsrc_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
|
@ -679,13 +679,13 @@ plugin_init (GModule *module,
|
|||
capslist = gst_caps_append(capslist, caps);
|
||||
}
|
||||
|
||||
src_template = gst_padtemplate_new (
|
||||
src_template = gst_pad_template_new (
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
capslist, NULL);
|
||||
|
||||
gst_elementfactory_add_padtemplate (factory, src_template);
|
||||
gst_element_factory_add_pad_template (factory, src_template);
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ main (int argc, char *argv[])
|
|||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
osssink = gst_elementfactory_make ("osssink", "osssink");
|
||||
osssink = gst_element_factory_make ("osssink", "osssink");
|
||||
g_assert (osssink != NULL);
|
||||
videosink = gst_elementfactory_make ("xvideosink", "videosink");
|
||||
videosink = gst_element_factory_make ("xvideosink", "videosink");
|
||||
g_assert (videosink != NULL);
|
||||
|
||||
testcaps = gst_caps_new ("test_caps",
|
||||
|
@ -28,7 +28,7 @@ main (int argc, char *argv[])
|
|||
"systemstream", GST_PROPS_BOOLEAN (TRUE),
|
||||
NULL));
|
||||
|
||||
autoplugger = gst_autoplugfactory_make ("static");
|
||||
autoplugger = gst_autoplug_factory_make ("static");
|
||||
|
||||
g_signal_connect (G_OBJECT (autoplugger), "new_object",
|
||||
G_CALLBACK (new_object_added), NULL);
|
||||
|
|
|
@ -19,7 +19,7 @@ main (int argc, char *argv[])
|
|||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
autoplug = gst_autoplugfactory_make ("static");
|
||||
autoplug = gst_autoplug_factory_make ("static");
|
||||
|
||||
g_print ("Autoplugging between audio/mp3 and audio/raw ...\n");
|
||||
if ((element = autoplug_caps (autoplug, "audio/mp3", "audio/raw")) == NULL)
|
||||
|
|
|
@ -11,10 +11,10 @@ main (int argc, char *argv[])
|
|||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
sink = gst_elementfactory_make ("osssink", "osssink");
|
||||
sink = gst_element_factory_make ("osssink", "osssink");
|
||||
g_assert (sink != NULL);
|
||||
|
||||
autoplug = gst_autoplugfactory_make ("staticrender");
|
||||
autoplug = gst_autoplug_factory_make ("staticrender");
|
||||
g_assert (autoplug != NULL);
|
||||
|
||||
element = gst_autoplug_to_renderers (autoplug,
|
||||
|
@ -30,7 +30,7 @@ main (int argc, char *argv[])
|
|||
pipeline = gst_pipeline_new ("main_pipeline");
|
||||
g_assert (pipeline != NULL);
|
||||
|
||||
filesrc = gst_elementfactory_make ("filesrc", "disk_reader");
|
||||
filesrc = gst_element_factory_make ("filesrc", "disk_reader");
|
||||
g_assert (filesrc != NULL);
|
||||
|
||||
gst_bin_add (GST_BIN (pipeline), filesrc);
|
||||
|
|
|
@ -10,11 +10,11 @@ main (int argc, char *argv[])
|
|||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
sink1 = gst_elementfactory_make ("videosink", "videosink");
|
||||
sink2 = gst_elementfactory_make ("osssink", "osssink");
|
||||
sink1 = gst_element_factory_make ("videosink", "videosink");
|
||||
sink2 = gst_element_factory_make ("osssink", "osssink");
|
||||
|
||||
autoplug = gst_autoplugfactory_make ("staticrender");
|
||||
autoplug2 = gst_autoplugfactory_make ("static");
|
||||
autoplug = gst_autoplug_factory_make ("staticrender");
|
||||
autoplug2 = gst_autoplug_factory_make ("static");
|
||||
|
||||
element = gst_autoplug_to_renderers (autoplug,
|
||||
gst_caps_new ("mp3caps", "audio/mp3", NULL), sink2, NULL);
|
||||
|
@ -80,8 +80,8 @@ main (int argc, char *argv[])
|
|||
xmlSaveFile ("autoplug3_6.gst", gst_xml_write (element));
|
||||
}
|
||||
|
||||
sink1 = gst_elementfactory_make ("videosink", "videosink");
|
||||
sink2 = gst_elementfactory_make ("osssink", "osssink");
|
||||
sink1 = gst_element_factory_make ("videosink", "videosink");
|
||||
sink2 = gst_element_factory_make ("osssink", "osssink");
|
||||
|
||||
element = gst_autoplug_to_renderers (autoplug,
|
||||
gst_caps_new(
|
||||
|
|
Loading…
Reference in a new issue