various: fix pad template leaks

https://bugzilla.gnome.org/show_bug.cgi?id=662664
This commit is contained in:
Vincent Penquerc'h 2011-11-28 12:51:22 +00:00
parent 149a4ce390
commit 96374054ac
64 changed files with 212 additions and 242 deletions

View file

@ -172,8 +172,8 @@ gst_alsasink_base_init (gpointer g_class)
"Audio sink (ALSA)", "Sink/Audio", "Audio sink (ALSA)", "Sink/Audio",
"Output to a sound card via ALSA", "Wim Taymans <wim@fluendo.com>"); "Output to a sound card via ALSA", "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&alsasink_sink_factory)); &alsasink_sink_factory);
} }
static void static void

View file

@ -197,8 +197,8 @@ gst_alsasrc_base_init (gpointer g_class)
"Audio source (ALSA)", "Source/Audio", "Audio source (ALSA)", "Source/Audio",
"Read from a sound card via ALSA", "Wim Taymans <wim@fluendo.com>"); "Read from a sound card via ALSA", "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&alsasrc_src_factory)); &alsasrc_src_factory);
} }
static void static void

View file

@ -55,8 +55,7 @@ gst_gio_base_sink_base_init (gpointer gclass)
GST_DEBUG_CATEGORY_INIT (gst_gio_base_sink_debug, "gio_base_sink", 0, GST_DEBUG_CATEGORY_INIT (gst_gio_base_sink_debug, "gio_base_sink", 0,
"GIO base sink"); "GIO base sink");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_static_pad_template_get (&sink_factory));
} }
static void static void

View file

@ -61,8 +61,7 @@ gst_gio_base_src_base_init (gpointer gclass)
GST_DEBUG_CATEGORY_INIT (gst_gio_base_src_debug, "gio_base_src", 0, GST_DEBUG_CATEGORY_INIT (gst_gio_base_src_debug, "gio_base_src", 0,
"GIO base source"); "GIO base source");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_factory);
gst_static_pad_template_get (&src_factory));
} }
static void static void

View file

@ -131,8 +131,7 @@ gst_gnome_vfs_sink_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sinktemplate);
gst_static_pad_template_get (&sinktemplate));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"GnomeVFS Sink", "Sink/File", "GnomeVFS Sink", "Sink/File",

View file

@ -179,8 +179,7 @@ gst_gnome_vfs_src_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &srctemplate);
gst_static_pad_template_get (&srctemplate));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"GnomeVFS Source", "Source/File", "GnomeVFS Source", "Source/File",
"Read from any GnomeVFS-supported file", "Read from any GnomeVFS-supported file",

View file

@ -194,10 +194,8 @@ gst_visual_class_init (gpointer g_class, gpointer class_data)
klass->plugin->info->name, klass->plugin->info->version); klass->plugin->info->name, klass->plugin->info->version);
/* FIXME: improve to only register what plugin supports? */ /* FIXME: improve to only register what plugin supports? */
gst_element_class_add_pad_template (element, gst_element_class_add_static_pad_template (element, &src_template);
gst_static_pad_template_get (&src_template)); gst_element_class_add_static_pad_template (element, &sink_template);
gst_element_class_add_pad_template (element,
gst_static_pad_template_get (&sink_template));
gst_element_class_set_details_simple (element, gst_element_class_set_details_simple (element,
longname, "Visualization", longname, "Visualization",
klass->plugin->info->about, "Benjamin Otte <otte@gnome.org>"); klass->plugin->info->about, "Benjamin Otte <otte@gnome.org>");

View file

@ -138,10 +138,10 @@ gst_ogg_avi_parse_base_init (gpointer g_class)
"parse an ogg avi stream into pages (info about ogg: http://xiph.org)", "parse an ogg avi stream into pages (info about ogg: http://xiph.org)",
"Wim Taymans <wim@fluendo.com>"); "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&ogg_avi_parse_sink_template_factory)); &ogg_avi_parse_sink_template_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&ogg_avi_parse_src_template_factory)); &ogg_avi_parse_src_template_factory);
} }
static void static void

View file

@ -1952,10 +1952,10 @@ gst_ogg_demux_base_init (gpointer g_class)
"demux ogg streams (info about ogg: http://xiph.org)", "demux ogg streams (info about ogg: http://xiph.org)",
"Wim Taymans <wim@fluendo.com>"); "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&ogg_demux_sink_template_factory)); &ogg_demux_sink_template_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&ogg_demux_src_template_factory)); &ogg_demux_src_template_factory);
} }
static void static void

View file

@ -170,10 +170,8 @@ gst_ogg_mux_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_factory);
gst_static_pad_template_get (&src_factory)); gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_factory));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Ogg muxer", "Codec/Muxer", "Ogg muxer", "Codec/Muxer",

View file

@ -224,10 +224,10 @@ gst_ogg_parse_base_init (gpointer g_class)
"parse ogg streams into pages (info about ogg: http://xiph.org)", "parse ogg streams into pages (info about ogg: http://xiph.org)",
"Michael Smith <msmith@fluendo.com>"); "Michael Smith <msmith@fluendo.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&ogg_parse_sink_template_factory)); &ogg_parse_sink_template_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&ogg_parse_src_template_factory)); &ogg_parse_src_template_factory);
} }
static void static void

View file

@ -279,8 +279,8 @@ gst_ogm_audio_parse_base_init (GstOgmParseClass * klass)
"parse an OGM audio header and stream", "parse an OGM audio header and stream",
"GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>"); "GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&sink_factory_audio)); &sink_factory_audio);
audio_src_templ = gst_pad_template_new ("src", audio_src_templ = gst_pad_template_new ("src",
GST_PAD_SRC, GST_PAD_SOMETIMES, caps); GST_PAD_SRC, GST_PAD_SOMETIMES, caps);
gst_element_class_add_pad_template (element_class, audio_src_templ); gst_element_class_add_pad_template (element_class, audio_src_templ);
@ -297,8 +297,8 @@ gst_ogm_video_parse_base_init (GstOgmParseClass * klass)
"parse an OGM video header and stream", "parse an OGM video header and stream",
"GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>"); "GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&sink_factory_video)); &sink_factory_video);
video_src_templ = gst_pad_template_new ("src", video_src_templ = gst_pad_template_new ("src",
GST_PAD_SRC, GST_PAD_SOMETIMES, caps); GST_PAD_SRC, GST_PAD_SOMETIMES, caps);
gst_element_class_add_pad_template (element_class, video_src_templ); gst_element_class_add_pad_template (element_class, video_src_templ);

View file

@ -368,16 +368,16 @@ gst_text_overlay_base_init (gpointer g_class)
GstTextOverlayClass *klass = GST_TEXT_OVERLAY_CLASS (g_class); GstTextOverlayClass *klass = GST_TEXT_OVERLAY_CLASS (g_class);
PangoFontMap *fontmap; PangoFontMap *fontmap;
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&src_template_factory)); &src_template_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&video_sink_template_factory)); &video_sink_template_factory);
/* ugh */ /* ugh */
if (!GST_IS_TIME_OVERLAY_CLASS (g_class) && if (!GST_IS_TIME_OVERLAY_CLASS (g_class) &&
!GST_IS_CLOCK_OVERLAY_CLASS (g_class)) { !GST_IS_CLOCK_OVERLAY_CLASS (g_class)) {
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&text_sink_template_factory)); &text_sink_template_factory);
} }
gst_element_class_set_details_simple (element_class, "Text overlay", gst_element_class_set_details_simple (element_class, "Text overlay",

View file

@ -175,10 +175,10 @@ gst_text_render_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&src_template_factory)); &src_template_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&sink_template_factory)); &sink_template_factory);
gst_element_class_set_details_simple (element_class, "Text renderer", gst_element_class_set_details_simple (element_class, "Text renderer",
"Filter/Editor/Video", "Filter/Editor/Video",

View file

@ -113,10 +113,10 @@ gst_theora_dec_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&theora_dec_src_factory)); &theora_dec_src_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&theora_dec_sink_factory)); &theora_dec_sink_factory);
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Theora video decoder", "Codec/Decoder/Video", "Theora video decoder", "Codec/Decoder/Video",
"decode raw theora streams to raw YUV video", "decode raw theora streams to raw YUV video",

View file

@ -284,10 +284,10 @@ gst_theora_enc_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&theora_enc_src_factory)); &theora_enc_src_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&theora_enc_sink_factory)); &theora_enc_sink_factory);
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Theora video encoder", "Codec/Encoder/Video", "Theora video encoder", "Codec/Encoder/Video",
"encode raw YUV video to a theora stream", "encode raw YUV video to a theora stream",

View file

@ -105,10 +105,10 @@ gst_theora_parse_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&theora_parse_src_factory)); &theora_parse_src_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&theora_parse_sink_factory)); &theora_parse_sink_factory);
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Theora video parser", "Codec/Parser/Video", "Theora video parser", "Codec/Parser/Video",
"parse raw theora streams", "Andy Wingo <wingo@pobox.com>"); "parse raw theora streams", "Andy Wingo <wingo@pobox.com>");

View file

@ -79,13 +79,11 @@ static void
gst_vorbis_dec_base_init (gpointer g_class) gst_vorbis_dec_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstPadTemplate *src_template, *sink_template;
src_template = gst_static_pad_template_get (&vorbis_dec_src_factory); gst_element_class_add_static_pad_template (element_class,
gst_element_class_add_pad_template (element_class, src_template); &vorbis_dec_src_factory);
gst_element_class_add_static_pad_template (element_class,
sink_template = gst_static_pad_template_get (&vorbis_dec_sink_factory); &vorbis_dec_sink_factory);
gst_element_class_add_pad_template (element_class, sink_template);
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Vorbis audio decoder", "Codec/Decoder/Audio", "Vorbis audio decoder", "Codec/Decoder/Audio",

View file

@ -135,10 +135,10 @@ gst_vorbis_enc_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&vorbis_enc_src_factory)); &vorbis_enc_src_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&vorbis_enc_sink_factory)); &vorbis_enc_sink_factory);
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Vorbis audio encoder", "Codec/Encoder/Audio", "Vorbis audio encoder", "Codec/Encoder/Audio",

View file

@ -91,10 +91,10 @@ gst_vorbis_parse_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&vorbis_parse_src_factory)); &vorbis_parse_src_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&vorbis_parse_sink_factory)); &vorbis_parse_sink_factory);
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"VorbisParse", "Codec/Parser/Audio", "VorbisParse", "Codec/Parser/Audio",
"parse raw vorbis streams", "parse raw vorbis streams",

View file

@ -229,8 +229,8 @@ gst_app_sink_base_init (gpointer g_class)
"Generic/Sink", "Allow the application to get access to raw buffer", "Generic/Sink", "Allow the application to get access to raw buffer",
"David Schleef <ds@schleef.org>, Wim Taymans <wim.taymans@gmail.com>"); "David Schleef <ds@schleef.org>, Wim Taymans <wim.taymans@gmail.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_app_sink_template)); &gst_app_sink_template);
} }
static void static void

View file

@ -260,8 +260,8 @@ gst_app_src_base_init (gpointer g_class)
"Generic/Source", "Allow the application to feed buffers to a pipeline", "Generic/Source", "Allow the application to feed buffers to a pipeline",
"David Schleef <ds@schleef.org>, Wim Taymans <wim.taymans@gmail.com>"); "David Schleef <ds@schleef.org>, Wim Taymans <wim.taymans@gmail.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_app_src_template)); &gst_app_src_template);
} }
static void static void

View file

@ -181,8 +181,8 @@ gst_cdda_base_src_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_cdda_base_src_src_template)); &gst_cdda_base_src_src_template);
/* our very own formats */ /* our very own formats */
track_format = gst_format_register ("track", "CD track"); track_format = gst_format_register ("track", "CD track");

View file

@ -214,8 +214,7 @@ gst_tag_demux_base_init (gpointer klass)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_factory);
gst_static_pad_template_get (&src_factory));
GST_DEBUG_CATEGORY_INIT (tagdemux_debug, "tagdemux", 0, GST_DEBUG_CATEGORY_INIT (tagdemux_debug, "tagdemux", 0,
"tag demux base class"); "tag demux base class");

View file

@ -796,10 +796,10 @@ gst_adder_base_init (gpointer g_class)
{ {
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_adder_src_template)); &gst_adder_src_template);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_adder_sink_template)); &gst_adder_sink_template);
gst_element_class_set_details_simple (gstelement_class, "Adder", gst_element_class_set_details_simple (gstelement_class, "Adder",
"Generic/Audio", "Generic/Audio",
"Add N audio channels together", "Add N audio channels together",

View file

@ -221,10 +221,10 @@ gst_audio_convert_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_audio_convert_src_template)); &gst_audio_convert_src_template);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_audio_convert_sink_template)); &gst_audio_convert_sink_template);
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Audio converter", "Filter/Converter/Audio", "Audio converter", "Filter/Converter/Audio",
"Convert audio to different formats", "Benjamin Otte <otte@gnome.org>"); "Convert audio to different formats", "Benjamin Otte <otte@gnome.org>");

View file

@ -165,10 +165,10 @@ gst_audio_rate_base_init (gpointer g_class)
"Drops/duplicates/adjusts timestamps on audio samples to make a perfect stream", "Drops/duplicates/adjusts timestamps on audio samples to make a perfect stream",
"Wim Taymans <wim@fluendo.com>"); "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_audio_rate_sink_template)); &gst_audio_rate_sink_template);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_audio_rate_src_template)); &gst_audio_rate_src_template);
} }
static void static void

View file

@ -154,10 +154,10 @@ gst_audio_resample_base_init (gpointer g_class)
{ {
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_audio_resample_src_template)); &gst_audio_resample_src_template);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_audio_resample_sink_template)); &gst_audio_resample_sink_template);
gst_element_class_set_details_simple (gstelement_class, "Audio resampler", gst_element_class_set_details_simple (gstelement_class, "Audio resampler",
"Filter/Converter/Audio", "Resamples audio", "Filter/Converter/Audio", "Resamples audio",

View file

@ -168,8 +168,8 @@ gst_audio_test_src_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_audio_test_src_src_template)); &gst_audio_test_src_src_template);
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Audio test source", "Source/Audio", "Audio test source", "Source/Audio",
"Creates audio test signals of given frequency and volume", "Creates audio test signals of given frequency and volume",

View file

@ -408,16 +408,16 @@ gst_encode_bin_class_init (GstEncodeBinClass * klass)
klass->request_pad = gst_encode_bin_request_pad_signal; klass->request_pad = gst_encode_bin_request_pad_signal;
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&muxer_src_template)); &muxer_src_template);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&video_sink_template)); &video_sink_template);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&audio_sink_template)); &audio_sink_template);
/* gst_element_class_add_pad_template (gstelement_klass, */ /* gst_element_class_add_static_pad_template (gstelement_klass, */
/* gst_static_pad_template_get (&text_sink_template)); */ /* &text_sink_template); */
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&private_sink_template)); &private_sink_template);
gstelement_klass->change_state = gstelement_klass->change_state =
GST_DEBUG_FUNCPTR (gst_encode_bin_change_state); GST_DEBUG_FUNCPTR (gst_encode_bin_change_state);

View file

@ -96,10 +96,9 @@ gst_smart_encoder_class_init (GstSmartEncoderClass * klass)
gst_smart_encoder_parent_class = g_type_class_peek_parent (klass); gst_smart_encoder_parent_class = g_type_class_peek_parent (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_template);
gst_static_pad_template_get (&src_template)); gst_element_class_add_static_pad_template (element_class,
gst_element_class_add_pad_template (element_class, &sink_template);
gst_static_pad_template_get (&sink_template));
gst_element_class_set_details_simple (element_class, "Smart Video Encoder", gst_element_class_set_details_simple (element_class, "Smart Video Encoder",
"Codec/Recoder/Video", "Codec/Recoder/Video",

View file

@ -62,10 +62,10 @@ gst_stream_combiner_class_init (GstStreamCombinerClass * klass)
GST_DEBUG_CATEGORY_INIT (gst_stream_combiner_debug, "streamcombiner", 0, GST_DEBUG_CATEGORY_INIT (gst_stream_combiner_debug, "streamcombiner", 0,
"Stream Combiner"); "Stream Combiner");
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&src_template)); &src_template);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&sink_template)); &sink_template);
gstelement_klass->request_new_pad = gstelement_klass->request_new_pad =
GST_DEBUG_FUNCPTR (gst_stream_combiner_request_new_pad); GST_DEBUG_FUNCPTR (gst_stream_combiner_request_new_pad);

View file

@ -62,10 +62,10 @@ gst_stream_splitter_class_init (GstStreamSplitterClass * klass)
GST_DEBUG_CATEGORY_INIT (gst_stream_splitter_debug, "streamsplitter", 0, GST_DEBUG_CATEGORY_INIT (gst_stream_splitter_debug, "streamsplitter", 0,
"Stream Splitter"); "Stream Splitter");
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&src_template)); &src_template);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&sink_template)); &sink_template);
gstelement_klass->request_new_pad = gstelement_klass->request_new_pad =
GST_DEBUG_FUNCPTR (gst_stream_splitter_request_new_pad); GST_DEBUG_FUNCPTR (gst_stream_splitter_request_new_pad);

View file

@ -341,10 +341,10 @@ gst_ffmpegcsp_base_init (gpointer klass)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_ffmpegcsp_src_template)); &gst_ffmpegcsp_src_template);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_ffmpegcsp_sink_template)); &gst_ffmpegcsp_sink_template);
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"FFMPEG Colorspace converter", "Filter/Converter/Video", "FFMPEG Colorspace converter", "Filter/Converter/Video",

View file

@ -89,10 +89,10 @@ gst_gdp_depay_base_init (gpointer g_class)
"Depayloads GStreamer Data Protocol buffers", "Depayloads GStreamer Data Protocol buffers",
"Thomas Vander Stichele <thomas at apestaart dot org>"); "Thomas Vander Stichele <thomas at apestaart dot org>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gdp_depay_sink_template)); &gdp_depay_sink_template);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gdp_depay_src_template)); &gdp_depay_src_template);
} }
static void static void

View file

@ -102,10 +102,10 @@ gst_gdp_pay_base_init (gpointer g_class)
"Payloads GStreamer Data Protocol buffers", "Payloads GStreamer Data Protocol buffers",
"Thomas Vander Stichele <thomas at apestaart dot org>"); "Thomas Vander Stichele <thomas at apestaart dot org>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gdp_pay_sink_template)); &gdp_pay_sink_template);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gdp_pay_src_template)); &gdp_pay_src_template);
} }
static void static void

View file

@ -287,10 +287,10 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass)
"The caps of the input data. (NULL = use typefind element)", "The caps of the input data. (NULL = use typefind element)",
GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&decoder_bin_sink_template)); &decoder_bin_sink_template);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&decoder_bin_src_template)); &decoder_bin_src_template);
gst_element_class_set_details_simple (gstelement_klass, gst_element_class_set_details_simple (gstelement_klass,
"Decoder Bin", "Generic/Bin/Decoder", "Decoder Bin", "Generic/Bin/Decoder",

View file

@ -930,10 +930,10 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass)
klass->autoplug_sort = GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_sort); klass->autoplug_sort = GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_sort);
klass->autoplug_select = GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_select); klass->autoplug_select = GST_DEBUG_FUNCPTR (gst_decode_bin_autoplug_select);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&decoder_bin_sink_template)); &decoder_bin_sink_template);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&decoder_bin_src_template)); &decoder_bin_src_template);
gst_element_class_set_details_simple (gstelement_klass, gst_element_class_set_details_simple (gstelement_klass,
"Decoder Bin", "Generic/Bin/Decoder", "Decoder Bin", "Generic/Bin/Decoder",

View file

@ -473,16 +473,16 @@ gst_play_sink_class_init (GstPlaySinkClass * klass)
G_STRUCT_OFFSET (GstPlaySinkClass, convert_frame), NULL, NULL, G_STRUCT_OFFSET (GstPlaySinkClass, convert_frame), NULL, NULL,
gst_play_marshal_BUFFER__BOXED, GST_TYPE_BUFFER, 1, GST_TYPE_CAPS); gst_play_marshal_BUFFER__BOXED, GST_TYPE_BUFFER, 1, GST_TYPE_CAPS);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&audiorawtemplate)); &audiorawtemplate);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&audiotemplate)); &audiotemplate);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&videorawtemplate)); &videorawtemplate);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&videotemplate)); &videotemplate);
gst_element_class_add_pad_template (gstelement_klass, gst_element_class_add_static_pad_template (gstelement_klass,
gst_static_pad_template_get (&texttemplate)); &texttemplate);
gst_element_class_set_details_simple (gstelement_klass, "Player Sink", gst_element_class_set_details_simple (gstelement_klass, "Player Sink",
"Generic/Bin/Sink", "Generic/Bin/Sink",
"Convenience sink for multiple streams", "Convenience sink for multiple streams",

View file

@ -466,10 +466,10 @@ gst_stream_selector_base_init (GstStreamSelectorClass * klass)
"Julien Moutte <julien@moutte.net>, " "Julien Moutte <julien@moutte.net>, "
"Jan Schmidt <thaytan@mad.scientist.com>, " "Jan Schmidt <thaytan@mad.scientist.com>, "
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_stream_selector_sink_factory)); &gst_stream_selector_sink_factory);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_stream_selector_src_factory)); &gst_stream_selector_src_factory);
} }
static void static void

View file

@ -955,10 +955,10 @@ gst_stream_synchronizer_base_init (gpointer g_class)
{ {
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate)); &srctemplate);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate)); &sinktemplate);
gst_element_class_set_details_simple (gstelement_class, gst_element_class_set_details_simple (gstelement_class,
"Stream Synchronizer", "Generic", "Stream Synchronizer", "Generic",

View file

@ -1617,13 +1617,13 @@ gst_subtitle_overlay_base_init (gpointer g_class)
{ {
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate)); &srctemplate);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&video_sinktemplate)); &video_sinktemplate);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&subtitle_sinktemplate)); &subtitle_sinktemplate);
gst_element_class_set_details_simple (gstelement_class, "Subtitle Overlay", gst_element_class_set_details_simple (gstelement_class, "Subtitle Overlay",
"Video/Overlay/Subtitle", "Video/Overlay/Subtitle",

View file

@ -213,8 +213,8 @@ gst_uri_decode_bin_base_init (gpointer g_class)
{ {
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate)); &srctemplate);
gst_element_class_set_details_simple (gstelement_class, gst_element_class_set_details_simple (gstelement_class,
"URI Decoder", "Generic/Bin/Decoder", "URI Decoder", "Generic/Bin/Decoder",
"Autoplug and decode an URI to raw media", "Autoplug and decode an URI to raw media",

View file

@ -58,10 +58,8 @@ gst_ssa_parse_base_init (gpointer klass)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sink_templ);
gst_static_pad_template_get (&sink_templ)); gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"SSA Subtitle Parser", "Codec/Parser/Subtitle", "SSA Subtitle Parser", "Codec/Parser/Subtitle",
"Parses SSA subtitle streams", "Parses SSA subtitle streams",

View file

@ -124,10 +124,8 @@ gst_sub_parse_base_init (GstSubParseClass * klass)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sink_templ);
gst_static_pad_template_get (&sink_templ)); gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Subtitle parser", "Codec/Parser/Subtitle", "Subtitle parser", "Codec/Parser/Subtitle",
"Parses subtitle (.sub) files into text streams", "Parses subtitle (.sub) files into text streams",

View file

@ -355,8 +355,7 @@ gst_multi_fd_sink_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sinktemplate);
gst_static_pad_template_get (&sinktemplate));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Multi filedescriptor sink", "Sink/Network", "Multi filedescriptor sink", "Sink/Network",

View file

@ -121,8 +121,7 @@ gst_tcp_client_sink_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sinktemplate);
gst_static_pad_template_get (&sinktemplate));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"TCP client sink", "Sink/Network", "TCP client sink", "Sink/Network",

View file

@ -93,8 +93,7 @@ gst_tcp_client_src_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &srctemplate);
gst_static_pad_template_get (&srctemplate));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"TCP client source", "Source/Network", "TCP client source", "Source/Network",

View file

@ -91,8 +91,7 @@ gst_tcp_server_src_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &srctemplate);
gst_static_pad_template_get (&srctemplate));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"TCP server source", "Source/Network", "TCP server source", "Source/Network",

View file

@ -170,10 +170,10 @@ gst_video_rate_base_init (gpointer g_class)
"Drops/duplicates/adjusts timestamps on video frames to make a perfect stream", "Drops/duplicates/adjusts timestamps on video frames to make a perfect stream",
"Wim Taymans <wim@fluendo.com>"); "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_video_rate_sink_template)); &gst_video_rate_sink_template);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_video_rate_src_template)); &gst_video_rate_src_template);
} }
static void static void

View file

@ -229,15 +229,18 @@ static void
gst_video_scale_base_init (gpointer g_class) gst_video_scale_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstPadTemplate *pad_template;
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Video scaler", "Filter/Converter/Video/Scaler", "Video scaler", "Filter/Converter/Video/Scaler",
"Resizes video", "Wim Taymans <wim.taymans@chello.be>"); "Resizes video", "Wim Taymans <wim.taymans@chello.be>");
gst_element_class_add_pad_template (element_class, pad_template = gst_video_scale_sink_template_factory ();
gst_video_scale_sink_template_factory ()); gst_element_class_add_pad_template (element_class, pad_template);
gst_element_class_add_pad_template (element_class, gst_object_unref (pad_template);
gst_video_scale_src_template_factory ()); pad_template = gst_video_scale_src_template_factory ();
gst_element_class_add_pad_template (element_class, pad_template);
gst_object_unref (pad_template);
} }
static void static void

View file

@ -168,14 +168,17 @@ static void
gst_video_test_src_base_init (gpointer g_class) gst_video_test_src_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstPadTemplate *pad_template;
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Video test source", "Source/Video", "Video test source", "Source/Video",
"Creates a test video stream", "David A. Schleef <ds@schleef.org>"); "Creates a test video stream", "David A. Schleef <ds@schleef.org>");
gst_element_class_add_pad_template (element_class, pad_template =
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
gst_video_test_src_getcaps (NULL))); gst_video_test_src_getcaps (NULL));
gst_element_class_add_pad_template (element_class, pad_template);
gst_object_unref (pad_template);
} }
static void static void

View file

@ -115,8 +115,8 @@ gst_v4lmjpegsink_base_init (gpointer g_class)
"Writes MJPEG-encoded frames to a zoran MJPEG/video4linux device", "Writes MJPEG-encoded frames to a zoran MJPEG/video4linux device",
"GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>"); "GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>");
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&sink_template)); &sink_template);
} }
static void static void

View file

@ -144,8 +144,8 @@ gst_v4lmjpegsrc_base_init (gpointer g_class)
"Reads MJPEG-encoded frames from a zoran MJPEG/video4linux device", "Reads MJPEG-encoded frames from a zoran MJPEG/video4linux device",
"GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>"); "GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>");
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&src_template)); &src_template);
} }
static void static void

View file

@ -77,8 +77,8 @@ gst_v4lsrc_base_init (gpointer g_class)
"Reads raw frames from a video4linux device", "Reads raw frames from a video4linux device",
"GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>"); "GStreamer maintainers <gstreamer-devel@lists.sourceforge.net>");
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&v4l_src_template)); &v4l_src_template);
} }
static void static void

View file

@ -2376,8 +2376,8 @@ gst_ximagesink_base_init (gpointer g_class)
"Video sink", "Sink/Video", "Video sink", "Sink/Video",
"A standard X based videosink", "Julien Moutte <julien@moutte.net>"); "A standard X based videosink", "Julien Moutte <julien@moutte.net>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_ximagesink_sink_template_factory)); &gst_ximagesink_sink_template_factory);
} }
static void static void

View file

@ -3536,8 +3536,8 @@ gst_xvimagesink_base_init (gpointer g_class)
"Video sink", "Sink/Video", "Video sink", "Sink/Video",
"A Xv based videosink", "Julien Moutte <julien@moutte.net>"); "A Xv based videosink", "Julien Moutte <julien@moutte.net>");
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&gst_xvimagesink_sink_template_factory)); &gst_xvimagesink_sink_template_factory);
} }
static void static void

View file

@ -62,10 +62,9 @@ test_injector_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_template);
gst_static_pad_template_get (&src_template)); gst_element_class_add_static_pad_template (element_class,
gst_element_class_add_pad_template (element_class, &sink_template);
gst_static_pad_template_get (&sink_template));
} }
static void static void

View file

@ -218,10 +218,9 @@ test_mpeg_audio_parse_base_init (gpointer klass)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&sink_template)); &sink_template);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_template);
gst_static_pad_template_get (&src_template));
gst_element_class_set_details_simple (element_class, "MPEG1 Audio Parser", gst_element_class_set_details_simple (element_class, "MPEG1 Audio Parser",
"Codec/Parser/Audio", "Pretends to parse mpeg1 audio stream", "Codec/Parser/Audio", "Pretends to parse mpeg1 audio stream",

View file

@ -223,10 +223,9 @@ test_mpeg_audio_parse_base_init (gpointer klass)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class,
gst_static_pad_template_get (&sink_template)); &sink_template);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_template);
gst_static_pad_template_get (&src_template));
gst_element_class_set_details_simple (element_class, "MPEG1 Audio Parser", gst_element_class_set_details_simple (element_class, "MPEG1 Audio Parser",
"Codec/Parser/Audio", "Pretends to parse mpeg1 audio stream", "Codec/Parser/Audio", "Pretends to parse mpeg1 audio stream",
@ -391,10 +390,8 @@ gst_fake_h264_parser_base_init (gpointer klass)
"stream-format=(string) { avc, byte-stream }")); "stream-format=(string) { avc, byte-stream }"));
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sink_templ);
gst_static_pad_template_get (&sink_templ)); gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"FakeH264Parser", "Codec/Parser/Converter/Video", "yep", "me"); "FakeH264Parser", "Codec/Parser/Converter/Video", "yep", "me");
} }
@ -492,10 +489,8 @@ gst_fake_h264_decoder_base_init (gpointer klass)
GST_STATIC_CAPS ("video/x-raw-yuv")); GST_STATIC_CAPS ("video/x-raw-yuv"));
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sink_templ);
gst_static_pad_template_get (&sink_templ)); gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"FakeH264Decoder", "Codec/Decoder/Video", "yep", "me"); "FakeH264Decoder", "Codec/Decoder/Video", "yep", "me");
} }

View file

@ -459,8 +459,7 @@ gst_red_video_src_base_init (gpointer klass)
); );
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Red Video Src", "Source/Video", "yep", "me"); "Red Video Src", "Source/Video", "yep", "me");
} }
@ -571,8 +570,7 @@ gst_codec_src_base_init (gpointer klass)
); );
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Codec Src", "Source/Video", "yep", "me"); "Codec Src", "Source/Video", "yep", "me");
} }

View file

@ -124,8 +124,7 @@ gst_caps_src_base_init (gpointer klass)
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"CapsSource", "Source/Generic", "yep", "me"); "CapsSource", "Source/Generic", "yep", "me");
} }
@ -278,8 +277,7 @@ gst_audio_codec_sink_base_init (gpointer klass)
); );
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sink_templ);
gst_static_pad_template_get (&sink_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"AudioCodecSink", "Sink/Audio", "yep", "me"); "AudioCodecSink", "Sink/Audio", "yep", "me");
} }
@ -384,8 +382,7 @@ gst_video_codec_sink_base_init (gpointer klass)
); );
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sink_templ);
gst_static_pad_template_get (&sink_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"VideoCodecSink", "Sink/Video", "yep", "me"); "VideoCodecSink", "Sink/Video", "yep", "me");
} }
@ -468,10 +465,8 @@ gst_codec_demuxer_base_init (gpointer klass)
); );
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &sink_templ);
gst_static_pad_template_get (&sink_templ)); gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"CodecDemuxer", "Codec/Demuxer", "yep", "me"); "CodecDemuxer", "Codec/Demuxer", "yep", "me");
} }

View file

@ -571,8 +571,7 @@ gst_red_video_src_base_init (gpointer klass)
); );
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Red Video Src", "Source/Video", "yep", "me"); "Red Video Src", "Source/Video", "yep", "me");
} }
@ -683,8 +682,7 @@ gst_codec_src_base_init (gpointer klass)
); );
GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class, gst_element_class_add_static_pad_template (element_class, &src_templ);
gst_static_pad_template_get (&src_templ));
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"Codec Src", "Source/Video", "yep", "me"); "Codec Src", "Source/Video", "yep", "me");
} }

View file

@ -642,8 +642,8 @@ gst_test_reverse_negotiation_sink_base_init (gpointer g_class)
"Test Reverse Negotiation Sink", "Test Reverse Negotiation Sink",
"Sink", "Sink",
"Some test sink", "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); "Some test sink", "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_static_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate)); &sinktemplate);
} }
static void static void