diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2011-11-28 13:08:27 +0000 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2011-11-28 13:08:27 +0000 |
commit | 7521b597f4dc49d8d168f368f0e7ebaf98a72156 (patch) | |
tree | 0033ba79e1bf8add58e1dcecffa95f73010bbd10 | |
parent | 26d6add9457f00ce8ec13844368466f0e3816e5d (diff) |
various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
287 files changed, 856 insertions, 1004 deletions
diff --git a/ext/apexsink/gstapexsink.c b/ext/apexsink/gstapexsink.c index fc64db83a..5b3af3db1 100644 --- a/ext/apexsink/gstapexsink.c +++ b/ext/apexsink/gstapexsink.c @@ -265,8 +265,8 @@ gst_apexsink_base_init (gpointer g_class) "Apple AirPort Express Audio Sink", "Sink/Audio/Wireless", "Output stream to an AirPort Express", "Jérémie Bernard [GRemi] <gremimail@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_apexsink_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &gst_apexsink_sink_factory); } /* sink class init */ diff --git a/ext/arts/gst_arts.c b/ext/arts/gst_arts.c index 90742289d..24a0aa348 100644 --- a/ext/arts/gst_arts.c +++ b/ext/arts/gst_arts.c @@ -111,10 +111,8 @@ gst_arts_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_temp)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_temp)); + gst_element_class_add_static_pad_template (element_class, &sink_temp); + gst_element_class_add_static_pad_template (element_class, &src_temp); gst_element_class_set_details_simple (element_class, "aRts plugin", "Filter/Audio", "aRts wrapper filter", "Erik Walthinsen <omega@temple-baptist.com, " diff --git a/ext/artsd/gstartsdsink.c b/ext/artsd/gstartsdsink.c index 79dd28d85..a27b3ebb6 100644 --- a/ext/artsd/gstartsdsink.c +++ b/ext/artsd/gstartsdsink.c @@ -97,8 +97,7 @@ gst_artsdsink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "aRtsd audio sink", "Sink/Audio", "Plays audio to an aRts server", diff --git a/ext/assrender/gstassrender.c b/ext/assrender/gstassrender.c index 1287ba1a7..b71e8e4d1 100644 --- a/ext/assrender/gstassrender.c +++ b/ext/assrender/gstassrender.c @@ -117,12 +117,11 @@ gst_ass_render_base_init (gpointer gclass) { GstElementClass *element_class = (GstElementClass *) gclass; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&text_sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, + &video_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &text_sink_factory); gst_element_class_set_details_simple (element_class, "ASS/SSA Render", "Mixer/Video/Overlay/Subtitle", diff --git a/ext/audiofile/gstafparse.c b/ext/audiofile/gstafparse.c index 27b5a6e8c..634d09abc 100644 --- a/ext/audiofile/gstafparse.c +++ b/ext/audiofile/gstafparse.c @@ -114,10 +114,10 @@ gst_afparse_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&afparse_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&afparse_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &afparse_src_factory); + gst_element_class_add_static_pad_template (element_class, + &afparse_sink_factory); gst_element_class_set_details_simple (element_class, "Audiofile demuxer", "Codec/Demuxer/Audio", diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c index 79fc7abdb..b8a25f6ab 100644 --- a/ext/audiofile/gstafsink.c +++ b/ext/audiofile/gstafsink.c @@ -138,8 +138,8 @@ gst_afsink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&afsink_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &afsink_sink_factory); gst_element_class_set_details_simple (element_class, "Audiofile sink", "Sink/Audio", "Write audio streams to disk using libaudiofile", diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c index 2a750a378..bc7648ad5 100644 --- a/ext/audiofile/gstafsrc.c +++ b/ext/audiofile/gstafsrc.c @@ -135,8 +135,8 @@ gst_afsrc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&afsrc_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &afsrc_src_factory); gst_element_class_set_details_simple (element_class, "Audiofile source", "Source/Audio", "Read audio files from disk using libaudiofile", diff --git a/ext/audioresample/gstaudioresample.c b/ext/audioresample/gstaudioresample.c index 5e7fafc31..7b81b93cc 100644 --- a/ext/audioresample/gstaudioresample.c +++ b/ext/audioresample/gstaudioresample.c @@ -115,10 +115,10 @@ static void gst_audioresample_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_audioresample_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_audioresample_sink_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_audioresample_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_audioresample_sink_template); gst_element_class_set_details_simple (gstelement_class, "Audio scaler", "Filter/Converter/Audio", diff --git a/ext/bz2/gstbz2dec.c b/ext/bz2/gstbz2dec.c index ac53f6095..48bca484e 100644 --- a/ext/bz2/gstbz2dec.c +++ b/ext/bz2/gstbz2dec.c @@ -212,10 +212,8 @@ gst_bz2dec_base_init (gpointer g_class) { GstElementClass *ec = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (ec, - gst_static_pad_template_get (&sink_template)); - gst_element_class_add_pad_template (ec, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (ec, &sink_template); + gst_element_class_add_static_pad_template (ec, &src_template); gst_element_class_set_details_simple (ec, "BZ2 decoder", "Codec/Decoder", "Decodes compressed streams", "Lutz Mueller <lutz@users.sourceforge.net>"); diff --git a/ext/bz2/gstbz2enc.c b/ext/bz2/gstbz2enc.c index 83a6b2e09..1b9febad0 100644 --- a/ext/bz2/gstbz2enc.c +++ b/ext/bz2/gstbz2enc.c @@ -262,10 +262,8 @@ gst_bz2enc_base_init (gpointer g_class) { GstElementClass *ec = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (ec, - gst_static_pad_template_get (&sink_template)); - gst_element_class_add_pad_template (ec, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (ec, &sink_template); + gst_element_class_add_static_pad_template (ec, &src_template); gst_element_class_set_details_simple (ec, "BZ2 encoder", "Codec/Encoder", "Compresses streams", "Lutz Mueller <lutz@users.sourceforge.net>"); diff --git a/ext/celt/gstceltdec.c b/ext/celt/gstceltdec.c index 0813a2649..84b2d203f 100644 --- a/ext/celt/gstceltdec.c +++ b/ext/celt/gstceltdec.c @@ -83,10 +83,10 @@ gst_celt_dec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&celt_dec_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&celt_dec_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &celt_dec_src_factory); + gst_element_class_add_static_pad_template (element_class, + &celt_dec_sink_factory); gst_element_class_set_details_simple (element_class, "Celt audio decoder", "Codec/Decoder/Audio", "decode celt streams to audio", diff --git a/ext/celt/gstceltenc.c b/ext/celt/gstceltenc.c index 19c8b9ff3..befb9ac83 100644 --- a/ext/celt/gstceltenc.c +++ b/ext/celt/gstceltenc.c @@ -150,10 +150,8 @@ gst_celt_enc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Celt audio encoder", "Codec/Encoder/Audio", "Encodes audio in Celt format", diff --git a/ext/cog/gstcogcolorspace.c b/ext/cog/gstcogcolorspace.c index 4a96e5c1f..3c84c32a5 100644 --- a/ext/cog/gstcogcolorspace.c +++ b/ext/cog/gstcogcolorspace.c @@ -126,10 +126,10 @@ gst_cogcolorspace_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_cogcolorspace_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_cogcolorspace_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_cogcolorspace_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_cogcolorspace_sink_template); gst_element_class_set_details_simple (element_class, "YCbCr/RGB format conversion", "Filter/Converter/Video", diff --git a/ext/cog/gstcogdownsample.c b/ext/cog/gstcogdownsample.c index c929c12ec..5122f4a6b 100644 --- a/ext/cog/gstcogdownsample.c +++ b/ext/cog/gstcogdownsample.c @@ -132,10 +132,10 @@ gst_cogdownsample_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_cogdownsample_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_cogdownsample_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_cogdownsample_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_cogdownsample_sink_template); gst_element_class_set_details_simple (element_class, "Scale down video by factor of 2", "Filter/Effect/Video", diff --git a/ext/cog/gstcogmse.c b/ext/cog/gstcogmse.c index 8eb63bec3..09f1ffc42 100644 --- a/ext/cog/gstcogmse.c +++ b/ext/cog/gstcogmse.c @@ -135,12 +135,12 @@ gst_mse_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_framestore_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_framestore_sink_ref_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_framestore_sink_test_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_framestore_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_framestore_sink_ref_template); + gst_element_class_add_static_pad_template (element_class, + &gst_framestore_sink_test_template); gst_element_class_set_details_simple (element_class, "Calculate MSE", "Filter/Effect", diff --git a/ext/cog/gstcogscale.c b/ext/cog/gstcogscale.c index 52585ac90..10587f5b8 100644 --- a/ext/cog/gstcogscale.c +++ b/ext/cog/gstcogscale.c @@ -207,10 +207,10 @@ gst_cog_scale_base_init (gpointer g_class) "Filter/Effect/Video", "Resizes video", "Wim Taymans <wim.taymans@chello.be>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_cog_scale_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_cog_scale_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_cog_scale_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_cog_scale_sink_template); } static void diff --git a/ext/cog/gstcolorconvert.c b/ext/cog/gstcolorconvert.c index 1ed6d91a5..4a043cda7 100644 --- a/ext/cog/gstcolorconvert.c +++ b/ext/cog/gstcolorconvert.c @@ -132,10 +132,10 @@ gst_colorconvert_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_colorconvert_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_colorconvert_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_colorconvert_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_colorconvert_sink_template); gst_element_class_set_details_simple (element_class, "Convert colorspace", "Filter/Effect/Video", diff --git a/ext/cog/gstlogoinsert.c b/ext/cog/gstlogoinsert.c index 5746528e4..99e54470b 100644 --- a/ext/cog/gstlogoinsert.c +++ b/ext/cog/gstlogoinsert.c @@ -130,10 +130,10 @@ gst_logoinsert_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_logoinsert_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_logoinsert_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_logoinsert_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_logoinsert_sink_template); gst_element_class_set_details_simple (element_class, "Overlay image onto video", "Filter/Effect/Video", diff --git a/ext/curl/gstcurlsink.c b/ext/curl/gstcurlsink.c index 2a448f436..75b459c55 100644 --- a/ext/curl/gstcurlsink.c +++ b/ext/curl/gstcurlsink.c @@ -155,8 +155,7 @@ gst_curl_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "Curl sink", "Sink/Network", diff --git a/ext/dc1394/gstdc1394.c b/ext/dc1394/gstdc1394.c index 09c4fd1f9..dfb4cadee 100644 --- a/ext/dc1394/gstdc1394.c +++ b/ext/dc1394/gstdc1394.c @@ -104,16 +104,18 @@ static void gst_dc1394_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + GstPadTemplate *pad_template; gst_element_class_set_details_simple (element_class, "1394 IIDC Video Source", "Source/Video", "libdc1394 based source, supports 1394 IIDC cameras", "Antoine Tremblay <hexa00@gmail.com>"); - gst_element_class_add_pad_template (element_class, + pad_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - gst_dc1394_get_all_dc1394_caps ())); - + gst_dc1394_get_all_dc1394_caps ()); + gst_element_class_add_pad_template (element_class, pad_template); + gst_object_unref (pad_template); } static void diff --git a/ext/dirac/gstdiracdec.cc b/ext/dirac/gstdiracdec.cc index 486eab0ab..86643ef81 100644 --- a/ext/dirac/gstdiracdec.cc +++ b/ext/dirac/gstdiracdec.cc @@ -103,10 +103,10 @@ gst_diracdec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_diracdec_src_pad_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_diracdec_sink_pad_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_diracdec_src_pad_template); + gst_element_class_add_static_pad_template (element_class, + &gst_diracdec_sink_pad_template); gst_element_class_set_details_simple (element_class, "Dirac stream decoder", "Codec/Decoder/Video", "Decode DIRAC streams", "David Schleef <ds@schleef.org>, " diff --git a/ext/dirac/gstdiracenc.cc b/ext/dirac/gstdiracenc.cc index eb19d7807..f9595e1de 100644 --- a/ext/dirac/gstdiracenc.cc +++ b/ext/dirac/gstdiracenc.cc @@ -197,10 +197,10 @@ gst_dirac_enc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_dirac_enc_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_dirac_enc_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_dirac_enc_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_dirac_enc_sink_template); gst_element_class_set_details_simple (element_class, "Dirac Encoder", "Codec/Encoder/Video", diff --git a/ext/directfb/dfbvideosink.c b/ext/directfb/dfbvideosink.c index 7343e2537..c3417a5e1 100644 --- a/ext/directfb/dfbvideosink.c +++ b/ext/directfb/dfbvideosink.c @@ -2283,8 +2283,8 @@ gst_dfbvideosink_base_init (gpointer g_class) "Sink/Video", "A DirectFB based videosink", "Julien Moutte <julien@moutte.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_dfbvideosink_sink_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &gst_dfbvideosink_sink_template_factory); } static void diff --git a/ext/divx/gstdivxdec.c b/ext/divx/gstdivxdec.c index 2b6625616..9f2feecfd 100644 --- a/ext/divx/gstdivxdec.c +++ b/ext/divx/gstdivxdec.c @@ -130,10 +130,9 @@ gst_divxdec_base_init (GstDivxDecClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_details_simple (element_class, "Divx4linux video decoder", "Codec/Decoder/Video", diff --git a/ext/divx/gstdivxenc.c b/ext/divx/gstdivxenc.c index 924f6749d..144d23b12 100644 --- a/ext/divx/gstdivxenc.c +++ b/ext/divx/gstdivxenc.c @@ -141,10 +141,9 @@ gst_divxenc_base_init (GstDivxEncClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_details_simple (element_class, "Divx4linux video encoder", "Codec/Encoder/Video", diff --git a/ext/dts/gstdtsdec.c b/ext/dts/gstdtsdec.c index 2a762e903..474803f59 100644 --- a/ext/dts/gstdtsdec.c +++ b/ext/dts/gstdtsdec.c @@ -153,10 +153,8 @@ gst_dtsdec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); + gst_element_class_add_static_pad_template (element_class, &sink_factory); + gst_element_class_add_static_pad_template (element_class, &src_factory); gst_element_class_set_details_simple (element_class, "DTS audio decoder", "Codec/Decoder/Audio", "Decodes DTS audio streams", diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c index 7ab22446d..f811cd1ac 100644 --- a/ext/faac/gstfaac.c +++ b/ext/faac/gstfaac.c @@ -151,10 +151,9 @@ gst_faac_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "AAC audio encoder", "Codec/Encoder/Audio", diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c index 252e9529d..838df31bc 100644 --- a/ext/faad/gstfaad.c +++ b/ext/faad/gstfaad.c @@ -161,10 +161,9 @@ gst_faad_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "AAC audio decoder", "Codec/Decoder/Audio", diff --git a/ext/flite/gstflitetestsrc.c b/ext/flite/gstflitetestsrc.c index ea7da1dbe..a8e595c03 100644 --- a/ext/flite/gstflitetestsrc.c +++ b/ext/flite/gstflitetestsrc.c @@ -118,8 +118,8 @@ gst_flite_test_src_base_init (gpointer g_class) GST_DEBUG_CATEGORY_INIT (flite_test_src_debug, "flitetestsrc", 0, "Flite Audio Test Source"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_flite_test_src_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_flite_test_src_src_template); gst_element_class_set_details_simple (element_class, "Flite speech test source", "Source/Audio", "Creates audio test signals identifying channels", diff --git a/ext/gme/gstgme.c b/ext/gme/gstgme.c index ae49c6408..14ee7d305 100644 --- a/ext/gme/gstgme.c +++ b/ext/gme/gstgme.c @@ -114,10 +114,8 @@ gst_gme_dec_base_init (gpointer g_class) "Chris Lee <clee@kde.org>, Brian Koropoff <bkoropoff@gmail.com>, " "Michael Pyne <mpyne@kde.org>, Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); + gst_element_class_add_static_pad_template (element_class, &sink_factory); + gst_element_class_add_static_pad_template (element_class, &src_factory); } static void diff --git a/ext/gsettings/gstswitchsink.c b/ext/gsettings/gstswitchsink.c index 1fccf683f..da31df2b0 100644 --- a/ext/gsettings/gstswitchsink.c +++ b/ext/gsettings/gstswitchsink.c @@ -64,8 +64,7 @@ gst_switch_sink_class_init (GstSwitchSinkClass * klass) /* Provide a default pad template if the child didn't */ child_pad_templ = gst_element_class_get_pad_template (eklass, "sink"); if (child_pad_templ == NULL) { - gst_element_class_add_pad_template (eklass, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (eklass, &sink_template); } } diff --git a/ext/gsettings/gstswitchsrc.c b/ext/gsettings/gstswitchsrc.c index 0136e4a86..664e0bd8a 100644 --- a/ext/gsettings/gstswitchsrc.c +++ b/ext/gsettings/gstswitchsrc.c @@ -60,8 +60,7 @@ gst_switch_src_class_init (GstSwitchSrcClass * klass) /* Provide a default pad template if the child didn't */ child_pad_templ = gst_element_class_get_pad_template (eklass, "src"); if (child_pad_templ == NULL) { - gst_element_class_add_pad_template (eklass, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (eklass, &src_template); } } diff --git a/ext/gsm/gstgsmdec.c b/ext/gsm/gstgsmdec.c index 3318bdc77..65d3275e5 100644 --- a/ext/gsm/gstgsmdec.c +++ b/ext/gsm/gstgsmdec.c @@ -106,10 +106,10 @@ gst_gsmdec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gsmdec_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gsmdec_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gsmdec_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gsmdec_src_template); gst_element_class_set_details_simple (element_class, "GSM audio decoder", "Codec/Decoder/Audio", "Decodes GSM encoded audio", "Philippe Khalaf <burger@speedy.org>"); diff --git a/ext/gsm/gstgsmenc.c b/ext/gsm/gstgsmenc.c index 434c4b1fa..52d0b55b2 100644 --- a/ext/gsm/gstgsmenc.c +++ b/ext/gsm/gstgsmenc.c @@ -100,10 +100,10 @@ gst_gsmenc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gsmenc_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gsmenc_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gsmenc_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gsmenc_src_template); gst_element_class_set_details_simple (element_class, "GSM audio encoder", "Codec/Encoder/Audio", "Encodes GSM audio", "Philippe Khalaf <burger@speedy.org>"); diff --git a/ext/hermes/gsthermescolorspace.c b/ext/hermes/gsthermescolorspace.c index c46572c77..477a43f36 100644 --- a/ext/hermes/gsthermescolorspace.c +++ b/ext/hermes/gsthermescolorspace.c @@ -501,10 +501,10 @@ gst_hermes_colorspace_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_hermes_colorspace_src_pad_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_hermes_colorspace_sink_pad_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_hermes_colorspace_src_pad_template); + gst_element_class_add_static_pad_template (element_class, + &gst_hermes_colorspace_sink_pad_template); gst_element_class_set_details_simple (element_class, "Colorspace converter", "Filter/Converter/Video", diff --git a/ext/jp2k/gstjasperdec.c b/ext/jp2k/gstjasperdec.c index e896142bd..7cde2fd13 100644 --- a/ext/jp2k/gstjasperdec.c +++ b/ext/jp2k/gstjasperdec.c @@ -95,10 +95,10 @@ gst_jasper_dec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_jasper_dec_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_jasper_dec_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_jasper_dec_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_jasper_dec_sink_template); gst_element_class_set_details_simple (element_class, "Jasper JPEG2000 image decoder", "Codec/Decoder/Image", "Decodes JPEG2000 encoded images using jasper", diff --git a/ext/jp2k/gstjasperenc.c b/ext/jp2k/gstjasperenc.c index ae7b92567..a43bb36ec 100644 --- a/ext/jp2k/gstjasperenc.c +++ b/ext/jp2k/gstjasperenc.c @@ -99,10 +99,10 @@ gst_jasper_enc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_jasper_enc_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_jasper_enc_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_jasper_enc_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_jasper_enc_sink_template); gst_element_class_set_details_simple (element_class, "Jasper JPEG2000 image encoder", "Codec/Encoder/Image", "Encodes video to JPEG2000 using jasper", diff --git a/ext/kate/gstkatedec.c b/ext/kate/gstkatedec.c index df3607024..76c918ebc 100644 --- a/ext/kate/gstkatedec.c +++ b/ext/kate/gstkatedec.c @@ -138,10 +138,8 @@ gst_kate_dec_base_init (gpointer gclass) GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Kate stream text decoder", "Codec/Decoder/Subtitle", "Decodes Kate text streams", diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c index 6befaf8c5..e378a5cf3 100644 --- a/ext/kate/gstkateenc.c +++ b/ext/kate/gstkateenc.c @@ -153,10 +153,8 @@ gst_kate_enc_base_init (gpointer gclass) GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Kate stream encoder", "Codec/Encoder/Subtitle", "Encodes Kate streams from text or subpictures", diff --git a/ext/kate/gstkateparse.c b/ext/kate/gstkateparse.c index 6a72edec9..fff1208b3 100644 --- a/ext/kate/gstkateparse.c +++ b/ext/kate/gstkateparse.c @@ -103,10 +103,10 @@ gst_kate_parse_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_kate_parse_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_kate_parse_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &gst_kate_parse_src_factory); + gst_element_class_add_static_pad_template (element_class, + &gst_kate_parse_sink_factory); gst_element_class_set_details_simple (element_class, "Kate stream parser", "Codec/Parser/Subtitle", "parse raw kate streams", diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c index 134469fe9..39821c336 100644 --- a/ext/kate/gstkatetiger.c +++ b/ext/kate/gstkatetiger.c @@ -195,12 +195,11 @@ gst_kate_tiger_base_init (gpointer gclass) GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&kate_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, + &kate_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &video_sink_factory); gst_element_class_set_details_simple (element_class, "Kate stream renderer", "Mixer/Video/Overlay/Subtitle", "Decodes and renders Kate streams on top of a video", diff --git a/ext/lcs/gstcolorspace.c b/ext/lcs/gstcolorspace.c index 5b4479c14..f56d844da 100644 --- a/ext/lcs/gstcolorspace.c +++ b/ext/lcs/gstcolorspace.c @@ -334,10 +334,10 @@ gst_colorspace_base_init (GstColorspaceClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_colorspace_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_colorspace_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_colorspace_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_colorspace_sink_template); gst_element_class_set_details_simple (element_class, "Colorspace converter", "Filter/Effect", "Converts video from one colorspace to another", diff --git a/ext/libfame/gstlibfame.c b/ext/libfame/gstlibfame.c index fefbd685a..4765796d2 100644 --- a/ext/libfame/gstlibfame.c +++ b/ext/libfame/gstlibfame.c @@ -172,10 +172,9 @@ gst_fameenc_base_init (GstFameEncClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_details_simple (element_class, "MPEG-1 and MPEG-4 video encoder", "Codec/Encoder/Video", diff --git a/ext/libmms/gstmms.c b/ext/libmms/gstmms.c index cf7a09145..28a82da3c 100644 --- a/ext/libmms/gstmms.c +++ b/ext/libmms/gstmms.c @@ -91,8 +91,7 @@ gst_mms_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); gst_element_class_set_details_simple (element_class, "MMS streaming source", "Source/Network", "Receive data streamed via MSFT Multi Media Server protocol", diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c index 623f7496c..a712c214b 100644 --- a/ext/mimic/gstmimdec.c +++ b/ext/mimic/gstmimdec.c @@ -87,10 +87,8 @@ gst_mim_dec_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Mimic Decoder", diff --git a/ext/mimic/gstmimenc.c b/ext/mimic/gstmimenc.c index f4957ccb1..a867787a6 100644 --- a/ext/mimic/gstmimenc.c +++ b/ext/mimic/gstmimenc.c @@ -125,10 +125,8 @@ gst_mim_enc_base_init (gpointer klass) " when no data is received", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Mimic Encoder", "Codec/Encoder/Video", diff --git a/ext/modplug/gstmodplug.cc b/ext/modplug/gstmodplug.cc index 75988fd75..09dc5104c 100644 --- a/ext/modplug/gstmodplug.cc +++ b/ext/modplug/gstmodplug.cc @@ -149,10 +149,10 @@ gst_modplug_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&modplug_sink_template_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&modplug_src_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &modplug_sink_template_factory); + gst_element_class_add_static_pad_template (element_class, + &modplug_src_template_factory); gst_element_class_set_details_simple (element_class, "ModPlug", "Codec/Decoder/Audio", "Module decoder based on modplug engine", @@ -379,7 +379,6 @@ gst_modplug_src_event (GstPad * pad, GstEvent * event) GST_DEBUG_OBJECT (modplug, "no song loaded yet"); break; } - #if 0 timestamp = gst_util_uint64_scale_int (modplug->offset, GST_SECOND, modplug->frequency); diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc index 5c0b426e9..1987103e2 100644 --- a/ext/mpeg2enc/gstmpeg2enc.cc +++ b/ext/mpeg2enc/gstmpeg2enc.cc @@ -126,10 +126,9 @@ gst_mpeg2enc_base_init (gpointer klass) "Andrew Stevens <andrew.stevens@nexgo.de>\n" "Ronald Bultje <rbultje@ronald.bitfreak.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } static void diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc index fca40e38b..ac94e7c29 100644 --- a/ext/mplex/gstmplex.cc +++ b/ext/mplex/gstmplex.cc @@ -131,12 +131,11 @@ gst_mplex_base_init (gpointer klass) "Ronald Bultje <rbultje@ronald.bitfreak.net>\n" "Mark Nauwelaerts <mnauw@users.sourceforge.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_sink_templ)); + gst_element_class_add_static_pad_template (element_class, &src_templ); + gst_element_class_add_static_pad_template (element_class, + &video_sink_templ); + gst_element_class_add_static_pad_template (element_class, + &audio_sink_templ); } static void diff --git a/ext/musepack/gstmusepackdec.c b/ext/musepack/gstmusepackdec.c index 30a34bff3..1d6380c75 100644 --- a/ext/musepack/gstmusepackdec.c +++ b/ext/musepack/gstmusepackdec.c @@ -79,10 +79,9 @@ gst_musepackdec_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "Musepack decoder", "Codec/Decoder/Audio", diff --git a/ext/musicbrainz/gsttrm.c b/ext/musicbrainz/gsttrm.c index 7e53cc078..173c1f1a4 100644 --- a/ext/musicbrainz/gsttrm.c +++ b/ext/musicbrainz/gsttrm.c @@ -112,10 +112,9 @@ gst_trm_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "MusicBrainz TRM generator", "Filter/Analyzer/Audio", diff --git a/ext/mythtv/gstmythtvsrc.c b/ext/mythtv/gstmythtvsrc.c index ca9865ebd..71c909287 100644 --- a/ext/mythtv/gstmythtvsrc.c +++ b/ext/mythtv/gstmythtvsrc.c @@ -156,8 +156,7 @@ GST_BOILERPLATE_FULL (GstMythtvSrc, gst_mythtv_src, GstPushSrc, { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); gst_element_class_set_details_simple (element_class, "MythTV client source", "Source/Network", diff --git a/ext/nas/nassink.c b/ext/nas/nassink.c index 4b535951b..dac158d2a 100644 --- a/ext/nas/nassink.c +++ b/ext/nas/nassink.c @@ -95,8 +95,7 @@ gst_nas_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "NAS audio sink", "Sink/Audio", "Plays audio to a Network Audio Server", diff --git a/ext/neon/gstneonhttpsrc.c b/ext/neon/gstneonhttpsrc.c index b295f0837..20adf057c 100644 --- a/ext/neon/gstneonhttpsrc.c +++ b/ext/neon/gstneonhttpsrc.c @@ -135,8 +135,7 @@ gst_neonhttp_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); gst_element_class_set_details_simple (element_class, "HTTP client source", "Source/Network", diff --git a/ext/openal/gstopenalsink.c b/ext/openal/gstopenalsink.c index ece590531..a169d9e57 100644 --- a/ext/openal/gstopenalsink.c +++ b/ext/openal/gstopenalsink.c @@ -162,15 +162,14 @@ static void gst_openal_sink_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - GstPadTemplate *pad_template; gst_element_class_set_details_simple (element_class, "Audio sink (OpenAL)", "Sink/Audio", "Output to a sound device via OpenAL", "Chris Robinson <chris.kcat@gmail.com>"); - pad_template = gst_static_pad_template_get (&openalsink_sink_factory); - gst_element_class_add_pad_template (element_class, pad_template); + gst_element_class_add_static_pad_template (element_class, + &openalsink_sink_factory); } /* initialize the plugin's class */ diff --git a/ext/openal/gstopenalsrc.c b/ext/openal/gstopenalsrc.c index 350071956..18379137b 100644 --- a/ext/openal/gstopenalsrc.c +++ b/ext/openal/gstopenalsrc.c @@ -142,9 +142,7 @@ gst_openal_src_base_init (gpointer gclass) "OpenAL source capture audio from device", "Victor Lin <bornstub@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory) - ); + gst_element_class_add_static_pad_template (element_class, &src_factory); } static void diff --git a/ext/opencv/gstcvequalizehist.c b/ext/opencv/gstcvequalizehist.c index 3a086bed2..4d0521f57 100644 --- a/ext/opencv/gstcvequalizehist.c +++ b/ext/opencv/gstcvequalizehist.c @@ -77,10 +77,8 @@ gst_cv_equalize_hist_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "cvequalizehist", diff --git a/ext/opencv/gstcvlaplace.c b/ext/opencv/gstcvlaplace.c index de8649cd1..39453e63b 100644 --- a/ext/opencv/gstcvlaplace.c +++ b/ext/opencv/gstcvlaplace.c @@ -122,10 +122,8 @@ gst_cv_laplace_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "cvlaplace", diff --git a/ext/opencv/gstcvsobel.c b/ext/opencv/gstcvsobel.c index 8aaeedd45..1e7b63ec2 100644 --- a/ext/opencv/gstcvsobel.c +++ b/ext/opencv/gstcvsobel.c @@ -110,10 +110,8 @@ gst_cv_sobel_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "cvsobel", diff --git a/ext/opencv/gstedgedetect.c b/ext/opencv/gstedgedetect.c index 427289981..199435db6 100644 --- a/ext/opencv/gstedgedetect.c +++ b/ext/opencv/gstedgedetect.c @@ -138,10 +138,8 @@ gst_edge_detect_base_init (gpointer gclass) "Performs canny edge detection on videos and images.", "Michael Sheldon <mike@mikeasoft.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the edgedetect's class */ diff --git a/ext/opencv/gstfaceblur.c b/ext/opencv/gstfaceblur.c index b4b6711b8..2f9dcf544 100644 --- a/ext/opencv/gstfaceblur.c +++ b/ext/opencv/gstfaceblur.c @@ -138,10 +138,8 @@ gst_face_blur_base_init (gpointer gclass) "Blurs faces in images and videos", "Michael Sheldon <mike@mikeasoft.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the faceblur's class */ diff --git a/ext/opencv/gstfacedetect.c b/ext/opencv/gstfacedetect.c index 7f2121626..01126710e 100644 --- a/ext/opencv/gstfacedetect.c +++ b/ext/opencv/gstfacedetect.c @@ -220,10 +220,8 @@ gst_face_detect_base_init (gpointer gclass) "Performs face detection on videos and images, providing detected positions via bus messages", "Michael Sheldon <mike@mikeasoft.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the facedetect's class */ diff --git a/ext/opencv/gstmotioncells.c b/ext/opencv/gstmotioncells.c index bf2eb7f60..49ad8ba3e 100644 --- a/ext/opencv/gstmotioncells.c +++ b/ext/opencv/gstmotioncells.c @@ -211,10 +211,8 @@ gst_motion_cells_base_init (gpointer gclass) "Performs motion detection on videos and images, providing detected motion cells index via bus messages", "Robert Jobbagy <jobbagy dot robert at gmail dot com>, Nicola Murino <nicola dot murino at gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the motioncells's class */ diff --git a/ext/opencv/gstpyramidsegment.c b/ext/opencv/gstpyramidsegment.c index 33b1eb0ba..21ea253c1 100644 --- a/ext/opencv/gstpyramidsegment.c +++ b/ext/opencv/gstpyramidsegment.c @@ -139,10 +139,8 @@ gst_pyramid_segment_base_init (gpointer gclass) "Applies pyramid segmentation to a video or image.", "Michael Sheldon <mike@mikeasoft.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the pyramidsegment's class */ diff --git a/ext/opencv/gsttemplatematch.c b/ext/opencv/gsttemplatematch.c index 4f26121db..569978270 100644 --- a/ext/opencv/gsttemplatematch.c +++ b/ext/opencv/gsttemplatematch.c @@ -129,10 +129,8 @@ gst_template_match_base_init (gpointer gclass) "Performs template matching on videos and images, providing detected positions via bus messages.", "Noam Lewis <jones.noamle@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the templatematch's class */ diff --git a/ext/opencv/gsttextoverlay.c b/ext/opencv/gsttextoverlay.c index 92169440f..db28352d3 100644 --- a/ext/opencv/gsttextoverlay.c +++ b/ext/opencv/gsttextoverlay.c @@ -156,10 +156,8 @@ gst_opencv_text_overlay_base_init (gpointer gclass) "Filter/Effect/Video", "Write text on the top of video", "sreerenj<bsreerenj@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the opencvtextoverlay's class */ diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c index 89639b12b..585b38335 100644 --- a/ext/opus/gstopusdec.c +++ b/ext/opus/gstopusdec.c @@ -103,10 +103,10 @@ gst_opus_dec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&opus_dec_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&opus_dec_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &opus_dec_src_factory); + gst_element_class_add_static_pad_template (element_class, + &opus_dec_sink_factory); gst_element_class_set_details_simple (element_class, "Opus audio decoder", "Codec/Decoder/Audio", "decode opus streams to audio", diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c index 8ca1158c9..f747a3736 100644 --- a/ext/opus/gstopusenc.c +++ b/ext/opus/gstopusenc.c @@ -204,10 +204,8 @@ gst_opus_enc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Opus audio encoder", "Codec/Encoder/Audio", "Encodes audio in Opus format", diff --git a/ext/resindvd/resindvdbin.c b/ext/resindvd/resindvdbin.c index c2dcc5b2d..cbede40eb 100644 --- a/ext/resindvd/resindvdbin.c +++ b/ext/resindvd/resindvdbin.c @@ -101,12 +101,12 @@ rsn_dvdbin_base_init (gpointer gclass) GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&subpicture_src_template)); + gst_element_class_add_static_pad_template (element_class, + &video_src_template); + gst_element_class_add_static_pad_template (element_class, + &audio_src_template); + gst_element_class_add_static_pad_template (element_class, + &subpicture_src_template); gst_element_class_set_details_simple (element_class, "rsndvdbin", "Generic/Bin/Player", "DVD playback element", "Jan Schmidt <thaytan@noraisin.net>"); diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 75333ea39..499b44fdd 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -193,8 +193,7 @@ rsn_dvdsrc_base_init (gpointer gclass) GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); gst_element_class_set_details_simple (element_class, "Resin DVD Src", "Source/DVD", "DVD source element", "Jan Schmidt <thaytan@noraisin.net>"); } diff --git a/ext/resindvd/rsnaudiomunge.c b/ext/resindvd/rsnaudiomunge.c index 5e6f9cc6f..94cf7b150 100644 --- a/ext/resindvd/rsnaudiomunge.c +++ b/ext/resindvd/rsnaudiomunge.c @@ -84,10 +84,9 @@ rsn_audiomunge_class_init (RsnAudioMungeClass * klass) GST_DEBUG_CATEGORY_INIT (rsn_audiomunge_debug, "rsnaudiomunge", 0, "ResinDVD audio stream regulator"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "RsnAudioMunge", "Audio/Filter", diff --git a/ext/resindvd/rsndec.c b/ext/resindvd/rsndec.c index 7db1e46eb..fb9f1f92b 100644 --- a/ext/resindvd/rsndec.c +++ b/ext/resindvd/rsndec.c @@ -381,10 +381,10 @@ rsn_audiodec_class_init (RsnAudioDecClass * klass) GstElementClass *element_class = GST_ELEMENT_CLASS (klass); RsnDecClass *dec_class = RSN_DEC_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &audio_src_template); + gst_element_class_add_static_pad_template (element_class, + &audio_sink_template); gst_element_class_set_details_simple (element_class, "RsnAudioDec", "Audio/Decoder", @@ -431,10 +431,10 @@ rsn_videodec_class_init (RsnAudioDecClass * klass) GstElementClass *element_class = GST_ELEMENT_CLASS (klass); RsnDecClass *dec_class = RSN_DEC_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &video_src_template); + gst_element_class_add_static_pad_template (element_class, + &video_sink_template); gst_element_class_set_details_simple (element_class, "RsnVideoDec", "Video/Decoder", diff --git a/ext/resindvd/rsnparsetter.c b/ext/resindvd/rsnparsetter.c index 02fdd1f18..baaea2b44 100644 --- a/ext/resindvd/rsnparsetter.c +++ b/ext/resindvd/rsnparsetter.c @@ -59,10 +59,8 @@ rsn_parsetter_base_init (gpointer gclass) GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Resin Aspect Ratio Setter", "Filter/Video", "Overrides caps on video buffers to force a particular display ratio", diff --git a/ext/resindvd/rsnstreamselector.c b/ext/resindvd/rsnstreamselector.c index eaae4f61c..33fa00310 100644 --- a/ext/resindvd/rsnstreamselector.c +++ b/ext/resindvd/rsnstreamselector.c @@ -481,10 +481,10 @@ rsn_stream_selector_base_init (RsnStreamSelectorClass * klass) "Ronald S. Bultje <rbultje@ronald.bitfreak.net>, " "Jan Schmidt <thaytan@mad.scientist.com>, " "Wim Taymans <wim.taymans@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&rsn_stream_selector_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&rsn_stream_selector_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &rsn_stream_selector_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &rsn_stream_selector_src_factory); } static void diff --git a/ext/rsvg/gstrsvgdec.c b/ext/rsvg/gstrsvgdec.c index f7cb701aa..9ebb84134 100644 --- a/ext/rsvg/gstrsvgdec.c +++ b/ext/rsvg/gstrsvgdec.c @@ -82,10 +82,8 @@ gst_rsvg_dec_base_init (gpointer g_class) "Uses librsvg to decode SVG images", "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); + gst_element_class_add_static_pad_template (element_class, &sink_factory); + gst_element_class_add_static_pad_template (element_class, &src_factory); } static void diff --git a/ext/rsvg/gstrsvgoverlay.c b/ext/rsvg/gstrsvgoverlay.c index 1cbd0990c..121d4d252 100644 --- a/ext/rsvg/gstrsvgoverlay.c +++ b/ext/rsvg/gstrsvgoverlay.c @@ -446,12 +446,11 @@ gst_rsvg_overlay_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&data_sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &video_sink_template); + gst_element_class_add_static_pad_template (element_class, + &data_sink_template); gst_element_class_set_details_simple (element_class, "RSVG overlay", "Filter/Editor/Video", diff --git a/ext/rtmp/gstrtmpsink.c b/ext/rtmp/gstrtmpsink.c index db066847d..bfc8f3c0f 100644 --- a/ext/rtmp/gstrtmpsink.c +++ b/ext/rtmp/gstrtmpsink.c @@ -109,8 +109,8 @@ gst_rtmp_sink_base_init (gpointer klass) "Sink/Network", "Sends FLV content to a server via RTMP", "Jan Schmidt <thaytan@noraisin.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } /* initialize the plugin's class */ diff --git a/ext/rtmp/gstrtmpsrc.c b/ext/rtmp/gstrtmpsrc.c index 578bd8f90..e9ab2ebb8 100644 --- a/ext/rtmp/gstrtmpsrc.c +++ b/ext/rtmp/gstrtmpsrc.c @@ -114,8 +114,7 @@ gst_rtmp_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); gst_element_class_set_details_simple (element_class, "RTMP Source", diff --git a/ext/schroedinger/gstschrodec.c b/ext/schroedinger/gstschrodec.c index 126ef1fed..70c30a52d 100644 --- a/ext/schroedinger/gstschrodec.c +++ b/ext/schroedinger/gstschrodec.c @@ -114,10 +114,10 @@ gst_schro_dec_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_schro_dec_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_schro_dec_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_schro_dec_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_schro_dec_sink_template); gst_element_class_set_details_simple (element_class, "Dirac Decoder", "Codec/Decoder/Video", diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c index beda4eac9..14932da3d 100644 --- a/ext/schroedinger/gstschroenc.c +++ b/ext/schroedinger/gstschroenc.c @@ -125,10 +125,10 @@ gst_schro_enc_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_schro_enc_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_schro_enc_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_schro_enc_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_schro_enc_sink_template); gst_element_class_set_details_simple (element_class, "Dirac Encoder", "Codec/Encoder/Video", diff --git a/ext/sdl/sdlaudiosink.c b/ext/sdl/sdlaudiosink.c index 707459fc7..98f5bb709 100644 --- a/ext/sdl/sdlaudiosink.c +++ b/ext/sdl/sdlaudiosink.c @@ -149,8 +149,8 @@ gst_sdlaudio_sink_base_init (gpointer g_class) "Output to a sound card via SDLAUDIO", "Edgard Lima <edgard.lima@indt.org.br>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sdlaudiosink_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &sdlaudiosink_sink_factory); } static void diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c index fa05ace1a..fe155a45e 100644 --- a/ext/sdl/sdlvideosink.c +++ b/ext/sdl/sdlvideosink.c @@ -151,6 +151,7 @@ gst_sdlvideosink_base_init (gpointer g_class) GST_PAD_SINK, GST_PAD_ALWAYS, capslist); gst_element_class_add_pad_template (element_class, sink_template); + gst_object_unref (sink_template); gst_element_class_set_details_simple (element_class, "SDL video sink", "Sink/Video", "An SDL-based videosink", "Ronald Bultje <rbultje@ronald.bitfreak.net>, " diff --git a/ext/shout/gstshout.c b/ext/shout/gstshout.c index c5a71136a..59cfc1409 100644 --- a/ext/shout/gstshout.c +++ b/ext/shout/gstshout.c @@ -110,8 +110,8 @@ gst_icecastsend_base_init (GstIcecastSendClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &sink_template_factory); gst_element_class_set_details_simple (element_class, "Icecast network sink", "Sink/Network", "Sends data to an icecast server using libshout", diff --git a/ext/snapshot/gstsnapshot.c b/ext/snapshot/gstsnapshot.c index 97ffbed5f..6b7858161 100644 --- a/ext/snapshot/gstsnapshot.c +++ b/ext/snapshot/gstsnapshot.c @@ -116,10 +116,10 @@ gst_snapshot_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&snapshot_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&snapshot_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &snapshot_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &snapshot_src_factory); gst_element_class_set_details_simple (element_class, "Snapshot", "Filter/Editor/Video", diff --git a/ext/sndfile/gstsfsink.c b/ext/sndfile/gstsfsink.c index a4ef877fa..273c840b8 100644 --- a/ext/sndfile/gstsfsink.c +++ b/ext/sndfile/gstsfsink.c @@ -84,8 +84,8 @@ gst_sf_sink_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GST_DEBUG_CATEGORY_INIT (gst_sf_debug, "sfsink", 0, "sfsink element"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sf_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &sf_sink_factory); gst_element_class_set_details_simple (element_class, "Sndfile sink", "Sink/Audio", "Write audio streams to disk using libsndfile", diff --git a/ext/sndfile/gstsfsrc.c b/ext/sndfile/gstsfsrc.c index 226f54085..8dc79591e 100644 --- a/ext/sndfile/gstsfsrc.c +++ b/ext/sndfile/gstsfsrc.c @@ -83,8 +83,8 @@ gst_sf_src_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sf_src_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &sf_src_factory); gst_element_class_set_details_simple (gstelement_class, "Sndfile source", "Source/Audio", diff --git a/ext/soundtouch/gstpitch.cc b/ext/soundtouch/gstpitch.cc index 6b5b95f15..332e0edd3 100644 --- a/ext/soundtouch/gstpitch.cc +++ b/ext/soundtouch/gstpitch.cc @@ -106,10 +106,10 @@ gst_pitch_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_pitch_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_pitch_sink_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_pitch_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_pitch_sink_template); gst_element_class_set_details_simple (gstelement_class, "Pitch controller", "Filter/Converter/Audio", "Control the pitch of an audio stream", diff --git a/ext/spandsp/gstspanplc.c b/ext/spandsp/gstspanplc.c index 58edce9f4..3e174703c 100644 --- a/ext/spandsp/gstspanplc.c +++ b/ext/spandsp/gstspanplc.c @@ -71,10 +71,8 @@ gst_span_plc_base_init (gpointer gclass) { GstElementClass *element_class = (GstElementClass *) gclass; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "SpanDSP PLC", "Filter/Effect/Audio", diff --git a/ext/spc/gstspc.c b/ext/spc/gstspc.c index 2c74a9c56..70d2340ad 100644 --- a/ext/spc/gstspc.c +++ b/ext/spc/gstspc.c @@ -108,10 +108,8 @@ gst_spc_dec_base_init (gpointer g_class) "Uses OpenSPC to emulate an SPC processor", "Chris Lee <clee@kde.org>, Brian Koropoff <bkoropoff@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); + gst_element_class_add_static_pad_template (element_class, &sink_factory); + gst_element_class_add_static_pad_template (element_class, &src_factory); } static void diff --git a/ext/swfdec/gstswfdec.c b/ext/swfdec/gstswfdec.c index 9394ddec3..43e06de72 100644 --- a/ext/swfdec/gstswfdec.c +++ b/ext/swfdec/gstswfdec.c @@ -213,12 +213,12 @@ gst_swfdec_base_init (gpointer g_class) "Uses libswfdec to decode Flash video streams", "David Schleef <ds@schleef.org>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_template_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_template_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &video_template_factory); + gst_element_class_add_static_pad_template (element_class, + &audio_template_factory); + gst_element_class_add_static_pad_template (element_class, + &sink_template_factory); } static void diff --git a/ext/teletextdec/gstteletextdec.c b/ext/teletextdec/gstteletextdec.c index 846c243e4..bd182670c 100644 --- a/ext/teletextdec/gstteletextdec.c +++ b/ext/teletextdec/gstteletextdec.c @@ -196,10 +196,9 @@ gst_teletextdec_base_init (gpointer klass) "Sebastian Pölsterl <sebp@k-d-w.org>, " "Andoni Morales Alastruey <ylatuya@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } /* initialize the gstteletext's class */ diff --git a/ext/timidity/gsttimidity.c b/ext/timidity/gsttimidity.c index cbbcc0da1..91e47ced4 100644 --- a/ext/timidity/gsttimidity.c +++ b/ext/timidity/gsttimidity.c @@ -95,10 +95,8 @@ gst_timidity_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Timidity", "Codec/Decoder/Audio", "Midi Synthesizer Element", "Wouter Paesen <wouter@blue-gate.be>"); diff --git a/ext/timidity/gstwildmidi.c b/ext/timidity/gstwildmidi.c index 6def9f946..e78ecc11c 100644 --- a/ext/timidity/gstwildmidi.c +++ b/ext/timidity/gstwildmidi.c @@ -120,10 +120,8 @@ gst_wildmidi_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "WildMidi", "Codec/Decoder/Audio", "Midi Synthesizer Element", "Wouter Paesen <wouter@blue-gate.be>"); diff --git a/ext/voamrwbenc/gstvoamrwbenc.c b/ext/voamrwbenc/gstvoamrwbenc.c index 4ecc5768c..0017b0246 100644 --- a/ext/voamrwbenc/gstvoamrwbenc.c +++ b/ext/voamrwbenc/gstvoamrwbenc.c @@ -160,10 +160,9 @@ gst_voamrwbenc_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_details_simple (element_class, "AMR-WB audio encoder", "Codec/Encoder/Audio", diff --git a/ext/vp8/gstvp8dec.c b/ext/vp8/gstvp8dec.c index 248f444d4..e3a2fd9bd 100644 --- a/ext/vp8/gstvp8dec.c +++ b/ext/vp8/gstvp8dec.c @@ -128,10 +128,10 @@ gst_vp8_dec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_vp8_dec_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_vp8_dec_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_vp8_dec_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_vp8_dec_sink_template); gst_element_class_set_details_simple (element_class, "On2 VP8 Decoder", diff --git a/ext/vp8/gstvp8enc.c b/ext/vp8/gstvp8enc.c index e83297564..5ed11e3a0 100644 --- a/ext/vp8/gstvp8enc.c +++ b/ext/vp8/gstvp8enc.c @@ -269,10 +269,10 @@ gst_vp8_enc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_vp8_enc_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_vp8_enc_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_vp8_enc_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_vp8_enc_sink_template); gst_element_class_set_details_simple (element_class, "On2 VP8 Encoder", diff --git a/ext/xvid/gstxviddec.c b/ext/xvid/gstxviddec.c index c290777a9..8cd4997ee 100644 --- a/ext/xvid/gstxviddec.c +++ b/ext/xvid/gstxviddec.c @@ -100,10 +100,9 @@ gst_xviddec_base_init (GstXvidDecClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_details_simple (element_class, "XviD video decoder", "Codec/Decoder/Video", diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c index dc60d0d8c..d477ea079 100644 --- a/ext/xvid/gstxvidenc.c +++ b/ext/xvid/gstxvidenc.c @@ -218,10 +218,9 @@ gst_xvidenc_base_init (GstXvidEncClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_details_simple (element_class, "XviD video encoder", "Codec/Encoder/Video", "XviD encoder based on xvidcore", diff --git a/ext/zbar/gstzbar.c b/ext/zbar/gstzbar.c index cdeb89889..c0310349d 100644 --- a/ext/zbar/gstzbar.c +++ b/ext/zbar/gstzbar.c @@ -145,10 +145,10 @@ gst_zbar_base_init (gpointer g_class) "Detect bar codes in the video streams", "Stefan Kost <ensonic@users.sf.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_zbar_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_zbar_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_zbar_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_zbar_src_template); } static void diff --git a/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c index 904eba0eb..81d7b2c90 100644 --- a/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c +++ b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c @@ -491,14 +491,14 @@ gst_base_camera_src_base_init (gpointer g_class) "Base class for camerabin src bin", "Source/Video", "Abstracts capture device for camerabin2", "Rob Clark <rob@ti.com>"); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&vfsrc_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &vfsrc_template); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&imgsrc_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &imgsrc_template); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&vidsrc_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &vidsrc_template); } static void diff --git a/gst-libs/gst/signalprocessor/gstsignalprocessor.c b/gst-libs/gst/signalprocessor/gstsignalprocessor.c index 2cd33a42e..7b7826a43 100644 --- a/gst-libs/gst/signalprocessor/gstsignalprocessor.c +++ b/gst-libs/gst/signalprocessor/gstsignalprocessor.c @@ -121,6 +121,7 @@ gst_signal_processor_class_add_pad_template (GstSignalProcessorClass * klass, GST_SIGNAL_PROCESSOR_PAD_TEMPLATE (new)->channels = channels; gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass), new); + g_object_unref (new); } diff --git a/gst/adpcmdec/adpcmdec.c b/gst/adpcmdec/adpcmdec.c index 0fcfeb03f..b97584cb9 100644 --- a/gst/adpcmdec/adpcmdec.c +++ b/gst/adpcmdec/adpcmdec.c @@ -562,10 +562,10 @@ adpcmdec_class_init (ADPCMDecClass * klass) adpcmdec_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&adpcmdec_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&adpcmdec_src_template)); + gst_element_class_add_static_pad_template (element_class, + &adpcmdec_sink_template); + gst_element_class_add_static_pad_template (element_class, + &adpcmdec_src_template); gst_element_class_set_details_simple (element_class, "ADPCM decoder", "Codec/Decoder/Audio", "Decode MS and IMA ADPCM audio", diff --git a/gst/adpcmenc/adpcmenc.c b/gst/adpcmenc/adpcmenc.c index 5f6a24424..d8ce1db49 100644 --- a/gst/adpcmenc/adpcmenc.c +++ b/gst/adpcmenc/adpcmenc.c @@ -544,10 +544,10 @@ adpcmenc_class_init (ADPCMEncClass * klass) adpcmenc_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&adpcmenc_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&adpcmenc_src_template)); + gst_element_class_add_static_pad_template (element_class, + &adpcmenc_sink_template); + gst_element_class_add_static_pad_template (element_class, + &adpcmenc_src_template); gst_element_class_set_details_simple (element_class, "ADPCM encoder", "Codec/Encoder/Audio", "Encode ADPCM audio", diff --git a/gst/aiff/aiffmux.c b/gst/aiff/aiffmux.c index a2d99f587..0d2772af5 100644 --- a/gst/aiff/aiffmux.c +++ b/gst/aiff/aiffmux.c @@ -110,10 +110,8 @@ gst_aiff_mux_base_init (gpointer gclass) "AIFF audio muxer", "Muxer/Audio", "Multiplex raw audio into AIFF", "Robert Swain <robert.swain@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } static GstStateChangeReturn diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c index 575b309b5..6dbee6868 100644 --- a/gst/aiff/aiffparse.c +++ b/gst/aiff/aiffparse.c @@ -105,10 +105,10 @@ gst_aiff_parse_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &sink_template_factory); + gst_element_class_add_static_pad_template (element_class, + &src_template_factory); gst_element_class_set_details_simple (element_class, "AIFF audio demuxer", "Codec/Demuxer/Audio", diff --git a/gst/asfmux/gstasfmux.c b/gst/asfmux/gstasfmux.c index 4027525e5..8e6af1df7 100644 --- a/gst/asfmux/gstasfmux.c +++ b/gst/asfmux/gstasfmux.c @@ -238,12 +238,11 @@ gst_asf_mux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, + &audio_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &video_sink_factory); gst_element_class_set_details_simple (element_class, "ASF muxer", "Codec/Muxer", diff --git a/gst/asfmux/gstasfparse.c b/gst/asfmux/gstasfparse.c index ab1f69152..4f7bc59ba 100644 --- a/gst/asfmux/gstasfparse.c +++ b/gst/asfmux/gstasfparse.c @@ -469,10 +469,8 @@ gst_asf_parse_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "ASF parser", "Parser", "Parses ASF", "Thiago Santos <thiagoss@embedded.ufcg.edu.br>"); diff --git a/gst/asfmux/gstrtpasfpay.c b/gst/asfmux/gstrtpasfpay.c index 157533f92..22ad431e3 100644 --- a/gst/asfmux/gstrtpasfpay.c +++ b/gst/asfmux/gstrtpasfpay.c @@ -85,10 +85,10 @@ gst_rtp_asf_pay_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rtp_asf_pay_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rtp_asf_pay_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_rtp_asf_pay_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_rtp_asf_pay_src_template); gst_element_class_set_details_simple (element_class, "RTP ASF payloader", "Codec/Payloader/Network", "Payload-encodes ASF into RTP packets (MS_RTSP)", diff --git a/gst/audiobuffer/gstaudioringbuffer.c b/gst/audiobuffer/gstaudioringbuffer.c index e3bc47a56..6d87df2a4 100644 --- a/gst/audiobuffer/gstaudioringbuffer.c +++ b/gst/audiobuffer/gstaudioringbuffer.c @@ -320,10 +320,10 @@ gst_audio_ringbuffer_class_init (GstAudioRingbufferClass * klass) G_MAXINT64, DEFAULT_SEGMENT_TIME, G_PARAM_READWRITE | 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_details_simple (gstelement_class, "AudioRingbuffer", "Generic", diff --git a/gst/audiovisualizers/gstspacescope.c b/gst/audiovisualizers/gstspacescope.c index 101d0a9ae..41f8bdb41 100644 --- a/gst/audiovisualizers/gstspacescope.c +++ b/gst/audiovisualizers/gstspacescope.c @@ -113,10 +113,10 @@ gst_space_scope_base_init (gpointer g_class) "Visualization", "Simple stereo visualizer", "Stefan Kost <ensonic@users.sf.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_space_scope_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_space_scope_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_space_scope_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_space_scope_sink_template); } static void diff --git a/gst/audiovisualizers/gstspectrascope.c b/gst/audiovisualizers/gstspectrascope.c index 4ebc7a15b..1b61f567f 100644 --- a/gst/audiovisualizers/gstspectrascope.c +++ b/gst/audiovisualizers/gstspectrascope.c @@ -75,10 +75,10 @@ gst_spectra_scope_base_init (gpointer g_class) "Frequency spectrum scope", "Visualization", "Simple frequency spectrum scope", "Stefan Kost <ensonic@users.sf.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_spectra_scope_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_spectra_scope_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_spectra_scope_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_spectra_scope_sink_template); } static void diff --git a/gst/audiovisualizers/gstsynaescope.c b/gst/audiovisualizers/gstsynaescope.c index 414e6087e..7364b8f93 100644 --- a/gst/audiovisualizers/gstsynaescope.c +++ b/gst/audiovisualizers/gstsynaescope.c @@ -75,10 +75,10 @@ gst_synae_scope_base_init (gpointer g_class) "Creates video visualizations of audio input, using stereo and pitch information", "Stefan Kost <ensonic@users.sf.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_synae_scope_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_synae_scope_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_synae_scope_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_synae_scope_sink_template); } static void diff --git a/gst/audiovisualizers/gstwavescope.c b/gst/audiovisualizers/gstwavescope.c index 433a935e3..71468aed7 100644 --- a/gst/audiovisualizers/gstwavescope.c +++ b/gst/audiovisualizers/gstwavescope.c @@ -113,10 +113,10 @@ gst_wave_scope_base_init (gpointer g_class) "Visualization", "Simple waveform oscilloscope", "Stefan Kost <ensonic@users.sf.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_wave_scope_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_wave_scope_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_wave_scope_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_wave_scope_sink_template); } static void diff --git a/gst/autoconvert/gstautoconvert.c b/gst/autoconvert/gstautoconvert.c index df094d85b..3267f82ba 100644 --- a/gst/autoconvert/gstautoconvert.c +++ b/gst/autoconvert/gstautoconvert.c @@ -169,10 +169,8 @@ gst_auto_convert_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "Select convertor based on caps", "Generic/Bin", diff --git a/gst/autoconvert/gstautovideoconvert.c b/gst/autoconvert/gstautovideoconvert.c index 00ee6db47..cf35bb96d 100644 --- a/gst/autoconvert/gstautovideoconvert.c +++ b/gst/autoconvert/gstautovideoconvert.c @@ -133,10 +133,8 @@ gst_auto_video_convert_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "Select color space convertor based on caps", "Generic/Bin", diff --git a/gst/bayer/gstbayer2rgb.c b/gst/bayer/gstbayer2rgb.c index 8f9ed124d..388ee2ea1 100644 --- a/gst/bayer/gstbayer2rgb.c +++ b/gst/bayer/gstbayer2rgb.c @@ -171,18 +171,23 @@ static void gst_bayer2rgb_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + GstPadTemplate *pad_template; gst_element_class_set_details_simple (element_class, "Bayer to RGB decoder for cameras", "Filter/Converter/Video", "Converts video/x-raw-bayer to video/x-raw-rgb", "William Brack <wbrack@mmm.com.hk>"); - gst_element_class_add_pad_template (element_class, + pad_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - gst_caps_from_string (SRC_CAPS))); - gst_element_class_add_pad_template (element_class, + gst_caps_from_string (SRC_CAPS)); + gst_element_class_add_pad_template (element_class, pad_template); + gst_object_unref (pad_template); + pad_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - gst_caps_from_string (SINK_CAPS))); + gst_caps_from_string (SINK_CAPS)); + gst_element_class_add_pad_template (element_class, pad_template); + gst_object_unref (pad_template); } static void diff --git a/gst/bayer/gstrgb2bayer.c b/gst/bayer/gstrgb2bayer.c index 819d0e6ac..fb7e9cbba 100644 --- a/gst/bayer/gstrgb2bayer.c +++ b/gst/bayer/gstrgb2bayer.c @@ -92,10 +92,10 @@ gst_rgb2bayer_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rgb2bayer_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rgb2bayer_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_rgb2bayer_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_rgb2bayer_sink_template); gst_element_class_set_details_simple (element_class, "RGB to Bayer converter", diff --git a/gst/camerabin/camerabinimage.c b/gst/camerabin/camerabinimage.c index 542a22726..c69a5c339 100644 --- a/gst/camerabin/camerabinimage.c +++ b/gst/camerabin/camerabinimage.c @@ -102,8 +102,7 @@ gst_camerabin_image_base_init (gpointer klass) { GstElementClass *eklass = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (eklass, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (eklass, &sink_template); gst_element_class_set_details_simple (eklass, "Image capture bin for camerabin", "Bin/Image", "Process and store image data", diff --git a/gst/camerabin/camerabinvideo.c b/gst/camerabin/camerabinvideo.c index 868fdcead..a98807b2d 100644 --- a/gst/camerabin/camerabinvideo.c +++ b/gst/camerabin/camerabinvideo.c @@ -118,10 +118,8 @@ gst_camerabin_video_base_init (gpointer klass) { GstElementClass *eklass = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (eklass, - gst_static_pad_template_get (&sink_template)); - gst_element_class_add_pad_template (eklass, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (eklass, &sink_template); + gst_element_class_add_static_pad_template (eklass, &src_template); gst_element_class_set_details_simple (eklass, "Video capture bin for camerabin", "Bin/Video", "Process and store video data", diff --git a/gst/camerabin/gstinputselector.c b/gst/camerabin/gstinputselector.c index ef4e23637..62ee38044 100644 --- a/gst/camerabin/gstinputselector.c +++ b/gst/camerabin/gstinputselector.c @@ -745,10 +745,10 @@ gst_input_selector_base_init (GstInputSelectorClass * klass) "Julien Moutte <julien@moutte.net>, " "Jan Schmidt <thaytan@mad.scientist.com>, " "Wim Taymans <wim.taymans@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_input_selector_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_input_selector_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &gst_input_selector_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &gst_input_selector_src_factory); } static void diff --git a/gst/camerabin2/gstviewfinderbin.c b/gst/camerabin2/gstviewfinderbin.c index 746a6d904..1e256ccd7 100644 --- a/gst/camerabin2/gstviewfinderbin.c +++ b/gst/camerabin2/gstviewfinderbin.c @@ -100,8 +100,8 @@ gst_viewfinder_bin_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "Viewfinder Bin", "Sink/Video", "Viewfinder Bin used in camerabin2", diff --git a/gst/cdxaparse/gstcdxaparse.c b/gst/cdxaparse/gstcdxaparse.c index efcda2117..1f997b7bb 100644 --- a/gst/cdxaparse/gstcdxaparse.c +++ b/gst/cdxaparse/gstcdxaparse.c @@ -71,10 +71,10 @@ gst_cdxa_parse_base_init (gpointer g_class) "Wim Taymans <wim.taymans@tvd.be>"); /* register src pads */ - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &sink_template_factory); + gst_element_class_add_static_pad_template (element_class, + &src_template_factory); } static void diff --git a/gst/cdxaparse/gstvcdparse.c b/gst/cdxaparse/gstvcdparse.c index 4bf148b82..601cb6b59 100644 --- a/gst/cdxaparse/gstvcdparse.c +++ b/gst/cdxaparse/gstvcdparse.c @@ -55,10 +55,8 @@ gst_vcd_parse_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); + gst_element_class_add_static_pad_template (element_class, &sink_factory); + gst_element_class_add_static_pad_template (element_class, &src_factory); gst_element_class_set_details_simple (element_class, "(S)VCD stream parser", "Codec/Parser", "Strip (S)VCD stream from its sync headers", diff --git a/gst/chart/gstchart.c b/gst/chart/gstchart.c index 4e818b62a..da0a622ff 100644 --- a/gst/chart/gstchart.c +++ b/gst/chart/gstchart.c @@ -138,10 +138,8 @@ gst_chart_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Chart drawer", "Visualization", "Takes frames of data and outputs video frames of a chart of data", diff --git a/gst/coloreffects/gstchromahold.c b/gst/coloreffects/gstchromahold.c index a563ab3a6..e6e7c4028 100644 --- a/gst/coloreffects/gstchromahold.c +++ b/gst/coloreffects/gstchromahold.c @@ -128,10 +128,10 @@ gst_chroma_hold_base_init (gpointer g_class) "Removes all color information except for one color", "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_chroma_hold_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_chroma_hold_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_chroma_hold_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_chroma_hold_src_template); GST_DEBUG_CATEGORY_INIT (gst_chroma_hold_debug, "chromahold", 0, "chromahold - Removes all color information except for one color"); diff --git a/gst/coloreffects/gstcoloreffects.c b/gst/coloreffects/gstcoloreffects.c index df78b8660..0941df195 100644 --- a/gst/coloreffects/gstcoloreffects.c +++ b/gst/coloreffects/gstcoloreffects.c @@ -506,10 +506,10 @@ gst_color_effects_base_init (gpointer g_class) "Color Look-up Table filter", "Filippo Argiolas <filippo.argiolas@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_color_effects_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_color_effects_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_color_effects_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_color_effects_src_template); } static void diff --git a/gst/colorspace/gstcolorspace.c b/gst/colorspace/gstcolorspace.c index 1f396c7e8..c1d68e72d 100644 --- a/gst/colorspace/gstcolorspace.c +++ b/gst/colorspace/gstcolorspace.c @@ -416,10 +416,10 @@ gst_csp_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_csp_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_csp_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_csp_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_csp_sink_template); gst_element_class_set_details_simple (element_class, " Colorspace converter", "Filter/Converter/Video", diff --git a/gst/dataurisrc/gstdataurisrc.c b/gst/dataurisrc/gstdataurisrc.c index 446ca8407..4589bccf5 100644 --- a/gst/dataurisrc/gstdataurisrc.c +++ b/gst/dataurisrc/gstdataurisrc.c @@ -98,8 +98,7 @@ gst_data_uri_src_base_init (gpointer klass) { GstElementClass *element_class = (GstElementClass *) (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); gst_element_class_set_details_simple (element_class, "data: URI source element", "Source", "Handles data: uris", "Philippe Normand <pnormand@igalia.com>, " diff --git a/gst/dccp/gstdccpclientsink.c b/gst/dccp/gstdccpclientsink.c index a890dcb71..b4ccc87c0 100644 --- a/gst/dccp/gstdccpclientsink.c +++ b/gst/dccp/gstdccpclientsink.c @@ -228,8 +228,7 @@ gst_dccp_client_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "DCCP client sink", "Sink/Network", diff --git a/gst/dccp/gstdccpclientsrc.c b/gst/dccp/gstdccpclientsrc.c index 55f9185e9..f95d9a731 100644 --- a/gst/dccp/gstdccpclientsrc.c +++ b/gst/dccp/gstdccpclientsrc.c @@ -272,8 +272,7 @@ gst_dccp_client_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); gst_element_class_set_details_simple (element_class, "DCCP client source", "Source/Network", diff --git a/gst/dccp/gstdccpserversink.c b/gst/dccp/gstdccpserversink.c index 089fe3a66..bb0e6f726 100644 --- a/gst/dccp/gstdccpserversink.c +++ b/gst/dccp/gstdccpserversink.c @@ -336,8 +336,7 @@ gst_dccp_server_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "DCCP server sink", "Sink/Network", diff --git a/gst/dccp/gstdccpserversrc.c b/gst/dccp/gstdccpserversrc.c index 5dbb63313..aa9256d47 100644 --- a/gst/dccp/gstdccpserversrc.c +++ b/gst/dccp/gstdccpserversrc.c @@ -262,8 +262,7 @@ gst_dccp_server_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); gst_element_class_set_details_simple (element_class, "DCCP server source", "Source/Network", diff --git a/gst/debugutils/fpsdisplaysink.c b/gst/debugutils/fpsdisplaysink.c index 489d88183..8fe89155e 100644 --- a/gst/debugutils/fpsdisplaysink.c +++ b/gst/debugutils/fpsdisplaysink.c @@ -205,8 +205,8 @@ fps_display_sink_class_init (GstFPSDisplaySinkClass * klass) gstelement_klass->change_state = fps_display_sink_change_state; - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&fps_display_sink_template)); + gst_element_class_add_static_pad_template (gstelement_klass, + &fps_display_sink_template); gst_element_class_set_details_simple (gstelement_klass, "Measure and show framerate on videosink", "Sink/Video", diff --git a/gst/debugutils/gstchecksumsink.c b/gst/debugutils/gstchecksumsink.c index bf9fba6f2..5beef5a18 100644 --- a/gst/debugutils/gstchecksumsink.c +++ b/gst/debugutils/gstchecksumsink.c @@ -55,10 +55,10 @@ gst_checksum_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_checksum_sink_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_checksum_sink_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_checksum_sink_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_checksum_sink_sink_template); gst_element_class_set_details_simple (element_class, "Checksum sink", "Debug/Sink", "Calculates a checksum for buffers", diff --git a/gst/debugutils/gstchopmydata.c b/gst/debugutils/gstchopmydata.c index 16109ad81..48da58f5e 100644 --- a/gst/debugutils/gstchopmydata.c +++ b/gst/debugutils/gstchopmydata.c @@ -98,10 +98,10 @@ gst_chop_my_data_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_chop_my_data_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_chop_my_data_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_chop_my_data_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_chop_my_data_sink_template); gst_element_class_set_details_simple (element_class, "FIXME", "Generic", "FIXME", "David Schleef <ds@schleef.org>"); diff --git a/gst/debugutils/gstcompare.c b/gst/debugutils/gstcompare.c index abf563c6c..92b8fa42a 100644 --- a/gst/debugutils/gstcompare.c +++ b/gst/debugutils/gstcompare.c @@ -123,12 +123,10 @@ gst_compare_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&check_sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); + gst_element_class_add_static_pad_template (element_class, + &check_sink_factory); gst_element_class_set_details_simple (element_class, "Compare buffers", "Filter/Debug", "Compares incoming buffers", "Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>"); diff --git a/gst/debugutils/gstdebugspy.c b/gst/debugutils/gstdebugspy.c index 0c9e3300f..72387ce41 100644 --- a/gst/debugutils/gstdebugspy.c +++ b/gst/debugutils/gstdebugspy.c @@ -120,10 +120,8 @@ gst_debug_spy_base_init (gpointer gclass) "DebugSpy provides information on buffers with bus messages", "Guillaume Emont <gemont@igalia.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the debugspy's class */ diff --git a/gst/dtmf/gstdtmfdetect.c b/gst/dtmf/gstdtmfdetect.c index 0bb924264..7d76aa067 100644 --- a/gst/dtmf/gstdtmfdetect.c +++ b/gst/dtmf/gstdtmfdetect.c @@ -118,10 +118,8 @@ gst_dtmf_detect_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "DTMF detector element", "Filter/Analyzer/Audio", diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c index 929147fe0..e3face849 100644 --- a/gst/dtmf/gstdtmfsrc.c +++ b/gst/dtmf/gstdtmfsrc.c @@ -241,8 +241,8 @@ gst_dtmf_src_base_init (gpointer g_class) GST_DEBUG_CATEGORY_INIT (gst_dtmf_src_debug, "dtmfsrc", 0, "dtmfsrc element"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_dtmf_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_dtmf_src_template); gst_element_class_set_details_simple (element_class, "DTMF tone generator", "Source/Audio", diff --git a/gst/dtmf/gstrtpdtmfdepay.c b/gst/dtmf/gstrtpdtmfdepay.c index 603416dd6..da1ec2f95 100644 --- a/gst/dtmf/gstrtpdtmfdepay.c +++ b/gst/dtmf/gstrtpdtmfdepay.c @@ -216,10 +216,10 @@ gst_rtp_dtmf_depay_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rtp_dtmf_depay_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rtp_dtmf_depay_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_rtp_dtmf_depay_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_rtp_dtmf_depay_sink_template); GST_DEBUG_CATEGORY_INIT (gst_rtp_dtmf_depay_debug, diff --git a/gst/dtmf/gstrtpdtmfsrc.c b/gst/dtmf/gstrtpdtmfsrc.c index ee8703563..605aca45e 100644 --- a/gst/dtmf/gstrtpdtmfsrc.c +++ b/gst/dtmf/gstrtpdtmfsrc.c @@ -208,8 +208,8 @@ gst_rtp_dtmf_src_base_init (gpointer g_class) GST_DEBUG_CATEGORY_INIT (gst_rtp_dtmf_src_debug, "rtpdtmfsrc", 0, "rtpdtmfsrc element"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rtp_dtmf_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_rtp_dtmf_src_template); gst_element_class_set_details_simple (element_class, "RTP DTMF packet generator", "Source/Network", diff --git a/gst/dvbsuboverlay/gstdvbsuboverlay.c b/gst/dvbsuboverlay/gstdvbsuboverlay.c index add39c47b..3c2cab3e4 100644 --- a/gst/dvbsuboverlay/gstdvbsuboverlay.c +++ b/gst/dvbsuboverlay/gstdvbsuboverlay.c @@ -120,12 +120,11 @@ gst_dvbsub_overlay_base_init (gpointer gclass) { GstElementClass *element_class = (GstElementClass *) gclass; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&text_sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, + &video_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &text_sink_factory); gst_element_class_set_details_simple (element_class, "DVB Subtitles Overlay", diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 89b63d899..f57d3c20b 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -118,12 +118,11 @@ gst_dvd_spu_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&subpic_sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, + &video_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &subpic_sink_factory); gst_element_class_set_details_simple (element_class, "Sub-picture Overlay", "Mixer/Video/Overlay/SubPicture/DVD/Bluray", "Parses Sub-Picture command streams and renders the SPU overlay " diff --git a/gst/faceoverlay/gstfaceoverlay.c b/gst/faceoverlay/gstfaceoverlay.c index feb07b5bd..209f656b4 100644 --- a/gst/faceoverlay/gstfaceoverlay.c +++ b/gst/faceoverlay/gstfaceoverlay.c @@ -333,10 +333,8 @@ gst_face_overlay_base_init (gpointer gclass) "Overlays SVG graphics over a detected face in a video stream", "Laura Lucas Alday <lauralucas@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the faceoverlay's class */ diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c index 6423bf5b9..4c7e241e8 100644 --- a/gst/festival/gstfestival.c +++ b/gst/festival/gstfestival.c @@ -184,10 +184,10 @@ gst_festival_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); /* register pads */ - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &sink_template_factory); + gst_element_class_add_static_pad_template (element_class, + &src_template_factory); gst_element_class_set_details_simple (element_class, "Festival Text-to-Speech synthesizer", "Filter/Effect/Audio", diff --git a/gst/fieldanalysis/gstfieldanalysis.c b/gst/fieldanalysis/gstfieldanalysis.c index 3cfd5c848..404fcfad5 100644 --- a/gst/fieldanalysis/gstfieldanalysis.c +++ b/gst/fieldanalysis/gstfieldanalysis.c @@ -136,10 +136,8 @@ gst_field_analysis_base_init (gpointer gclass) "Analyse fields from video frames to identify if they are progressive/telecined/interlaced", "Robert Swain <robert.swain@collabora.co.uk>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } typedef enum diff --git a/gst/freeze/gstfreeze.c b/gst/freeze/gstfreeze.c index 0d63eb70a..c7884f8f8 100644 --- a/gst/freeze/gstfreeze.c +++ b/gst/freeze/gstfreeze.c @@ -89,10 +89,10 @@ gst_freeze_base_init (gpointer klass) "Gergely Nagy <gergely.nagy@neteyes.hu>," " Renato Filho <renato.filho@indt.org.br>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_freeze_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_freeze_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_freeze_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_freeze_src_template); } diff --git a/gst/frei0r/gstfrei0rfilter.c b/gst/frei0r/gstfrei0rfilter.c index 54989c8f4..15aded1c8 100644 --- a/gst/frei0r/gstfrei0rfilter.c +++ b/gst/frei0r/gstfrei0rfilter.c @@ -206,9 +206,11 @@ gst_frei0r_filter_class_init (GstFrei0rFilterClass * klass, gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gst_caps_ref (caps)); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); templ = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); gsttrans_class->set_caps = GST_DEBUG_FUNCPTR (gst_frei0r_filter_set_caps); gsttrans_class->stop = GST_DEBUG_FUNCPTR (gst_frei0r_filter_stop); diff --git a/gst/frei0r/gstfrei0rmixer.c b/gst/frei0r/gstfrei0rmixer.c index 9c8e605c0..3f0a77dc0 100644 --- a/gst/frei0r/gstfrei0rmixer.c +++ b/gst/frei0r/gstfrei0rmixer.c @@ -675,22 +675,26 @@ gst_frei0r_mixer_class_init (GstFrei0rMixerClass * klass, gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gst_caps_ref (caps)); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); templ = gst_pad_template_new ("sink_0", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_ref (caps)); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); templ = gst_pad_template_new ("sink_1", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_ref (caps)); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); if (klass->info->plugin_type == F0R_PLUGIN_TYPE_MIXER3) { templ = gst_pad_template_new ("sink_2", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_ref (caps)); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); } gst_caps_unref (caps); diff --git a/gst/frei0r/gstfrei0rsrc.c b/gst/frei0r/gstfrei0rsrc.c index c74e2607d..cfbd42f34 100644 --- a/gst/frei0r/gstfrei0rsrc.c +++ b/gst/frei0r/gstfrei0rsrc.c @@ -366,6 +366,7 @@ gst_frei0r_src_class_init (GstFrei0rSrcClass * klass, templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); gstbasesrc_class->set_caps = gst_frei0r_src_set_caps; gstbasesrc_class->get_caps = gst_frei0r_src_get_caps; diff --git a/gst/gaudieffects/gstburn.c b/gst/gaudieffects/gstburn.c index 3d769356a..9bd3bce1a 100644 --- a/gst/gaudieffects/gstburn.c +++ b/gst/gaudieffects/gstburn.c @@ -138,10 +138,8 @@ gst_burn_base_init (gpointer gclass) "Burn adjusts the colors in the video signal.", "Luis de Bethencourt <luis@debethencourt.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* Initialize the burn's class. */ diff --git a/gst/gaudieffects/gstchromium.c b/gst/gaudieffects/gstchromium.c index 94d3b1505..fc91dbaa6 100644 --- a/gst/gaudieffects/gstchromium.c +++ b/gst/gaudieffects/gstchromium.c @@ -154,10 +154,8 @@ gst_chromium_base_init (gpointer gclass) "Chromium breaks the colors of the video signal.", "Luis de Bethencourt <luis@debethencourt.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* Initialize the chromium's class. */ diff --git a/gst/gaudieffects/gstdilate.c b/gst/gaudieffects/gstdilate.c index c89123c16..72e6eb083 100644 --- a/gst/gaudieffects/gstdilate.c +++ b/gst/gaudieffects/gstdilate.c @@ -139,10 +139,8 @@ gst_dilate_base_init (gpointer gclass) "Dilate copies the brightest pixel around.", "Luis de Bethencourt <luis@debethencourt.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* Initialize the dilate's class. */ diff --git a/gst/gaudieffects/gstdodge.c b/gst/gaudieffects/gstdodge.c index ff61aa7e5..64cfd0149 100644 --- a/gst/gaudieffects/gstdodge.c +++ b/gst/gaudieffects/gstdodge.c @@ -135,10 +135,8 @@ gst_dodge_base_init (gpointer gclass) "Dodge saturates the colors in the video signal.", "Luis de Bethencourt <luis@debethencourt.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* Initialize the dodge's class. */ diff --git a/gst/gaudieffects/gstexclusion.c b/gst/gaudieffects/gstexclusion.c index 0b8f5d592..4d5fc7add 100644 --- a/gst/gaudieffects/gstexclusion.c +++ b/gst/gaudieffects/gstexclusion.c @@ -140,10 +140,8 @@ gst_exclusion_base_init (gpointer gclass) "Exclusion exclodes the colors in the video signal.", "Luis de Bethencourt <luis@debethencourt.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* Initialize the exclusion's class. */ diff --git a/gst/gaudieffects/gstgaussblur.c b/gst/gaudieffects/gstgaussblur.c index 6b1223e1d..2409f7552 100644 --- a/gst/gaudieffects/gstgaussblur.c +++ b/gst/gaudieffects/gstgaussblur.c @@ -71,10 +71,8 @@ gauss_blur_base_init (gpointer gclass) "Perform Gaussian blur/sharpen on a video", "Jan Schmidt <thaytan@noraisin.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } static void diff --git a/gst/gaudieffects/gstsolarize.c b/gst/gaudieffects/gstsolarize.c index 8cce8dbcf..0c961374f 100644 --- a/gst/gaudieffects/gstsolarize.c +++ b/gst/gaudieffects/gstsolarize.c @@ -144,10 +144,8 @@ gst_solarize_base_init (gpointer gclass) "Solarize tunable inverse in the video signal.", "Luis de Bethencourt <luis@debethencourt.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* Initialize the solarize's class. */ diff --git a/gst/geometrictransform/gstgeometrictransform.c b/gst/geometrictransform/gstgeometrictransform.c index 01e57c377..8e78de7ab 100644 --- a/gst/geometrictransform/gstgeometrictransform.c +++ b/gst/geometrictransform/gstgeometrictransform.c @@ -357,10 +357,10 @@ gst_geometric_transform_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_geometric_transform_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_geometric_transform_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_geometric_transform_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_geometric_transform_src_template); } static void diff --git a/gst/h264parse/gsth264parse.c b/gst/h264parse/gsth264parse.c index 90a537bb7..8ae60755e 100644 --- a/gst/h264parse/gsth264parse.c +++ b/gst/h264parse/gsth264parse.c @@ -895,10 +895,10 @@ gst_h264_parse_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - 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_details_simple (gstelement_class, "H264Parse", "Codec/Parser/Video", "Parses raw h264 stream", diff --git a/gst/hdvparse/gsthdvparse.c b/gst/hdvparse/gsthdvparse.c index 9a610f7cb..28e62092e 100644 --- a/gst/hdvparse/gsthdvparse.c +++ b/gst/hdvparse/gsthdvparse.c @@ -116,10 +116,9 @@ gst_hdvparse_base_init (gpointer klass) GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "HDVParser", "Data/Parser", "HDV private stream Parser", "Edward Hervey <bilboed@bilboed.com>"); diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c index ad29f7837..92e5f6828 100644 --- a/gst/hls/gsthlsdemux.c +++ b/gst/hls/gsthlsdemux.c @@ -132,11 +132,9 @@ gst_hls_demux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "HLS Demuxer", diff --git a/gst/id3tag/gstid3mux.c b/gst/id3tag/gstid3mux.c index f2330d2b1..1ed7e5c9c 100644 --- a/gst/id3tag/gstid3mux.c +++ b/gst/id3tag/gstid3mux.c @@ -98,11 +98,10 @@ gst_id3_mux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &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, &src_template); gst_element_class_set_details_simple (element_class, "ID3 v1 and v2 Muxer", "Formatter/Metadata", diff --git a/gst/inter/gstinteraudiosink.c b/gst/inter/gstinteraudiosink.c index d5eb98b0f..3f65d32b7 100644 --- a/gst/inter/gstinteraudiosink.c +++ b/gst/inter/gstinteraudiosink.c @@ -109,8 +109,8 @@ gst_inter_audio_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_inter_audio_sink_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_inter_audio_sink_sink_template); gst_element_class_set_details_simple (element_class, "FIXME Long name", "Generic", "FIXME Description", "FIXME <fixme@example.com>"); diff --git a/gst/inter/gstinteraudiosrc.c b/gst/inter/gstinteraudiosrc.c index df7c16f70..4a959f90f 100644 --- a/gst/inter/gstinteraudiosrc.c +++ b/gst/inter/gstinteraudiosrc.c @@ -111,8 +111,8 @@ gst_inter_audio_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_inter_audio_src_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_inter_audio_src_src_template); gst_element_class_set_details_simple (element_class, "FIXME Long name", "Generic", "FIXME Description", "FIXME <fixme@example.com>"); diff --git a/gst/inter/gstintervideosink.c b/gst/inter/gstintervideosink.c index 940d7b27e..cb0eea66a 100644 --- a/gst/inter/gstintervideosink.c +++ b/gst/inter/gstintervideosink.c @@ -103,8 +103,8 @@ gst_inter_video_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_inter_video_sink_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_inter_video_sink_sink_template); gst_element_class_set_details_simple (element_class, "FIXME Long name", "Generic", "FIXME Description", "FIXME <fixme@example.com>"); diff --git a/gst/inter/gstintervideosrc.c b/gst/inter/gstintervideosrc.c index 04d965530..3a805c0c8 100644 --- a/gst/inter/gstintervideosrc.c +++ b/gst/inter/gstintervideosrc.c @@ -107,8 +107,8 @@ gst_inter_video_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_inter_video_src_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_inter_video_src_src_template); gst_element_class_set_details_simple (element_class, "FIXME Long name", "Generic", "FIXME Description", "FIXME <fixme@example.com>"); diff --git a/gst/interlace/gstinterlace.c b/gst/interlace/gstinterlace.c index c6181ecad..0e86f8570 100644 --- a/gst/interlace/gstinterlace.c +++ b/gst/interlace/gstinterlace.c @@ -226,10 +226,10 @@ gst_interlace_base_init (gpointer g_class) "Creates an interlaced video from progressive frames", "David Schleef <ds@schleef.org>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_interlace_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_interlace_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_interlace_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_interlace_src_template); } static void diff --git a/gst/ivfparse/gstivfparse.c b/gst/ivfparse/gstivfparse.c index ed79ab723..0ebbe0717 100644 --- a/gst/ivfparse/gstivfparse.c +++ b/gst/ivfparse/gstivfparse.c @@ -84,10 +84,8 @@ gst_ivf_parse_base_init (gpointer gclass) "Codec/Demuxer", "Demuxes a IVF stream", "Philip Jägenstedt <philipj@opera.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } /* initialize the ivfparse's class */ diff --git a/gst/jp2kdecimator/gstjp2kdecimator.c b/gst/jp2kdecimator/gstjp2kdecimator.c index 98b50bb25..f72b6a22f 100644 --- a/gst/jp2kdecimator/gstjp2kdecimator.c +++ b/gst/jp2kdecimator/gstjp2kdecimator.c @@ -100,10 +100,10 @@ gst_jp2k_decimator_base_init (gpointer g_class) "Removes information from JPEG2000 streams without recompression", "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sink_pad_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&src_pad_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &sink_pad_template); + gst_element_class_add_static_pad_template (gstelement_class, + &src_pad_template); } static void diff --git a/gst/jpegformat/gstjifmux.c b/gst/jpegformat/gstjifmux.c index 9bfcfc869..56e6ff71a 100644 --- a/gst/jpegformat/gstjifmux.c +++ b/gst/jpegformat/gstjifmux.c @@ -137,10 +137,10 @@ gst_jif_mux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_jif_mux_src_pad_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_jif_mux_sink_pad_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_jif_mux_src_pad_template); + gst_element_class_add_static_pad_template (element_class, + &gst_jif_mux_sink_pad_template); gst_element_class_set_details_simple (element_class, "JPEG stream muxer", "Video/Formatter", diff --git a/gst/jpegformat/gstjpegparse.c b/gst/jpegformat/gstjpegparse.c index 64b16ae22..1d4eaf9a2 100644 --- a/gst/jpegformat/gstjpegparse.c +++ b/gst/jpegformat/gstjpegparse.c @@ -139,10 +139,10 @@ gst_jpeg_parse_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_jpeg_parse_src_pad_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_jpeg_parse_sink_pad_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_jpeg_parse_src_pad_template); + gst_element_class_add_static_pad_template (element_class, + &gst_jpeg_parse_sink_pad_template); gst_element_class_set_details_simple (element_class, "JPEG stream parser", "Video/Parser", diff --git a/gst/legacyresample/gstlegacyresample.c b/gst/legacyresample/gstlegacyresample.c index 95c924eae..46bb0bf59 100644 --- a/gst/legacyresample/gstlegacyresample.c +++ b/gst/legacyresample/gstlegacyresample.c @@ -135,10 +135,10 @@ gst_legacyresample_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_legacyresample_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_legacyresample_sink_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_legacyresample_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_legacyresample_sink_template); gst_element_class_set_details_simple (gstelement_class, "Audio scaler", "Filter/Converter/Audio", diff --git a/gst/librfb/gstrfbsrc.c b/gst/librfb/gstrfbsrc.c index c6e5a13bb..879892b01 100644 --- a/gst/librfb/gstrfbsrc.c +++ b/gst/librfb/gstrfbsrc.c @@ -89,8 +89,8 @@ gst_rfb_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rfb_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_rfb_src_template); gst_element_class_set_details_simple (element_class, "Rfb source", "Source/Video", diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index 01a7b057a..ada42a547 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -158,10 +158,10 @@ gst_live_adder_base_init (gpointer klass) { GstElementClass *gstelement_class = (GstElementClass *) klass; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_live_adder_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_live_adder_sink_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_live_adder_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_live_adder_sink_template); gst_element_class_set_details_simple (gstelement_class, "Live Adder element", "Generic/Audio", "Mixes live/discontinuous audio streams", diff --git a/gst/mixmatrix/mixmatrix.c b/gst/mixmatrix/mixmatrix.c index e82891892..fd3ad29e3 100644 --- a/gst/mixmatrix/mixmatrix.c +++ b/gst/mixmatrix/mixmatrix.c @@ -148,10 +148,10 @@ gst_mixmatrix_base_init (GstMixMatrixClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&mixmatrix_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&mixmatrix_src_template)); + gst_element_class_add_static_pad_template (element_class, + &mixmatrix_sink_template); + gst_element_class_add_static_pad_template (element_class, + &mixmatrix_src_template); gst_element_class_set_details_simple (element_class, "Mixing Matrix", "Filter/Editor/Audio", "Mix N audio channels together into M channels", diff --git a/gst/mpeg1sys/gstmpeg1systemencode.c b/gst/mpeg1sys/gstmpeg1systemencode.c index db6c7a41b..cc7dc7fd5 100644 --- a/gst/mpeg1sys/gstmpeg1systemencode.c +++ b/gst/mpeg1sys/gstmpeg1systemencode.c @@ -110,12 +110,11 @@ gst_system_encode_base_init (GstMPEG1SystemEncodeClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, + &audio_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &video_sink_factory); gst_element_class_set_details_simple (element_class, "MPEG-1 muxer", "Codec/Muxer", "Multiplexes MPEG-1 Streams", "Wim Taymans <wim.taymans@chello.be>"); diff --git a/gst/mpeg4videoparse/mpeg4videoparse.c b/gst/mpeg4videoparse/mpeg4videoparse.c index 3b056b3c1..83c3db476 100644 --- a/gst/mpeg4videoparse/mpeg4videoparse.c +++ b/gst/mpeg4videoparse/mpeg4videoparse.c @@ -84,10 +84,9 @@ gst_mpeg4vparse_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "MPEG 4 video elementary stream parser", "Codec/Parser/Video", diff --git a/gst/mpegdemux/mpegtsparse.c b/gst/mpegdemux/mpegtsparse.c index 0d489bb61..8a33fc1ef 100644 --- a/gst/mpegdemux/mpegtsparse.c +++ b/gst/mpegdemux/mpegtsparse.c @@ -222,12 +222,11 @@ mpegts_parse_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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_pad_template (element_class, - gst_static_pad_template_get (&program_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &program_template); gst_element_class_set_details_simple (element_class, "MPEG transport stream parser", "Codec/Parser", diff --git a/gst/mpegpsmux/mpegpsmux.c b/gst/mpegpsmux/mpegpsmux.c index d64fb353d..be8e3da77 100644 --- a/gst/mpegpsmux/mpegpsmux.c +++ b/gst/mpegpsmux/mpegpsmux.c @@ -110,10 +110,10 @@ mpegpsmux_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&mpegpsmux_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&mpegpsmux_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &mpegpsmux_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &mpegpsmux_src_factory); gst_element_class_set_details_simple (element_class, "MPEG Program Stream Muxer", "Codec/Muxer", diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c index 437af9d78..d8c7073e5 100644 --- a/gst/mpegtsdemux/mpegtsbase.c +++ b/gst/mpegtsdemux/mpegtsbase.c @@ -169,8 +169,8 @@ mpegts_base_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } static void diff --git a/gst/mpegtsdemux/mpegtsparse.c b/gst/mpegtsdemux/mpegtsparse.c index ede74ae82..26dde896a 100644 --- a/gst/mpegtsdemux/mpegtsparse.c +++ b/gst/mpegtsdemux/mpegtsparse.c @@ -125,10 +125,9 @@ mpegts_parse_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&program_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &program_template); gst_element_class_set_details_simple (element_class, "MPEG transport stream parser", "Codec/Parser", diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 5685bd9ee..118ffb598 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -243,14 +243,14 @@ gst_ts_demux_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&subpicture_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&private_template)); + gst_element_class_add_static_pad_template (element_class, + &video_template); + gst_element_class_add_static_pad_template (element_class, + &audio_template); + gst_element_class_add_static_pad_template (element_class, + &subpicture_template); + gst_element_class_add_static_pad_template (element_class, + &private_template); gst_element_class_set_details_simple (element_class, "MPEG transport stream demuxer", diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index f59a5f7e3..3b4b71af6 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -160,10 +160,10 @@ mpegtsmux_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&mpegtsmux_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&mpegtsmux_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &mpegtsmux_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &mpegtsmux_src_factory); gst_element_class_set_details_simple (element_class, "MPEG Transport Stream Muxer", "Codec/Muxer", diff --git a/gst/mpegvideoparse/mpegvideoparse.c b/gst/mpegvideoparse/mpegvideoparse.c index 52a34c10f..c91ed072b 100644 --- a/gst/mpegvideoparse/mpegvideoparse.c +++ b/gst/mpegvideoparse/mpegvideoparse.c @@ -127,10 +127,9 @@ gst_mpegvideoparse_base_init (MpegVideoParseClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "MPEG video elementary stream parser", diff --git a/gst/mve/gstmvedemux.c b/gst/mve/gstmvedemux.c index a101a9059..8a0cc5ce8 100644 --- a/gst/mve/gstmvedemux.c +++ b/gst/mve/gstmvedemux.c @@ -1090,12 +1090,12 @@ gst_mve_demux_base_init (GstMveDemuxClass * klass) GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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 (&vidsrc_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audsrc_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); + gst_element_class_add_static_pad_template (element_class, + &vidsrc_template); + gst_element_class_add_static_pad_template (element_class, + &audsrc_template); gst_element_class_set_details_simple (element_class, "MVE Demuxer", "Codec/Demuxer", "Demultiplex an Interplay movie (MVE) stream into audio and video", diff --git a/gst/mve/gstmvemux.c b/gst/mve/gstmvemux.c index e6c2fcb6c..87165f46f 100644 --- a/gst/mve/gstmvemux.c +++ b/gst/mve/gstmvemux.c @@ -1349,12 +1349,11 @@ gst_mve_mux_base_init (GstMveMuxClass * klass) GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, + &audio_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &video_sink_factory); gst_element_class_set_details_simple (element_class, "MVE Multiplexer", "Codec/Muxer", diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index a4fde1f80..13ab13b60 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -3962,10 +3962,10 @@ gst_mxf_demux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&mxf_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&mxf_src_template)); + gst_element_class_add_static_pad_template (element_class, + &mxf_sink_template); + gst_element_class_add_static_pad_template (element_class, + &mxf_src_template); gst_element_class_set_details_simple (element_class, "MXF Demuxer", "Codec/Demuxer", "Demux MXF files", "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); diff --git a/gst/mxf/mxfmux.c b/gst/mxf/mxfmux.c index 403fff8f3..2074ea030 100644 --- a/gst/mxf/mxfmux.c +++ b/gst/mxf/mxfmux.c @@ -97,13 +97,12 @@ gst_mxf_mux_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); const GstPadTemplate **p; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &src_templ); p = mxf_essence_element_writer_get_pad_templates (); while (p && *p) { gst_element_class_add_pad_template (element_class, - (GstPadTemplate *) gst_object_ref (GST_OBJECT (*p))); + (GstPadTemplate *) (GST_OBJECT (*p))); p++; } diff --git a/gst/nsf/gstnsf.c b/gst/nsf/gstnsf.c index 63ab00141..d92897167 100644 --- a/gst/nsf/gstnsf.c +++ b/gst/nsf/gstnsf.c @@ -141,10 +141,8 @@ gst_nsfdec_base_init (gpointer g_class) "Using nosefart to decode NSF audio tunes", "Johan Dahlin <johan@gnome.org>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); + gst_element_class_add_static_pad_template (element_class, &src_templ); + gst_element_class_add_static_pad_template (element_class, &sink_templ); } static void diff --git a/gst/nuvdemux/gstnuvdemux.c b/gst/nuvdemux/gstnuvdemux.c index 3401c8157..86418f069 100644 --- a/gst/nuvdemux/gstnuvdemux.c +++ b/gst/nuvdemux/gstnuvdemux.c @@ -124,14 +124,14 @@ gst_nuv_demux_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_src_template)); + gst_element_class_add_static_pad_template (element_class, + &audio_src_template); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_src_template)); + gst_element_class_add_static_pad_template (element_class, + &video_src_template); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "Nuv demuxer", "Codec/Demuxer", "Demultiplex a MythTV NuppleVideo .nuv file into audio and video", diff --git a/gst/overlay/gstoverlay.c b/gst/overlay/gstoverlay.c index c900a6bd9..d802491c9 100644 --- a/gst/overlay/gstoverlay.c +++ b/gst/overlay/gstoverlay.c @@ -110,14 +110,14 @@ gst_overlay_base_init (GstOverlayClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&overlay_sink1_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&overlay_sink2_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&overlay_sink3_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&overlay_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &overlay_sink1_factory); + gst_element_class_add_static_pad_template (element_class, + &overlay_sink2_factory); + gst_element_class_add_static_pad_template (element_class, + &overlay_sink3_factory); + gst_element_class_add_static_pad_template (element_class, + &overlay_src_factory); gst_element_class_set_details_simple (element_class, "Video overlay", "Filter/Editor/Video", "Overlay multiple video streams", "David Schleef <ds@schleef.org>"); diff --git a/gst/patchdetect/gstpatchdetect.c b/gst/patchdetect/gstpatchdetect.c index af4d88319..8926a5987 100644 --- a/gst/patchdetect/gstpatchdetect.c +++ b/gst/patchdetect/gstpatchdetect.c @@ -109,10 +109,10 @@ gst_patchdetect_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_patchdetect_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_patchdetect_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_patchdetect_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_patchdetect_src_template); gst_element_class_set_details_simple (element_class, "Color Patch Detector", "Video/Analysis", "Detects color patches from a color calibration chart", diff --git a/gst/pcapparse/gstirtspparse.c b/gst/pcapparse/gstirtspparse.c index 26317e622..0beed3603 100644 --- a/gst/pcapparse/gstirtspparse.c +++ b/gst/pcapparse/gstirtspparse.c @@ -88,10 +88,9 @@ gst_irtsp_parse_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_details_simple (element_class, "IRTSPParse", "Raw/Parser", diff --git a/gst/pcapparse/gstpcapparse.c b/gst/pcapparse/gstpcapparse.c index 16eb58c5a..ae7fd5f24 100644 --- a/gst/pcapparse/gstpcapparse.c +++ b/gst/pcapparse/gstpcapparse.c @@ -99,10 +99,9 @@ gst_pcap_parse_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - 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); gst_element_class_set_details_simple (element_class, "PCapParse", "Raw/Parser", diff --git a/gst/pnm/gstpnmdec.c b/gst/pnm/gstpnmdec.c index 394e86d12..aef4526ac 100644 --- a/gst/pnm/gstpnmdec.c +++ b/gst/pnm/gstpnmdec.c @@ -308,10 +308,10 @@ gst_pnmdec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_pnmdec_sink_pad_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_pnmdec_src_pad_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_pnmdec_sink_pad_template); + gst_element_class_add_static_pad_template (element_class, + &gst_pnmdec_src_pad_template); gst_element_class_set_details_simple (element_class, "PNM image decoder", "Codec/Decoder/Image", "Decodes images in portable pixmap/graymap/bitmap/anymamp (PNM) format", diff --git a/gst/pnm/gstpnmenc.c b/gst/pnm/gstpnmenc.c index 53bd4a3ff..7036cbdbf 100644 --- a/gst/pnm/gstpnmenc.c +++ b/gst/pnm/gstpnmenc.c @@ -231,10 +231,10 @@ gst_pnmenc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_pad_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_pad_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_pad_template); + gst_element_class_add_static_pad_template (element_class, + &src_pad_template); gst_element_class_set_details_simple (element_class, "PNM image encoder", "Codec/Encoder/Image", "Encodes images into portable pixmap or graymap (PNM) format", diff --git a/gst/rawparse/gstrawparse.c b/gst/rawparse/gstrawparse.c index 004d190b4..cf0f5d009 100644 --- a/gst/rawparse/gstrawparse.c +++ b/gst/rawparse/gstrawparse.c @@ -75,8 +75,8 @@ gst_raw_parse_base_init (gpointer g_class) GST_DEBUG_CATEGORY_INIT (gst_raw_parse_debug, "rawparse", 0, "rawparse element"); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_raw_parse_sink_pad_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_raw_parse_sink_pad_template); } static void @@ -154,14 +154,17 @@ gst_raw_parse_class_set_src_pad_template (GstRawParseClass * klass, const GstCaps * allowed_caps) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + GstPadTemplate *pad_template; g_return_if_fail (GST_IS_RAW_PARSE_CLASS (klass)); g_return_if_fail (allowed_caps != NULL); g_return_if_fail (GST_IS_CAPS (allowed_caps)); - gst_element_class_add_pad_template (element_class, + pad_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - gst_caps_copy (allowed_caps))); + gst_caps_copy (allowed_caps)); + gst_element_class_add_pad_template (element_class, pad_template); + gst_object_unref (pad_template); } void diff --git a/gst/real/gstrealaudiodec.c b/gst/real/gstrealaudiodec.c index f5aa972a0..b6f620133 100644 --- a/gst/real/gstrealaudiodec.c +++ b/gst/real/gstrealaudiodec.c @@ -560,8 +560,8 @@ gst_real_audio_dec_base_init (gpointer g_class) { GstElementClass *ec = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&snk_t)); - gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&src_t)); + gst_element_class_add_static_pad_template (ec, &snk_t); + gst_element_class_add_static_pad_template (ec, &src_t); gst_element_class_set_details_simple (ec, "RealAudio decoder", "Codec/Decoder/Audio", "Decoder for RealAudio streams", "Lutz Mueller <lutz@topfrose.de>"); diff --git a/gst/real/gstrealvideodec.c b/gst/real/gstrealvideodec.c index 23bef182c..142b1ce6d 100644 --- a/gst/real/gstrealvideodec.c +++ b/gst/real/gstrealvideodec.c @@ -627,8 +627,8 @@ gst_real_video_dec_base_init (gpointer g_class) { GstElementClass *ec = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&snk_t)); - gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&src_t)); + gst_element_class_add_static_pad_template (ec, &snk_t); + gst_element_class_add_static_pad_template (ec, &src_t); gst_element_class_set_details_simple (ec, "RealVideo decoder", "Codec/Decoder/Video", "Decoder for RealVideo streams", "Lutz Mueller <lutz@topfrose.de>"); diff --git a/gst/removesilence/gstremovesilence.c b/gst/removesilence/gstremovesilence.c index edb9af3ab..9f5f69902 100644 --- a/gst/removesilence/gstremovesilence.c +++ b/gst/removesilence/gstremovesilence.c @@ -109,10 +109,9 @@ gst_remove_silence_base_init (gpointer gclass) "Tiago Katcipis <tiagokatcipis@gmail.com>\n \ Paulo Pizarro <paulo.pizarro@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } /* initialize the removesilence's class */ diff --git a/gst/rtpmux/gstrtpdtmfmux.c b/gst/rtpmux/gstrtpdtmfmux.c index 97ffacd2f..23de0a229 100644 --- a/gst/rtpmux/gstrtpdtmfmux.c +++ b/gst/rtpmux/gstrtpdtmfmux.c @@ -79,8 +79,8 @@ gst_rtp_dtmf_mux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&priority_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &priority_sink_factory); gst_element_class_set_details_simple (element_class, "RTP muxer", "Codec/Muxer", diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c index f86fd5d6b..97cb3f878 100644 --- a/gst/rtpmux/gstrtpmux.c +++ b/gst/rtpmux/gstrtpmux.c @@ -117,10 +117,8 @@ gst_rtp_mux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "RTP muxer", "Codec/Muxer", diff --git a/gst/rtpvp8/gstrtpvp8depay.c b/gst/rtpvp8/gstrtpvp8depay.c index 81fa5cc94..74d13b5ae 100644 --- a/gst/rtpvp8/gstrtpvp8depay.c +++ b/gst/rtpvp8/gstrtpvp8depay.c @@ -66,10 +66,10 @@ gst_rtp_vp8_depay_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rtp_vp8_depay_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rtp_vp8_depay_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_rtp_vp8_depay_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_rtp_vp8_depay_src_template); gst_element_class_set_details_simple (element_class, "RTP VP8 depayloader", "Codec/Depayloader/Network/RTP", diff --git a/gst/rtpvp8/gstrtpvp8pay.c b/gst/rtpvp8/gstrtpvp8pay.c index fc4844b22..82dceeb12 100644 --- a/gst/rtpvp8/gstrtpvp8pay.c +++ b/gst/rtpvp8/gstrtpvp8pay.c @@ -74,10 +74,10 @@ gst_rtp_vp8_pay_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rtp_vp8_pay_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_rtp_vp8_pay_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_rtp_vp8_pay_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_rtp_vp8_pay_src_template); gst_element_class_set_details_simple (element_class, "RTP VP8 payloader", "Codec/Payloader/Network/RTP", diff --git a/gst/scaletempo/gstscaletempo.c b/gst/scaletempo/gstscaletempo.c index a057321f4..9edc03edb 100644 --- a/gst/scaletempo/gstscaletempo.c +++ b/gst/scaletempo/gstscaletempo.c @@ -682,10 +682,9 @@ gst_scaletempo_base_init (gpointer klass) GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "Scaletempo", "Filter/Effect/Rate", "Sync audio tempo with playback rate", diff --git a/gst/sdi/gstsdidemux.c b/gst/sdi/gstsdidemux.c index 7af936bdd..968525aec 100644 --- a/gst/sdi/gstsdidemux.c +++ b/gst/sdi/gstsdidemux.c @@ -105,10 +105,10 @@ gst_sdi_demux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_sdi_demux_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_sdi_demux_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_sdi_demux_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_sdi_demux_sink_template); gst_element_class_set_details_simple (element_class, "SDI Demuxer", @@ -364,7 +364,6 @@ gst_sdi_demux_chain (GstPad * pad, GstBuffer * buffer) if (sdidemux->output_buffer == NULL) { gst_sdi_demux_get_output_buffer (sdidemux); } - #if 0 if (sdidemux->offset) { int n; diff --git a/gst/sdi/gstsdimux.c b/gst/sdi/gstsdimux.c index d7d490bd3..02532273a 100644 --- a/gst/sdi/gstsdimux.c +++ b/gst/sdi/gstsdimux.c @@ -108,10 +108,10 @@ gst_sdi_mux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_sdi_mux_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_sdi_mux_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_sdi_mux_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_sdi_mux_sink_template); gst_element_class_set_details_simple (element_class, "SDI Muxer", "Muxer", diff --git a/gst/sdp/gstsdpdemux.c b/gst/sdp/gstsdpdemux.c index e03fb7ec3..9254dbcf1 100644 --- a/gst/sdp/gstsdpdemux.c +++ b/gst/sdp/gstsdpdemux.c @@ -152,10 +152,8 @@ gst_sdp_demux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&rtptemplate)); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); + gst_element_class_add_static_pad_template (element_class, &rtptemplate); gst_element_class_set_details_simple (element_class, "SDP session setup", "Codec/Demuxer/Network/RTP", diff --git a/gst/segmentclip/gstaudiosegmentclip.c b/gst/segmentclip/gstaudiosegmentclip.c index 93602c5d2..a3fc81107 100644 --- a/gst/segmentclip/gstaudiosegmentclip.c +++ b/gst/segmentclip/gstaudiosegmentclip.c @@ -59,10 +59,10 @@ gst_audio_segment_clip_base_init (gpointer g_class) "Clips audio buffers to the configured segment", "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_pad_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_pad_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_pad_template); + gst_element_class_add_static_pad_template (element_class, + &src_pad_template); } static void diff --git a/gst/segmentclip/gstvideosegmentclip.c b/gst/segmentclip/gstvideosegmentclip.c index 16a948e7f..f160e728a 100644 --- a/gst/segmentclip/gstvideosegmentclip.c +++ b/gst/segmentclip/gstvideosegmentclip.c @@ -64,10 +64,10 @@ gst_video_segment_clip_base_init (gpointer g_class) "Clips video buffers to the configured segment", "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_pad_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_pad_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_pad_template); + gst_element_class_add_static_pad_template (element_class, + &src_pad_template); } static void diff --git a/gst/siren/gstsirendec.c b/gst/siren/gstsirendec.c index 2e517199f..6325c9670 100644 --- a/gst/siren/gstsirendec.c +++ b/gst/siren/gstsirendec.c @@ -92,10 +92,8 @@ gst_siren_dec_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "Siren Decoder element", "Codec/Decoder/Audio ", diff --git a/gst/siren/gstsirenenc.c b/gst/siren/gstsirenenc.c index 561d2689d..b201e18b2 100644 --- a/gst/siren/gstsirenenc.c +++ b/gst/siren/gstsirenenc.c @@ -95,10 +95,8 @@ gst_siren_enc_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "Siren Encoder element", "Codec/Encoder/Audio ", diff --git a/gst/smooth/gstsmooth.c b/gst/smooth/gstsmooth.c index 2ac87d6fc..5a254adc2 100644 --- a/gst/smooth/gstsmooth.c +++ b/gst/smooth/gstsmooth.c @@ -74,10 +74,10 @@ gst_smooth_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_smooth_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_smooth_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_smooth_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_smooth_src_template); gst_element_class_set_details_simple (element_class, "Smooth effect", "Filter/Effect/Video", "Apply a smooth filter to an image", diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c index 82c816a63..5a029fb76 100644 --- a/gst/speed/gstspeed.c +++ b/gst/speed/gstspeed.c @@ -461,10 +461,10 @@ speed_base_init (gpointer g_class) "Andy Wingo <apwingo@eos.ncsu.edu>, " "Tim-Philipp Müller <tim@centricular.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_speed_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_speed_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_speed_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_speed_sink_template); } static void diff --git a/gst/subenc/gstsrtenc.c b/gst/subenc/gstsrtenc.c index 097acf3fc..a06bce1c5 100644 --- a/gst/subenc/gstsrtenc.c +++ b/gst/subenc/gstsrtenc.c @@ -123,10 +123,9 @@ gst_srt_enc_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_details_simple (element_class, "Srt encoder", "Codec/Encoder/Subtitle", diff --git a/gst/subenc/gstwebvttenc.c b/gst/subenc/gstwebvttenc.c index 65f532a84..9da281dc4 100644 --- a/gst/subenc/gstwebvttenc.c +++ b/gst/subenc/gstwebvttenc.c @@ -157,10 +157,9 @@ gst_webvtt_enc_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_details_simple (element_class, "WebVTT encoder", "Codec/Encoder/Subtitle", diff --git a/gst/tta/gstttadec.c b/gst/tta/gstttadec.c index da7693f04..7eabe7a15 100644 --- a/gst/tta/gstttadec.c +++ b/gst/tta/gstttadec.c @@ -171,10 +171,8 @@ gst_tta_dec_base_init (GstTtaDecClass * klass) GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "TTA audio decoder", "Codec/Decoder/Audio", "Decode TTA audio data", "Arwed v. Merkatz <v.merkatz@gmx.net>"); diff --git a/gst/tta/gstttaparse.c b/gst/tta/gstttaparse.c index 069408ab6..52cd8e474 100644 --- a/gst/tta/gstttaparse.c +++ b/gst/tta/gstttaparse.c @@ -88,10 +88,8 @@ gst_tta_parse_base_init (GstTtaParseClass * klass) GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "TTA file parser", "Codec/Demuxer/Audio", "Parses TTA files", "Arwed v. Merkatz <v.merkatz@gmx.net>"); diff --git a/gst/vbidec/gstvbidec.c b/gst/vbidec/gstvbidec.c index 0122934a9..30991fe75 100644 --- a/gst/vbidec/gstvbidec.c +++ b/gst/vbidec/gstvbidec.c @@ -166,10 +166,10 @@ gst_vbidec_base_init (gpointer g_class) "Decodes closed captions and XDS data from VBI data", "David I. Lehn <dlehn@users.sourceforge.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_vbidec_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_vbidec_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_vbidec_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_vbidec_sink_template); } static void diff --git a/gst/videodrop/gstvideodrop.c b/gst/videodrop/gstvideodrop.c index 2ee693af4..75a3145bd 100644 --- a/gst/videodrop/gstvideodrop.c +++ b/gst/videodrop/gstvideodrop.c @@ -106,10 +106,10 @@ gst_videodrop_base_init (gpointer g_class) "Re-FPS'es video by dropping frames", "Ronald Bultje <rbultje@ronald.bitfreak.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_videodrop_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_videodrop_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_videodrop_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_videodrop_src_template); } static void diff --git a/gst/videofilters/gstvideofilter2.c b/gst/videofilters/gstvideofilter2.c index adcdbd23a..4ea308aa4 100644 --- a/gst/videofilters/gstvideofilter2.c +++ b/gst/videofilters/gstvideofilter2.c @@ -79,17 +79,22 @@ gst_video_filter2_base_init (gpointer g_class) GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); int i; GstCaps *caps = NULL; + GstPadTemplate *pad_template; caps = gst_caps_new_empty (); for (i = GST_VIDEO_FORMAT_I420; i <= GST_VIDEO_FORMAT_I420; i++) { gst_caps_append (caps, gst_video_format_new_template_caps (i)); } - gst_element_class_add_pad_template (element_class, + pad_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - gst_caps_ref (caps))); - gst_element_class_add_pad_template (element_class, - gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps)); + gst_caps_ref (caps)); + gst_element_class_add_pad_template (element_class, pad_template); + gst_object_unref (pad_template); + pad_template = + gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps); + gst_element_class_add_pad_template (element_class, pad_template); + gst_object_unref (pad_template); } static void diff --git a/gst/videomaxrate/videomaxrate.c b/gst/videomaxrate/videomaxrate.c index 0d7bb4f07..396a200ed 100644 --- a/gst/videomaxrate/videomaxrate.c +++ b/gst/videomaxrate/videomaxrate.c @@ -98,10 +98,10 @@ gst_video_max_rate_base_init (gpointer gclass) "Filter/Effect/Video", "Drops extra frames", "Justin Karneges <justin@affinix.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_max_rate_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_max_rate_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_video_max_rate_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_video_max_rate_src_template); } static void diff --git a/gst/videomeasure/gstvideomeasure_collector.c b/gst/videomeasure/gstvideomeasure_collector.c index 7619967fc..0c1f15ec3 100644 --- a/gst/videomeasure/gstvideomeasure_collector.c +++ b/gst/videomeasure/gstvideomeasure_collector.c @@ -323,10 +323,10 @@ gst_measure_collector_base_init (gpointer g_class) "Collect measurements from a measuring element", "Руслан Ижбулатов <lrn _at_ gmail _dot_ com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_measure_collector_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_measure_collector_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_measure_collector_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_measure_collector_src_template); } static void diff --git a/gst/videomeasure/gstvideomeasure_ssim.c b/gst/videomeasure/gstvideomeasure_ssim.c index 499fcf2ac..63e347255 100644 --- a/gst/videomeasure/gstvideomeasure_ssim.c +++ b/gst/videomeasure/gstvideomeasure_ssim.c @@ -1095,12 +1095,12 @@ gst_ssim_class_init (GstSSimClass * klass) "(only when using Gaussian window).", G_MINFLOAT, 10, 1.5, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_ssim_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_ssim_sink_original_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_ssim_sink_modified_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_ssim_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_ssim_sink_original_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_ssim_sink_modified_template); gst_element_class_set_details_simple (gstelement_class, "SSim", "Filter/Analyzer/Video", "Calculate Y-SSIM for n+2 YUV video streams", diff --git a/gst/videoparsers/gstdiracparse.c b/gst/videoparsers/gstdiracparse.c index 205e6144a..aee281ffe 100644 --- a/gst/videoparsers/gstdiracparse.c +++ b/gst/videoparsers/gstdiracparse.c @@ -104,10 +104,10 @@ gst_dirac_parse_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_dirac_parse_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_dirac_parse_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_dirac_parse_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_dirac_parse_sink_template); gst_element_class_set_details_simple (element_class, "Dirac parser", "Codec/Parser/Video", "Parses Dirac streams", diff --git a/gst/videoparsers/gsth263parse.c b/gst/videoparsers/gsth263parse.c index e13a94605..85028c28d 100644 --- a/gst/videoparsers/gsth263parse.c +++ b/gst/videoparsers/gsth263parse.c @@ -65,10 +65,10 @@ gst_h263_parse_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - 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_details_simple (gstelement_class, "H.263 parser", "Codec/Parser/Video", "Parses H.263 streams", diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index 241b92da3..b8feb37e4 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -99,10 +99,10 @@ gst_h264_parse_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - 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_details_simple (gstelement_class, "H.264 parser", "Codec/Parser/Converter/Video", diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c index ca392a70d..4f8eb3a37 100644 --- a/gst/videoparsers/gstmpegvideoparse.c +++ b/gst/videoparsers/gstmpegvideoparse.c @@ -85,10 +85,9 @@ gst_mpegv_parse_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "MPEG video elementary stream parser", diff --git a/gst/videosignal/gstvideoanalyse.c b/gst/videosignal/gstvideoanalyse.c index 7ca6626c2..ab2d67483 100644 --- a/gst/videosignal/gstvideoanalyse.c +++ b/gst/videosignal/gstvideoanalyse.c @@ -279,10 +279,10 @@ gst_video_analyse_base_init (gpointer g_class) "Filter/Analyzer/Video", "Analyse video signal", "Wim Taymans <wim@fluendo.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_analyse_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_analyse_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_video_analyse_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_video_analyse_src_template); } static void diff --git a/gst/videosignal/gstvideodetect.c b/gst/videosignal/gstvideodetect.c index 09de8b676..1e795d378 100644 --- a/gst/videosignal/gstvideodetect.c +++ b/gst/videosignal/gstvideodetect.c @@ -438,10 +438,10 @@ gst_video_detect_base_init (gpointer g_class) "Filter/Effect/Video", "Detect patterns in a video signal", "Wim Taymans <wim@fluendo.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_detect_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_detect_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_video_detect_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_video_detect_src_template); } static void diff --git a/gst/videosignal/gstvideomark.c b/gst/videosignal/gstvideomark.c index c45820a31..89fbf7092 100644 --- a/gst/videosignal/gstvideomark.c +++ b/gst/videosignal/gstvideomark.c @@ -325,10 +325,10 @@ gst_video_mark_base_init (gpointer g_class) "Filter/Effect/Video", "Marks a video signal with a pattern", "Wim Taymans <wim@fluendo.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_mark_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_mark_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_video_mark_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_video_mark_src_template); } static void diff --git a/gst/vmnc/vmncdec.c b/gst/vmnc/vmncdec.c index 3db3511ee..08085b54e 100644 --- a/gst/vmnc/vmncdec.c +++ b/gst/vmnc/vmncdec.c @@ -168,10 +168,10 @@ gst_vmnc_dec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&vmnc_dec_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&vmnc_dec_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &vmnc_dec_src_factory); + gst_element_class_add_static_pad_template (element_class, + &vmnc_dec_sink_factory); gst_element_class_set_details_simple (element_class, "VMnc video decoder", "Codec/Decoder/Video", "Decode VmWare video to raw (RGB) video", diff --git a/gst/y4m/gsty4mdec.c b/gst/y4m/gsty4mdec.c index e7c3caf42..b2ebfb786 100644 --- a/gst/y4m/gsty4mdec.c +++ b/gst/y4m/gsty4mdec.c @@ -94,10 +94,10 @@ gst_y4m_dec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_y4m_dec_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_y4m_dec_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_y4m_dec_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_y4m_dec_sink_template); gst_element_class_set_details_simple (element_class, "YUV4MPEG demuxer/decoder", "Codec/Demuxer", diff --git a/sys/acmenc/acmenc.c b/sys/acmenc/acmenc.c index b2db28eba..2b637a54c 100644 --- a/sys/acmenc/acmenc.c +++ b/sys/acmenc/acmenc.c @@ -470,10 +470,10 @@ acmenc_base_init (ACMEncClass * klass) gchar *shortname, *longname, *detail, *description; MMRESULT res; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&acmenc_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&acmenc_src_template)); + gst_element_class_add_static_pad_template (element_class, + &acmenc_sink_template); + gst_element_class_add_static_pad_template (element_class, + &acmenc_src_template); params = (ACMEncParams *) g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass), ACMENC_PARAMS_QDATA); diff --git a/sys/acmmp3dec/acmmp3dec.c b/sys/acmmp3dec/acmmp3dec.c index 2f2799270..870a9bff3 100644 --- a/sys/acmmp3dec/acmmp3dec.c +++ b/sys/acmmp3dec/acmmp3dec.c @@ -405,10 +405,10 @@ acmmp3dec_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&acmmp3dec_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&acmmp3dec_src_template)); + gst_element_class_add_static_pad_template (element_class, + &acmmp3dec_sink_template); + gst_element_class_add_static_pad_template (element_class, + &acmmp3dec_src_template); gst_element_class_set_details_simple (element_class, "ACM MP3 decoder", "Codec/Decoder/Audio", "Decode MP3 using ACM decoder", diff --git a/sys/applemedia/avfvideosrc.m b/sys/applemedia/avfvideosrc.m index 37ff576f5..d20f94207 100644 --- a/sys/applemedia/avfvideosrc.m +++ b/sys/applemedia/avfvideosrc.m @@ -567,8 +567,7 @@ gst_avf_video_src_base_init (gpointer gclass) "Reads frames from an iOS AVFoundation device", "Ole André Vadla Ravnås <oravnas@cisco.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); } static void diff --git a/sys/applemedia/celvideosrc.c b/sys/applemedia/celvideosrc.c index 6ea15e88f..2ef107631 100644 --- a/sys/applemedia/celvideosrc.c +++ b/sys/applemedia/celvideosrc.c @@ -833,8 +833,7 @@ gst_cel_video_src_base_init (gpointer gclass) "Reads frames from an iOS Celestial device", "Ole André Vadla Ravnås <oravnas@cisco.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); } static void diff --git a/sys/applemedia/miovideosrc.c b/sys/applemedia/miovideosrc.c index 7b0e428c4..aec4a56a7 100644 --- a/sys/applemedia/miovideosrc.c +++ b/sys/applemedia/miovideosrc.c @@ -1129,8 +1129,7 @@ gst_mio_video_src_base_init (gpointer gclass) "Reads frames from a Mac OS X MIO device", "Ole André Vadla Ravnås <oravnas@cisco.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); } static void diff --git a/sys/applemedia/qtkitvideosrc.m b/sys/applemedia/qtkitvideosrc.m index c228692dd..8553bd13b 100644 --- a/sys/applemedia/qtkitvideosrc.m +++ b/sys/applemedia/qtkitvideosrc.m @@ -524,8 +524,7 @@ gst_qtkit_video_src_base_init (gpointer gclass) "Reads frames from a Mac OS X QTKit device", "Ole André Vadla Ravnås <oravnas@cisco.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); } static void diff --git a/sys/applemedia/vtdec.c b/sys/applemedia/vtdec.c index 22db2e869..982f73c6f 100644 --- a/sys/applemedia/vtdec.c +++ b/sys/applemedia/vtdec.c @@ -89,6 +89,7 @@ gst_vtdec_base_init (GstVTDecClass * klass) sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, sink_caps); gst_element_class_add_pad_template (element_class, sink_template); + gst_object_unref (sink_template); src_template = gst_pad_template_new ("src", GST_PAD_SRC, @@ -100,6 +101,7 @@ gst_vtdec_base_init (GstVTDecClass * klass) "framerate", GST_TYPE_FRACTION_RANGE, min_fps_n, min_fps_d, max_fps_n, max_fps_d, NULL)); gst_element_class_add_pad_template (element_class, src_template); + gst_object_unref (src_template); } static void diff --git a/sys/applemedia/vtenc.c b/sys/applemedia/vtenc.c index c7878482c..aa0bcdda6 100644 --- a/sys/applemedia/vtenc.c +++ b/sys/applemedia/vtenc.c @@ -118,6 +118,7 @@ gst_vtenc_base_init (GstVTEncClass * klass) "framerate", GST_TYPE_FRACTION_RANGE, min_fps_n, min_fps_d, max_fps_n, max_fps_d, NULL)); gst_element_class_add_pad_template (element_class, sink_template); + gst_object_unref (sink_template); src_caps = gst_caps_new_simple (codec_details->mimetype, "width", GST_TYPE_INT_RANGE, min_width, max_width, @@ -131,6 +132,7 @@ gst_vtenc_base_init (GstVTEncClass * klass) src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, src_caps); gst_element_class_add_pad_template (element_class, src_template); + gst_object_unref (src_template); } static void diff --git a/sys/applemedia/vth264decbin.c b/sys/applemedia/vth264decbin.c index fbc718b3a..816e15ec5 100644 --- a/sys/applemedia/vth264decbin.c +++ b/sys/applemedia/vth264decbin.c @@ -218,10 +218,10 @@ gst_vt_h264_dec_bin_base_init (gpointer gclass) "VideoToolbox H.264 decoder bin", "Ole André Vadla Ravnås <oravnas@cisco.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&vth264decbin_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&vth264decbin_src_template)); + gst_element_class_add_static_pad_template (element_class, + &vth264decbin_sink_template); + gst_element_class_add_static_pad_template (element_class, + &vth264decbin_src_template); } static void diff --git a/sys/applemedia/vth264encbin.c b/sys/applemedia/vth264encbin.c index e97ef29d5..222a73142 100644 --- a/sys/applemedia/vth264encbin.c +++ b/sys/applemedia/vth264encbin.c @@ -80,10 +80,10 @@ gst_vt_h264_enc_bin_base_init (gpointer gclass) "VideoToolbox H.264 encoder bin", "Ole André Vadla Ravnås <oravnas@cisco.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&vth264encbin_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&vth264encbin_src_template)); + gst_element_class_add_static_pad_template (element_class, + &vth264encbin_sink_template); + gst_element_class_add_static_pad_template (element_class, + &vth264encbin_src_template); } static void diff --git a/sys/avc/gstavcsrc.cpp b/sys/avc/gstavcsrc.cpp index c63c9853a..405355282 100644 --- a/sys/avc/gstavcsrc.cpp +++ b/sys/avc/gstavcsrc.cpp @@ -99,8 +99,8 @@ gst_avc_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_avc_src_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_avc_src_src_template); gst_element_class_set_details_simple (element_class, "AVC Video Services Source", "Video/Source", diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c index 9ca6b960e..53d5c89ff 100644 --- a/sys/d3dvideosink/d3dvideosink.c +++ b/sys/d3dvideosink/d3dvideosink.c @@ -278,8 +278,8 @@ gst_d3dvideosink_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "Direct3D video sink", "Sink/Video", diff --git a/sys/decklink/gstdecklinksink.cpp b/sys/decklink/gstdecklinksink.cpp index 9948048bd..bc24cfefe 100644 --- a/sys/decklink/gstdecklinksink.cpp +++ b/sys/decklink/gstdecklinksink.cpp @@ -158,10 +158,10 @@ gst_decklink_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_decklink_sink_videosink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_decklink_sink_audiosink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_decklink_sink_videosink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_decklink_sink_audiosink_template); gst_element_class_set_details_simple (element_class, "Decklink Sink", "Video/Sink", "Decklink Sink", "David Schleef <ds@entropywave.com>"); diff --git a/sys/decklink/gstdecklinksrc.cpp b/sys/decklink/gstdecklinksrc.cpp index 1e44a3c38..b2e2c5127 100644 --- a/sys/decklink/gstdecklinksrc.cpp +++ b/sys/decklink/gstdecklinksrc.cpp @@ -153,12 +153,15 @@ static void gst_decklink_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + GstPadTemplate *pad_template; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_decklink_src_audio_src_template)); - gst_element_class_add_pad_template (element_class, + gst_element_class_add_static_pad_template (element_class, + &gst_decklink_src_audio_src_template); + pad_template = gst_pad_template_new ("videosrc", GST_PAD_SRC, GST_PAD_ALWAYS, - gst_decklink_mode_get_template_caps ())); + gst_decklink_mode_get_template_caps ()); + gst_element_class_add_pad_template (element_class, pad_template); + gst_object_unref (pad_template); gst_element_class_set_details_simple (element_class, "Decklink source", "Source/Video", "DeckLink Source", "David Schleef <ds@entropywave.com>"); diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 429aa7ad1..bd9b79ca1 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -386,8 +386,8 @@ gst_directdraw_sink_base_init (gpointer g_class) "Sink/Video", "Output to a video card via Direct Draw", "Sebastien Moutte <sebastien@moutte.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&directdrawsink_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &directdrawsink_sink_factory); } static void diff --git a/sys/directsound/gstdirectsoundsrc.c b/sys/directsound/gstdirectsoundsrc.c index 54282f664..7f0072d25 100644 --- a/sys/directsound/gstdirectsoundsrc.c +++ b/sys/directsound/gstdirectsoundsrc.c @@ -156,8 +156,8 @@ gst_directsound_src_base_init (gpointer g_class) "Capture from a soundcard via DIRECTSOUND", "Joni Valtanen <joni.valtanen@movial.fi>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&directsound_src_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &directsound_src_src_factory); } diff --git a/sys/dshowdecwrapper/gstdshowaudiodec.cpp b/sys/dshowdecwrapper/gstdshowaudiodec.cpp index f10ac8cdc..bd4bd6496 100644 --- a/sys/dshowdecwrapper/gstdshowaudiodec.cpp +++ b/sys/dshowdecwrapper/gstdshowaudiodec.cpp @@ -349,6 +349,9 @@ gst_dshowaudiodec_base_init (gpointer klass) /* register */ gst_element_class_add_pad_template (element_class, src); gst_element_class_add_pad_template (element_class, sink); + + gst_object_unref (src); + gst_object_unref (sink); } static void diff --git a/sys/dshowdecwrapper/gstdshowvideodec.cpp b/sys/dshowdecwrapper/gstdshowvideodec.cpp index 663e98043..fdcfb28bb 100644 --- a/sys/dshowdecwrapper/gstdshowvideodec.cpp +++ b/sys/dshowdecwrapper/gstdshowvideodec.cpp @@ -401,6 +401,9 @@ gst_dshowvideodec_base_init (gpointer klass) gst_element_class_add_pad_template (element_class, src); gst_element_class_add_pad_template (element_class, sink); + + gst_object_unref (src); + gst_object_unref (sink); } static void diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp index e7fbadaab..fcd9f2fc5 100644 --- a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp +++ b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp @@ -118,8 +118,7 @@ gst_dshowaudiosrc_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); gst_element_class_set_details_simple (element_class, "Directshow audio capture source", "Source/Audio", diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.cpp b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp index e84148ab4..3fa13df3b 100644 --- a/sys/dshowsrcwrapper/gstdshowvideosrc.cpp +++ b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp @@ -126,8 +126,7 @@ gst_dshowvideosrc_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); gst_element_class_set_details_simple (element_class, "DirectShow video capture source", "Source/Video", diff --git a/sys/dshowvideosink/dshowvideosink.cpp b/sys/dshowvideosink/dshowvideosink.cpp index 8b8554ca6..5ac2a5f3b 100644 --- a/sys/dshowvideosink/dshowvideosink.cpp +++ b/sys/dshowvideosink/dshowvideosink.cpp @@ -212,13 +212,14 @@ gst_dshowvideosink_init_interfaces (GType type) GST_DEBUG_CATEGORY_INIT (dshowvideosink_debug, "dshowvideosink", 0, \ "DirectShow video sink"); } + static void gst_dshowvideosink_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "DirectShow video sink", "Sink/Video", "Display data using a DirectShow video renderer", diff --git a/sys/dvb/dvbbasebin.c b/sys/dvb/dvbbasebin.c index 79e61c310..a90860a7f 100644 --- a/sys/dvb/dvbbasebin.c +++ b/sys/dvb/dvbbasebin.c @@ -198,10 +198,9 @@ dvb_base_bin_base_init (gpointer klass) element_class->request_new_pad = dvb_base_bin_request_new_pad; element_class->release_pad = dvb_base_bin_release_pad; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&program_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, + &program_template); + gst_element_class_add_static_pad_template (element_class, &src_template); gst_element_class_set_details_simple (element_class, "DVB bin", "Source/Bin/Video", diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index d0bd1d442..7eb2a2302 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -313,8 +313,8 @@ gst_dvbsrc_base_init (gpointer gclass) GstDvbSrcClass *klass = (GstDvbSrcClass *) gclass; GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&ts_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &ts_src_factory); gst_element_class_set_details_simple (element_class, "DVB Source", "Source/Video", diff --git a/sys/dxr3/dxr3audiosink.c b/sys/dxr3/dxr3audiosink.c index d7bd6881d..b72544b2b 100644 --- a/sys/dxr3/dxr3audiosink.c +++ b/sys/dxr3/dxr3audiosink.c @@ -148,10 +148,10 @@ dxr3audiosink_base_init (Dxr3AudioSinkClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&dxr3audiosink_pcm_sink_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&dxr3audiosink_ac3_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &dxr3audiosink_pcm_sink_factory); + gst_element_class_add_static_pad_template (element_class, + &dxr3audiosink_ac3_sink_factory); gst_element_class_set_details_simple (element_class, "dxr3/Hollywood+ mpeg decoder board audio plugin", "Audio/Sink", "Feeds audio to Sigma Designs em8300 based boards", diff --git a/sys/dxr3/dxr3spusink.c b/sys/dxr3/dxr3spusink.c index 0ea924390..7e4d021ef 100644 --- a/sys/dxr3/dxr3spusink.c +++ b/sys/dxr3/dxr3spusink.c @@ -126,8 +126,8 @@ dxr3spusink_base_init (Dxr3SpuSinkClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&dxr3spusink_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &dxr3spusink_sink_factory); gst_element_class_set_details_simple (element_class, "dxr3/Hollywood+ mpeg decoder board subpicture element", "Sink/Video", "Feeds subpicture information to Sigma Designs em8300 based boards", diff --git a/sys/dxr3/dxr3videosink.c b/sys/dxr3/dxr3videosink.c index 2f86f0681..437789cab 100644 --- a/sys/dxr3/dxr3videosink.c +++ b/sys/dxr3/dxr3videosink.c @@ -151,8 +151,8 @@ dxr3videosink_base_init (Dxr3VideoSinkClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&dxr3videosink_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &dxr3videosink_sink_factory); gst_element_class_set_details_simple (element_class, "dxr3/Hollywood+ mpeg decoder board video element", "Sink/Video", "Feeds MPEG2 video to Sigma Designs em8300 based boards", diff --git a/sys/fbdev/gstfbdevsink.c b/sys/fbdev/gstfbdevsink.c index 8925f3d30..7878fbfbc 100644 --- a/sys/fbdev/gstfbdevsink.c +++ b/sys/fbdev/gstfbdevsink.c @@ -93,8 +93,8 @@ gst_fbdevsink_base_init (gpointer g_class) gst_element_class_set_details_simple (element_class, "fbdev video sink", "Sink/Video", "A linux framebuffer videosink", "Sean D'Epagnier <sean@depagnier.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } diff --git a/sys/linsys/gstlinsyssdisink.c b/sys/linsys/gstlinsyssdisink.c index 3e9ad165b..e4260c023 100644 --- a/sys/linsys/gstlinsyssdisink.c +++ b/sys/linsys/gstlinsyssdisink.c @@ -99,8 +99,8 @@ gst_linsys_sdi_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_linsys_sdi_sink_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_linsys_sdi_sink_sink_template); gst_element_class_set_details_simple (element_class, "SDI video sink", "Sink/Video", "Writes video from SDI transmit device", diff --git a/sys/linsys/gstlinsyssdisrc.c b/sys/linsys/gstlinsyssdisrc.c index c5a928c68..467c54c50 100644 --- a/sys/linsys/gstlinsyssdisrc.c +++ b/sys/linsys/gstlinsyssdisrc.c @@ -103,8 +103,8 @@ gst_linsys_sdi_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_linsys_sdi_src_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_linsys_sdi_src_src_template); gst_element_class_set_details_simple (element_class, "SDI video source", "Source/Video", "Reads video from SDI capture device", diff --git a/sys/osxvideo/osxvideosrc.c b/sys/osxvideo/osxvideosrc.c index ed84619d7..864806dcc 100644 --- a/sys/osxvideo/osxvideosrc.c +++ b/sys/osxvideo/osxvideosrc.c @@ -639,8 +639,7 @@ gst_osx_video_src_base_init (gpointer gclass) GST_DEBUG ("%s", G_STRFUNC); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); gst_element_class_set_details_simple (element_class, "Video Source (OSX)", "Source/Video", diff --git a/sys/qcam/gstqcamsrc.c b/sys/qcam/gstqcamsrc.c index 76229ac76..2bd3a5855 100644 --- a/sys/qcam/gstqcamsrc.c +++ b/sys/qcam/gstqcamsrc.c @@ -148,8 +148,8 @@ gst_qcamsrc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_qcamsrc_src_factory)); + gst_element_class_add_static_pad_template (element_class, + &gst_qcamsrc_src_factory); gst_element_class_set_details_simple (element_class, "QCam Source", "Source/Video", "Read from a QuickCam device", "Wim Taymans <wim.taymans@chello.be>"); diff --git a/sys/qtwrapper/audiodecoders.c b/sys/qtwrapper/audiodecoders.c index 5a29c47df..abb2541de 100644 --- a/sys/qtwrapper/audiodecoders.c +++ b/sys/qtwrapper/audiodecoders.c @@ -970,8 +970,7 @@ qtwrapper_audio_decoder_base_init (QTWrapperAudioDecoderClass * klass) klass->sinktempl = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, params->sinkcaps); gst_element_class_add_pad_template (element_class, klass->sinktempl); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &src_templ); /* Store class-global values */ klass->componentSubType = desc.componentSubType; diff --git a/sys/qtwrapper/videodecoders.c b/sys/qtwrapper/videodecoders.c index b2e58e968..c532ef9bb 100644 --- a/sys/qtwrapper/videodecoders.c +++ b/sys/qtwrapper/videodecoders.c @@ -171,8 +171,7 @@ qtwrapper_video_decoder_base_init (QTWrapperVideoDecoderClass * klass) GST_PAD_ALWAYS, params->sinkcaps); gst_element_class_add_pad_template (element_class, klass->sinktempl); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &src_templ); /* Store class-global values */ klass->component = params->component; diff --git a/sys/shm/gstshmsink.c b/sys/shm/gstshmsink.c index cb6c92bfa..903760be1 100644 --- a/sys/shm/gstshmsink.c +++ b/sys/shm/gstshmsink.c @@ -96,8 +96,7 @@ gst_shm_sink_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_class, "Shared Memory Sink", diff --git a/sys/shm/gstshmsrc.c b/sys/shm/gstshmsrc.c index bbeadcd7d..cff5d46da 100644 --- a/sys/shm/gstshmsrc.c +++ b/sys/shm/gstshmsrc.c @@ -85,8 +85,7 @@ gst_shm_src_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); gst_element_class_set_details_simple (element_class, "Shared Memory Source", diff --git a/sys/vcd/vcdsrc.c b/sys/vcd/vcdsrc.c index 5ce58d870..553e264cc 100644 --- a/sys/vcd/vcdsrc.c +++ b/sys/vcd/vcdsrc.c @@ -99,8 +99,7 @@ gst_vcdsrc_base_init (gpointer g_class) "Source/File", "Asynchronous read from VCD disk", "Erik Walthinsen <omega@cse.ogi.edu>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (element_class, &srctemplate); } static void diff --git a/sys/vdpau/gstvdp/gstvdpdecoder.c b/sys/vdpau/gstvdp/gstvdpdecoder.c index 977f6e6b2..a400a39d6 100644 --- a/sys/vdpau/gstvdp/gstvdpdecoder.c +++ b/sys/vdpau/gstvdp/gstvdpdecoder.c @@ -293,6 +293,7 @@ gst_vdp_decoder_base_init (gpointer g_class) GST_PAD_SRC, GST_PAD_ALWAYS, src_caps); gst_element_class_add_pad_template (element_class, src_template); + gst_object_unref (src_template); } static void diff --git a/sys/vdpau/gstvdpsink.c b/sys/vdpau/gstvdpsink.c index c3d097fdd..7b9fa2e6c 100644 --- a/sys/vdpau/gstvdpsink.c +++ b/sys/vdpau/gstvdpsink.c @@ -1383,8 +1383,8 @@ gst_vdp_sink_base_init (gpointer g_class) "Sink/Video", "VDPAU Sink", "Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } static void diff --git a/sys/vdpau/gstvdpvideopostprocess.c b/sys/vdpau/gstvdpvideopostprocess.c index ced168fec..09e484409 100644 --- a/sys/vdpau/gstvdpvideopostprocess.c +++ b/sys/vdpau/gstvdpvideopostprocess.c @@ -1190,12 +1190,14 @@ gst_vdp_vpp_base_init (gpointer gclass) src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, src_caps); gst_element_class_add_pad_template (element_class, src_template); + gst_object_unref (src_template); /* SINK PAD */ sink_caps = gst_vdp_video_buffer_get_caps (FALSE, 0); sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, sink_caps); gst_element_class_add_pad_template (element_class, sink_template); + gst_object_unref (sink_template); } /* initialize the vdpaumpegdecoder's class */ diff --git a/sys/vdpau/h264/gstvdph264dec.c b/sys/vdpau/h264/gstvdph264dec.c index 6c181aff0..6b6c3360a 100644 --- a/sys/vdpau/h264/gstvdph264dec.c +++ b/sys/vdpau/h264/gstvdph264dec.c @@ -870,8 +870,8 @@ gst_vdp_h264_dec_base_init (gpointer g_class) "Decode h264 stream with vdpau", "Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } static void diff --git a/sys/vdpau/mpeg/gstvdpmpegdec.c b/sys/vdpau/mpeg/gstvdpmpegdec.c index 3de0eec65..6a473e48e 100644 --- a/sys/vdpau/mpeg/gstvdpmpegdec.c +++ b/sys/vdpau/mpeg/gstvdpmpegdec.c @@ -624,8 +624,8 @@ gst_vdp_mpeg_dec_base_init (gpointer gclass) "Decode mpeg stream with vdpau", "Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } /* initialize the vdpaumpegdecoder's class */ diff --git a/sys/vdpau/mpeg4/gstvdpmpeg4dec.c b/sys/vdpau/mpeg4/gstvdpmpeg4dec.c index 2ecf434e1..4c1bcb8b3 100644 --- a/sys/vdpau/mpeg4/gstvdpmpeg4dec.c +++ b/sys/vdpau/mpeg4/gstvdpmpeg4dec.c @@ -445,8 +445,8 @@ gst_vdp_mpeg4_dec_base_init (gpointer gclass) "Decode mpeg4 stream with vdpau", "Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); } /* initialize the vdpaumpeg4decoder's class */ diff --git a/sys/wasapi/gstwasapisink.c b/sys/wasapi/gstwasapisink.c index 3a3d9e906..8e515dc93 100644 --- a/sys/wasapi/gstwasapisink.c +++ b/sys/wasapi/gstwasapisink.c @@ -65,8 +65,8 @@ gst_wasapi_sink_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (element_class, + &sink_template); gst_element_class_set_details_simple (element_class, "WasapiSrc", "Sink/Audio", "Stream audio to an audio capture device through WASAPI", diff --git a/sys/wasapi/gstwasapisrc.c b/sys/wasapi/gstwasapisrc.c index a4100315b..0ef642b08 100644 --- a/sys/wasapi/gstwasapisrc.c +++ b/sys/wasapi/gstwasapisrc.c @@ -69,8 +69,7 @@ gst_wasapi_src_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); gst_element_class_set_details_simple (element_class, "WasapiSrc", "Source/Audio", "Stream audio from an audio capture device through WASAPI", diff --git a/sys/wininet/gstwininetsrc.c b/sys/wininet/gstwininetsrc.c index 8104f7cea..b21e3d0be 100644 --- a/sys/wininet/gstwininetsrc.c +++ b/sys/wininet/gstwininetsrc.c @@ -83,8 +83,7 @@ gst_win_inet_src_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); gst_element_class_set_details_simple (element_class, "Windows Network Source", "Source/Network", diff --git a/sys/winks/gstksvideosrc.c b/sys/winks/gstksvideosrc.c index 577bef5e6..3f2b66914 100644 --- a/sys/winks/gstksvideosrc.c +++ b/sys/winks/gstksvideosrc.c @@ -167,6 +167,7 @@ static void gst_ks_video_src_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); + GstPadTemplate *pad_template; gst_element_class_set_details_simple (element_class, "KsVideoSrc", "Source/Video", @@ -175,9 +176,11 @@ gst_ks_video_src_base_init (gpointer gclass) "Haakon Sporsheim <hakon.sporsheim@tandberg.com>\n" "Andres Colubri <andres.colubri@gmail.com>"); - gst_element_class_add_pad_template (element_class, + pad_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - ks_video_get_all_caps ())); + ks_video_get_all_caps ()); + gst_element_class_add_pad_template (element_class, pad_template); + gst_object_unref (pad_template); } static void diff --git a/sys/winscreencap/gstdx9screencapsrc.c b/sys/winscreencap/gstdx9screencapsrc.c index 83bcea277..72a04cecd 100644 --- a/sys/winscreencap/gstdx9screencapsrc.c +++ b/sys/winscreencap/gstdx9screencapsrc.c @@ -101,8 +101,7 @@ gst_dx9screencapsrc_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); gst_element_class_set_details_simple (element_class, "DirectX 9 screen capture source", "Source/Video", "Captures screen", diff --git a/sys/winscreencap/gstgdiscreencapsrc.c b/sys/winscreencap/gstgdiscreencapsrc.c index ff9ea7b72..a10a2fc00 100644 --- a/sys/winscreencap/gstgdiscreencapsrc.c +++ b/sys/winscreencap/gstgdiscreencapsrc.c @@ -97,8 +97,7 @@ gst_gdiscreencapsrc_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); + gst_element_class_add_static_pad_template (element_class, &src_template); gst_element_class_set_details_simple (element_class, "GDI screen capture source", "Source/Video", "Captures screen", "Haakon Sporsheim <hakon.sporsheim@tandberg.com>"); diff --git a/tests/check/elements/autoconvert.c b/tests/check/elements/autoconvert.c index 037795378..f341a9944 100644 --- a/tests/check/elements/autoconvert.c +++ b/tests/check/elements/autoconvert.c @@ -206,13 +206,9 @@ static void test_element1_class_init (TestElement1Class * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - GstPadTemplate *src_template, *sink_template; - src_template = gst_static_pad_template_get (&src_factory); - gst_element_class_add_pad_template (element_class, src_template); - - sink_template = gst_static_pad_template_get (&sink_factory); - gst_element_class_add_pad_template (element_class, sink_template); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } static void @@ -225,13 +221,9 @@ static void test_element2_class_init (TestElement2Class * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - GstPadTemplate *src_template, *sink_template; - - src_template = gst_static_pad_template_get (&src_factory); - gst_element_class_add_pad_template (element_class, src_template); - sink_template = gst_static_pad_template_get (&sink_factory); - gst_element_class_add_pad_template (element_class, sink_template); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); } static void diff --git a/tests/check/elements/baseaudiovisualizer.c b/tests/check/elements/baseaudiovisualizer.c index 8b97665a3..f06b53d04 100644 --- a/tests/check/elements/baseaudiovisualizer.c +++ b/tests/check/elements/baseaudiovisualizer.c @@ -72,10 +72,10 @@ gst_test_scope_base_init (gpointer g_class) "Visualization", "Dummy test scope", "Stefan Kost <ensonic@users.sf.net>"); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_test_scope_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_test_scope_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_test_scope_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_test_scope_sink_template); } static void diff --git a/tools/element-templates/sinkpad b/tools/element-templates/sinkpad index 6d3bad1fb..ec8a98060 100644 --- a/tools/element-templates/sinkpad +++ b/tools/element-templates/sinkpad @@ -30,8 +30,8 @@ GST_STATIC_PAD_TEMPLATE ("sink", ); % base-init - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_replace_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_replace_sink_template); % instance-init replace->sinkpad = gst_pad_new_from_static_template (&gst_replace_sink_template diff --git a/tools/element-templates/sinkpad-simple b/tools/element-templates/sinkpad-simple index e8538b6ec..822079bee 100644 --- a/tools/element-templates/sinkpad-simple +++ b/tools/element-templates/sinkpad-simple @@ -12,8 +12,8 @@ GST_STATIC_PAD_TEMPLATE ("sink", ); % base-init - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_replace_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_replace_sink_template); % instance-init replace->sinkpad = gst_pad_new_from_static_template (&gst_replace_sink_template diff --git a/tools/element-templates/srcpad b/tools/element-templates/srcpad index d1f799267..9c4f32052 100644 --- a/tools/element-templates/srcpad +++ b/tools/element-templates/srcpad @@ -28,8 +28,8 @@ GST_STATIC_PAD_TEMPLATE ("src", ); % base-init - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_replace_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_replace_src_template); % instance-init replace->srcpad = gst_pad_new_from_static_template (&gst_replace_src_template diff --git a/tools/element-templates/srcpad-simple b/tools/element-templates/srcpad-simple index 0fca9157e..efb3190c6 100644 --- a/tools/element-templates/srcpad-simple +++ b/tools/element-templates/srcpad-simple @@ -12,8 +12,8 @@ GST_STATIC_PAD_TEMPLATE ("src", ); % base-init - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_replace_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_replace_src_template); % instance-init replace->srcpad = gst_pad_new_from_static_template (&gst_replace_src_template |