Recognizes if input is ogg or not.
[xiph.git] / xiph-qt / Theora / src / encoder_types.h
blob75a01486f5f4e4c1e80cd1eaee136bab7328b480
1 /*
2 * encoder_types.h
4 * Definitions of TheoraEncoder data structures.
7 * Copyright (c) 2006 Arek Korbik
9 * This file is part of XiphQT, the Xiph QuickTime Components.
11 * XiphQT is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
16 * XiphQT is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with XiphQT; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 * Last modified: $Id$
31 #if !defined(__encoder_types_h__)
32 #define __encoder_types_h__
34 #if defined(__APPLE_CC__)
35 #include <QuickTime/QuickTime.h>
36 #else
37 #include <QuickTimeComponents.h>
39 #if defined(TARGET_OS_WIN32)
40 #define _WINIOCTL_
41 #include <windows.h>
42 #endif
43 #endif /* __APPLE_CC__ */
45 #if defined(__APPLE_CC__)
46 #include <Theora/theora.h>
47 #else
48 #include <theora.h>
49 #endif /* __APPLE_CC__ */
52 // Constants
53 //const UInt8 kNumPixelFormatsSupported = 2;
54 //const UInt32 kPacketBufferAllocIncrement = 64 * 1024;
56 // Data structures
57 typedef struct {
58 ComponentInstance self;
59 ComponentInstance target;
61 ICMCompressorSessionRef session;
62 ICMCompressionSessionOptionsRef sessionOptions;
64 theora_info ti;
65 theora_comment tc;
66 theora_state ts;
68 Boolean info_initialised;
69 long last_frame;
71 /* packet buffer information */
72 UInt8* p_buffer;
73 UInt32 p_buffer_len;
74 UInt32 p_buffer_used;
76 long width;
77 long height;
78 size_t maxEncodedDataSize;
79 int nextDecodeNumber;
81 //struct InternalPixelBuffer currentFrame;
82 yuv_buffer yuv;
83 UInt8 *yuv_buffer;
84 UInt32 yuv_buffer_size;
86 /* ========================= */
87 int keyFrameCountDown;
89 /* ======= settings ======== */
90 CodecQ set_quality;
91 UInt32 set_fps_numer;
92 UInt32 set_fps_denom;
93 UInt32 set_bitrate;
94 UInt32 set_keyrate;
96 UInt16 set_sharp;
97 UInt16 set_quick;
98 } TheoraGlobals, *TheoraGlobalsPtr;
100 #endif /* __decoder_types_h__ */