From: Sebastian Dröge Date: Fri, 19 Aug 2011 08:06:39 +0000 (+0200) Subject: audiofilter: Pass a const pointer to the audio format info to ::setup() X-Git-Tag: 1.19.3~511^2~7349 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85a3e7c98c4f459ebe5a908482c621689e122075;p=platform%2Fupstream%2Fgstreamer.git audiofilter: Pass a const pointer to the audio format info to ::setup() It is not meant to be changed by the subclass. --- diff --git a/gst-libs/gst/audio/gstaudiofilter.h b/gst-libs/gst/audio/gstaudiofilter.h index 5f4b656..acbdb1d 100644 --- a/gst-libs/gst/audio/gstaudiofilter.h +++ b/gst-libs/gst/audio/gstaudiofilter.h @@ -78,7 +78,7 @@ struct _GstAudioFilterClass { GstBaseTransformClass basetransformclass; /* virtual function, called whenever the format changes */ - gboolean (*setup) (GstAudioFilter * filter, GstAudioInfo * info); + gboolean (*setup) (GstAudioFilter * filter, const GstAudioInfo * info); /*< private >*/ gpointer _gst_reserved[GST_PADDING]; diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index bf76863..3e792f5 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -130,7 +130,8 @@ static void volume_before_transform (GstBaseTransform * base, static GstFlowReturn volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf); static gboolean volume_stop (GstBaseTransform * base); -static gboolean volume_setup (GstAudioFilter * filter, GstAudioInfo * info); +static gboolean volume_setup (GstAudioFilter * filter, + const GstAudioInfo * info); static void volume_process_double (GstVolume * self, gpointer bytes, guint n_bytes); @@ -721,7 +722,7 @@ volume_process_controlled_int8_clamp (GstVolume * self, gpointer bytes, /* get notified of caps and plug in the correct process function */ static gboolean -volume_setup (GstAudioFilter * filter, GstAudioInfo * info) +volume_setup (GstAudioFilter * filter, const GstAudioInfo * info) { gboolean res; GstVolume *self = GST_VOLUME (filter);