[Matroska-devel] Re: Musepack support
r2d at musepack.net
Fri Feb 8 11:59:08 CET 2008
I Christian, thanks for your answer.
Christian HJ Wiesner a écrit :
I think I prefer this one
> - a very clear spec of the format itself, and the way the audio packets
> should be muxed into matroska, including headers etc.
> - if possible some example code for a demuxer and muxer (for
> mkvextract), preferably in C or C++
The SV8 spec is here :
The only necessary header for playing the stream is the "Stream Header Packet", so this one must be in the codec private data. Other header packets (RG, EI) are not necessary for playing the file, so may be put somewhere else (or not put at all).
The main data packet is the "Audio packet".
For building a seeking table, you will need to read the "Audio block frames" field in the Stream Header Packet, which defines the number of audio frames (1152 samples) per audio packet.
A C implementation of the demuxer is here :
or see libmpcdec in the libmpc svn :
More information about the Matroska-devel