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
a230672f1b
commit
1f45cc0b2b
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);
|
||||
|
||||
|
@ -54,7 +54,7 @@ enum
|
||||
* "audio/a52" and "audio/ac3" are the same format. The name
|
||||
* "ac3" is now deprecated and should not be used in new code.
|
||||
*/
|
||||
GST_PADTEMPLATE_FACTORY (sink_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (sink_factory,
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -70,7 +70,7 @@ GST_PADTEMPLATE_FACTORY (sink_factory,
|
||||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (src_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (src_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -148,11 +148,11 @@ static void
|
||||
gst_a52dec_init (GstA52Dec * a52dec)
|
||||
{
|
||||
/* create the sink and src pads */
|
||||
a52dec->sinkpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (sink_factory), "sink");
|
||||
a52dec->sinkpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (sink_factory), "sink");
|
||||
gst_element_add_pad (GST_ELEMENT (a52dec), a52dec->sinkpad);
|
||||
gst_element_set_loop_function ((GstElement *) a52dec, gst_a52dec_loop);
|
||||
|
||||
a52dec->srcpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (src_factory), "src");
|
||||
a52dec->srcpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (src_factory), "src");
|
||||
gst_element_add_pad (GST_ELEMENT (a52dec), a52dec->srcpad);
|
||||
|
||||
a52dec->dynamic_range_compression = FALSE;
|
||||
@ -444,7 +444,7 @@ gst_a52dec_loop (GstElement *element)
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (a52_block (a52dec->state)) {
|
||||
gst_element_info (element, "a52dec a52_block error %d\n", i);
|
||||
g_warning ("a52dec a52_block error %d\n", i);
|
||||
continue;
|
||||
}
|
||||
/* push on */
|
||||
@ -548,11 +548,11 @@ plugin_init (GModule * module, GstPlugin * plugin)
|
||||
}
|
||||
|
||||
/* create an elementfactory for the a52dec element */
|
||||
factory = gst_elementfactory_new ("a52dec", GST_TYPE_A52DEC, &gst_a52dec_details);
|
||||
factory = gst_element_factory_new ("a52dec", GST_TYPE_A52DEC, &gst_a52dec_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 (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 (sink_factory));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
@ -53,15 +53,15 @@ int main(int argc,char *argv[]) {
|
||||
pipeline = GST_PIPELINE(gst_pipeline_new("pipeline"));
|
||||
g_return_val_if_fail(pipeline != NULL, -1);
|
||||
|
||||
src = gst_elementfactory_make("dvdsrc","src");
|
||||
src = gst_element_factory_make("dvdsrc","src");
|
||||
g_return_val_if_fail(src != NULL, -1);
|
||||
gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL);
|
||||
gtk_object_set(GTK_OBJECT(src),"title",atoi(argv[2]),NULL);
|
||||
gtk_object_set(GTK_OBJECT(src),"chapter",atoi(argv[3]),NULL);
|
||||
gtk_object_set(GTK_OBJECT(src),"angle",atoi(argv[4]),NULL);
|
||||
|
||||
parse = gst_elementfactory_make("mpeg2parse","parse");
|
||||
/*parse = gst_elementfactory_make("mpeg1parse","parse"); */
|
||||
parse = gst_element_factory_make("mpeg2parse","parse");
|
||||
/*parse = gst_element_factory_make("mpeg1parse","parse"); */
|
||||
g_return_val_if_fail(parse != NULL, -1);
|
||||
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src));
|
||||
@ -74,16 +74,16 @@ int main(int argc,char *argv[]) {
|
||||
v_thread = GST_ELEMENT(gst_thread_new("v_thread"));
|
||||
g_return_val_if_fail(v_thread != NULL, -1);
|
||||
|
||||
v_queue = gst_elementfactory_make("queue","v_queue");
|
||||
v_queue = gst_element_factory_make("queue","v_queue");
|
||||
g_return_val_if_fail(v_queue != NULL, -1);
|
||||
|
||||
v_decode = gst_elementfactory_make("mpeg2dec","decode_video");
|
||||
v_decode = gst_element_factory_make("mpeg2dec","decode_video");
|
||||
g_return_val_if_fail(v_decode != NULL, -1);
|
||||
|
||||
color = gst_elementfactory_make("colorspace","color");
|
||||
color = gst_element_factory_make("colorspace","color");
|
||||
g_return_val_if_fail(color != NULL, -1);
|
||||
|
||||
show = gst_elementfactory_make("xvideosink","show");
|
||||
show = gst_element_factory_make("xvideosink","show");
|
||||
g_return_val_if_fail(show != NULL, -1);
|
||||
|
||||
gst_bin_add(GST_BIN(v_thread),GST_ELEMENT(v_queue));
|
||||
@ -100,13 +100,13 @@ int main(int argc,char *argv[]) {
|
||||
a_thread = GST_ELEMENT(gst_thread_new("a_thread"));
|
||||
g_return_val_if_fail(a_thread != NULL, -1);
|
||||
|
||||
a_queue = gst_elementfactory_make("queue","a_queue");
|
||||
a_queue = gst_element_factory_make("queue","a_queue");
|
||||
g_return_val_if_fail(a_queue != NULL, -1);
|
||||
|
||||
a_decode = gst_elementfactory_make("a52dec","decode_audio");
|
||||
a_decode = gst_element_factory_make("a52dec","decode_audio");
|
||||
g_return_val_if_fail(a_decode != NULL, -1);
|
||||
|
||||
osssink = gst_elementfactory_make("osssink","osssink");
|
||||
osssink = gst_element_factory_make("osssink","osssink");
|
||||
g_return_val_if_fail(osssink != NULL, -1);
|
||||
|
||||
gst_bin_add(GST_BIN(a_thread),GST_ELEMENT(a_queue));
|
||||
|
@ -772,7 +772,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the dvdsrc element */
|
||||
factory = gst_elementfactory_new ("dvdsrc", GST_TYPE_DVDSRC,
|
||||
factory = gst_element_factory_new ("dvdsrc", GST_TYPE_DVDSRC,
|
||||
&dvdsrc_details);
|
||||
g_return_val_if_fail (factory != NULL, FALSE);
|
||||
|
||||
|
@ -45,7 +45,7 @@ static GstElementDetails gst_lame_details =
|
||||
"(C) 2000",
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (gst_lame_sink_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (gst_lame_sink_factory,
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -70,7 +70,7 @@ GST_PADTEMPLATE_FACTORY (gst_lame_sink_factory,
|
||||
)
|
||||
)
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (gst_lame_src_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (gst_lame_src_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -391,12 +391,12 @@ gst_lame_init (GstLame *lame)
|
||||
{
|
||||
GST_DEBUG_ENTER ("(\"%s\")", gst_element_get_name (GST_ELEMENT (lame)));
|
||||
|
||||
lame->sinkpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (gst_lame_sink_factory), "sink");
|
||||
lame->sinkpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (gst_lame_sink_factory), "sink");
|
||||
gst_element_add_pad (GST_ELEMENT (lame), lame->sinkpad);
|
||||
gst_pad_set_chain_function (lame->sinkpad, gst_lame_chain);
|
||||
gst_pad_set_connect_function (lame->sinkpad, gst_lame_sinkconnect);
|
||||
|
||||
lame->srcpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (gst_lame_src_factory), "src");
|
||||
lame->srcpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (gst_lame_src_factory), "src");
|
||||
gst_element_add_pad (GST_ELEMENT (lame), lame->srcpad);
|
||||
|
||||
GST_FLAG_SET (lame, GST_ELEMENT_EVENT_AWARE);
|
||||
@ -848,17 +848,17 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the gst_lame element */
|
||||
factory = gst_elementfactory_new ("lame", GST_TYPE_LAME,
|
||||
factory = gst_element_factory_new ("lame", GST_TYPE_LAME,
|
||||
&gst_lame_details);
|
||||
g_return_val_if_fail (factory != NULL, FALSE);
|
||||
|
||||
/* register the source's padtemplate */
|
||||
gst_elementfactory_add_padtemplate (factory,
|
||||
GST_PADTEMPLATE_GET (gst_lame_src_factory));
|
||||
gst_element_factory_add_pad_template (factory,
|
||||
GST_PAD_TEMPLATE_GET (gst_lame_src_factory));
|
||||
|
||||
/* register the sink's padtemplate */
|
||||
gst_elementfactory_add_padtemplate (factory,
|
||||
GST_PADTEMPLATE_GET (gst_lame_sink_factory));
|
||||
gst_element_factory_add_pad_template (factory,
|
||||
GST_PAD_TEMPLATE_GET (gst_lame_sink_factory));
|
||||
|
||||
/* and add the gst_lame element factory to the plugin */
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
@ -29,13 +29,13 @@ main (int argc, char *argv[])
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
/* create elements */
|
||||
if (!(pipeline = gst_elementfactory_make ("pipeline", "pipeline"))) return 1;
|
||||
if (!(src = gst_elementfactory_make ("fakesrc", "source"))) return 1;
|
||||
if (!(tee = gst_elementfactory_make ("tee", "tee"))) return 1;
|
||||
if (!(encoder1 = gst_elementfactory_make ("lame", "lame1"))) return 1;
|
||||
if (!(encoder2 = gst_elementfactory_make ("lame", "lame2"))) return 1;
|
||||
if (!(sink1 = gst_elementfactory_make ("fakesink", "sink1"))) return 1;
|
||||
if (!(sink2 = gst_elementfactory_make ("fakesink", "sink2"))) return 1;
|
||||
if (!(pipeline = gst_element_factory_make ("pipeline", "pipeline"))) return 1;
|
||||
if (!(src = gst_element_factory_make ("fakesrc", "source"))) return 1;
|
||||
if (!(tee = gst_element_factory_make ("tee", "tee"))) return 1;
|
||||
if (!(encoder1 = gst_element_factory_make ("lame", "lame1"))) return 1;
|
||||
if (!(encoder2 = gst_element_factory_make ("lame", "lame2"))) return 1;
|
||||
if (!(sink1 = gst_element_factory_make ("fakesink", "sink1"))) return 1;
|
||||
if (!(sink2 = gst_element_factory_make ("fakesink", "sink2"))) return 1;
|
||||
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
g_signal_connect (pipeline, "error", G_CALLBACK (error_callback), NULL);
|
||||
|
@ -102,7 +102,7 @@ enum {
|
||||
/* FILL ME */
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (mad_src_template_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (mad_src_template_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -120,7 +120,7 @@ GST_PADTEMPLATE_FACTORY (mad_src_template_factory,
|
||||
)
|
||||
)
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (mad_sink_template_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (mad_sink_template_factory,
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -226,12 +226,12 @@ gst_mad_init (GstMad *mad)
|
||||
{
|
||||
/* create the sink and src pads */
|
||||
mad->sinkpad = gst_pad_new_from_template(
|
||||
GST_PADTEMPLATE_GET (mad_sink_template_factory), "sink");
|
||||
GST_PAD_TEMPLATE_GET (mad_sink_template_factory), "sink");
|
||||
gst_element_add_pad(GST_ELEMENT(mad),mad->sinkpad);
|
||||
gst_pad_set_chain_function (mad->sinkpad, GST_DEBUG_FUNCPTR(gst_mad_chain));
|
||||
|
||||
mad->srcpad = gst_pad_new_from_template(
|
||||
GST_PADTEMPLATE_GET (mad_src_template_factory), "src");
|
||||
GST_PAD_TEMPLATE_GET (mad_src_template_factory), "src");
|
||||
gst_element_add_pad(GST_ELEMENT(mad),mad->srcpad);
|
||||
gst_pad_set_event_function (mad->srcpad, GST_DEBUG_FUNCPTR(gst_mad_src_event));
|
||||
|
||||
@ -593,14 +593,14 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the mad element */
|
||||
factory = gst_elementfactory_new("mad",GST_TYPE_MAD,
|
||||
factory = gst_element_factory_new("mad",GST_TYPE_MAD,
|
||||
&gst_mad_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
gst_elementfactory_add_padtemplate (factory,
|
||||
GST_PADTEMPLATE_GET (mad_sink_template_factory));
|
||||
gst_elementfactory_add_padtemplate (factory,
|
||||
GST_PADTEMPLATE_GET (mad_src_template_factory));
|
||||
gst_element_factory_add_pad_template (factory,
|
||||
GST_PAD_TEMPLATE_GET (mad_sink_template_factory));
|
||||
gst_element_factory_add_pad_template (factory,
|
||||
GST_PAD_TEMPLATE_GET (mad_src_template_factory));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
@ -67,7 +67,7 @@ static double video_rates[16] =
|
||||
0
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (src_template_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (src_template_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -80,7 +80,7 @@ GST_PADTEMPLATE_FACTORY (src_template_factory,
|
||||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (sink_template_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (sink_template_factory,
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -406,12 +406,12 @@ gst_mpeg2dec_init (GstMpeg2dec *mpeg2dec)
|
||||
|
||||
/* create the sink and src pads */
|
||||
mpeg2dec->sinkpad = gst_pad_new_from_template (
|
||||
GST_PADTEMPLATE_GET (sink_template_factory), "sink");
|
||||
GST_PAD_TEMPLATE_GET (sink_template_factory), "sink");
|
||||
gst_element_add_pad (GST_ELEMENT (mpeg2dec), mpeg2dec->sinkpad);
|
||||
gst_pad_set_chain_function (mpeg2dec->sinkpad, gst_mpeg2dec_chain);
|
||||
|
||||
mpeg2dec->srcpad = gst_pad_new_from_template (
|
||||
GST_PADTEMPLATE_GET (src_template_factory), "src");
|
||||
GST_PAD_TEMPLATE_GET (src_template_factory), "src");
|
||||
gst_element_add_pad (GST_ELEMENT (mpeg2dec), mpeg2dec->srcpad);
|
||||
|
||||
/* initialize the mpeg2dec decoder state */
|
||||
@ -609,12 +609,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the mpeg2dec element */
|
||||
factory = gst_elementfactory_new("mpeg2dec",GST_TYPE_MPEG2DEC,
|
||||
factory = gst_element_factory_new("mpeg2dec",GST_TYPE_MPEG2DEC,
|
||||
&gst_mpeg2dec_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_template_factory));
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_template_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_template_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_template_factory));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
@ -64,7 +64,7 @@ enum {
|
||||
/* FILL ME */
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (sink_templ,
|
||||
GST_PAD_TEMPLATE_FACTORY (sink_templ,
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -75,7 +75,7 @@ GST_PADTEMPLATE_FACTORY (sink_templ,
|
||||
)
|
||||
)
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (src_templ,
|
||||
GST_PAD_TEMPLATE_FACTORY (src_templ,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -299,11 +299,11 @@ static void
|
||||
gst_siddec_init (GstSidDec *siddec)
|
||||
{
|
||||
siddec->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 (siddec), siddec->sinkpad);
|
||||
|
||||
siddec->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 (siddec), siddec->srcpad);
|
||||
|
||||
gst_element_set_loop_function (GST_ELEMENT (siddec), gst_siddec_loop);
|
||||
@ -513,14 +513,14 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||
GstTypeFactory *type;
|
||||
|
||||
/* create an elementfactory for the avi_demux element */
|
||||
factory = gst_elementfactory_new ("siddec",GST_TYPE_SIDDEC,
|
||||
factory = gst_element_factory_new ("siddec",GST_TYPE_SIDDEC,
|
||||
&gst_siddec_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 (&siddefinition);
|
||||
type = gst_type_factory_new (&siddefinition);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
@ -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),
|
||||
|
@ -95,7 +95,7 @@ static GstPadTemplate*
|
||||
src_factory (void)
|
||||
{
|
||||
return
|
||||
gst_padtemplate_new (
|
||||
gst_pad_template_new (
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -112,7 +112,7 @@ static GstPadTemplate*
|
||||
sink_factory (void)
|
||||
{
|
||||
return
|
||||
gst_padtemplate_new (
|
||||
gst_pad_template_new (
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -325,15 +325,15 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the ac3parse element */
|
||||
factory = gst_elementfactory_new("ac3parse",GST_TYPE_AC3PARSE,
|
||||
factory = gst_element_factory_new("ac3parse",GST_TYPE_AC3PARSE,
|
||||
&ac3parse_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
src_template = src_factory ();
|
||||
gst_elementfactory_add_padtemplate (factory, src_template);
|
||||
gst_element_factory_add_pad_template (factory, src_template);
|
||||
|
||||
sink_template = sink_factory ();
|
||||
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));
|
||||
|
||||
|
@ -21,15 +21,15 @@
|
||||
#include <gst/gst.h>
|
||||
#include <string.h> /* memcmp */
|
||||
|
||||
static GstCaps* mp3_typefind(GstBuffer *buf, gpointer private);
|
||||
static GstCaps* mp3_type_find(GstBuffer *buf, gpointer private);
|
||||
|
||||
static GstTypeDefinition mp3type_definitions[] = {
|
||||
{ "mp3types_audio/mp3", "audio/mp3", ".mp3 .mp2 .mp1 .mpga", mp3_typefind },
|
||||
{ "mp3types_audio/mp3", "audio/mp3", ".mp3 .mp2 .mp1 .mpga", mp3_type_find },
|
||||
{ NULL, NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
static GstCaps*
|
||||
mp3_typefind(GstBuffer *buf, gpointer private)
|
||||
mp3_type_find(GstBuffer *buf, gpointer private)
|
||||
{
|
||||
gchar *data;
|
||||
gulong head;
|
||||
@ -74,7 +74,7 @@ mp3_typefind(GstBuffer *buf, gpointer private)
|
||||
if (((head >> 10) & 0x3) == 0x3)
|
||||
return NULL;
|
||||
|
||||
caps = gst_caps_new ("mp3_typefind", "audio/mp3", NULL);
|
||||
caps = gst_caps_new ("mp3_type_find", "audio/mp3", NULL);
|
||||
/* gst_caps_set(caps,"layer",GST_PROPS_INT(4-((head>>17)&0x3))); */
|
||||
|
||||
return caps;
|
||||
@ -88,7 +88,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||
while (mp3type_definitions[i].name) {
|
||||
GstTypeFactory *type;
|
||||
|
||||
type = gst_typefactory_new (&mp3type_definitions[i]);
|
||||
type = gst_type_factory_new (&mp3type_definitions[i]);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
|
||||
i++;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ static GstPadTemplate*
|
||||
mp3_src_factory (void)
|
||||
{
|
||||
return
|
||||
gst_padtemplate_new (
|
||||
gst_pad_template_new (
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -56,7 +56,7 @@ static GstPadTemplate*
|
||||
mp3_sink_factory (void)
|
||||
{
|
||||
return
|
||||
gst_padtemplate_new (
|
||||
gst_pad_template_new (
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -480,16 +480,16 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the mp3parse element */
|
||||
factory = gst_elementfactory_new ("mp3parse",
|
||||
factory = gst_element_factory_new ("mp3parse",
|
||||
GST_TYPE_MP3PARSE,
|
||||
&mp3parse_details);
|
||||
g_return_val_if_fail (factory != NULL, FALSE);
|
||||
|
||||
sink_temp = mp3_sink_factory ();
|
||||
gst_elementfactory_add_padtemplate (factory, sink_temp);
|
||||
gst_element_factory_add_pad_template (factory, sink_temp);
|
||||
|
||||
src_temp = mp3_src_factory ();
|
||||
gst_elementfactory_add_padtemplate (factory, src_temp);
|
||||
gst_element_factory_add_pad_template (factory, src_temp);
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
@ -45,7 +45,7 @@ enum {
|
||||
/* FILL ME */
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (sink_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (sink_factory,
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -57,7 +57,7 @@ GST_PADTEMPLATE_FACTORY (sink_factory,
|
||||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (audio_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (audio_factory,
|
||||
"audio_[1-32]",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
@ -68,7 +68,7 @@ GST_PADTEMPLATE_FACTORY (audio_factory,
|
||||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (video_mpeg1_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (video_mpeg1_factory,
|
||||
"video_[0-15]",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
@ -80,7 +80,7 @@ GST_PADTEMPLATE_FACTORY (video_mpeg1_factory,
|
||||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (video_mpeg2_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (video_mpeg2_factory,
|
||||
"video_[0-15]",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
@ -93,7 +93,7 @@ GST_PADTEMPLATE_FACTORY (video_mpeg2_factory,
|
||||
);
|
||||
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (private1_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (private1_factory,
|
||||
"private_stream_1.[0-7]",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
@ -104,7 +104,7 @@ GST_PADTEMPLATE_FACTORY (private1_factory,
|
||||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (private2_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (private2_factory,
|
||||
"private_stream_2",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
@ -115,7 +115,7 @@ GST_PADTEMPLATE_FACTORY (private2_factory,
|
||||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (subtitle_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (subtitle_factory,
|
||||
"subtitle_stream_[0-15]",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
@ -192,7 +192,7 @@ gst_mpeg_demux_init (GstMPEGDemux *mpeg_demux)
|
||||
|
||||
gst_element_remove_pad (GST_ELEMENT (mpeg_parse), mpeg_parse->sinkpad);
|
||||
mpeg_parse->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 (mpeg_parse), mpeg_parse->sinkpad);
|
||||
gst_element_remove_pad (GST_ELEMENT (mpeg_parse), mpeg_parse->srcpad);
|
||||
|
||||
@ -328,14 +328,14 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
||||
name = g_strdup_printf ("private_stream_2");
|
||||
stream_num = 0;
|
||||
outpad = &mpeg_demux->private_2_pad;
|
||||
newtemp = GST_PADTEMPLATE_GET (private2_factory);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (private2_factory);
|
||||
}
|
||||
/* Audio */
|
||||
else if ((stream_id >= 0xC0) && (stream_id <= 0xDF)) {
|
||||
name = g_strdup_printf ("audio_%02d", stream_id & 0x1F);
|
||||
stream_num = stream_id & 0x1F;
|
||||
outpad = &mpeg_demux->audio_pad[stream_num];
|
||||
newtemp = GST_PADTEMPLATE_GET (audio_factory);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (audio_factory);
|
||||
}
|
||||
/* Video */
|
||||
else if ((stream_id >= 0xE0) && (stream_id <= 0xEF)) {
|
||||
@ -343,10 +343,10 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
||||
stream_num = stream_id & 0x0F;
|
||||
outpad = &mpeg_demux->video_pad[stream_num];
|
||||
if (!GST_MPEG_PARSE_IS_MPEG2 (mpeg_demux)) {
|
||||
newtemp = GST_PADTEMPLATE_GET (video_mpeg1_factory);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (video_mpeg1_factory);
|
||||
}
|
||||
else {
|
||||
newtemp = GST_PADTEMPLATE_GET (video_mpeg2_factory);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (video_mpeg2_factory);
|
||||
}
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
||||
*/
|
||||
if (outpad && *outpad == NULL) {
|
||||
*outpad = gst_pad_new_from_template (newtemp, name);
|
||||
gst_pad_try_set_caps (*outpad, gst_pad_get_padtemplate_caps (*outpad));
|
||||
gst_pad_try_set_caps (*outpad, gst_pad_get_pad_template_caps (*outpad));
|
||||
gst_element_add_pad (GST_ELEMENT (mpeg_demux), (*outpad));
|
||||
}
|
||||
else {
|
||||
@ -717,11 +717,11 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
||||
if (id == 0xBD) {
|
||||
if (ps_id_code >= 0x80 && ps_id_code <= 0x87) {
|
||||
name = g_strdup_printf("private_stream_1.%d",ps_id_code - 0x80);
|
||||
newtemp = GST_PADTEMPLATE_GET (private1_factory);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (private1_factory);
|
||||
}
|
||||
else if (ps_id_code >= 0x20 && ps_id_code <= 0x2f) {
|
||||
name = g_strdup_printf("subtitle_stream_%d",ps_id_code - 0x20);
|
||||
newtemp = GST_PADTEMPLATE_GET (subtitle_factory);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (subtitle_factory);
|
||||
}
|
||||
else {
|
||||
name = g_strdup_printf("unknown_stream_%d",ps_id_code);
|
||||
@ -729,15 +729,15 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
||||
}
|
||||
else if (id == 0xBF) {
|
||||
name = g_strdup ("private_stream_2");
|
||||
newtemp = GST_PADTEMPLATE_GET (private2_factory);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (private2_factory);
|
||||
}
|
||||
else if ((id >= 0xC0) && (id <= 0xDF)) {
|
||||
name = g_strdup_printf("audio_%02d",id - 0xC0);
|
||||
newtemp = GST_PADTEMPLATE_GET (audio_factory);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (audio_factory);
|
||||
}
|
||||
else if ((id >= 0xE0) && (id <= 0xEF)) {
|
||||
name = g_strdup_printf("video_%02d",id - 0xE0);
|
||||
newtemp = GST_PADTEMPLATE_GET (video_mpeg2_factory);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (video_mpeg2_factory);
|
||||
}
|
||||
else {
|
||||
name = g_strdup_printf("unknown");
|
||||
@ -746,7 +746,7 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
||||
if (newtemp) {
|
||||
/* create the pad and add it to self */
|
||||
(*outpad) = gst_pad_new_from_template (newtemp, name);
|
||||
gst_pad_try_set_caps ((*outpad), gst_pad_get_padtemplate_caps (*outpad));
|
||||
gst_pad_try_set_caps ((*outpad), gst_pad_get_pad_template_caps (*outpad));
|
||||
gst_element_add_pad(GST_ELEMENT(mpeg_demux),(*outpad));
|
||||
}
|
||||
else {
|
||||
@ -813,17 +813,17 @@ gst_mpeg_demux_plugin_init (GModule *module, GstPlugin *plugin)
|
||||
}
|
||||
|
||||
/* create an elementfactory for the mpeg_demux element */
|
||||
factory = gst_elementfactory_new ("mpegdemux", GST_TYPE_MPEG_DEMUX,
|
||||
factory = gst_element_factory_new ("mpegdemux", GST_TYPE_MPEG_DEMUX,
|
||||
&mpeg_demux_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 (video_mpeg1_factory));
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (video_mpeg2_factory));
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (private1_factory));
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (private2_factory));
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (subtitle_factory));
|
||||
gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (audio_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 (video_mpeg1_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (video_mpeg2_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (private1_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (private2_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (subtitle_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (audio_factory));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
@ -47,7 +47,7 @@ enum {
|
||||
/* FILL ME */
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (sink_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (sink_factory,
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -59,7 +59,7 @@ GST_PADTEMPLATE_FACTORY (sink_factory,
|
||||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (src_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (src_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -143,11 +143,11 @@ static void
|
||||
gst_mpeg_parse_init (GstMPEGParse *mpeg_parse)
|
||||
{
|
||||
mpeg_parse->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(mpeg_parse),mpeg_parse->sinkpad);
|
||||
gst_element_set_loop_function (GST_ELEMENT (mpeg_parse), gst_mpeg_parse_loop);
|
||||
mpeg_parse->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(mpeg_parse),mpeg_parse->srcpad);
|
||||
|
||||
/* initialize parser state */
|
||||
@ -357,12 +357,12 @@ gst_mpeg_parse_plugin_init (GModule *module, GstPlugin *plugin)
|
||||
}
|
||||
|
||||
/* create an elementfactory for the mpeg_parse element */
|
||||
factory = gst_elementfactory_new("mpegparse",GST_TYPE_MPEG_PARSE,
|
||||
factory = gst_element_factory_new("mpegparse",GST_TYPE_MPEG_PARSE,
|
||||
&mpeg_parse_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 (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 (sink_factory));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
@ -46,7 +46,7 @@ enum {
|
||||
/* FILL ME */
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (sink_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (sink_factory,
|
||||
"sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -58,7 +58,7 @@ GST_PADTEMPLATE_FACTORY (sink_factory,
|
||||
)
|
||||
);
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (src_factory,
|
||||
GST_PAD_TEMPLATE_FACTORY (src_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
@ -131,11 +131,11 @@ static void
|
||||
gst_rfc2250_enc_init (GstRFC2250Enc *rfc2250_enc)
|
||||
{
|
||||
rfc2250_enc->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(rfc2250_enc),rfc2250_enc->sinkpad);
|
||||
gst_element_set_loop_function (GST_ELEMENT (rfc2250_enc), gst_rfc2250_enc_loop);
|
||||
rfc2250_enc->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(rfc2250_enc),rfc2250_enc->srcpad);
|
||||
|
||||
/* initialize parser state */
|
||||
@ -330,12 +330,12 @@ gst_rfc2250_enc_plugin_init (GModule *module, GstPlugin *plugin)
|
||||
}
|
||||
|
||||
/* create an elementfactory for the rfc2250_enc element */
|
||||
factory = gst_elementfactory_new("rfc2250enc",GST_TYPE_RFC2250_ENC,
|
||||
factory = gst_element_factory_new("rfc2250enc",GST_TYPE_RFC2250_ENC,
|
||||
&rfc2250_enc_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 (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 (sink_factory));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
|
@ -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_synaesthesia_init (GstSynaesthesia *synaesthesia)
|
||||
{
|
||||
/* create the sink and src pads */
|
||||
synaesthesia->sinkpad = gst_pad_new_from_template (
|
||||
GST_PADTEMPLATE_GET (sink_template ), "sink");
|
||||
GST_PAD_TEMPLATE_GET (sink_template ), "sink");
|
||||
synaesthesia->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 (synaesthesia), synaesthesia->sinkpad);
|
||||
gst_element_add_pad (GST_ELEMENT (synaesthesia), synaesthesia->srcpad);
|
||||
|
||||
@ -347,12 +347,12 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the synaesthesia element */
|
||||
factory = gst_elementfactory_new("synaesthesia",GST_TYPE_SYNAESTHESIA,
|
||||
factory = gst_element_factory_new("synaesthesia",GST_TYPE_SYNAESTHESIA,
|
||||
&gst_synaesthesia_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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user