diff --git a/ext/dirac/gstdiracdec.cc b/ext/dirac/gstdiracdec.cc index 597735b659..486eab0aba 100644 --- a/ext/dirac/gstdiracdec.cc +++ b/ext/dirac/gstdiracdec.cc @@ -140,14 +140,13 @@ gst_diracdec_init (GstDiracDec * diracdec) /* create the sink and src pads */ diracdec->sinkpad = - gst_pad_new_from_template (gst_static_pad_template_get - (&gst_diracdec_sink_pad_template), "sink"); + gst_pad_new_from_static_template (&gst_diracdec_sink_pad_template, + "sink"); gst_pad_set_chain_function (diracdec->sinkpad, gst_diracdec_chain); gst_element_add_pad (GST_ELEMENT (diracdec), diracdec->sinkpad); diracdec->srcpad = - gst_pad_new_from_template (gst_static_pad_template_get - (&gst_diracdec_src_pad_template), "src"); + gst_pad_new_from_static_template (&gst_diracdec_src_pad_template, "src"); gst_pad_use_explicit_caps (diracdec->srcpad); gst_element_add_pad (GST_ELEMENT (diracdec), diracdec->srcpad); @@ -258,16 +257,15 @@ gst_diracdec_chain (GstPad * pad, GstData * _data) diracdec->decoder->seq_params.width, diracdec->decoder->seq_params.height, (gdouble) fps_num / (gdouble) fps_denom, - gst_diracdec_chroma_to_fourcc (diracdec->decoder-> - seq_params.chroma))) { + gst_diracdec_chroma_to_fourcc (diracdec->decoder->seq_params. + chroma))) { GST_ELEMENT_ERROR (diracdec, CORE, NEGOTIATION, (NULL), ("Failed to set caps to %dx%d @ %d fps (format=" GST_FOURCC_FORMAT "/%d)", diracdec->decoder->seq_params.width, diracdec->decoder->seq_params.height, diracdec->decoder->seq_params.frame_rate, - gst_diracdec_chroma_to_fourcc (diracdec->decoder-> - seq_params.chroma), - diracdec->decoder->seq_params.chroma)); + gst_diracdec_chroma_to_fourcc (diracdec->decoder->seq_params. + chroma), diracdec->decoder->seq_params.chroma)); c = FALSE; break; } diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index f92b372430..df6cda5de5 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -191,11 +191,8 @@ gst_live_adder_class_init (GstLiveAdderClass * klass) static void gst_live_adder_init (GstLiveAdder * adder, GstLiveAdderClass * klass) { - GstPadTemplate *template; - - template = gst_static_pad_template_get (&gst_live_adder_src_template); - adder->srcpad = gst_pad_new_from_template (template, "src"); - gst_object_unref (template); + adder->srcpad = + gst_pad_new_from_static_template (&gst_live_adder_src_template, "src"); gst_pad_set_getcaps_function (adder->srcpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_pad_set_setcaps_function (adder->srcpad, diff --git a/gst/mpegpsmux/mpegpsmux.c b/gst/mpegpsmux/mpegpsmux.c index 70f0213e04..d64fb353d7 100644 --- a/gst/mpegpsmux/mpegpsmux.c +++ b/gst/mpegpsmux/mpegpsmux.c @@ -140,9 +140,8 @@ mpegpsmux_class_init (MpegPsMuxClass * klass) static void mpegpsmux_init (MpegPsMux * mux, MpegPsMuxClass * g_class) { - mux->srcpad = - gst_pad_new_from_template (gst_static_pad_template_get - (&mpegpsmux_src_factory), "src"); + mux->srcpad = gst_pad_new_from_static_template (&mpegpsmux_src_factory, + "src"); gst_pad_use_fixed_caps (mux->srcpad); gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad); diff --git a/gst/pnm/gstpnmdec.c b/gst/pnm/gstpnmdec.c index 060af2dccc..394e86d128 100644 --- a/gst/pnm/gstpnmdec.c +++ b/gst/pnm/gstpnmdec.c @@ -295,14 +295,11 @@ gst_pnmdec_init (GstPnmdec * s, GstPnmdecClass * klass) GstPad *pad; pad = - gst_pad_new_from_template (gst_static_pad_template_get - (&gst_pnmdec_sink_pad_template), "sink"); + gst_pad_new_from_static_template (&gst_pnmdec_sink_pad_template, "sink"); gst_pad_set_chain_function (pad, gst_pnmdec_chain); gst_element_add_pad (GST_ELEMENT (s), pad); - pad = - gst_pad_new_from_template (gst_static_pad_template_get - (&gst_pnmdec_src_pad_template), "src"); + pad = gst_pad_new_from_static_template (&gst_pnmdec_src_pad_template, "src"); gst_element_add_pad (GST_ELEMENT (s), pad); } diff --git a/gst/pnm/gstpnmenc.c b/gst/pnm/gstpnmenc.c index a197e6fe9e..53bd4a3ff5 100644 --- a/gst/pnm/gstpnmenc.c +++ b/gst/pnm/gstpnmenc.c @@ -216,17 +216,13 @@ gst_pnmenc_init (GstPnmenc * s, GstPnmencClass * klass) { GstPad *pad; - pad = - gst_pad_new_from_template (gst_static_pad_template_get - (&sink_pad_template), "sink"); + pad = gst_pad_new_from_static_template (&sink_pad_template, "sink"); gst_pad_set_setcaps_function (pad, gst_pnmenc_setcaps_func_sink); gst_pad_set_chain_function (pad, gst_pnmenc_chain); gst_pad_use_fixed_caps (pad); gst_element_add_pad (GST_ELEMENT (s), pad); - s->src = - gst_pad_new_from_template (gst_static_pad_template_get - (&src_pad_template), "src"); + s->src = gst_pad_new_from_static_template (&src_pad_template, "src"); gst_element_add_pad (GST_ELEMENT (s), s->src); }