| 1 |
/* Copyright: © Copyright 2004 Apple Computer, Inc. All rights reserved. |
|---|
| 2 |
|
|---|
| 3 |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. |
|---|
| 4 |
("Apple") in consideration of your agreement to the following terms, and your |
|---|
| 5 |
use, installation, modification or redistribution of this Apple software |
|---|
| 6 |
constitutes acceptance of these terms. If you do not agree with these terms, |
|---|
| 7 |
please do not use, install, modify or redistribute this Apple software. |
|---|
| 8 |
|
|---|
| 9 |
In consideration of your agreement to abide by the following terms, and subject |
|---|
| 10 |
to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs |
|---|
| 11 |
copyrights in this original Apple software (the "Apple Software"), to use, |
|---|
| 12 |
reproduce, modify and redistribute the Apple Software, with or without |
|---|
| 13 |
modifications, in source and/or binary forms; provided that if you redistribute |
|---|
| 14 |
the Apple Software in its entirety and without modifications, you must retain |
|---|
| 15 |
this notice and the following text and disclaimers in all such redistributions of |
|---|
| 16 |
the Apple Software. Neither the name, trademarks, service marks or logos of |
|---|
| 17 |
Apple Computer, Inc. may be used to endorse or promote products derived from the |
|---|
| 18 |
Apple Software without specific prior written permission from Apple. Except as |
|---|
| 19 |
expressly stated in this notice, no other rights or licenses, express or implied, |
|---|
| 20 |
are granted by Apple herein, including but not limited to any patent rights that |
|---|
| 21 |
may be infringed by your derivative works or by other works in which the Apple |
|---|
| 22 |
Software may be incorporated. |
|---|
| 23 |
|
|---|
| 24 |
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO |
|---|
| 25 |
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED |
|---|
| 26 |
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|---|
| 27 |
PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN |
|---|
| 28 |
COMBINATION WITH YOUR PRODUCTS. |
|---|
| 29 |
|
|---|
| 30 |
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR |
|---|
| 31 |
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
|---|
| 32 |
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
|---|
| 33 |
ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION |
|---|
| 34 |
OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT |
|---|
| 35 |
(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN |
|---|
| 36 |
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|---|
| 37 |
*/ |
|---|
| 38 |
/*============================================================================= |
|---|
| 39 |
ACCodecDispatchTypes.h |
|---|
| 40 |
|
|---|
| 41 |
=============================================================================*/ |
|---|
| 42 |
#if !defined(__ACCodecDispatchTypes_h__) |
|---|
| 43 |
#define __ACCodecDispatchTypes_h__ |
|---|
| 44 |
|
|---|
| 45 |
//============================================================================= |
|---|
| 46 |
// Includes |
|---|
| 47 |
//============================================================================= |
|---|
| 48 |
|
|---|
| 49 |
// note that AudioCodec.h needs to be included prior to including this file |
|---|
| 50 |
#if !defined(__AudioCodec_h__) |
|---|
| 51 |
#error AudioCodec.h needs to be included prior to including this file |
|---|
| 52 |
#endif |
|---|
| 53 |
|
|---|
| 54 |
//============================================================================= |
|---|
| 55 |
// Parameter Blocks for AudioCodec Component Routines |
|---|
| 56 |
// |
|---|
| 57 |
// Note that the arguments for all the AudioCodec component routines are |
|---|
| 58 |
// 4 bytes in size (assuming pointers are 4 bytes). This means that even on |
|---|
| 59 |
// Windows (where all arguments are forced into SInt32s), we can get away with |
|---|
| 60 |
// mass casting the argument list through the appropriate paramblock structure. |
|---|
| 61 |
// This gets around the fact that the component glue passes the arguments in |
|---|
| 62 |
// a different order depending on the platform and therefore makes writing the |
|---|
| 63 |
// calling glue and the dispatcher much simpler. |
|---|
| 64 |
//============================================================================= |
|---|
| 65 |
|
|---|
| 66 |
#if PRAGMA_STRUCT_ALIGN |
|---|
| 67 |
#pragma options align=mac68k |
|---|
| 68 |
#elif PRAGMA_STRUCT_PACKPUSH |
|---|
| 69 |
#pragma pack(push, 2) |
|---|
| 70 |
#elif PRAGMA_STRUCT_PACK |
|---|
| 71 |
#pragma pack(2) |
|---|
| 72 |
#endif |
|---|
| 73 |
|
|---|
| 74 |
#define AudioCodecStandardGluePBFields UInt8 componentFlags; UInt8 componentParamSize; SInt16 componentWhat |
|---|
| 75 |
|
|---|
| 76 |
#if !TARGET_OS_WIN32 |
|---|
| 77 |
struct AudioCodecOpenGluePB { |
|---|
| 78 |
AudioCodecStandardGluePBFields; |
|---|
| 79 |
AudioCodec inCodec; |
|---|
| 80 |
void* unused; |
|---|
| 81 |
}; |
|---|
| 82 |
#else |
|---|
| 83 |
struct AudioCodecOpenGluePB { |
|---|
| 84 |
AudioCodecStandardGluePBFields; |
|---|
| 85 |
AudioCodec inCodec; |
|---|
| 86 |
}; |
|---|
| 87 |
#endif |
|---|
| 88 |
typedef struct AudioCodecOpenGluePB AudioCodecOpenGluePB; |
|---|
| 89 |
|
|---|
| 90 |
#if !TARGET_OS_WIN32 |
|---|
| 91 |
struct AudioCodecGetPropertyInfoGluePB |
|---|
| 92 |
{ |
|---|
| 93 |
AudioCodecStandardGluePBFields; |
|---|
| 94 |
Boolean* outWritable; |
|---|
| 95 |
UInt32* outSize; |
|---|
| 96 |
AudioCodecPropertyID inPropertyID; |
|---|
| 97 |
AudioCodec inCodec; |
|---|
| 98 |
}; |
|---|
| 99 |
#else |
|---|
| 100 |
struct AudioCodecGetPropertyInfoGluePB |
|---|
| 101 |
{ |
|---|
| 102 |
AudioCodecStandardGluePBFields; |
|---|
| 103 |
AudioCodecPropertyID inPropertyID; |
|---|
| 104 |
UInt32* outSize; |
|---|
| 105 |
Boolean* outWritable; |
|---|
| 106 |
}; |
|---|
| 107 |
#endif |
|---|
| 108 |
typedef struct AudioCodecGetPropertyInfoGluePB AudioCodecGetPropertyInfoGluePB; |
|---|
| 109 |
|
|---|
| 110 |
#if !TARGET_OS_WIN32 |
|---|
| 111 |
struct AudioCodecGetPropertyGluePB |
|---|
| 112 |
{ |
|---|
| 113 |
AudioCodecStandardGluePBFields; |
|---|
| 114 |
void* outPropertyData; |
|---|
| 115 |
UInt32* ioPropertyDataSize; |
|---|
| 116 |
AudioCodecPropertyID inPropertyID; |
|---|
| 117 |
AudioCodec inCodec; |
|---|
| 118 |
}; |
|---|
| 119 |
#else |
|---|
| 120 |
struct AudioCodecGetPropertyGluePB |
|---|
| 121 |
{ |
|---|
| 122 |
AudioCodecStandardGluePBFields; |
|---|
| 123 |
AudioCodecPropertyID inPropertyID; |
|---|
| 124 |
UInt32* ioPropertyDataSize; |
|---|
| 125 |
void* outPropertyData; |
|---|
| 126 |
}; |
|---|
| 127 |
#endif |
|---|
| 128 |
typedef struct AudioCodecGetPropertyGluePB AudioCodecGetPropertyGluePB; |
|---|
| 129 |
|
|---|
| 130 |
#if !TARGET_OS_WIN32 |
|---|
| 131 |
struct AudioCodecSetPropertyGluePB |
|---|
| 132 |
{ |
|---|
| 133 |
AudioCodecStandardGluePBFields; |
|---|
| 134 |
const void* inPropertyData; |
|---|
| 135 |
UInt32 inPropertyDataSize; |
|---|
| 136 |
AudioCodecPropertyID inPropertyID; |
|---|
| 137 |
AudioCodec inCodec; |
|---|
| 138 |
}; |
|---|
| 139 |
#else |
|---|
| 140 |
struct AudioCodecSetPropertyGluePB |
|---|
| 141 |
{ |
|---|
| 142 |
AudioCodecStandardGluePBFields; |
|---|
| 143 |
AudioCodecPropertyID inPropertyID; |
|---|
| 144 |
UInt32 inPropertyDataSize; |
|---|
| 145 |
const void* inPropertyData; |
|---|
| 146 |
}; |
|---|
| 147 |
#endif |
|---|
| 148 |
typedef struct AudioCodecSetPropertyGluePB AudioCodecSetPropertyGluePB; |
|---|
| 149 |
|
|---|
| 150 |
#if !TARGET_OS_WIN32 |
|---|
| 151 |
struct AudioCodecInitializeGluePB |
|---|
| 152 |
{ |
|---|
| 153 |
AudioCodecStandardGluePBFields; |
|---|
| 154 |
UInt32 inMagicCookieByteSize; |
|---|
| 155 |
const void* inMagicCookie; |
|---|
| 156 |
const AudioStreamBasicDescription* inOutputFormat; |
|---|
| 157 |
const AudioStreamBasicDescription* inInputFormat; |
|---|
| 158 |
AudioCodec inCodec; |
|---|
| 159 |
}; |
|---|
| 160 |
#else |
|---|
| 161 |
struct AudioCodecInitializeGluePB |
|---|
| 162 |
{ |
|---|
| 163 |
AudioCodecStandardGluePBFields; |
|---|
| 164 |
const AudioStreamBasicDescription* inInputFormat; |
|---|
| 165 |
const AudioStreamBasicDescription* inOutputFormat; |
|---|
| 166 |
const void* inMagicCookie; |
|---|
| 167 |
UInt32 inMagicCookieByteSize; |
|---|
| 168 |
}; |
|---|
| 169 |
#endif |
|---|
| 170 |
typedef struct AudioCodecInitializeGluePB AudioCodecInitializeGluePB; |
|---|
| 171 |
|
|---|
| 172 |
#if !TARGET_OS_WIN32 |
|---|
| 173 |
struct AudioCodecUninitializeGluePB |
|---|
| 174 |
{ |
|---|
| 175 |
AudioCodecStandardGluePBFields; |
|---|
| 176 |
AudioCodec inCodec; |
|---|
| 177 |
}; |
|---|
| 178 |
#else |
|---|
| 179 |
struct AudioCodecUninitializeGluePB |
|---|
| 180 |
{ |
|---|
| 181 |
AudioCodecStandardGluePBFields; |
|---|
| 182 |
}; |
|---|
| 183 |
#endif |
|---|
| 184 |
typedef struct AudioCodecUninitializeGluePB AudioCodecUninitializeGluePB; |
|---|
| 185 |
|
|---|
| 186 |
#if !TARGET_OS_WIN32 |
|---|
| 187 |
struct AudioCodecAppendInputDataGluePB |
|---|
| 188 |
{ |
|---|
| 189 |
AudioCodecStandardGluePBFields; |
|---|
| 190 |
const AudioStreamPacketDescription* inPacketDescription; |
|---|
| 191 |
UInt32* ioNumberPackets; |
|---|
| 192 |
UInt32* ioInputDataByteSize; |
|---|
| 193 |
const void* inInputData; |
|---|
| 194 |
AudioCodec inCodec; |
|---|
| 195 |
}; |
|---|
| 196 |
#else |
|---|
| 197 |
struct AudioCodecAppendInputDataGluePB |
|---|
| 198 |
{ |
|---|
| 199 |
AudioCodecStandardGluePBFields; |
|---|
| 200 |
const void* inInputData; |
|---|
| 201 |
UInt32* ioInputDataByteSize; |
|---|
| 202 |
UInt32* ioNumberPackets; |
|---|
| 203 |
const AudioStreamPacketDescription* inPacketDescription; |
|---|
| 204 |
}; |
|---|
| 205 |
#endif |
|---|
| 206 |
typedef struct AudioCodecAppendInputDataGluePB AudioCodecAppendInputDataGluePB; |
|---|
| 207 |
|
|---|
| 208 |
#if !TARGET_OS_WIN32 |
|---|
| 209 |
struct AudioCodecProduceOutputPacketsGluePB |
|---|
| 210 |
{ |
|---|
| 211 |
AudioCodecStandardGluePBFields; |
|---|
| 212 |
UInt32* outStatus; |
|---|
| 213 |
AudioStreamPacketDescription* outPacketDescription; |
|---|
| 214 |
UInt32* ioNumberPackets; |
|---|
| 215 |
UInt32* ioOutputDataByteSize; |
|---|
| 216 |
void* outOutputData; |
|---|
| 217 |
AudioCodec inCodec; |
|---|
| 218 |
}; |
|---|
| 219 |
#else |
|---|
| 220 |
struct AudioCodecProduceOutputPacketsGluePB |
|---|
| 221 |
{ |
|---|
| 222 |
AudioCodecStandardGluePBFields; |
|---|
| 223 |
void* outOutputData; |
|---|
| 224 |
UInt32* ioOutputDataByteSize; |
|---|
| 225 |
UInt32* ioNumberPackets; |
|---|
| 226 |
AudioStreamPacketDescription* outPacketDescription; |
|---|
| 227 |
UInt32* outStatus; |
|---|
| 228 |
}; |
|---|
| 229 |
#endif |
|---|
| 230 |
typedef struct AudioCodecProduceOutputPacketsGluePB AudioCodecProduceOutputPacketsGluePB; |
|---|
| 231 |
|
|---|
| 232 |
#if !TARGET_OS_WIN32 |
|---|
| 233 |
struct AudioCodecResetGluePB |
|---|
| 234 |
{ |
|---|
| 235 |
AudioCodecStandardGluePBFields; |
|---|
| 236 |
AudioCodec inCodec; |
|---|
| 237 |
}; |
|---|
| 238 |
#else |
|---|
| 239 |
struct AudioCodecResetGluePB |
|---|
| 240 |
{ |
|---|
| 241 |
AudioCodecStandardGluePBFields; |
|---|
| 242 |
}; |
|---|
| 243 |
#endif |
|---|
| 244 |
typedef struct AudioCodecResetGluePB AudioCodecResetGluePB; |
|---|
| 245 |
|
|---|
| 246 |
#if PRAGMA_STRUCT_ALIGN |
|---|
| 247 |
#pragma options align=reset |
|---|
| 248 |
#elif PRAGMA_STRUCT_PACKPUSH |
|---|
| 249 |
#pragma pack(pop) |
|---|
| 250 |
#elif PRAGMA_STRUCT_PACK |
|---|
| 251 |
#pragma pack() |
|---|
| 252 |
#endif |
|---|
| 253 |
|
|---|
| 254 |
#endif |
|---|