libkate is an implementation of a codec for the Kate bitstream format.
The Kate bitstream format is a timed text codec designed for embedding in an Ogg bitstream. It was originally designed for karaoke and text. The Kate bitstream format is documented here.
libkate is thread safe, with the usual caveat that a single thread accesses a given kate stream at the same time (eg, two different threads may use libkate at the same time, provided they access two different streams).
A commented high level decoding example.
A commented decoding example.
A commented encoding example.