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