[gst-devel] neutral buffer handling in sparse streams
Wim Taymans
wim.taymans at gmail.com
Wed Oct 3 13:43:16 CEST 2007
On Wed, 2007-10-03 at 08:24 +0200, Stefan Kost wrote:
> hi,
>
> Quoting David Schleef <ds at schleef.org>:
>
> > On Mon, Oct 01, 2007 at 10:33:35PM +0300, Stefan Kost wrote:
> >> So what the way to go?
> >>
> >> 1) use GST_BUFFER_FLAG_GAP and define it as such
> >> btw. its right now only used in
> >> gst-plugins-base/gst/audiorate/gstaudiorate.c to
> >> mark a silent filler-buffer
> >>
> >> 2) add GST_BUFFER_FLAG_NEUTRAL
> >>
> >> 3) segments
> >>
> >> 4) anything else?
> >
> > 5) Push subbuffers of a well-known read-only buffer containing only
> > zeros. (Let's call it gst_buffer_zero.)
> >
> Interesting idea. We could subclass GstBuffer as GstZeroBuffer and
> then elements can check with GST_IS_ZERO_BUFFER.
Problem is that not all formats of silence have 0 bytes (unsigned audio
for example).
I still think a good flag that works for audio, video, text, .. is the
way to go. I have problems with a good name, maybe
GST_BUFFER_FLAG_EMPTY, GST_BUFFER_FLAG_VOID, GST_BUFFER_FLAG_ZERO,
GST_BUFFER_FLAG_DEFAULT?
We don't have much space to add new buffer flags (we can add 3 more):
GST_BUFFER_FLAG_DELTA_UNIT = (GST_MINI_OBJECT_FLAG_LAST << 4),
/* padding */
GST_BUFFER_FLAG_LAST = (GST_MINI_OBJECT_FLAG_LAST << 8)
Another idea is to specify some format specific flags like:
...
GST_BUFFER_FLAG_CUSTOM1 = (GST_MINI_OBJECT_FLAG_LAST << 5),
GST_BUFFER_FLAG_CUSTOM2 = (GST_MINI_OBJECT_FLAG_LAST << 6),
...
And then define what they mean for audio/video. We could need something
like this to mark interlaced video frames. One of those custom flags
could be used to mark 'silent' audio buffers.
Wim
> >
> > I'm not recommending it, just suggesting it as an alternative that we've
> > discussed in the past. It has the minor advantage of being transparent
> > to elements that don't know how to handle it.
> >
> >
> >
> > dave...
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list