Commit c0e101e9 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h
Browse files

various: fix pad template leaks

https://bugzilla.gnome.org/show_bug.cgi?id=662664
parent a2337b8a
......@@ -190,8 +190,8 @@ gst_aasink_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, "ASCII art video sink",
"Sink/Video",
"An ASCII art videosink", "Wim Taymans <wim.taymans@chello.be>");
......
......@@ -121,10 +121,10 @@ gst_cmml_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_cmml_dec_sink_factory));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_cmml_dec_src_factory));
gst_element_class_add_static_pad_template (element_class,
&gst_cmml_dec_sink_factory);
gst_element_class_add_static_pad_template (element_class,
&gst_cmml_dec_src_factory);
gst_element_class_set_details_simple (element_class, "CMML stream decoder",
"Codec/Decoder",
"Decodes CMML streams", "Alessandro Decina <alessandro@nnva.org>");
......
......@@ -108,10 +108,10 @@ gst_cmml_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_cmml_enc_sink_factory));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_cmml_enc_src_factory));
gst_element_class_add_static_pad_template (element_class,
&gst_cmml_enc_sink_factory);
gst_element_class_add_static_pad_template (element_class,
&gst_cmml_enc_src_factory);
gst_element_class_set_details_simple (element_class, "CMML streams encoder",
"Codec/Encoder",
"Encodes CMML streams", "Alessandro Decina <alessandro@nnva.org>");
......
......@@ -194,10 +194,10 @@ gst_cairo_overlay_base_init (gpointer g_class)
"Render overlay on a video stream using Cairo",
"Jon Nordby <jononor@gmail.com>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_cairo_overlay_sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_cairo_overlay_src_template));
gst_element_class_add_static_pad_template (element_class,
&gst_cairo_overlay_sink_template);
gst_element_class_add_static_pad_template (element_class,
&gst_cairo_overlay_src_template);
}
static void
......
......@@ -354,8 +354,8 @@ gst_cairo_render_base_init (gpointer g_class)
gst_element_class_set_details_simple (ec, "Cairo encoder",
"Codec/Encoder", "Encodes streams using Cairo",
"Lutz Mueller <lutz@topfrose.de>");
gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&t_snk));
gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&t_src));
gst_element_class_add_static_pad_template (ec, &t_snk);
gst_element_class_add_static_pad_template (ec, &t_src);
}
static void
......
......@@ -132,12 +132,12 @@ gst_text_overlay_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 (&cairo_text_overlay_src_template_factory));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&video_sink_template_factory));
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,
&cairo_text_overlay_src_template_factory);
gst_element_class_add_static_pad_template (element_class,
&video_sink_template_factory);
gst_element_class_add_static_pad_template (element_class,
&text_sink_template_factory);
gst_element_class_set_details_simple (element_class, "Text overlay",
"Filter/Editor/Video",
......
......@@ -265,10 +265,10 @@ gst_cairo_time_overlay_base_init (gpointer g_class)
"Filter/Editor/Video",
"Overlays the time on a video stream", "David Schleef <ds@schleef.org>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_cairo_time_overlay_sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_cairo_time_overlay_src_template));
gst_element_class_add_static_pad_template (element_class,
&gst_cairo_time_overlay_sink_template);
gst_element_class_add_static_pad_template (element_class,
&gst_cairo_time_overlay_src_template);
}
static void
......
......@@ -166,10 +166,8 @@ gst_dvdec_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, "DV video decoder",
"Codec/Decoder/Video",
......
......@@ -174,12 +174,11 @@ gst_dvdemux_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 (&video_src_temp));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&audio_src_temp));
gst_element_class_add_static_pad_template (element_class, &sink_temp);
gst_element_class_add_static_pad_template (element_class,
&video_src_temp);
gst_element_class_add_static_pad_template (element_class,
&audio_src_temp);
gst_element_class_set_details_simple (element_class,
"DV system stream demuxer", "Codec/Demuxer",
......
......@@ -168,8 +168,7 @@ gst_esdmon_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, "Esound audio monitor",
"Source/Audio",
"Monitors audio from an esound server",
......
......@@ -111,8 +111,7 @@ gst_esdsink_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, "Esound audio sink",
"Sink/Audio",
"Plays audio to an esound server",
......
......@@ -178,10 +178,10 @@ gst_flac_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 (&flac_dec_src_factory));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&flac_dec_sink_factory));
gst_element_class_add_static_pad_template (element_class,
&flac_dec_src_factory);
gst_element_class_add_static_pad_template (element_class,
&flac_dec_sink_factory);
gst_element_class_set_details_simple (element_class, "FLAC audio decoder",
"Codec/Decoder/Audio",
"Decodes FLAC lossless audio streams", "Wim Taymans <wim@fluendo.com>");
......
......@@ -258,10 +258,8 @@ gst_flac_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, "FLAC audio encoder",
"Codec/Encoder/Audio",
......
......@@ -117,10 +117,10 @@ gst_flac_tag_base_init (gpointer g_class)
"Formatter/Metadata",
"Rewrite tags in a FLAC file", "Christophe Fergeau <teuf@gnome.org>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&flac_tag_sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&flac_tag_src_template));
gst_element_class_add_static_pad_template (element_class,
&flac_tag_sink_template);
gst_element_class_add_static_pad_template (element_class,
&flac_tag_src_template);
GST_DEBUG_CATEGORY_INIT (flactag_debug, "flactag", 0, "flac tag rewriter");
}
......
......@@ -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);
}
}
......
......@@ -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);
}
}
......
......@@ -157,10 +157,10 @@ gst_gdk_pixbuf_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_gdk_pixbuf_src_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_gdk_pixbuf_sink_template));
gst_element_class_add_static_pad_template (element_class,
&gst_gdk_pixbuf_src_template);
gst_element_class_add_static_pad_template (element_class,
&gst_gdk_pixbuf_sink_template);
gst_element_class_set_details_simple (element_class,
"GdkPixbuf image decoder", "Codec/Decoder/Image",
"Decodes images in a video stream using GdkPixbuf",
......
......@@ -146,8 +146,8 @@ gst_gdk_pixbuf_sink_base_init (gpointer g_class)
"Sink/Video", "Output images as GdkPixbuf objects in bus messages",
"Tim-Philipp Müller <tim centricular net>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&pixbufsink_sink_factory));
gst_element_class_add_static_pad_template (element_class,
&pixbufsink_sink_factory);
}
static void
......
......@@ -122,10 +122,10 @@ gst_pixbufscale_base_init (gpointer g_class)
"Wim Taymans <wim.taymans@chello.be>, "
"Renato Filho <renato.filho@indt.org.br>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_pixbufscale_src_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_pixbufscale_sink_template));
gst_element_class_add_static_pad_template (element_class,
&gst_pixbufscale_src_template);
gst_element_class_add_static_pad_template (element_class,
&gst_pixbufscale_sink_template);
}
static void
......
......@@ -74,8 +74,7 @@ gst_hal_audio_sink_base_init (gpointer klass)
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
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, "HAL audio sink",
"Sink/Audio",
"Audio sink for sound device access via HAL",
......
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