diff --git a/plugins/elements/gstcapsfilter.c b/plugins/elements/gstcapsfilter.c index 6d5d180b4c..26ae121e8b 100644 --- a/plugins/elements/gstcapsfilter.c +++ b/plugins/elements/gstcapsfilter.c @@ -145,10 +145,8 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass) "Generic", "Pass data without modification, limiting formats", "David Schleef "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); trans_class = GST_BASE_TRANSFORM_CLASS (klass); trans_class->transform_caps = diff --git a/plugins/elements/gstconcat.c b/plugins/elements/gstconcat.c index 5397c8e483..5b5b1b8866 100644 --- a/plugins/elements/gstconcat.c +++ b/plugins/elements/gstconcat.c @@ -95,14 +95,12 @@ gst_concat_pad_init (GstConcatPad * self) self->flushing = FALSE; } -static GstStaticPadTemplate concat_sink_template = -GST_STATIC_PAD_TEMPLATE ("sink_%u", +static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink_%u", GST_PAD_SINK, GST_PAD_REQUEST, GST_STATIC_CAPS_ANY); -static GstStaticPadTemplate concat_src_template = -GST_STATIC_PAD_TEMPLATE ("src", +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); @@ -178,10 +176,8 @@ gst_concat_class_init (GstConcatClass * klass) "Concat", "Generic", "Concatenate multiple streams", "Sebastian Dröge "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&concat_sink_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&concat_src_template)); + gst_element_class_add_static_pad_template (gstelement_class, &sink_template); + gst_element_class_add_static_pad_template (gstelement_class, &src_template); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_concat_request_new_pad); @@ -195,7 +191,7 @@ gst_concat_init (GstConcat * self) g_mutex_init (&self->lock); g_cond_init (&self->cond); - self->srcpad = gst_pad_new_from_static_template (&concat_src_template, "src"); + self->srcpad = gst_pad_new_from_static_template (&src_template, "src"); gst_pad_set_event_function (self->srcpad, GST_DEBUG_FUNCPTR (gst_concat_src_event)); gst_pad_set_query_function (self->srcpad, diff --git a/plugins/elements/gstdownloadbuffer.c b/plugins/elements/gstdownloadbuffer.c index 7be3afa2e6..37249aae20 100644 --- a/plugins/elements/gstdownloadbuffer.c +++ b/plugins/elements/gstdownloadbuffer.c @@ -271,10 +271,8 @@ gst_download_buffer_class_init (GstDownloadBufferClass * klass) /* set several parent class virtual functions */ gobject_class->finalize = gst_download_buffer_finalize; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gst_element_class_set_static_metadata (gstelement_class, "DownloadBuffer", "Generic", "Download Buffer element", diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index 2c6fdcbee6..c9c3e3a06b 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -224,8 +224,8 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass) "Erik Walthinsen , " "Wim Taymans , " "Mr. 'frag-me-more' Vanderwingo "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_fake_sink_change_state); diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index 5376ccb7ad..9d4041b6e2 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -340,8 +340,7 @@ gst_fake_src_class_init (GstFakeSrcClass * klass) "Source", "Push empty (no data) buffers around", "Erik Walthinsen , " "Wim Taymans "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); gstbase_src_class->is_seekable = GST_DEBUG_FUNCPTR (gst_fake_src_is_seekable); gstbase_src_class->start = GST_DEBUG_FUNCPTR (gst_fake_src_start); diff --git a/plugins/elements/gstfdsink.c b/plugins/elements/gstfdsink.c index 91d2175f67..47d243e45f 100644 --- a/plugins/elements/gstfdsink.c +++ b/plugins/elements/gstfdsink.c @@ -146,8 +146,7 @@ gst_fd_sink_class_init (GstFdSinkClass * klass) "Filedescriptor Sink", "Sink/File", "Write data to a file descriptor", "Erik Walthinsen "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_fd_sink_render); gstbasesink_class->render_list = GST_DEBUG_FUNCPTR (gst_fd_sink_render_list); diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c index 28156b2867..469a614238 100644 --- a/plugins/elements/gstfdsrc.c +++ b/plugins/elements/gstfdsrc.c @@ -174,8 +174,7 @@ gst_fd_src_class_init (GstFdSrcClass * klass) "Filedescriptor Source", "Source/File", "Read from a file descriptor", "Erik Walthinsen "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_fd_src_start); gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_fd_src_stop); diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index 273ca91d9d..1dfef07a2c 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -238,8 +238,7 @@ gst_file_sink_class_init (GstFileSinkClass * klass) "File Sink", "Sink/File", "Write stream to a file", "Thomas Vander Stichele "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_file_sink_start); gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_file_sink_stop); diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 117ded663d..42dda4cb49 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -196,8 +196,7 @@ gst_file_src_class_init (GstFileSrcClass * klass) "Source/File", "Read from arbitrary point in a file", "Erik Walthinsen "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_file_src_start); gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_file_src_stop); diff --git a/plugins/elements/gstfunnel.c b/plugins/elements/gstfunnel.c index c37ca75ebe..9895b7b6fd 100644 --- a/plugins/elements/gstfunnel.c +++ b/plugins/elements/gstfunnel.c @@ -95,14 +95,12 @@ gst_funnel_pad_init (GstFunnelPad * pad) pad->got_eos = FALSE; } -static GstStaticPadTemplate funnel_sink_template = -GST_STATIC_PAD_TEMPLATE ("sink_%u", +static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink_%u", GST_PAD_SINK, GST_PAD_REQUEST, GST_STATIC_CAPS_ANY); -static GstStaticPadTemplate funnel_src_template = -GST_STATIC_PAD_TEMPLATE ("src", +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); @@ -199,10 +197,8 @@ gst_funnel_class_init (GstFunnelClass * klass) "Funnel pipe fitting", "Generic", "N-to-1 pipe fitting", "Olivier Crete "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&funnel_sink_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&funnel_src_template)); + gst_element_class_add_static_pad_template (gstelement_class, &sink_template); + gst_element_class_add_static_pad_template (gstelement_class, &src_template); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_funnel_request_new_pad); @@ -213,8 +209,7 @@ gst_funnel_class_init (GstFunnelClass * klass) static void gst_funnel_init (GstFunnel * funnel) { - funnel->srcpad = gst_pad_new_from_static_template (&funnel_src_template, - "src"); + funnel->srcpad = gst_pad_new_from_static_template (&src_template, "src"); gst_pad_use_fixed_caps (funnel->srcpad); gst_element_add_pad (GST_ELEMENT (funnel), funnel->srcpad); diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index 98a38b1dd5..e05ff1e319 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -242,10 +242,8 @@ gst_identity_class_init (GstIdentityClass * klass) "Identity", "Generic", "Pass data without modification", "Erik Walthinsen "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_identity_change_state); diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c index 6eecfa0692..a0889a4f4f 100644 --- a/plugins/elements/gstinputselector.c +++ b/plugins/elements/gstinputselector.c @@ -1271,10 +1271,10 @@ gst_input_selector_class_init (GstInputSelectorClass * klass) "Julien Moutte , " "Jan Schmidt , " "Wim Taymans "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_input_selector_sink_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_input_selector_src_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_input_selector_sink_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_input_selector_src_factory); gstelement_class->request_new_pad = gst_input_selector_request_new_pad; gstelement_class->release_pad = gst_input_selector_release_pad; diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index 9437edc65b..73828f97ed 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -474,10 +474,8 @@ gst_multi_queue_class_init (GstMultiQueueClass * klass) gst_element_class_set_static_metadata (gstelement_class, "MultiQueue", "Generic", "Multiple data queue", "Edward Hervey "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_multi_queue_request_new_pad); diff --git a/plugins/elements/gstoutputselector.c b/plugins/elements/gstoutputselector.c index ab81d55ea1..15d5478077 100644 --- a/plugins/elements/gstoutputselector.c +++ b/plugins/elements/gstoutputselector.c @@ -135,10 +135,10 @@ gst_output_selector_class_init (GstOutputSelectorClass * klass) gst_element_class_set_static_metadata (gstelement_class, "Output selector", "Generic", "1-to-N output stream selector", "Stefan Kost "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_output_selector_sink_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_output_selector_src_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_output_selector_sink_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_output_selector_src_factory); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_output_selector_request_new_pad); diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index 72c915dc80..38f58d2ab0 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -407,10 +407,8 @@ gst_queue_class_init (GstQueueClass * klass) gst_element_class_set_static_metadata (gstelement_class, "Queue", "Generic", "Simple data queue", "Erik Walthinsen "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); /* Registering debug symbols for function pointers */ GST_DEBUG_REGISTER_FUNCPTR (gst_queue_src_activate_mode); diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index 67e3f277f2..6f463c2d57 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -410,10 +410,8 @@ gst_queue2_class_init (GstQueue2Class * klass) /* set several parent class virtual functions */ gobject_class->finalize = gst_queue2_finalize; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gst_element_class_set_static_metadata (gstelement_class, "Queue 2", "Generic", diff --git a/plugins/elements/gststreamiddemux.c b/plugins/elements/gststreamiddemux.c index 4ea2f80544..49fc290547 100644 --- a/plugins/elements/gststreamiddemux.c +++ b/plugins/elements/gststreamiddemux.c @@ -110,11 +110,11 @@ gst_streamid_demux_class_init (GstStreamidDemuxClass * klass) gst_element_class_set_static_metadata (gstelement_class, "Streamid Demux", "Generic", "1-to-N output stream by stream-id", "HoonHee Lee "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_streamid_demux_sink_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_streamid_demux_sink_factory); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_streamid_demux_src_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_streamid_demux_src_factory); gstelement_class->change_state = gst_streamid_demux_change_state; } diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index ab726cd1a9..78cbff7ade 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -99,8 +99,7 @@ enum PROP_ALLOW_NOT_LINKED, }; -static GstStaticPadTemplate tee_src_template = -GST_STATIC_PAD_TEMPLATE ("src_%u", +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src_%u", GST_PAD_SRC, GST_PAD_REQUEST, GST_STATIC_CAPS_ANY); @@ -290,10 +289,8 @@ gst_tee_class_init (GstTeeClass * klass) "Generic", "1-to-N pipe fitting", "Erik Walthinsen , " "Wim Taymans "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&tee_src_template)); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); + gst_element_class_add_static_pad_template (gstelement_class, &src_template); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_tee_request_new_pad); diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index 36ee2f4971..230cbed000 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -232,10 +232,10 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class) "Generic", "Finds the media type of a stream", "Benjamin Otte "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&type_find_element_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&type_find_element_sink_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &type_find_element_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &type_find_element_sink_template); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_type_find_element_change_state); diff --git a/plugins/elements/gstvalve.c b/plugins/elements/gstvalve.c index e4ef0a284b..82bdb94ad5 100644 --- a/plugins/elements/gstvalve.c +++ b/plugins/elements/gstvalve.c @@ -95,10 +95,8 @@ gst_valve_class_init (GstValveClass * klass) DEFAULT_DROP, G_PARAM_READWRITE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gst_element_class_set_static_metadata (gstelement_class, "Valve element", "Filter", "Drops buffers and events or lets them through",