theoradec.h
Go to the documentation of this file.
/********************************************************************
* *
* THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function:
last mod: $Id: theora.h,v 1.8 2004/03/15 22:17:32 derf Exp $
********************************************************************/
#if !defined(_O_THEORA_THEORADEC_H_)
# define _O_THEORA_THEORADEC_H_ (1)
# include <stddef.h>
# include <ogg/ogg.h>
# include "codec.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define TH_DECCTL_GET_PPLEVEL_MAX (1)
#define TH_DECCTL_SET_PPLEVEL (3)
#define TH_DECCTL_SET_GRANPOS (5)
#define TH_DECCTL_SET_STRIPE_CB (7)
#define TH_DECCTL_SET_TELEMETRY_MBMODE (9)
#define TH_DECCTL_SET_TELEMETRY_MV (11)
#define TH_DECCTL_SET_TELEMETRY_QI (13)
#define TH_DECCTL_SET_TELEMETRY_BITS (15)
typedef void (*th_stripe_decoded_func)(void *_ctx,th_ycbcr_buffer _buf,
int _yfrag0,int _yfrag_end);
typedef struct{
void *ctx;
th_stripe_decoded_func stripe_decoded;
}th_stripe_callback;
typedef struct th_dec_ctx th_dec_ctx;
typedef struct th_setup_info th_setup_info;
extern int th_decode_headerin(th_info *_info,th_comment *_tc,
th_setup_info **_setup,ogg_packet *_op);
extern th_dec_ctx *th_decode_alloc(const th_info *_info,
const th_setup_info *_setup);
extern void th_setup_free(th_setup_info *_setup);
extern int th_decode_ctl(th_dec_ctx *_dec,int _req,void *_buf,
size_t _buf_sz);
extern int th_decode_packetin(th_dec_ctx *_dec,const ogg_packet *_op,
ogg_int64_t *_granpos);
extern int th_decode_ycbcr_out(th_dec_ctx *_dec,
th_ycbcr_buffer _ycbcr);
extern void th_decode_free(th_dec_ctx *_dec);
#if defined(__cplusplus)
}
#endif
#endif
th_info
Theora bitstream information.
Definition: codec.h:204
th_comment
The comment information.
Definition: codec.h:323
th_decode_alloc
th_dec_ctx * th_decode_alloc(const th_info *_info, const th_setup_info *_setup)
Allocates a decoder instance.
th_stripe_decoded_func
void(* th_stripe_decoded_func)(void *_ctx, th_ycbcr_buffer _buf, int _yfrag0, int _yfrag_end)
A callback function for striped decode.
Definition: theoradec.h:138
codec.h
The shared libtheoradec and libtheoraenc C API.
th_decode_ctl
int th_decode_ctl(th_dec_ctx *_dec, int _req, void *_buf, size_t _buf_sz)
Decoder control function.
th_decode_free
void th_decode_free(th_dec_ctx *_dec)
Frees an allocated decoder instance.
th_stripe_callback::ctx
void * ctx
An application-provided context pointer.
Definition: theoradec.h:145
th_setup_free
void th_setup_free(th_setup_info *_setup)
Releases all storage used for the decoder setup information.
th_setup_info
struct th_setup_info th_setup_info
Setup information.
Definition: theoradec.h:166
th_ycbcr_buffer
th_img_plane th_ycbcr_buffer[3]
A complete image buffer for an uncompressed frame.
Definition: codec.h:168
th_decode_ycbcr_out
int th_decode_ycbcr_out(th_dec_ctx *_dec, th_ycbcr_buffer _ycbcr)
Outputs the next available frame of decoded Y&#39;CbCr data.
th_stripe_callback::stripe_decoded
th_stripe_decoded_func stripe_decoded
The callback function pointer.
Definition: theoradec.h:147
th_decode_headerin
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
struct th_dec_ctx th_dec_ctx
The decoder context.
Definition: theoradec.h:159
th_decode_packetin
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.
th_stripe_callback
The striped decode callback data to pass to TH_DECCTL_SET_STRIPE_CB.
Definition: theoradec.h:142