[gstreamer-bugs] [Bug 340492] [flacdec] should work push-based as well

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sat Jun 17 04:44:32 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=340492
 GStreamer | gst-plugins-good | Ver: 0.10.3


Tim-Philipp Müller changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #67168|none                        |commented-on
               Flag|                            |




------- Comment #7 from Tim-Philipp Müller  2006-06-17 11:44 UTC -------
> this works, and streams flac over daap successfully. not sure I've caught all
> the corner cases yet. Review appreciated.

Haven't tried it with DAAP, but the patch doesn't really work too well for me
in other (unframed) chain-based mode, like in a simple

 gst-launch-0.10 filesrc location=foo.flac ! queue ! flacdec ! fakesink

This is mostly due the somewhat odd way the libflac stream decoder operates, I
think. Your patch is in essence very similar to what I had originally, only our
chain function logic is a bit different.

The problem I ran into is this: there doesn't seem to be a way to tell the flac
decoder 'I currently don't have more data, let's stop for now and I'll give it
to you later'. If the flac stream decoder doesn't get as much data as it wants
it will call the read call back again and again until you either error out
(which affects the decoder state) or give it all the data it wants.

So in my case above the decoder will (at least in my combination of source
file/library version) ask for ~64kB of data after it's gone through the
headers. In your chain function logic, if there isn't that much data in the
adapter, you bail out with ABORT and then call Flac__stream_decoder_flush(),
which effectively discards all bytes the decoder has already read, no?

In any case, what seems to work for me is to only call
Flac__stream_decoder_process_single() if we have at least FLAC__MAX_BLOCK_SIZE
bytes in the adapter.

Anyway, I've merged your patch into mine (you had some things I forgot about,
like the DISCONT buffer flag handling and did some things nicer) and will
attach it so you can test it with DAAP.

(btw, the void * trick for the callbacks unfortunately didn't work for me - my
compiler still complains about wrong callback signatures with those, hence the
ugly wrappers).


-- 
Configure bugmail: http://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