[xiph-commits] r10574 - in trunk/xiph-qt: . AppleSDK/CoreAudio
AppleSDK/CoreAudio/AudioCodecs/ACPublic
CASpeex/CASpeex.xcodeproj CASpeex/src
CAVorbis/CAVorbis.xcodeproj CAVorbis/src
OggImport/OggImport.xcodeproj OggImport/src build-win32
common resources utils
arek at svn.xiph.org
arek at svn.xiph.org
Sat Dec 10 08:23:03 PST 2005
Author: arek
Date: 2005-12-10 08:22:13 -0800 (Sat, 10 Dec 2005)
New Revision: 10574
Added:
trunk/xiph-qt/build-win32/
trunk/xiph-qt/build-win32/AudioCodec.h
trunk/xiph-qt/build-win32/DllMain.c
trunk/xiph-qt/build-win32/README
trunk/xiph-qt/build-win32/XiphQT.def
trunk/xiph-qt/build-win32/XiphQT.dsp
trunk/xiph-qt/build-win32/XiphQT.dsw
trunk/xiph-qt/build-win32/build_XiphQT.bat
trunk/xiph-qt/build-win32/build_XiphQT_debug.bat
trunk/xiph-qt/build-win32/pxml.c
trunk/xiph-qt/build-win32/pxml.h
trunk/xiph-qt/build-win32/resources.r
trunk/xiph-qt/common/config.h
trunk/xiph-qt/resources/XCAResources.r
Removed:
trunk/xiph-qt/AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACComponentResources.r
trunk/xiph-qt/AppleSDK/CoreAudio/AudioUnits/
trunk/xiph-qt/build-win32/AudioCodec.h
trunk/xiph-qt/build-win32/DllMain.c
trunk/xiph-qt/build-win32/README
trunk/xiph-qt/build-win32/XiphQT.def
trunk/xiph-qt/build-win32/XiphQT.dsp
trunk/xiph-qt/build-win32/XiphQT.dsw
trunk/xiph-qt/build-win32/build_XiphQT.bat
trunk/xiph-qt/build-win32/build_XiphQT_debug.bat
trunk/xiph-qt/build-win32/pxml.c
trunk/xiph-qt/build-win32/pxml.h
trunk/xiph-qt/build-win32/resources.r
Modified:
trunk/xiph-qt/AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACBaseCodec.cpp
trunk/xiph-qt/CASpeex/CASpeex.xcodeproj/project.pbxproj
trunk/xiph-qt/CASpeex/src/CAOggSpeexDecoder.cpp
trunk/xiph-qt/CASpeex/src/CASpeexDecoder.cpp
trunk/xiph-qt/CASpeex/src/CASpeexDecoder.h
trunk/xiph-qt/CASpeex/src/CASpeexDecoderPublic.r
trunk/xiph-qt/CAVorbis/CAVorbis.xcodeproj/project.pbxproj
trunk/xiph-qt/CAVorbis/src/CAOggVorbisDecoder.cpp
trunk/xiph-qt/CAVorbis/src/CAVorbisDecoder.cpp
trunk/xiph-qt/CAVorbis/src/CAVorbisDecoder.h
trunk/xiph-qt/CAVorbis/src/CAVorbisDecoderPublic.r
trunk/xiph-qt/OggImport/OggImport.xcodeproj/project.pbxproj
trunk/xiph-qt/OggImport/src/OggImport.c
trunk/xiph-qt/OggImport/src/OggImport.r
trunk/xiph-qt/OggImport/src/common.c
trunk/xiph-qt/OggImport/src/importer_types.h
trunk/xiph-qt/OggImport/src/rb.c
trunk/xiph-qt/OggImport/src/rb.h
trunk/xiph-qt/OggImport/src/stream_speex.c
trunk/xiph-qt/OggImport/src/stream_vorbis.c
trunk/xiph-qt/common/XCACodec.cpp
trunk/xiph-qt/utils/debug.h
trunk/xiph-qt/utils/ringbuffer.cpp
trunk/xiph-qt/utils/ringbuffer.h
trunk/xiph-qt/utils/wrap_ogg.cpp
trunk/xiph-qt/utils/wrap_ogg.h
Log:
Merged back the Win32 port branch changes: r10501 - r10553 [log:branches/xiph-qt#10501:r10553 Changes].
Modified: trunk/xiph-qt/AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACBaseCodec.cpp
===================================================================
--- trunk/xiph-qt/AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACBaseCodec.cpp 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACBaseCodec.cpp 2005-12-10 16:22:13 UTC (rev 10574)
@@ -40,6 +40,13 @@
=============================================================================*/
+/*
+ * Changed by Arek Korbik <arkadini at gmail.com>
+ * 30.11.2005: added platform conditional around
+ * kAudioCodecPropertyNameCFString in ACBaseCode::GetProperty()
+ *
+ */
+
//=============================================================================
// Includes
//=============================================================================
@@ -182,6 +189,7 @@
switch(inPropertyID)
{
+#if TARGET_OS_MAC
case kAudioCodecPropertyNameCFString:
{
if (ioPropertyDataSize != sizeof(CFStringRef)) CODEC_THROW(kAudioCodecBadPropertySizeError);
@@ -200,6 +208,7 @@
*(CFStringRef*)outPropertyData = name;
break;
}
+#endif
case kAudioCodecPropertyMinimumNumberInputPackets :
if(ioPropertyDataSize != sizeof(UInt32)) CODEC_THROW(kAudioCodecBadPropertySizeError);
*(UInt32*)outPropertyData = 1;
Deleted: trunk/xiph-qt/AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACComponentResources.r
===================================================================
--- trunk/xiph-qt/AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACComponentResources.r 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACComponentResources.r 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,192 +0,0 @@
-/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved.
-
- Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
- ("Apple") in consideration of your agreement to the following terms, and your
- use, installation, modification or redistribution of this Apple software
- constitutes acceptance of these terms. If you do not agree with these terms,
- please do not use, install, modify or redistribute this Apple software.
-
- In consideration of your agreement to abide by the following terms, and subject
- to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs
- copyrights in this original Apple software (the "Apple Software"), to use,
- reproduce, modify and redistribute the Apple Software, with or without
- modifications, in source and/or binary forms; provided that if you redistribute
- the Apple Software in its entirety and without modifications, you must retain
- this notice and the following text and disclaimers in all such redistributions of
- the Apple Software. Neither the name, trademarks, service marks or logos of
- Apple Computer, Inc. may be used to endorse or promote products derived from the
- Apple Software without specific prior written permission from Apple. Except as
- expressly stated in this notice, no other rights or licenses, express or implied,
- are granted by Apple herein, including but not limited to any patent rights that
- may be infringed by your derivative works or by other works in which the Apple
- Software may be incorporated.
-
- The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
- WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
- WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
- COMBINATION WITH YOUR PRODUCTS.
-
- IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
- OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
- (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-/*=============================================================================
- ACComponentResources.r
-
-=============================================================================*/
-
-#ifndef GEN_MISSING
- #define GEN_MISSING 0
-#endif
-
-#ifndef thng_RezTemplateVersion
- #define thng_RezTemplateVersion 2
-#endif
-
-//=============================================================================
-// Includes
-//=============================================================================
-
-#include "ConditionalMacros.r"
-#include "MacTypes.r"
-#include "Components.r"
-
-//=============================================================================
-// Platform constants for the thng resources
-//=============================================================================
-
-#if TARGET_OS_MAC && TARGET_API_MAC_OSX
- #define Target_PlatformType 1000
- #define Target_CodeResType 'dlle'
- #define kUseDLLEResource 1
-#elif TARGET_OS_WIN32
- #define Target_PlatformType platformWin32
- #define Target_CodeResType 'dlle'
- #define kUseDLLEResource 1
-#else
- #define Target_PlatformType platformPowerPC
- #define Target_CodeResType 'tppc'
- #define kUseDLLEResource 0
-#endif
-
-#if kComponentIsThreadSafe
- #ifndef cmpThreadSafeOnMac // so we don't need Panther headers to build
- #define cmpThreadSafeOnMac 0x10000000
- #endif
- #define COMPONENT_FLAGS cmpThreadSafeOnMac
-#else
- #define COMPONENT_FLAGS 0
-#endif
-
-//=============================================================================
-// The thng and related resources
-//
-// The definitions below use the following macros, all of which must be
-// defined. Note that kPrimaryResourceID is used to define two 'STR '
-// resources with consecutive IDs so be sure to space them at least two'
-// apart. Here's a sample of how to do the defines:
-//
-// #define kPrimaryResourceID 128
-// #define kComponentType 'aenc'
-// #define kComponentSubtype 'ima4'
-// #define kComponentManufacturer 'appl'
-// #define kComponentFlags 0
-// #define kComponentVersion 0x00010000
-// #define kComponentName "Apple IMA4 Encoder"
-// #define kComponentInfo "An AudioCodec that encodes linear PCM data into IMA4"
-// #define kComponentEntryPoint "ACAppleIMA4EncoderEntry"
-// #define kComponentPublicResourceMapType 0
-// #define kComponentIsThreadSafe 1
-//=============================================================================
-
-#ifndef AC_LOCALIZED
-resource 'strn' (kPrimaryResourceID, purgeable)
-{
- kComponentName
-};
-
-resource 'stri' (kPrimaryResourceID, purgeable)
-{
- kComponentInfo
-};
-#endif
-
-#if !GEN_MISSING
-
-#if kUseDLLEResource
-
- resource 'dlle' (kPrimaryResourceID)
- {
- kComponentEntryPoint
- };
-
-#endif
-
-#define kComponentRegistrationFlags componentHasMultiplePlatforms | componentDoAutoVersion | componentLoadResident
-resource 'thng' (kPrimaryResourceID, kComponentName)
-{
- kComponentType, // Component type
- kComponentSubtype, // Component subtype
- kComponentManufacturer, // Component manufacturer
- kComponentFlags, // Component flags
- 0, // Component flags mask
- 0, 0, // Code type, Code ID
- 'strn', kPrimaryResourceID, // Name resource type, resource ID
- 'stri', kPrimaryResourceID, // Info resource type, resource ID
- 0, 0, // Icon resource type, resource ID
- kComponentVersion, // Component version
- kComponentRegistrationFlags, // Registration flags
- 0, // Icon family resource ID
- { // Beginning of platform info
- COMPONENT_FLAGS, // Component flags
- Target_CodeResType, kPrimaryResourceID, // Code resource type, resource ID
- Target_PlatformType, // Platform type
- },
-#if thng_RezTemplateVersion >= 2
- kComponentPublicResourceMapType, kPrimaryResourceID // Resource map type, resource map ID
-#endif
-};
-
-#else // GEN_MISSING
-
-resource 'thga' (kPrimaryResourceID) {
- kComponentType, // Component type
- kComponentSubtype, // Component subtype
- kComponentManufacturer, // Component manufacturer
- kComponentFlags, // Component flags
- 0, // Component flags mask
- 0, 0, // Code type, Code ID
- 'strn', kPrimaryResourceID, // Name resource type, resource ID
- 'stri', kPrimaryResourceID, // Info resource type, resource ID
- 0, 0, // Icon resource type, resource ID
- 'miss', // Alias component type
- 'base', // Alias component subtype
- 0, // Alias component manufacturer
- 0, // Alias component flags
- 0, // Alias component flags mask
-#if thng_RezTemplateVersion >= 2
- kComponentPublicResourceMapType, kPrimaryResourceID, // Resource map type, resource map ID
- cmpAliasNoFlags // Alias flags
-#endif
-};
-
-#endif // GEN_MISSING
-
-#undef kPrimaryResourceID
-#undef kComponentType
-#undef kComponentSubtype
-#undef kComponentManufacturer
-#undef kComponentVersion
-#undef kComponentRegistrationFlags
-#undef kComponentName
-#undef kComponentInfo
-#undef kComponentEntryPoint
-#undef kComponentPublicResourceMapType
-#undef Target_PlatformType
-#undef Target_CodeResType
-#undef kUseDLLEResource
Modified: trunk/xiph-qt/CASpeex/CASpeex.xcodeproj/project.pbxproj
===================================================================
--- trunk/xiph-qt/CASpeex/CASpeex.xcodeproj/project.pbxproj 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CASpeex/CASpeex.xcodeproj/project.pbxproj 2005-12-10 16:22:13 UTC (rev 10574)
@@ -71,6 +71,8 @@
08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
32BAE0B30371A71500C91783 /* CASpeex_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CASpeex_Prefix.pch; sourceTree = "<group>"; };
730DC2AE09086D3B00B7BB6A /* debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debug.h; sourceTree = "<group>"; };
+ 7348BD670944D3AF00AC363C /* XCAResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = XCAResources.r; path = ../resources/XCAResources.r; sourceTree = SOURCE_ROOT; };
+ 7348BD690944D3C100AC363C /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../common/config.h; sourceTree = SOURCE_ROOT; };
736FE584090DAFD800BC8DCC /* Ogg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Ogg.framework; path = /Library/Frameworks/Ogg.framework; sourceTree = "<absolute>"; };
737447470911261B006D2F02 /* fccs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fccs.h; path = ../common/fccs.h; sourceTree = SOURCE_ROOT; };
737447BD09112E05006D2F02 /* wrap_ogg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_ogg.h; sourceTree = "<group>"; };
@@ -94,12 +96,10 @@
73814C030908039E00C478FC /* ACCodec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ACCodec.h; sourceTree = "<group>"; };
73814C040908039E00C478FC /* ACCodecDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ACCodecDispatch.h; sourceTree = "<group>"; };
73814C050908039E00C478FC /* ACCodecDispatchTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ACCodecDispatchTypes.h; sourceTree = "<group>"; };
- 73814C060908039E00C478FC /* ACComponentResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = ACComponentResources.r; sourceTree = "<group>"; };
73814C070908039E00C478FC /* ACConditionalMacros.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ACConditionalMacros.h; sourceTree = "<group>"; };
73814C080908039E00C478FC /* GetCodecBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GetCodecBundle.cpp; sourceTree = "<group>"; };
73814C090908039E00C478FC /* GetCodecBundle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GetCodecBundle.h; sourceTree = "<group>"; };
73814C0A0908039E00C478FC /* AudioCodecComponentGlue.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = AudioCodecComponentGlue.c; sourceTree = "<group>"; };
- 73814C0E0908039E00C478FC /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = "<group>"; };
73814C100908039E00C478FC /* CABundleLocker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CABundleLocker.cpp; sourceTree = "<group>"; };
73814C110908039E00C478FC /* CABundleLocker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CABundleLocker.h; sourceTree = "<group>"; };
73814C120908039E00C478FC /* CAConditionalMacros.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAConditionalMacros.h; sourceTree = "<group>"; };
@@ -158,6 +158,7 @@
089C167CFE841241C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
+ 7348BD670944D3AF00AC363C /* XCAResources.r */,
73814BF70908034600C478FC /* PkgInfo */,
73814BF4090802F600C478FC /* icon.icns */,
73814BF5090802F600C478FC /* icon.r */,
@@ -171,6 +172,7 @@
08FB77ADFE841716C02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
+ 7348BD690944D3C100AC363C /* config.h */,
73E8B252090D3C6B00686EE5 /* data_types.h */,
73814BE60908027600C478FC /* CASpeexCodec.exp */,
73814BE70908027600C478FC /* CASpeexDecoder.cpp */,
@@ -241,7 +243,6 @@
73814C030908039E00C478FC /* ACCodec.h */,
73814C040908039E00C478FC /* ACCodecDispatch.h */,
73814C050908039E00C478FC /* ACCodecDispatchTypes.h */,
- 73814C060908039E00C478FC /* ACComponentResources.r */,
73814C070908039E00C478FC /* ACConditionalMacros.h */,
73814C080908039E00C478FC /* GetCodecBundle.cpp */,
73814C090908039E00C478FC /* GetCodecBundle.h */,
@@ -268,7 +269,6 @@
73814C0D0908039E00C478FC /* AUBase */ = {
isa = PBXGroup;
children = (
- 73814C0E0908039E00C478FC /* AUResources.r */,
);
path = AUBase;
sourceTree = "<group>";
Modified: trunk/xiph-qt/CASpeex/src/CAOggSpeexDecoder.cpp
===================================================================
--- trunk/xiph-qt/CASpeex/src/CAOggSpeexDecoder.cpp 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CASpeex/src/CAOggSpeexDecoder.cpp 2005-12-10 16:22:13 UTC (rev 10574)
@@ -88,7 +88,7 @@
if (!mIsInitialized) {
// check to make sure the input format is legal
if (inInputFormat.mFormatID != kAudioFormatXiphOggFramedSpeex) {
- dprintf("CASpeexDecoder::SetFormats: only supports Xiph Speex (Ogg-framed)for input\n");
+ dbg_printf("CASpeexDecoder::SetFormats: only supports Xiph Speex (Ogg-framed)for input\n");
CODEC_THROW(kAudioCodecUnsupportedFormatError);
}
Modified: trunk/xiph-qt/CASpeex/src/CASpeexDecoder.cpp
===================================================================
--- trunk/xiph-qt/CASpeex/src/CASpeexDecoder.cpp 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CASpeex/src/CASpeexDecoder.cpp 2005-12-10 16:22:13 UTC (rev 10574)
@@ -107,7 +107,7 @@
const AudioStreamBasicDescription* inOutputFormat,
const void* inMagicCookie, UInt32 inMagicCookieByteSize)
{
- dprintf(" >> [%08lx] CASpeexDecoder :: Initialize(%d, %d, %d)\n", (UInt32) this, inInputFormat != NULL, inOutputFormat != NULL, inMagicCookieByteSize != 0);
+ dbg_printf(" >> [%08lx] CASpeexDecoder :: Initialize(%d, %d, %d)\n", (UInt32) this, inInputFormat != NULL, inOutputFormat != NULL, inMagicCookieByteSize != 0);
if(inInputFormat != NULL) {
SetCurrentInputFormat(*inInputFormat);
@@ -133,22 +133,22 @@
}
XCACodec::Initialize(inInputFormat, inOutputFormat, inMagicCookie, inMagicCookieByteSize);
- dprintf("<.. [%08lx] CASpeexDecoder :: Initialize(%d, %d, %d)\n", (UInt32) this, inInputFormat != NULL, inOutputFormat != NULL, inMagicCookieByteSize != 0);
+ dbg_printf("<.. [%08lx] CASpeexDecoder :: Initialize(%d, %d, %d)\n", (UInt32) this, inInputFormat != NULL, inOutputFormat != NULL, inMagicCookieByteSize != 0);
}
void CASpeexDecoder::Uninitialize()
{
- dprintf(" >> [%08lx] CASpeexDecoder :: Uninitialize()\n", (UInt32) this);
+ dbg_printf(" >> [%08lx] CASpeexDecoder :: Uninitialize()\n", (UInt32) this);
BDCUninitialize();
XCACodec::Uninitialize();
- dprintf("<.. [%08lx] CASpeexDecoder :: Uninitialize()\n", (UInt32) this);
+ dbg_printf("<.. [%08lx] CASpeexDecoder :: Uninitialize()\n", (UInt32) this);
}
void CASpeexDecoder::GetProperty(AudioCodecPropertyID inPropertyID, UInt32& ioPropertyDataSize, void* outPropertyData)
{
- dprintf(" >> [%08lx] CASpeexDecoder :: GetProperty('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
+ dbg_printf(" >> [%08lx] CASpeexDecoder :: GetProperty('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
switch(inPropertyID)
{
case kAudioCodecPropertyRequiresPacketDescription:
@@ -199,12 +199,12 @@
default:
ACBaseCodec::GetProperty(inPropertyID, ioPropertyDataSize, outPropertyData);
}
- dprintf("<.. [%08lx] CASpeexDecoder :: GetProperty('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
+ dbg_printf("<.. [%08lx] CASpeexDecoder :: GetProperty('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
}
void CASpeexDecoder::GetPropertyInfo(AudioCodecPropertyID inPropertyID, UInt32& outPropertyDataSize, bool& outWritable)
{
- dprintf(" >> [%08lx] CASpeexDecoder :: GetPropertyInfo('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
+ dbg_printf(" >> [%08lx] CASpeexDecoder :: GetPropertyInfo('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
switch(inPropertyID)
{
case kAudioCodecPropertyRequiresPacketDescription:
@@ -227,16 +227,16 @@
break;
}
- dprintf("<.. [%08lx] CASpeexDecoder :: GetPropertyInfo('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
+ dbg_printf("<.. [%08lx] CASpeexDecoder :: GetPropertyInfo('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
}
void CASpeexDecoder::Reset()
{
- dprintf(">> [%08lx] CASpeexDecoder :: Reset()\n", (UInt32) this);
+ dbg_printf(">> [%08lx] CASpeexDecoder :: Reset()\n", (UInt32) this);
BDCReset();
XCACodec::Reset();
- dprintf("<< [%08lx] CASpeexDecoder :: Reset()\n", (UInt32) this);
+ dbg_printf("<< [%08lx] CASpeexDecoder :: Reset()\n", (UInt32) this);
}
UInt32 CASpeexDecoder::GetVersion() const
@@ -250,7 +250,7 @@
if (!mIsInitialized) {
// check to make sure the input format is legal
if (inInputFormat.mFormatID != kAudioFormatXiphSpeex) {
- dprintf("CASpeexDecoder::SetFormats: only supports Xiph Speex for input\n");
+ dbg_printf("CASpeexDecoder::SetFormats: only supports Xiph Speex for input\n");
CODEC_THROW(kAudioCodecUnsupportedFormatError);
}
@@ -272,7 +272,7 @@
((inOutputFormat.mFormatFlags == (kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked)) &&
(inOutputFormat.mBitsPerChannel == 16))))
{
- dprintf("CASpeexDecoder::SetFormats: only supports"
+ dbg_printf("CASpeexDecoder::SetFormats: only supports"
" either 16 bit native endian signed integer or 32 bit native endian CoreAudio floats for output\n");
CODEC_THROW(kAudioCodecUnsupportedFormatError);
}
@@ -299,7 +299,7 @@
void CASpeexDecoder::SetMagicCookie(const void* inMagicCookieData, UInt32 inMagicCookieDataByteSize)
{
- dprintf(" >> [%08lx] CASpeexDecoder :: SetMagicCookie()\n", (UInt32) this);
+ dbg_printf(" >> [%08lx] CASpeexDecoder :: SetMagicCookie()\n", (UInt32) this);
if (mIsInitialized)
CODEC_THROW(kAudioCodecStateError);
@@ -309,7 +309,7 @@
if (!mCompressionInitialized)
CODEC_THROW(kAudioCodecUnsupportedFormatError);
- dprintf("<.. [%08lx] CASpeexDecoder :: SetMagicCookie()\n", (UInt32) this);
+ dbg_printf("<.. [%08lx] CASpeexDecoder :: SetMagicCookie()\n", (UInt32) this);
}
void CASpeexDecoder::SetCookie(const void* inMagicCookieData, UInt32 inMagicCookieDataByteSize)
@@ -493,7 +493,7 @@
if (mOutputFormat.mFormatFlags & kAudioFormatFlagsNativeFloatPacked != 0)
result = speex_decode(mSpeexDecoderState, &mSpeexBits, reinterpret_cast<float*> (mOutBuffer + mOutBufferUsedSize));
else
- result = speex_decode_int(mSpeexDecoderState, &mSpeexBits, reinterpret_cast<SInt16*> (mOutBuffer + mOutBufferUsedSize));
+ result = speex_decode_int(mSpeexDecoderState, &mSpeexBits, reinterpret_cast<spx_int16_t*> (mOutBuffer + mOutBufferUsedSize));
if (result < 0) {
mBDCStatus = kBDCStatusAbort;
@@ -504,7 +504,7 @@
if (mOutputFormat.mFormatFlags & kAudioFormatFlagsNativeFloatPacked != 0)
speex_decode_stereo(reinterpret_cast<float*> (mOutBuffer + mOutBufferUsedSize), mSpeexHeader.frame_size, &mSpeexStereoState);
else
- speex_decode_stereo_int(reinterpret_cast<SInt16*> (mOutBuffer + mOutBufferUsedSize), mSpeexHeader.frame_size, &mSpeexStereoState);
+ speex_decode_stereo_int(reinterpret_cast<spx_int16_t*> (mOutBuffer + mOutBufferUsedSize), mSpeexHeader.frame_size, &mSpeexStereoState);
}
mOutBufferUsedSize += mOutputFormat.FramesToBytes(mSpeexHeader.frame_size);
}
Modified: trunk/xiph-qt/CASpeex/src/CASpeexDecoder.h
===================================================================
--- trunk/xiph-qt/CASpeex/src/CASpeexDecoder.h 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CASpeex/src/CASpeexDecoder.h 2005-12-10 16:22:13 UTC (rev 10574)
@@ -41,6 +41,13 @@
#include <vector>
+#define _SHOULD_BE_ZERO_HERE 0
+#if defined(TARGET_OS_WIN32) && defined(QT_WIN32__VBR_BROKEN)
+ #undef _SHOULD_BE_ZERO_HERE
+ #define _SHOULD_BE_ZERO_HERE 1
+#endif
+
+
class CASpeexDecoder:
public XCACodec
{
@@ -116,7 +123,7 @@
enum {
kSpeexBytesPerPacket = 0,
- kSpeexFramesPerPacket = 0,
+ kSpeexFramesPerPacket = _SHOULD_BE_ZERO_HERE,
kSpeexBytesPerFrame = 0,
kSpeexChannelsPerFrame = 0,
kSpeexBitsPerChannel = 0,
Modified: trunk/xiph-qt/CASpeex/src/CASpeexDecoderPublic.r
===================================================================
--- trunk/xiph-qt/CASpeex/src/CASpeexDecoderPublic.r 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CASpeex/src/CASpeexDecoderPublic.r 2005-12-10 16:22:13 UTC (rev 10574)
@@ -42,8 +42,21 @@
#define DESCRIPTION "An AudioCodec that decodes Xiph Speex (Ogg-framed) into linear PCM data"
#define ENTRY_POINT "CAOggSpeexDecoderEntry"
-#include "AUResources.r"
+#define kPrimaryResourceID -17330
+#define kComponentType 'adec'
+#define kComponentSubtype kAudioFormatXiphOggFramedSpeex
+#define kComponentManufacturer 'Xiph'
+#define kComponentFlags 0
+#define kComponentVersion kCASpeex_adec_Version
+#define kComponentName "Xiph (Ogg-framed) Speex"
+#define kComponentInfo "An AudioCodec that decodes Xiph (Ogg-framed) Speex into linear PCM data"
+#define kComponentEntryPoint "CAOggSpeexDecoderEntry"
+#define kComponentPublicResourceMapType 0
+#define kComponentIsThreadSafe 1
+//#include "ACComponentResources.r"
+//#include "AUResources.r"
+#include "XCAResources.r"
#define RES_ID -17334
@@ -55,4 +68,18 @@
#define DESCRIPTION "An AudioCodec that decodes Xiph Speex into linear PCM data"
#define ENTRY_POINT "CASpeexDecoderEntry"
-#include "AUResources.r"
+#define kPrimaryResourceID -17334
+#define kComponentType 'adec'
+#define kComponentSubtype kAudioFormatXiphSpeex
+#define kComponentManufacturer 'Xiph'
+#define kComponentFlags 0
+#define kComponentVersion kCASpeex_adec_Version
+#define kComponentName "Xiph Speex"
+#define kComponentInfo "An AudioCodec that decodes Xiph Speex into linear PCM data"
+#define kComponentEntryPoint "CASpeexDecoderEntry"
+#define kComponentPublicResourceMapType 0
+#define kComponentIsThreadSafe 1
+
+//#include "ACComponentResources.r"
+//#include "AUResources.r"
+#include "XCAResources.r"
Modified: trunk/xiph-qt/CAVorbis/CAVorbis.xcodeproj/project.pbxproj
===================================================================
--- trunk/xiph-qt/CAVorbis/CAVorbis.xcodeproj/project.pbxproj 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CAVorbis/CAVorbis.xcodeproj/project.pbxproj 2005-12-10 16:22:13 UTC (rev 10574)
@@ -69,6 +69,8 @@
/* Begin PBXFileReference section */
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
32BAE0B30371A71500C91783 /* CAVorbis_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAVorbis_Prefix.pch; sourceTree = "<group>"; };
+ 7348BD580944D32400AC363C /* XCAResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = XCAResources.r; path = ../resources/XCAResources.r; sourceTree = SOURCE_ROOT; };
+ 7348BD5A0944D37900AC363C /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../common/config.h; sourceTree = SOURCE_ROOT; };
737C589209125B5900700B79 /* vorbis_entrypoints.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = vorbis_entrypoints.cpp; path = src/vorbis_entrypoints.cpp; sourceTree = "<group>"; };
737C589409125B8500700B79 /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = icon.icns; path = ../resources/icon.icns; sourceTree = SOURCE_ROOT; };
737C589509125B8500700B79 /* icon.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = icon.r; path = ../resources/icon.r; sourceTree = SOURCE_ROOT; };
@@ -92,7 +94,6 @@
737CA00208F82D0600DAC36C /* ACCodec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ACCodec.h; sourceTree = "<group>"; };
737CA00308F82D0600DAC36C /* ACCodecDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ACCodecDispatch.h; sourceTree = "<group>"; };
737CA00408F82D0600DAC36C /* ACCodecDispatchTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ACCodecDispatchTypes.h; sourceTree = "<group>"; };
- 737CA00508F82D0600DAC36C /* ACComponentResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = ACComponentResources.r; sourceTree = "<group>"; };
737CA00608F82D0600DAC36C /* ACConditionalMacros.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ACConditionalMacros.h; sourceTree = "<group>"; };
737CA00908F82D0600DAC36C /* CAConditionalMacros.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAConditionalMacros.h; sourceTree = "<group>"; };
737CA01308F82D7500DAC36C /* GetCodecBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GetCodecBundle.cpp; sourceTree = "<group>"; };
@@ -109,7 +110,6 @@
737CA1AD08F8376400DAC36C /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
737CA4B408F9587200DAC36C /* CAVorbisCodec.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; name = CAVorbisCodec.exp; path = src/CAVorbisCodec.exp; sourceTree = "<group>"; };
737CA4B708F9588900DAC36C /* CAVorbisDecoderPublic.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = CAVorbisDecoderPublic.r; path = src/CAVorbisDecoderPublic.r; sourceTree = "<group>"; };
- 737CA4F908F95BCE00DAC36C /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = "<group>"; };
737CA64308F9D34000DAC36C /* Ogg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Ogg.framework; path = /Library/Frameworks/Ogg.framework; sourceTree = "<absolute>"; };
737CA64408F9D34000DAC36C /* Vorbis.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Vorbis.framework; path = /Library/Frameworks/Vorbis.framework; sourceTree = "<absolute>"; };
73E8B11A090BCD8200686EE5 /* data_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = data_types.h; path = ../common/data_types.h; sourceTree = SOURCE_ROOT; };
@@ -158,6 +158,7 @@
089C167CFE841241C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
+ 7348BD580944D32400AC363C /* XCAResources.r */,
737C589809125BA000700B79 /* PkgInfo */,
737C589409125B8500700B79 /* icon.icns */,
737C589509125B8500700B79 /* icon.r */,
@@ -171,6 +172,7 @@
08FB77ADFE841716C02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
+ 7348BD5A0944D37900AC363C /* config.h */,
737C59940912617B00700B79 /* CAOggVorbisDecoder.cpp */,
737C59950912617B00700B79 /* CAOggVorbisDecoder.h */,
737C589B09125C2700700B79 /* XCACodec.cpp */,
@@ -254,7 +256,6 @@
737CA00208F82D0600DAC36C /* ACCodec.h */,
737CA00308F82D0600DAC36C /* ACCodecDispatch.h */,
737CA00408F82D0600DAC36C /* ACCodecDispatchTypes.h */,
- 737CA00508F82D0600DAC36C /* ACComponentResources.r */,
737CA00608F82D0600DAC36C /* ACConditionalMacros.h */,
737CA01308F82D7500DAC36C /* GetCodecBundle.cpp */,
737CA01408F82D7500DAC36C /* GetCodecBundle.h */,
@@ -296,7 +297,6 @@
737CA4F808F95BCE00DAC36C /* AUBase */ = {
isa = PBXGroup;
children = (
- 737CA4F908F95BCE00DAC36C /* AUResources.r */,
);
path = AUBase;
sourceTree = "<group>";
Modified: trunk/xiph-qt/CAVorbis/src/CAOggVorbisDecoder.cpp
===================================================================
--- trunk/xiph-qt/CAVorbis/src/CAOggVorbisDecoder.cpp 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CAVorbis/src/CAOggVorbisDecoder.cpp 2005-12-10 16:22:13 UTC (rev 10574)
@@ -87,7 +87,7 @@
{
if (!mIsInitialized) {
if (inInputFormat.mFormatID != kAudioFormatXiphOggFramedVorbis) {
- dprintf("CAOggVorbisDecoder::SetFormats: only support Xiph Vorbis (Ogg-framed) for input\n");
+ dbg_printf("CAOggVorbisDecoder::SetFormats: only support Xiph Vorbis (Ogg-framed) for input\n");
CODEC_THROW(kAudioCodecUnsupportedFormatError);
}
XCACodec::SetCurrentInputFormat(inInputFormat);
@@ -99,14 +99,14 @@
UInt32 CAOggVorbisDecoder::ProduceOutputPackets(void* outOutputData, UInt32& ioOutputDataByteSize, UInt32& ioNumberPackets,
AudioStreamPacketDescription* outPacketDescription)
{
- dprintf(" >> [%08lx] CAOggVorbisDecoder :: ProduceOutputPackets(%ld [%ld])\n", (UInt32) this, ioNumberPackets, ioOutputDataByteSize);
+ dbg_printf(" >> [%08lx] CAOggVorbisDecoder :: ProduceOutputPackets(%ld [%ld])\n", (UInt32) this, ioNumberPackets, ioOutputDataByteSize);
UInt32 ret = kAudioCodecProduceOutputPacketSuccess;
if (mFramesBufferedList.empty()) {
ioOutputDataByteSize = 0;
ioNumberPackets = 0;
ret = kAudioCodecProduceOutputPacketNeedsMoreInputData;
- dprintf("<!E [%08lx] CAOggVorbisDecoder :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n", (UInt32) this,
+ dbg_printf("<!E [%08lx] CAOggVorbisDecoder :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n", (UInt32) this,
ioNumberPackets, ioOutputDataByteSize, ret, FramesReady());
return ret;
}
@@ -154,7 +154,7 @@
}
}
- dprintf("<.. [%08lx] CAOggVorbisDecoder :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n",
+ dbg_printf("<.. [%08lx] CAOggVorbisDecoder :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n",
(UInt32) this, ioNumberPackets, ioOutputDataByteSize, ret, FramesReady());
return ret;
}
Modified: trunk/xiph-qt/CAVorbis/src/CAVorbisDecoder.cpp
===================================================================
--- trunk/xiph-qt/CAVorbis/src/CAVorbisDecoder.cpp 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CAVorbis/src/CAVorbisDecoder.cpp 2005-12-10 16:22:13 UTC (rev 10574)
@@ -101,7 +101,7 @@
const AudioStreamBasicDescription* inOutputFormat,
const void* inMagicCookie, UInt32 inMagicCookieByteSize)
{
- dprintf(" >> [%08lx] :: Initialize(%d, %d, %d)\n", (UInt32) this, inInputFormat != NULL, inOutputFormat != NULL, inMagicCookieByteSize != 0);
+ dbg_printf(" >> [%08lx] :: Initialize(%d, %d, %d)\n", (UInt32) this, inInputFormat != NULL, inOutputFormat != NULL, inMagicCookieByteSize != 0);
if(inInputFormat != NULL) {
SetCurrentInputFormat(*inInputFormat);
@@ -129,21 +129,21 @@
// FixFormats();
XCACodec::Initialize(inInputFormat, inOutputFormat, inMagicCookie, inMagicCookieByteSize);
- dprintf("<.. [%08lx] :: Initialize(%d, %d, %d)\n", (UInt32) this, inInputFormat != NULL, inOutputFormat != NULL, inMagicCookieByteSize != 0);
+ dbg_printf("<.. [%08lx] :: Initialize(%d, %d, %d)\n", (UInt32) this, inInputFormat != NULL, inOutputFormat != NULL, inMagicCookieByteSize != 0);
}
void CAVorbisDecoder::Uninitialize()
{
- dprintf(" >> [%08lx] :: Uninitialize()\n", (UInt32) this);
+ dbg_printf(" >> [%08lx] :: Uninitialize()\n", (UInt32) this);
BDCUninitialize();
XCACodec::Uninitialize();
- dprintf("<.. [%08lx] :: Uninitialize()\n", (UInt32) this);
+ dbg_printf("<.. [%08lx] :: Uninitialize()\n", (UInt32) this);
}
void CAVorbisDecoder::GetProperty(AudioCodecPropertyID inPropertyID, UInt32& ioPropertyDataSize, void* outPropertyData)
{
- dprintf(" >> [%08lx] :: GetProperty('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
+ dbg_printf(" >> [%08lx] :: GetProperty('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
switch(inPropertyID)
{
case kAudioCodecPropertyRequiresPacketDescription:
@@ -194,12 +194,12 @@
default:
ACBaseCodec::GetProperty(inPropertyID, ioPropertyDataSize, outPropertyData);
}
- dprintf("<.. [%08lx] :: GetProperty('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
+ dbg_printf("<.. [%08lx] :: GetProperty('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
}
void CAVorbisDecoder::GetPropertyInfo(AudioCodecPropertyID inPropertyID, UInt32& outPropertyDataSize, bool& outWritable)
{
- dprintf(" >> [%08lx] :: GetPropertyInfo('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
+ dbg_printf(" >> [%08lx] :: GetPropertyInfo('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
switch(inPropertyID)
{
case kAudioCodecPropertyRequiresPacketDescription:
@@ -222,16 +222,16 @@
break;
}
- dprintf("<.. [%08lx] :: GetPropertyInfo('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
+ dbg_printf("<.. [%08lx] :: GetPropertyInfo('%4.4s')\n", (UInt32) this, reinterpret_cast<char*> (&inPropertyID));
}
void CAVorbisDecoder::Reset()
{
- dprintf(">> [%08lx] :: Reset()\n", (UInt32) this);
+ dbg_printf(">> [%08lx] :: Reset()\n", (UInt32) this);
BDCReset();
XCACodec::Reset();
- dprintf("<< [%08lx] :: Reset()\n", (UInt32) this);
+ dbg_printf("<< [%08lx] :: Reset()\n", (UInt32) this);
}
UInt32 CAVorbisDecoder::GetVersion() const
@@ -245,7 +245,7 @@
if (!mIsInitialized) {
// check to make sure the input format is legal
if (inInputFormat.mFormatID != kAudioFormatXiphVorbis) {
- dprintf("CAVorbisDecoder::SetFormats: only support Xiph Vorbis for input\n");
+ dbg_printf("CAVorbisDecoder::SetFormats: only support Xiph Vorbis for input\n");
CODEC_THROW(kAudioCodecUnsupportedFormatError);
}
@@ -266,7 +266,7 @@
((inOutputFormat.mFormatFlags == (kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked)) &&
(inOutputFormat.mBitsPerChannel == 16))))
{
- dprintf("CAVorbisDecoder::SetFormats: only supports either 16 bit native endian signed integer or 32 bit native endian Core Audio floats for output\n");
+ dbg_printf("CAVorbisDecoder::SetFormats: only supports either 16 bit native endian signed integer or 32 bit native endian Core Audio floats for output\n");
CODEC_THROW(kAudioCodecUnsupportedFormatError);
}
@@ -292,7 +292,7 @@
void CAVorbisDecoder::SetMagicCookie(const void* inMagicCookieData, UInt32 inMagicCookieDataByteSize)
{
- dprintf(" >> [%08lx] :: SetMagicCookie()\n", (UInt32) this);
+ dbg_printf(" >> [%08lx] :: SetMagicCookie()\n", (UInt32) this);
if (mIsInitialized)
CODEC_THROW(kAudioCodecStateError);
@@ -302,7 +302,7 @@
if (!mCompressionInitialized)
CODEC_THROW(kAudioCodecUnsupportedFormatError);
- dprintf("<.. [%08lx] :: SetMagicCookie()\n", (UInt32) this);
+ dbg_printf("<.. [%08lx] :: SetMagicCookie()\n", (UInt32) this);
}
void CAVorbisDecoder::SetCookie(const void* inMagicCookieData, UInt32 inMagicCookieDataByteSize)
Modified: trunk/xiph-qt/CAVorbis/src/CAVorbisDecoder.h
===================================================================
--- trunk/xiph-qt/CAVorbis/src/CAVorbisDecoder.h 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CAVorbis/src/CAVorbisDecoder.h 2005-12-10 16:22:13 UTC (rev 10574)
@@ -40,6 +40,13 @@
#include <vector>
+#define _SHOULD_BE_ZERO_HERE 0
+#if defined(TARGET_OS_WIN32) && defined(QT_WIN32__VBR_BROKEN)
+ #undef _SHOULD_BE_ZERO_HERE
+ #define _SHOULD_BE_ZERO_HERE 1
+#endif
+
+
class CAVorbisDecoder:
public XCACodec
{
@@ -112,7 +119,7 @@
enum {
kVorbisBytesPerPacket = 0,
- kVorbisFramesPerPacket = 0,
+ kVorbisFramesPerPacket = _SHOULD_BE_ZERO_HERE,
kVorbisBytesPerFrame = 0,
kVorbisChannelsPerFrame = 0,
kVorbisBitsPerChannel = 16,
@@ -122,4 +129,4 @@
};
};
-#endif /* __CAVorbisDecoder_h__ */
\ No newline at end of file
+#endif /* __CAVorbisDecoder_h__ */
Modified: trunk/xiph-qt/CAVorbis/src/CAVorbisDecoderPublic.r
===================================================================
--- trunk/xiph-qt/CAVorbis/src/CAVorbisDecoderPublic.r 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/CAVorbis/src/CAVorbisDecoderPublic.r 2005-12-10 16:22:13 UTC (rev 10574)
@@ -42,8 +42,21 @@
#define DESCRIPTION "An AudioCodec that decodes Xiph Vorbis (Ogg-framed) into linear PCM data"
#define ENTRY_POINT "CAOggVorbisDecoderEntry"
-#include "AUResources.r"
+#define kPrimaryResourceID -17110
+#define kComponentType 'adec'
+#define kComponentSubtype kAudioFormatXiphOggFramedVorbis
+#define kComponentManufacturer 'Xiph'
+#define kComponentFlags 0
+#define kComponentVersion kCAVorbis_adec_Version
+#define kComponentName "Xiph (Ogg-framed) Vorbis"
+#define kComponentInfo "An AudioCodec that decodes Xiph (Ogg-framed) Vorbis into linear PCM data"
+#define kComponentEntryPoint "CAOggVorbisDecoderEntry"
+#define kComponentPublicResourceMapType 0
+#define kComponentIsThreadSafe 1
+//#include "ACComponentResources.r"
+//#include "AUResources.r"
+#include "XCAResources.r"
#define RES_ID -17114
@@ -55,4 +68,18 @@
#define DESCRIPTION "An AudioCodec that decodes Xiph Vorbis into linear PCM data"
#define ENTRY_POINT "CAVorbisDecoderEntry"
-#include "AUResources.r"
+#define kPrimaryResourceID -17114
+#define kComponentType 'adec'
+#define kComponentSubtype kAudioFormatXiphVorbis
+#define kComponentManufacturer 'Xiph'
+#define kComponentFlags 0
+#define kComponentVersion kCAVorbis_adec_Version
+#define kComponentName "Xiph Vorbis"
+#define kComponentInfo "An AudioCodec that decodes Xiph Vorbis into linear PCM data"
+#define kComponentEntryPoint "CAVorbisDecoderEntry"
+#define kComponentPublicResourceMapType 0
+#define kComponentIsThreadSafe 1
+
+//#include "ACComponentResources.r"
+//#include "AUResources.r"
+#include "XCAResources.r"
Modified: trunk/xiph-qt/OggImport/OggImport.xcodeproj/project.pbxproj
===================================================================
--- trunk/xiph-qt/OggImport/OggImport.xcodeproj/project.pbxproj 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/OggImport/OggImport.xcodeproj/project.pbxproj 2005-12-10 16:22:13 UTC (rev 10574)
@@ -18,6 +18,7 @@
73182D9B090AB7F800C25A13 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 73182D62090AAEA700C25A13 /* common.c */; };
73182D9F090AB83F00C25A13 /* Vorbis.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73182D9E090AB83F00C25A13 /* Vorbis.framework */; };
73182E37090AD49700C25A13 /* stream_vorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = 73182E35090AD49700C25A13 /* stream_vorbis.c */; };
+ 73DDD2B3093E665C001E170C /* config.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 73DDD2B2093E665C001E170C /* config.h */; };
73E8B16D090BE13600686EE5 /* stream_speex.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E8B16A090BE13600686EE5 /* stream_speex.c */; };
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; };
@@ -55,6 +56,7 @@
dstSubfolderSpec = 1;
files = (
73182D90090AB6D500C25A13 /* PkgInfo in CopyFiles */,
+ 73DDD2B3093E665C001E170C /* config.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -88,6 +90,7 @@
737C5A6D0912A05200700B79 /* fccs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fccs.h; path = ../common/fccs.h; sourceTree = SOURCE_ROOT; };
738602C50915732900CB8105 /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = icon.icns; path = ../resources/icon.icns; sourceTree = SOURCE_ROOT; };
738602C60915732900CB8105 /* icon.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = icon.r; path = ../resources/icon.r; sourceTree = SOURCE_ROOT; };
+ 73DDD2B2093E665C001E170C /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../common/config.h; sourceTree = SOURCE_ROOT; };
73E8B10F090BCB6100686EE5 /* data_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = data_types.h; path = ../common/data_types.h; sourceTree = SOURCE_ROOT; };
73E8B16A090BE13600686EE5 /* stream_speex.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_speex.c; path = src/stream_speex.c; sourceTree = "<group>"; };
73E8B16B090BE13600686EE5 /* stream_speex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_speex.h; path = src/stream_speex.h; sourceTree = "<group>"; };
@@ -154,6 +157,7 @@
children = (
73E8B169090BE11D00686EE5 /* speex */,
73E8B162090BDE5D00686EE5 /* vorbis */,
+ 73DDD2B2093E665C001E170C /* config.h */,
73182DEC090AC8E900C25A13 /* debug.h */,
73182D79090AB4CE00C25A13 /* OggImport.exp */,
73182D7A090AB4CE00C25A13 /* versions.h */,
@@ -397,18 +401,21 @@
73182D5B090AAD7600C25A13 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ OTHER_REZFLAGS = "-D TARGET_REZ_MAC_PPC=1";
};
name = Development;
};
73182D5C090AAD7600C25A13 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ OTHER_REZFLAGS = "-D TARGET_REZ_MAC_PPC=1";
};
name = Deployment;
};
73182D5D090AAD7600C25A13 /* Default */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ OTHER_REZFLAGS = "-D TARGET_REZ_MAC_PPC=1";
};
name = Default;
};
Modified: trunk/xiph-qt/OggImport/src/OggImport.c
===================================================================
--- trunk/xiph-qt/OggImport/src/OggImport.c 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/OggImport/src/OggImport.c 2005-12-10 16:22:13 UTC (rev 10574)
@@ -34,7 +34,13 @@
*
*/
+#if defined(__APPLE_CC__)
#include <QuickTime/QuickTime.h>
+//#include <Ogg/ogg.h>
+#else
+#include <QuickTimeComponents.h>
+//#include <ogg.h>
+#endif
#include <Ogg/ogg.h>
//#include <Vorbis/codec.h>
@@ -51,6 +57,10 @@
#include "common.h"
#include "rb.h"
+#if TARGET_OS_WIN32
+#include "pxml.h"
+#endif
+
//stream-type support functions
#include "stream_vorbis.h"
#include "stream_speex.h"
@@ -149,20 +159,37 @@
#define COMPONENT_UPP_SELECT_ROOT() MovieImport
#define COMPONENT_DISPATCH_FILE "OggImportDispatch.h"
+#if !TARGET_OS_WIN32
#include <CoreServices/Components.k.h>
#include <QuickTime/QuickTimeComponents.k.h>
#include <QuickTime/ComponentDispatchHelper.c>
+#else
+#include <Components.k.h>
+#include <QuickTimeComponents.k.h>
+#include <ComponentDispatchHelper.c>
+#endif
+#if TARGET_OS_WIN32
+EXTERN_API_C(SInt32 ) S64Compare(SInt64 left, SInt64 right)
+{
+ if (left < right)
+ return -1;
+ if (left == right)
+ return 0;
+ return 1;
+}
+#endif
+
static ComponentResult DoRead(OggImportGlobalsPtr globals, Ptr buffer, SInt64 offset, long size)
{
ComponentResult err;
-
- dprintf("---- DoRead() called\n");
const wide wideOffset = SInt64ToWide(offset);
- dprintf("--->> READING: %lld [%ld] --> %lld\n", offset, size, offset + size);
- dprintf("----> READING: usingIdle: %d, dataCanDoAsyncRead: %d, canDoGetFileSizeAsync: %d, canDoGetFileSize64: %d\n",
+ dbg_printf("---- DoRead() called\n");
+
+ dbg_printf("--->> READING: %lld [%ld] --> %lld\n", offset, size, offset + size);
+ dbg_printf("----> READING: usingIdle: %d, dataCanDoAsyncRead: %d, canDoGetFileSizeAsync: %d, canDoGetFileSize64: %d\n",
globals->usingIdle, globals->dataCanDoAsyncRead, globals->dataCanDoGetFileSizeAsync, globals->dataCanDoGetFileSize64);
if (globals->usingIdle && globals->dataCanDoAsyncRead)
@@ -170,9 +197,9 @@
globals->dataRequested = true;
err = DataHReadAsync(globals->dataReader, buffer, size, &wideOffset,
globals->dataReadCompletion, (long) globals);
- dprintf("----: READ: %ld\n", err);
+ dbg_printf("----: READ: %ld\n", err);
err = QTIdleManagerSetNextIdleTimeNever(globals->idleManager);
- dprintf("----: Disabling Idles: %ld\n", err);
+ dbg_printf("----: Disabling Idles: %ld\n", err);
}
else
{
@@ -191,9 +218,9 @@
int dataLeft;
SInt64 readDataOffset;
- dprintf("---- FillBuffer() called\n");
- dprintf(" - dataOffset: %lld, dataEndOffset: %lld\n", globals->dataOffset, globals->dataEndOffset);
- dprintf(" - dataOffset != -1: %d, dataOffset >= dataEndOffset: %d\n",
+ dbg_printf("---- FillBuffer() called\n");
+ dbg_printf(" - dataOffset: %lld, dataEndOffset: %lld\n", globals->dataOffset, globals->dataEndOffset);
+ dbg_printf(" - dataOffset != -1: %d, dataOffset >= dataEndOffset: %d\n",
S64Compare(globals->dataOffset, S64Set(-1)) != 0,
S64Compare(globals->dataOffset, globals->dataEndOffset) >= 0);
@@ -204,12 +231,12 @@
return eofErr;
}
- dprintf("--1- FillBuffer() called\n");
+ dbg_printf("--1- FillBuffer() called\n");
/* can another page from the disk fit in the buffer? */
if (globals->dataReadChunkSize > rb_space_available(&globals->dataRB))
return -50; ///@@@ page won't fit in buffer, they always should
- dprintf("--2- FillBuffer() called\n");
+ dbg_printf("--2- FillBuffer() called\n");
readDataOffset = S64Add(globals->dataOffset, S64Set(rb_data_available(&globals->dataRB)));
/* figure out how much data is left, and read either a chunk or what's left */
@@ -349,68 +376,84 @@
}
-static int InitialiseMetaDataMappings(StreamInfoPtr si) {
- CFBundleRef bundle;
- CFURLRef mdmurl;
- CFDataRef data;
- SInt32 ret = 0;
- CFStringRef errorString;
- SInt32 error = 0;
- CFDictionaryRef props;
+static int InitialiseMetaDataMappings(OggImportGlobalsPtr globals, StreamInfoPtr si) {
+ SInt32 ret = 0;
+ CFDictionaryRef props = NULL;
- dprintf("--= IMDM()\n");
- if (si->MDmapping != NULL && si->UDmapping != NULL) {
- return 1;
- }
-
- //else? let's assume for now that they are both intialised or both are not initialised
+ dbg_printf("--= IMDM()\n");
+ if (si->MDmapping != NULL && si->UDmapping != NULL) {
+ return 1;
+ }
- bundle = CFBundleGetBundleWithIdentifier(CFSTR(kOggVorbisBundleID));
-
- if (bundle == NULL)
- return 0;
+ //else? let's assume for now that they are both intialised or both are not initialised
- mdmurl = CFBundleCopyResourceURL(bundle, CFSTR("MetaDataConfig"), CFSTR("plist"), NULL);
- if (mdmurl != NULL) {
- if (CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, mdmurl, &data,
- NULL, NULL, &error)) {
- props = (CFDictionaryRef) CFPropertyListCreateFromXMLData(kCFAllocatorDefault, data,
- kCFPropertyListImmutable, &errorString);
- if (props != NULL) {
- if (CFGetTypeID(props) == CFDictionaryGetTypeID()) {
- si->MDmapping = (CFDictionaryRef) CFDictionaryGetValue(props, CFSTR("Vorbis-to-MD"));
- if (si->MDmapping != NULL) {
- dprintf("----: MDmapping found\n");
- CFRetain(si->MDmapping);
- ret = 1;
- }
- si->UDmapping = (CFDictionaryRef) CFDictionaryGetValue(props, CFSTR("Vorbis-to-UD"));
- if (si->UDmapping != NULL) {
- dprintf("----: UDmapping found\n");
- CFRetain(si->UDmapping);
- } else
- ret = 0;
- }
- CFRelease(props);
- }
- CFRelease(data);
- }
- CFRelease(mdmurl);
- }
+#if TARGET_OS_WIN32
+ {
+ Handle mapplist;
+ OSErr err = GetComponentResource((Component)globals->self, 'MDCf', kImporterResID, &mapplist);
+ if (err == noErr) {
+ long mpl_size = GetHandleSize(mapplist);
+ HLock(mapplist);
+ props = pxml_parse_plist((unsigned char *) *mapplist, mpl_size);
+ HUnlock(mapplist);
+ }
+ }
+#else
+ {
+ CFBundleRef bundle;
+ CFURLRef mdmurl;
+ CFDataRef data;
+ SInt32 error = 0;
+ CFStringRef errorString;
- return ret;
+ bundle = CFBundleGetBundleWithIdentifier(CFSTR(kOggVorbisBundleID));
+
+ if (bundle == NULL)
+ return 0;
+
+ mdmurl = CFBundleCopyResourceURL(bundle, CFSTR("MetaDataConfig"), CFSTR("plist"), NULL);
+ if (mdmurl != NULL) {
+ if (CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, mdmurl, &data, NULL, NULL, &error)) {
+ props = (CFDictionaryRef) CFPropertyListCreateFromXMLData(kCFAllocatorDefault, data,
+ kCFPropertyListImmutable, &errorString);
+ CFRelease(data);
+ }
+ CFRelease(mdmurl);
+ }
+ }
+#endif /* TARGET_OS_WIN32 */
+
+ if (props != NULL) {
+ if (CFGetTypeID(props) == CFDictionaryGetTypeID()) {
+ si->MDmapping = (CFDictionaryRef) CFDictionaryGetValue(props, CFSTR("Vorbis-to-MD"));
+ if (si->MDmapping != NULL) {
+ dbg_printf("----: MDmapping found\n");
+ CFRetain(si->MDmapping);
+ ret = 1;
+ }
+ si->UDmapping = (CFDictionaryRef) CFDictionaryGetValue(props, CFSTR("Vorbis-to-UD"));
+ if (si->UDmapping != NULL) {
+ dbg_printf("----: UDmapping found\n");
+ CFRetain(si->UDmapping);
+ } else
+ ret = 0;
+ }
+ CFRelease(props);
+ }
+
+ return ret;
}
-static int LookupTagUD(StreamInfoPtr si, const char *str, long *osType) {
- int ret = -1;
- long len;
+static int LookupTagUD(OggImportGlobalsPtr globals, StreamInfoPtr si, const char *str, long *osType) {
+ int ret = -1;
+ long len;
- if (si->UDmapping == NULL)
+ if (si->UDmapping == NULL)
{
- if (!InitialiseMetaDataMappings(si))
- return -1;
+ if (!InitialiseMetaDataMappings(globals, si))
+ return -1;
}
-
+
len = strcspn(str, "=");
if (len > 0) {
@@ -418,10 +461,11 @@
if (tmpkstr != NULL) {
CFMutableStringRef keystr = CFStringCreateMutableCopy(NULL, len + 1, tmpkstr);
if (keystr != NULL) {
- CFLocaleRef loc = CFLocaleCopyCurrent();
+ //CFLocaleRef loc = CFLocaleCopyCurrent();
+ CFLocaleRef loc = NULL;
CFStringUppercase(keystr, loc);
- CFRelease(loc);
- dprintf("--- luTud: %s [%s]\n", (char *)str, (char *)CFStringGetCStringPtr(keystr,kCFStringEncodingUTF8));
+ //CFRelease(loc);
+ dbg_printf("--- luTud: %s [%s]\n", (char *)str, (char *)CFStringGetCStringPtr(keystr,kCFStringEncodingUTF8));
if (CFDictionaryContainsKey(si->UDmapping, keystr)) {
CFStringRef udkey = (CFStringRef) CFDictionaryGetValue(si->UDmapping, keystr);
@@ -430,7 +474,7 @@
(CFStringGetCharacterAtIndex(udkey, 2) & 0xff) << 8 |
(CFStringGetCharacterAtIndex(udkey, 3) & 0xff);
- dprintf("--- luTud: %s [%s]\n", (char *)str, (char *)keystr);
+ dbg_printf("--- luTud: %s [%s]\n", (char *)str, (char *)keystr);
ret = len + 1;
}
CFRelease(keystr);
@@ -442,16 +486,16 @@
return ret;
}
-static int LookupTagMD(StreamInfoPtr si, const char *str, long *osType) {
- int ret = -1;
- long len;
+static int LookupTagMD(OggImportGlobalsPtr globals, StreamInfoPtr si, const char *str, long *osType) {
+ int ret = -1;
+ long len;
- if (si->MDmapping == NULL)
+ if (si->MDmapping == NULL)
{
- if (!InitialiseMetaDataMappings(si))
- return -1;
+ if (!InitialiseMetaDataMappings(globals, si))
+ return -1;
}
-
+
len = strcspn(str, "=");
if (len > 0) {
@@ -459,10 +503,11 @@
if (tmpkstr != NULL) {
CFMutableStringRef keystr = CFStringCreateMutableCopy(NULL, len + 1, tmpkstr);
if (keystr != NULL) {
- CFLocaleRef loc = CFLocaleCopyCurrent();
+ //CFLocaleRef loc = CFLocaleCopyCurrent();
+ CFLocaleRef loc = NULL;
CFStringUppercase(keystr, loc);
- CFRelease(loc);
- dprintf("--- luTmd: %s [%s]\n", (char *)str, (char *)CFStringGetCStringPtr(keystr,kCFStringEncodingUTF8));
+ //CFRelease(loc);
+ dbg_printf("--- luTmd: %s [%s]\n", (char *)str, (char *)CFStringGetCStringPtr(keystr,kCFStringEncodingUTF8));
if (CFDictionaryContainsKey(si->MDmapping, keystr)) {
CFStringRef mdkey = (CFStringRef) CFDictionaryGetValue(si->MDmapping, keystr);
@@ -471,7 +516,7 @@
(CFStringGetCharacterAtIndex(mdkey, 2) & 0xff) << 8 |
(CFStringGetCharacterAtIndex(mdkey, 3) & 0xff);
- dprintf("--- luTmd: %s [%s]\n", (char *)str, (char *)keystr);
+ dbg_printf("--- luTmd: %s [%s]\n", (char *)str, (char *)keystr);
ret = len + 1;
}
CFRelease(keystr);
@@ -483,110 +528,87 @@
return ret;
}
-static ComponentResult ConvertUTF8toScriptCode(const char *str, Handle *h, ScriptCode *script)
+static ComponentResult ConvertUTF8toScriptCode(const char *str, Handle *h)
{
- TextEncoding sourceEncoding = CreateTextEncoding(kTextEncodingUnicodeV3_0, kUnicodeNoSubset, kUnicodeUTF8Format);
- TextEncoding destEncoding = CreateTextEncoding(kTextEncodingMacRoman, kTextEncodingDefaultVariant, kTextEncodingDefaultFormat);
- TECObjectRef converter;
- Handle temp;
- int length = strlen(str);
- int tempLen = length * 2;
-
- OSErr err = TECCreateConverter(&converter, sourceEncoding, destEncoding);
- if (err != noErr)
- return err;
+ CFStringEncoding encoding = 0;
+ CFIndex numberOfCharsConverted = 0, usedBufferLength = 0;
+ OSStatus ret = noErr;
- *script = 0;
- *h = NULL;
+ CFStringRef tmpstr = CFStringCreateWithBytes(NULL, str, strlen(str), kCFStringEncodingUTF8, true);
+ if (tmpstr == NULL)
+ return kTextUnsupportedEncodingErr; //!??!?!
- temp = NewHandle(tempLen);
- if (temp == NULL)
- return memFullErr;
+ encoding = kCFStringEncodingMacRoman;
- while (1)
- {
- ByteCount actualIn, actualOut, flushOut;
+ if (ret == noErr) {
+ CFRange range = { 0, CFStringGetLength(tmpstr)};
+ numberOfCharsConverted = CFStringGetBytes(tmpstr, range, encoding, 0, false,
+ NULL, 0, &usedBufferLength);
+ if ((numberOfCharsConverted == CFStringGetLength(tmpstr)) && (usedBufferLength > 0)) {
+ *h = NewHandleClear(usedBufferLength);
+ if (*h != NULL) {
+ HLock(*h);
- HLock(temp);
- actualIn = 0;
- flushOut = 0;
-
- err = TECConvertText(converter, (ConstTextPtr)str, length, &actualIn, (TextPtr)*temp, tempLen, &actualOut);
- if (length == actualIn || actualOut < tempLen - 20)
- {
- if (err == noErr)
- err = TECFlushText(converter, (TextPtr) ((*temp) + actualOut), tempLen - actualOut, &flushOut);
- HUnlock(temp);
- SetHandleSize(temp, actualOut + flushOut);
- *h = temp;
- temp = NULL;
- err = noErr; // ignore and supress conversion errors
- break;
- }
- else
- {
- HUnlock(temp);
- tempLen += length;
- SetHandleSize(temp, tempLen);
- err = MemError();
- if (err != noErr)
- break;
- }
- }
-
- if (temp != NULL)
- DisposeHandle(temp);
+ numberOfCharsConverted = CFStringGetBytes(tmpstr, range, encoding, 0,
+ false, **h, usedBufferLength,
+ &usedBufferLength);
+ HUnlock(*h);
+ } else {
+ ret = MemError();
+ }
+ } else {
+ ret = kTextUnsupportedEncodingErr;
+ }
+ }
- TECDisposeConverter(converter);
+ CFRelease(tmpstr);
- return err;
+ return ret;
}
-static ComponentResult AddCommentToMetaData(StreamInfoPtr si, const char *str, int len, QTMetaDataRef md) {
- ComponentResult ret = noErr;
- long tag;
+static ComponentResult AddCommentToMetaData(OggImportGlobalsPtr globals, StreamInfoPtr si, const char *str, int len, QTMetaDataRef md) {
+ ComponentResult ret = noErr;
+ long tag;
- int tagLen = LookupTagMD(si, str, &tag);
- Handle h;
- ScriptCode script;
-
-
+ int tagLen = LookupTagMD(globals, si, str, &tag);
+ Handle h;
+
if (tagLen != -1 && str[tagLen] != '\0') {
- dprintf("-- TAG: %08lx\n", tag);
+ dbg_printf("-- TAG: %08lx\n", tag);
- ret = QTMetaDataAddItem(md, kQTMetaDataStorageFormatQuickTime, kQTMetaDataKeyFormatCommon,
- &tag, sizeof(tag), str + tagLen, len - tagLen, kQTMetaDataTypeUTF8, NULL);
- dprintf("-- TAG: %4.4s :: QT = %ld\n", (char *)&tag, (long)ret);
- }
-
- tagLen = LookupTagUD(si, str, &tag);
-
+ ret = QTMetaDataAddItem(md, kQTMetaDataStorageFormatQuickTime, kQTMetaDataKeyFormatCommon,
+ &tag, sizeof(tag), str + tagLen, len - tagLen, kQTMetaDataTypeUTF8, NULL);
+ dbg_printf("-- TAG: %4.4s :: QT = %ld\n", (char *)&tag, (long)ret);
+ }
+
+ tagLen = LookupTagUD(globals, si, str, &tag);
+
if (tagLen != -1 && str[tagLen] != '\0') {
- QTMetaDataItem mdi;
- char * localestr = "en";
- Handle localeh = NewEmptyHandle();
-
- PtrAndHand(&localestr, localeh, strlen(localestr));
+ QTMetaDataItem mdi;
+ char * localestr = "en";
+ Handle localeh = NewEmptyHandle();
- dprintf("-- TAG: %08lx\n", tag);
+ PtrAndHand(&localestr, localeh, strlen(localestr));
- ret = ConvertUTF8toScriptCode(str + tagLen, &h, &script);
- if (ret == noErr) {
- HLock(h);
- ret = QTMetaDataAddItem(md, kQTMetaDataStorageFormatUserData, kQTMetaDataKeyFormatUserData,
- &tag, sizeof(tag), *h, GetHandleSize(h), kQTMetaDataTypeMacEncodedText, &mdi);
- dprintf("-- TAG: %4.4s :: QT[X] = %ld\n", (char *)&tag, (long)ret);
- HUnlock(h);
- if (ret == noErr) {
- ret = QTMetaDataSetItemProperty(md, mdi, kPropertyClass_MetaDataItem, kQTMetaDataItemPropertyID_Locale,
- GetHandleSize(localeh), *h);
- dprintf("-- TAG: %4.4s :: QT[X] locale (%5.5s)= %ld\n", (char *)&tag, *h, (long)ret);
- }
- DisposeHandle(h);
- }
- }
+ dbg_printf("-- TAG: %08lx\n", tag);
- return ret;
+ ret = ConvertUTF8toScriptCode(str + tagLen, &h);
+ if (ret == noErr) {
+ HLock(h);
+ ret = QTMetaDataAddItem(md, kQTMetaDataStorageFormatUserData, kQTMetaDataKeyFormatUserData,
+ &tag, sizeof(tag), *h, GetHandleSize(h), kQTMetaDataTypeMacEncodedText, &mdi);
+ dbg_printf("-- TAG: %4.4s :: QT[X] = %ld\n", (char *)&tag, (long)ret);
+ HUnlock(h);
+ if (ret == noErr) {
+ ret = QTMetaDataSetItemProperty(md, mdi, kPropertyClass_MetaDataItem, kQTMetaDataItemPropertyID_Locale,
+ GetHandleSize(localeh), *h);
+ dbg_printf("-- TAG: %4.4s :: QT[X] locale (%5.5s)= %ld\n", (char *)&tag, *h, (long)ret);
+ }
+ DisposeHandle(h);
+ }
+ }
+
+ return ret;
}
ComponentResult DecodeCommentsQT(OggImportGlobalsPtr globals, StreamInfoPtr si, vorbis_comment *vc)
@@ -603,10 +625,10 @@
for (i = 0; i < vc->comments; i++)
{
- ret = AddCommentToMetaData(si, vc->user_comments[i], vc->comment_lengths[i], md);
+ ret = AddCommentToMetaData(globals, si, vc->user_comments[i], vc->comment_lengths[i], md);
if (ret != noErr) {
//break;
- dprintf("AddCommentToMetaData() failed? = %d\n", ret);
+ dbg_printf("AddCommentToMetaData() failed? = %d\n", ret);
}
}
@@ -620,10 +642,10 @@
for (i = 0; i < vc->comments; i++)
{
- ret = AddCommentToMetaData(si, vc->user_comments[i], vc->comment_lengths[i], md);
+ ret = AddCommentToMetaData(globals, si, vc->user_comments[i], vc->comment_lengths[i], md);
if (ret != noErr) {
//break;
- dprintf("AddCommentToMetaData() failed? = %d\n", ret);
+ dbg_printf("AddCommentToMetaData() failed? = %d\n", ret);
}
}
@@ -653,17 +675,17 @@
err = CreateSampleDescription(si);
if (err == noErr)
{
- dprintf("! -- SampleDescription created OK\n");
+ dbg_printf("! -- SampleDescription created OK\n");
si->theTrack = NewMovieTrack(globals->theMovie, 0, 0, kFullVolume);
if (si->theTrack)
{
- dprintf("! -- MovieTrack created OK\n");
- dprintf("! -- calling => NewTrackMedia(%lx)\n", si->rate);
+ dbg_printf("! -- MovieTrack created OK\n");
+ dbg_printf("! -- calling => NewTrackMedia(%lx)\n", si->rate);
si->theMedia = NewTrackMedia(si->theTrack, SoundMediaType,
si->rate, globals->dataRef, globals->dataRefType);
if (si->theMedia)
{
- dprintf("! -- TrackMedia created OK\n");
+ dbg_printf("! -- TrackMedia created OK\n");
SetTrackEnabled(si->theTrack, true);
si->lastGranulePos = 0;
@@ -704,14 +726,6 @@
return err;
}
-#ifndef NDEBUG
-int logg_page_last_packet_incomplete(ogg_page *op)
-{
- unsigned char *header = op->header;
- return (header[26 + header[26]] == 255);
-}
-#endif /* NDEBUG */
-
static ComponentResult ProcessStreamPage(OggImportGlobalsPtr globals, StreamInfoPtr si, ogg_page *opg) {
ComponentResult ret = noErr;
@@ -753,12 +767,13 @@
serialno = ogg_page_serialno(op);
- dprintf(" - = page found, nr: %08lx\n", ogg_page_pageno(op));
+ dbg_printf(" - = page found, nr: %08lx\n", ogg_page_pageno(op));
if (ogg_page_bos(op)) {
- dprintf(" - = new stream found: %lx\n" , serialno);
- stream_format_handle_funcs *ff = find_stream_support(op);
+ stream_format_handle_funcs *ff = NULL;
+ dbg_printf(" - = new stream found: %lx\n" , serialno);
+ ff = find_stream_support(op);
if (ff != NULL) {
- dprintf(" - == And a supported one!\n");
+ dbg_printf(" - == And a supported one!\n");
ret = OpenStream(globals, serialno, op, ff);
if (ret == noErr) {
@@ -791,18 +806,18 @@
return ret;
}
-static ComponentResult GetFileSize(OggImportGlobalsPtr globals);
+static ComponentResult XQTGetFileSize(OggImportGlobalsPtr globals);
static ComponentResult StateProcess(OggImportGlobalsPtr globals) {
ComponentResult result = noErr;
ogg_page og;
Boolean process = true;
- dprintf("-----= StateProcess() called\n");
+ dbg_printf("-----= StateProcess() called\n");
while (process) {
switch (globals->state) {
case kStateInitial:
- dprintf(" - (:kStateInitial:)\n");
+ dbg_printf(" - (:kStateInitial:)\n");
globals->dataOffset = globals->dataStartOffset;
globals->numTracksSeen = 0;
globals->timeLoaded = 0;
@@ -812,7 +827,7 @@
if (S64Compare(globals->dataEndOffset, S64Set(-1)) == 0) {
globals->sizeInitialised = false;
globals->state = kStateGettingSize;
- result = GetFileSize(globals);
+ result = XQTGetFileSize(globals);
if (!globals->sizeInitialised)
process = false;
} else
@@ -821,7 +836,7 @@
break;
case kStateGettingSize:
- dprintf(" - (:kStateGettingSize:)\n");
+ dbg_printf(" - (:kStateGettingSize:)\n");
if (!globals->sizeInitialised) {
process = false;
break;
@@ -831,7 +846,7 @@
break;
case kStateReadingPages:
- dprintf(" - (:kStateReadingPages:)\n");
+ dbg_printf(" - (:kStateReadingPages:)\n");
if (globals->dataRequested) {
DataHTask(globals->dataReader);
process = false;
@@ -854,21 +869,21 @@
break;
case kStateReadingLastPages:
- dprintf(" - (:kStateReadingLastPages:)\n");
+ dbg_printf(" - (:kStateReadingLastPages:)\n");
globals->currentData = rb_data(&globals->dataRB);
globals->validDataEnd = globals->currentData + rb_data_available(&globals->dataRB);
- dprintf(" + (:kStateReadingLastPages:)\n");
+ dbg_printf(" + (:kStateReadingLastPages:)\n");
while (FindPage(&globals->currentData, globals->validDataEnd, &og)) {
result = ProcessPage(globals, &og);
- dprintf(" <- (:kStateReadingLastPages:) = %ld\n", (long)result);
+ dbg_printf(" <- (:kStateReadingLastPages:) = %ld\n", (long)result);
}
globals->state = kStateImportComplete;
break;
case kStateImportComplete:
- dprintf(" - (:kStateImportComplete:)\n");
+ dbg_printf(" - (:kStateImportComplete:)\n");
process = false;
break;
}
@@ -883,23 +898,23 @@
OggImportGlobalsPtr globals = (OggImportGlobalsPtr) refcon;
ComponentResult result = readErr;
- dprintf("---> ReadCompletion() called\n");
+ dbg_printf("---> ReadCompletion() called\n");
if (readErr == noErr)
{
- dprintf("--1- ReadCompletion() :: noErr\n");
+ dbg_printf("--1- ReadCompletion() :: noErr\n");
rb_sync_reserved(&globals->dataRB);
globals->dataRequested = false;
if (globals->idleManager != NULL) {
- dprintf("--2- ReadCompletion() :: requesting Idle\n");
+ dbg_printf("--2- ReadCompletion() :: requesting Idle\n");
QTIdleManagerSetNextIdleTimeNow(globals->idleManager);
}
}
if (result != noErr)
{
- dprintf("--3- ReadCompletion() :: !noErr - %ld (%lx), eofErr: %d\n", result, result, result == eofErr);
+ dbg_printf("--3- ReadCompletion() :: !noErr - %ld (%lx), eofErr: %d\n", result, result, result == eofErr);
if (result == eofErr) {
result = noErr;
@@ -914,7 +929,7 @@
CloseAllStreams(globals);
}
- dprintf("---< ReadCompletion()\n");
+ dbg_printf("---< ReadCompletion()\n");
}
@@ -923,7 +938,7 @@
{
OggImportGlobalsPtr globals = (OggImportGlobalsPtr) refcon;
- dprintf("----- FileSizeCompletion() called = %ld\n", (long) readErr);
+ dbg_printf("----- FileSizeCompletion() called = %ld\n", (long) readErr);
if (readErr == noErr)
{
globals->dataEndOffset = WideToSInt64(globals->wideTempforFileSize);
@@ -932,20 +947,20 @@
}
}
-static ComponentResult GetFileSize(OggImportGlobalsPtr globals)
+static ComponentResult XQTGetFileSize(OggImportGlobalsPtr globals)
{
ComponentResult err = badComponentSelector;
wide size;
- dprintf("---> GetFileSize() called\n");
+ dbg_printf("---> XQTGetFileSize() called\n");
if (globals->usingIdle && globals->dataCanDoGetFileSizeAsync && false) {
err = DataHGetFileSizeAsync(globals->dataReader, &globals->wideTempforFileSize,
globals->fileSizeCompletion, (long) globals);
- dprintf("---- :: async size, err: %ld (%lx)\n", (long)err, (long)err);
+ dbg_printf("---- :: async size, err: %ld (%lx)\n", (long)err, (long)err);
} else if (globals->dataCanDoGetFileSize64) {
err = DataHGetFileSize64(globals->dataReader, &size);
- dprintf("---- :: size: %ld%ld, err: %ld (%lx)\n", size.hi, size.lo, (long)err, (long)err);
+ dbg_printf("---- :: size: %ld%ld, err: %ld (%lx)\n", size.hi, size.lo, (long)err, (long)err);
globals->readError = err;
if (err == noErr) {
globals->dataEndOffset = WideToSInt64(size);
@@ -957,7 +972,7 @@
err = noErr;
}
- dprintf("---< GetFileSize() = %ld (%lx)\n", (long) err, (long) err);
+ dbg_printf("---< XQTGetFileSize() = %ld (%lx)\n", (long) err, (long) err);
return err;
}
@@ -978,7 +993,7 @@
/* if limits have not been set, then try to get the size of the file. */
if (S64Compare(globals->dataEndOffset, S64Set(-1)) == 0) {
- ret = GetFileSize(globals);
+ ret = XQTGetFileSize(globals);
}
if (ret != noErr)
@@ -993,7 +1008,7 @@
if (ret == eofErr)
ret = noErr;
- dprintf("-<<- JustImport(): %ld\n", (long)ret);
+ dbg_printf("-<<- JustImport(): %ld\n", (long)ret);
return ret;
}
@@ -1002,7 +1017,7 @@
{
ComponentResult err = noErr;
- dprintf("---> SetupDataHandler(type: '%4.4s') called\n", &dataRefType);
+ dbg_printf("---> SetupDataHandler(type: '%4.4s') called\n", &dataRefType);
if (globals->dataReader == NULL)
{
Component dataHComponent = NULL;
@@ -1020,12 +1035,12 @@
cdesc.componentFlags = kAnyComponentFlagsMask;
cdesc.componentFlagsMask = kAnyComponentFlagsMask;
- dprintf("---- >> CountComponents(urlDataHandlers): %ld\n", CountComponents(&cdesc));
+ dbg_printf("---- >> CountComponents(urlDataHandlers): %ld\n", CountComponents(&cdesc));
count = 6;
while (count-- > 0) {
dataHComponent = FindNextComponent(dataHComponent, &cdesc);
GetComponentInfo(dataHComponent, &cd, cname, NULL, NULL);
- dprintf("---- ->-> component desc: %s, manu: %4.4s\n", *cname, &cd.componentManufacturer);
+ dbg_printf("---- ->-> component desc: %s, manu: %4.4s\n", *cname, &cd.componentManufacturer);
}
} else {
@@ -1037,18 +1052,18 @@
err = OpenAComponent(dataHComponent, &globals->dataReader);
- dprintf("---- >> OpenAComponent() = %ld\n", (long)err);
+ dbg_printf("---- >> OpenAComponent() = %ld\n", (long)err);
if (err == noErr)
{
err = DataHSetDataRef(globals->dataReader, dataRef);
- dprintf("---- >> DataHSetDataRef() = %ld\n", (long)err);
+ dbg_printf("---- >> DataHSetDataRef() = %ld\n", (long)err);
if (err == noErr)
err = DataHOpenForRead(globals->dataReader);
#if 0
else {
Boolean wc;
err = DataHResolveDataRef(globals->dataReader, dataRef, &wc, false);
- dprintf("---- >> DataHResolveDataRef() = %ld\n", (long)err);
+ dbg_printf("---- >> DataHResolveDataRef() = %ld\n", (long)err);
err = noErr;
}
#endif
@@ -1073,7 +1088,7 @@
err = DataHGetPreferredBlockSize(globals->dataReader, &blockSize);
if (err == noErr && blockSize < globals->dataReadChunkSize && blockSize > 1024)
globals->dataReadChunkSize = blockSize;
- dprintf(" - allocating buffer, size: %d (prefBlockSize: %ld); ret = %ld\n",
+ dbg_printf(" - allocating buffer, size: %d (prefBlockSize: %ld); ret = %ld\n",
globals->dataReadChunkSize, blockSize, (long)err);
err = noErr; /* ignore any error and use our default read block size */
@@ -1110,7 +1125,7 @@
if (err == noErr && (flags & kDataHInfoFlagNeverStreams))
globals->dataIsStream = false;
err = noErr;
- dprintf("---- -:: InfoFlags: NeverStreams: %d, CanUpdate...: %d, NeedsNet: %d\n",
+ dbg_printf("---- -:: InfoFlags: NeverStreams: %d, CanUpdate...: %d, NeedsNet: %d\n",
(flags & kDataHInfoFlagNeverStreams) != 0,
(flags & kDataHInfoFlagCanUpdateDataRefs) != 0,
(flags & kDataHInfoFlagNeedsNetworkBandwidth) != 0);
@@ -1118,7 +1133,7 @@
}
}
- dprintf("---< SetupDataHandler() = %ld\n", (long)err);
+ dbg_printf("---< SetupDataHandler() = %ld\n", (long)err);
return err;
}
@@ -1132,7 +1147,7 @@
{
OSErr result;
- dprintf("-- Open() called\n");
+ dbg_printf("-- Open() called\n");
globals = (OggImportGlobalsPtr)NewPtrClear(sizeof(OggImportGlobals));
if (globals != nil)
{
@@ -1158,7 +1173,7 @@
ComponentResult result;
(void)self;
- dprintf("-- Close() called\n");
+ dbg_printf("-- Close() called\n");
if (globals != nil) // we have some globals
{
if (globals->streamInfoHandle)
@@ -1206,7 +1221,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENTFUNC OggImportVersion(OggImportGlobalsPtr globals)
{
- dprintf("-- Version() called\n");
+ dbg_printf("-- Version() called\n");
return kOgg_eat__Version;
}
@@ -1214,7 +1229,7 @@
COMPONENTFUNC OggImportSetOffsetAndLimit64(OggImportGlobalsPtr globals, const wide *offset,
const wide *limit)
{
- dprintf("-- SetOffsetAndLimit64(%ld%ld, %ld%ld) called\n", offset->hi, offset->lo, limit->hi, limit->lo);
+ dbg_printf("-- SetOffsetAndLimit64(%ld%ld, %ld%ld) called\n", offset->hi, offset->lo, limit->hi, limit->lo);
globals->dataStartOffset = WideToSInt64(*offset);
globals->dataEndOffset = WideToSInt64(*limit);
@@ -1225,7 +1240,7 @@
COMPONENTFUNC OggImportSetOffsetAndLimit(OggImportGlobalsPtr globals, unsigned long offset,
unsigned long limit)
{
- dprintf("-- SetOffsetAndLimit(%ld, %ld) called\n", offset, limit);
+ dbg_printf("-- SetOffsetAndLimit(%ld, %ld) called\n", offset, limit);
globals->dataStartOffset = S64SetU(offset);
globals->dataEndOffset = S64SetU(limit);
@@ -1242,7 +1257,7 @@
ComponentResult err = noErr;
UInt8 extvalid = 0;
- dprintf("-- Validate() called\n");
+ dbg_printf("-- Validate() called\n");
if (theFile == NULL)
{
Handle dataHandle = NewHandle(sizeof(HandleDataRefRecord));
@@ -1287,7 +1302,7 @@
UInt8 * valid)
{
ComponentResult err = noErr;
- dprintf("-- ValidateDataRef() called\n");
+ dbg_printf("-- ValidateDataRef() called\n");
*valid = 128;
@@ -1304,7 +1319,7 @@
ComponentResult err = noErr;
AliasHandle alias = NULL;
- dprintf("-- File() called\n");
+ dbg_printf("-- File() called\n");
*outFlags = 0;
@@ -1335,7 +1350,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENTFUNC OggImportGetMIMETypeList(OggImportGlobalsPtr globals, QTAtomContainer *retMimeInfo)
{
- dprintf("-- GetMIMETypeList() called\n");
+ dbg_printf("-- GetMIMETypeList() called\n");
return GetComponentResource((Component)globals->self, FOUR_CHAR_CODE('mime'), kImporterResID, (Handle *)retMimeInfo);
}
@@ -1343,7 +1358,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENTFUNC OggImportGetFileType(OggImportGlobalsPtr globals, OSType *fileType)
{
- dprintf("-- GetFileType() called\n");
+ dbg_printf("-- GetFileType() called\n");
*fileType = kCodecFormat;
return noErr;
}
@@ -1353,7 +1368,7 @@
{
ComponentResult err = noErr;
- dprintf("-- ImportSetChunkSize(%ld) called\n", chunkSize);
+ dbg_printf("-- ImportSetChunkSize(%ld) called\n", chunkSize);
if (chunkSize > 2048 && chunkSize < 204800)
globals->chunkSize = chunkSize;
else
@@ -1368,7 +1383,7 @@
long *outFlags)
{
ComponentResult err = noErr;
- dprintf("-> Idle() called [%08lx]\n", (long)globals);
+ dbg_printf("-> Idle() called [%08lx]\n", (long)globals);
if (globals->state == kStateImportComplete) {
*outFlags |= movieImportResultComplete;
@@ -1386,10 +1401,10 @@
QTIdleManagerNeedsAnIdle(globals->idleManager, &needs);
if (needs) {
QTIdleManagerGetNextIdleTime(globals->idleManager, &ni);
- dprintf("-- -- IdleManager :: requested: base: %ld, scale: %ld, value: %ld %ld\n", (long)ni.base, ni.scale,
+ dbg_printf("-- -- IdleManager :: requested: base: %ld, scale: %ld, value: %ld %ld\n", (long)ni.base, ni.scale,
ni.value.hi, ni.value.lo);
} else {
- dprintf("-- -- IdleManager :: not needed\n");
+ dbg_printf("-- -- IdleManager :: not needed\n");
}
}
@@ -1397,16 +1412,16 @@
QTIdleManagerNeedsAnIdle(globals->dataIdleManager, &needs);
if (needs) {
QTIdleManagerGetNextIdleTime(globals->dataIdleManager, &ni);
- dprintf("-- -- DataIdleManager :: requested: base: %ld, scale: %ld, value: %ld %ld\n", (long)ni.base, ni.scale,
+ dbg_printf("-- -- DataIdleManager :: requested: base: %ld, scale: %ld, value: %ld %ld\n", (long)ni.base, ni.scale,
ni.value.hi, ni.value.lo);
} else {
- dprintf("-- -- DataIdleManager :: not needed\n");
+ dbg_printf("-- -- DataIdleManager :: not needed\n");
}
}
}
#endif
- dprintf("-< Idle: %ld [%08lx]\n", (long)err, (long)globals);
+ dbg_printf("-< Idle: %ld [%08lx]\n", (long)err, (long)globals);
return err;
}
@@ -1424,25 +1439,25 @@
globals->theMovie = theMovie;
globals->startTime = atTime;
- dprintf("-- DataRef(at:%ld) called\n", atTime);
+ dbg_printf("-- DataRef(at:%ld) called\n", atTime);
if (GetHandleSize(dataRef) < 256) {
- dprintf("-- - DataRef: \"%s\"\n", *dataRef);
+ dbg_printf("-- - DataRef: \"%s\"\n", *dataRef);
} else {
- dprintf("-- - DataRef: '%c'\n", *dataRef[0]);
+ dbg_printf("-- - DataRef: '%c'\n", *dataRef[0]);
}
- dprintf(" theMovie: %lx, targetTrack: %lx\n", theMovie, targetTrack);
- dprintf(" track count: %ld\n", GetMovieTrackCount(theMovie));
- dprintf(" flags:\n\tmovieImportCreateTrack:%d\n\tmovieImportInParallel:%d\n"
+ dbg_printf(" theMovie: %lx, targetTrack: %lx\n", theMovie, targetTrack);
+ dbg_printf(" track count: %ld\n", GetMovieTrackCount(theMovie));
+ dbg_printf(" flags:\n\tmovieImportCreateTrack:%d\n\tmovieImportInParallel:%d\n"
"\tmovieImportMustUseTrack:%d\n\tmovieImportWithIdle:%d\n",
(inFlags & movieImportCreateTrack) != 0,
(inFlags & movieImportInParallel) != 0,
(inFlags & movieImportMustUseTrack) != 0,
(inFlags & movieImportWithIdle) != 0);
- dprintf(" : importing at: %ld, added: %ld\n", atTime, *durationAdded);
+ dbg_printf(" : importing at: %ld, added: %ld\n", atTime, *durationAdded);
err = SetupDataHandler(globals, dataRef, dataRefType);
if (err == noErr)
- dprintf(" SetupDataHandler() succeeded\n");
+ dbg_printf(" SetupDataHandler() succeeded\n");
globals->usingIdle = ((globals->dataIsStream || globals->dataCanDoAsyncRead)
//&& globals->dataCanDoGetFileSizeAsync
@@ -1450,7 +1465,7 @@
if (dataRefType != URLDataHandlerSubType)
globals->usingIdle = false;
- dprintf("--> 2: globals->usingIdle: %d\n", globals->usingIdle);
+ dbg_printf("--> 2: globals->usingIdle: %d\n", globals->usingIdle);
if (globals->usingIdle) {
err = StartImport(globals, dataRef, dataRefType);
@@ -1470,14 +1485,14 @@
//globals->usingIdle = true;
//*outFlags |= movieImportResultNeedIdles;
- dprintf("-< DataRef(at:%ld)\n", atTime);
+ dbg_printf("-< DataRef(at:%ld)\n", atTime);
return err;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENTFUNC OggImportGetLoadState(OggImportGlobalsPtr globals, long *loadState)
{
- dprintf("-- GetLoadState() called\n");
+ dbg_printf("-- GetLoadState() called\n");
switch (globals->state)
{
case kStateInitial:
@@ -1505,7 +1520,7 @@
break;
}
- dprintf("-- GetLoadState returning %ld\n", *loadState);
+ dbg_printf("-- GetLoadState returning %ld\n", *loadState);
return noErr;
}
@@ -1513,7 +1528,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENTFUNC OggImportGetMaxLoadedTime(OggImportGlobalsPtr globals, TimeValue *time)
{
- dprintf("-- GetMaxLoadedTime() called: %8ld (at: %ld)\n", globals->timeLoaded, TickCount());
+ dbg_printf("-- GetMaxLoadedTime() called: %8ld (at: %ld)\n", globals->timeLoaded, TickCount());
*time = globals->timeLoaded;
@@ -1528,7 +1543,7 @@
SInt64 dataLeft = S64Subtract(globals->dataEndOffset, globals->dataOffset);
SInt64 ratio = S64Div(S64Multiply(S64Set(timeUsed), dataLeft), dataUsed);
- dprintf("-- EstimateCompletionTime() called: ratio = %lld\n", ratio);
+ dbg_printf("-- EstimateCompletionTime() called: ratio = %lld\n", ratio);
time->value = SInt64ToWide(ratio);
time->scale = 60;
@@ -1541,7 +1556,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENTFUNC OggImportSetDontBlock(OggImportGlobalsPtr globals, Boolean dontBlock)
{
- dprintf("-- SetDontBlock(%d) called\n", dontBlock);
+ dbg_printf("-- SetDontBlock(%d) called\n", dontBlock);
globals->blocking = dontBlock;
return noErr;
}
@@ -1549,7 +1564,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENTFUNC OggImportGetDontBlock(OggImportGlobalsPtr globals, Boolean *willBlock)
{
- dprintf("-- GetDontBlock() called\n");
+ dbg_printf("-- GetDontBlock() called\n");
*willBlock = globals->blocking;
return noErr;
}
@@ -1559,7 +1574,7 @@
{
ComponentResult err = noErr;
- dprintf("-- SetIdleManager() called\n");
+ dbg_printf("-- SetIdleManager() called\n");
globals->idleManager = im;
if (globals->dataReader)
@@ -1569,18 +1584,18 @@
globals->dataIdleManager = QTIdleManagerOpen();
if (globals->dataIdleManager != NULL) {
err = DataHSetIdleManager(globals->dataReader, im);
- dprintf("-- -- SetIdleManager(dataReader) = %ld\n", (long)err);
+ dbg_printf("-- -- SetIdleManager(dataReader) = %ld\n", (long)err);
if (err != noErr) {
QTIdleManagerClose(globals->dataIdleManager);
err = noErr;
} else {
err = QTIdleManagerSetParent(globals->dataIdleManager, globals->idleManager);
- dprintf("-- -- SetParentIdleManager() = %ld\n", (long)err);
+ dbg_printf("-- -- SetParentIdleManager() = %ld\n", (long)err);
err = noErr;
}
}
} else {
- dprintf("-- -- SetIdleManager(dataReader) = DOESN'T SUPPORT IDLE!!\n");
+ dbg_printf("-- -- SetIdleManager(dataReader) = DOESN'T SUPPORT IDLE!!\n");
}
}
@@ -1591,7 +1606,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENTFUNC OggImportSetNewMovieFlags(OggImportGlobalsPtr globals, long flags)
{
- dprintf("-- SetNewMovieFlags() called: %08lx\n", flags);
+ dbg_printf("-- SetNewMovieFlags() called: %08lx\n", flags);
globals->newMovieFlags = flags;
return noErr;
Modified: trunk/xiph-qt/OggImport/src/OggImport.r
===================================================================
--- trunk/xiph-qt/OggImport/src/OggImport.r 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/OggImport/src/OggImport.r 2005-12-10 16:22:13 UTC (rev 10574)
@@ -29,19 +29,27 @@
*/
-#define TARGET_REZ_CARBON_MACHO 1
-
#define thng_RezTemplateVersion 2
#define cfrg_RezTemplateVersion 1
-#include <Carbon/Carbon.r>
+#ifdef TARGET_REZ_MAC_PPC
+#define TARGET_REZ_CARBON_MACHO 1
+#include <CoreServices/CoreServices.r>
#include <QuickTime/QuickTime.r>
+#else
+#include "ConditionalMacros.r"
+#include "CoreServices.r"
+#include "QuickTimeComponents.r"
+#endif
#include "OggImport.h"
#define kImporterComponentType 'eat '
+#ifndef cmpThreadSafe
+#define cmpThreadSafe 0x10000000
+#endif
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Ogg Importer
@@ -159,11 +167,11 @@
};
-#if TARGET_REZ_CARBON_MACHO /* || TARGET_REZ_WIN32 */
+//#if defined(TARGET_REZ_CARBON_MACHO) || defined(TARGET_REZ_WIN32)
resource 'dlle' (kImporterResID, OggImporterName) {
"OggImportComponentDispatch"
};
-#endif
+//#endif
// name and info string are shared by the compressor and decompressor
resource 'STR ' (kImporterNameStringResID, OggImporterName, purgeable) {
@@ -257,4 +265,6 @@
};
};
-
+#if TARGET_OS_WIN32
+read 'MDCf' (kImporterResID) "../MetaDataConfig.plist";
+#endif
Modified: trunk/xiph-qt/OggImport/src/common.c
===================================================================
--- trunk/xiph-qt/OggImport/src/common.c 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/OggImport/src/common.c 2005-12-10 16:22:13 UTC (rev 10574)
@@ -113,7 +113,7 @@
}
-Boolean inline FindPageNoCRC(unsigned char **data, const unsigned char *end, ogg_page *og)
+inline Boolean FindPageNoCRC(unsigned char **data, const unsigned char *end, ogg_page *og)
{
return InternalFindPage(data, end, og);
}
Modified: trunk/xiph-qt/OggImport/src/importer_types.h
===================================================================
--- trunk/xiph-qt/OggImport/src/importer_types.h 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/OggImport/src/importer_types.h 2005-12-10 16:22:13 UTC (rev 10574)
@@ -31,9 +31,36 @@
#if !defined(__importer_types_h__)
#define __importer_types_h__
+#if defined(__APPLE_CC__)
#include <QuickTime/QuickTime.h>
#include <Ogg/ogg.h>
+#else
+#include <QuickTimeComponents.h>
+#include <ogg.h>
+#if defined(TARGET_OS_WIN32)
+#define _WINIOCTL_
+#include <windows.h>
+#endif
+
+#if defined(__DO_WE_NEED_ALL_THOSE_P__)
+#include <MacTypes.h>
+#include <MacErrors.h>
+#include <Endian.h>
+#include <MacMemory.h>
+#include <Resources.h>
+#include <Components.h>
+#include <Sound.h>
+#include <QuickTimeComponents.h>
+#include <FixMath.h>
+#include <Math64.h>
+#include <IntlResources.h>
+#include <MoviesFormat.h>
+#include <Gestalt.h>
+#include <TextEncodingConverter.h>
+#endif
+
+#endif
#include "rb.h"
@@ -191,4 +218,4 @@
#define HANDLE_FUNCTIONS__NULL { NULL, NULL, NULL, NULL, NULL, NULL, NULL }
-#endif /* __importer_types_h__ */
\ No newline at end of file
+#endif /* __importer_types_h__ */
Modified: trunk/xiph-qt/OggImport/src/rb.c
===================================================================
--- trunk/xiph-qt/OggImport/src/rb.c 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/OggImport/src/rb.c 2005-12-10 16:22:13 UTC (rev 10574)
@@ -28,7 +28,7 @@
*/
-#include <Carbon/Carbon.h>
+#include "config.h"
#include "rb.h"
Modified: trunk/xiph-qt/OggImport/src/rb.h
===================================================================
--- trunk/xiph-qt/OggImport/src/rb.h 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/OggImport/src/rb.h 2005-12-10 16:22:13 UTC (rev 10574)
@@ -32,7 +32,7 @@
#define __rb_h__
-#include <Carbon/Carbon.h>
+#include "config.h"
typedef struct {
unsigned char *buffer;
Modified: trunk/xiph-qt/OggImport/src/stream_speex.c
===================================================================
--- trunk/xiph-qt/OggImport/src/stream_speex.c 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/OggImport/src/stream_speex.c 2005-12-10 16:22:13 UTC (rev 10574)
@@ -33,6 +33,7 @@
#include "stream_speex.h"
#include "debug.h"
+#define logg_page_last_packet_incomplete(op) (((unsigned char *)(op)->header)[26 + ((unsigned char *)(op)->header)[26]] == 255)
#include "OggImport.h"
@@ -133,7 +134,7 @@
si->si_speex.header.vbr = EndianS32_LtoN(inheader->vbr);
//si->si_speex.header. = EndianS32_LtoN(inheader->);
- dprintf("! -- - speex_first_packet: ch: %d, rate: %ld\n", si->si_speex.header.nb_channels, si->si_speex.header.rate);
+ dbg_printf("! -- - speex_first_packet: ch: %d, rate: %ld\n", si->si_speex.header.nb_channels, si->si_speex.header.rate);
si->numChannels = si->si_speex.header.nb_channels;
si->rate = si->si_speex.header.rate;
@@ -182,7 +183,7 @@
ret = CreateTrackAndMedia(globals, si, opg);
if (ret != noErr) {
- dprintf("??? -- CreateTrackAndMedia failed?: %ld\n", (long)ret);
+ dbg_printf("??? -- CreateTrackAndMedia failed?: %ld\n", (long)ret);
}
// /*err =*/ DecodeCommentsQT(globals, si, &si->si_vorbis.vc);
@@ -201,9 +202,9 @@
if (ret == noErr) {
ret = AddSoundDescriptionExtension((SoundDescriptionHandle) si->sampleDesc,
si->soundDescExtension, siDecompressionParams);
- //dprintf("??? -- Adding extension: %ld\n", ret);
+ //dbg_printf("??? -- Adding extension: %ld\n", ret);
} else {
- //dprintf("??? -- Hmm, something went wrong: %ld\n", ret);
+ //dbg_printf("??? -- Hmm, something went wrong: %ld\n", ret);
}
si->startTime = 0;
@@ -236,7 +237,7 @@
if (ogg_page_pageno(opg) > 2) {
si->lastGranulePos = ogg_page_granulepos(opg);
si->prevPageOffset = S64Add(globals->dataOffset, opg->header_len + opg->body_len);
- dprintf("----==< skipping: %llx, %lx\n", si->lastGranulePos, ogg_page_pageno(opg));
+ dbg_printf("----==< skipping: %llx, %lx\n", si->lastGranulePos, ogg_page_pageno(opg));
loop = false;
if (si->lastGranulePos < 0)
@@ -254,16 +255,16 @@
TimeValue inserted = 0;
if (pos < 0) {
- //dprintf(" - :XX: not added page %ld (single, looooong packet)\n", ogg_page_pageno(opg));
+ //dbg_printf(" - :XX: not added page %ld (single, looooong packet)\n", ogg_page_pageno(opg));
} else {
- dprintf(" - :++: adding sampleRef: %lld, len: %d, dur: %d\n", si->prevPageOffset, len, duration);
+ dbg_printf(" - :++: adding sampleRef: %lld, len: %d, dur: %d\n", si->prevPageOffset, len, duration);
ret = AddMediaSampleReference(si->theMedia, si->prevPageOffset,
len, duration, si->sampleDesc, 1, 0, &inserted); //@@@@ 64-bit enable
if (ret == noErr) {
- dprintf(" - :><: added page %04ld at %14ld (size: %5ld, tsize: %6d), f: %d\n",
+ dbg_printf(" - :><: added page %04ld at %14ld (size: %5ld, tsize: %6d), f: %d\n",
ogg_page_pageno(opg), inserted,
opg->header_len + opg->body_len, len, !logg_page_last_packet_incomplete(opg));
- dprintf(" - :/>: inserting media: %ld, mt: %lld, dur: %d\n", si->startTime, si->lastGranulePos, duration);
+ dbg_printf(" - :/>: inserting media: %ld, mt: %lld, dur: %d\n", si->startTime, si->lastGranulePos, duration);
ret = InsertMediaIntoTrack(si->theTrack, si->startTime /*inserted*/, /* si->lastGranulePos */ inserted,
duration, fixed1);
si->startTime = -1;
@@ -271,7 +272,7 @@
//if (globals->dataIsStream)
// si->timeLoaded = (duration + inserted) * GetMovieTimeScale(globals->theMovie) / GetMediaTimeScale(si->theMedia);
- dprintf(" - :><: added page %04ld at %14ld; offset: %ld, duration: %ld (%ld, %ld), mediats: %ld; moviets: %ld, ret = %ld\n",
+ dbg_printf(" - :><: added page %04ld at %14ld; offset: %ld, duration: %ld (%ld, %ld), mediats: %ld; moviets: %ld, ret = %ld\n",
ogg_page_pageno(opg), inserted,
GetTrackOffset(si->theTrack), GetTrackDuration(si->theTrack), si->timeLoaded,
(duration * GetMovieTimeScale(globals->theMovie)) / GetMediaTimeScale(si->theMedia),
Modified: trunk/xiph-qt/OggImport/src/stream_vorbis.c
===================================================================
--- trunk/xiph-qt/OggImport/src/stream_vorbis.c 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/OggImport/src/stream_vorbis.c 2005-12-10 16:22:13 UTC (rev 10574)
@@ -31,6 +31,7 @@
#include "stream_vorbis.h"
#include "debug.h"
+#define logg_page_last_packet_incomplete(op) (((unsigned char *)(op)->header)[26 + ((unsigned char *)(op)->header)[26]] == 255)
#include "OggImport.h"
@@ -189,7 +190,7 @@
ret = CreateTrackAndMedia(globals, si, opg);
if (ret != noErr) {
- dprintf("??? -- CreateTrackAndMedia failed?: %ld\n", (long)ret);
+ dbg_printf("??? -- CreateTrackAndMedia failed?: %ld\n", (long)ret);
}
/*err =*/ DecodeCommentsQT(globals, si, &si->si_vorbis.vc);
@@ -219,9 +220,9 @@
if (ret == noErr) {
ret = AddSoundDescriptionExtension((SoundDescriptionHandle) si->sampleDesc,
si->soundDescExtension, siDecompressionParams);
- //dprintf("??? -- Adding extension: %ld\n", ret);
+ //dbg_printf("??? -- Adding extension: %ld\n", ret);
} else {
- //dprintf("??? -- Hmm, something went wrong: %ld\n", ret);
+ //dbg_printf("??? -- Hmm, something went wrong: %ld\n", ret);
}
}
@@ -236,7 +237,7 @@
if (ogg_page_pageno(opg) > 3) {
si->lastGranulePos = ogg_page_granulepos(opg);
si->prevPageOffset = S64Add(globals->dataOffset, opg->header_len + opg->body_len);
- dprintf("----==< skipping: %llx, %lx\n", si->lastGranulePos, ogg_page_pageno(opg));
+ dbg_printf("----==< skipping: %llx, %lx\n", si->lastGranulePos, ogg_page_pageno(opg));
loop = false;
if (si->lastGranulePos < 0)
@@ -254,17 +255,17 @@
TimeValue inserted = 0;
if (pos < 0) {
- //dprintf(" - :XX: not added page %ld (single, looooong packet)\n", ogg_page_pageno(opg));
+ //dbg_printf(" - :XX: not added page %ld (single, looooong packet)\n", ogg_page_pageno(opg));
} else {
- dprintf(" - :++: adding sampleRef: %lld, len: %d, dur: %d\n", si->prevPageOffset, len, duration);
+ dbg_printf(" - :++: adding sampleRef: %lld, len: %d, dur: %d\n", si->prevPageOffset, len, duration);
ret = AddMediaSampleReference(si->theMedia, si->prevPageOffset,
len, duration, si->sampleDesc, 1, 0, &inserted); //@@@@ 64-bit enable
if (ret == noErr)
{
- dprintf(" - :><: added page %04ld at %14ld (size: %5ld, tsize: %6d), f: %d\n",
+ dbg_printf(" - :><: added page %04ld at %14ld (size: %5ld, tsize: %6d), f: %d\n",
ogg_page_pageno(opg), inserted,
opg->header_len + opg->body_len, len, !logg_page_last_packet_incomplete(opg));
- dprintf(" - :/>: inserting media: %ld, mt: %lld, dur: %d\n", si->startTime, si->lastGranulePos, duration);
+ dbg_printf(" - :/>: inserting media: %ld, mt: %lld, dur: %d\n", si->startTime, si->lastGranulePos, duration);
ret = InsertMediaIntoTrack(si->theTrack, si->startTime /*inserted*/, /* si->lastGranulePos */ inserted,
duration, fixed1);
si->startTime = -1;
@@ -272,7 +273,7 @@
//if (globals->dataIsStream)
// si->timeLoaded = (duration + inserted) * GetMovieTimeScale(globals->theMovie) / GetMediaTimeScale(si->theMedia);
- dprintf(" - :><: added page %04ld at %14ld; offset: %ld, duration: %ld (%ld, %ld), mediats: %ld; moviets: %ld, ret = %ld\n",
+ dbg_printf(" - :><: added page %04ld at %14ld; offset: %ld, duration: %ld (%ld, %ld), mediats: %ld; moviets: %ld, ret = %ld\n",
ogg_page_pageno(opg), inserted,
GetTrackOffset(si->theTrack), GetTrackDuration(si->theTrack), si->timeLoaded,
(duration * GetMovieTimeScale(globals->theMovie)) / GetMediaTimeScale(si->theMedia),
Copied: trunk/xiph-qt/build-win32 (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32)
Property changes on: trunk/xiph-qt/build-win32
___________________________________________________________________
Name: svn:ignore
+ Debug
Release
*.ncb
*.opt
*.plg
Deleted: trunk/xiph-qt/build-win32/AudioCodec.h
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/AudioCodec.h 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/AudioCodec.h 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,225 +0,0 @@
-/*
- * AudioCodec.h
- *
- * CoreAudio AudioCodec definitions missing from Win32 QT SDK.
- *
- *
- * Copyright (c) 2005 Arek Korbik
- *
- * This file is part of XiphQT, the Xiph QuickTime Components.
- *
- * XiphQT is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * XiphQT is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with XiphQT; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Last modified: $Id$
- *
- */
-
-
-#if !defined(__audiocodec_h__)
-#define __audiocodec_h__
-
-// Apple SDK files depend on the following macro to be defined in AudioCodec.h
-#define __AudioCodec_h__
-
-//=============================================================================
-// Includes
-//=============================================================================
-
-#include <TargetConditionals.h>
-#include <AvailabilityMacros.h>
-
-#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
- #include <CoreServices/CoreServices.h>
- #include <CoreAudio/CoreAudioTypes.h>
-#else
- #include "Components.h"
- #include "CoreAudioTypes.h"
-#endif
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-
-struct AudioStreamPacketDescription
-{
- SInt64 mStartOffset;
- UInt32 mVariableFramesInPacket;
- UInt32 mDataByteSize;
-};
-typedef struct AudioStreamPacketDescription AudioStreamPacketDescription;
-
-typedef ComponentInstance AudioCodec;
-typedef UInt32 AudioCodecPropertyID;
-
-enum
-{
- kAudioDecoderComponentType = 'adec',
- kAudioEncoderComponentType = 'aenc',
- kAudioUnityCodecComponentType = 'acdc'
-};
-
-enum
-{
- kAudioCodecPropertyNameCFString = 'lnam',
- kAudioCodecPropertyManufacturerCFString = 'lmak',
- kAudioCodecPropertyFormatCFString = 'lfor',
- kAudioCodecPropertyRequiresPacketDescription = 'pakd',
- kAudioCodecPropertyPacketFrameSize = 'pakf',
- kAudioCodecPropertyHasVariablePacketByteSizes = 'vpk?',
- kAudioCodecPropertyMaximumPacketByteSize = 'pakb',
- kAudioCodecPropertyCurrentInputFormat = 'ifmt',
- kAudioCodecPropertySupportedInputFormats = 'ifm#',
- kAudioCodecPropertyCurrentOutputFormat = 'ofmt',
- kAudioCodecPropertySupportedOutputFormats = 'ofm#',
- kAudioCodecPropertyMagicCookie = 'kuki',
- kAudioCodecPropertyInputBufferSize = 'tbuf',
- kAudioCodecPropertyUsedInputBufferSize = 'ubuf',
- kAudioCodecPropertyIsInitialized = 'init',
- kAudioCodecPropertyCurrentTargetBitRate = 'brat',
- kAudioCodecPropertyAvailableBitRates = 'brt#',
- kAudioCodecPropertyCurrentInputSampleRate = 'cisr',
- kAudioCodecPropertyCurrentOutputSampleRate = 'cosr',
- kAudioCodecPropertyAvailableInputSampleRates = 'aisr',
- kAudioCodecPropertyAvailableOutputSampleRates = 'aosr',
- kAudioCodecPropertyQualitySetting = 'srcq',
- kAudioCodecPropertyCurrentLoudnessStatistics = 'loud',
- kAudioCodecPropertyAvailableBitRateRange = 'abrt',
- kAudioCodecPropertyApplicableBitRateRange = 'brta',
- kAudioCodecPropertyApplicableInputSampleRates = 'isra',
- kAudioCodecPropertyApplicableOutputSampleRates = 'osra',
- kAudioCodecPropertyMinimumNumberInputPackets = 'mnip',
- kAudioCodecPropertyMinimumNumberOutputPackets = 'mnop',
- kAudioCodecPropertyZeroFramesPadded = 'pad0',
- kAudioCodecPropertyAvailableNumberChannels = 'cmnc',
- kAudioCodecPropertyPrimeMethod = 'prmm',
- kAudioCodecPropertyPrimeInfo = 'prim',
- kAudioCodecDoesSampleRateConversion = 'lmrc',
- kAudioCodecPropertyInputChannelLayout = 'icl ',
- kAudioCodecPropertyOutputChannelLayout = 'ocl ',
- kAudioCodecPropertyAvailableInputChannelLayouts = 'aicl',
- kAudioCodecPropertyAvailableOutputChannelLayouts = 'aocl',
- kAudioCodecPropertySettings = 'acs ',
- kAudioCodecBitRateFormat = 'acbf',
- kAudioCodecExtendFrequencies = 'acef',
- kAudioCodecInputFormatsForOutputFormat = 'if4o',
- kAudioCodecOutputFormatsForInputFormat = 'of4i',
- kAudioCodecUseRecommendedSampleRate = 'ursr',
- kAudioCodecOutputPrecedence = 'oppr'
-};
-
-enum
-{
- kAudioCodecQuality_Max = 0x7F,
- kAudioCodecQuality_High = 0x60,
- kAudioCodecQuality_Medium = 0x40,
- kAudioCodecQuality_Low = 0x20,
- kAudioCodecQuality_Min = 0
-};
-
-enum
-{
- kAudioCodecPrimeMethod_Pre = 0,
- kAudioCodecPrimeMethod_Normal = 1,
- kAudioCodecPrimeMethod_None = 2
-};
-
-enum
-{
- kAudioCodecBitRateFormat_CBR = 0,
- kAudioCodecBitRateFormat_ABR = 1,
- kAudioCodecBitRateFormat_VBR = 2
-};
-
-enum
-{
- kAudioCodecOutputPrecedenceNone = 0,
- kAudioCodecOutputPrecedenceBitRate = 1,
- kAudioCodecOutputPrecedenceSampleRate = 2
-};
-
-typedef struct AudioCodecPrimeInfo
-{
- UInt32 leadingFrames;
- UInt32 trailingFrames;
-} AudioCodecPrimeInfo;
-
-#define kAudioSettings_TopLevelKey "name"
-#define kAudioSettings_Version "version"
-#define kAudioSettings_Parameters "parameters"
-#define kAudioSettings_SettingKey "key"
-#define kAudioSettings_SettingName "name"
-#define kAudioSettings_ValueType "value type"
-#define kAudioSettings_AvailableValues "available values"
-#define kAudioSettings_LimitedValues "limited values"
-#define kAudioSettings_CurrentValue "current value"
-#define kAudioSettings_Summary "summary"
-#define kAudioSettings_Hint "hint"
-#define kAudioSettings_Unit "unit"
-
-enum
-{
- kHintBasic = 0,
- kHintAdvanced = 1,
- kHintHidden = 2
-};
-
-enum {
- kAudioSettingsFlags_ExpertParameter = (1L << 0),
- kAudioSettingsFlags_InvisibleParameter = (1L << 1),
- kAudioSettingsFlags_MetaParameter = (1L << 2),
- kAudioSettingsFlags_UserInterfaceParameter = (1L << 3)
-};
-
-enum
-{
- kAudioCodecProduceOutputPacketFailure = 1,
- kAudioCodecProduceOutputPacketSuccess = 2,
- kAudioCodecProduceOutputPacketSuccessHasMore = 3,
- kAudioCodecProduceOutputPacketNeedsMoreInputData = 4,
- kAudioCodecProduceOutputPacketAtEOF = 5
-};
-
-enum
-{
- kAudioCodecGetPropertyInfoSelect = 0x0001,
- kAudioCodecGetPropertySelect = 0x0002,
- kAudioCodecSetPropertySelect = 0x0003,
- kAudioCodecInitializeSelect = 0x0004,
- kAudioCodecUninitializeSelect = 0x0005,
- kAudioCodecAppendInputDataSelect = 0x0006,
- kAudioCodecProduceOutputDataSelect = 0x0007,
- kAudioCodecResetSelect = 0x0008
-};
-
-enum
-{
- kAudioCodecNoError = 0,
- kAudioCodecUnspecifiedError = 'what',
- kAudioCodecUnknownPropertyError = 'who?',
- kAudioCodecBadPropertySizeError = '!siz',
- kAudioCodecIllegalOperationError = 'nope',
- kAudioCodecUnsupportedFormatError = '!dat',
- kAudioCodecStateError = '!stt',
- kAudioCodecNotEnoughBufferSpaceError = '!buf'
-};
-
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __audiocodec_h__ */
Copied: trunk/xiph-qt/build-win32/AudioCodec.h (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/AudioCodec.h)
Deleted: trunk/xiph-qt/build-win32/DllMain.c
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/DllMain.c 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/DllMain.c 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,47 +0,0 @@
-/*
- * DLLMain.cpp
- *
- * Win32 XiphQT dll entry point file.
- *
- *
- * Copyright (c) 2005 Arek Korbik
- *
- * This file is part of XiphQT, the Xiph QuickTime Components.
- *
- * XiphQT is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * XiphQT is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with XiphQT; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Last modified: $Id$
- *
- */
-
-
-#include <windows.h>
-
-
-HINSTANCE ghInst = NULL;
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- ghInst = (HINSTANCE) hInst;
-
- switch (ul_reason_for_call) {
- //do nothing, so far...
- default:
- break;
- }
-
- return TRUE;
-}
Copied: trunk/xiph-qt/build-win32/DllMain.c (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/DllMain.c)
Deleted: trunk/xiph-qt/build-win32/README
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/README 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/README 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,24 +0,0 @@
-Building - Win32
-================
-
-To build XiphQT on for Win32 OS you will need Visual-C compiler,
-QuickTime SDK 7 for Win32 and a set of statically compiled Xiph
-libraries (ogg, vorbis, speex).
-
-By default, the QT SDK is expected to be installed in the default location:
-C:\Program Files\QuickTime SDK
-and the Xiph libraries are supposed to be located in the same directory
-as 'xiph-qt' directory (using simple library names, without numerical
-version suffixes).
-
-The project files will build XiphQT in a single file XiphQT.qtx and then
-install it in the default directory for third-party QuickTime components:
-C:\Program Files\QuickTime\QTComponents
-
-
-Installing - Win32
-==================
-
-The binary component file XiphQT.qtx needs to be installed in 'QTComponents'
-sub-folder of your QuickTime installation.
-
Copied: trunk/xiph-qt/build-win32/README (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/README)
Deleted: trunk/xiph-qt/build-win32/XiphQT.def
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/XiphQT.def 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/XiphQT.def 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,48 +0,0 @@
-;
-; XiphQT.def
-;
-; Win32 XiphQT dll entry-point declarations.
-;
-;
-; Copyright (c) 2005 Arek Korbik
-;
-; This file is part of XiphQT, the Xiph QuickTime Components.
-;
-; XiphQT is free software; you can redistribute it and/or
-; modify it under the terms of the GNU Lesser General Public
-; License as published by the Free Software Foundation; either
-; version 2.1 of the License, or (at your option) any later version.
-;
-; XiphQT is distributed in the hope that it will be useful,
-; but WITHOUT ANY WARRANTY; without even the implied warranty of
-; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-; Lesser General Public License for more details.
-;
-; You should have received a copy of the GNU Lesser General Public
-; License along with XiphQT; if not, write to the Free Software
-; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-;
-;
-; Last modified: $Id$
-;
-
-
-LIBRARY XiphQT
-DESCRIPTION 'Xiph media compression formats support for QuickTime Windows'
-
-EXPORTS
-;=============================================================================================
-; Everyone has one
-
-; DllMain @1
-
-;=============================================================================================
-; Entry-points as registered in per-component 'thng'/'dlle' resources
-
- CAVorbisDecoderEntry
- CAOggVorbisDecoderEntry
- CASpeexDecoderEntry
- CAOggSpeexDecoderEntry
- OggImportComponentDispatch
-
-
Copied: trunk/xiph-qt/build-win32/XiphQT.def (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/XiphQT.def)
Deleted: trunk/xiph-qt/build-win32/XiphQT.dsp
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/XiphQT.dsp 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/XiphQT.dsp 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,418 +0,0 @@
-# Microsoft Developer Studio Project File - Name="XiphQT" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=XiphQT - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "XiphQT.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "XiphQT.mak" CFG="XiphQT - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "XiphQT - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "XiphQT - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "XiphQT - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XIPHQT_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "C:\Program Files\QuickTime SDK\CIncludes" /I "..\AppleSDK\CoreAudio\PublicUtility" /I "..\AppleSDK\CoreAudio\AudioCodecs\ACPublic" /I "..\..\ogg\include" /I "..\..\ogg\include\ogg" /I "..\..\vorbis\include" /I "..\..\speex\include" /I "..\common" /I "..\utils" /I "." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XIPHQT_EXPORTS" /D inline=__inline /D "QT_WIN32__VBR_BROKEN" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib qtmlClient.lib libspeex.lib ogg_static.lib vorbis_static.lib /nologo /dll /machine:I386 /nodefaultlib:"libcmt.lib" /nodefaultlib:"libcd.lib" /def:".\XiphQT.def" /libpath:"C:\Program Files\QuickTime SDK\Libraries" /libpath:"..\..\speex\win32\libspeex\Release" /libpath:"..\..\ogg\win32\Static_Release" /libpath:"..\..\vorbis\win32\Vorbis_Static_Release"
-# SUBTRACT LINK32 /pdb:none
-# Begin Special Build Tool
-IntDir=.\Release
-TargetName=XiphQT
-SOURCE="$(InputPath)"
-PostBuild_Desc=qtx-ing
-PostBuild_Cmds=if exist "$(IntDir)\$(TargetName).qtx" Attrib -R "$(IntDir)\$(TargetName).qtx" RezWack -f -d "$(IntDir)\$(TargetName).dll" -r "$(IntDir)\$(TargetName).qtr" -o "$(IntDir)\$(TargetName).qtx" copy /y "$(IntDir)\$(TargetName).qtx" "c:\Program Files\QuickTime\QTComponents\"
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "XiphQT - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XIPHQT_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "C:\Program Files\QuickTime SDK\CIncludes" /I "..\AppleSDK\CoreAudio\PublicUtility" /I "..\AppleSDK\CoreAudio\AudioCodecs\ACPublic" /I "..\..\ogg\include" /I "..\..\ogg\include\ogg" /I "..\..\vorbis\include" /I "..\..\speex\include" /I "..\common" /I "..\utils" /I "." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XIPHQT_EXPORTS" /D inline=__inline /D "QT_WIN32__VBR_BROKEN" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib qtmlClient.lib libspeex.lib ogg_static_d.lib vorbis_static_d.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcmt.lib" /nodefaultlib:"libcd.lib" /def:".\XiphQT.def" /pdbtype:sept /libpath:"C:\Program Files\QuickTime SDK\Libraries" /libpath:"..\..\speex\win32\libspeex\Debug" /libpath:"..\..\ogg\win32\Static_Debug" /libpath:"..\..\vorbis\win32\Vorbis_Static_Debug"
-# SUBTRACT LINK32 /pdb:none
-# Begin Special Build Tool
-IntDir=.\Debug
-TargetName=XiphQT
-SOURCE="$(InputPath)"
-PostBuild_Desc=qtx-ing
-PostBuild_Cmds=if exist "$(IntDir)\$(TargetName).qtx" Attrib -R "$(IntDir)\$(TargetName).qtx" RezWack -f -d "$(IntDir)\$(TargetName).dll" -r "$(IntDir)\$(TargetName).qtr" -o "$(IntDir)\$(TargetName).qtx" copy /y "$(IntDir)\$(TargetName).qtx" "c:\Program Files\QuickTime\QTComponents\"
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "XiphQT - Win32 Release"
-# Name "XiphQT - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Group "OggImport"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\OggImport\src\common.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\common.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\importer_types.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\OggImport.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\OggImport.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\OggImportDispatch.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\rb.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\rb.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\stream_speex.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\stream_speex.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\stream_types_speex.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\stream_types_vorbis.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\stream_vorbis.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\stream_vorbis.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\versions.h
-# End Source File
-# End Group
-# Begin Group "CAVorbis"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\CAVorbis\src\CAOggVorbisDecoder.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\CAVorbis\src\CAOggVorbisDecoder.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\CAVorbis\src\CAVorbisDecoder.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\CAVorbis\src\CAVorbisDecoder.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\CAVorbis\src\vorbis_entrypoints.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\CAVorbis\src\vorbis_versions.h
-# End Source File
-# End Group
-# Begin Group "CASpeex"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\CASpeex\src\CAOggSpeexDecoder.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\CASpeex\src\CAOggSpeexDecoder.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\CASpeex\src\CASpeexDecoder.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\CASpeex\src\CASpeexDecoder.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\CASpeex\src\speex_entrypoints.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\CASpeex\src\speex_versions.h
-# End Source File
-# End Group
-# Begin Group "common"
-
-# PROP Default_Filter ""
-# Begin Group "AppleSDK"
-
-# PROP Default_Filter ""
-# Begin Group "CoreAudio"
-
-# PROP Default_Filter ""
-# Begin Group "AudioCodecs"
-
-# PROP Default_Filter ""
-# Begin Group "ACPublic"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\AudioCodecs\ACPublic\ACBaseCodec.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\AudioCodecs\ACPublic\ACBaseCodec.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\AudioCodecs\ACPublic\ACCodec.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\AudioCodecs\ACPublic\ACCodec.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\AudioCodecs\ACPublic\ACCodecDispatch.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\AudioCodecs\ACPublic\ACCodecDispatchTypes.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\AudioCodecs\ACPublic\ACConditionalMacros.h
-# End Source File
-# End Group
-# End Group
-# Begin Group "PublicUtility"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\PublicUtility\CAConditionalMacros.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\PublicUtility\CADebugMacros.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\PublicUtility\CADebugMacros.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\PublicUtility\CAMath.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\PublicUtility\CAStreamBasicDescription.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\AppleSDK\CoreAudio\PublicUtility\CAStreamBasicDescription.h
-# End Source File
-# End Group
-# End Group
-# End Group
-# Begin Source File
-
-SOURCE=.\AudioCodec.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\config.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\data_types.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\utils\debug.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DllMain.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\fccs.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\pxml.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\pxml.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\utils\ringbuffer.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\utils\ringbuffer.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\utils\wrap_ogg.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\utils\wrap_ogg.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\XCACodec.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\XCACodec.h
-# End Source File
-# End Group
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=..\CASpeex\src\CASpeexDecoderPublic.r
-# End Source File
-# Begin Source File
-
-SOURCE=..\CAVorbis\src\CAVorbisDecoderPublic.r
-# End Source File
-# Begin Source File
-
-SOURCE=..\OggImport\src\OggImport.r
-# End Source File
-# Begin Source File
-
-SOURCE=.\resources.r
-
-!IF "$(CFG)" == "XiphQT - Win32 Release"
-
-# Begin Custom Build
-TargetDir=.\Release
-TargetName=XiphQT
-InputPath=.\resources.r
-
-"$(TargetDir)\$(TargetName).qtr" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- Rez.exe -p -i "C:\Program Files\QuickTime SDK\RIncludes" -i ..\OggImport\src -i ..\CAVorbis\src -i ..\CASpeex\src -i ..\common -i ..\utils -i ..\resources -o "$(TargetDir)\$(TargetName).qtr" < "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "XiphQT - Win32 Debug"
-
-# Begin Custom Build
-TargetDir=.\Debug
-TargetName=XiphQT
-InputPath=.\resources.r
-
-"$(TargetDir)\$(TargetName).qtr" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- Rez.exe -p -i "C:\Program Files\QuickTime SDK\RIncludes" -i ..\OggImport\src -i ..\CAVorbis\src -i ..\CASpeex\src -i ..\common -i ..\utils -i ..\resources -o "$(TargetDir)\$(TargetName).qtr" < "$(InputPath)"
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\resources\XCAResources.r
-# End Source File
-# End Group
-# End Target
-# End Project
Copied: trunk/xiph-qt/build-win32/XiphQT.dsp (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/XiphQT.dsp)
Deleted: trunk/xiph-qt/build-win32/XiphQT.dsw
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/XiphQT.dsw 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/XiphQT.dsw 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "XiphQT"=".\XiphQT.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
Copied: trunk/xiph-qt/build-win32/XiphQT.dsw (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/XiphQT.dsw)
Deleted: trunk/xiph-qt/build-win32/build_XiphQT.bat
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/build_XiphQT.bat 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/build_XiphQT.bat 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,22 +0,0 @@
- at echo off
-echo ---+++--- Building XiphQT ---+++---
-
-set BTARGET=build
-
-if NOT z%1==z (set BTARGET=%1)
-
-set OLDPATH=%PATH%
-set OLDINCLUDE=%INCLUDE%
-set OLDLIB=%LIB%
-
-call "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat"
-echo Setting include/lib paths for XiphQT
-set PATH=%PATH%;"C:\Program Files\QuickTime SDK\Tools"
-set INCLUDE=%INCLUDE%;"C:\Program Files\QuickTime SDK\CIncludes";"C:\Program Files\QuickTime SDK\ComponentIncludes"
-set LIB=%LIB%;"C:\Program Files\QuickTime SDK\Libraries"
-echo Compiling...
-msdev XiphQT.dsp /useenv /make "XiphQT - Win32 Release" /%BTARGET%
-
-set PATH=%OLDPATH%
-set INCLUDE=%OLDINCLUDE%
-set LIB=%OLDLIB%
Copied: trunk/xiph-qt/build-win32/build_XiphQT.bat (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/build_XiphQT.bat)
Deleted: trunk/xiph-qt/build-win32/build_XiphQT_debug.bat
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/build_XiphQT_debug.bat 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/build_XiphQT_debug.bat 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,22 +0,0 @@
- at echo off
-echo ---+++--- Building XiphQT ---+++---
-
-set BTARGET=build
-
-if NOT z%1==z (set BTARGET=%1)
-
-set OLDPATH=%PATH%
-set OLDINCLUDE=%INCLUDE%
-set OLDLIB=%LIB%
-
-call "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat"
-echo Setting include/lib paths for XiphQT
-set PATH=%PATH%;"C:\Program Files\QuickTime SDK\Tools"
-set INCLUDE=%INCLUDE%;"C:\Program Files\QuickTime SDK\CIncludes";"C:\Program Files\QuickTime SDK\ComponentIncludes"
-set LIB=%LIB%;"C:\Program Files\QuickTime SDK\Libraries"
-echo Compiling...
-msdev XiphQT.dsp /useenv /make "XiphQT - Win32 Debug" /%BTARGET%
-
-set PATH=%OLDPATH%
-set INCLUDE=%OLDINCLUDE%
-set LIB=%OLDLIB%
Copied: trunk/xiph-qt/build-win32/build_XiphQT_debug.bat (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/build_XiphQT_debug.bat)
Deleted: trunk/xiph-qt/build-win32/pxml.c
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/pxml.c 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/pxml.c 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,262 +0,0 @@
-/*
- * pxml.c
- *
- * Very simple xml plist file parser.
- *
- *
- * Copyright (c) 2005 Arek Korbik
- *
- * This file is part of XiphQT, the Xiph QuickTime Components.
- *
- * XiphQT is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * XiphQT is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with XiphQT; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Last modified: $Id$
- *
- */
-
-
-#include "pxml.h"
-
-#include <string.h>
-
-CFStringRef pxml_parse_key(unsigned char **str, long *str_size) {
- CFStringRef ret = NULL;
-
- char *l_str_pos = *str;
- char *tmp_pos = NULL;
- char *end_pos = NULL;
- long l_str_size = *str_size;
-
- if (strncmp(l_str_pos, "<key", 4) != 0)
- return NULL;
- else {
- l_str_pos += 4;
- l_str_size -= 4;
- }
-
- tmp_pos = memchr(l_str_pos, '>', l_str_size);
- if (tmp_pos == NULL)
- return NULL;
-
- tmp_pos += 1;
- l_str_size -= tmp_pos - l_str_pos;
- l_str_pos = tmp_pos;
- if (l_str_size < 0)
- return NULL;
-
- end_pos = memchr(l_str_pos, '<', l_str_size);
- if (end_pos == NULL)
- return NULL;
-
- l_str_size -= end_pos - l_str_pos;
- l_str_pos = end_pos;
-
- if (l_str_size < 6 || strncmp(l_str_pos, "</key>", 6) != 0)
- return NULL;
-
- *str = end_pos + 6;
- *str_size = l_str_size - 6;
-
- ret = CFStringCreateWithBytes(NULL, tmp_pos, end_pos - tmp_pos, kCFStringEncodingUTF8, true);
-
- return ret;
-}
-
-CFStringRef pxml_parse_string(unsigned char **str, long *str_size) {
- CFStringRef ret = NULL;
-
- char *l_str_pos = *str;
- char *tmp_pos = NULL;
- char *end_pos = NULL;
- long l_str_size = *str_size;
-
- if (strncmp(l_str_pos, "<string", 7) != 0)
- return NULL;
- else {
- l_str_pos += 7;
- l_str_size -= 7;
- }
-
- tmp_pos = memchr(l_str_pos, '>', l_str_size);
- if (tmp_pos == NULL)
- return NULL;
-
- tmp_pos += 1;
- l_str_size -= tmp_pos - l_str_pos;
- l_str_pos = tmp_pos;
- if (l_str_size < 0)
- return NULL;
-
- end_pos = memchr(l_str_pos, '<', l_str_size);
- if (end_pos == NULL)
- return NULL;
-
- l_str_size -= end_pos - l_str_pos;
- l_str_pos = end_pos;
-
- if (l_str_size < 9 || strncmp(l_str_pos, "</string>", 9) != 0)
- return NULL;
-
- *str = end_pos + 9;
- *str_size = l_str_size - 9;
-
- ret = CFStringCreateWithBytes(NULL, tmp_pos, end_pos - tmp_pos, kCFStringEncodingUTF8, true);
-
- return ret;
-}
-
-CFDictionaryRef pxml_parse_dict(unsigned char **str, long *str_size) {
- CFDictionaryRef ret = NULL;
- CFMutableDictionaryRef tmp_ret = NULL;
- char *l_str_pos = *str;
- char *tmp_pos = NULL;
- long l_str_size = *str_size;
-
- if (strncmp(l_str_pos, "<dict", 5) != 0)
- return NULL;
- else {
- l_str_pos += 5;
- l_str_size -= 5;
- }
-
- tmp_ret = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-
- while ((tmp_pos = memchr(l_str_pos, '<', l_str_size)) != NULL) {
- CFStringRef d_key = NULL;
- void *d_value = NULL;
-
- l_str_size -= tmp_pos - l_str_pos;
- l_str_pos = tmp_pos;
-
- if (l_str_size > 7 && strncmp(l_str_pos, "</dict>", 7) == 0) {
- l_str_size -= 7;
- l_str_pos += 7;
- break;
- } else if (l_str_size < 4 || strncmp(l_str_pos, "<key", 4) != 0)
- break;
-
- d_key = pxml_parse_key(&l_str_pos, &l_str_size);
- if (d_key == NULL)
- break;
-
- tmp_pos = memchr(l_str_pos, '<', l_str_size);
- if (tmp_pos == NULL) {
- CFRelease(d_key);
- break;
- }
-
- l_str_size -= tmp_pos - l_str_pos;
- l_str_pos = tmp_pos;
-
- if (l_str_size > 7 && strncmp(l_str_pos, "</dict>", 7) == 0) {
- l_str_size -= 7;
- l_str_pos += 7;
- break;
- } else if (l_str_size > 7 && strncmp(l_str_pos, "<string", 7) == 0) {
- d_value = pxml_parse_string(&l_str_pos, &l_str_size);
- } else if (l_str_size > 5 && strncmp(l_str_pos, "<dict", 5) == 0) {
- d_value = pxml_parse_dict(&l_str_pos, &l_str_size);
- } else {
- // other value types not supported
- CFRelease(d_key);
- break;
- }
-
- if (d_value == NULL) {
- CFRelease(d_key);
- break;
- }
- CFDictionaryAddValue(tmp_ret, d_key, d_value);
- }
-
-
- if (CFDictionaryGetCount(tmp_ret) > 0) {
- ret = CFDictionaryCreateCopy(NULL, tmp_ret);
- CFDictionaryRemoveAllValues(tmp_ret);
- }
-
- if (ret != NULL) {
- *str = l_str_pos;
- *str_size = l_str_size;
- }
-
- return ret;
-}
-
-
-CFDictionaryRef pxml_parse_plist(unsigned char *plist_str, long plist_size) {
- CFDictionaryRef ret = NULL;
- char *l_str_pos = plist_str;
- char *tmp_pos = NULL;
- long l_str_size = plist_size;
-
- while (l_str_size > 6 && strncmp(l_str_pos, "<plist", 6) != 0) {
- tmp_pos = memchr(l_str_pos + 1, '<', l_str_size - 1);
-
- if (tmp_pos == NULL) {
- l_str_pos = NULL;
- break;
- }
-
- l_str_size -= tmp_pos - l_str_pos;
- l_str_pos = tmp_pos;
- }
-
- if (l_str_pos != NULL) {
- l_str_pos += 6;
- l_str_size -= 6;
-
- while (l_str_size > 5 && strncmp(l_str_pos, "<dict", 5) != 0) {
- tmp_pos = memchr(l_str_pos + 1, '<', l_str_size - 1);
-
- if (tmp_pos == NULL) {
- l_str_pos = NULL;
- break;
- }
-
- l_str_size -= tmp_pos - l_str_pos;
- l_str_pos = tmp_pos;
- }
-
- if (l_str_pos != NULL) {
- ret = pxml_parse_dict(&l_str_pos, &l_str_size);
- }
- }
-
- return ret;
-}
-
-
-#if defined(PXML_TEST_IN_PLACE)
-
-#include <stdio.h>
-#include <fcntl.h>
-
-int main(int argc, char **argv) {
- char fbuf[65536];
- CFDictionaryRef dict = NULL;
- int f = open(argv[1], O_RDONLY, 0);
- int bytes_read = read(f, fbuf, 65535);
- close(f);
- fbuf[bytes_read] = '\0';
- dict = parse_plist(fbuf, strlen(fbuf));
-
- if (dict != NULL)
- printf("Key count: %d\n", CFDictionaryGetCount(dict));
-
- return 0;
-}
-#endif /* PXML_TEST_IN_PLACE */
Copied: trunk/xiph-qt/build-win32/pxml.c (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/pxml.c)
Deleted: trunk/xiph-qt/build-win32/pxml.h
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/pxml.h 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/pxml.h 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,56 +0,0 @@
-/*
- * pxml.h
- *
- * Very simple xml plist file parser - header file.
- *
- *
- * Copyright (c) 2005 Arek Korbik
- *
- * This file is part of XiphQT, the Xiph QuickTime Components.
- *
- * XiphQT is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * XiphQT is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with XiphQT; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Last modified: $Id$
- *
- */
-
-
-#if !defined(__pxml_h__)
-#define __pxml_h__
-
-#if defined(__APPLE_CC__)
-#include <CoreServices/CoreServices.h>
-#include <CoreFoundation/CoreFoundation.h>
-#else
-#include <CoreServices.h>
-#include <CoreFoundation.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-extern CFDictionaryRef pxml_parse_plist(unsigned char *plist_str, long plist_size);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __pxml_h__ */
Copied: trunk/xiph-qt/build-win32/pxml.h (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/pxml.h)
Deleted: trunk/xiph-qt/build-win32/resources.r
===================================================================
--- branches/xiph-qt/xiph-qt-win32/build-win32/resources.r 2005-12-06 21:53:44 UTC (rev 10553)
+++ trunk/xiph-qt/build-win32/resources.r 2005-12-10 16:22:13 UTC (rev 10574)
@@ -1,38 +0,0 @@
-/*
- * resources.r
- *
- * Win32 XiphQT resources definition 'umbrella' file.
- *
- *
- * Copyright (c) 2005 Arek Korbik
- *
- * This file is part of XiphQT, the Xiph QuickTime Components.
- *
- * XiphQT is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * XiphQT is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with XiphQT; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * Last modified: $Id$
- *
- */
-
-#include "ConditionalMacros.r"
-
-#define thng_RezTemplateVersion 2
-
-
-#include "CAVorbisDecoderPublic.r"
-#include "CASpeexDecoderPublic.r"
-
-#include "OggImport.r"
Copied: trunk/xiph-qt/build-win32/resources.r (from rev 10553, branches/xiph-qt/xiph-qt-win32/build-win32/resources.r)
Modified: trunk/xiph-qt/common/XCACodec.cpp
===================================================================
--- trunk/xiph-qt/common/XCACodec.cpp 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/common/XCACodec.cpp 2005-12-10 16:22:13 UTC (rev 10574)
@@ -49,7 +49,7 @@
void XCACodec::AppendInputData(const void* inInputData, UInt32& ioInputDataByteSize, UInt32& ioNumberPackets,
const AudioStreamPacketDescription* inPacketDescription)
{
- dprintf(" >> [%08lx] XCACodec :: AppendInputData(%ld [%ld])\n", (UInt32) this, ioNumberPackets, ioInputDataByteSize);
+ dbg_printf(" >> [%08lx] XCACodec :: AppendInputData(%ld [%ld])\n", (UInt32) this, ioNumberPackets, ioInputDataByteSize);
if(!mIsInitialized) CODEC_THROW(kAudioCodecStateError);
UInt32 bytesToCopy = BufferGetAvailableBytesSize();
@@ -59,7 +59,7 @@
while (packet < ioNumberPackets) {
if (bytes + inPacketDescription[packet].mDataByteSize > bytesToCopy)
break;
- dprintf(" ---- :: %ld: %ld [%ld]\n", packet, inPacketDescription[packet].mDataByteSize,
+ dbg_printf(" ---- :: %ld: %ld [%ld]\n", packet, inPacketDescription[packet].mDataByteSize,
inPacketDescription[packet].mVariableFramesInPacket);
InPacket(inInputData, &inPacketDescription[packet]);
@@ -76,13 +76,13 @@
} else {
CODEC_THROW(kAudioCodecNotEnoughBufferSpaceError);
}
- dprintf("<.. [%08lx] XCACodec :: AppendInputData()\n", (UInt32) this);
+ dbg_printf("<.. [%08lx] XCACodec :: AppendInputData()\n", (UInt32) this);
}
UInt32 XCACodec::ProduceOutputPackets(void* outOutputData, UInt32& ioOutputDataByteSize, UInt32& ioNumberPackets,
AudioStreamPacketDescription* outPacketDescription)
{
- dprintf(" >> [%08lx] XCACodec :: ProduceOutputPackets(%ld [%ld])\n", (UInt32) this, ioNumberPackets, ioOutputDataByteSize);
+ dbg_printf(" >> [%08lx] XCACodec :: ProduceOutputPackets(%ld [%ld])\n", (UInt32) this, ioNumberPackets, ioOutputDataByteSize);
UInt32 theAnswer = kAudioCodecProduceOutputPacketSuccess;
@@ -104,7 +104,7 @@
ioNumberPackets = pout;
ioOutputDataByteSize = mOutputFormat.mBytesPerFrame * fout;
theAnswer = kAudioCodecProduceOutputPacketNeedsMoreInputData;
- dprintf("<.! [%08lx] XCACodec :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n", (UInt32) this,
+ dbg_printf("<.! [%08lx] XCACodec :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n", (UInt32) this,
ioNumberPackets, ioOutputDataByteSize, theAnswer, FramesReady());
return theAnswer;
}
@@ -114,7 +114,7 @@
ioNumberPackets = pout;
ioOutputDataByteSize = mOutputFormat.mBytesPerFrame * fout;
theAnswer = kAudioCodecProduceOutputPacketFailure;
- dprintf("<!! [%08lx] XCACodec :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n", (UInt32) this,
+ dbg_printf("<!! [%08lx] XCACodec :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n", (UInt32) this,
ioNumberPackets, ioOutputDataByteSize, theAnswer, FramesReady());
return theAnswer;
}
@@ -144,7 +144,7 @@
theAnswer = (FramesReady() > 0 || !BufferIsEmpty()) ? kAudioCodecProduceOutputPacketSuccessHasMore
: kAudioCodecProduceOutputPacketSuccess;
- dprintf("<.. [%08lx] XCACodec :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n",
+ dbg_printf("<.. [%08lx] XCACodec :: ProduceOutputPackets(%ld [%ld]) = %ld [%ld]\n",
(UInt32) this, ioNumberPackets, ioOutputDataByteSize, theAnswer, FramesReady());
return theAnswer;
}
Copied: trunk/xiph-qt/common/config.h (from rev 10553, branches/xiph-qt/xiph-qt-win32/common/config.h)
Copied: trunk/xiph-qt/resources/XCAResources.r (from rev 10553, branches/xiph-qt/xiph-qt-win32/resources/XCAResources.r)
Modified: trunk/xiph-qt/utils/debug.h
===================================================================
--- trunk/xiph-qt/utils/debug.h 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/utils/debug.h 2005-12-10 16:22:13 UTC (rev 10574)
@@ -33,10 +33,14 @@
#if defined(NDEBUG)
-#define dprintf(...) {}
+#if defined(_MSC_VER)
+inline static void dbg_printf(char *fmt, ...) {}
#else
-#define dprintf printf
+#define dbg_printf(...) {}
#endif
+#else
+#define dbg_printf printf
+#endif
#endif /* __debug_h__ */
Modified: trunk/xiph-qt/utils/ringbuffer.cpp
===================================================================
--- trunk/xiph-qt/utils/ringbuffer.cpp 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/utils/ringbuffer.cpp 2005-12-10 16:22:13 UTC (rev 10574)
@@ -29,6 +29,7 @@
*/
+#include "config.h"
#include "ringbuffer.h"
RingBuffer::RingBuffer() :
Modified: trunk/xiph-qt/utils/ringbuffer.h
===================================================================
--- trunk/xiph-qt/utils/ringbuffer.h 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/utils/ringbuffer.h 2005-12-10 16:22:13 UTC (rev 10574)
@@ -31,7 +31,9 @@
#if !defined(__ringbuffer_h__)
#define __ringbuffer_h__
+#include "config.h"
+
class RingBuffer
{
public:
Modified: trunk/xiph-qt/utils/wrap_ogg.cpp
===================================================================
--- trunk/xiph-qt/utils/wrap_ogg.cpp 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/utils/wrap_ogg.cpp 2005-12-10 16:22:13 UTC (rev 10574)
@@ -30,6 +30,7 @@
#include "wrap_ogg.h"
+#include <string>
Boolean WrapOggPage(ogg_page* outOggPage, const void* inRawData, UInt32 inDataByteSize, UInt32 inDataStartOffset)
{
Modified: trunk/xiph-qt/utils/wrap_ogg.h
===================================================================
--- trunk/xiph-qt/utils/wrap_ogg.h 2005-12-10 13:33:40 UTC (rev 10573)
+++ trunk/xiph-qt/utils/wrap_ogg.h 2005-12-10 16:22:13 UTC (rev 10574)
@@ -33,6 +33,7 @@
#define __wrap_ogg_h__
+#include "config.h"
#include <Ogg/ogg.h>
extern Boolean WrapOggPage(ogg_page* outOggPage, const void* inRawData,
More information about the commits
mailing list