diff options
author | Edward Hervey <bilboed@bilboed.com> | 2008-12-13 15:34:01 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2008-12-13 15:34:01 +0000 |
commit | 5ad613d9b97d412d657d64a25ec2ab34e964a532 (patch) | |
tree | 5fd3e37d77851d3bfca5594aeb757af04cf0f756 /gst/law/mulaw-decode.c | |
parent | 57d97b4cbf02f143905ab4898da04810ebdf4a2b (diff) |
Switch to using GstStaticPadTemplate.
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_dec_base_init),
(gst_flac_dec_init):
* gst/law/alaw-decode.c: (gst_alaw_dec_base_init),
(gst_alaw_dec_init):
* gst/law/alaw-encode.c: (gst_alaw_enc_base_init),
(gst_alaw_enc_init):
* gst/law/alaw.c: (plugin_init):
* gst/law/mulaw-decode.c: (gst_mulawdec_base_init),
(gst_mulawdec_init):
* gst/law/mulaw-encode.c: (gst_mulawenc_base_init),
(gst_mulawenc_init):
* gst/law/mulaw.c: (plugin_init):
Switch to using GstStaticPadTemplate.
* gst/udp/gstudpnetutils.c: (gst_udp_get_addr):
Don't forget to free the addrinfo structure.
* gst/wavparse/gstwavparse.c: (gst_wavparse_reset),
(gst_wavparse_sink_activate):
Don't forget to unref the GstAdapter.
Diffstat (limited to 'gst/law/mulaw-decode.c')
-rw-r--r-- | gst/law/mulaw-decode.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c index 46232d35..fb40f18b 100644 --- a/gst/law/mulaw-decode.c +++ b/gst/law/mulaw-decode.c @@ -24,7 +24,8 @@ #include "mulaw-decode.h" #include "mulaw-conversion.h" -extern GstPadTemplate *mulawdec_src_template, *mulawdec_sink_template; +extern GstStaticPadTemplate mulaw_dec_src_factory; +extern GstStaticPadTemplate mulaw_dec_sink_factory; /* Stereo signals and args */ enum @@ -117,8 +118,10 @@ gst_mulawdec_base_init (GstMuLawDecClass * klass) "Convert 8bit mu law to 16bit PCM", "Zaheer Abbas Merali <zaheerabbas at merali dot org>"); - gst_element_class_add_pad_template (element_class, mulawdec_src_template); - gst_element_class_add_pad_template (element_class, mulawdec_sink_template); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&mulaw_dec_src_factory)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&mulaw_dec_sink_factory)); gst_element_class_set_details (element_class, &mulawdec_details); } @@ -136,12 +139,13 @@ static void gst_mulawdec_init (GstMuLawDec * mulawdec) { mulawdec->sinkpad = - gst_pad_new_from_template (mulawdec_sink_template, "sink"); + gst_pad_new_from_static_template (&mulaw_dec_sink_factory, "sink"); gst_pad_set_setcaps_function (mulawdec->sinkpad, mulawdec_sink_setcaps); gst_pad_set_chain_function (mulawdec->sinkpad, gst_mulawdec_chain); gst_element_add_pad (GST_ELEMENT (mulawdec), mulawdec->sinkpad); - mulawdec->srcpad = gst_pad_new_from_template (mulawdec_src_template, "src"); + mulawdec->srcpad = + gst_pad_new_from_static_template (&mulaw_dec_src_factory, "src"); gst_pad_use_fixed_caps (mulawdec->srcpad); gst_element_add_pad (GST_ELEMENT (mulawdec), mulawdec->srcpad); } |