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
00088 #define TH_DECCTL_SET_TELEMETRY_MBMODE (9)
00089 #define TH_DECCTL_SET_TELEMETRY_MV (11)
00090 #define TH_DECCTL_SET_TELEMETRY_QI (13)
00091 #define TH_DECCTL_SET_TELEMETRY_BITS (15)
00092
00093
00094
00126 typedef void (*th_stripe_decoded_func)(void *_ctx,th_ycbcr_buffer _buf,
00127 int _yfrag0,int _yfrag_end);
00128
00130 typedef struct{
00133 void *ctx;
00135 th_stripe_decoded_func stripe_decoded;
00136 }th_stripe_callback;
00137
00138
00139
00147 typedef struct th_dec_ctx th_dec_ctx;
00154 typedef struct th_setup_info th_setup_info;
00219 extern int th_decode_headerin(th_info *_info,th_comment *_tc,
00220 th_setup_info **_setup,ogg_packet *_op);
00243 extern th_dec_ctx *th_decode_alloc(const th_info *_info,
00244 const th_setup_info *_setup);
00250 extern void th_setup_free(th_setup_info *_setup);
00259 extern int th_decode_ctl(th_dec_ctx *_dec,int _req,void *_buf,
00260 size_t _buf_sz);
00282 extern int th_decode_packetin(th_dec_ctx *_dec,const ogg_packet *_op,
00283 ogg_int64_t *_granpos);
00299 extern int th_decode_ycbcr_out(th_dec_ctx *_dec,
00300 th_ycbcr_buffer _ycbcr);
00303 extern void th_decode_free(th_dec_ctx *_dec);
00306
00307
00308
00309 #if defined(__cplusplus)
00310 }
00311 #endif
00312
00313 #endif