source: trunk/XCAResources.r @ 219

Revision 219, 4.7 KB checked in by dconrad, 8 years ago (diff)

WMA v1 and v2 decoder. Tested with samples in AVI. Refs #38

Line 
1/*
2 *  XCAResources.r
3 *
4 *    'thng' (and other) resource template for XiphQT CoreAudio components.
5 *
6 *
7 *  Copyright (c) 2005-2006  Arek Korbik
8 *
9 *  This file is part of XiphQT, the Xiph QuickTime Components.
10 *
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.
15 *
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.
20 *
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
24 *
25 *
26 *  Last modified: $Id: XCAResources.r 10748 2006-01-23 18:00:56Z arek $
27 *
28 */
29
30
31
32#define UseExtendedThingResource 1
33
34
35#ifndef __HAVE_INCLUDES_ALREADY__
36
37#include <CoreServices/CoreServices.r>
38
39#ifndef thng_RezTemplateVersion
40  #define thng_RezTemplateVersion       2
41#endif
42
43#define __HAVE_INCLUDES_ALREADY__
44#endif /* __HAVE_INCLUDES_ALREADY__ */
45
46
47/* How do I do this properly... anybody? */
48#if defined(BUILD_UNIVERSAL)
49  #define TARGET_CPU_PPC 1
50  #define TARGET_CPU_X86 1
51#endif
52
53
54#ifndef GEN_MISSING
55  #define GEN_MISSING 0
56#endif
57
58#if TARGET_OS_MAC
59  #if TARGET_CPU_PPC && TARGET_CPU_X86
60    #define TARGET_REZ_FAT_COMPONENTS 1
61    #define Target_PlatformType       platformPowerPCNativeEntryPoint
62    #define Target_SecondPlatformType platformIA32NativeEntryPoint
63  #elif TARGET_CPU_X86
64    #define Target_PlatformType       platformIA32NativeEntryPoint
65  #else
66    #define Target_PlatformType       platformPowerPCNativeEntryPoint
67  #endif
68
69//  #define Target_CodeResType          'dlle'
70//  #define TARGET_REZ_USE_DLLE         1
71#elif TARGET_OS_WIN32
72  #define Target_PlatformType platformWin32
73#else
74  #error get a real platform type
75#endif /* TARGET_OS_MAC */
76
77#if !defined(TARGET_REZ_FAT_COMPONENTS)
78  #define TARGET_REZ_FAT_COMPONENTS 0
79#endif
80
81#if kComponentIsThreadSafe
82  #ifndef cmpThreadSafeOnMac
83    #define cmpThreadSafeOnMac 0x10000000
84  #endif
85  #define COMPONENT_FLAGS cmpThreadSafeOnMac
86#else
87  #define COMPONENT_FLAGS 0
88#endif
89
90
91resource 'strn' (kPrimaryResourceID, purgeable)
92{
93    kComponentName
94};
95
96resource 'stri' (kPrimaryResourceID, purgeable)
97{
98    kComponentInfo
99};
100
101
102#if !GEN_MISSING
103
104resource 'dlle' (kPrimaryResourceID)
105{
106    kComponentEntryPoint
107};
108
109#define kComponentRegistrationFlags     componentHasMultiplePlatforms | componentDoAutoVersion | componentLoadResident
110
111
112resource 'thng' (kPrimaryResourceID, kComponentName)
113{
114    kComponentType,
115    kComponentSubtype,
116    kComponentManufacturer,
117    kComponentFlags,
118    0, //       Component flags mask
119    0, 0, //    Code type, Code ID
120    'strn', kPrimaryResourceID, //      Name resource type, resource ID
121    'stri', kPrimaryResourceID, //      Info resource type, resource ID
122    0, 0, //    Icon resource type, resource ID
123    kComponentVersion,
124    kComponentRegistrationFlags,
125    0, //       Icon family resource ID
126    { //        Beginning of platform info
127        COMPONENT_FLAGS, //     Component flags
128        'dlle', kPrimaryResourceID,
129        Target_PlatformType,
130#if TARGET_REZ_FAT_COMPONENTS
131        COMPONENT_FLAGS,
132        'dlle', kPrimaryResourceID,
133        Target_SecondPlatformType,
134#endif
135    },
136#if thng_RezTemplateVersion >= 2
137    kComponentPublicResourceMapType, kPrimaryResourceID
138#endif
139};
140#else /* GEN_MISSING */
141
142resource 'thga' (kPrimaryResourceID) {
143    kComponentType,
144    kComponentSubtype,
145    kComponentManufacturer,
146    kComponentFlags,
147    0, //       Component flags mask
148    0, 0, //    Code type, Code ID
149    'strn', kPrimaryResourceID, //      Name resource type, resource ID
150    'stri', kPrimaryResourceID, //      Info resource type, resource ID
151    0, 0, //    Icon resource type, resource ID
152    'miss', //  Alias component type
153    'base', //  Alias component subtype
154    0, //       Alias component manufacturer
155    0, //       Alias component flags
156    0, //       Alias component flags mask
157#if thng_RezTemplateVersion >= 2
158    kComponentPublicResourceMapType, kPrimaryResourceID,
159    cmpAliasNoFlags //  Alias flags
160#endif
161};
162#endif /* GEN_MISSING */
163
164
165#undef kPrimaryResourceID
166#undef kComponentType
167#undef kComponentSubtype
168//#undef kComponentManufacturer
169//#undef kComponentFlags
170//#undef kComponentVersion
171#undef kComponentRegistrationFlags
172#undef kComponentName
173#undef kComponentInfo
174//#undef kComponentEntryPoint
175//#undef kComponentPublicResourceMapType
176//#undef kComponentIsThreadSafe
177
178#undef Target_PlatformType
179#undef Target_CodeResType
180//#undef kUseDLLEResource
181
182#undef TARGET_REZ_FAT_COMPONENTS
183#undef Target_SecondPlatformType
184#undef GEN_MISSING
Note: See TracBrowser for help on using the repository browser.