Commit 7521b597 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h
Browse files

various: fix pad template ref leaks

https://bugzilla.gnome.org/show_bug.cgi?id=662664
parent 26d6add9
......@@ -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 */
......
......@@ -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, "
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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>");
......
......@@ -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>");
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment