mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 07:08:23 +00:00
element-maker: Add transform functions to audiofilter
This commit is contained in:
parent
35018ae632
commit
15f4154b6a
1 changed files with 29 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue