1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libtheora/lib/apiwrapper.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,54 @@ 1.4 +/******************************************************************** 1.5 + * * 1.6 + * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 1.7 + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 1.8 + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 1.9 + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 1.10 + * * 1.11 + * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 1.12 + * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * 1.13 + * * 1.14 + ******************************************************************** 1.15 + 1.16 + function: 1.17 + last mod: $Id: apiwrapper.h 13596 2007-08-23 20:05:38Z tterribe $ 1.18 + 1.19 + ********************************************************************/ 1.20 + 1.21 +#if !defined(_apiwrapper_H) 1.22 +# define _apiwrapper_H (1) 1.23 +# include <ogg/ogg.h> 1.24 +# include <theora/theora.h> 1.25 +# include "theora/theoradec.h" 1.26 +# include "theora/theoraenc.h" 1.27 +# include "state.h" 1.28 + 1.29 +typedef struct th_api_wrapper th_api_wrapper; 1.30 +typedef struct th_api_info th_api_info; 1.31 + 1.32 +/*Provide an entry point for the codec setup to clear itself in case we ever 1.33 + want to break pieces off into a common base library shared by encoder and 1.34 + decoder. 1.35 + In addition, this makes several other pieces of the API wrapper cleaner.*/ 1.36 +typedef void (*oc_setup_clear_func)(void *_ts); 1.37 + 1.38 +/*Generally only one of these pointers will be non-NULL in any given instance. 1.39 + Technically we do not even really need this struct, since we should be able 1.40 + to figure out which one from "context", but doing it this way makes sure we 1.41 + don't flub it up.*/ 1.42 +struct th_api_wrapper{ 1.43 + oc_setup_clear_func clear; 1.44 + th_setup_info *setup; 1.45 + th_dec_ctx *decode; 1.46 + th_enc_ctx *encode; 1.47 +}; 1.48 + 1.49 +struct th_api_info{ 1.50 + th_api_wrapper api; 1.51 + theora_info info; 1.52 +}; 1.53 + 1.54 + 1.55 +void oc_theora_info2th_info(th_info *_info,const theora_info *_ci); 1.56 + 1.57 +#endif