Functions for decoding | |
You must link to libtheoradec if you use any of the functions in this section.The functions are listed in the order they are used in a typical decode. The basic steps are:
| |
int | th_decode_headerin (th_info *_info, th_comment *_tc, th_setup_info **_setup, ogg_packet *_op) |
Decodes the header packets of a Theora stream. | |
th_dec_ctx * | th_decode_alloc (const th_info *_info, const th_setup_info *_setup) |
Allocates a decoder instance. | |
void | th_setup_free (th_setup_info *_setup) |
Releases all storage used for the decoder setup information. | |
int | th_decode_ctl (th_dec_ctx *_dec, int _req, void *_buf, size_t _buf_sz) |
Decoder control function. | |
int | th_decode_packetin (th_dec_ctx *_dec, const ogg_packet *_op, ogg_int64_t *_granpos) |
Submits a packet containing encoded video data to the decoder. | |
int | th_decode_ycbcr_out (th_dec_ctx *_dec, th_ycbcr_buffer _ycbcr) |
Outputs the next available frame of decoded Y'CbCr data. | |
void | th_decode_free (th_dec_ctx *_dec) |
Frees an allocated decoder instance. |
|
Allocates a decoder instance.
|
|
Decoder control function. This is used to provide advanced control of the decoding process.
|
|
Frees an allocated decoder instance.
|
|
Decodes the header packets of a Theora stream.
This should be called on the initial packets of the stream, in succession, until it returns
|
|
Submits a packet containing encoded video data to the decoder.
|
|
Outputs the next available frame of decoded Y'CbCr data. If a striped decode callback has been set with TH_DECCTL_SET_STRIPE_CB, then the application does not need to call this function.
|
|
Releases all storage used for the decoder setup information. This should be called after you no longer want to create any decoders for a stream whose headers you have parsed with th_decode_headerin().
|