[Flac-dev] stream_encoder metadata callback
Joshua Haberman
jhaberman at ups.edu
Fri Aug 17 10:17:27 PDT 2001
Thanks for the quick response on the C++ thing.
It would also be nice if the host program could correctly write the
STREAMINFO block in the stream encoder metadata callback without having
to know the specifics of the header format (or worry about endianness).
How exactly to achieve this might take some thought, but what about this
idea:
1. The correct way to respond to the metadata callback:
i. If this is a seekable stream, seek to the beginning and return
FLAC__STREAM_ENCODER_METADATA_OK (or something).
ii. If this is not a seekable stream, return
FLAC__STREAM_ENCODER_METADATA_NOT_SEEKABLE
2. If the callback indicated that the stream is seekable, FLAC calls
the write callback again, writing 'fLaC' and the STREAMINFO block (and
any seek tables as well).
What do you think?
Joshua
P.S. I don't think I've ever read any code that so shamelessly refuses
to break at 80 chars. :-) Do you have certain settings in your
editor that makes code formatted this way more readable?
--
Joshua Haberman <joshua at haberman.com>
More information about the Flac-dev
mailing list