From 44b70ca3a15fde4fa725ce74a5f5315b148bbf47 Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Thu, 3 Mar 2016 16:46:24 +0900 Subject: [PATCH] base: use new gst_element_class_add_static_pad_template() https://bugzilla.gnome.org/show_bug.cgi?id=763075 --- ext/alsa/gstalsamidisrc.c | 3 +-- ext/alsa/gstalsasink.c | 4 ++-- ext/alsa/gstalsasrc.c | 4 ++-- ext/libvisual/visual.c | 6 ++--- ext/ogg/gstoggaviparse.c | 8 +++---- ext/ogg/gstoggdemux.c | 8 +++---- ext/ogg/gstoggmux.c | 15 ++++++------ ext/ogg/gstoggparse.c | 8 +++---- ext/ogg/gstogmparse.c | 19 +++++++-------- ext/opus/gstopusdec.c | 11 ++++----- ext/opus/gstopusenc.c | 6 ++--- ext/pango/gstbasetextoverlay.c | 8 +++---- ext/pango/gsttextoverlay.c | 4 ++-- ext/pango/gsttextrender.c | 8 +++---- ext/theora/gsttheoradec.c | 13 +++++----- ext/theora/gsttheoraenc.c | 13 +++++----- ext/theora/gsttheoraparse.c | 12 +++++----- ext/vorbis/gstvorbisdec.c | 10 ++++---- ext/vorbis/gstvorbisenc.c | 4 ++-- ext/vorbis/gstvorbisparse.c | 13 +++++----- gst-libs/gst/app/gstappsink.c | 4 ++-- gst-libs/gst/app/gstappsrc.c | 4 ++-- gst-libs/gst/audio/gstaudiocdsrc.c | 4 ++-- gst-libs/gst/tag/gsttagdemux.c | 3 +-- gst/adder/gstadder.c | 11 ++++----- gst/audioconvert/gstaudioconvert.c | 14 +++++------ gst/audiorate/gstaudiorate.c | 8 +++---- gst/audioresample/gstaudioresample.c | 8 +++---- gst/audiotestsrc/gstaudiotestsrc.c | 8 +++---- gst/encoding/gstencodebin.c | 19 +++++++-------- gst/encoding/gstsmartencoder.c | 6 ++--- gst/encoding/gststreamcombiner.c | 6 ++--- gst/encoding/gststreamsplitter.c | 9 +++---- gst/gio/gstgiobasesink.c | 3 +-- gst/gio/gstgiobasesrc.c | 3 +-- gst/playback/gstdecodebin2.c | 8 +++---- gst/playback/gstplaysink.c | 17 ++++++------- gst/playback/gstplaysinkconvertbin.c | 6 ++--- gst/playback/gststreamsynchronizer.c | 6 ++--- gst/playback/gstsubtitleoverlay.c | 11 ++++----- gst/playback/gsturidecodebin.c | 3 +-- gst/subparse/gstssaparse.c | 6 ++--- gst/subparse/gstsubparse.c | 6 ++--- gst/tcp/gstmultihandlesink.c | 3 +-- gst/tcp/gstsocketsrc.c | 3 +-- gst/tcp/gsttcpclientsink.c | 3 +-- gst/tcp/gsttcpclientsrc.c | 3 +-- gst/tcp/gsttcpserversrc.c | 3 +-- gst/videoconvert/gstvideoconvert.c | 8 +++---- gst/videorate/gstvideorate.c | 8 +++---- gst/videotestsrc/gstvideotestsrc.c | 4 ++-- sys/ximage/ximagesink.c | 4 ++-- sys/xvimage/xvimagesink.c | 4 ++-- tests/check/elements/audiorate.c | 6 ++--- tests/check/elements/decodebin.c | 18 +++++--------- tests/check/elements/playbin-complex.c | 33 +++++++++----------------- tests/check/elements/playbin.c | 6 ++--- tests/check/elements/videoscale.c | 3 +-- tests/check/libs/audiodecoder.c | 6 ++--- tests/check/libs/audioencoder.c | 6 ++--- tests/check/libs/baseaudiovisualizer.c | 8 +++---- tests/check/libs/rtpbasedepayload.c | 8 +++---- tests/check/libs/rtpbasepayload.c | 8 +++---- tests/check/libs/videodecoder.c | 6 ++--- tests/check/libs/videoencoder.c | 6 ++--- 65 files changed, 217 insertions(+), 290 deletions(-) diff --git a/ext/alsa/gstalsamidisrc.c b/ext/alsa/gstalsamidisrc.c index 645d0b0371..edf762494c 100644 --- a/ext/alsa/gstalsamidisrc.c +++ b/ext/alsa/gstalsamidisrc.c @@ -247,8 +247,7 @@ gst_alsa_midi_src_class_init (GstAlsaMidiSrcClass * klass) "AlsaMidi Source", "Source", "Push ALSA MIDI sequencer events around", "Antonio Ospite "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); gstbase_src_class->start = GST_DEBUG_FUNCPTR (gst_alsa_midi_src_start); gstbase_src_class->stop = GST_DEBUG_FUNCPTR (gst_alsa_midi_src_stop); diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c index 28f328ee50..2d81f52bf2 100644 --- a/ext/alsa/gstalsasink.c +++ b/ext/alsa/gstalsasink.c @@ -166,8 +166,8 @@ gst_alsasink_class_init (GstAlsaSinkClass * klass) "Audio sink (ALSA)", "Sink/Audio", "Output to a sound card via ALSA", "Wim Taymans "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&alsasink_sink_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &alsasink_sink_factory); gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasink_getcaps); gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_alsasink_query); diff --git a/ext/alsa/gstalsasrc.c b/ext/alsa/gstalsasrc.c index a359cc351a..8cf148e806 100644 --- a/ext/alsa/gstalsasrc.c +++ b/ext/alsa/gstalsasrc.c @@ -142,8 +142,8 @@ gst_alsasrc_class_init (GstAlsaSrcClass * klass) "Audio source (ALSA)", "Source/Audio", "Read from a sound card via ALSA", "Wim Taymans "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&alsasrc_src_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &alsasrc_src_factory); gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasrc_getcaps); diff --git a/ext/libvisual/visual.c b/ext/libvisual/visual.c index 460c10629a..926ac956e9 100644 --- a/ext/libvisual/visual.c +++ b/ext/libvisual/visual.c @@ -103,10 +103,8 @@ gst_visual_class_init (gpointer g_class, gpointer class_data) klass->plugin->info->name, klass->plugin->info->version); /* FIXME: improve to only register what plugin supports? */ - 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_static_metadata (element_class, longname, "Visualization", diff --git a/ext/ogg/gstoggaviparse.c b/ext/ogg/gstoggaviparse.c index c96a2df26b..7a12a32775 100644 --- a/ext/ogg/gstoggaviparse.c +++ b/ext/ogg/gstoggaviparse.c @@ -140,10 +140,10 @@ gst_ogg_avi_parse_base_init (gpointer g_class) "parse an ogg avi stream into pages (info about ogg: http://xiph.org)", "Wim Taymans "); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&ogg_avi_parse_sink_template_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&ogg_avi_parse_src_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &ogg_avi_parse_sink_template_factory); + gst_element_class_add_static_pad_template (element_class, + &ogg_avi_parse_src_template_factory); } static void diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index bd129ab072..284f55e72d 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -2238,10 +2238,10 @@ gst_ogg_demux_class_init (GstOggDemuxClass * klass) "demux ogg streams (info about ogg: http://xiph.org)", "Wim Taymans "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&ogg_demux_sink_template_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&ogg_demux_src_template_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &ogg_demux_sink_template_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &ogg_demux_src_template_factory); gstelement_class->change_state = gst_ogg_demux_change_state; gstelement_class->send_event = gst_ogg_demux_receive_event; diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 4e1ce94313..d2adb3b6c9 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -150,14 +150,13 @@ gst_ogg_mux_class_init (GstOggMuxClass * klass) gobject_class->get_property = gst_ogg_mux_get_property; gobject_class->set_property = gst_ogg_mux_set_property; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&video_sink_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&audio_sink_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&subtitle_sink_factory)); + gst_element_class_add_static_pad_template (gstelement_class, &src_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &video_sink_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &audio_sink_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &subtitle_sink_factory); gst_element_class_set_static_metadata (gstelement_class, "Ogg muxer", "Codec/Muxer", diff --git a/ext/ogg/gstoggparse.c b/ext/ogg/gstoggparse.c index 76f53abfcb..1d7107bb16 100644 --- a/ext/ogg/gstoggparse.c +++ b/ext/ogg/gstoggparse.c @@ -225,10 +225,10 @@ gst_ogg_parse_base_init (gpointer g_class) "parse ogg streams into pages (info about ogg: http://xiph.org)", "Michael Smith "); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&ogg_parse_sink_template_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&ogg_parse_src_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &ogg_parse_sink_template_factory); + gst_element_class_add_static_pad_template (element_class, + &ogg_parse_src_template_factory); } static void diff --git a/ext/ogg/gstogmparse.c b/ext/ogg/gstogmparse.c index c85c064ac8..00632eab0a 100644 --- a/ext/ogg/gstogmparse.c +++ b/ext/ogg/gstogmparse.c @@ -281,10 +281,10 @@ gst_ogm_audio_parse_base_init (GstOgmParseClass * klass) "parse an OGM audio header and stream", "GStreamer maintainers "); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory_audio)); - audio_src_templ = gst_pad_template_new ("src", - GST_PAD_SRC, GST_PAD_SOMETIMES, caps); + gst_element_class_add_static_pad_template (element_class, + &sink_factory_audio); + audio_src_templ = + gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_SOMETIMES, caps); gst_element_class_add_pad_template (element_class, audio_src_templ); gst_caps_unref (caps); } @@ -300,10 +300,10 @@ gst_ogm_video_parse_base_init (GstOgmParseClass * klass) "parse an OGM video header and stream", "GStreamer maintainers "); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory_video)); - video_src_templ = gst_pad_template_new ("src", - GST_PAD_SRC, GST_PAD_SOMETIMES, caps); + gst_element_class_add_static_pad_template (element_class, + &sink_factory_video); + video_src_templ = + gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_SOMETIMES, caps); gst_element_class_add_pad_template (element_class, video_src_templ); gst_caps_unref (caps); } @@ -320,8 +320,7 @@ gst_ogm_text_parse_base_init (GstOgmParseClass * klass) "parse an OGM text header and stream", "GStreamer maintainers "); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory_text)); + gst_element_class_add_static_pad_template (element_class, &sink_factory_text); text_src_templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_SOMETIMES, caps); gst_element_class_add_pad_template (element_class, text_src_templ); diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c index 7aa9838ffa..b25b68f121 100644 --- a/ext/opus/gstopusdec.c +++ b/ext/opus/gstopusdec.c @@ -126,13 +126,12 @@ gst_opus_dec_class_init (GstOpusDecClass * klass) adclass->set_format = GST_DEBUG_FUNCPTR (gst_opus_dec_set_format); adclass->getcaps = GST_DEBUG_FUNCPTR (gst_opus_dec_getcaps); - 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_static_metadata (element_class, "Opus audio decoder", - "Codec/Decoder/Audio", - "decode opus streams to audio", + "Codec/Decoder/Audio", "decode opus streams to audio", "Vincent Penquerc'h "); g_object_class_install_property (gobject_class, PROP_USE_INBAND_FEC, g_param_spec_boolean ("use-inband-fec", "Use in-band FEC", diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c index 604974ead0..0d4d8552cb 100644 --- a/ext/opus/gstopusenc.c +++ b/ext/opus/gstopusenc.c @@ -271,10 +271,8 @@ gst_opus_enc_class_init (GstOpusEncClass * klass) gobject_class->set_property = gst_opus_enc_set_property; gobject_class->get_property = gst_opus_enc_get_property; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (gstelement_class, &src_factory); + gst_element_class_add_static_pad_template (gstelement_class, &sink_factory); gst_element_class_set_static_metadata (gstelement_class, "Opus audio encoder", "Codec/Encoder/Audio", "Encodes audio in Opus format", diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c index e0bb169107..c12d36ae9b 100644 --- a/ext/pango/gstbasetextoverlay.c +++ b/ext/pango/gstbasetextoverlay.c @@ -351,10 +351,10 @@ gst_base_text_overlay_class_init (GstBaseTextOverlayClass * klass) gobject_class->set_property = gst_base_text_overlay_set_property; gobject_class->get_property = gst_base_text_overlay_get_property; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&src_template_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&video_sink_template_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &src_template_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &video_sink_template_factory); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_base_text_overlay_change_state); diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index d036579e57..453e51e791 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -90,8 +90,8 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass) { GstElementClass *element_class = (GstElementClass *) klass; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&text_sink_template_factory)); + gst_element_class_add_static_pad_template (element_class, + &text_sink_template_factory); gst_element_class_set_static_metadata (element_class, "Text overlay", "Filter/Editor/Video", diff --git a/ext/pango/gsttextrender.c b/ext/pango/gsttextrender.c index c16dce4ec3..8d59a1baf2 100644 --- a/ext/pango/gsttextrender.c +++ b/ext/pango/gsttextrender.c @@ -188,10 +188,10 @@ gst_text_render_class_init (GstTextRenderClass * klass) gobject_class->set_property = gst_text_render_set_property; gobject_class->get_property = gst_text_render_get_property; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&src_template_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sink_template_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &src_template_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &sink_template_factory); gst_element_class_set_static_metadata (gstelement_class, "Text renderer", "Filter/Editor/Video", diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c index e9e70e11c4..45c777eafc 100644 --- a/ext/theora/gsttheoradec.c +++ b/ext/theora/gsttheoradec.c @@ -172,13 +172,12 @@ gst_theora_dec_class_init (GstTheoraDecClass * klass) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&theora_dec_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&theora_dec_sink_factory)); - gst_element_class_set_static_metadata (element_class, - "Theora video decoder", "Codec/Decoder/Video", - "decode raw theora streams to raw YUV video", + gst_element_class_add_static_pad_template (element_class, + &theora_dec_src_factory); + gst_element_class_add_static_pad_template (element_class, + &theora_dec_sink_factory); + gst_element_class_set_static_metadata (element_class, "Theora video decoder", + "Codec/Decoder/Video", "decode raw theora streams to raw YUV video", "Benjamin Otte , Wim Taymans "); video_decoder_class->start = GST_DEBUG_FUNCPTR (theora_dec_start); diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index ce692f2b69..d291221462 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -212,13 +212,12 @@ gst_theora_enc_class_init (GstTheoraEncClass * klass) gobject_class->get_property = theora_enc_get_property; gobject_class->finalize = theora_enc_finalize; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&theora_enc_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&theora_enc_sink_factory)); - gst_element_class_set_static_metadata (element_class, - "Theora video encoder", "Codec/Encoder/Video", - "encode raw YUV video to a theora stream", + gst_element_class_add_static_pad_template (element_class, + &theora_enc_src_factory); + gst_element_class_add_static_pad_template (element_class, + &theora_enc_sink_factory); + gst_element_class_set_static_metadata (element_class, "Theora video encoder", + "Codec/Encoder/Video", "encode raw YUV video to a theora stream", "Wim Taymans "); gstvideo_encoder_class->start = GST_DEBUG_FUNCPTR (theora_enc_start); diff --git a/ext/theora/gsttheoraparse.c b/ext/theora/gsttheoraparse.c index 5c58644c62..12a5fb1576 100644 --- a/ext/theora/gsttheoraparse.c +++ b/ext/theora/gsttheoraparse.c @@ -135,13 +135,13 @@ gst_theora_parse_class_init (GstTheoraParseClass * klass) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #endif - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&theora_parse_src_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&theora_parse_sink_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &theora_parse_src_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &theora_parse_sink_factory); gst_element_class_set_static_metadata (gstelement_class, - "Theora video parser", "Codec/Parser/Video", - "parse raw theora streams", "Andy Wingo "); + "Theora video parser", "Codec/Parser/Video", "parse raw theora streams", + "Andy Wingo "); gstelement_class->change_state = theora_parse_change_state; diff --git a/ext/vorbis/gstvorbisdec.c b/ext/vorbis/gstvorbisdec.c index bc0a20f9d8..afe32cae9b 100644 --- a/ext/vorbis/gstvorbisdec.c +++ b/ext/vorbis/gstvorbisdec.c @@ -83,18 +83,16 @@ static gboolean vorbis_dec_set_format (GstAudioDecoder * dec, GstCaps * caps); static void gst_vorbis_dec_class_init (GstVorbisDecClass * klass) { - GstPadTemplate *src_template, *sink_template; GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstAudioDecoderClass *base_class = GST_AUDIO_DECODER_CLASS (klass); gobject_class->finalize = vorbis_dec_finalize; - src_template = gst_static_pad_template_get (&vorbis_dec_src_factory); - gst_element_class_add_pad_template (element_class, src_template); - - sink_template = gst_static_pad_template_get (&vorbis_dec_sink_factory); - gst_element_class_add_pad_template (element_class, sink_template); + gst_element_class_add_static_pad_template (element_class, + &vorbis_dec_src_factory); + gst_element_class_add_static_pad_template (element_class, + &vorbis_dec_sink_factory); gst_element_class_set_static_metadata (element_class, "Vorbis audio decoder", "Codec/Decoder/Audio", diff --git a/ext/vorbis/gstvorbisenc.c b/ext/vorbis/gstvorbisenc.c index 818a010e59..1ac9d83414 100644 --- a/ext/vorbis/gstvorbisenc.c +++ b/ext/vorbis/gstvorbisenc.c @@ -162,8 +162,8 @@ gst_vorbis_enc_class_init (GstVorbisEncClass * klass) gst_element_class_add_pad_template (gstelement_class, sink_templ); gst_caps_unref (sink_caps); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&vorbis_enc_src_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &vorbis_enc_src_factory); gst_element_class_set_static_metadata (gstelement_class, "Vorbis audio encoder", "Codec/Encoder/Audio", diff --git a/ext/vorbis/gstvorbisparse.c b/ext/vorbis/gstvorbisparse.c index f9f9198f74..dd357a19f5 100644 --- a/ext/vorbis/gstvorbisparse.c +++ b/ext/vorbis/gstvorbisparse.c @@ -93,13 +93,12 @@ gst_vorbis_parse_class_init (GstVorbisParseClass * klass) gstelement_class->change_state = vorbis_parse_change_state; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&vorbis_parse_src_factory)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&vorbis_parse_sink_factory)); - gst_element_class_set_static_metadata (gstelement_class, - "VorbisParse", "Codec/Parser/Audio", - "parse raw vorbis streams", + gst_element_class_add_static_pad_template (gstelement_class, + &vorbis_parse_src_factory); + gst_element_class_add_static_pad_template (gstelement_class, + &vorbis_parse_sink_factory); + gst_element_class_set_static_metadata (gstelement_class, "VorbisParse", + "Codec/Parser/Audio", "parse raw vorbis streams", "Thomas Vander Stichele "); klass->parse_packet = GST_DEBUG_FUNCPTR (vorbis_parse_parse_packet); diff --git a/gst-libs/gst/app/gstappsink.c b/gst-libs/gst/app/gstappsink.c index e5293ee3b3..9a96341b06 100644 --- a/gst-libs/gst/app/gstappsink.c +++ b/gst-libs/gst/app/gstappsink.c @@ -342,8 +342,8 @@ gst_app_sink_class_init (GstAppSinkClass * klass) "Generic/Sink", "Allow the application to get access to raw buffer", "David Schleef , Wim Taymans "); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_app_sink_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_app_sink_template); basesink_class->unlock = gst_app_sink_unlock_start; basesink_class->unlock_stop = gst_app_sink_unlock_stop; diff --git a/gst-libs/gst/app/gstappsrc.c b/gst-libs/gst/app/gstappsrc.c index d06fca1f8a..c13f8adf09 100644 --- a/gst-libs/gst/app/gstappsrc.c +++ b/gst-libs/gst/app/gstappsrc.c @@ -513,8 +513,8 @@ gst_app_src_class_init (GstAppSrcClass * klass) "Generic/Source", "Allow the application to feed buffers to a pipeline", "David Schleef , Wim Taymans "); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_app_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_app_src_template); element_class->send_event = gst_app_src_send_event; diff --git a/gst-libs/gst/audio/gstaudiocdsrc.c b/gst-libs/gst/audio/gstaudiocdsrc.c index 5c4a0564c1..79b7423d63 100644 --- a/gst-libs/gst/audio/gstaudiocdsrc.c +++ b/gst-libs/gst/audio/gstaudiocdsrc.c @@ -291,8 +291,8 @@ gst_audio_cd_src_class_init (GstAudioCdSrcClass * klass) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #endif - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_audio_cd_src_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_audio_cd_src_src_template); #if 0 element_class->set_index = GST_DEBUG_FUNCPTR (gst_audio_cd_src_set_index); diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c index b736276c15..41fdec330d 100644 --- a/gst-libs/gst/tag/gsttagdemux.c +++ b/gst-libs/gst/tag/gsttagdemux.c @@ -228,8 +228,7 @@ gst_tag_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 (&src_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); GST_DEBUG_CATEGORY_INIT (tagdemux_debug, "tagdemux", 0, "tag demux base class"); diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 0f297d0e8d..fe2d21ae46 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -856,13 +856,12 @@ gst_adder_class_init (GstAdderClass * klass) "object.", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_adder_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_adder_sink_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_adder_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_adder_sink_template); gst_element_class_set_static_metadata (gstelement_class, "Adder", - "Generic/Audio", - "Add N audio channels together", + "Generic/Audio", "Add N audio channels together", "Thomas Vander Stichele "); gstelement_class->request_new_pad = diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index a3a8fad32f..58594378c8 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -158,13 +158,13 @@ gst_audio_convert_class_init (GstAudioConvertClass * klass) GST_TYPE_AUDIO_NOISE_SHAPING_METHOD, GST_AUDIO_NOISE_SHAPING_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_audio_convert_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_audio_convert_sink_template)); - gst_element_class_set_static_metadata (element_class, - "Audio converter", "Filter/Converter/Audio", - "Convert audio to different formats", "Benjamin Otte "); + gst_element_class_add_static_pad_template (element_class, + &gst_audio_convert_src_template); + gst_element_class_add_static_pad_template (element_class, + &gst_audio_convert_sink_template); + gst_element_class_set_static_metadata (element_class, "Audio converter", + "Filter/Converter/Audio", "Convert audio to different formats", + "Benjamin Otte "); basetransform_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_audio_convert_get_unit_size); diff --git a/gst/audiorate/gstaudiorate.c b/gst/audiorate/gstaudiorate.c index 1927ec3b10..ad8720c567 100644 --- a/gst/audiorate/gstaudiorate.c +++ b/gst/audiorate/gstaudiorate.c @@ -190,10 +190,10 @@ gst_audio_rate_class_init (GstAudioRateClass * klass) "Drops/duplicates/adjusts timestamps on audio samples to make a perfect stream", "Wim Taymans "); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_audio_rate_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_audio_rate_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_audio_rate_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_audio_rate_src_template); element_class->change_state = gst_audio_rate_change_state; } diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c index 7155c3c3a4..9f66096bfe 100644 --- a/gst/audioresample/gstaudioresample.c +++ b/gst/audioresample/gstaudioresample.c @@ -178,10 +178,10 @@ gst_audio_resample_class_init (GstAudioResampleClass * klass) 0, G_MAXUINT, SPEEX_RESAMPLER_SINC_FILTER_AUTO_THRESHOLD_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_audio_resample_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_audio_resample_sink_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_audio_resample_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_audio_resample_sink_template); gst_element_class_set_static_metadata (gstelement_class, "Audio resampler", "Filter/Converter/Audio", "Resamples audio", diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c index 15cb4a3d93..1c3b5bcc4e 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.c +++ b/gst/audiotestsrc/gstaudiotestsrc.c @@ -207,10 +207,10 @@ gst_audio_test_src_class_init (GstAudioTestSrcClass * klass) "Can activate in pull mode", DEFAULT_CAN_ACTIVATE_PULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_audio_test_src_src_template)); - gst_element_class_set_static_metadata (gstelement_class, - "Audio test source", "Source/Audio", + gst_element_class_add_static_pad_template (gstelement_class, + &gst_audio_test_src_src_template); + gst_element_class_set_static_metadata (gstelement_class, "Audio test source", + "Source/Audio", "Creates audio test signals of given frequency and volume", "Stefan Kost "); diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index 55dab2f95b..1f5de54796 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -431,16 +431,15 @@ gst_encode_bin_class_init (GstEncodeBinClass * klass) klass->request_pad = gst_encode_bin_request_pad_signal; klass->request_profile_pad = gst_encode_bin_request_profile_pad_signal; - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&muxer_src_template)); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&video_sink_template)); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&audio_sink_template)); - /* gst_element_class_add_pad_template (gstelement_klass, */ - /* gst_static_pad_template_get (&text_sink_template)); */ - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&private_sink_template)); + gst_element_class_add_static_pad_template (gstelement_klass, + &muxer_src_template); + gst_element_class_add_static_pad_template (gstelement_klass, + &video_sink_template); + gst_element_class_add_static_pad_template (gstelement_klass, + &audio_sink_template); + /* gst_element_class_add_static_pad_template (gstelement_klass, &text_sink_template); */ + gst_element_class_add_static_pad_template (gstelement_klass, + &private_sink_template); gstelement_klass->change_state = GST_DEBUG_FUNCPTR (gst_encode_bin_change_state); diff --git a/gst/encoding/gstsmartencoder.c b/gst/encoding/gstsmartencoder.c index 5c46da87c5..5daf6f94dc 100644 --- a/gst/encoding/gstsmartencoder.c +++ b/gst/encoding/gstsmartencoder.c @@ -100,10 +100,8 @@ gst_smart_encoder_class_init (GstSmartEncoderClass * klass) gst_smart_encoder_parent_class = g_type_class_peek_parent (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_static_metadata (element_class, "Smart Video Encoder", "Codec/Recoder/Video", diff --git a/gst/encoding/gststreamcombiner.c b/gst/encoding/gststreamcombiner.c index 42c959d1f7..008b08d51e 100644 --- a/gst/encoding/gststreamcombiner.c +++ b/gst/encoding/gststreamcombiner.c @@ -77,10 +77,8 @@ gst_stream_combiner_class_init (GstStreamCombinerClass * klass) GST_DEBUG_CATEGORY_INIT (gst_stream_combiner_debug, "streamcombiner", 0, "Stream Combiner"); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (gstelement_klass, &src_template); + gst_element_class_add_static_pad_template (gstelement_klass, &sink_template); gstelement_klass->request_new_pad = GST_DEBUG_FUNCPTR (gst_stream_combiner_request_new_pad); diff --git a/gst/encoding/gststreamsplitter.c b/gst/encoding/gststreamsplitter.c index 6bf3894d09..f8ad79464c 100644 --- a/gst/encoding/gststreamsplitter.c +++ b/gst/encoding/gststreamsplitter.c @@ -66,10 +66,8 @@ gst_stream_splitter_class_init (GstStreamSplitterClass * klass) GST_DEBUG_CATEGORY_INIT (gst_stream_splitter_debug, "streamsplitter", 0, "Stream Splitter"); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&src_template)); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&sink_template)); + gst_element_class_add_static_pad_template (gstelement_klass, &src_template); + gst_element_class_add_static_pad_template (gstelement_klass, &sink_template); gstelement_klass->request_new_pad = GST_DEBUG_FUNCPTR (gst_stream_splitter_request_new_pad); @@ -157,8 +155,7 @@ _flush_events (GstPad * pad, GList * events) for (tmp = events; tmp; tmp = tmp->next) { if (GST_EVENT_TYPE (tmp->data) != GST_EVENT_EOS && GST_EVENT_TYPE (tmp->data) != GST_EVENT_SEGMENT && - GST_EVENT_IS_STICKY (tmp->data) && - pad != NULL) { + GST_EVENT_IS_STICKY (tmp->data) && pad != NULL) { gst_pad_store_sticky_event (pad, GST_EVENT_CAST (tmp->data)); } gst_event_unref (tmp->data); diff --git a/gst/gio/gstgiobasesink.c b/gst/gio/gstgiobasesink.c index 3dbec56bbf..caacba5063 100644 --- a/gst/gio/gstgiobasesink.c +++ b/gst/gio/gstgiobasesink.c @@ -59,8 +59,7 @@ gst_gio_base_sink_class_init (GstGioBaseSinkClass * klass) gobject_class->finalize = gst_gio_base_sink_finalize; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (gstelement_class, &sink_factory); gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_gio_base_sink_start); gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_gio_base_sink_stop); diff --git a/gst/gio/gstgiobasesrc.c b/gst/gio/gstgiobasesrc.c index 213ede670b..b4fddc105f 100644 --- a/gst/gio/gstgiobasesrc.c +++ b/gst/gio/gstgiobasesrc.c @@ -64,8 +64,7 @@ gst_gio_base_src_class_init (GstGioBaseSrcClass * klass) gobject_class->finalize = gst_gio_base_src_finalize; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&src_factory)); + gst_element_class_add_static_pad_template (gstelement_class, &src_factory); gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_gio_base_src_start); gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_gio_base_src_stop); diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 84ea7468cb..2ae745faeb 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -998,10 +998,10 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass) klass->autoplug_select = GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_select); klass->autoplug_query = GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_query); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&decoder_bin_sink_template)); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&decoder_bin_src_template)); + gst_element_class_add_static_pad_template (gstelement_klass, + &decoder_bin_sink_template); + gst_element_class_add_static_pad_template (gstelement_klass, + &decoder_bin_src_template); gst_element_class_set_static_metadata (gstelement_klass, "Decoder Bin", "Generic/Bin/Decoder", diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index c640ba4fdc..bf0aea9ed5 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -620,16 +620,13 @@ gst_play_sink_class_init (GstPlaySinkClass * klass) G_STRUCT_OFFSET (GstPlaySinkClass, convert_sample), NULL, NULL, g_cclosure_marshal_generic, GST_TYPE_SAMPLE, 1, GST_TYPE_CAPS); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&audiorawtemplate)); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&audiotemplate)); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&videorawtemplate)); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&videotemplate)); - gst_element_class_add_pad_template (gstelement_klass, - gst_static_pad_template_get (&texttemplate)); + gst_element_class_add_static_pad_template (gstelement_klass, + &audiorawtemplate); + gst_element_class_add_static_pad_template (gstelement_klass, &audiotemplate); + gst_element_class_add_static_pad_template (gstelement_klass, + &videorawtemplate); + gst_element_class_add_static_pad_template (gstelement_klass, &videotemplate); + gst_element_class_add_static_pad_template (gstelement_klass, &texttemplate); gst_element_class_set_static_metadata (gstelement_klass, "Player Sink", "Generic/Bin/Sink", "Convenience sink for multiple streams", diff --git a/gst/playback/gstplaysinkconvertbin.c b/gst/playback/gstplaysinkconvertbin.c index 0930810249..d4f65708f6 100644 --- a/gst/playback/gstplaysinkconvertbin.c +++ b/gst/playback/gstplaysinkconvertbin.c @@ -655,10 +655,8 @@ gst_play_sink_convert_bin_class_init (GstPlaySinkConvertBinClass * klass) gobject_class->dispose = gst_play_sink_convert_bin_dispose; gobject_class->finalize = gst_play_sink_convert_bin_finalize; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gst_element_class_set_static_metadata (gstelement_class, "Player Sink Converter Bin", "Bin/Converter", "Convenience bin for audio/video conversion", diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c index 091e5764fa..b26ee70409 100644 --- a/gst/playback/gststreamsynchronizer.c +++ b/gst/playback/gststreamsynchronizer.c @@ -1020,10 +1020,8 @@ gst_stream_synchronizer_class_init (GstStreamSynchronizerClass * klass) gobject_class->finalize = gst_stream_synchronizer_finalize; - 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_static_metadata (element_class, "Stream Synchronizer", "Generic", diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index adab7e5254..5223c8712d 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -1575,13 +1575,12 @@ gst_subtitle_overlay_class_init (GstSubtitleOverlayClass * klass) "ISO-8859-15 will be assumed.", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - 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 (&video_sinktemplate)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&subtitle_sinktemplate)); + gst_element_class_add_static_pad_template (element_class, + &video_sinktemplate); + gst_element_class_add_static_pad_template (element_class, + &subtitle_sinktemplate); gst_element_class_set_static_metadata (element_class, "Subtitle Overlay", "Video/Overlay/Subtitle", diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c index 2a4e7bca7c..0d06776a01 100644 --- a/gst/playback/gsturidecodebin.c +++ b/gst/playback/gsturidecodebin.c @@ -699,8 +699,7 @@ gst_uri_decode_bin_class_init (GstURIDecodeBinClass * klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GST_TYPE_ELEMENT); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); gst_element_class_set_static_metadata (gstelement_class, "URI Decoder", "Generic/Bin/Decoder", "Autoplug and decode an URI to raw media", diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c index 06ecef9278..536ce0d521 100644 --- a/gst/subparse/gstssaparse.c +++ b/gst/subparse/gstssaparse.c @@ -97,10 +97,8 @@ gst_ssa_parse_class_init (GstSsaParseClass * klass) object_class->dispose = gst_ssa_parse_dispose; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_static_metadata (element_class, "SSA Subtitle Parser", "Codec/Parser/Subtitle", "Parses SSA subtitle streams", diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index e3069399da..d59df57a92 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -127,10 +127,8 @@ gst_sub_parse_class_init (GstSubParseClass * klass) object_class->set_property = gst_sub_parse_set_property; object_class->get_property = gst_sub_parse_get_property; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_static_metadata (element_class, "Subtitle parser", "Codec/Parser/Subtitle", "Parses subtitle (.sub) files into text streams", diff --git a/gst/tcp/gstmultihandlesink.c b/gst/tcp/gstmultihandlesink.c index 8a99e001ea..d17cd43332 100644 --- a/gst/tcp/gstmultihandlesink.c +++ b/gst/tcp/gstmultihandlesink.c @@ -456,8 +456,7 @@ gst_multi_handle_sink_class_init (GstMultiHandleSinkClass * klass) G_STRUCT_OFFSET (GstMultiHandleSinkClass, clear), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gst_element_class_set_static_metadata (gstelement_class, "Multi socket sink", "Sink/Network", diff --git a/gst/tcp/gstsocketsrc.c b/gst/tcp/gstsocketsrc.c index bb854028d1..e22c0712f8 100644 --- a/gst/tcp/gstsocketsrc.c +++ b/gst/tcp/gstsocketsrc.c @@ -153,8 +153,7 @@ gst_socket_src_class_init (GstSocketSrcClass * klass) G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstSocketSrcClass, connection_closed_by_peer), NULL, NULL, NULL, G_TYPE_NONE, 0); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); gst_element_class_set_static_metadata (gstelement_class, "socket source", "Source/Network", diff --git a/gst/tcp/gsttcpclientsink.c b/gst/tcp/gsttcpclientsink.c index d23ded4fe3..5e96e76743 100644 --- a/gst/tcp/gsttcpclientsink.c +++ b/gst/tcp/gsttcpclientsink.c @@ -114,8 +114,7 @@ gst_tcp_client_sink_class_init (GstTCPClientSinkClass * klass) 0, TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); gst_element_class_set_static_metadata (gstelement_class, "TCP client sink", "Sink/Network", diff --git a/gst/tcp/gsttcpclientsrc.c b/gst/tcp/gsttcpclientsrc.c index 776ff42a69..7ebe75a255 100644 --- a/gst/tcp/gsttcpclientsrc.c +++ b/gst/tcp/gsttcpclientsrc.c @@ -109,8 +109,7 @@ gst_tcp_client_src_class_init (GstTCPClientSrcClass * klass) TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, 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_static_pad_template (gstelement_class, &srctemplate); gst_element_class_set_static_metadata (gstelement_class, "TCP client source", "Source/Network", diff --git a/gst/tcp/gsttcpserversrc.c b/gst/tcp/gsttcpserversrc.c index 72efb86ff9..6ac29a7816 100644 --- a/gst/tcp/gsttcpserversrc.c +++ b/gst/tcp/gsttcpserversrc.c @@ -122,8 +122,7 @@ gst_tcp_server_src_class_init (GstTCPServerSrcClass * klass) "The port number the socket is currently bound to", 0, TCP_HIGHEST_PORT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&srctemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); gst_element_class_set_static_metadata (gstelement_class, "TCP server source", "Source/Network", diff --git a/gst/videoconvert/gstvideoconvert.c b/gst/videoconvert/gstvideoconvert.c index 66e388cd34..b69cd072d7 100644 --- a/gst/videoconvert/gstvideoconvert.c +++ b/gst/videoconvert/gstvideoconvert.c @@ -511,10 +511,10 @@ gst_video_convert_class_init (GstVideoConvertClass * klass) gobject_class->get_property = gst_video_convert_get_property; gobject_class->finalize = gst_video_convert_finalize; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_video_convert_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_video_convert_sink_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_video_convert_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_video_convert_sink_template); gst_element_class_set_static_metadata (gstelement_class, "Colorspace converter", "Filter/Converter/Video", diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 4a815d5448..c004dba199 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -255,10 +255,10 @@ gst_video_rate_class_init (GstVideoRateClass * klass) "Drops/duplicates/adjusts timestamps on video frames to make a perfect stream", "Wim Taymans "); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_rate_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_video_rate_src_template)); + gst_element_class_add_static_pad_template (element_class, + &gst_video_rate_sink_template); + gst_element_class_add_static_pad_template (element_class, + &gst_video_rate_src_template); } static void diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index a1620f9100..3d5c1e4ea3 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -279,8 +279,8 @@ gst_video_test_src_class_init (GstVideoTestSrcClass * klass) "Video test source", "Source/Video", "Creates a test video stream", "David A. Schleef "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_video_test_src_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_video_test_src_template); gstbasesrc_class->set_caps = gst_video_test_src_setcaps; gstbasesrc_class->fixate = gst_video_test_src_src_fixate; diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index d2c8c81d96..88c1de1577 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -1976,8 +1976,8 @@ gst_x_image_sink_class_init (GstXImageSinkClass * klass) "Video sink", "Sink/Video", "A standard X based videosink", "Julien Moutte "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_x_image_sink_sink_template_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_x_image_sink_sink_template_factory); gstelement_class->change_state = gst_x_image_sink_change_state; diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index c612076751..e008d09a0a 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -2013,8 +2013,8 @@ gst_xv_image_sink_class_init (GstXvImageSinkClass * klass) "Video sink", "Sink/Video", "A Xv based videosink", "Julien Moutte "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_xv_image_sink_sink_template_factory)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_xv_image_sink_sink_template_factory); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_xv_image_sink_change_state); diff --git a/tests/check/elements/audiorate.c b/tests/check/elements/audiorate.c index f7bfc58345..b5a3e50eb2 100644 --- a/tests/check/elements/audiorate.c +++ b/tests/check/elements/audiorate.c @@ -58,10 +58,8 @@ test_injector_class_init (TestInjectorClass * 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); } static GstFlowReturn diff --git a/tests/check/elements/decodebin.c b/tests/check/elements/decodebin.c index fba0b1cd7a..457cb36629 100644 --- a/tests/check/elements/decodebin.c +++ b/tests/check/elements/decodebin.c @@ -230,10 +230,8 @@ test_mpeg_audio_parse_class_init (TestMpegAudioParseClass * klass) GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstBaseParseClass *parse_class = GST_BASE_PARSE_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_metadata (element_class, "MPEG1 Audio Parser", "Codec/Parser/Audio", "Pretends to parse mpeg1 audio stream", @@ -383,10 +381,8 @@ gst_fake_h264_parser_class_init (GstFakeH264ParserClass * klass) "stream-format=(string) { avc, byte-stream }")); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_metadata (element_class, "FakeH264Parser", "Codec/Parser/Converter/Video", "yep", "me"); } @@ -486,10 +482,8 @@ gst_fake_h264_decoder_class_init (GstFakeH264DecoderClass * klass) GST_STATIC_CAPS ("video/x-raw")); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_metadata (element_class, "FakeH264Decoder", "Codec/Decoder/Video", "yep", "me"); } diff --git a/tests/check/elements/playbin-complex.c b/tests/check/elements/playbin-complex.c index 377bd8312d..ebe5bbdaf2 100644 --- a/tests/check/elements/playbin-complex.c +++ b/tests/check/elements/playbin-complex.c @@ -170,8 +170,7 @@ gst_caps_src_class_init (GstCapsSrcClass * klass) GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); - 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); gst_element_class_set_metadata (element_class, "CapsSource", "Source/Generic", "yep", "me"); @@ -321,8 +320,7 @@ gst_audio_codec_sink_class_init (GstAudioCodecSinkClass * klass) g_param_spec_boolean ("mute", "Mute", "Mute", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); gst_element_class_set_metadata (element_class, "AudioCodecSink", "Sink/Audio", "yep", "me"); @@ -372,8 +370,7 @@ gst_video_codec_sink_class_init (GstVideoCodecSinkClass * klass) ); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); gst_element_class_set_metadata (element_class, "VideoCodecSink", "Sink/Video", "yep", "me"); @@ -441,10 +438,8 @@ gst_codec_demuxer_class_init (GstCodecDemuxerClass * klass) gobject_class->finalize = gst_codec_demuxer_finalize; - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&cd_sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&cd_src_templ)); + gst_element_class_add_static_pad_template (element_class, &cd_sink_templ); + gst_element_class_add_static_pad_template (element_class, &cd_src_templ); gst_element_class_set_metadata (element_class, "CodecDemuxer", "Codec/Demuxer", "yep", "me"); } @@ -647,8 +642,7 @@ gst_video_sink1_class_init (GstVideoSink1Class * klass) GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL)) ); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); gst_element_class_set_static_metadata (element_class, "Fake Video Sink1", "Sink/Video", @@ -669,8 +663,7 @@ gst_video_sink2_class_init (GstVideoSink2Class * klass) GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL))); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); gst_element_class_set_static_metadata (element_class, "Fake Video Sink2", "Sink/Video", @@ -710,10 +703,8 @@ gst_video_decoder1_class_init (GstVideoDecoder1Class * klass) GST_VIDEO_FORMATS_ALL) ";" GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL))); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_static_metadata (element_class, "Fake theora video decoder1", "Codec/Decoder/Video", "decode theora stream", @@ -741,10 +732,8 @@ gst_video_decoder2_class_init (GstVideoDecoder2Class * klass) GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL))); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_static_metadata (element_class, "Fake theora video decoder2", "Codec/Decoder/Video", "decode theora stream", diff --git a/tests/check/elements/playbin.c b/tests/check/elements/playbin.c index cdc737ee51..e65d07a49d 100644 --- a/tests/check/elements/playbin.c +++ b/tests/check/elements/playbin.c @@ -649,8 +649,7 @@ gst_red_video_src_class_init (GstRedVideoSrcClass * klass) ); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_metadata (element_class, "Red Video Src", "Source/Video", "yep", "me"); @@ -751,8 +750,7 @@ gst_codec_src_class_init (GstCodecSrcClass * klass) ); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - 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); gst_element_class_set_metadata (element_class, "Codec Src", "Source/Video", "yep", "me"); diff --git a/tests/check/elements/videoscale.c b/tests/check/elements/videoscale.c index 369df32395..9762048e60 100644 --- a/tests/check/elements/videoscale.c +++ b/tests/check/elements/videoscale.c @@ -809,8 +809,7 @@ gst_test_reverse_negotiation_sink_class_init (GstTestReverseNegotiationSinkClass "Test Reverse Negotiation Sink", "Sink", "Some test sink", "Sebastian Dröge "); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&sinktemplate)); + gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); #if 0 gstbase_sink_class->buffer_alloc = diff --git a/tests/check/libs/audiodecoder.c b/tests/check/libs/audiodecoder.c index 5b92caf41f..e33c3f8539 100644 --- a/tests/check/libs/audiodecoder.c +++ b/tests/check/libs/audiodecoder.c @@ -178,10 +178,8 @@ gst_audio_decoder_tester_class_init (GstAudioDecoderTesterClass * klass) GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw")); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_metadata (element_class, "AudioDecoderTester", "Decoder/Audio", "yep", "me"); diff --git a/tests/check/libs/audioencoder.c b/tests/check/libs/audioencoder.c index 614440d914..bcaf8d98b8 100644 --- a/tests/check/libs/audioencoder.c +++ b/tests/check/libs/audioencoder.c @@ -116,10 +116,8 @@ gst_audio_encoder_tester_class_init (GstAudioEncoderTesterClass * klass) GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-test-custom")); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_metadata (element_class, "AudioEncoderTester", "Encoder/Audio", "yep", "me"); diff --git a/tests/check/libs/baseaudiovisualizer.c b/tests/check/libs/baseaudiovisualizer.c index 70d7264a71..3e26de5ab8 100644 --- a/tests/check/libs/baseaudiovisualizer.c +++ b/tests/check/libs/baseaudiovisualizer.c @@ -74,10 +74,10 @@ gst_test_scope_class_init (GstTestScopeClass * g_class) "Visualization", "Dummy test scope", "Stefan Kost "); - 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/tests/check/libs/rtpbasedepayload.c b/tests/check/libs/rtpbasedepayload.c index 003f2f0080..a2c1c9b54e 100644 --- a/tests/check/libs/rtpbasedepayload.c +++ b/tests/check/libs/rtpbasedepayload.c @@ -83,10 +83,10 @@ gst_rtp_dummy_depay_class_init (GstRtpDummyDepayClass * klass) gstelement_class = GST_ELEMENT_CLASS (klass); gstrtpbasedepayload_class = GST_RTP_BASE_DEPAYLOAD_CLASS (klass); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_rtp_dummy_depay_sink_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_rtp_dummy_depay_src_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_rtp_dummy_depay_sink_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_rtp_dummy_depay_src_template); gstrtpbasedepayload_class->process = gst_rtp_dummy_depay_process; gstrtpbasedepayload_class->set_caps = gst_rtp_dummy_depay_set_caps; diff --git a/tests/check/libs/rtpbasepayload.c b/tests/check/libs/rtpbasepayload.c index 09f5ca0893..3cc6e41495 100644 --- a/tests/check/libs/rtpbasepayload.c +++ b/tests/check/libs/rtpbasepayload.c @@ -80,10 +80,10 @@ gst_rtp_dummy_pay_class_init (GstRtpDummyPayClass * klass) gstelement_class = GST_ELEMENT_CLASS (klass); gstrtpbasepayload_class = GST_RTP_BASE_PAYLOAD_CLASS (klass); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_rtp_dummy_pay_sink_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_rtp_dummy_pay_src_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_rtp_dummy_pay_sink_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_rtp_dummy_pay_src_template); gstrtpbasepayload_class->handle_buffer = gst_rtp_dummy_pay_handle_buffer; } diff --git a/tests/check/libs/videodecoder.c b/tests/check/libs/videodecoder.c index 1fc9f36bf7..b780079046 100644 --- a/tests/check/libs/videodecoder.c +++ b/tests/check/libs/videodecoder.c @@ -185,10 +185,8 @@ gst_video_decoder_tester_class_init (GstVideoDecoderTesterClass * klass) GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-raw")); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_metadata (element_class, "VideoDecoderTester", "Decoder/Video", "yep", "me"); diff --git a/tests/check/libs/videoencoder.c b/tests/check/libs/videoencoder.c index 1844ab69be..e1c180d6a6 100644 --- a/tests/check/libs/videoencoder.c +++ b/tests/check/libs/videoencoder.c @@ -128,10 +128,8 @@ gst_video_encoder_tester_class_init (GstVideoEncoderTesterClass * klass) GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-test-custom")); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); + gst_element_class_add_static_pad_template (element_class, &sink_templ); + gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_set_metadata (element_class, "VideoEncoderTester", "Encoder/Video", "yep", "me");