gstreamer: use new gst_element_class_add_static_pad_template()

https://bugzilla.gnome.org/show_bug.cgi?id=763020
This commit is contained in:
Vineeth TM 2016-03-03 14:15:00 +09:00 committed by Sebastian Dröge
parent f87ec5e014
commit 8cc3e908c3
12 changed files with 27 additions and 35 deletions

View file

@ -51,7 +51,7 @@
*
* A padtemplate can be used to create a pad (see gst_pad_new_from_template()
* or gst_pad_new_from_static_template ()) or to add to an element class
* (see gst_element_class_add_pad_template ()).
* (see gst_element_class_add_static_pad_template ()).
*
* The following code example shows the code to create a pad from a padtemplate.
* |[<!-- language="C" -->
@ -82,8 +82,7 @@
* {
* GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
*
* gst_element_class_add_pad_template (gstelement_class,
* gst_static_pad_template_get (&amp;my_template));
* gst_element_class_add_static_pad_template (gstelement_class, &amp;my_template);
* }
* ]|
*/

View file

@ -45,8 +45,7 @@
*
* // sinktemplate should be a #GstStaticPadTemplate with direction
* // %GST_PAD_SINK and name "sink"
* gst_element_class_add_pad_template (gstelement_class,
* gst_static_pad_template_get (&amp;sinktemplate));
* gst_element_class_add_static_pad_template (gstelement_class, &amp;sinktemplate);
*
* gst_element_class_set_static_metadata (gstelement_class,
* "Sink name",

View file

@ -119,8 +119,7 @@
* GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
* // srctemplate should be a #GstStaticPadTemplate with direction
* // %GST_PAD_SRC and name "src"
* gst_element_class_add_pad_template (gstelement_class,
* gst_static_pad_template_get (&amp;srctemplate));
* gst_element_class_add_static_pad_template (gstelement_class, &amp;srctemplate);
*
* gst_element_class_set_static_metadata (gstelement_class,
* "Source name",

View file

@ -915,8 +915,7 @@ oob_source_class_init (OOBSourceClass * klass)
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GstPushSrcClass *pushsrc_class = GST_PUSH_SRC_CLASS (klass);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_add_static_pad_template (element_class, &sinktemplate);
pushsrc_class->create = GST_DEBUG_FUNCPTR (oob_source_create);
}

View file

@ -2546,8 +2546,8 @@ gst_proxytestelement_class_init (GstProxyTestElementClass * klass)
"Proxy Test Element", "Test", "Proxy test element",
"Thiago Santos <thiagoss@osg.samsung.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&proxytestelement_sink_template));
gst_element_class_add_static_pad_template (gstelement_class,
&proxytestelement_sink_template);
}
static void

View file

@ -81,8 +81,8 @@ gst_protection_test_base_init (GstProtectionTestClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_decrypt_sink_template));
gst_element_class_add_static_pad_template (element_class,
&gst_decrypt_sink_template);
gst_element_class_set_metadata (element_class,
"Decryptor element for unit tests",

View file

@ -1385,8 +1385,8 @@ gst_fakereqsink_class_init (GstFakeReqSinkClass * klass)
"Fake Request Sink", "Sink", "Fake sink with request pads",
"Sebastian Rasmussen <sebras@hotmail.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&fakereqsink_sink_template));
gst_element_class_add_static_pad_template (gstelement_class,
&fakereqsink_sink_template);
gstelement_class->request_new_pad = gst_fakereqsink_request_new_pad;
gstelement_class->release_pad = gst_fakereqsink_release_pad;
@ -1593,10 +1593,10 @@ gst_testpadreqsink_class_init (GstTestPadReqSinkClass * klass)
"Test Pad Request Sink", "Sink", "Sink for unit tests with request pads",
"Thiago Santos <thiagoss@osg.samsung.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&testpadreqsink_video_template));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&testpadreqsink_audio_template));
gst_element_class_add_static_pad_template (gstelement_class,
&testpadreqsink_video_template);
gst_element_class_add_static_pad_template (gstelement_class,
&testpadreqsink_audio_template);
gstelement_class->request_new_pad = gst_testpadreqsink_request_new_pad;
gstelement_class->release_pad = gst_testpadreqsink_release_pad;

View file

@ -118,10 +118,8 @@ gst_parser_tester_class_init (GstParserTesterClass * klass)
GST_PAD_SRC, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-test-custom"));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_templ));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_templ));
gst_element_class_add_static_pad_template (element_class, &sink_templ);
gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_element_class_set_metadata (element_class,
"ParserTester", "Parser/Video", "yep", "me");

View file

@ -217,10 +217,10 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
gobject_class->dispose = gst_aggregator_dispose;
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_aggregator_src_template));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_aggregator_sink_template));
gst_element_class_add_static_pad_template (gstelement_class,
&gst_aggregator_src_template);
gst_element_class_add_static_pad_template (gstelement_class,
&gst_aggregator_sink_template);
gst_element_class_set_static_metadata (gstelement_class, "Aggregator",
"Testing", "Combine N buffers", "Stefan Sauer <ensonic@users.sf.net>");

View file

@ -89,10 +89,8 @@ gst_test_trans_class_init (GstTestTransClass * klass)
gst_element_class_set_metadata (element_class, "TestTrans",
"Filter/Test", "Test transform", "Wim Taymans <wim.taymans@gmail.com>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (src_template));
gst_element_class_add_static_pad_template (element_class, sink_template);
gst_element_class_add_static_pad_template (element_class, src_template);
trans_class->passthrough_on_same_caps = klass_passthrough_on_same_caps;
if (klass_transform_ip != NULL)

View file

@ -546,8 +546,8 @@ gst_parse_test_element_class_init (GstParseTestElementClass * klass)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&test_element_pad_template));
gst_element_class_add_static_pad_template (gstelement_class,
&test_element_pad_template);
gst_element_class_set_metadata (gstelement_class,
"Test element for parse launch tests", "Source",

View file

@ -75,8 +75,8 @@ timed_test_src_class_init (TimedTestSrcClass * klass)
gstbasesrc_class->stop = timed_test_src_stop;
gstbasesrc_class->create = timed_test_src_create;
gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
gst_static_pad_template_get (&timed_test_src_src_template));
gst_element_class_add_static_pad_template (GST_ELEMENT_CLASS (klass),
&timed_test_src_src_template);
}
static void