/********************************************************************1* *2* THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *3* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *4* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *5* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *6* *7* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *8* by the Xiph.Org Foundation and contributors *9* https://www.xiph.org/ *10* *11********************************************************************1213function:1415********************************************************************/1617#if !defined(_apiwrapper_H)18# define _apiwrapper_H (1)19# include <ogg/ogg.h>20# include <theora/theora.h>21# include "theora/theoradec.h"22# include "theora/theoraenc.h"23# include "state.h"2425typedef struct th_api_wrapper th_api_wrapper;26typedef struct th_api_info th_api_info;2728/*Provide an entry point for the codec setup to clear itself in case we ever29want to break pieces off into a common base library shared by encoder and30decoder.31In addition, this makes several other pieces of the API wrapper cleaner.*/32typedef void (*oc_setup_clear_func)(void *_ts);3334/*Generally only one of these pointers will be non-NULL in any given instance.35Technically we do not even really need this struct, since we should be able36to figure out which one from "context", but doing it this way makes sure we37don't flub it up.*/38struct th_api_wrapper{39oc_setup_clear_func clear;40th_setup_info *setup;41th_dec_ctx *decode;42th_enc_ctx *encode;43};4445struct th_api_info{46th_api_wrapper api;47theora_info info;48};495051void oc_theora_info2th_info(th_info *_info,const theora_info *_ci);5253#endif545556