|
1 /******************************************************************** |
|
2 * * |
|
3 * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * |
|
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
7 * * |
|
8 * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * |
|
9 * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * |
|
10 * * |
|
11 ******************************************************************** |
|
12 |
|
13 function: |
|
14 last mod: $Id: apiwrapper.h 13596 2007-08-23 20:05:38Z tterribe $ |
|
15 |
|
16 ********************************************************************/ |
|
17 |
|
18 #if !defined(_apiwrapper_H) |
|
19 # define _apiwrapper_H (1) |
|
20 # include <ogg/ogg.h> |
|
21 # include <theora/theora.h> |
|
22 # include "theora/theoradec.h" |
|
23 # include "theora/theoraenc.h" |
|
24 # include "state.h" |
|
25 |
|
26 typedef struct th_api_wrapper th_api_wrapper; |
|
27 typedef struct th_api_info th_api_info; |
|
28 |
|
29 /*Provide an entry point for the codec setup to clear itself in case we ever |
|
30 want to break pieces off into a common base library shared by encoder and |
|
31 decoder. |
|
32 In addition, this makes several other pieces of the API wrapper cleaner.*/ |
|
33 typedef void (*oc_setup_clear_func)(void *_ts); |
|
34 |
|
35 /*Generally only one of these pointers will be non-NULL in any given instance. |
|
36 Technically we do not even really need this struct, since we should be able |
|
37 to figure out which one from "context", but doing it this way makes sure we |
|
38 don't flub it up.*/ |
|
39 struct th_api_wrapper{ |
|
40 oc_setup_clear_func clear; |
|
41 th_setup_info *setup; |
|
42 th_dec_ctx *decode; |
|
43 th_enc_ctx *encode; |
|
44 }; |
|
45 |
|
46 struct th_api_info{ |
|
47 th_api_wrapper api; |
|
48 theora_info info; |
|
49 }; |
|
50 |
|
51 |
|
52 void oc_theora_info2th_info(th_info *_info,const theora_info *_ci); |
|
53 |
|
54 #endif |