[Bug 597822] Add removesilence plugin

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri May 27 19:01:21 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=597822
  GStreamer | gst-plugins-bad | git

--- Comment #15 from tiagokatcipis at gmail.com 2011-05-28 02:01:03 UTC ---
> Wrong order of flags, first PLUGINS_BASE, then BASE then GST (for LIBS and CFLAGS)

I'm going to fix that

> I think you want BYTE_ORDER instead of endianness=1234 here

Ill fix that too.

> Why don't you use GstBaseTransform or GstAudioFilter as base class? You can drop buffers by returning GST_BASE_TRANSFORM_FLOW_DROPPED from the transform/transform_ip vfunc and it will handle many things for you and make everything easier.

This was one of my first plugins, i didn't knew GstBaseTransform yet. I will
rewrite it as a gstAudioFilter.


> Don't use long/ulong in public API, better use guint64 here

I will change it to guint64.

> Not every buffer has timestamps, it can also be GST_CLOCK_TIME_NONE (i.e. -1). Also I think this code doesn't make much sense

On the time i wrote it i didn't have idea that was possible. I'm going to fix
that. This was made to avoid a problem that i had, the objective of the plugin
is to remove the silence periods, but produce a continuous stream (no gaps on
the timestamps), if a buffer is silence, it is dropped, but the drop will not
appear on downstream elements because the plugin corrects the timestamps on the
buffers, so it seems that no buffer was dropped and the audio is perfect, only
without the silences. Using GstAudioFilter and returning
GST_BASE_TRANSFORM_FLOW_DROPPED will give this same behaviour ?

> You should set the DISCONT flag on the next buffer that is pushed downstream. Also you need to send filler newsegment events downstream if there's a too big duration of silence. Also, an optional mode to just set the GAP flag on silence buffers instead of dropping them would be good.

This would give me the behaviour that i described before? the idea was to
exactly fool the downstream elements, so they think that no buffer was dropped.


> Why do you keep track of the timestamps?

To create the behaviour i described before, but based on the corrections you
proposed it seems that it is a better way to do this (i never liked this
timestamp stuff, but i didn't think on other idea that behaved like i wanted)


> Please add the struct definitions to the header to make gtk-doc happy

i will.

> Please try to use GLib types here, gint16 instead of short, etc. Same for
vad_private.c

Thanks for all your suggestions, i will apply them ASAP.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gstreamer-bugs mailing list