00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00021 #if !defined(_O_THEORA_THEORADEC_H_)
00022 # define _O_THEORA_THEORADEC_H_ (1)
00023 # include <stddef.h>
00024 # include <ogg/ogg.h>
00025 # include "codec.h"
00026
00027 #if defined(__cplusplus)
00028 extern "C" {
00029 #endif
00030
00031
00032
00046 #define TH_DECCTL_GET_PPLEVEL_MAX (1)
00047
00059 #define TH_DECCTL_SET_PPLEVEL (3)
00060
00071 #define TH_DECCTL_SET_GRANPOS (5)
00072
00085 #define TH_DECCTL_SET_STRIPE_CB (7)
00086
00121 typedef void (*th_stripe_decoded_func)(void *_ctx,th_ycbcr_buffer _buf,
00122 int _yfrag0,int _yfrag_end);
00123
00125 typedef struct{
00128 void *ctx;
00130 th_stripe_decoded_func stripe_decoded;
00131 }th_stripe_callback;
00132
00133
00134
00142 typedef struct th_dec_ctx th_dec_ctx;
00149 typedef struct th_setup_info th_setup_info;
00214 extern int th_decode_headerin(th_info *_info,th_comment *_tc,
00215 th_setup_info **_setup,ogg_packet *_op);
00238 extern th_dec_ctx *th_decode_alloc(const th_info *_info,
00239 const th_setup_info *_setup);
00245 extern void th_setup_free(th_setup_info *_setup);
00254 extern int th_decode_ctl(th_dec_ctx *_dec,int _req,void *_buf,
00255 size_t _buf_sz);
00277 extern int th_decode_packetin(th_dec_ctx *_dec,const ogg_packet *_op,
00278 ogg_int64_t *_granpos);
00293 extern int th_decode_ycbcr_out(th_dec_ctx *_dec,
00294 th_ycbcr_buffer _ycbcr);
00297 extern void th_decode_free(th_dec_ctx *_dec);
00300
00301
00302
00303 #if defined(__cplusplus)
00304 }
00305 #endif
00306
00307 #endif