From 0a8cb9cef9c18f4d293224f17b68ead75d7d3f16 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 4 Jan 2004 12:14:37 +0000 Subject: [PATCH] gst/wavenc/gstwavenc.c: Fix indenting, fix pad creation. Original commit message from CVS: 2004-01-04 Ronald Bultje * gst/wavenc/gstwavenc.c: (set_property), (gst_wavenc_init): Fix indenting, fix pad creation. --- ChangeLog | 5 +++++ gst/wavenc/gstwavenc.c | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6c23d8..ea57469 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-01-04 Ronald Bultje + * gst/wavenc/gstwavenc.c: (set_property), (gst_wavenc_init): + Fix indenting, fix pad creation. + +2004-01-04 Ronald Bultje + * ext/xvid/gstxviddec.c: (gst_xviddec_init), (gst_xviddec_src_getcaps), (gst_xviddec_src_link), (gst_xviddec_sink_link): diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c index 769c95e..98a5b6c 100644 --- a/gst/wavenc/gstwavenc.c +++ b/gst/wavenc/gstwavenc.c @@ -76,8 +76,6 @@ static GstElementDetails gst_wavenc_details = GST_ELEMENT_DETAILS ( "Iain Holmes " ); -static GstPadTemplate *srctemplate, *sinktemplate; - static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( "sink", @@ -154,9 +152,9 @@ gst_wavenc_change_state (GstElement *element) static void set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) + guint prop_id, + const GValue *value, + GParamSpec *pspec) { GstWavEnc *enc; @@ -283,12 +281,16 @@ gst_wavenc_stop_file (GstWavEnc *wavenc) static void gst_wavenc_init (GstWavEnc *wavenc) { - wavenc->sinkpad = gst_pad_new_from_template (sinktemplate, "sink"); + GstElementClass *klass = GST_ELEMENT_GET_CLASS (wavenc); + + wavenc->sinkpad = gst_pad_new_from_template ( + gst_element_class_get_pad_template (klass, "sink"), "sink"); gst_element_add_pad (GST_ELEMENT (wavenc), wavenc->sinkpad); gst_pad_set_chain_function (wavenc->sinkpad, gst_wavenc_chain); gst_pad_set_link_function (wavenc->sinkpad, gst_wavenc_sinkconnect); - wavenc->srcpad = gst_pad_new_from_template (srctemplate, "src"); + wavenc->srcpad = gst_pad_new_from_template ( + gst_element_class_get_pad_template (klass, "src"), "src"); gst_element_add_pad (GST_ELEMENT (wavenc), wavenc->srcpad); wavenc->setup = FALSE; -- 2.7.4