From 15f4154b6af56989a2c661cb515dad67cc374e3d Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 18 May 2013 14:01:22 -0700 Subject: [PATCH] element-maker: Add transform functions to audiofilter --- tools/element-templates/audiofilter | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tools/element-templates/audiofilter b/tools/element-templates/audiofilter index 01ac322..efd4969 100644 --- a/tools/element-templates/audiofilter +++ b/tools/element-templates/audiofilter @@ -13,10 +13,17 @@ gstreamer-audio-1.0 % prototypes static gboolean gst_replace_setup (GstAudioFilter * filter, const GstAudioInfo * info); +static GstFlowReturn gst_replace_transform (GstBaseTransform * trans, + GstBuffer * inbuf, GstBuffer * outbuf); +static GstFlowReturn gst_replace_transform_ip (GstBaseTransform * trans, + GstBuffer * buf); % declare-class + GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (klass); GstAudioFilterClass *audio_filter_class = GST_AUDIO_FILTER_CLASS (klass); % set-methods audio_filter_class->setup = GST_DEBUG_FUNCPTR (gst_replace_setup); + base_transform_class->transform = GST_DEBUG_FUNCPTR (gst_replace_transform); + base_transform_class->transform_ip = GST_DEBUG_FUNCPTR (gst_replace_transform_ip); % methods static gboolean gst_replace_setup (GstAudioFilter * filter, const GstAudioInfo * info) @@ -27,4 +34,26 @@ gst_replace_setup (GstAudioFilter * filter, const GstAudioInfo * info) return TRUE; } + +/* transform */ +static GstFlowReturn +gst_replace_transform (GstBaseTransform * trans, GstBuffer * inbuf, + GstBuffer * outbuf) +{ + GstReplace *replace = GST_REPLACE (trans); + + GST_DEBUG_OBJECT (replace, "transform"); + + return GST_FLOW_OK; +} + +static GstFlowReturn +gst_replace_transform_ip (GstBaseTransform * trans, GstBuffer * buf) +{ + GstReplace *replace = GST_REPLACE (trans); + + GST_DEBUG_OBJECT (replace, "transform_ip"); + + return GST_FLOW_OK; +} % end -- 2.7.4