michael@0: /******************************************************************** michael@0: * * michael@0: * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * michael@0: * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * michael@0: * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * michael@0: * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * michael@0: * * michael@0: * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * michael@0: * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * michael@0: * * michael@0: ******************************************************************** michael@0: michael@0: function: michael@0: last mod: $Id: apiwrapper.h 13596 2007-08-23 20:05:38Z tterribe $ michael@0: michael@0: ********************************************************************/ michael@0: michael@0: #if !defined(_apiwrapper_H) michael@0: # define _apiwrapper_H (1) michael@0: # include michael@0: # include michael@0: # include "theora/theoradec.h" michael@0: # include "theora/theoraenc.h" michael@0: # include "state.h" michael@0: michael@0: typedef struct th_api_wrapper th_api_wrapper; michael@0: typedef struct th_api_info th_api_info; michael@0: michael@0: /*Provide an entry point for the codec setup to clear itself in case we ever michael@0: want to break pieces off into a common base library shared by encoder and michael@0: decoder. michael@0: In addition, this makes several other pieces of the API wrapper cleaner.*/ michael@0: typedef void (*oc_setup_clear_func)(void *_ts); michael@0: michael@0: /*Generally only one of these pointers will be non-NULL in any given instance. michael@0: Technically we do not even really need this struct, since we should be able michael@0: to figure out which one from "context", but doing it this way makes sure we michael@0: don't flub it up.*/ michael@0: struct th_api_wrapper{ michael@0: oc_setup_clear_func clear; michael@0: th_setup_info *setup; michael@0: th_dec_ctx *decode; michael@0: th_enc_ctx *encode; michael@0: }; michael@0: michael@0: struct th_api_info{ michael@0: th_api_wrapper api; michael@0: theora_info info; michael@0: }; michael@0: michael@0: michael@0: void oc_theora_info2th_info(th_info *_info,const theora_info *_ci); michael@0: michael@0: #endif