From a53fe6571b5796179bf63b6c0b55f7fbfe08c8a8 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 25 Nov 2003 08:57:17 +0000 Subject: [PATCH] Switch everything to static pad templates Original commit message from CVS: Switch everything to static pad templates --- gst/elements/gstaggregator.c | 7 ++++--- gst/elements/gstfakesink.c | 8 +++++--- gst/elements/gstfakesrc.c | 8 +++++--- gst/elements/gstmd5sink.c | 11 +++++++---- gst/elements/gstshaper.c | 21 +++++++++++++-------- gst/elements/gsttee.c | 7 ++++--- gst/elements/gsttypefind.c | 13 +++++++------ gst/elements/gsttypefindelement.c | 13 +++++++------ plugins/elements/gstaggregator.c | 7 ++++--- plugins/elements/gstfakesink.c | 8 +++++--- plugins/elements/gstfakesrc.c | 8 +++++--- plugins/elements/gstmd5sink.c | 11 +++++++---- plugins/elements/gstshaper.c | 21 +++++++++++++-------- plugins/elements/gsttee.c | 7 ++++--- plugins/elements/gsttypefind.c | 13 +++++++------ plugins/elements/gsttypefindelement.c | 13 +++++++------ 16 files changed, 104 insertions(+), 72 deletions(-) diff --git a/gst/elements/gstaggregator.c b/gst/elements/gstaggregator.c index 53aabc1aa7..b1be5809ea 100644 --- a/gst/elements/gstaggregator.c +++ b/gst/elements/gstaggregator.c @@ -51,11 +51,11 @@ enum { /* FILL ME */ }; -GST_PAD_TEMPLATE_FACTORY (aggregator_src_factory, +GstStaticPadTemplate aggregator_src_template = GST_STATIC_PAD_TEMPLATE ( "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); #define GST_TYPE_AGGREGATOR_SCHED (gst_aggregator_sched_get_type()) @@ -124,7 +124,8 @@ static void gst_aggregator_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (aggregator_src_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&aggregator_src_template)); gst_element_class_set_details (gstelement_class, &gst_aggregator_details); } static void diff --git a/gst/elements/gstfakesink.c b/gst/elements/gstfakesink.c index c308eb73cf..815aadc51e 100644 --- a/gst/elements/gstfakesink.c +++ b/gst/elements/gstfakesink.c @@ -56,11 +56,11 @@ enum { ARG_LAST_MESSAGE, }; -GST_PAD_TEMPLATE_FACTORY (fakesink_sink_factory, +GstStaticPadTemplate fakesink_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); #define GST_TYPE_FAKESINK_STATE_ERROR (gst_fakesink_state_error_get_type()) @@ -135,8 +135,10 @@ gst_fakesink_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_fakesink_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (fakesink_sink_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&fakesink_sink_template)); } + static void gst_fakesink_class_init (GstFakeSinkClass *klass) { diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index a1a310fcfd..75080a2563 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -73,11 +73,11 @@ enum { ARG_LAST_MESSAGE, }; -GST_PAD_TEMPLATE_FACTORY (fakesrc_src_factory, +GstStaticPadTemplate fakesrc_src_template = GST_STATIC_PAD_TEMPLATE ( "src%d", GST_PAD_SRC, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); #define GST_TYPE_FAKESRC_OUTPUT (gst_fakesrc_output_get_type()) @@ -204,8 +204,10 @@ gst_fakesrc_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_fakesrc_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (fakesrc_src_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&fakesrc_src_template)); } + static void gst_fakesrc_class_init (GstFakeSrcClass *klass) { diff --git a/gst/elements/gstmd5sink.c b/gst/elements/gstmd5sink.c index 5bf10a8b96..c50b7a262d 100644 --- a/gst/elements/gstmd5sink.c +++ b/gst/elements/gstmd5sink.c @@ -54,11 +54,11 @@ enum { /* FILL ME */ }; -GST_PAD_TEMPLATE_FACTORY (md5_sink_factory, +GstStaticPadTemplate md5_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); /* GObject stuff */ @@ -412,8 +412,10 @@ gst_md5sink_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_md5sink_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (md5_sink_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&md5_sink_template)); } + static void gst_md5sink_class_init (GstMD5SinkClass *klass) { @@ -438,7 +440,8 @@ static void gst_md5sink_init (GstMD5Sink *md5sink) { GstPad *pad; - pad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (md5_sink_factory), "sink"); + pad = gst_pad_new_from_template (gst_static_pad_template_get ( + &md5_sink_template), "sink"); gst_element_add_pad (GST_ELEMENT (md5sink), pad); gst_pad_set_chain_function (pad, GST_DEBUG_FUNCPTR (gst_md5sink_chain)); diff --git a/gst/elements/gstshaper.c b/gst/elements/gstshaper.c index 465ff33b24..d7f8ec305b 100644 --- a/gst/elements/gstshaper.c +++ b/gst/elements/gstshaper.c @@ -60,18 +60,18 @@ typedef struct GstBuffer *buffer; } GstShaperConnection; -GST_PAD_TEMPLATE_FACTORY (shaper_src_factory, +GstStaticPadTemplate shaper_src_template = GST_STATIC_PAD_TEMPLATE ( "src%d", GST_PAD_SRC, GST_PAD_SOMETIMES, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); -GST_PAD_TEMPLATE_FACTORY (shaper_sink_factory, +GstStaticPadTemplate shaper_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); #define GST_TYPE_SHAPER_POLICY (gst_shaper_policy_get_type()) @@ -137,9 +137,12 @@ gst_shaper_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_shaper_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (shaper_src_factory)); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (shaper_sink_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&shaper_src_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&shaper_sink_template)); } + static void gst_shaper_class_init (GstShaperClass *klass) { @@ -230,7 +233,8 @@ gst_shaper_create_connection (GstShaper *shaper) connection = g_new0 (GstShaperConnection, 1); padname = g_strdup_printf ("sink%d", shaper->nconnections); - connection->sinkpad = gst_pad_new_from_template (shaper_sink_factory (), padname); + connection->sinkpad = gst_pad_new_from_template ( + gst_static_pad_template_get (&shaper_sink_template), padname); g_free (padname); gst_pad_set_bufferpool_function (connection->sinkpad, gst_shaper_get_bufferpool); gst_pad_set_getcaps_function (connection->sinkpad, gst_shaper_getcaps); @@ -240,7 +244,8 @@ gst_shaper_create_connection (GstShaper *shaper) gst_element_add_pad (GST_ELEMENT (shaper), connection->sinkpad); padname = g_strdup_printf ("src%d", shaper->nconnections); - connection->srcpad = gst_pad_new_from_template (shaper_src_factory (), padname); + connection->srcpad = gst_pad_new_from_template ( + gst_static_pad_template_get (&shaper_src_template), padname); g_free (padname); gst_pad_set_getcaps_function (connection->srcpad, gst_shaper_getcaps); gst_pad_set_internal_link_function (connection->srcpad, gst_shaper_get_internal_link); diff --git a/gst/elements/gsttee.c b/gst/elements/gsttee.c index ad5168fa14..00e8dc9af2 100644 --- a/gst/elements/gsttee.c +++ b/gst/elements/gsttee.c @@ -53,11 +53,11 @@ enum { /* FILL ME */ }; -GST_PAD_TEMPLATE_FACTORY (tee_src_factory, +GstStaticPadTemplate tee_src_template = GST_STATIC_PAD_TEMPLATE ( "src%d", GST_PAD_SRC, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); static void gst_tee_base_init (gpointer g_class); @@ -106,7 +106,8 @@ gst_tee_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_tee_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (tee_src_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&tee_src_template)); } static void gst_tee_class_init (GstTeeClass *klass) diff --git a/gst/elements/gsttypefind.c b/gst/elements/gsttypefind.c index fa31e76f0a..69255ffef6 100644 --- a/gst/elements/gsttypefind.c +++ b/gst/elements/gsttypefind.c @@ -54,17 +54,18 @@ GstElementDetails gst_type_find_element_details = GST_ELEMENT_DETAILS ( ); /* generic templates */ -GST_PAD_TEMPLATE_FACTORY (type_find_element_sink_factory, +GstStaticPadTemplate type_find_element_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); -GST_PAD_TEMPLATE_FACTORY (type_find_element_src_factory, + +GstStaticPadTemplate type_find_element_src_template = GST_STATIC_PAD_TEMPLATE ( "src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); /* TypeFind signals and args */ @@ -206,13 +207,13 @@ gst_type_find_element_init (GTypeInstance *instance, gpointer g_class) /* sinkpad */ typefind->sink = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (type_find_element_sink_factory), "sink"); + gst_static_pad_template_get (&type_find_element_sink_template), "sink"); gst_pad_set_chain_function (typefind->sink, gst_type_find_element_chain); gst_element_add_pad (GST_ELEMENT (typefind), typefind->sink); /* srcpad */ typefind->src = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (type_find_element_src_factory), "src"); + gst_static_pad_template_get (&type_find_element_src_template), "src"); gst_pad_set_event_function (typefind->src, gst_type_find_element_src_event); gst_pad_set_event_mask_function (typefind->src, gst_type_find_element_src_event_mask); gst_element_add_pad (GST_ELEMENT (typefind), typefind->src); diff --git a/gst/elements/gsttypefindelement.c b/gst/elements/gsttypefindelement.c index fa31e76f0a..69255ffef6 100644 --- a/gst/elements/gsttypefindelement.c +++ b/gst/elements/gsttypefindelement.c @@ -54,17 +54,18 @@ GstElementDetails gst_type_find_element_details = GST_ELEMENT_DETAILS ( ); /* generic templates */ -GST_PAD_TEMPLATE_FACTORY (type_find_element_sink_factory, +GstStaticPadTemplate type_find_element_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); -GST_PAD_TEMPLATE_FACTORY (type_find_element_src_factory, + +GstStaticPadTemplate type_find_element_src_template = GST_STATIC_PAD_TEMPLATE ( "src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); /* TypeFind signals and args */ @@ -206,13 +207,13 @@ gst_type_find_element_init (GTypeInstance *instance, gpointer g_class) /* sinkpad */ typefind->sink = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (type_find_element_sink_factory), "sink"); + gst_static_pad_template_get (&type_find_element_sink_template), "sink"); gst_pad_set_chain_function (typefind->sink, gst_type_find_element_chain); gst_element_add_pad (GST_ELEMENT (typefind), typefind->sink); /* srcpad */ typefind->src = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (type_find_element_src_factory), "src"); + gst_static_pad_template_get (&type_find_element_src_template), "src"); gst_pad_set_event_function (typefind->src, gst_type_find_element_src_event); gst_pad_set_event_mask_function (typefind->src, gst_type_find_element_src_event_mask); gst_element_add_pad (GST_ELEMENT (typefind), typefind->src); diff --git a/plugins/elements/gstaggregator.c b/plugins/elements/gstaggregator.c index 53aabc1aa7..b1be5809ea 100644 --- a/plugins/elements/gstaggregator.c +++ b/plugins/elements/gstaggregator.c @@ -51,11 +51,11 @@ enum { /* FILL ME */ }; -GST_PAD_TEMPLATE_FACTORY (aggregator_src_factory, +GstStaticPadTemplate aggregator_src_template = GST_STATIC_PAD_TEMPLATE ( "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); #define GST_TYPE_AGGREGATOR_SCHED (gst_aggregator_sched_get_type()) @@ -124,7 +124,8 @@ static void gst_aggregator_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (aggregator_src_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&aggregator_src_template)); gst_element_class_set_details (gstelement_class, &gst_aggregator_details); } static void diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index c308eb73cf..815aadc51e 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -56,11 +56,11 @@ enum { ARG_LAST_MESSAGE, }; -GST_PAD_TEMPLATE_FACTORY (fakesink_sink_factory, +GstStaticPadTemplate fakesink_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); #define GST_TYPE_FAKESINK_STATE_ERROR (gst_fakesink_state_error_get_type()) @@ -135,8 +135,10 @@ gst_fakesink_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_fakesink_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (fakesink_sink_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&fakesink_sink_template)); } + static void gst_fakesink_class_init (GstFakeSinkClass *klass) { diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index a1a310fcfd..75080a2563 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -73,11 +73,11 @@ enum { ARG_LAST_MESSAGE, }; -GST_PAD_TEMPLATE_FACTORY (fakesrc_src_factory, +GstStaticPadTemplate fakesrc_src_template = GST_STATIC_PAD_TEMPLATE ( "src%d", GST_PAD_SRC, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); #define GST_TYPE_FAKESRC_OUTPUT (gst_fakesrc_output_get_type()) @@ -204,8 +204,10 @@ gst_fakesrc_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_fakesrc_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (fakesrc_src_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&fakesrc_src_template)); } + static void gst_fakesrc_class_init (GstFakeSrcClass *klass) { diff --git a/plugins/elements/gstmd5sink.c b/plugins/elements/gstmd5sink.c index 5bf10a8b96..c50b7a262d 100644 --- a/plugins/elements/gstmd5sink.c +++ b/plugins/elements/gstmd5sink.c @@ -54,11 +54,11 @@ enum { /* FILL ME */ }; -GST_PAD_TEMPLATE_FACTORY (md5_sink_factory, +GstStaticPadTemplate md5_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); /* GObject stuff */ @@ -412,8 +412,10 @@ gst_md5sink_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_md5sink_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (md5_sink_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&md5_sink_template)); } + static void gst_md5sink_class_init (GstMD5SinkClass *klass) { @@ -438,7 +440,8 @@ static void gst_md5sink_init (GstMD5Sink *md5sink) { GstPad *pad; - pad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (md5_sink_factory), "sink"); + pad = gst_pad_new_from_template (gst_static_pad_template_get ( + &md5_sink_template), "sink"); gst_element_add_pad (GST_ELEMENT (md5sink), pad); gst_pad_set_chain_function (pad, GST_DEBUG_FUNCPTR (gst_md5sink_chain)); diff --git a/plugins/elements/gstshaper.c b/plugins/elements/gstshaper.c index 465ff33b24..d7f8ec305b 100644 --- a/plugins/elements/gstshaper.c +++ b/plugins/elements/gstshaper.c @@ -60,18 +60,18 @@ typedef struct GstBuffer *buffer; } GstShaperConnection; -GST_PAD_TEMPLATE_FACTORY (shaper_src_factory, +GstStaticPadTemplate shaper_src_template = GST_STATIC_PAD_TEMPLATE ( "src%d", GST_PAD_SRC, GST_PAD_SOMETIMES, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); -GST_PAD_TEMPLATE_FACTORY (shaper_sink_factory, +GstStaticPadTemplate shaper_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); #define GST_TYPE_SHAPER_POLICY (gst_shaper_policy_get_type()) @@ -137,9 +137,12 @@ gst_shaper_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_shaper_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (shaper_src_factory)); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (shaper_sink_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&shaper_src_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&shaper_sink_template)); } + static void gst_shaper_class_init (GstShaperClass *klass) { @@ -230,7 +233,8 @@ gst_shaper_create_connection (GstShaper *shaper) connection = g_new0 (GstShaperConnection, 1); padname = g_strdup_printf ("sink%d", shaper->nconnections); - connection->sinkpad = gst_pad_new_from_template (shaper_sink_factory (), padname); + connection->sinkpad = gst_pad_new_from_template ( + gst_static_pad_template_get (&shaper_sink_template), padname); g_free (padname); gst_pad_set_bufferpool_function (connection->sinkpad, gst_shaper_get_bufferpool); gst_pad_set_getcaps_function (connection->sinkpad, gst_shaper_getcaps); @@ -240,7 +244,8 @@ gst_shaper_create_connection (GstShaper *shaper) gst_element_add_pad (GST_ELEMENT (shaper), connection->sinkpad); padname = g_strdup_printf ("src%d", shaper->nconnections); - connection->srcpad = gst_pad_new_from_template (shaper_src_factory (), padname); + connection->srcpad = gst_pad_new_from_template ( + gst_static_pad_template_get (&shaper_src_template), padname); g_free (padname); gst_pad_set_getcaps_function (connection->srcpad, gst_shaper_getcaps); gst_pad_set_internal_link_function (connection->srcpad, gst_shaper_get_internal_link); diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index ad5168fa14..00e8dc9af2 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -53,11 +53,11 @@ enum { /* FILL ME */ }; -GST_PAD_TEMPLATE_FACTORY (tee_src_factory, +GstStaticPadTemplate tee_src_template = GST_STATIC_PAD_TEMPLATE ( "src%d", GST_PAD_SRC, GST_PAD_REQUEST, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); static void gst_tee_base_init (gpointer g_class); @@ -106,7 +106,8 @@ gst_tee_base_init (gpointer g_class) GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (gstelement_class, &gst_tee_details); - gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (tee_src_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&tee_src_template)); } static void gst_tee_class_init (GstTeeClass *klass) diff --git a/plugins/elements/gsttypefind.c b/plugins/elements/gsttypefind.c index fa31e76f0a..69255ffef6 100644 --- a/plugins/elements/gsttypefind.c +++ b/plugins/elements/gsttypefind.c @@ -54,17 +54,18 @@ GstElementDetails gst_type_find_element_details = GST_ELEMENT_DETAILS ( ); /* generic templates */ -GST_PAD_TEMPLATE_FACTORY (type_find_element_sink_factory, +GstStaticPadTemplate type_find_element_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); -GST_PAD_TEMPLATE_FACTORY (type_find_element_src_factory, + +GstStaticPadTemplate type_find_element_src_template = GST_STATIC_PAD_TEMPLATE ( "src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); /* TypeFind signals and args */ @@ -206,13 +207,13 @@ gst_type_find_element_init (GTypeInstance *instance, gpointer g_class) /* sinkpad */ typefind->sink = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (type_find_element_sink_factory), "sink"); + gst_static_pad_template_get (&type_find_element_sink_template), "sink"); gst_pad_set_chain_function (typefind->sink, gst_type_find_element_chain); gst_element_add_pad (GST_ELEMENT (typefind), typefind->sink); /* srcpad */ typefind->src = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (type_find_element_src_factory), "src"); + gst_static_pad_template_get (&type_find_element_src_template), "src"); gst_pad_set_event_function (typefind->src, gst_type_find_element_src_event); gst_pad_set_event_mask_function (typefind->src, gst_type_find_element_src_event_mask); gst_element_add_pad (GST_ELEMENT (typefind), typefind->src); diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index fa31e76f0a..69255ffef6 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -54,17 +54,18 @@ GstElementDetails gst_type_find_element_details = GST_ELEMENT_DETAILS ( ); /* generic templates */ -GST_PAD_TEMPLATE_FACTORY (type_find_element_sink_factory, +GstStaticPadTemplate type_find_element_sink_template = GST_STATIC_PAD_TEMPLATE ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); -GST_PAD_TEMPLATE_FACTORY (type_find_element_src_factory, + +GstStaticPadTemplate type_find_element_src_template = GST_STATIC_PAD_TEMPLATE ( "src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_CAPS2_ANY + GST_STATIC_CAPS2_ANY ); /* TypeFind signals and args */ @@ -206,13 +207,13 @@ gst_type_find_element_init (GTypeInstance *instance, gpointer g_class) /* sinkpad */ typefind->sink = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (type_find_element_sink_factory), "sink"); + gst_static_pad_template_get (&type_find_element_sink_template), "sink"); gst_pad_set_chain_function (typefind->sink, gst_type_find_element_chain); gst_element_add_pad (GST_ELEMENT (typefind), typefind->sink); /* srcpad */ typefind->src = gst_pad_new_from_template ( - GST_PAD_TEMPLATE_GET (type_find_element_src_factory), "src"); + gst_static_pad_template_get (&type_find_element_src_template), "src"); gst_pad_set_event_function (typefind->src, gst_type_find_element_src_event); gst_pad_set_event_mask_function (typefind->src, gst_type_find_element_src_event_mask); gst_element_add_pad (GST_ELEMENT (typefind), typefind->src);