Fix leaks.

Original commit message from CVS:
* ext/amrwb/gstamrwbdec.c: (gst_amrwbdec_init):
* ext/amrwb/gstamrwbenc.c: (gst_amrwbenc_init):
* ext/amrwb/gstamrwbparse.c: (gst_amrwbparse_init):
* ext/audioresample/gstaudioresample.c:
* ext/bz2/gstbz2dec.c: (gst_bz2dec_init):
* ext/bz2/gstbz2enc.c: (gst_bz2enc_init):
* ext/divx/gstdivxdec.c: (gst_divxdec_init):
* ext/divx/gstdivxenc.c: (gst_divxenc_init):
* ext/faac/gstfaac.c: (gst_faac_init):
* ext/gsm/gstgsmdec.c: (gst_gsmdec_init):
* ext/gsm/gstgsmenc.c: (gst_gsmenc_init):
* ext/hermes/gsthermescolorspace.c: (gst_hermes_colorspace_init):
* ext/lcs/gstcolorspace.c: (gst_colorspace_init):
* ext/libfame/gstlibfame.c: (gst_fameenc_init):
* ext/snapshot/gstsnapshot.c: (gst_snapshot_init):
* ext/spc/gstspc.c: (gst_spc_dec_init):
* ext/swfdec/gstswfdec.c: (gst_swfdec_init):
* ext/xvid/gstxvidenc.c: (gst_xvidenc_init):
* gst/cdxaparse/gstcdxaparse.c: (gst_cdxa_parse_init):
* gst/cdxaparse/gstcdxastrip.c: (gst_cdxastrip_init):
* gst/chart/gstchart.c: (gst_chart_init):
* gst/colorspace/gstcolorspace.c: (gst_colorspace_init):
* gst/festival/gstfestival.c: (gst_festival_init):
* gst/freeze/gstfreeze.c: (gst_freeze_init):
* gst/mixmatrix/mixmatrix.c: (gst_mixmatrix_request_new_pad):
* gst/mpeg1sys/gstmpeg1systemencode.c: (gst_system_encode_init):
* gst/mpeg2sub/gstmpeg2subt.c: (gst_mpeg2subt_init):
* gst/nsf/gstnsf.c: (gst_nsfdec_init):
* gst/overlay/gstoverlay.c: (gst_overlay_init):
* gst/passthrough/gstpassthrough.c: (passthrough_init):
* gst/playondemand/gstplayondemand.c: (play_on_demand_init):
* gst/smooth/gstsmooth.c: (gst_smooth_init):
* gst/smoothwave/gstsmoothwave.c: (gst_smoothwave_init):
* gst/speed/gstspeed.c: (speed_init):
* gst/vbidec/gstvbidec.c: (gst_vbidec_init):
* gst/videodrop/gstvideodrop.c: (gst_videodrop_init):
* sys/dxr3/dxr3spusink.c: (dxr3spusink_init):
* sys/dxr3/dxr3videosink.c: (dxr3videosink_init):
* sys/qcam/gstqcamsrc.c: (gst_qcamsrc_init):
Fix leaks.
This commit is contained in:
Edward Hervey 2007-06-22 10:46:33 +00:00
parent 1b6c4e2ab2
commit b8a18741d8
41 changed files with 127 additions and 191 deletions

View file

@ -1,3 +1,46 @@
2007-06-22 Edward Hervey <edward@fluendo.com>
* ext/amrwb/gstamrwbdec.c: (gst_amrwbdec_init):
* ext/amrwb/gstamrwbenc.c: (gst_amrwbenc_init):
* ext/amrwb/gstamrwbparse.c: (gst_amrwbparse_init):
* ext/audioresample/gstaudioresample.c:
* ext/bz2/gstbz2dec.c: (gst_bz2dec_init):
* ext/bz2/gstbz2enc.c: (gst_bz2enc_init):
* ext/divx/gstdivxdec.c: (gst_divxdec_init):
* ext/divx/gstdivxenc.c: (gst_divxenc_init):
* ext/faac/gstfaac.c: (gst_faac_init):
* ext/gsm/gstgsmdec.c: (gst_gsmdec_init):
* ext/gsm/gstgsmenc.c: (gst_gsmenc_init):
* ext/hermes/gsthermescolorspace.c: (gst_hermes_colorspace_init):
* ext/lcs/gstcolorspace.c: (gst_colorspace_init):
* ext/libfame/gstlibfame.c: (gst_fameenc_init):
* ext/snapshot/gstsnapshot.c: (gst_snapshot_init):
* ext/spc/gstspc.c: (gst_spc_dec_init):
* ext/swfdec/gstswfdec.c: (gst_swfdec_init):
* ext/xvid/gstxvidenc.c: (gst_xvidenc_init):
* gst/cdxaparse/gstcdxaparse.c: (gst_cdxa_parse_init):
* gst/cdxaparse/gstcdxastrip.c: (gst_cdxastrip_init):
* gst/chart/gstchart.c: (gst_chart_init):
* gst/colorspace/gstcolorspace.c: (gst_colorspace_init):
* gst/festival/gstfestival.c: (gst_festival_init):
* gst/freeze/gstfreeze.c: (gst_freeze_init):
* gst/mixmatrix/mixmatrix.c: (gst_mixmatrix_request_new_pad):
* gst/mpeg1sys/gstmpeg1systemencode.c: (gst_system_encode_init):
* gst/mpeg2sub/gstmpeg2subt.c: (gst_mpeg2subt_init):
* gst/nsf/gstnsf.c: (gst_nsfdec_init):
* gst/overlay/gstoverlay.c: (gst_overlay_init):
* gst/passthrough/gstpassthrough.c: (passthrough_init):
* gst/playondemand/gstplayondemand.c: (play_on_demand_init):
* gst/smooth/gstsmooth.c: (gst_smooth_init):
* gst/smoothwave/gstsmoothwave.c: (gst_smoothwave_init):
* gst/speed/gstspeed.c: (speed_init):
* gst/vbidec/gstvbidec.c: (gst_vbidec_init):
* gst/videodrop/gstvideodrop.c: (gst_videodrop_init):
* sys/dxr3/dxr3spusink.c: (dxr3spusink_init):
* sys/dxr3/dxr3videosink.c: (dxr3videosink_init):
* sys/qcam/gstqcamsrc.c: (gst_qcamsrc_init):
Fix leaks.
2007-06-21 Tim-Philipp Müller <tim at centricular dot net>
* RELEASE:

View file

@ -97,18 +97,14 @@ static void
gst_amrwbdec_init (GstAmrwbDec * amrwbdec, GstAmrwbDecClass * klass)
{
/* create the sink pad */
amrwbdec->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
amrwbdec->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
gst_pad_set_setcaps_function (amrwbdec->sinkpad, gst_amrwbdec_setcaps);
gst_pad_set_event_function (amrwbdec->sinkpad, gst_amrwbdec_event);
gst_pad_set_chain_function (amrwbdec->sinkpad, gst_amrwbdec_chain);
gst_element_add_pad (GST_ELEMENT (amrwbdec), amrwbdec->sinkpad);
/* create the src pad */
amrwbdec->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
amrwbdec->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_pad_use_fixed_caps (amrwbdec->srcpad);
gst_element_add_pad (GST_ELEMENT (amrwbdec), amrwbdec->srcpad);

View file

@ -89,17 +89,13 @@ static void
gst_amrwbenc_init (GstAmrwbEnc * amrwbenc, GstAmrwbEncClass * klass)
{
/* create the sink pad */
amrwbenc->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
amrwbenc->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
gst_pad_set_setcaps_function (amrwbenc->sinkpad, gst_amrwbenc_setcaps);
gst_pad_set_chain_function (amrwbenc->sinkpad, gst_amrwbenc_chain);
gst_element_add_pad (GST_ELEMENT (amrwbenc), amrwbenc->sinkpad);
/* create the src pad */
amrwbenc->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
amrwbenc->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_pad_use_fixed_caps (amrwbenc->srcpad);
gst_element_add_pad (GST_ELEMENT (amrwbenc), amrwbenc->srcpad);

View file

@ -95,8 +95,7 @@ gst_amrwbparse_init (GstAmrwbParse * amrwbparse, GstAmrwbParseClass * klass)
{
/* create the sink pad */
amrwbparse->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
gst_pad_new_from_static_template (&sink_template, "sink");
gst_pad_set_chain_function (amrwbparse->sinkpad,
GST_DEBUG_FUNCPTR (gst_amrwbparse_chain));
@ -108,9 +107,7 @@ gst_amrwbparse_init (GstAmrwbParse * amrwbparse, GstAmrwbParseClass * klass)
gst_element_add_pad (GST_ELEMENT (amrwbparse), amrwbparse->sinkpad);
/* create the src pad */
amrwbparse->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
amrwbparse->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_pad_set_query_function (amrwbparse->srcpad,
GST_DEBUG_FUNCPTR (gst_amrwbparse_query));
gst_pad_set_query_type_function (amrwbparse->srcpad,

View file

@ -282,8 +282,8 @@ static void gst_audioresample_init (Audioresample * audioresample)
ResampleState *r;
audioresample->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_audioresample_sink_template), "sink");
gst_pad_new_from_static_template (&gst_audioresample_sink_template,
"sink");
gst_element_add_pad (GST_ELEMENT (audioresample), audioresample->sinkpad);
gst_pad_set_chain_function (audioresample->sinkpad, gst_audioresample_chain);
gst_pad_set_link_function (audioresample->sinkpad, gst_audioresample_link);
@ -293,8 +293,7 @@ static void gst_audioresample_init (Audioresample * audioresample)
gst_audioresample_fixate);
audioresample->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_audioresample_src_template), "src");
gst_pad_new_from_static_template (&gst_audioresample_src_template, "src");
gst_element_add_pad (GST_ELEMENT (audioresample), audioresample->srcpad);
gst_pad_set_link_function (audioresample->srcpad, gst_audioresample_link);

View file

@ -179,14 +179,10 @@ gst_bz2dec_init (GstBz2dec * b, GstBz2decClass * klass)
b->first_buffer_size = DEFAULT_FIRST_BUFFER_SIZE;
b->buffer_size = DEFAULT_BUFFER_SIZE;
pad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
pad = gst_pad_new_from_static_template (&sink_template, "sink");
gst_pad_set_chain_function (pad, gst_bz2dec_chain);
gst_element_add_pad (GST_ELEMENT (b), pad);
pad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
pad = gst_pad_new_from_static_template (&src_template, "src");
gst_element_add_pad (GST_ELEMENT (b), pad);
gst_pad_use_fixed_caps (pad);

View file

@ -210,15 +210,11 @@ gst_bz2enc_init (GstBz2enc * b, GstBz2encClass * klass)
{
GstPad *pad;
pad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
pad = gst_pad_new_from_static_template (&sink_template, "sink");
gst_pad_set_chain_function (pad, gst_bz2enc_chain);
gst_pad_set_event_function (pad, gst_bz2enc_event);
gst_element_add_pad (GST_ELEMENT (b), pad);
pad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
pad = gst_pad_new_from_static_template (&src_template, "src");
gst_element_add_pad (GST_ELEMENT (b), pad);
b->block_size = DEFAULT_BLOCK_SIZE;

View file

@ -163,17 +163,13 @@ static void
gst_divxdec_init (GstDivxDec * divxdec)
{
/* create the sink pad */
divxdec->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
divxdec->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (divxdec), divxdec->sinkpad);
gst_pad_set_chain_function (divxdec->sinkpad, gst_divxdec_chain);
gst_pad_set_setcaps_function (divxdec->sinkpad, gst_divxdec_connect);
/* create the src pad */
divxdec->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
divxdec->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_element_add_pad (GST_ELEMENT (divxdec), divxdec->srcpad);
gst_pad_use_fixed_caps (divxdec->srcpad);

View file

@ -198,18 +198,14 @@ static void
gst_divxenc_init (GstDivxEnc * divxenc)
{
/* create the sink pad */
divxenc->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
divxenc->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (divxenc), divxenc->sinkpad);
gst_pad_set_chain_function (divxenc->sinkpad, gst_divxenc_chain);
gst_pad_set_setcaps_function (divxenc->sinkpad, gst_divxenc_setcaps);
/* create the src pad */
divxenc->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
divxenc->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_pad_use_fixed_caps (divxenc->srcpad);
gst_element_add_pad (GST_ELEMENT (divxenc), divxenc->srcpad);

View file

@ -251,9 +251,7 @@ gst_faac_init (GstFaac * faac)
faac->cache_time = GST_CLOCK_TIME_NONE;
faac->cache_duration = 0;
faac->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
faac->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
gst_pad_set_chain_function (faac->sinkpad,
GST_DEBUG_FUNCPTR (gst_faac_chain));
gst_pad_set_setcaps_function (faac->sinkpad,
@ -262,9 +260,7 @@ gst_faac_init (GstFaac * faac)
GST_DEBUG_FUNCPTR (gst_faac_sink_event));
gst_element_add_pad (GST_ELEMENT (faac), faac->sinkpad);
faac->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
faac->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_pad_use_fixed_caps (faac->srcpad);
gst_element_add_pad (GST_ELEMENT (faac), faac->srcpad);

View file

@ -139,16 +139,14 @@ gst_gsmdec_init (GstGSMDec * gsmdec)
{
/* create the sink and src pads */
gsmdec->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gsmdec_sink_template), "sink");
gst_pad_new_from_static_template (&gsmdec_sink_template, "sink");
gst_pad_set_setcaps_function (gsmdec->sinkpad, gst_gsmdec_sink_setcaps);
gst_pad_set_event_function (gsmdec->sinkpad, gst_gsmdec_sink_event);
gst_pad_set_chain_function (gsmdec->sinkpad, gst_gsmdec_chain);
gst_element_add_pad (GST_ELEMENT (gsmdec), gsmdec->sinkpad);
gsmdec->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gsmdec_src_template), "src");
gst_pad_new_from_static_template (&gsmdec_src_template, "src");
gst_element_add_pad (GST_ELEMENT (gsmdec), gsmdec->srcpad);
gsmdec->state = gsm_create ();

View file

@ -137,15 +137,13 @@ gst_gsmenc_init (GstGSMEnc * gsmenc)
/* create the sink and src pads */
gsmenc->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gsmenc_sink_template), "sink");
gst_pad_new_from_static_template (&gsmenc_sink_template, "sink");
gst_pad_set_chain_function (gsmenc->sinkpad, gst_gsmenc_chain);
gst_pad_set_setcaps_function (gsmenc->sinkpad, gst_gsmenc_setcaps);
gst_element_add_pad (GST_ELEMENT (gsmenc), gsmenc->sinkpad);
gsmenc->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gsmenc_src_template), "src");
gst_pad_new_from_static_template (&gsmenc_src_template, "src");
gst_element_add_pad (GST_ELEMENT (gsmenc), gsmenc->srcpad);
gsmenc->state = gsm_create ();

View file

@ -537,16 +537,16 @@ static void
gst_hermes_colorspace_init (GstHermesColorspace * space)
{
space->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_hermes_colorspace_sink_pad_template), "sink");
gst_pad_new_from_static_template
(&gst_hermes_colorspace_sink_pad_template, "sink");
gst_pad_set_link_function (space->sinkpad, gst_hermes_colorspace_link);
gst_pad_set_getcaps_function (space->sinkpad, gst_hermes_colorspace_getcaps);
gst_pad_set_chain_function (space->sinkpad, gst_hermes_colorspace_chain);
gst_element_add_pad (GST_ELEMENT (space), space->sinkpad);
space->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_hermes_colorspace_src_pad_template), "src");
gst_pad_new_from_static_template (&gst_hermes_colorspace_src_pad_template,
"src");
gst_element_add_pad (GST_ELEMENT (space), space->srcpad);
gst_pad_set_link_function (space->srcpad, gst_hermes_colorspace_link);

View file

@ -370,16 +370,14 @@ static void
gst_colorspace_init (GstColorspace * space)
{
space->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_colorspace_sink_template), "sink");
gst_pad_new_from_static_template (&gst_colorspace_sink_template, "sink");
gst_pad_set_link_function (space->sinkpad, gst_colorspace_link);
gst_pad_set_getcaps_function (space->sinkpad, gst_colorspace_getcaps);
gst_pad_set_chain_function (space->sinkpad, gst_colorspace_chain);
gst_element_add_pad (GST_ELEMENT (space), space->sinkpad);
space->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_colorspace_src_template), "src");
gst_pad_new_from_static_template (&gst_colorspace_src_template, "src");
gst_element_add_pad (GST_ELEMENT (space), space->srcpad);
gst_pad_set_link_function (space->srcpad, gst_colorspace_link);

View file

@ -363,16 +363,12 @@ gst_fameenc_init (GstFameEnc * fameenc)
g_assert (fameenc->fc != NULL);
/* create the sink and src pads */
fameenc->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
fameenc->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (fameenc), fameenc->sinkpad);
gst_pad_set_chain_function (fameenc->sinkpad, gst_fameenc_chain);
gst_pad_set_link_function (fameenc->sinkpad, gst_fameenc_sink_link);
fameenc->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
fameenc->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_element_add_pad (GST_ELEMENT (fameenc), fameenc->srcpad);
/* FIXME: set some more handler functions here */

View file

@ -194,15 +194,13 @@ static void
gst_snapshot_init (GstSnapshot * snapshot)
{
snapshot->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&snapshot_sink_factory), "sink");
gst_pad_new_from_static_template (&snapshot_sink_factory, "sink");
gst_pad_set_link_function (snapshot->sinkpad, gst_snapshot_sinkconnect);
gst_pad_set_chain_function (snapshot->sinkpad, gst_snapshot_chain);
gst_element_add_pad (GST_ELEMENT (snapshot), snapshot->sinkpad);
snapshot->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&snapshot_src_factory), "src");
gst_pad_new_from_static_template (&snapshot_src_factory, "src");
gst_element_add_pad (GST_ELEMENT (snapshot), snapshot->srcpad);
snapshot->cur_frame = 0;

View file

@ -124,17 +124,13 @@ gst_spc_dec_class_init (GstSpcDecClass * klass)
static void
gst_spc_dec_init (GstSpcDec * spc, GstSpcDecClass * klass)
{
spc->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_factory),
"sink");
spc->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink");
gst_pad_set_query_function (spc->sinkpad, NULL);
gst_pad_set_event_function (spc->sinkpad, gst_spc_dec_sink_event);
gst_pad_set_chain_function (spc->sinkpad, gst_spc_dec_chain);
gst_element_add_pad (GST_ELEMENT (spc), spc->sinkpad);
spc->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_factory),
"src");
spc->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
gst_pad_set_event_function (spc->srcpad, gst_spc_dec_src_event);
gst_pad_set_query_function (spc->srcpad, gst_spc_dec_src_query);
gst_pad_use_fixed_caps (spc->srcpad);

View file

@ -536,16 +536,14 @@ gst_swfdec_init (GstSwfdec * swfdec)
{
/* create the sink and src pads */
swfdec->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&sink_template_factory), "sink");
gst_pad_new_from_static_template (&sink_template_factory, "sink");
gst_element_add_pad (GST_ELEMENT (swfdec), swfdec->sinkpad);
gst_pad_set_chain_function (swfdec->sinkpad, gst_swfdec_chain);
gst_pad_set_event_function (swfdec->sinkpad, gst_swfdec_sink_event);
swfdec->videopad =
gst_pad_new_from_template (gst_static_pad_template_get
(&video_template_factory), "video_00");
gst_pad_new_from_static_template (&video_template_factory, "video_00");
gst_pad_set_query_function (swfdec->videopad, gst_swfdec_src_query);
gst_pad_set_getcaps_function (swfdec->videopad, gst_swfdec_video_getcaps);
gst_pad_set_setcaps_function (swfdec->videopad, gst_swfdec_video_link);
@ -557,8 +555,7 @@ gst_swfdec_init (GstSwfdec * swfdec)
gst_element_add_pad (GST_ELEMENT (swfdec), swfdec->videopad);
swfdec->audiopad =
gst_pad_new_from_template (gst_static_pad_template_get
(&audio_template_factory), "audio_00");
gst_pad_new_from_static_template (&audio_template_factory, "audio_00");
gst_pad_set_query_function (swfdec->audiopad, gst_swfdec_src_query);
gst_pad_set_event_function (swfdec->audiopad, gst_swfdec_src_event);

View file

@ -475,9 +475,7 @@ gst_xvidenc_init (GstXvidEnc * xvidenc)
guint i, num_props;
/* create the sink pad */
xvidenc->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
xvidenc->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (xvidenc), xvidenc->sinkpad);
gst_pad_set_chain_function (xvidenc->sinkpad,
@ -488,9 +486,7 @@ gst_xvidenc_init (GstXvidEnc * xvidenc)
GST_DEBUG_FUNCPTR (gst_xvidenc_handle_sink_event));
/* create the src pad */
xvidenc->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
xvidenc->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_element_add_pad (GST_ELEMENT (xvidenc), xvidenc->srcpad);
gst_pad_use_fixed_caps (xvidenc->srcpad);

View file

@ -92,8 +92,7 @@ gst_cdxa_parse_init (GstCDXAParse * cdxaparse, GstCDXAParseClass * klass)
GstCaps *caps;
cdxaparse->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&sink_template_factory), "sink");
gst_pad_new_from_static_template (&sink_template_factory, "sink");
gst_pad_set_activate_function (cdxaparse->sinkpad,
GST_DEBUG_FUNCPTR (gst_cdxa_parse_sink_activate));
gst_pad_set_activatepull_function (cdxaparse->sinkpad,
@ -102,8 +101,7 @@ gst_cdxa_parse_init (GstCDXAParse * cdxaparse, GstCDXAParseClass * klass)
gst_element_add_pad (GST_ELEMENT (cdxaparse), cdxaparse->sinkpad);
cdxaparse->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&src_template_factory), "src");
gst_pad_new_from_static_template (&src_template_factory, "src");
gst_pad_set_event_function (cdxaparse->srcpad,
GST_DEBUG_FUNCPTR (gst_cdxa_parse_src_event));

View file

@ -116,14 +116,12 @@ gst_cdxastrip_init (GstCDXAStrip * cdxastrip)
GST_OBJECT_FLAG_SET (cdxastrip, GST_ELEMENT_EVENT_AWARE);
cdxastrip->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&sink_template_factory), "sink");
gst_pad_new_from_static_template (&sink_template_factory, "sink");
gst_pad_set_chain_function (cdxastrip->sinkpad, gst_cdxastrip_chain);
gst_element_add_pad (GST_ELEMENT (cdxastrip), cdxastrip->sinkpad);
cdxastrip->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&src_template_factory), "src");
gst_pad_new_from_static_template (&src_template_factory, "src");
gst_pad_set_formats_function (cdxastrip->srcpad,
gst_cdxastrip_get_src_formats);
gst_pad_set_event_mask_function (cdxastrip->srcpad,

View file

@ -116,14 +116,12 @@ gst_cdxastrip_init (GstCDXAStrip * cdxastrip)
GST_OBJECT_FLAG_SET (cdxastrip, GST_ELEMENT_EVENT_AWARE);
cdxastrip->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&sink_template_factory), "sink");
gst_pad_new_from_static_template (&sink_template_factory, "sink");
gst_pad_set_chain_function (cdxastrip->sinkpad, gst_cdxastrip_chain);
gst_element_add_pad (GST_ELEMENT (cdxastrip), cdxastrip->sinkpad);
cdxastrip->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&src_template_factory), "src");
gst_pad_new_from_static_template (&src_template_factory, "src");
gst_pad_set_formats_function (cdxastrip->srcpad,
gst_cdxastrip_get_src_formats);
gst_pad_set_event_mask_function (cdxastrip->srcpad,

View file

@ -172,12 +172,8 @@ static void
gst_chart_init (GstChart * chart)
{
/* create the sink and src pads */
chart->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_factory),
"sink");
chart->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_factory),
"src");
chart->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink");
chart->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
gst_element_add_pad (GST_ELEMENT (chart), chart->sinkpad);
gst_element_add_pad (GST_ELEMENT (chart), chart->srcpad);

View file

@ -516,16 +516,14 @@ static void
gst_colorspace_init (GstColorspace * space)
{
space->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_colorspace_sink_template), "sink");
gst_pad_new_from_static_template (&gst_colorspace_sink_template, "sink");
gst_pad_set_link_function (space->sinkpad, gst_colorspace_link);
gst_pad_set_getcaps_function (space->sinkpad, gst_colorspace_getcaps);
gst_pad_set_chain_function (space->sinkpad, gst_colorspace_chain);
gst_element_add_pad (GST_ELEMENT (space), space->sinkpad);
space->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_colorspace_src_template), "src");
gst_pad_new_from_static_template (&gst_colorspace_src_template, "src");
gst_element_add_pad (GST_ELEMENT (space), space->srcpad);
gst_pad_set_link_function (space->srcpad, gst_colorspace_link);
}

View file

@ -186,14 +186,12 @@ static void
gst_festival_init (GstFestival * festival)
{
festival->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&sink_template_factory), "sink");
gst_pad_new_from_static_template (&sink_template_factory, "sink");
gst_pad_set_chain_function (festival->sinkpad, gst_festival_chain);
gst_element_add_pad (GST_ELEMENT (festival), festival->sinkpad);
festival->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&src_template_factory), "src");
gst_pad_new_from_static_template (&src_template_factory, "src");
gst_element_add_pad (GST_ELEMENT (festival), festival->srcpad);
festival->info = festival_default_info ();

View file

@ -111,8 +111,7 @@ static void
gst_freeze_init (GstFreeze * freeze, GstFreezeClass * klass)
{
freeze->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_freeze_sink_template), "sink");
gst_pad_new_from_static_template (&gst_freeze_sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (freeze), freeze->sinkpad);
gst_pad_set_activate_function (freeze->sinkpad, gst_freeze_sink_activate);
gst_pad_set_activatepull_function (freeze->sinkpad,
@ -121,8 +120,8 @@ gst_freeze_init (GstFreeze * freeze, GstFreezeClass * klass)
gst_pad_set_getcaps_function (freeze->sinkpad, gst_pad_proxy_getcaps);
gst_pad_set_event_function (freeze->sinkpad, gst_freeze_sink_event);
freeze->srcpad = gst_pad_new_from_template (gst_static_pad_template_get
(&gst_freeze_src_template), "src");
freeze->srcpad =
gst_pad_new_from_static_template (&gst_freeze_src_template, "src");
gst_element_add_pad (GST_ELEMENT (freeze), freeze->srcpad);
gst_pad_set_getcaps_function (freeze->srcpad, gst_pad_proxy_getcaps);

View file

@ -381,9 +381,7 @@ gst_mixmatrix_request_new_pad (GstElement * element, GstPadTemplate * templ,
mixmatrix_resize (mix, ROUND_UP (padnum, mix->grpsize),
mix->sinkpadalloc);
pad =
gst_pad_new_from_template (gst_static_pad_template_get
(&mixmatrix_sink_template), name);
pad = gst_pad_new_from_static_template (&mixmatrix_sink_template, name);
GST_PAD_ELEMENT_PRIVATE (pad) = GINT_TO_POINTER (padnum);
gst_element_add_pad (GST_ELEMENT (mix), pad);
/* g_signal_connect(G_OBJECT(pad), "unlink", G_CALLBACK(sink_unlinked), mix); */
@ -405,9 +403,7 @@ gst_mixmatrix_request_new_pad (GstElement * element, GstPadTemplate * templ,
if (padnum >= mix->srcpadalloc)
mixmatrix_resize (mix, ROUND_UP (padnum, mix->grpsize), mix->srcpadalloc);
pad =
gst_pad_new_from_template (gst_static_pad_template_get
(&mixmatrix_src_template), name);
pad = gst_pad_new_from_static_template (&mixmatrix_src_template, name);
GST_PAD_ELEMENT_PRIVATE (pad) = GINT_TO_POINTER (padnum);
gst_element_add_pad (GST_ELEMENT (mix), pad);
/* g_signal_connect(G_OBJECT(pad), "unlink", G_CALLBACK(sink_unlinked), mix); */

View file

@ -149,8 +149,7 @@ static void
gst_system_encode_init (GstMPEG1SystemEncode * system_encode)
{
system_encode->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_factory),
"src");
gst_pad_new_from_static_template (&src_factory, "src");
gst_element_add_pad (GST_ELEMENT (system_encode), system_encode->srcpad);
system_encode->video_buffer = mpeg1mux_buffer_new (BUFFER_TYPE_VIDEO, 0xE0);

View file

@ -205,8 +205,7 @@ static void
gst_mpeg2subt_init (GstMpeg2Subt * mpeg2subt)
{
mpeg2subt->videopad =
gst_pad_new_from_template (gst_static_pad_template_get
(&video_template), "video");
gst_pad_new_from_static_template (&video_template, "video");
gst_element_add_pad (GST_ELEMENT (mpeg2subt), mpeg2subt->videopad);
gst_pad_set_link_function (mpeg2subt->videopad,
GST_DEBUG_FUNCPTR (gst_mpeg2subt_link_video));
@ -214,13 +213,10 @@ gst_mpeg2subt_init (GstMpeg2Subt * mpeg2subt)
GST_DEBUG_FUNCPTR (gst_mpeg2subt_getcaps_video));
mpeg2subt->subtitlepad =
gst_pad_new_from_template (gst_static_pad_template_get
(&subtitle_template), "subtitle");
gst_pad_new_from_static_template (&subtitle_template, "subtitle");
gst_element_add_pad (GST_ELEMENT (mpeg2subt), mpeg2subt->subtitlepad);
mpeg2subt->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&src_template), "src");
mpeg2subt->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_element_add_pad (GST_ELEMENT (mpeg2subt), mpeg2subt->srcpad);
gst_pad_set_getcaps_function (mpeg2subt->srcpad,
GST_DEBUG_FUNCPTR (gst_mpeg2subt_getcaps_video));

View file

@ -180,17 +180,13 @@ gst_nsfdec_class_init (GstNsfDec * klass)
static void
gst_nsfdec_init (GstNsfDec * nsfdec)
{
nsfdec->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_templ),
"sink");
nsfdec->sinkpad = gst_pad_new_from_static_template (&sink_templ, "sink");
gst_pad_set_query_function (nsfdec->sinkpad, NULL);
gst_pad_set_event_function (nsfdec->sinkpad, gst_nsfdec_sink_event);
gst_pad_set_chain_function (nsfdec->sinkpad, gst_nsfdec_chain);
gst_element_add_pad (GST_ELEMENT (nsfdec), nsfdec->sinkpad);
nsfdec->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_templ),
"src");
nsfdec->srcpad = gst_pad_new_from_static_template (&src_templ, "src");
gst_pad_set_event_function (nsfdec->srcpad, gst_nsfdec_src_event);
gst_pad_set_query_function (nsfdec->srcpad, gst_nsfdec_src_query);
gst_pad_use_fixed_caps (nsfdec->srcpad);

View file

@ -195,26 +195,22 @@ static void
gst_overlay_init (GstOverlay * overlay)
{
overlay->sinkpad1 =
gst_pad_new_from_template (gst_static_pad_template_get
(&overlay_sink1_factory), "sink1");
gst_pad_new_from_static_template (&overlay_sink1_factory, "sink1");
gst_pad_set_link_function (overlay->sinkpad1, gst_overlay_sinkconnect);
gst_element_add_pad (GST_ELEMENT (overlay), overlay->sinkpad1);
overlay->sinkpad2 =
gst_pad_new_from_template (gst_static_pad_template_get
(&overlay_sink2_factory), "sink2");
gst_pad_new_from_static_template (&overlay_sink2_factory, "sink2");
gst_pad_set_link_function (overlay->sinkpad2, gst_overlay_sinkconnect);
gst_element_add_pad (GST_ELEMENT (overlay), overlay->sinkpad2);
overlay->sinkpad3 =
gst_pad_new_from_template (gst_static_pad_template_get
(&overlay_sink3_factory), "sink3");
gst_pad_new_from_static_template (&overlay_sink3_factory, "sink3");
gst_pad_set_link_function (overlay->sinkpad3, gst_overlay_sinkconnect);
gst_element_add_pad (GST_ELEMENT (overlay), overlay->sinkpad3);
overlay->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&overlay_src_factory), "src");
gst_pad_new_from_static_template (&overlay_src_factory, "src");
gst_element_add_pad (GST_ELEMENT (overlay), overlay->srcpad);
gst_element_set_loop_function (GST_ELEMENT (overlay), gst_overlay_loop);

View file

@ -193,12 +193,10 @@ static void
passthrough_init (GstPassthrough * filter)
{
filter->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&passthrough_src_template), "src");
gst_pad_new_from_static_template (&passthrough_src_template, "src");
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
filter->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&passthrough_sink_template), "sink");
gst_pad_new_from_static_template (&passthrough_sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
gst_pad_set_link_function (filter->sinkpad, passthrough_connect_sink);

View file

@ -236,11 +236,9 @@ static void
play_on_demand_init (GstPlayOnDemand * filter)
{
filter->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&play_on_demand_src_template), "src");
gst_pad_new_from_static_template (&play_on_demand_src_template, "src");
filter->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&play_on_demand_sink_template), "sink");
gst_pad_new_from_static_template (&play_on_demand_sink_template, "sink");
gst_pad_set_link_function (filter->sinkpad, play_on_demand_pad_link);

View file

@ -160,15 +160,13 @@ static void
gst_smooth_init (GstSmooth * smooth)
{
smooth->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_smooth_sink_template), "sink");
gst_pad_new_from_static_template (&gst_smooth_sink_template, "sink");
gst_pad_set_link_function (smooth->sinkpad, gst_smooth_link);
gst_pad_set_chain_function (smooth->sinkpad, gst_smooth_chain);
gst_element_add_pad (GST_ELEMENT (smooth), smooth->sinkpad);
smooth->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_smooth_sink_template), "src");
gst_pad_new_from_static_template (&gst_smooth_sink_template, "src");
gst_pad_set_link_function (smooth->srcpad, gst_smooth_link);
gst_element_add_pad (GST_ELEMENT (smooth), smooth->srcpad);

View file

@ -156,11 +156,8 @@ gst_smoothwave_init (GstSmoothWave * smoothwave)
int i;
smoothwave->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
"sink");
smoothwave->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
"src");
gst_pad_new_from_static_template (&sink_template, "sink");
smoothwave->srcpad = gst_pad_new_from_static_template (&src_template, "src");
gst_element_add_pad (GST_ELEMENT (smoothwave), smoothwave->sinkpad);
gst_pad_set_chain_function (smoothwave->sinkpad, gst_smoothwave_chain);
gst_pad_set_link_function (smoothwave->sinkpad, gst_sw_sinklink);

View file

@ -490,16 +490,14 @@ static void
speed_init (GstSpeed * filter)
{
filter->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_speed_sink_template), "sink");
gst_pad_new_from_static_template (&gst_speed_sink_template, "sink");
gst_pad_set_setcaps_function (filter->sinkpad, speed_setcaps);
gst_pad_set_chain_function (filter->sinkpad, speed_chain);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
gst_pad_set_event_function (filter->sinkpad, speed_sink_event);
filter->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_speed_src_template), "src");
gst_pad_new_from_static_template (&gst_speed_src_template, "src");
gst_pad_set_setcaps_function (filter->srcpad, speed_setcaps);
gst_pad_set_query_type_function (filter->srcpad, speed_get_query_types);
gst_pad_set_query_function (filter->srcpad, speed_src_query);

View file

@ -206,15 +206,13 @@ gst_vbidec_init (GstVBIDec * vbidec)
{
/* create the sink and src pads */
vbidec->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_vbidec_sink_template), "sink");
gst_pad_new_from_static_template (&gst_vbidec_sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (vbidec), vbidec->sinkpad);
gst_pad_set_chain_function (vbidec->sinkpad,
GST_DEBUG_FUNCPTR (gst_vbidec_chain));
vbidec->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_vbidec_src_template), "src");
gst_pad_new_from_static_template (&gst_vbidec_src_template, "src");
gst_element_add_pad (GST_ELEMENT (vbidec), vbidec->srcpad);
vbidec->vbiscreen = vbiscreen_new (0, 0, 1.0, 0, (void *) vbidec);

View file

@ -232,16 +232,14 @@ gst_videodrop_init (GstVideodrop * videodrop)
GST_DEBUG ("gst_videodrop_init");
videodrop->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_videodrop_sink_template), "sink");
gst_pad_new_from_static_template (&gst_videodrop_sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (videodrop), videodrop->sinkpad);
gst_pad_set_chain_function (videodrop->sinkpad, gst_videodrop_chain);
gst_pad_set_getcaps_function (videodrop->sinkpad, gst_videodrop_getcaps);
gst_pad_set_link_function (videodrop->sinkpad, gst_videodrop_link);
videodrop->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_videodrop_src_template), "src");
gst_pad_new_from_static_template (&gst_videodrop_src_template, "src");
gst_element_add_pad (GST_ELEMENT (videodrop), videodrop->srcpad);
gst_pad_set_getcaps_function (videodrop->srcpad, gst_videodrop_getcaps);
gst_pad_set_link_function (videodrop->srcpad, gst_videodrop_link);

View file

@ -201,9 +201,7 @@ dxr3spusink_init (Dxr3SpuSink * sink)
{
GstPad *pad;
pad =
gst_pad_new_from_template (gst_static_pad_template_get
(&dxr3spusink_sink_factory), "sink");
pad = gst_pad_new_from_static_template (&dxr3spusink_sink_factory, "sink");
gst_element_add_pad (GST_ELEMENT (sink), pad);
gst_pad_set_chain_function (pad, dxr3spusink_chain);

View file

@ -198,9 +198,7 @@ dxr3videosink_init (Dxr3VideoSink * sink)
{
GstPad *pad;
pad =
gst_pad_new_from_template (gst_static_pad_template_get
(&dxr3videosink_sink_factory), "sink");
pad = gst_pad_new_from_static_template (&dxr3videosink_sink_factory, "sink");
gst_element_add_pad (GST_ELEMENT (sink), pad);
gst_pad_set_chain_function (pad, dxr3videosink_chain);

View file

@ -213,8 +213,7 @@ static void
gst_qcamsrc_init (GstQCamSrc * qcamsrc)
{
qcamsrc->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&gst_qcamsrc_src_factory), "src");
gst_pad_new_from_static_template (&gst_qcamsrc_src_factory, "src");
gst_element_add_pad (GST_ELEMENT (qcamsrc), qcamsrc->srcpad);
gst_pad_set_get_function (qcamsrc->srcpad, gst_qcamsrc_get);