[xiph-commits] r12346 - in trunk/xiph-qt: . CAFLAC/CAFLAC.xcodeproj CAFLAC/src CASpeex/CASpeex.xcodeproj CAVorbis/src OggExport/OggExport.xcodeproj OggExport/src OggExport/src/OggExport.nib OggImport OggImport/src Theora/Theora.xcodeproj Theora/src build-macosx build-macosx/English.lproj build-macosx/XiphQT.xcodeproj build-macosx/flac-support build-macosx/flac-support/English.lproj build-macosx/flac-support/FLAC.xcodeproj common external-libs

arek at svn.xiph.org arek at svn.xiph.org
Thu Jan 18 05:46:19 PST 2007


Author: arek
Date: 2007-01-18 05:45:42 -0800 (Thu, 18 Jan 2007)
New Revision: 12346

Added:
   trunk/xiph-qt/OggExport/src/stream_types_video.h
   trunk/xiph-qt/OggExport/src/stream_video.c
   trunk/xiph-qt/OggExport/src/stream_video.h
   trunk/xiph-qt/Theora/src/TheoraEncoder.c
   trunk/xiph-qt/Theora/src/TheoraEncoder.h
   trunk/xiph-qt/Theora/src/TheoraEncoder.r
   trunk/xiph-qt/Theora/src/TheoraEncoderDispatch.h
   trunk/xiph-qt/Theora/src/encoder_types.h
   trunk/xiph-qt/build-macosx/
   trunk/xiph-qt/build-macosx/English.lproj/
   trunk/xiph-qt/build-macosx/English.lproj/InfoPlist.strings
   trunk/xiph-qt/build-macosx/Info (decoders).plist
   trunk/xiph-qt/build-macosx/Info.plist
   trunk/xiph-qt/build-macosx/XiphQT.xcodeproj/
   trunk/xiph-qt/build-macosx/XiphQT.xcodeproj/project.pbxproj
   trunk/xiph-qt/build-macosx/XiphQT_Prefix.pch
   trunk/xiph-qt/build-macosx/flac-support/
   trunk/xiph-qt/build-macosx/flac-support/English.lproj/
   trunk/xiph-qt/build-macosx/flac-support/English.lproj/InfoPlist.strings
   trunk/xiph-qt/build-macosx/flac-support/FLAC++-Info.plist
   trunk/xiph-qt/build-macosx/flac-support/FLAC++_Prefix.pch
   trunk/xiph-qt/build-macosx/flac-support/FLAC.xcodeproj/
   trunk/xiph-qt/build-macosx/flac-support/FLAC.xcodeproj/project.pbxproj
   trunk/xiph-qt/build-macosx/flac-support/FLAC_Prefix.pch
   trunk/xiph-qt/build-macosx/flac-support/Info.plist
Modified:
   trunk/xiph-qt/CAFLAC/CAFLAC.xcodeproj/project.pbxproj
   trunk/xiph-qt/CAFLAC/src/CAFLACDecoder.cpp
   trunk/xiph-qt/CAFLAC/src/CAFLACDecoder.h
   trunk/xiph-qt/CASpeex/CASpeex.xcodeproj/project.pbxproj
   trunk/xiph-qt/CAVorbis/src/vorbis_entrypoints.cpp
   trunk/xiph-qt/OggExport/OggExport.xcodeproj/project.pbxproj
   trunk/xiph-qt/OggExport/src/OggExport.c
   trunk/xiph-qt/OggExport/src/OggExport.h
   trunk/xiph-qt/OggExport/src/OggExport.nib/info.nib
   trunk/xiph-qt/OggExport/src/OggExport.nib/objects.xib
   trunk/xiph-qt/OggExport/src/exporter_types.h
   trunk/xiph-qt/OggExport/src/stream_audio.c
   trunk/xiph-qt/OggExport/src/stream_audio.h
   trunk/xiph-qt/OggImport/Info.plist
   trunk/xiph-qt/OggImport/src/OggImport.h
   trunk/xiph-qt/OggImport/src/stream_flac.c
   trunk/xiph-qt/OggImport/src/stream_theora.c
   trunk/xiph-qt/OggImport/src/stream_types_flac.h
   trunk/xiph-qt/OggImport/src/stream_types_theora.h
   trunk/xiph-qt/OggImport/src/versions.h
   trunk/xiph-qt/Theora/Theora.xcodeproj/project.pbxproj
   trunk/xiph-qt/Theora/src/Theora.exp
   trunk/xiph-qt/Theora/src/TheoraDecoder.c
   trunk/xiph-qt/Theora/src/TheoraDecoder.r
   trunk/xiph-qt/Theora/src/decoder_types.h
   trunk/xiph-qt/Theora/src/theora_versions.h
   trunk/xiph-qt/common/config.h
   trunk/xiph-qt/external-libs/
Log:
Changes:
 * moving towards centralised build-system, using svn:externals for dependencies (FLAC uses CVS, hence it's libs/frameworks build files defined locally); 
 * Xcode build files now produce XiphQT as a single (statically linked) bundle (full, or decoders-only flavors);
 * Theora decoder: fixed handling of multiple-of-16 frame sizes and offsets (leftover from transition to theora-exp);
 * Ogg importer: added FLAC channel mapping layouts for 2.1 - 5.1;
 * Ogg importer: initial attempt to use AddMediaSampleReferences64 bulk update interface; 
 * Theora encoder: initial version;
 * Ogg exporter: initial support for video streams.

(The revision might not compile or work properly.)


Modified: trunk/xiph-qt/CAFLAC/CAFLAC.xcodeproj/project.pbxproj
===================================================================
--- trunk/xiph-qt/CAFLAC/CAFLAC.xcodeproj/project.pbxproj	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/CAFLAC/CAFLAC.xcodeproj/project.pbxproj	2007-01-18 13:45:42 UTC (rev 12346)
@@ -30,30 +30,6 @@
 		8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildStyle section */
-		4F9091AC011F3BD104CA0E50 /* Development */ = {
-			isa = PBXBuildStyle;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				ZERO_LINK = YES;
-			};
-			name = Development;
-		};
-		4F9091AD011F3BD104CA0E50 /* Deployment */ = {
-			isa = PBXBuildStyle;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				ZERO_LINK = NO;
-			};
-			name = Deployment;
-		};
-/* End PBXBuildStyle section */
-
 /* Begin PBXCopyFilesBuildPhase section */
 		73A55FDB09000902009FD166 /* CopyFiles */ = {
 			isa = PBXCopyFilesBuildPhase;
@@ -307,15 +283,6 @@
 			);
 			buildRules = (
 			);
-			buildSettings = {
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CAFLAC_Prefix.pch;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Library/Bundles";
-				PRODUCT_NAME = CAFLAC;
-				WRAPPER_EXTENSION = bundle;
-			};
 			dependencies = (
 			);
 			name = CAFLAC;
@@ -330,12 +297,6 @@
 		089C1669FE841209C02AAC07 /* Project object */ = {
 			isa = PBXProject;
 			buildConfigurationList = 739EAEAB08FEB331008D8013 /* Build configuration list for PBXProject "CAFLAC" */;
-			buildSettings = {
-			};
-			buildStyles = (
-				4F9091AC011F3BD104CA0E50 /* Development */,
-				4F9091AD011F3BD104CA0E50 /* Deployment */,
-			);
 			hasScannedForEncodings = 1;
 			mainGroup = 089C166AFE841209C02AAC07 /* CAFLAC */;
 			projectDirPath = "";

Modified: trunk/xiph-qt/CAFLAC/src/CAFLACDecoder.cpp
===================================================================
--- trunk/xiph-qt/CAFLAC/src/CAFLACDecoder.cpp	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/CAFLAC/src/CAFLACDecoder.cpp	2007-01-18 13:45:42 UTC (rev 12346)
@@ -536,7 +536,7 @@
 
 #pragma mark Callbacks
 
-::FLAC__StreamDecoderReadStatus CAFLACDecoder::read_callback(FLAC__byte buffer[], unsigned *bytes)
+::FLAC__StreamDecoderReadStatus CAFLACDecoder::read_callback(FLAC__byte buffer[], size_t *bytes)
 {
     dbg_printf(" | -> [%08lx] :: read_callback(%ld)\n", (UInt32) this, *bytes);
     FLAC__StreamDecoderReadStatus ret = FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;

Modified: trunk/xiph-qt/CAFLAC/src/CAFLACDecoder.h
===================================================================
--- trunk/xiph-qt/CAFLAC/src/CAFLACDecoder.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/CAFLAC/src/CAFLACDecoder.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -94,7 +94,7 @@
 protected:
     /* FLAC callback interface functions */
 
-    virtual ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[], unsigned *bytes);
+    virtual ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[], size_t *bytes);
     virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]);
     virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata);
     virtual void error_callback(::FLAC__StreamDecoderErrorStatus status);

Modified: trunk/xiph-qt/CASpeex/CASpeex.xcodeproj/project.pbxproj
===================================================================
--- trunk/xiph-qt/CASpeex/CASpeex.xcodeproj/project.pbxproj	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/CASpeex/CASpeex.xcodeproj/project.pbxproj	2007-01-18 13:45:42 UTC (rev 12346)
@@ -29,30 +29,6 @@
 		8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildStyle section */
-		4F9091AC011F3BD104CA0E50 /* Development */ = {
-			isa = PBXBuildStyle;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				ZERO_LINK = YES;
-			};
-			name = Development;
-		};
-		4F9091AD011F3BD104CA0E50 /* Deployment */ = {
-			isa = PBXBuildStyle;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				ZERO_LINK = NO;
-			};
-			name = Deployment;
-		};
-/* End PBXBuildStyle section */
-
 /* Begin PBXCopyFilesBuildPhase section */
 		73814C2D090805DF00C478FC /* CopyFiles */ = {
 			isa = PBXCopyFilesBuildPhase;
@@ -317,15 +293,6 @@
 			);
 			buildRules = (
 			);
-			buildSettings = {
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CASpeex_Prefix.pch;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Library/Bundles";
-				PRODUCT_NAME = CASpeex;
-				WRAPPER_EXTENSION = bundle;
-			};
 			dependencies = (
 			);
 			name = CASpeex;
@@ -340,12 +307,6 @@
 		089C1669FE841209C02AAC07 /* Project object */ = {
 			isa = PBXProject;
 			buildConfigurationList = 73814AA40907F9EC00C478FC /* Build configuration list for PBXProject "CASpeex" */;
-			buildSettings = {
-			};
-			buildStyles = (
-				4F9091AC011F3BD104CA0E50 /* Development */,
-				4F9091AD011F3BD104CA0E50 /* Deployment */,
-			);
 			hasScannedForEncodings = 1;
 			mainGroup = 089C166AFE841209C02AAC07 /* CASpeex */;
 			projectDirPath = "";

Modified: trunk/xiph-qt/CAVorbis/src/vorbis_entrypoints.cpp
===================================================================
--- trunk/xiph-qt/CAVorbis/src/vorbis_entrypoints.cpp	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/CAVorbis/src/vorbis_entrypoints.cpp	2007-01-18 13:45:42 UTC (rev 12346)
@@ -4,7 +4,7 @@
  *    Declaration of the entry points for the Vorbis component.
  *
  *
- *  Copyright (c) 2005  Arek Korbik
+ *  Copyright (c) 2005-2006  Arek Korbik
  *
  *  This file is part of XiphQT, the Xiph QuickTime Components.
  *
@@ -46,9 +46,13 @@
     return ACCodecDispatch(inParameters, inThis);
 }
 
+
+#if !defined(XIPHQT_NO_ENCODERS)
+
 extern "C"
 ComponentResult	CAVorbisEncoderEntry(ComponentParameters* inParameters, CAVorbisEncoder* inThis)
 {
     return ACCodecDispatch(inParameters, inThis);
 }
 
+#endif  /* XIPHQT_NO_ENCODERS */

Modified: trunk/xiph-qt/OggExport/OggExport.xcodeproj/project.pbxproj
===================================================================
--- trunk/xiph-qt/OggExport/OggExport.xcodeproj/project.pbxproj	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggExport/OggExport.xcodeproj/project.pbxproj	2007-01-18 13:45:42 UTC (rev 12346)
@@ -7,6 +7,7 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		730CCC0C0B11F0E20037043F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 730CCC0B0B11F0E20037043F /* QuartzCore.framework */; };
 		739BE4490AFE641A009300B9 /* stream_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 739BE4460AFE641A009300B9 /* stream_audio.c */; };
 		73C738510AFB516A00E8ACC3 /* OggExport.c in Sources */ = {isa = PBXBuildFile; fileRef = 73C7384E0AFB516A00E8ACC3 /* OggExport.c */; };
 		73C738570AFB53A500E8ACC3 /* OggExport.r in Rez */ = {isa = PBXBuildFile; fileRef = 73C738540AFB538100E8ACC3 /* OggExport.r */; };
@@ -15,6 +16,7 @@
 		73C738790AFB632200E8ACC3 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73C738770AFB632200E8ACC3 /* CoreFoundation.framework */; };
 		73C7387A0AFB632200E8ACC3 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73C738780AFB632200E8ACC3 /* QuickTime.framework */; };
 		73C739170AFB87DE00E8ACC3 /* OggExport.nib in Resources */ = {isa = PBXBuildFile; fileRef = 73C739160AFB87DE00E8ACC3 /* OggExport.nib */; };
+		73F746960B0A24F400BCCED1 /* stream_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 73F746930B0A24F400BCCED1 /* stream_video.c */; };
 		8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
 		8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; };
 /* End PBXBuildFile section */
@@ -36,6 +38,7 @@
 		089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
 		32BAE0B30371A71500C91783 /* OggExport_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OggExport_Prefix.pch; sourceTree = "<group>"; };
+		730CCC0B0B11F0E20037043F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
 		730EBAFA0B0348DA003486CB /* stream_types_audio.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_types_audio.h; path = src/stream_types_audio.h; sourceTree = "<group>"; };
 		730EBB200B0377EC003486CB /* fccs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fccs.h; path = ../common/fccs.h; sourceTree = SOURCE_ROOT; };
 		739BE4450AFE641A009300B9 /* oggexport_versions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = oggexport_versions.h; path = src/oggexport_versions.h; sourceTree = "<group>"; };
@@ -57,6 +60,9 @@
 		73C738770AFB632200E8ACC3 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
 		73C738780AFB632200E8ACC3 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
 		73C739160AFB87DE00E8ACC3 /* OggExport.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = OggExport.nib; path = src/OggExport.nib; sourceTree = "<group>"; };
+		73F746920B0A24F400BCCED1 /* stream_types_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_types_video.h; path = src/stream_types_video.h; sourceTree = "<group>"; };
+		73F746930B0A24F400BCCED1 /* stream_video.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_video.c; path = src/stream_video.c; sourceTree = "<group>"; };
+		73F746940B0A24F400BCCED1 /* stream_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_video.h; path = src/stream_video.h; sourceTree = "<group>"; };
 		8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
 		8D01CCD20486CAD60068D4B7 /* OggExport.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OggExport.component; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
@@ -70,6 +76,7 @@
 				73C738760AFB62F600E8ACC3 /* Ogg.framework in Frameworks */,
 				73C738790AFB632200E8ACC3 /* CoreFoundation.framework in Frameworks */,
 				73C7387A0AFB632200E8ACC3 /* QuickTime.framework in Frameworks */,
+				730CCC0C0B11F0E20037043F /* QuartzCore.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -90,6 +97,7 @@
 		089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
 			isa = PBXGroup;
 			children = (
+				730CCC0B0B11F0E20037043F /* QuartzCore.framework */,
 				73C738770AFB632200E8ACC3 /* CoreFoundation.framework */,
 				73C738780AFB632200E8ACC3 /* QuickTime.framework */,
 				73C738750AFB62F600E8ACC3 /* Ogg.framework */,
@@ -114,8 +122,9 @@
 		08FB77ADFE841716C02AAC07 /* Source */ = {
 			isa = PBXGroup;
 			children = (
+				730EBAF90B0348B3003486CB /* audio */,
+				73F746910B0A24D100BCCED1 /* video */,
 				730EBB200B0377EC003486CB /* fccs.h */,
-				730EBAF90B0348B3003486CB /* audio */,
 				739BE4530AFE7E8D009300B9 /* data_types.h */,
 				739BE4450AFE641A009300B9 /* oggexport_versions.h */,
 				73C738730AFB5BE900E8ACC3 /* debug.h */,
@@ -149,6 +158,16 @@
 			name = audio;
 			sourceTree = "<group>";
 		};
+		73F746910B0A24D100BCCED1 /* video */ = {
+			isa = PBXGroup;
+			children = (
+				73F746920B0A24F400BCCED1 /* stream_types_video.h */,
+				73F746930B0A24F400BCCED1 /* stream_video.c */,
+				73F746940B0A24F400BCCED1 /* stream_video.h */,
+			);
+			name = video;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -236,6 +255,7 @@
 			files = (
 				73C738510AFB516A00E8ACC3 /* OggExport.c in Sources */,
 				739BE4490AFE641A009300B9 /* stream_audio.c in Sources */,
+				73F746960B0A24F400BCCED1 /* stream_video.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: trunk/xiph-qt/OggExport/src/OggExport.c
===================================================================
--- trunk/xiph-qt/OggExport/src/OggExport.c	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggExport/src/OggExport.c	2007-01-18 13:45:42 UTC (rev 12346)
@@ -4,7 +4,7 @@
  *    The main part of the OggExport component.
  *
  *
- *  Copyright (c) 2006  Arek Korbik
+ *  Copyright (c) 2006-2007  Arek Korbik
  *
  *  This file is part of XiphQT, the Xiph QuickTime Components.
  *
@@ -27,6 +27,7 @@
  *
  */
 
+#undef NDEBUG
 
 #if defined(__APPLE_CC__)
 #include <QuickTime/QuickTime.h>
@@ -40,11 +41,13 @@
 #include "debug.h"
 #include "exporter_types.h"
 
+#include "fccs.h"
+
 #include "stream_audio.h"
 
 // stream-type handle functions
 #include "stream_audio.h"
-//#include "stream_video.h"
+#include "stream_video.h"
 
 static stream_format_handle_funcs s_formats[] = {
 #if defined(_HAVE__OE_AUDIO)
@@ -125,6 +128,10 @@
 
 static ComponentResult mux_streams(OggExportGlobalsPtr globals, DataHandler data_h);
 
+static ComponentResult _setup_std_video(OggExportGlobalsPtr globals, ComponentInstance stdVideo);
+static ComponentResult _get_std_video_config(OggExportGlobalsPtr globals, ComponentInstance stdVideo);
+static ComponentResult _video_settings_to_ac(OggExportGlobalsPtr globals, QTAtomContainer *settings);
+static ComponentResult _ac_to_video_settings(OggExportGlobalsPtr globals, QTAtomContainer settings);
 
 
 #define CALLCOMPONENT_BASENAME()        OggExport
@@ -161,6 +168,23 @@
         globals->self = self;
         globals->use_hires_audio = false;
 
+        globals->set_v_disable = 0;
+        globals->set_a_disable = 0;
+
+        globals->set_v_quality = codecNormalQuality;
+        globals->set_v_fps = 0;
+        globals->set_v_bitrate = 0;
+        globals->set_v_keyrate = 64;
+        globals->set_v_settings = NULL;
+        globals->set_v_custom = NULL;
+
+        globals->set_a_quality = codecNormalQuality;
+        globals->set_a_bitrate = 0;
+        globals->set_a_samplerate = 0;
+
+        globals->setdlg_a_allow = true;
+        globals->setdlg_v_allow = true;
+
         SetComponentInstanceStorage(self, (Handle) globals);
 
         // Get the QuickTime Movie export component
@@ -193,6 +217,9 @@
             DisposeHandle((Handle) globals->streamInfoHandle);
         }
 
+        if (globals->set_v_settings)
+            QTDisposeAtomContainer(globals->set_v_settings);
+
         DisposePtr((Ptr) globals);
     }
 
@@ -339,38 +366,97 @@
                                           Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration)
 {
     TimeScale scale;
+    MovieExportGetPropertyUPP getVideoPropertyProc = NULL;
+    MovieExportGetDataUPP getVideoDataProc = NULL;
     MovieExportGetPropertyUPP getSoundPropertyProc = NULL;
     MovieExportGetDataUPP getSoundDataProc = NULL;
+    void *videoRefCon;
     void *audioRefCon;
     long trackID;
     ComponentResult err;
+    Boolean have_sources = false;
 
     dbg_printf("[  OE]  >> [%08lx] :: ToDataRef(%d, %ld, %ld)\n", (UInt32) globals, onlyThisTrack != NULL, startTime, duration);
 
     // TODO: loop for all tracks
 
-    /*
-    err = MovieExportNewGetDataAndPropertiesProcs(globals->quickTimeMovieExporter, VideoMediaType, &scale, theMovie,
-                                                  onlyThisTrack, startTime, duration, &getVideoPropertyProc,
-                                                  &getVideoDataProc, &videoRefCon);
-    */
+#if 0
+    {
+        SCSpatialSettings ss = {k422YpCbCr8PixelFormat, NULL, 32, 512};
+        ComponentInstance stdcomp = NULL;
+        QTAtomContainer mes = NULL;
+        ComponentResult terr;
 
-    err = MovieExportNewGetDataAndPropertiesProcs(globals->quickTimeMovieExporter, SoundMediaType, &scale, theMovie,
-                                                  onlyThisTrack, startTime, duration, &getSoundPropertyProc,
-                                                  &getSoundDataProc, &audioRefCon);
+        terr = OpenADefaultComponent(StandardCompressionType, StandardCompressionSubType, &stdcomp);
+        if (terr)
+            goto tbail;
 
-    dbg_printf("[  OE]   = [%08lx] :: ToDataRef() = %ld\n", (UInt32) globals, err);
-    if (!err) {
-        // ** Add the audio data source **
-        err = MovieExportAddDataSource(globals->self, SoundMediaType, scale, &trackID, getSoundPropertyProc, getSoundDataProc, audioRefCon);
+        //ss.codecType = k422YpCbCr8PixelFormat;
+        ss.codecType = 'XiVs';
+        terr = SCSetInfo(stdcomp, scSpatialSettingsType, &ss);
+        if (terr)
+            goto tbail;
+
+        terr = SCGetSettingsAsAtomContainer(stdcomp, &mes);
+        if (terr)
+            goto tbail;
+
+        terr = MovieExportSetSettingsFromAtomContainer(globals->quickTimeMovieExporter, mes);
+        if (terr)
+            goto tbail;
+
+        dbg_printf("[ vOE]  ss [%08lx] :: configure_stream() = %ld, ['%4.4s', %08lx, %d, %ld]\n", (UInt32) globals, err,
+                   (char *) &ss.codecType, (UInt32) ss.codec, ss.depth, ss.spatialQuality);
+
+    tbail:
+        dbg_printf("[  OE]  ?? [%08lx] :: ToDataRef() = %ld\n", (UInt32) globals, terr);
+        if (stdcomp)
+            CloseComponent(stdcomp);
+
+        if (mes)
+            DisposeHandle(mes);
+    }
+#endif
+
+    if (globals->set_v_disable != 1) {
+        err = MovieExportNewGetDataAndPropertiesProcs(globals->quickTimeMovieExporter, VideoMediaType, &scale, theMovie,
+                                                      onlyThisTrack, startTime, duration, &getVideoPropertyProc,
+                                                      &getVideoDataProc, &videoRefCon);
+        dbg_printf("[  OE]   # [%08lx] :: ToDataRef() = %ld\n", (UInt32) globals, err);
+
         if (!err) {
-            err = MovieExportFromProceduresToDataRef(globals->self, dataRef, dataRefType);
+            err = MovieExportAddDataSource(globals->self, VideoMediaType, scale, &trackID, getVideoPropertyProc, getVideoDataProc, videoRefCon);
+            if (!err)
+                have_sources = true;
         }
     }
 
+    if (globals->set_a_disable != 1) {
+        err = MovieExportNewGetDataAndPropertiesProcs(globals->quickTimeMovieExporter, SoundMediaType, &scale, theMovie,
+                                                      onlyThisTrack, startTime, duration, &getSoundPropertyProc,
+                                                      &getSoundDataProc, &audioRefCon);
+
+        dbg_printf("[  OE]   = [%08lx] :: ToDataRef() = %ld\n", (UInt32) globals, err);
+        if (!err) {
+            // ** Add the audio data source **
+            err = MovieExportAddDataSource(globals->self, SoundMediaType, scale, &trackID, getSoundPropertyProc, getSoundDataProc, audioRefCon);
+            if (!err)
+                have_sources = true;
+        }
+    }
+
+    if (have_sources) {
+        err = MovieExportFromProceduresToDataRef(globals->self, dataRef, dataRefType);
+    } else {
+        err = invalidMovie;
+    }
+
     if (getSoundPropertyProc || getSoundDataProc)
         MovieExportDisposeGetDataAndPropertiesProcs(globals->quickTimeMovieExporter, getSoundPropertyProc, getSoundDataProc, audioRefCon);
 
+    if (getVideoPropertyProc || getVideoDataProc)
+        MovieExportDisposeGetDataAndPropertiesProcs(globals->quickTimeMovieExporter, getVideoPropertyProc, getVideoDataProc, videoRefCon);
+
     dbg_printf("[  OE] <   [%08lx] :: ToDataRef() = 0x%04lx, %ld\n", (UInt32) globals, err, trackID);
     return err;
 }
@@ -456,16 +542,246 @@
     return noErr;
 }
 
+ComponentResult ConfigAndShowStdVideoDlg(OggExportGlobalsPtr globals, WindowRef window)
+{
+    ComponentResult err = noErr;
+    SCExtendedProcs xProcs;
+    ComponentInstance stdVideo;
+    PicHandle ph = NULL;
+    long sc_prefs;
+    Boolean full_cfg = true;
 
+    dbg_printf("[  OE]  >> [%08lx] :: ConfigAndShowStdVideoDlg()\n", (UInt32) globals);
+
+    err = OpenADefaultComponent(StandardCompressionType, StandardCompressionSubType, &stdVideo);
+
+    if (!err) {
+        sc_prefs = scAllowZeroFrameRate | scAllowZeroKeyFrameRate | scShowDataRateAsKilobits;
+
+        err = SCSetInfo(stdVideo, scPreferenceFlagsType, &sc_prefs);
+
+        if (!err) {
+            if (globals->set_v_settings != NULL)
+                err = SCSetSettingsFromAtomContainer(stdVideo, globals->set_v_settings);
+            else
+                err = _setup_std_video(globals, stdVideo);
+        }
+
+        if (!err && globals->setdlg_movie != NULL) {
+            TimeScale mt = GetMovieTime(globals->setdlg_movie, NULL);
+            Rect pr;
+
+            if (mt == 0)
+                mt = GetMoviePosterTime(globals->setdlg_movie);
+            err = GetMoviesError();
+            dbg_printf("[  OE] [ ] [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+            if (!err) {
+                ph = GetMoviePict(globals->setdlg_movie, mt);
+                if (ph != NULL) {
+                    QDGetPictureBounds(ph, &pr);
+                    //sc_prefs = scPreferScalingAnd;
+                    //sc_prefs = scPreferScalingAndCropping;
+                    sc_prefs = scPreferScalingAndCropping | scDontDetermineSettingsFromTestImage;
+                    err = SCSetTestImagePictHandle(stdVideo, ph, &pr, sc_prefs);
+                }
+            }
+        }
+
+        if (!err) {
+            QTAtomContainer std_v_settings = NULL;
+            err = SCGetSettingsAsAtomContainer(stdVideo, &std_v_settings);
+            dbg_printf("[  OE]  ?S [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+            if (!err) {
+                err = SCSetSettingsFromAtomContainer(stdVideo, std_v_settings);
+                dbg_printf("[  OE]  !S [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+            }
+        }
+
+        if (!err)
+            err = SCRequestSequenceSettings(stdVideo);
+
+        if (!err) {
+            /* TODO: get config from the stdComp and store it */
+            if (globals->set_v_settings) {
+                QTDisposeAtomContainer(globals->set_v_settings);
+                globals->set_v_settings = NULL;
+            }
+            err = SCGetSettingsAsAtomContainer(stdVideo, &globals->set_v_settings);
+            if (err && globals->set_v_settings) {
+                QTDisposeAtomContainer(globals->set_v_settings);
+                globals->set_v_settings = NULL;
+            }
+        }
+
+        CloseComponent(stdVideo);
+
+        if (ph != NULL)
+            DisposeHandle((Handle) ph);
+    }
+
+
+#if 0
+    
+    if (!err && globals->set_v_settings) {
+        err = SCSetSettingsFromAtomContainer(stdVideo, globals->set_v_settings);
+        dbg_printf("[  OE]  =S [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+        if (!err)
+            full_cfg = false;
+    }
+
+    if (!err) {
+        sc_prefs = scAllowZeroFrameRate | scAllowZeroKeyFrameRate | scShowDataRateAsKilobits;
+        //sc_prefs |= scDontDetermineSettingsFromTestImage;
+#if USE_VIDE_COMPONENT
+        sc_prefs |= scAllowEncodingWithCompressionSession; // Don't set with the StandardCompressionSubType
+#endif /* USE_VIDE_COMPONENT */
+
+        err = SCSetInfo(stdVideo, scPreferenceFlagsType, &sc_prefs);
+        dbg_printf("[  OE]  uS [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+
+        memset(&xProcs, 0, sizeof(xProcs));
+        strcpy((char*)xProcs.customName + 1, "Select Output Format");
+        xProcs.customName[0] = (unsigned char) strlen((char*) xProcs.customName + 1);
+        /*
+          (void) QTSetComponentProperty(stdVideo, kQTPropertyClass_SCAudio,
+                                        kQTSCAudioPropertyID_ExtendedProcs,
+                                        sizeof(xProcs), &xProcs);
+        */
+        err = SCSetInfo(stdVideo, scExtendedProcsType, &xProcs);
+        dbg_printf("[  OE]  pS [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+
+        if (!err)
+        {
+            Handle codec_types = NewHandleClear(sizeof(OSType));
+            SCSpatialSettings ss;
+            SCTemporalSettings ts = {codecNormalQuality, 0, 64};
+            SCDataRateSettings ds = {0, 0, 0, 0};
+
+
+            *(OSType *)*codec_types = kVideoFormatXiphTheora;
+            err = SCSetInfo(stdVideo, scCompressionListType, &codec_types);
+            dbg_printf("[  OE]  =L [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+
+            if (!err) {
+                *(OSType *)*codec_types = kXiphComponentsManufacturer;
+                err = SCSetInfo(stdVideo, scCodecManufacturerType, &codec_types);
+                dbg_printf("[  OE]  =M [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+            }
+
+            DisposeHandle(codec_types);
+
+            if (!err) {
+                if (full_cfg || SCGetInfo(stdVideo, scSpatialSettingsType, &ss)) {
+                    dbg_printf("[  OE]  sS [%08lx] :: ConfigAndShowStdVideoDlg() = %ld %d\n", (UInt32) globals, err, full_cfg);
+                    ss.depth = 0;
+                    ss.spatialQuality = codecNormalQuality;
+                }
+
+                ss.codecType = kVideoFormatXiphTheora;
+                ss.codec = NULL;
+
+                if (!full_cfg)
+                    SCGetInfo(stdVideo, scTemporalSettingsType, &ts);
+
+                if (!full_cfg)
+                    SCGetInfo(stdVideo, scDataRateSettingsType, &ds);
+
+                err = SCSetInfo(stdVideo, scSpatialSettingsType, &ss);
+                dbg_printf("[  OE]  _s [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+                if (!err) {
+                    err = SCSetInfo(stdVideo, scTemporalSettingsType, &ts);
+                    dbg_printf("[  OE]  _t [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+                }
+                if (!err) {
+                    err = SCSetInfo(stdVideo, scDataRateSettingsType, &ds);
+                    dbg_printf("[  OE]  _d [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+                }
+            }
+
+#if 0
+            if (!err) {
+                Handle custom = NewHandleClear(0);
+                err = SCGetInfo(stdVideo, scCodecSettingsType, &custom);
+                dbg_printf("[  OE]  cS [%08lx] :: ConfigAndShowStdVideoDlg() = %ld, %ld\n", (UInt32) globals, err, GetHandleSize(custom));
+
+                if (!IsHandleValid(custom))
+                    custom = NewHandleClear(0);
+                err = SCSetInfo(stdVideo, scCodecSettingsType, &custom);
+                dbg_printf("[  OE]  CS [%08lx] :: ConfigAndShowStdVideoDlg() = %ld %ld\n", (UInt32) globals, err, GetHandleSize(custom));
+
+                DisposeHandle(custom);
+            }
+#endif /* 0 */
+        }
+
+        if (!err && globals->setdlg_movie != NULL) {
+            TimeScale mt = GetMovieTime(globals->setdlg_movie, NULL);
+            Rect pr;
+
+            if (mt == 0)
+                mt = GetMoviePosterTime(globals->setdlg_movie);
+            err = GetMoviesError();
+            dbg_printf("[  OE] [ ] [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+            if (!err) {
+                ph = GetMoviePict(globals->setdlg_movie, mt);
+                if (ph != NULL) {
+                    QDGetPictureBounds(ph, &pr);
+                    //sc_prefs = scPreferScalingAnd;
+                    //sc_prefs = scPreferScalingAndCropping;
+                    sc_prefs = scPreferScalingAndCropping | scDontDetermineSettingsFromTestImage;
+                    err = SCSetTestImagePictHandle(stdVideo, ph, &pr, sc_prefs);
+                }
+            }
+        }
+
+        if (!err) {
+            QTAtomContainer std_v_settings = NULL;
+            err = SCGetSettingsAsAtomContainer(stdVideo, &std_v_settings);
+            dbg_printf("[  OE]  ?S [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+            if (!err) {
+                err = SCSetSettingsFromAtomContainer(stdVideo, std_v_settings);
+                dbg_printf("[  OE]  !S [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+            }
+        }
+
+        if (!err)
+            err = SCRequestSequenceSettings(stdVideo);
+
+        if (!err) {
+            /* TODO: get config from the stdComp and store it */
+            if (globals->set_v_settings) {
+                QTDisposeAtomContainer(globals->set_v_settings);
+                globals->set_v_settings = NULL;
+            }
+            err = SCGetSettingsAsAtomContainer(stdVideo, &globals->set_v_settings);
+            if (err && globals->set_v_settings) {
+                QTDisposeAtomContainer(globals->set_v_settings);
+                globals->set_v_settings = NULL;
+            }
+        }
+
+        CloseComponent(stdVideo);
+
+        if (ph != NULL)
+            DisposeHandle((Handle) ph);
+    }
+#endif /* 0 */
+
+    dbg_printf("[  OE] <   [%08lx] :: ConfigAndShowStdVideoDlg() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
 #if USE_NIB_FILE
 static pascal OSStatus SettingsWindowEventHandler(EventHandlerCallRef inHandler, EventRef inEvent, void *inUserData)
 {
-#pragma unused (inHandler,inUserData)
+#pragma unused (inHandler)
 
     WindowRef window = NULL;
     HICommand command;
     OSStatus result = eventNotHandledErr;
     OggExportGlobalsPtr globals = (OggExportGlobalsPtr) inUserData;
+    ControlRef  ec, cc;
+    ControlID   aecbID = {'XiOE', 6}, vecbID = {'XiOE', 5}, acbID = {'XiOE', 4}, vcbID = {'XiOE', 3};
 
     dbg_printf("[  OE]  >> [%08lx] :: SettingsWindowEventHandler()\n", (UInt32) globals);
 
@@ -481,6 +797,30 @@
     case kHICommandOK:
         globals->canceled = false;
 
+        if (globals->setdlg_a_allow) {
+            GetControlByID(window, &aecbID, &ec);
+            if (GetControl32BitValue(ec) == 1) {
+                globals->set_a_disable = 0;
+            } else {
+                globals->set_a_disable = 1;
+            }
+        }
+
+        if (globals->setdlg_v_allow) {
+            GetControlByID(window, &vecbID, &ec);
+            if (GetControl32BitValue(ec) == 1) {
+                globals->set_v_disable = 0;
+            } else {
+                globals->set_v_disable = 1;
+            }
+        }
+
+        if (globals->set_v_settings != NULL) {
+            /* result = */ _ac_to_video_settings(globals, globals->set_v_settings);
+            //QTDisposeAtomContainer(globals->set_v_settings);
+            //globals->set_v_settings = NULL;
+        }
+
         QuitAppModalLoopForWindow(window);
         result = noErr;
         break;
@@ -491,7 +831,14 @@
         result = noErr;
         break;
 
-    case 'OEca':
+    case 'OEcv':                /* O(gg)E(xport)c(onfigure)v(ideo) */
+        result = ConfigAndShowStdVideoDlg(globals, window);
+        if (result == userCanceledErr || result == scUserCancelled)
+            result = noErr; // User cancelling is ok.
+
+        break;
+
+    case 'OEca':                /* O(gg)E(xport)c(onfigure)a(udio) */
         {
             SCExtendedProcs xProcs;
             ComponentInstance stdAudio;
@@ -514,6 +861,34 @@
 
         break;
 
+    case 'OEea':                /* O(gg)E(xport)e(nable)a(udio) */
+        GetControlByID(window, &aecbID, &ec);
+        GetControlByID(window, &acbID, &cc);
+        if (GetControl32BitValue(ec) == 0) {
+            EnableControl(cc);
+            SetControl32BitValue(ec, 1);
+        } else {
+            DisableControl(cc);
+            SetControl32BitValue(ec, 0);
+        }
+        result = noErr;
+
+        break;
+
+    case 'OEev':                /* O(gg)E(xport)e(nable)v(ideo) */
+        GetControlByID(window, &vecbID, &ec);
+        GetControlByID(window, &vcbID, &cc);
+        if (GetControl32BitValue(ec) == 0) {
+            EnableControl(cc);
+            SetControl32BitValue(ec, 1);
+        } else {
+            DisableControl(cc);
+            SetControl32BitValue(ec, 0);
+        }
+        result = noErr;
+
+        break;
+
     default:
         break;
     }
@@ -532,6 +907,8 @@
     IBNibRef    nibRef = NULL;
     WindowRef   window = NULL;
     Boolean     portChanged = false;
+    ControlRef  ec, cc;
+    ControlID   aecbID = {'XiOE', 6}, vecbID = {'XiOE', 5}, acbID = {'XiOE', 4}, vcbID = {'XiOE', 3};
 
     CGrafPtr    savedPort;
     OSErr       err = resFNotFound;
@@ -557,6 +934,68 @@
 
     *canceledPtr = false;
 
+    if (theMovie != NULL) {
+        if (onlyThisTrack == NULL) {
+            if (GetMovieIndTrackType(theMovie, 1, VisualMediaCharacteristic, movieTrackCharacteristic | movieTrackEnabledOnly) == NULL)
+                globals->setdlg_v_allow = false;
+            else
+                globals->setdlg_v_allow = true;
+
+            if (GetMovieIndTrackType(theMovie, 1, AudioMediaCharacteristic, movieTrackCharacteristic | movieTrackEnabledOnly) == NULL)
+                globals->setdlg_a_allow = false;
+            else
+                globals->setdlg_a_allow = true;
+        } else {
+            MediaHandler mh = GetMediaHandler(GetTrackMedia(onlyThisTrack));
+            Boolean has_char = false;
+
+            MediaHasCharacteristic(mh, VisualMediaCharacteristic, &has_char);
+            if (has_char)
+                globals->setdlg_v_allow = true;
+            else
+                globals->setdlg_v_allow = false;
+
+            MediaHasCharacteristic(mh, AudioMediaCharacteristic, &has_char);
+            if (has_char)
+                globals->setdlg_a_allow = true;
+            else
+                globals->setdlg_a_allow = false;
+        }
+    }
+
+    GetControlByID(window, &aecbID, &ec);
+    GetControlByID(window, &acbID, &cc);
+    if (!globals->setdlg_a_allow) {
+        SetControl32BitValue(ec, 0);
+        DisableControl(ec);
+        DisableControl(cc);
+    } else if (globals->set_a_disable == 0) {
+        SetControl32BitValue(ec, 1);
+        EnableControl(cc);
+    } else {
+        SetControl32BitValue(ec, 0);
+        DisableControl(cc);
+    }
+
+    GetControlByID(window, &vecbID, &ec);
+    GetControlByID(window, &vcbID, &cc);
+    if (!globals->setdlg_v_allow) {
+        SetControl32BitValue(ec, 0);
+        DisableControl(ec);
+        DisableControl(cc);
+    } else if (globals->set_v_disable == 0) {
+        SetControl32BitValue(ec, 1);
+        EnableControl(cc);
+    } else {
+        SetControl32BitValue(ec, 0);
+        DisableControl(cc);
+    }
+
+    globals->setdlg_movie = theMovie;
+    globals->setdlg_track = onlyThisTrack;
+    globals->setdlg_start = startTime;
+    globals->setdlg_duration = duration;
+
     InstallWindowEventHandler(window, settingsWindowEventHandlerUPP, GetEventTypeCount(eventList), eventList, globals, NULL);
 
     ShowWindow(window);
@@ -599,39 +1038,141 @@
 
 pascal ComponentResult OggExportGetSettingsAsAtomContainer(OggExportGlobalsPtr globals, QTAtomContainer *settings)
 {
-    QTAtomContainer theSettings = NULL;
-    OSErr err;
+    QTAtom atom;
+    QTAtomContainer ac = NULL;
+    ComponentResult err;
+    Boolean b_true = true;
 
     dbg_printf("[  OE]  >> [%08lx] :: GetSettingsAsAtomContainer()\n", (UInt32) globals);
 
     if (!settings)
         return paramErr;
 
-    err = QTNewAtomContainer(&theSettings);
+    err = QTNewAtomContainer(&ac);
     if (err)
         goto bail;
 
+    /*
+    err = QTInsertChild(ac, kParentAtomIsContainer, 'OEvd', 1, 0, 0, NULL, &atom);
+    if (err)
+        goto bail;
+    */
+
+    if (globals->set_v_disable == 0) {
+        err = QTInsertChild(ac, kParentAtomIsContainer, kQTSettingsMovieExportEnableVideo,
+                            1, 0, sizeof(b_true), &b_true, NULL);
+        if (err)
+            goto bail;
+    }
+
+    /*
+    err = QTInsertChild(ac, kParentAtomIsContainer, 'OEau', 1, 0, 0, NULL, &atom);
+    if (err)
+        goto bail;
+    */
+
+    if (globals->set_a_disable == 0) {
+        err = QTInsertChild(ac, kParentAtomIsContainer, kQTSettingsMovieExportEnableSound,
+                            1, 0, sizeof(b_true), &b_true, NULL);
+        if (err)
+            goto bail;
+    }
+
+    if (globals->set_v_disable == 0) {
+        /*
+        HLock((Handle) globals->set_v_settings);
+        err = QTInsertChild(ac, kParentAtomIsContainer, 'OEvS', 1, 0,
+                            GetHandleSize((Handle) globals->set_v_settings),
+                            *globals->set_v_settings, NULL);
+        HUnlock((Handle) globals->set_v_settings);
+        */
+        QTAtomContainer vs = NULL;
+        if (globals->set_v_settings != NULL)
+            vs = globals->set_v_settings;
+        else
+            err = QTNewAtomContainer(&vs);
+
+        if (!err) {
+            err = _video_settings_to_ac(globals, &vs);
+            dbg_printf("[  OE] vAC [%08lx] :: GetSettingsAsAtomContainer() = %ld %ld\n", (UInt32) globals, err, GetHandleSize(vs));
+
+            if (!err)
+                err = QTInsertChildren(ac, kParentAtomIsContainer, vs);
+
+            if (globals->set_v_settings == NULL)
+                QTDisposeAtomContainer(vs);
+        }
+
+        if (err)
+            goto bail;
+    }
+
  bail:
-    if (err && theSettings) {
-        QTDisposeAtomContainer(theSettings);
-        theSettings = NULL;
+    if (err && ac) {
+        QTDisposeAtomContainer(ac);
+        ac = NULL;
     }
 
-    *settings = theSettings;
+    *settings = ac;
 
-    dbg_printf("[  OE] <   [%08lx] :: GetSettingsAsAtomContainer() = %d\n", (UInt32) globals, err);
+    dbg_printf("[  OE] <   [%08lx] :: GetSettingsAsAtomContainer() = %d [%ld]\n", (UInt32) globals, err, settings != NULL ? GetHandleSize(*settings) : -1);
     return err;
 }
 
 pascal ComponentResult OggExportSetSettingsFromAtomContainer(OggExportGlobalsPtr globals, QTAtomContainer settings)
 {
-    OSErr err = noErr;
+    QTAtom atom;
+    ComponentResult err = noErr;
+    Boolean tmp;
 
-    dbg_printf("[  OE]  >> [%08lx] :: SetSettingsFromAtomContainer()\n", (UInt32) globals);
+    dbg_printf("[  OE]  >> [%08lx] :: SetSettingsFromAtomContainer([%ld])\n", (UInt32) globals, settings != NULL ? GetHandleSize(settings) : -1);
 
     if (!settings)
         return paramErr;
 
+    globals->set_v_disable = 1;
+    atom = QTFindChildByID(settings, kParentAtomIsContainer,
+                           kQTSettingsMovieExportEnableVideo, 1, NULL);
+    if (atom) {
+        err = QTCopyAtomDataToPtr(settings, atom, false, sizeof(tmp), &tmp, NULL);
+        if (err)
+            goto bail;
+
+        if (tmp)
+            globals->set_v_disable = 0;
+    }
+
+    globals->set_a_disable = 1;
+    atom = QTFindChildByID(settings, kParentAtomIsContainer,
+                           kQTSettingsMovieExportEnableSound, 1, NULL);
+    if (atom) {
+        err = QTCopyAtomDataToPtr(settings, atom, false, sizeof(tmp), &tmp, NULL);
+        if (err)
+            goto bail;
+
+        if (tmp)
+            globals->set_a_disable = 0;
+    }
+
+    atom = QTFindChildByID(settings, kParentAtomIsContainer, kQTSettingsVideo, 1, NULL);
+    if (atom) {
+        if (globals->set_v_settings) {
+            QTDisposeAtomContainer(globals->set_v_settings);
+            globals->set_v_settings = NULL;
+        }
+        err = QTCopyAtom(settings, atom, &globals->set_v_settings);
+        if (err)
+            goto bail;
+        err = _ac_to_video_settings(globals, globals->set_v_settings);
+
+        QTDisposeAtomContainer(globals->set_v_settings);
+        globals->set_v_settings = NULL;
+
+        if (err)
+            goto bail;
+    }
+
+ bail:
     dbg_printf("[  OE] <   [%08lx] :: SetSettingsFromAtomContainer() = %d\n", (UInt32) globals, err);
     return err;
 }
@@ -681,12 +1222,15 @@
 
 static OSErr ConfigureQuickTimeMovieExporter(OggExportGlobalsPtr globals)
 {
-    ComponentInstance  stdAudioCompression = NULL;
+    ComponentInstance  stdComp = NULL;
     QTAtomContainer    movieExporterSettings = NULL;
     OSErr              err;
 
+    dbg_printf("[  OE]  >> [%08lx] :: ConfigureQuickTimeMovieExporter()\n", (UInt32) globals);
+
     /* TODO: make this function do something */
 
+    /*
     // Open the Standard Compression component
     err = OpenADefaultComponent(StandardCompressionType, StandardCompressionSubTypeAudio, &stdAudioCompression);
     if (err)
@@ -699,14 +1243,35 @@
 
     // Set the compression settings for the QT Movie Exporter
     //err = MovieExportSetSettingsFromAtomContainer(globals->quickTimeMovieExporter, movieExporterSettings);
+    */
 
+    /*
+    if (globals->set_v_settings) {
+        err = MovieExportSetSettingsFromAtomContainer(globals->quickTimeMovieExporter, globals->set_v_settings);
+        dbg_printf("[  OE]  =S [%08lx] :: ConfigureQuickTimeMovieExporter() = %ld\n", (UInt32) globals, err);
+    } else {
+        err = OpenADefaultComponent(StandardCompressionType, StandardCompressionSubType, &stdComp);
+        if (!err) {
+        }
+    }
+    */
+
+    err = MovieExportGetSettingsAsAtomContainer(globals->self, &movieExporterSettings);
+    dbg_printf("[  OE]  gO [%08lx] :: ConfigureQuickTimeMovieExporter() = %ld\n", (UInt32) globals, err);
+    if (!err) {
+        err = MovieExportSetSettingsFromAtomContainer(globals->quickTimeMovieExporter, movieExporterSettings);
+        dbg_printf("[  OE]  sE [%08lx] :: ConfigureQuickTimeMovieExporter() = %ld\n", (UInt32) globals, err);
+    }
+
+
  bail:
-    if (stdAudioCompression)
-        CloseComponent(stdAudioCompression);
+    if (stdComp)
+        CloseComponent(stdComp);
 
     if (movieExporterSettings)
         DisposeHandle(movieExporterSettings);
 
+    dbg_printf("[  OE] <   [%08lx] :: ConfigureQuickTimeMovieExporter() = %ld\n", (UInt32) globals, err);
     return err;
 }
 
@@ -735,6 +1300,8 @@
     stream_format_handle_funcs *ff = &s_formats[0];
     int i = 0;
 
+    dbg_printf("[  OE]  >> [%08lx] :: find_stream_support('%4.4s')\n", (UInt32) -1, (char *) &trackType);
+
     while(ff->can_handle != NULL) {
         if ((*ff->can_handle)(trackType, scale, getPropertyProc, refCon))
             break;
@@ -743,8 +1310,9 @@
     }
 
     if (ff->can_handle == NULL)
-        return NULL;
+        ff = NULL;
 
+    dbg_printf("[  OE] <   [%08lx] :: find_stream_support() = %08lx\n", (UInt32) -1, (UInt32) ff);
     return ff;
 }
 
@@ -755,6 +1323,8 @@
 {
     ComponentResult err = noErr;
 
+    dbg_printf("[  OE]  >> [%08lx] :: OpenStream('%4.4s')\n", (UInt32) globals, (char *) &trackType);
+
     if (globals->streamInfoHandle) {
         globals->streamCount++;
         SetHandleSize((Handle) globals->streamInfoHandle, sizeof(StreamInfo) * globals->streamCount);
@@ -769,6 +1339,7 @@
         StreamInfo *si = NULL;
         HLock((Handle) globals->streamInfoHandle);
         si = &(*globals->streamInfoHandle)[globals->streamCount - 1];
+        memset(si, 0, sizeof(StreamInfo));
 
         srandomdev();
         si->serialno = random();
@@ -780,6 +1351,8 @@
         si->last_grpos = 0;
         si->acc_duration = 0;
 
+        si->time = 0;
+
         si->trackID = globals->streamCount;
         si->getPropertyProc = getPropertyProc;
         si->getDataProc = getDataProc;
@@ -834,6 +1407,7 @@
         }
     }
 
+    dbg_printf("[  OE] <   [%08lx] :: OpenStream() = %ld [%08lx, %ld]\n", (UInt32) globals, err, (UInt32) *out_si, sizeof(StreamInfo));
     return err;
 }
 
@@ -949,9 +1523,6 @@
 
         wide tmp;
 
-        UInt32 p_sec = 0;
-        Float64 p_subsec = 0.0;
-
         all_streams_done = true;
         f_si = NULL;
 
@@ -959,19 +1530,19 @@
             si = &(*globals->streamInfoHandle)[i];
 
             if (!si->og_ready && !si->eos) {
-                err = (*si->sfhf->fill_page)(globals, si, max_page_duration,
-                                             &p_sec, &p_subsec);
+                err = (*si->sfhf->fill_page)(globals, si, max_page_duration);
                 if (err)
                     break;
             }
             if (all_streams_done && si->og_ready)
                 all_streams_done = false;
             if (si->og_ready) {
-                if (p_sec < earliest_sec ||
-                    (p_sec == earliest_sec && p_subsec < earliest_subsec)) {
+                if (si->og_ts_sec < earliest_sec ||
+                    (si->og_ts_sec == earliest_sec &&
+                     si->og_ts_subsec < earliest_subsec)) {
                     f_si = si;
-                    earliest_sec = p_sec;
-                    earliest_subsec = p_subsec;
+                    earliest_sec = si->og_ts_sec;
+                    earliest_subsec = si->og_ts_subsec;
                 }
             }
         }
@@ -980,8 +1551,11 @@
             err = DataHWrite64(data_h, f_si->og_buffer, &data_h_offset,
                                f_si->og.header_len + f_si->og.body_len,
                                NULL, 0);
-            dbg_printf("[  OE] vvv [%08lx] :: mux_streams() = %ld, %lld\n",
-                       (UInt32) globals, err, *(SInt64 *) &data_h_offset);
+            dbg_printf("[  OE] vvv [%08lx] :: mux_streams() = %ld, %lld"
+                       " ['%4.4s' %ld %lf]\n",
+                       (UInt32) globals, err, *(SInt64 *) &data_h_offset,
+                       (char *) &f_si->stream_type, earliest_sec,
+                       earliest_subsec);
             if (err)
                 break;
 
@@ -990,14 +1564,6 @@
             WideAdd(&data_h_offset, &tmp);
 
             f_si->og_ready = false;
-
-            /*
-            if (!f_si->eos)
-                err = (*f_si->sfhf->fill_page)(globals, f_si, max_page_duration,
-                                               &p_sec, &p_subsec);
-            if (err)
-                break;
-            */
         }
 
         if (progressOpen) {
@@ -1028,3 +1594,120 @@
     dbg_printf("[  OE] <   [%08lx] :: mux_streams() = %ld\n", (UInt32) globals, err);
     return err;
 }
+
+static ComponentResult _setup_std_video(OggExportGlobalsPtr globals, ComponentInstance stdVideo)
+{
+    ComponentResult err = noErr;
+
+    Handle codec_types = NewHandleClear(sizeof(OSType));
+    SCSpatialSettings ss = {kVideoFormatXiphTheora, NULL, 0, globals->set_v_quality};
+    SCTemporalSettings ts = {globals->set_v_quality, globals->set_v_fps, globals->set_v_keyrate};
+    SCDataRateSettings ds = {globals->set_v_bitrate, 0, 0, 0};
+
+    *(OSType *)*codec_types = kVideoFormatXiphTheora;
+    err = SCSetInfo(stdVideo, scCompressionListType, &codec_types);
+
+
+    if (!err) {
+        *(OSType *)*codec_types = kXiphComponentsManufacturer;
+        err = SCSetInfo(stdVideo, scCodecManufacturerType, &codec_types);
+    }
+
+    DisposeHandle(codec_types);
+
+    if (!err)
+        err = SCSetInfo(stdVideo, scSpatialSettingsType, &ss);
+    if (!err)
+        err = SCSetInfo(stdVideo, scTemporalSettingsType, &ts);
+    if (!err)
+        err = SCSetInfo(stdVideo, scDataRateSettingsType, &ds);
+    if (!err && globals->set_v_custom != NULL) {
+        err = SCSetInfo(stdVideo, scCodecSettingsType, &globals->set_v_custom);
+    }
+
+    return err;
+}
+
+static ComponentResult _get_std_video_config(OggExportGlobalsPtr globals, ComponentInstance stdVideo)
+{
+    ComponentResult err = noErr;
+
+    SCTemporalSettings ts = {0, 0, 0};
+    SCDataRateSettings ds = {0, 0, 0, 0};
+
+    dbg_printf("[  OE]  >> [%08lx] :: _get_std_video_config()\n", (UInt32) globals);
+
+    err = SCGetInfo(stdVideo, scTemporalSettingsType, &ts);
+    if (!err) {
+        globals->set_v_quality = ts.temporalQuality;
+        globals->set_v_fps = ts.frameRate;
+        globals->set_v_keyrate = ts.keyFrameRate;
+    }
+
+    err = SCGetInfo(stdVideo, scDataRateSettingsType, &ds);
+    if (!err) {
+        globals->set_v_bitrate = ds.dataRate;
+    }
+
+    if (!err) {
+        if (globals->set_v_custom == NULL)
+            globals->set_v_custom = NewHandleClear(0);
+        SetHandleSize(globals->set_v_custom, 0);
+        err = SCGetInfo(stdVideo, scCodecSettingsType, &globals->set_v_custom);
+        dbg_printf("[  OE]  cs [%08lx] :: _get_std_video_config() = %ld [%ld]\n", (UInt32) globals, err, GetHandleSize(globals->set_v_custom));
+        if (err) {
+            if (IsHandleValid(globals->set_v_custom))
+                DisposeHandle(globals->set_v_custom);
+            globals->set_v_custom = NULL;
+            err = noErr; //...!?
+        }
+    }
+
+    dbg_printf("[  OE] <   [%08lx] :: _get_std_video_config() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
+static ComponentResult _video_settings_to_ac(OggExportGlobalsPtr globals, QTAtomContainer *settings)
+{
+    ComponentResult err = noErr;
+    ComponentInstance stdVideo = NULL;
+
+    dbg_printf("[  OE]  >> [%08lx] :: _video_settings_to_ac()\n", (UInt32) globals);
+
+    err = OpenADefaultComponent(StandardCompressionType, StandardCompressionSubType, &stdVideo);
+
+    if (!err) {
+        err = _setup_std_video(globals, stdVideo);
+
+        if (!err)
+            err = SCGetSettingsAsAtomContainer(stdVideo, settings);
+
+        CloseComponent(stdVideo);
+    }
+
+    dbg_printf("[  OE] <   [%08lx] :: _video_settings_to_ac() = %d [%ld]\n", (UInt32) globals, err, GetHandleSize(*settings));
+    return err;
+}
+
+static ComponentResult _ac_to_video_settings(OggExportGlobalsPtr globals, QTAtomContainer settings)
+{
+    ComponentResult err = noErr;
+    ComponentInstance stdVideo = NULL;
+
+    dbg_printf("[  OE]  >> [%08lx] :: _ac_to_video_settings() [%ld]\n", (UInt32) globals, GetHandleSize(settings));
+
+    err = OpenADefaultComponent(StandardCompressionType, StandardCompressionSubType, &stdVideo);
+
+    if (!err) {
+        err = SCSetSettingsFromAtomContainer(stdVideo, settings);
+
+        if (!err)
+            err = _get_std_video_config(globals, stdVideo);
+
+        CloseComponent(stdVideo);
+    }
+
+    dbg_printf("[  OE] <   [%08lx] :: _ac_to_video_settings() = %ld\n", (UInt32) globals, err);
+
+    return err;
+}

Modified: trunk/xiph-qt/OggExport/src/OggExport.h
===================================================================
--- trunk/xiph-qt/OggExport/src/OggExport.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggExport/src/OggExport.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -31,9 +31,15 @@
 #ifndef __OGGEXPORT_H__
 #define __OGGEXPORT_H__ 1
 
+#include "config.h"
 #include "oggexport_versions.h"
 
+#if !defined(XIPHQT_BUNDLE_ID)
 #define kOggExportBundleID "org.xiph.xiph-qt.oggexport"
+#else
+//#define kOggExportBundleID kXiphQTBundleID
+#define kOggExportBundleID XIPHQT_BUNDLE_ID
+#endif  /* XIPHQT_BUNDLE_ID */
 
 #define kExporterResID                  4040
 #define kExporterNameStringResID        4040

Modified: trunk/xiph-qt/OggExport/src/OggExport.nib/info.nib
===================================================================
--- trunk/xiph-qt/OggExport/src/OggExport.nib/info.nib	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggExport/src/OggExport.nib/info.nib	2007-01-18 13:45:42 UTC (rev 12346)
@@ -14,6 +14,18 @@
 	</array>
 	<key>IBSystem Version</key>
 	<string>8L127</string>
+	<key>IBUserGuides</key>
+	<dict>
+		<key>166</key>
+		<dict>
+			<key>guideLocations</key>
+			<array>
+				<string>Vertical:90.000000</string>
+			</array>
+			<key>guidesLocked</key>
+			<false/>
+		</dict>
+	</dict>
 	<key>targetFramework</key>
 	<string>IBCarbonFramework</string>
 </dict>

Modified: trunk/xiph-qt/OggExport/src/OggExport.nib/objects.xib
===================================================================
--- trunk/xiph-qt/OggExport/src/OggExport.nib/objects.xib	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggExport/src/OggExport.nib/objects.xib	2007-01-18 13:45:42 UTC (rev 12346)
@@ -4,51 +4,84 @@
   <object name="rootObject" class="NSCustomObject" id="1">
     <string name="customClass">NSApplication</string>
   </object>
-  <array count="5" name="allObjects">
+  <array count="8" name="allObjects">
     <object class="IBCarbonWindow" id="166">
-      <string name="windowRect">167 334 288 756 </string>
+      <string name="windowRect">166 334 288 756 </string>
       <string name="title">Ogg Exporter Settings</string>
       <object name="rootControl" class="IBCarbonRootControl" id="167">
-        <string name="bounds">0 0 121 422 </string>
-        <string name="viewFrame">0 0 422 121 </string>
-        <array count="3" name="subviews">
-          <object class="IBCarbonButton" id="180">
-            <string name="bounds">81 333 101 402 </string>
-            <string name="viewFrame">333 81 69 20 </string>
-            <int name="controlID">1</int>
-            <string name="title">OK</string>
-            <ostype name="command">ok  </ostype>
+        <string name="bounds">0 0 122 422 </string>
+        <string name="viewFrame">0 0 422 122 </string>
+        <array count="6" name="subviews">
+          <object class="IBCarbonButton" id="182">
+            <string name="bounds">21 90 41 182 </string>
+            <string name="viewFrame">90 21 92 20 </string>
+            <ostype name="controlSignature">XiOE</ostype>
+            <int name="controlID">3</int>
+            <string name="title">Settings…</string>
+            <ostype name="command">OEcv</ostype>
             <object name="layoutInfo" class="IBCarbonHILayoutInfo">
-              <int name="bindingBottomKind">2</int>
-              <int name="bindingRightKind">2</int>
+              <int name="bindingLeftKind">1</int>
             </object>
-            <int name="buttonType">1</int>
           </object>
+          <object class="IBCarbonButton" id="183">
+            <string name="bounds">53 90 73 182 </string>
+            <string name="viewFrame">90 53 92 20 </string>
+            <ostype name="controlSignature">XiOE</ostype>
+            <int name="controlID">4</int>
+            <string name="title">Settings…</string>
+            <ostype name="command">OEca</ostype>
+            <object name="layoutInfo" class="IBCarbonHILayoutInfo">
+              <int name="bindingLeftKind">1</int>
+            </object>
+          </object>
           <object class="IBCarbonButton" id="181">
-            <string name="bounds">81 252 101 321 </string>
-            <string name="viewFrame">252 81 69 20 </string>
+            <string name="bounds">82 252 102 321 </string>
+            <string name="viewFrame">252 82 69 20 </string>
             <int name="controlID">2</int>
             <string name="title">Cancel</string>
             <ostype name="command">not!</ostype>
             <object name="layoutInfo" class="IBCarbonHILayoutInfo">
               <int name="bindingBottomKind">2</int>
+              <int name="bindingRightKind">2</int>
             </object>
             <int name="buttonType">2</int>
           </object>
-          <object class="IBCarbonButton" id="182">
-            <string name="bounds">20 20 40 157 </string>
-            <string name="viewFrame">20 20 137 20 </string>
-            <int name="controlID">3</int>
-            <string name="title">Configure Audio</string>
-            <ostype name="command">OEca</ostype>
+          <object class="IBCarbonButton" id="180">
+            <string name="bounds">82 333 102 402 </string>
+            <string name="viewFrame">333 82 69 20 </string>
+            <int name="controlID">1</int>
+            <string name="title">OK</string>
+            <ostype name="command">ok  </ostype>
             <object name="layoutInfo" class="IBCarbonHILayoutInfo">
-              <int name="bindingLeftKind">1</int>
+              <int name="bindingBottomKind">2</int>
               <int name="bindingRightKind">2</int>
             </object>
+            <int name="buttonType">1</int>
           </object>
+          <object class="IBCarbonCheckBox" id="184">
+            <string name="bounds">22 20 40 79 </string>
+            <string name="viewFrame">20 22 59 18 </string>
+            <ostype name="controlSignature">XiOE</ostype>
+            <int name="controlID">5</int>
+            <string name="title">Video</string>
+            <ostype name="command">OEev</ostype>
+            <int name="initialState">1</int>
+            <boolean name="autoToggle">FALSE</boolean>
+          </object>
+          <object class="IBCarbonCheckBox" id="185">
+            <string name="bounds">54 20 72 79 </string>
+            <string name="viewFrame">20 54 59 18 </string>
+            <ostype name="controlSignature">XiOE</ostype>
+            <int name="controlID">6</int>
+            <string name="title">Audio</string>
+            <ostype name="command">OEea</ostype>
+            <int name="initialState">1</int>
+            <boolean name="autoToggle">FALSE</boolean>
+          </object>
         </array>
       </object>
       <boolean name="receiveUpdates">FALSE</boolean>
+      <boolean name="isResizable">FALSE</boolean>
       <boolean name="compositing">TRUE</boolean>
       <int name="carbonWindowClass">4</int>
       <int name="windowPosition">7</int>
@@ -57,13 +90,19 @@
     <reference idRef="180"/>
     <reference idRef="181"/>
     <reference idRef="182"/>
+    <reference idRef="183"/>
+    <reference idRef="184"/>
+    <reference idRef="185"/>
   </array>
-  <array count="5" name="allParents">
+  <array count="8" name="allParents">
     <reference idRef="1"/>
     <reference idRef="166"/>
     <reference idRef="167"/>
     <reference idRef="167"/>
     <reference idRef="167"/>
+    <reference idRef="167"/>
+    <reference idRef="167"/>
+    <reference idRef="167"/>
   </array>
   <dictionary count="2" name="nameTable">
     <string>File&apos;s Owner</string>
@@ -71,5 +110,5 @@
     <string>Settings</string>
     <reference idRef="166"/>
   </dictionary>
-  <unsigned_int name="nextObjectID">183</unsigned_int>
+  <unsigned_int name="nextObjectID">186</unsigned_int>
 </object>

Modified: trunk/xiph-qt/OggExport/src/exporter_types.h
===================================================================
--- trunk/xiph-qt/OggExport/src/exporter_types.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggExport/src/exporter_types.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -48,7 +48,7 @@
 
 
 #include "stream_types_audio.h"
-//#include "stream_types_video.h"
+#include "stream_types_video.h"
 
 
 enum {
@@ -68,8 +68,8 @@
     ogg_int64_t og_grpos;
     Boolean og_ready;
 
-    //UInt32   og_ts_sec;
-    //Float64  og_ts_subsec;
+    UInt32   og_ts_sec;
+    Float64  og_ts_subsec;
 
     ogg_int64_t packets_total;
     ogg_int64_t acc_packets;
@@ -100,8 +100,6 @@
 
     long lastDescSeed;
 
-    //ComponentInstance stdAudio;
-
     //ImageSequence decompressSequence;
     //GWorldPtr gw;
     //PixMapHandle hPixMap;
@@ -132,6 +130,29 @@
     Boolean            canceled;
 
     Boolean            use_hires_audio;
+
+    /* settings */
+    UInt16             set_v_disable;
+    UInt16             set_a_disable;
+
+    CodecQ             set_v_quality;
+    Fixed              set_v_fps;
+    UInt32             set_v_bitrate;
+    UInt32             set_v_keyrate;
+    QTAtomContainer    set_v_settings;
+    Handle             set_v_custom;
+
+    CodecQ             set_a_quality;
+    UInt32             set_a_bitrate;
+    Float64            set_a_samplerate;
+
+    /* settings dialog vars */
+    Boolean            setdlg_a_allow;
+    Boolean            setdlg_v_allow;
+    Movie              setdlg_movie;
+    Track              setdlg_track;
+    TimeValue          setdlg_start;
+    TimeValue          setdlg_duration;
 } OggExportGlobals, *OggExportGlobalsPtr;
 
 
@@ -150,8 +171,7 @@
                                           wide *offset);
 
 typedef ComponentResult (*fill_page) (OggExportGlobalsPtr globals,
-                                      StreamInfoPtr si, Float64 max_duration,
-                                      UInt32 *pos_sec, Float64 *pos_subsec);
+                                      StreamInfoPtr si, Float64 max_duration);
 
 typedef ComponentResult (*initialize_stream) (StreamInfo *si);
 typedef void (*clear_stream) (StreamInfo *si);

Modified: trunk/xiph-qt/OggExport/src/stream_audio.c
===================================================================
--- trunk/xiph-qt/OggExport/src/stream_audio.c	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggExport/src/stream_audio.c	2007-01-18 13:45:42 UTC (rev 12346)
@@ -37,7 +37,7 @@
 
 #include "debug.h"
 
-ComponentResult
+static ComponentResult
 _flush_ogg(StreamInfoPtr si, DataHandler data_h, wide *offset)
 {
     ComponentResult err = noErr;
@@ -75,7 +75,7 @@
     return err;
 }
 
-static void _ready_page(StreamInfoPtr si, UInt32 *pos_sec, Float64 *pos_subsec)
+static void _ready_page(StreamInfoPtr si)
 {
     UInt32 len = si->og.header_len + si->og.body_len;
     Float64 pos;
@@ -98,14 +98,14 @@
     }
 
     pos = si->og_grpos / si->si_a.stda_asbd.mSampleRate;
-    *pos_sec = (UInt32) pos;
-    *pos_subsec = (pos - (Float64) *pos_sec);
+    si->og_ts_sec = (UInt32) pos;
+    si->og_ts_subsec = (pos - (Float64) si->og_ts_sec);
 
     if (ogg_page_eos(&si->og))
         si->eos = true;
 }
 
-ComponentResult
+static ComponentResult
 _InputDataProc__audio(ComponentInstance ci, UInt32 *ioNumberDataPackets,
                       AudioBufferList *ioData,
                       AudioStreamPacketDescription **outDataPacketDescription,
@@ -138,6 +138,10 @@
 
             err = InvokeMovieExportGetDataUPP(si->refCon, &si->gdp,
                                               si->getDataProc);
+            dbg_printf("[  OE]  <  [%08lx] :: _InputDataProc__audio() = %ld; "
+                       "%ld, %ld, %ld, %ld, %ld)\n",
+                       (UInt32) -1, err, *ioNumberDataPackets, si->gdp.dataSize,
+                       si->gdp.requestedTime, si->gdp.actualTime, ioData->mNumberBuffers);
             if (!err)
                 si->time += si->gdp.durationPerSample * si->gdp.actualSampleCount;
 
@@ -201,7 +205,7 @@
     return err;
 }
 
-extern ComponentResult initialize_stream__audio(StreamInfo *si)
+ComponentResult initialize_stream__audio(StreamInfo *si)
 {
     ComponentResult err = noErr;
 
@@ -259,7 +263,7 @@
     return err;
 }
 
-extern void clear_stream__audio(StreamInfo *si)
+void clear_stream__audio(StreamInfo *si)
 {
     if (si->si_a.aspds) {
         free(si->si_a.aspds);
@@ -442,7 +446,7 @@
 
 ComponentResult
 fill_page__audio(OggExportGlobalsPtr globals, StreamInfoPtr si,
-                 Float64 max_duration, UInt32 *pos_sec, Float64 *pos_subsec)
+                 Float64 max_duration)
 {
     ComponentResult err = noErr;
 
@@ -461,7 +465,7 @@
 
     if (ogg_stream_pageout(&si->os, &si->og) > 0) {
         /* there was data left in the internal ogg_stream buffers */
-        _ready_page(si, pos_sec, pos_subsec);
+        _ready_page(si);
     } else {
         /* otherwise, get more data */
         if (si->si_a.aspds_size < pullPackets *
@@ -590,14 +594,14 @@
             if (((eos_hit || si->acc_duration > max_page_duration) &&
                  ogg_stream_flush(&si->os, &si->og) > 0) ||
                 (ogg_stream_pageout(&si->os, &si->og) > 0)) {
-                _ready_page(si, pos_sec, pos_subsec);
+                _ready_page(si);
                 do_loop = false;
             }
         }
     }
 
     dbg_printf("[  OE] <   [%08lx] :: fill_page__audio() = %ld (%ld, %lf)\n",
-               (UInt32) globals, err, *pos_sec, *pos_subsec);
+               (UInt32) globals, err, si->og_ts_sec, si->og_ts_subsec);
     return err;
 }
 

Modified: trunk/xiph-qt/OggExport/src/stream_audio.h
===================================================================
--- trunk/xiph-qt/OggExport/src/stream_audio.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggExport/src/stream_audio.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -51,8 +51,7 @@
                      wide *offset);
 extern ComponentResult
 fill_page__audio(OggExportGlobalsPtr globals, StreamInfoPtr si,
-                 Float64 max_duration, UInt32 *pos_sec,
-                 Float64 *pos_subsec);
+                 Float64 max_duration);
 
 extern ComponentResult initialize_stream__audio(StreamInfo *si);
 extern void clear_stream__audio(StreamInfo *si);
@@ -65,8 +64,4 @@
             &initialize_stream__audio, &clear_stream__audio }
 
 
-extern ComponentResult
-extract_audio(OggExportGlobalsPtr globals, StreamInfoPtr si,
-              DataHandler data_h);
-
 #endif /* __stream_audio_h__ */

Copied: trunk/xiph-qt/OggExport/src/stream_types_video.h (from rev 12093, trunk/xiph-qt/OggExport/src/stream_types_audio.h)
===================================================================
--- trunk/xiph-qt/OggExport/src/stream_types_audio.h	2006-11-12 14:44:51 UTC (rev 12093)
+++ trunk/xiph-qt/OggExport/src/stream_types_video.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,68 @@
+/*
+ *  stream_types_video.h
+ *
+ *    Definition of video stream data structures for OggExport.
+ *
+ *
+ *  Copyright (c) 2006  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(__stream_types_video_h__)
+#define __stream_types_video_h__
+
+enum {
+    kOES_V_init_op_size = 1024,
+};
+
+typedef struct {
+    ComponentInstance stdVideo;
+
+    ICMCompressionSessionRef cs;
+    ICMCompressionSessionOptionsRef cs_opts;
+
+    ICMDecompressionSessionRef ds;
+    ICMDecompressionSessionOptionsRef ds_opts;
+
+    ImageDescriptionHandle cs_imdsc;
+
+    float frames_time;
+
+    Fixed width;
+    Fixed height;
+    Fixed fps;
+    SInt16 depth;
+
+    ogg_packet op;
+    UInt32 op_duration;
+    void * op_buffer;
+    UInt32 op_buffer_size;
+    MediaSampleFlags op_flags;
+
+    UInt32 max_packet_size;
+
+    UInt32 grpos_shift;
+} StreamInfo__video;
+
+#define _HAVE__OE_VIDEO 1
+#endif /* __stream_types_video_h__ */

Copied: trunk/xiph-qt/OggExport/src/stream_video.c (from rev 12093, trunk/xiph-qt/OggExport/src/stream_audio.c)
===================================================================
--- trunk/xiph-qt/OggExport/src/stream_audio.c	2006-11-12 14:44:51 UTC (rev 12093)
+++ trunk/xiph-qt/OggExport/src/stream_video.c	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,1137 @@
+/*
+ *  stream_video.c
+ *
+ *    Audio tracks related part of OggExporter.
+ *
+ *
+ *  Copyright (c) 2006  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 "stream_video.h"
+
+#include "OggExport.h"
+
+#include "fccs.h"
+#include "data_types.h"
+
+#include "debug.h"
+
+
+static void
+_frame_decompressed(void *decompressionTrackingRefCon, OSStatus err,
+                    ICMDecompressionTrackingFlags dtf,
+                    CVPixelBufferRef pixelBuffer, TimeValue64 displayTime,
+                    TimeValue64 displayDuration,
+                    ICMValidTimeFlags validTimeFlags, void *reserved,
+                    void *sourceFrameRefCon)
+{
+    dbg_printf("[ vOE]  >> [%08lx] :: _frame_decompressed()\n", (UInt32) -1);
+    if (!err) {
+        StreamInfoPtr si = (StreamInfoPtr) decompressionTrackingRefCon;
+        if (dtf & kICMDecompressionTracking_ReleaseSourceData) {
+            // if we were responsible for managing source data buffers,
+            //  we should release the source buffer here,
+            //  using sourceFrameRefCon to identify it.
+        }
+
+        if ((dtf & kICMDecompressionTracking_EmittingFrame) && pixelBuffer) {
+            ICMCompressionFrameOptionsRef frameOptions = NULL;
+            OSType pf = CVPixelBufferGetPixelFormatType(pixelBuffer);
+
+            dbg_printf("[ vOE]   > [%08lx] :: _frame_decompressed() = %ld; %ld,"
+                       " %lld, %lld, %ld [%ld '%4.4s' (%ld x %ld)]\n",
+                       (UInt32) -1, err,
+                       dtf, displayTime, displayDuration, validTimeFlags,
+                       CVPixelBufferGetDataSize(pixelBuffer), (char *) &pf,
+                       CVPixelBufferGetWidth(pixelBuffer),
+                       CVPixelBufferGetHeight(pixelBuffer));
+            displayDuration = 25;
+
+            // Feed the frame to the compression session.
+            err = ICMCompressionSessionEncodeFrame(si->si_v.cs, pixelBuffer,
+                                                   displayTime, displayDuration,
+                                                   validTimeFlags, frameOptions,
+                                                   NULL, NULL );
+        }
+    }
+
+    dbg_printf("[ vOE] <   [%08lx] :: _frame_decompressed() = %ld\n",
+               (UInt32) -1, err);
+}
+
+static ComponentResult
+_setup_ds(StreamInfoPtr si, ImageDescriptionHandle imgDesc)
+{
+    ComponentResult err = noErr;
+    CFNumberRef number = NULL;
+    CFMutableDictionaryRef pba = NULL;
+    //ICMDecompressionSessionOptionsRef sessionOptions = NULL;
+    ICMDecompressionTrackingCallbackRecord dtcr;
+    SInt32 w, h;
+    OSType pbf = k422YpCbCr8PixelFormat;
+
+    dbg_printf("[ vOE]  >> [%08lx] :: _setup_ds()\n", (UInt32) -1);
+
+    // via the kICMCompressionSessionPropertyID_CompressorPixelBufferAttributes
+
+    if (si->si_v.ds) {
+        ICMDecompressionSessionFlush(si->si_v.ds);
+        ICMDecompressionSessionRelease(si->si_v.ds);
+        si->si_v.ds = NULL;
+    }
+
+    pba = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks,
+                                    &kCFTypeDictionaryValueCallBacks);
+
+    w = si->si_v.width >> 16;
+    h = si->si_v.height >> 16;
+
+    // TMP:
+    //w = 480;
+    //h = 260;
+
+    number = CFNumberCreate(NULL, kCFNumberSInt32Type, &w);
+    CFDictionaryAddValue(pba, kCVPixelBufferWidthKey, number);
+    CFRelease(number);
+
+    number = CFNumberCreate(NULL, kCFNumberSInt32Type, &h);
+    CFDictionaryAddValue(pba, kCVPixelBufferHeightKey, number);
+    CFRelease(number);
+
+    number = CFNumberCreate(NULL, kCFNumberSInt32Type, &pbf);
+    CFDictionaryAddValue(pba, kCVPixelBufferPixelFormatTypeKey, number);
+    CFRelease(number);
+
+    //CFDictionaryAddValue(pba, kCVPixelBufferCGBitmapContextCompatibilityKey,
+    // kCFBooleanTrue );
+    //CFDictionaryAddValue(pba, kCVPixelBufferCGImageCompatibilityKey,
+    // kCFBooleanTrue );
+
+    dtcr.decompressionTrackingCallback = _frame_decompressed;
+    dtcr.decompressionTrackingRefCon = (void *) si;
+
+    err = ICMDecompressionSessionCreate(NULL, imgDesc,
+                                        /* sessionOptions */ NULL,
+                                        pba,
+                                        &dtcr,
+                                        &si->si_v.ds);
+
+    CFRelease(pba);
+    //ICMDecompressionSessionOptionsRelease( sessionOptions );
+
+    dbg_printf("[ vOE] <   [%08lx] :: _setup_ds() = %ld\n", (UInt32) -1, err);
+    return err;
+}
+
+static OSStatus
+_frame_compressed(void *efRefCon, ICMCompressionSessionRef session,
+                  OSStatus err, ICMEncodedFrameRef ef, void *reserved)
+{
+    dbg_printf("[ vOE]  >> [%08lx] :: _frame_compressed()\n", (UInt32) -1);
+    if (!err) {
+        StreamInfoPtr si = (StreamInfoPtr) efRefCon;
+        ImageDescriptionHandle imgDesc = NULL;
+        ImageDescription *id;
+        UInt32 enc_size = ICMEncodedFrameGetDataSize(ef);
+
+        err = ICMEncodedFrameGetImageDescription(ef, &imgDesc);
+        if (!err) {
+            id = *imgDesc;
+
+            dbg_printf("[ vOE]  f> [%08lx] :: _frame_compressed() = %ld, '%4.4s'"
+                       " %08lx %08lx [%d x %d] [%f x %f] %ld %d %d %d\n",
+                       (UInt32) -1, err, (char *) &id->cType,
+                       id->temporalQuality, id->spatialQuality, id->width,
+                       id->height, id->hRes / 65536.0, id->vRes / 65536.0,
+                       id->dataSize, id->frameCount, id->depth, id->clutID);
+            dbg_printf("[ vOE]  fi [%08lx] :: _frame_compressed() = %lld %ld %ld\n",
+                       (UInt32) -1, ICMEncodedFrameGetDecodeDuration(ef),
+                       enc_size, ICMEncodedFrameGetBufferSize(ef));
+        }
+
+        if (si->si_v.cs_imdsc == NULL)
+            si->si_v.cs_imdsc = imgDesc;
+
+        if (si->si_v.op_buffer_size < enc_size) {
+            si->si_v.op_buffer = realloc(si->si_v.op_buffer, enc_size);
+            si->si_v.op_buffer_size = enc_size;
+        }
+        memcpy(si->si_v.op_buffer, ICMEncodedFrameGetDataPtr(ef), enc_size);
+
+        /* skip one byte (pre-padding);
+           see TheoraEncoder.c, Theora_ImageEncoderEncodeFrame() */
+        si->si_v.op.packet = si->si_v.op_buffer + 1;
+        si->si_v.op.bytes = enc_size - 1;
+        //si->si_v.op.packetno = si->packets_total++;
+        //si->si_v.op.granulepos = si->last_grpos++;
+        si->si_v.op_flags = ICMEncodedFrameGetMediaSampleFlags(ef);
+    }
+
+    dbg_printf("[ vOE] <   [%08lx] :: _frame_compressed() = %ld\n",
+               (UInt32) -1, err);
+    return err;
+}
+
+static ComponentResult _setup_cs(StreamInfoPtr si)
+{
+    ComponentResult err = noErr;
+    ICMEncodedFrameOutputRecord efor;
+    //long sc_prefs;
+    SInt32 averageDataRate = 819200;
+
+    dbg_printf("[ vOE]  >> [%08lx] :: _setup_cs()\n", (UInt32) -1);
+
+    if (si->si_v.cs) {
+        ICMCompressionSessionCompleteFrames(si->si_v.cs, true, 0, 0);
+        ICMCompressionSessionRelease(si->si_v.cs);
+        si->si_v.cs = NULL;
+    }
+
+#if 0
+    {
+    long sc_prefs;
+    sc_prefs = scAllowEncodingWithCompressionSession;
+    err = SCSetInfo(si->si_v.stdVideo, scPreferenceFlagsType, &sc_prefs);
+    dbg_printf("[ vOE]  .? [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+
+    err = SCCopyCompressionSessionOptions(si->si_v.stdVideo, &si->si_v.cs_opts);
+    dbg_printf("[ vOE]  +? [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+    }
+#else
+    err = ICMCompressionSessionOptionsCreate(NULL, &si->si_v.cs_opts);
+    if (err)
+        goto bail;
+
+
+    // We must set this flag to enable P or B frames.
+    err = ICMCompressionSessionOptionsSetAllowTemporalCompression( si->si_v.cs_opts, true );
+    dbg_printf("[ vOE]  ?1 [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+    if( err ) {
+        goto bail;
+    }
+
+    // We must set this flag to enable B frames.
+    err = ICMCompressionSessionOptionsSetAllowFrameReordering(si->si_v.cs_opts, true);
+    dbg_printf("[ vOE]  ?2 [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+    if( err ) {
+        goto bail;
+    }
+
+    // Set the maximum key frame interval, also known as the key frame rate.
+    err = ICMCompressionSessionOptionsSetMaxKeyFrameInterval( si->si_v.cs_opts, 30 );
+    dbg_printf("[ vOE]  ?3 [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+    if( err ) {
+        goto bail;
+    }
+
+    // This allows the compressor more flexibility (ie, dropping and coalescing frames).
+    err = ICMCompressionSessionOptionsSetAllowFrameTimeChanges( si->si_v.cs_opts, true );
+    dbg_printf("[ vOE]  ?4 [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+    if( err ) {
+        fprintf( stderr, "ICMCompressionSessionOptionsSetAllowFrameTimeChanges() failed (%ld)\n", err );
+        goto bail;
+    }
+
+    // We need durations when we store frames.
+    err = ICMCompressionSessionOptionsSetDurationsNeeded( si->si_v.cs_opts, true );
+    dbg_printf("[ vOE]  ?5 [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+    if( err ) {
+        fprintf( stderr, "ICMCompressionSessionOptionsSetDurationsNeeded() failed (%ld)\n", err );
+        goto bail;
+    }
+
+    averageDataRate = 480;
+    err = ICMCompressionSessionOptionsSetProperty(si->si_v.cs_opts,
+                                                  kQTPropertyClass_ICMCompressionSessionOptions,
+                                                  kICMCompressionSessionOptionsPropertyID_Quality,
+                                                  sizeof( averageDataRate ),
+                                                  &averageDataRate );
+    dbg_printf("[ vOE]  ?6 [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+
+    err = ICMCompressionSessionOptionsSetProperty(si->si_v.cs_opts,
+                                                  kQTPropertyClass_ICMCompressionSessionOptions,
+                                                  kICMCompressionSessionOptionsPropertyID_ExpectedFrameRate,
+                                                  sizeof(si->si_v.fps),
+                                                  &si->si_v.fps);
+    dbg_printf("[ vOE]  ?7 [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+
+    // Set the average data rate.
+    averageDataRate = 0; //819200;
+    err = ICMCompressionSessionOptionsSetProperty( si->si_v.cs_opts,
+                                                   kQTPropertyClass_ICMCompressionSessionOptions,
+                                                   kICMCompressionSessionOptionsPropertyID_AverageDataRate,
+                                                   sizeof( averageDataRate ),
+                                                   &averageDataRate );
+    dbg_printf("[ vOE]  ?8 [%08lx] :: _setup_cs() = %ld\n", (UInt32) -1, err);
+    if( err ) {
+        fprintf( stderr, "ICMCompressionSessionOptionsSetProperty(AverageDataRate) failed (%ld)\n", err );
+        goto bail;
+    }
+#endif
+
+    if (!err) {
+        efor.encodedFrameOutputCallback = _frame_compressed;
+        efor.encodedFrameOutputRefCon = (void *) si;
+        efor.frameDataAllocator = NULL;
+
+#if 1
+        err = ICMCompressionSessionCreate(NULL, si->si_v.width >> 16,
+                                          si->si_v.height >> 16,
+                                          'XiTh', /* !!! :P */
+                                          si->sourceTimeScale, si->si_v.cs_opts,
+                                          NULL, &efor, &si->si_v.cs);
+#else
+        err = ICMCompressionSessionCreate(NULL, 320,
+                                          240,
+                                          'XiTh', /* !!! :P */
+                                          si->sourceTimeScale, si->si_v.cs_opts,
+                                          NULL, &efor, &si->si_v.cs);
+#endif
+        dbg_printf("[ vOE]  ?9 [%08lx] :: _setup_cs() = %ld [%lx x %lx]\n",
+                   (UInt32) -1, err, si->si_v.width, si->si_v.height);
+    }
+
+ bail:
+    dbg_printf("[ vOE] <   [%08lx] :: _setup_cs() = %lx (%ld)\n",
+               (UInt32) -1, err, err);
+    return err;
+}
+
+static ComponentResult
+_flush_ogg(StreamInfoPtr si, DataHandler data_h, wide *offset)
+{
+    ComponentResult err = noErr;
+    int result = 0;
+    ogg_page og;
+    Boolean have_pages = true;
+    wide tmp;
+
+    while (have_pages) {
+        result = ogg_stream_pageout(&si->os, &og);
+
+        if (!result) {
+            have_pages = false;
+            result = ogg_stream_flush(&si->os, &og);
+            if (!result)
+                break;
+        }
+
+        err = DataHWrite64(data_h, (Ptr) og.header, offset, og.header_len,
+                         NULL, 0);
+        if (!err) {
+            tmp.hi = 0;
+            tmp.lo = og.header_len;
+            WideAdd(offset, &tmp);
+            err = DataHWrite64(data_h, (Ptr) og.body, offset, og.body_len,
+                             NULL, 0);
+            if (!err) {
+                tmp.hi = 0;
+                tmp.lo = og.body_len;
+                WideAdd(offset, &tmp);
+            }
+        }
+    }
+
+    return err;
+}
+
+static void _ready_page(StreamInfoPtr si)
+{
+    UInt32 len = si->og.header_len + si->og.body_len;
+    Float64 pos;
+
+    if (si->og_buffer_size < len) {
+        si->og_buffer = realloc(si->og_buffer, len);
+        si->og_buffer_size = len;
+    }
+    BlockMoveData(si->og.header, si->og_buffer, si->og.header_len);
+    BlockMoveData(si->og.body, si->og_buffer + si->og.header_len,
+                  si->og.body_len);
+    si->og.header = si->og_buffer;
+    si->og.body = si->og_buffer + si->og.header_len;
+    si->og_ready = true;
+    si->acc_packets -= ogg_page_packets(&si->og);
+    if (ogg_page_granulepos(&si->og) != -1) {
+        si->og_grpos = ogg_page_granulepos(&si->og);
+        if (si->si_v.grpos_shift > 0) {
+            /* with theora, si->og_grpos represents total number of frames */
+            ogg_int64_t frames = si->og_grpos >> si->si_v.grpos_shift;
+            si->og_grpos = frames + si->og_grpos -
+                (frames << si->si_v.grpos_shift);
+        }
+    }
+
+    pos = si->og_grpos / (si->si_v.fps / 65536.0);
+    si->og_ts_sec = (UInt32) pos;
+    si->og_ts_subsec = (pos - (Float64) si->og_ts_sec);
+
+    if (ogg_page_eos(&si->og))
+        si->eos = true;
+}
+
+/*
+static ComponentResult
+_get_frame_old(OggExportGlobalsPtr globals, StreamInfoPtr si)
+{
+    ComponentResult err = noErr;
+    CodecFlags whoCares;
+
+    if (!si->src_extract_complete) {
+        si->gdp.recordSize = sizeof(MovieExportGetDataParams);
+        si->gdp.trackID = si->trackID;
+        si->gdp.requestedTime = si->time;
+        si->gdp.sourceTimeScale = si->sourceTimeScale;
+        si->gdp.actualTime = 0;
+        si->gdp.dataPtr = NULL;
+        si->gdp.dataSize = 0;
+        si->gdp.desc = NULL;
+        si->gdp.descType = 0;
+        si->gdp.descSeed = 0;
+        si->gdp.requestedSampleCount = 0;
+        si->gdp.actualSampleCount = 0;
+        si->gdp.durationPerSample = 1;
+        si->gdp.sampleFlags = 0;
+
+        err = InvokeMovieExportGetDataUPP(si->refCon, &si->gdp,
+                                          si->getDataProc);
+        dbg_printf("[ vOE]  D> [%08lx] :: _get_frame() = %ld; %ld [%ld] %ld [%ld] [%ld @ %ld] %ld '%4.4s'\n",
+                   (UInt32) globals, err, si->gdp.requestedSampleCount,
+                   si->gdp.actualSampleCount, si->gdp.requestedTime,
+                   si->gdp.actualTime, si->gdp.durationPerSample,
+                   si->gdp.sourceTimeScale, si->gdp.dataSize, (char *) &si->gdp.descType);
+
+        if (!err)
+            //si->time += si->gdp.durationPerSample * si->gdp.actualSampleCount;
+            si->time += si->gdp.durationPerSample;
+
+        if (err == eofErr) {
+            err = noErr;
+            si->src_extract_complete = true;
+        }
+
+        if (!err && si->gdp.descType == VideoMediaType) {
+            ImageDescription *id = *(ImageDescriptionHandle) si->gdp.desc;
+            dbg_printf("[ vOE]  I> [%08lx] :: _get_frame() = '%4.4s' %08lx %08lx"
+                       " [%d x %d] [%f x %f] %ld %d %d %d\n",
+                       (UInt32) globals, (char *) &id->cType, id->temporalQuality,
+                       id->spatialQuality, id->width, id->height,
+                       id->hRes / 65536.0, id->vRes / 65536.0,
+                       id->dataSize, id->frameCount, id->depth, id->clutID);
+
+            if (si->gdp.actualSampleCount == 0) {
+                //si->src_extract_complete = true;
+            } else {
+                if (si->gdp.descType != VideoMediaType) {
+                    err = paramErr;
+                    goto bail;
+                }
+                                                        
+                if (si->gdp.descSeed != si->lastDescSeed) {
+                    MatrixRecord mr;
+                    SInt16 depth;
+                    short width, height;
+                    Rect dstRect, srcRect;
+
+                    // Initialize outputTrack...
+                    if (si->out_buffer) {
+                        free(si->out_buffer);
+                        si->out_buffer = NULL;
+                        si->out_buffer_size = 0;
+                    }
+
+                    if (si->si_v.decompressSequence) {
+                        CDSequenceEnd(si->si_v.decompressSequence);
+                        si->si_v.decompressSequence = 0;
+                    }
+
+                    if (si->si_v.gw) {
+                        DisposeGWorld(si->si_v.gw);
+                        si->si_v.gw = NULL;
+                        si->si_v.hPixMap = NULL;
+                    }
+
+                    if (si->si_v.width == 0)
+                        width = (**(ImageDescriptionHandle) si->gdp.desc).width;
+                    else
+                        width = FixRound(si->si_v.width);
+
+                    if (si->si_v.height == 0)
+                        height = (**(ImageDescriptionHandle) si->gdp.desc).height;
+                    else
+                        height = FixRound(si->si_v.height);
+
+                    dstRect.left = 0;
+                    dstRect.top = 0;
+                    dstRect.right = width;
+                    dstRect.bottom = height;
+
+                    srcRect.left = 0;
+                    srcRect.top = 0;
+                    srcRect.right = (**(ImageDescriptionHandle) si->gdp.desc).width;
+                    srcRect.bottom = (**(ImageDescriptionHandle)
+                                      si->gdp.desc).height;
+
+                    RectMatrix(&mr, &srcRect, &dstRect);
+
+                    if (si->si_v.depth == 0)
+                        depth = (**(ImageDescriptionHandle) si->gdp.desc).depth;
+                    else
+                        depth = si->si_v.depth;
+
+                    // for k32ARGBPixelFormat when presented with 24.
+                    if (k24RGBPixelFormat == depth)
+                        depth = k32ARGBPixelFormat;
+
+                    // Create a GWorld for the approprate depth property
+                    err = QTNewGWorld(&si->si_v.gw, depth, &dstRect,
+                                      NULL, NULL, kICMTempThenAppMemory);
+                    if (err || NULL == si->si_v.gw) goto bail;
+
+                    si->si_v.hPixMap = GetGWorldPixMap(si->si_v.gw);
+
+                    LockPixels(si->si_v.hPixMap);
+
+                    err =
+                        DecompressSequenceBeginS(&si->si_v.decompressSequence,
+                                                 (ImageDescriptionHandle)
+                                                 si->gdp.desc, si->gdp.dataPtr,
+                                                 si->gdp.dataSize, si->si_v.gw,
+                                                 NULL, NULL, &mr, ditherCopy,
+                                                 NULL, 0, codecHighQuality, NULL);
+                    if (err) goto bail;
+
+                    // Allocate memory enough to store maximum compressed data
+                    si->out_buffer_size = width * height * depth * 2;
+                    si->out_buffer = calloc(1, si->out_buffer_size);
+
+                    err = MemError();
+                    if (err) goto bail;
+
+                    si->lastDescSeed = si->gdp.descSeed;
+                }
+
+                err = DecompressSequenceFrameS(si->si_v.decompressSequence,
+                                               si->gdp.dataPtr, si->gdp.dataSize,
+                                               0, &whoCares, NULL);
+                if (err) goto bail;
+                                                        
+            }
+
+            si->gdp.actualSampleCount = 0;
+        }
+    }
+
+ bail:
+    return err;
+}
+*/
+
+static ComponentResult _get_frame(StreamInfoPtr si)
+{
+    ComponentResult err = noErr;
+    //CodecFlags whoCares;
+    ICMFrameTimeRecord ft;
+
+    dbg_printf("[ vOE]  >> [%08lx] :: _get_frame()\n", (UInt32) -1);
+
+    if (!si->src_extract_complete) {
+        si->gdp.recordSize = sizeof(MovieExportGetDataParams);
+        si->gdp.trackID = si->trackID;
+        si->gdp.requestedTime = si->time;
+        si->gdp.sourceTimeScale = si->sourceTimeScale;
+        si->gdp.actualTime = 0;
+        si->gdp.dataPtr = NULL;
+        si->gdp.dataSize = 0;
+        si->gdp.desc = NULL;
+        si->gdp.descType = 0;
+        si->gdp.descSeed = 0;
+        si->gdp.requestedSampleCount = 0;
+        si->gdp.actualSampleCount = 0;
+        si->gdp.durationPerSample = 1;
+        si->gdp.sampleFlags = 0;
+
+        err = InvokeMovieExportGetDataUPP(si->refCon, &si->gdp,
+                                          si->getDataProc);
+        dbg_printf("[ vOE]  D> [%08lx] :: _get_frame() = %ld; %ld [%ld]"
+                   " %ld [%ld] [%ld @ %ld] %ld '%4.4s'\n",
+                   (UInt32) -1, err, si->gdp.requestedSampleCount,
+                   si->gdp.actualSampleCount, si->gdp.requestedTime,
+                   si->gdp.actualTime, si->gdp.durationPerSample,
+                   si->gdp.sourceTimeScale, si->gdp.dataSize,
+                   (char *) &si->gdp.descType);
+
+        if (!err) {
+            //si->time += si->gdp.durationPerSample * si->gdp.actualSampleCount;
+            if (si->si_v.fps == 0) {
+                si->time += si->gdp.durationPerSample;
+            } else {
+                si->si_v.frames_time += si->gdp.sourceTimeScale /
+                    (si->si_v.fps / 65536.0);
+                si->time = si->si_v.frames_time;
+            }
+        }
+
+        if (err == eofErr) {
+            err = noErr;
+            si->src_extract_complete = true;
+
+            if (si->si_v.ds) {
+                err = ICMDecompressionSessionFlush(si->si_v.ds);
+                dbg_printf("[ vOE]  dF [%08lx] :: _get_frame() = %ld\n",
+                           (UInt32) -1, err);
+            }
+
+            /* TODO: flush compressor by one frame only, not all at once */
+            if (si->si_v.cs) {
+                err = ICMCompressionSessionCompleteFrames(si->si_v.cs, true, 0, 0);
+                dbg_printf("[ vOE]  cF [%08lx] :: _get_frame() = %ld\n",
+                           (UInt32) -1, err);
+            }
+        }
+
+        if (!err) {
+            if (si->gdp.descType == 0) {
+                si->src_extract_complete = true;
+            } else if (si->gdp.descType != VideoMediaType) {
+                err = paramErr;
+                goto bail;
+            } else {
+                                                        
+                ImageDescription *id = *(ImageDescriptionHandle) si->gdp.desc;
+                dbg_printf("[ vOE]  I> [%08lx] :: _get_frame() = '%4.4s' %08lx"
+                           " %08lx [%d x %d] [%f x %f] %ld %d %d %d\n",
+                           (UInt32) -1, (char *) &id->cType,
+                           id->temporalQuality, id->spatialQuality, id->width,
+                           id->height, id->hRes / 65536.0, id->vRes / 65536.0,
+                           id->dataSize, id->frameCount, id->depth, id->clutID);
+
+                if (si->gdp.descSeed != si->lastDescSeed) {
+
+                    if (si->out_buffer) {
+                        free(si->out_buffer);
+                        si->out_buffer = NULL;
+                        si->out_buffer_size = 0;
+                    }
+
+                    if (si->si_v.width == 0)
+                        si->si_v.width = id->width << 16;
+                    else
+                        si->si_v.width = FixRound(si->si_v.width);
+
+                    if (si->si_v.height == 0)
+                        si->si_v.height = id->height << 16;
+                    else
+                        si->si_v.height = FixRound(si->si_v.height);
+
+                    if (si->si_v.depth == 0)
+                        si->si_v.depth = id->depth;
+
+
+                    err = _setup_cs(si);
+                    if (err)
+                        goto bail;
+
+                    err = _setup_ds(si, (ImageDescriptionHandle) si->gdp.desc);
+                    if (err)
+                        goto bail;
+
+                    // Allocate memory enough to store maximum compressed data
+                    si->out_buffer_size = si->si_v.width * si->si_v.height * 3;
+                    si->out_buffer = calloc(1, si->out_buffer_size);
+
+                    err = MemError();
+                    if (err) goto bail;
+
+                    si->lastDescSeed = si->gdp.descSeed;
+
+                    dbg_printf("[ vOE]   x [%08lx] :: _get_frame() = [%f x %f] @ %d\n",
+                               (UInt32) -1, si->si_v.width / 65536.0,
+                               si->si_v.height / 65536.0, si->si_v.depth);
+                }
+
+                /*
+                err = DecompressSequenceFrameS(si->si_v.decompressSequence,
+                                               si->gdp.dataPtr, si->gdp.dataSize,
+                                               0, &whoCares, NULL);
+                if (err) goto bail;
+                */
+
+                memset(&ft, 0, sizeof(ICMFrameTimeRecord));
+                ft.recordSize = sizeof(ICMFrameTimeRecord);
+                *(TimeValue64 *) &ft.value = si->time;
+                ft.scale = si->sourceTimeScale;
+                ft.rate = fixed1;
+                //ft.frameNumber = 0;
+                ft.duration = si->gdp.durationPerSample;
+                //ft.flags = 0;
+                //ft.flags = icmFrameTimeIsNonScheduledDisplayTime;
+                ft.flags = icmFrameTimeDecodeImmediately;
+
+                err = ICMDecompressionSessionDecodeFrame(si->si_v.ds,
+                                                         (UInt8 *) si->gdp.dataPtr,
+                                                         si->gdp.dataSize,
+                                                         /* sess_opts */ NULL,
+                                                         &ft,
+                                                         si);
+                if (err) goto bail;
+                                                        
+            }
+
+            si->gdp.actualSampleCount = 0;
+        }
+    }
+
+ bail:
+    dbg_printf("[ vOE] <   [%08lx] :: _get_frame() = %ld\n", (UInt32) -1, err);
+    return err;
+}
+
+
+/* ======================================================================= */
+
+Boolean can_handle_track__video(OSType trackType, TimeScale scale,
+                                MovieExportGetPropertyUPP getPropertyProc,
+                                void *refCon)
+{
+    if (!scale || !trackType || !getPropertyProc)
+        return false;
+
+    if (trackType == VideoMediaType)
+        return true;
+
+    return false;
+}
+
+ComponentResult validate_movie__video(OggExportGlobals *globals,
+                                      Movie theMovie, Track onlyThisTrack,
+                                      Boolean *valid)
+{
+    ComponentResult err = noErr;
+
+    return err;
+}
+
+ComponentResult initialize_stream__video(StreamInfo *si)
+{
+    ComponentResult err = noErr;
+
+    memset(&si->si_v.op, 0, sizeof(si->si_v.op));
+
+    si->si_v.cs = NULL;
+    si->si_v.cs_opts = NULL;
+    si->si_v.ds = NULL;
+    si->si_v.ds_opts = NULL;
+
+    si->si_v.cs_imdsc = NULL;
+
+    si->si_v.width = 0;
+    si->si_v.height = 0;
+    si->si_v.fps = 24 << 16; //0;
+    // si->si_v.depth = 0;
+
+    si->si_v.grpos_shift = 6; //0;
+    si->si_v.op_flags = 0;
+    //si->last_grpos = -1;
+    si->si_v.frames_time = 0;
+
+    si->stream_type = VideoMediaType;
+
+    // allocate initial space for ogg_package
+    //si->si_v.op_buffer = NULL;
+    si->si_v.op_buffer_size = kOES_V_init_op_size;
+    si->si_v.op_buffer = calloc(1, kOES_V_init_op_size);
+
+    err = MemError();
+
+    if (!err) {
+        si->si_v.stdVideo = NULL;
+#if 0
+        err = OpenADefaultComponent(StandardCompressionType,
+                                    StandardCompressionSubType,
+                                    &si->si_v.stdVideo);
+#else
+        err = OpenADefaultComponent(StandardCompressionType,
+                                    'vide',
+                                    &si->si_v.stdVideo);
+#endif
+        if (err) {
+            if (si->si_v.op_buffer) {
+                free(si->si_v.op_buffer);
+                si->si_v.op_buffer = NULL;
+                si->si_v.op_buffer_size = 0;
+            }
+        }
+    }
+
+    return err;
+}
+
+void clear_stream__video(StreamInfo *si)
+{
+    if (si->si_v.op_buffer) {
+        free(si->si_v.op_buffer);
+        si->si_v.op_buffer = NULL;
+        si->si_v.op_buffer_size = 0;
+    }
+
+    if (si->si_v.ds) {
+        ICMDecompressionSessionFlush(si->si_v.ds); // !?
+        ICMDecompressionSessionRelease(si->si_v.ds);
+        si->si_v.ds = NULL;
+    }
+
+    if (si->si_v.cs) {
+        ICMCompressionSessionCompleteFrames(si->si_v.cs, true, 0, 0); // !?
+        ICMCompressionSessionRelease(si->si_v.cs);
+        si->si_v.cs = NULL;
+    }
+}
+
+ComponentResult configure_stream__video(OggExportGlobals *globals,
+                                        StreamInfo *si)
+{
+    ComponentResult err = noErr;
+
+    dbg_printf("[ vOE]  >> [%08lx] :: configure_stream()\n", (UInt32) globals);
+
+    {
+        SCSpatialSettings ss = {k422YpCbCr8PixelFormat, NULL, 32, 512};
+        //SCSpatialSettings ss = {0, NULL, 0, 0};
+        SCTemporalSettings ts = {0, 0, 0};
+        SCDataRateSettings ds = {0, 0, 0, 0};
+        ComponentInstance stdcomp = NULL;
+        QTAtomContainer mes = NULL;
+        Fixed tmp_fixed = 0;
+
+        err = OpenADefaultComponent(StandardCompressionType, StandardCompressionSubType, &stdcomp);
+        if (err)
+            goto bail;
+
+        ts.frameRate = 12 << 16;
+        //err = SCSetInfo(stdcomp, scTemporalSettingsType, &ts);
+        if (err)
+            goto bail;
+
+        ss.codecType = 'XiVs';
+        //err = SCSetInfo(stdcomp, scSpatialSettingsType, &ss);
+        if (err)
+            goto bail;
+
+        err = SCGetSettingsAsAtomContainer(stdcomp, &mes);
+        if (err)
+            goto bail;
+
+        //err = MovieExportSetSettingsFromAtomContainer(globals->quickTimeMovieExporter, mes);
+        if (err)
+            goto bail;
+
+        err = InvokeMovieExportGetPropertyUPP(si->refCon, si->trackID,
+                                              scTemporalSettingsType, &ts,
+                                              si->getPropertyProc);
+        dbg_printf("[ vOE]  ts [%08lx] :: configure_stream() = %ld, [%ld, %f, %ld]\n", (UInt32) globals, err,
+                   ts.temporalQuality, ts.frameRate / 65536.0, ts.keyFrameRate);
+
+        err = InvokeMovieExportGetPropertyUPP(si->refCon, si->trackID,
+                                              scSpatialSettingsType, &ss,
+                                              si->getPropertyProc);
+        dbg_printf("[ vOE]  ss [%08lx] :: configure_stream() = %ld, ['%4.4s', %08lx, %d, %ld]\n", (UInt32) globals, err,
+                   (char *) &ss.codecType, (UInt32) ss.codec, ss.depth, ss.spatialQuality);
+
+        err = InvokeMovieExportGetPropertyUPP(si->refCon, si->trackID,
+                                              scDataRateSettingsType, &ds,
+                                              si->getPropertyProc);
+        dbg_printf("[ vOE]  ds [%08lx] :: configure_stream() = %ld, [%ld, %ld, %ld, %ld]\n", (UInt32) globals, err,
+                   ds.dataRate, ds.frameDuration, ds.minSpatialQuality, ds.minTemporalQuality);
+
+        if (InvokeMovieExportGetPropertyUPP(si->refCon, si->trackID,
+                                            movieExportWidth, &tmp_fixed,
+                                            si->getPropertyProc) == noErr)
+            si->si_v.width = tmp_fixed;
+
+        if (InvokeMovieExportGetPropertyUPP(si->refCon, si->trackID,
+                                            movieExportHeight, &tmp_fixed,
+                                            si->getPropertyProc) == noErr)
+            si->si_v.height = tmp_fixed;
+
+        dbg_printf("[ vOE]   x [%08lx] :: configure_stream() = [%f x %f]\n",
+                   (UInt32) globals, si->si_v.width / 65536.0,
+                   si->si_v.height / 65536.0);
+
+        /*
+    if (InvokeMovieExportGetPropertyUPP(outputTrack->refCon, outputTrack->trackID, scSpatialSettingsType, &spatialSettings, outputTrack->getPropertyProc) == noErr)
+        outputTrack->depth = spatialSettings.depth;
+
+        */
+
+    bail:
+        if (stdcomp)
+            CloseComponent(stdcomp);
+
+        if (mes)
+            DisposeHandle(mes);
+    }
+
+
+    dbg_printf("[ vOE] <   [%08lx] :: configure_stream() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
+
+/*
+ComponentResult
+fill_page__video(OggExportGlobalsPtr globals, StreamInfoPtr si,
+                 Float64 max_duration, UInt32 *pos_sec, Float64 *pos_subsec)
+{
+    ComponentResult err = noErr;
+
+    Boolean eos_hit = false;
+    Boolean do_loop = true;
+
+
+    UInt32 max_page_duration = (UInt32) (max_duration *
+                                         si->si_a.stda_asbd.mSampleRate);
+
+    dbg_printf("[ vOE]  >> [%08lx] :: fill_page__video(%lf)\n",
+               (UInt32) globals, max_duration);
+
+    _get_frame(globals, si);
+
+    if (si->src_extract_complete) {
+        si->eos = true;
+    } else {
+        si->og.header_len = 0;
+        si->og.body_len = 0;
+        si->og_ready = true;
+    }
+    dbg_printf("[ vOE] <   [%08lx] :: fill_page__video() = %ld (%ld, %lf)\n",
+               (UInt32) globals, err, *pos_sec, *pos_subsec);
+    return err;
+}
+*/
+
+ComponentResult
+fill_page__video(OggExportGlobalsPtr globals, StreamInfoPtr si,
+                 Float64 max_duration)
+{
+    ComponentResult err = noErr;
+
+    Boolean eos_hit = false;
+    Boolean do_loop = true;
+
+    UInt32 max_page_packets = (UInt32) (max_duration *
+                                        si->si_v.fps / 65536.0);
+    if (max_page_packets < 1)
+        max_page_packets = 1;
+
+    dbg_printf("[ vOE]  >> [%08lx] :: fill_page(%lf [%ld / %f])\n",
+               (UInt32) globals, max_duration, max_page_packets,
+               si->si_v.fps / 65536.0);
+
+    if (ogg_stream_pageout(&si->os, &si->og) > 0) {
+        _ready_page(si);
+    } else {
+        while (do_loop) {
+            int result = 0;
+            if (si->si_v.op.packet != NULL) {
+                si->acc_packets++;
+                //si->acc_duration = si->acc_packets / (si->si_v.fps / 65536.0);
+                si->si_v.op.b_o_s = 0;
+
+                /* TODO: make eos identification more general, now it
+                   works only if the compressor queues frames ahead */
+                if (si->src_extract_complete)
+                    si->si_v.op.e_o_s = 1;
+                else
+                    si->si_v.op.e_o_s = 0;
+
+                si->si_v.op.packetno = si->packets_total++;
+                if (si->si_v.op_flags & mediaSampleNotSync ||
+                    si->si_v.grpos_shift == 0) {
+                    si->last_grpos++;
+                } else {
+                    ogg_int64_t frames = 0;
+                    if (si->last_grpos >= 0) {
+                        frames = si->last_grpos >> si->si_v.grpos_shift;
+                        frames += si->last_grpos -
+                            (frames << si->si_v.grpos_shift) + 1;
+                    }
+                    si->last_grpos = frames << si->si_v.grpos_shift;
+                }
+                si->si_v.op.granulepos = si->last_grpos;
+                result = ogg_stream_packetin(&si->os, &si->si_v.op);
+                dbg_printf("[ vOE] _i  [%08lx] :: fill_page(): "
+                           "ogg_stream_packetin(%lld, %ld, %lld) = %d\n",
+                           (UInt32) globals, si->si_v.op.packetno,
+                           si->si_v.op.bytes, si->si_v.op.granulepos,
+                           result);
+                si->si_v.op.bytes = 0;
+                si->si_v.op.packet = NULL;
+                si->si_v.op_flags = 0;
+            }
+
+            if (si->acc_packets > 0) {
+            if (((eos_hit || si->acc_packets > max_page_packets) &&
+                 ogg_stream_flush(&si->os, &si->og) > 0) ||
+                (ogg_stream_pageout(&si->os, &si->og) > 0)) {
+                _ready_page(si);
+                do_loop = false;
+                break;
+            }
+            }
+
+            err = _get_frame(si);
+            dbg_printf("[ vOE]  1# [%08lx] :: fill_page() = %ld\n",
+                       (UInt32) globals, err);
+            if (err)
+                break;
+        }
+    }
+
+    if (si->src_extract_complete) {
+        si->eos = true;
+    }
+
+    dbg_printf("[ vOE] <   [%08lx] :: fill_page() = %ld (%ld, %lf)\n",
+               (UInt32) globals, err, si->og_ts_sec, si->og_ts_subsec);
+    return err;
+}
+
+ComponentResult write_i_header__video(StreamInfoPtr si, DataHandler data_h,
+                                      wide *offset)
+{
+    ComponentResult err = noErr;
+    Handle ext;
+
+    /* pull frames until we got one, thus being able to get
+       video-encoded frame's sample description and the magic
+       cookie */
+
+    while (si->si_v.op.packet == NULL || si->src_extract_complete) {
+        err = _get_frame(si);
+        if (err)
+            break;
+    }
+
+    if (si->si_v.op.packet == NULL) {
+        // flush en/de-coder queues?
+    }
+
+    if (!err)
+        err = GetImageDescriptionExtension(si->si_v.cs_imdsc, &ext,
+                                           kSampleDescriptionExtensionTheora, 1);
+    if (!err) {
+        Byte *ptrheader, *mCookie, *cend;
+        UInt32 mCookieSize;
+        CookieAtomHeader *aheader;
+        //th_comment tc;
+        ogg_packet header, header_tc, header_cb;
+
+        mCookie = (UInt8 *) *ext;
+        mCookieSize = GetHandleSize(ext);
+
+        ptrheader = mCookie;
+        cend = mCookie + mCookieSize;
+
+        aheader = (CookieAtomHeader *) ptrheader;
+
+        header.bytes = header_tc.bytes = header_cb.bytes = 0;
+
+        while (ptrheader < cend) {
+            aheader = (CookieAtomHeader *) ptrheader;
+            ptrheader += EndianU32_BtoN(aheader->size);
+            if (ptrheader > cend || EndianU32_BtoN(aheader->size) <= 0)
+                break;
+
+            switch(EndianS32_BtoN(aheader->type)) {
+            case kCookieTypeTheoraHeader:
+                header.b_o_s = 1;
+                header.e_o_s = 0;
+                header.granulepos = 0;
+                header.packetno = 0;
+                header.bytes = EndianS32_BtoN(aheader->size) - 2 * sizeof(long);
+                header.packet = aheader->data;
+                break;
+
+            case kCookieTypeTheoraComments:
+                header_tc.b_o_s = 0;
+                header_tc.e_o_s = 0;
+                header_tc.granulepos = 0;
+                header_tc.packetno = 1;
+                header_tc.bytes = EndianS32_BtoN(aheader->size) - 2 * sizeof(long);
+                header_tc.packet = aheader->data;
+                break;
+
+            case kCookieTypeTheoraCodebooks:
+                header_cb.b_o_s = 0;
+                header_cb.e_o_s = 0;
+                header_cb.granulepos = 0;
+                header_cb.packetno = 2;
+                header_cb.bytes = EndianS32_BtoN(aheader->size) - 2 * sizeof(long);
+                header_cb.packet = aheader->data;
+                break;
+
+            default:
+                break;
+            }
+        }
+
+        if (header.bytes == 0 || header_tc.bytes == 0 || header_cb.bytes == 0) {
+            err = codecBadDataErr;
+        } else {
+            ogg_stream_packetin(&si->os, &header);
+            _flush_ogg(si, data_h, offset);
+
+            ogg_stream_packetin(&si->os, &header_tc);
+            ogg_stream_packetin(&si->os, &header_cb);
+            //_flush_ogg(si, data_h, offset);
+
+            si->packets_total = 3;
+            si->acc_packets = 2;
+            si->acc_duration = 0;
+        }
+
+        DisposeHandle(ext);
+    }
+
+    return err;
+}
+
+ComponentResult write_headers__video(StreamInfoPtr si, DataHandler data_h,
+                                     wide *offset)
+{
+    /* Simplified at the moment - packets are pulled into the stream in the
+     * initial header setup, and here we assume they are still in the stream
+     * and just flush them.
+     */
+    ComponentResult err = noErr;
+
+    err = _flush_ogg(si, data_h, offset);
+
+    if (!err) {
+        si->acc_packets = 0;
+        si->acc_duration = 0;
+    }
+
+    return err;
+}

Copied: trunk/xiph-qt/OggExport/src/stream_video.h (from rev 12093, trunk/xiph-qt/OggExport/src/stream_audio.h)
===================================================================
--- trunk/xiph-qt/OggExport/src/stream_audio.h	2006-11-12 14:44:51 UTC (rev 12093)
+++ trunk/xiph-qt/OggExport/src/stream_video.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,67 @@
+/*
+ *  stream_video.h
+ *
+ *    Declaration of video stream related functions of OggExporter.
+ *
+ *
+ *  Copyright (c) 2006  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(__stream_video_h__)
+#define __stream_video_h__
+
+#include "exporter_types.h"
+
+extern Boolean
+can_handle_track__video(OSType trackType, TimeScale scale,
+                        MovieExportGetPropertyUPP getPropertyProc,
+                        void *refCon);
+extern ComponentResult
+validate_movie__video(OggExportGlobals *globals, Movie theMovie,
+                      Track onlyThisTrack, Boolean *valid);
+extern ComponentResult
+configure_stream__video(OggExportGlobals *globals, StreamInfo *si);
+
+extern ComponentResult
+write_i_header__video(StreamInfoPtr si, DataHandler data_h,
+                      wide *offset);
+extern ComponentResult
+write_headers__video(StreamInfoPtr si, DataHandler data_h,
+                     wide *offset);
+extern ComponentResult
+fill_page__video(OggExportGlobalsPtr globals, StreamInfoPtr si,
+                 Float64 max_duration);
+
+extern ComponentResult initialize_stream__video(StreamInfo *si);
+extern void clear_stream__video(StreamInfo *si);
+
+
+#define HANDLE_FUNCTIONS__VIDEO { &can_handle_track__video,     \
+            &validate_movie__video, &configure_stream__video,   \
+            &write_i_header__video, &write_headers__video,      \
+            &fill_page__video,                                  \
+            &initialize_stream__video, &clear_stream__video }
+
+
+#endif /* __stream_video_h__ */

Modified: trunk/xiph-qt/OggImport/Info.plist
===================================================================
--- trunk/xiph-qt/OggImport/Info.plist	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggImport/Info.plist	2007-01-18 13:45:42 UTC (rev 12346)
@@ -7,7 +7,7 @@
 	<key>CFBundleExecutable</key>
 	<string>OggImport</string>
 	<key>CFBundleGetInfoString</key>
-	<string>QuickTime Ogg Importer Component 0.1.7, Copyright © 2005-2006 Arek Korbik</string>
+	<string>QuickTime Ogg Importer Component 0.1.8, Copyright © 2005-2006 Arek Korbik</string>
 	<key>CFBundleIconFile</key>
 	<string></string>
 	<key>CFBundleIdentifier</key>
@@ -17,13 +17,13 @@
 	<key>CFBundlePackageType</key>
 	<string>BNDL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>0.1.7</string>
+	<string>0.1.8</string>
 	<key>CFBundleSignature</key>
 	<string>eat </string>
 	<key>CFBundleVersion</key>
-	<string>0.1.7</string>
+	<string>0.1.8</string>
 	<key>NSHumanReadableCopyright</key>
-	<string>QuickTime Ogg Importer Component 0.1.7, Copyright © 2005-2006 Arek Korbik</string>
+	<string>QuickTime Ogg Importer Component 0.1.8, Copyright © 2005-2006 Arek Korbik</string>
 	<key>CSResourcesFileMapped</key>
 	<true/>
 </dict>

Modified: trunk/xiph-qt/OggImport/src/OggImport.h
===================================================================
--- trunk/xiph-qt/OggImport/src/OggImport.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggImport/src/OggImport.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -31,9 +31,15 @@
 #ifndef __OGGIMPORT_H__
 #define __OGGIMPORT_H__ 1
 
+#include "config.h"
 #include "versions.h"
 
+#if !defined(XIPHQT_BUNDLE_ID)
 #define kOggVorbisBundleID "org.xiph.xiph-qt.oggimport"
+#else
+//#define kOggVorbisBundleID kXiphQTBundleID
+#define kOggVorbisBundleID XIPHQT_BUNDLE_ID
+#endif  /* XIPHQT_BUNDLE_ID */
 
 #define kImporterResID                  4000
 #define kImporterNameStringResID        4000

Modified: trunk/xiph-qt/OggImport/src/stream_flac.c
===================================================================
--- trunk/xiph-qt/OggImport/src/stream_flac.c	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggImport/src/stream_flac.c	2007-01-18 13:45:42 UTC (rev 12346)
@@ -41,6 +41,8 @@
 #include "data_types.h"
 #include "utils.h"
 
+#undef INCOMPLETE_PAGE_DURATION
+#define INCOMPLETE_PAGE_DURATION 10
 
 int recognize_header__flac(ogg_page *op)
 {
@@ -73,11 +75,24 @@
     si->si_flac.skipped = 0;
     si->si_flac.state = kFStateInitial;
 
+    si->si_flac.sample_refs_count = 0;
+    si->si_flac.sample_refs_duration = 0;
+    //si->si_flac.sample_refs_size = kSRefsInitial;
+    //si->si_flac.sample_refs_size = 64;
+    si->si_flac.sample_refs_size = 1;
+    si->si_flac.sample_refs = calloc(si->si_flac.sample_refs_size, sizeof(SampleReference64Record));
+
+    if (si->si_flac.sample_refs == NULL)
+        return -1;
+
     return 0;
 };
 
 void clear_stream__flac(StreamInfo *si)
 {
+    if (si->si_flac.sample_refs != NULL)
+        free(si->si_flac.sample_refs);
+
     vorbis_comment_clear(&si->si_flac.vc);
 };
 
@@ -103,16 +118,31 @@
     asbd.mBitsPerChannel = si->si_flac.bps;
     asbd.mReserved = 0;
 
-    if (si->numChannels == 1)
+    acl.mChannelBitmap = 0;
+    acl.mNumberChannelDescriptions = 0;
+    switch (si->numChannels) {
+    case 1:
         acl.mChannelLayoutTag = kAudioChannelLayoutTag_Mono;
-    else if (si->numChannels == 2)
+        break;
+    case 2:
         acl.mChannelLayoutTag = kAudioChannelLayoutTag_Stereo;
-    else {
+        break;
+    case 3:
+        acl.mChannelLayoutTag = kAudioChannelLayoutTag_ITU_3_0;
+        break;
+    case 4:
+        acl.mChannelLayoutTag = kAudioChannelLayoutTag_Quadraphonic;
+        break;
+    case 5:
+        acl.mChannelLayoutTag = kAudioChannelLayoutTag_ITU_3_2;
+        break;
+    case 6:
+        acl.mChannelLayoutTag = kAudioChannelLayoutTag_ITU_3_2_1;
+        break;
+    default:
         pacl = NULL;
         acl_size = 0;
     }
-    acl.mChannelBitmap = 0;
-    acl.mNumberChannelDescriptions = 0;
 
     err = QTSoundDescriptionCreate(&asbd, pacl, acl_size, NULL, 0, kQTSoundDescriptionKind_Movie_Version2, (SoundDescriptionHandle*) &desc);
 
@@ -320,6 +350,89 @@
                     duration += si->streamOffsetSamples;
                 }
 
+                
+                if (si->si_flac.sample_refs_count >= si->si_flac.sample_refs_size) {
+                    //resize the sample_refs array
+                    SampleReference64Record *srptr = NULL;
+                    si->si_flac.sample_refs_size += kSRefsIncrement;
+                    srptr = realloc(si->si_flac.sample_refs, si->si_flac.sample_refs_size * sizeof(SampleReference64Record));
+                    //if (srptr == NULL)
+                    //    ; // signal error here
+                    si->si_flac.sample_refs = srptr;
+                }
+
+                {
+                    SampleReference64Record *srptr = &si->si_flac.sample_refs[si->si_flac.sample_refs_count];
+                    memset(srptr, 0, sizeof(SampleReference64Record));
+                    srptr->dataOffset = SInt64ToWide(globals->dataOffset);
+                    srptr->dataSize = len;
+                    srptr->durationPerSample = duration;
+                    srptr->numberOfSamples = 1;
+                    srptr->sampleFlags = smp_flags;
+
+                    dbg_printf("   -   :++: storing sampleRef: %lld, len: %d, dur: %d [%08lx, %08lx]\n", globals->dataOffset, len, duration,
+                               (UInt32) si->si_flac.sample_refs, (UInt32) srptr);
+                    si->si_flac.sample_refs_count += 1;
+                    si->si_flac.sample_refs_duration += duration;
+                }
+
+                // change the condition...?
+                //if (si->si_flac.sample_refs_count >= si->si_flac.sample_refs_size || ogg_page_eos(opg)) {
+                if (/*si->si_flac.sample_refs_count >= si->si_flac.sample_refs_size ||*/ ogg_page_eos(opg)) {
+                    dbg_printf("   -   :++: adding sampleRefs: %lld, count: %ld, dur: %ld\n", globals->dataOffset, si->si_flac.sample_refs_count,
+                               si->si_flac.sample_refs_duration);
+                    ret = AddMediaSampleReferences64(si->theMedia, si->sampleDesc, si->si_flac.sample_refs_count, si->si_flac.sample_refs, &inserted);
+
+                    if (ret == noErr) {
+                        TimeValue timeLoaded;
+                        Float64 timeLoadedSubSecond;
+
+                        si->mediaLength += si->si_flac.sample_refs_duration;
+
+                        dbg_printf("   -   :><: added page %04ld at %14ld, f: %d\n",
+                                   ogg_page_pageno(opg), inserted, !logg_page_last_packet_incomplete(opg));
+                        dbg_printf("   -   :><: d:%ld, dd:%lld, ds:%ld\n", GetMediaDuration(si->theMedia), GetMediaDecodeDuration(si->theMedia),
+                                   GetMediaDataSize(si->theMedia, 0, inserted + duration));
+                        dbg_printf("   -   :/>: inserting media: %ld, mt: %ld, dur: %d\n", si->insertTime, /* si->lastGranulePos */ inserted,
+                                   si->si_flac.sample_refs_duration);
+                        ret = InsertMediaIntoTrack(si->theTrack, si->insertTime /*inserted*/, /* si->lastGranulePos */ inserted,
+                                                   si->si_flac.sample_refs_duration, fixed1);
+                        if (si->insertTime == 0) {
+                            if (si->streamOffset != 0) {
+                                SetTrackOffset(si->theTrack, si->streamOffset);
+                                dbg_printf("   # -- SetTrackOffset(%ld) = %ld --> %ld\n",
+                                           si->streamOffset, GetMoviesError(),
+                                           GetTrackOffset(si->theTrack));
+                                if (globals->dataIsStream) {
+                                    SetTrackEnabled(si->theTrack, false);
+                                    SetTrackEnabled(si->theTrack, true);
+                                }
+                            }
+                        }
+                        si->insertTime = -1;
+
+                        mediaTS = GetMediaTimeScale(si->theMedia);
+                        mediaTS_fl = (Float64) mediaTS;
+                        timeLoaded = si->streamOffset + si->mediaLength / mediaTS * movieTS + (si->mediaLength % mediaTS) * movieTS / mediaTS;
+                        timeLoadedSubSecond = (Float64) ((si->streamOffset % movieTS * mediaTS / movieTS + si->mediaLength) % mediaTS) / mediaTS_fl;
+
+                        dbg_printf("   -   :><: added page %04ld at %14ld; offset: %ld, duration: %ld (%ld(%lg); %ld; ml: %ld), mediats: %ld; moviets: %ld, ret = %ld\n",
+                                   ogg_page_pageno(opg), inserted,
+                                   GetTrackOffset(si->theTrack), GetTrackDuration(si->theTrack), timeLoaded, timeLoadedSubSecond,
+                                   (duration * movieTS) / mediaTS, si->mediaLength,
+                                   mediaTS, movieTS, ret);
+                        if (globals->timeLoaded < timeLoaded || (globals->timeLoaded == timeLoaded && globals->timeLoadedSubSecond < timeLoadedSubSecond)) {
+                            globals->timeLoaded = timeLoaded;
+                            globals->timeLoadedSubSecond = timeLoadedSubSecond;
+                        }
+
+                        movie_changed = true;
+
+                        si->si_flac.sample_refs_duration = 0;
+                        si->si_flac.sample_refs_count = 0;
+                    }
+                }
+#if 0
                 dbg_printf("   -   :++: adding sampleRef: %lld, len: %d, dur: %d\n", globals->dataOffset, len, duration);
                 ret = AddMediaSampleReference(si->theMedia, S32Set(globals->dataOffset),
                                               len, duration, si->sampleDesc, 1, smp_flags, &inserted); //@@@@ 64-bit enable
@@ -332,7 +445,9 @@
                     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));
-                    dbg_printf("   -   :/>: inserting media: %ld, mt: %lld, dur: %d\n", si->insertTime, si->lastGranulePos, duration);
+                    dbg_printf("   -   :><: d:%ld, dd:%lld, ds:%ld\n", GetMediaDuration(si->theMedia), GetMediaDecodeDuration(si->theMedia),
+                               GetMediaDataSize(si->theMedia, 0, inserted + duration));
+                    dbg_printf("   -   :/>: inserting media: %ld, mt: %ld, dur: %d\n", si->insertTime, /* si->lastGranulePos */ inserted, duration);
                     ret = InsertMediaIntoTrack(si->theTrack, si->insertTime /*inserted*/, /* si->lastGranulePos */ inserted,
                                                duration, fixed1);
                     if (si->insertTime == 0) {
@@ -366,6 +481,7 @@
 
                     movie_changed = true;
                 }
+#endif
 
                 if (pos != -1)
                     si->lastGranulePos = pos;

Modified: trunk/xiph-qt/OggImport/src/stream_theora.c
===================================================================
--- trunk/xiph-qt/OggImport/src/stream_theora.c	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggImport/src/stream_theora.c	2007-01-18 13:45:42 UTC (rev 12346)
@@ -29,10 +29,10 @@
 
 
 #include "stream_theora.h"
-#if defined(__APPLE_CC__)
+#if defined(__APPLE_CC__) && defined(XIPHQT_USE_FRAMEWORKS)
 #include <TheoraExp/theoradec.h>
 #else
-#include <theoradec.h>
+#include <theora/theoradec.h>
 #endif
 
 #include "debug.h"
@@ -164,8 +164,8 @@
     imgdsc->vendor = kXiphComponentsManufacturer;
     imgdsc->temporalQuality = codecMaxQuality;
     imgdsc->spatialQuality = codecMaxQuality;
-    imgdsc->width = si->si_theora.ti.frame_width;
-    imgdsc->height = si->si_theora.ti.frame_height;
+    imgdsc->width = si->si_theora.ti.pic_width;
+    imgdsc->height = si->si_theora.ti.pic_height;
     imgdsc->hRes = 72<<16;
     imgdsc->vRes = 72<<16;
     imgdsc->depth = 24;
@@ -179,7 +179,7 @@
 ComponentResult create_track__theora(OggImportGlobals *globals, StreamInfo *si)
 {
     ComponentResult ret = noErr;
-    UInt32 frame_width = si->si_theora.ti.frame_width;
+    UInt32 frame_width = si->si_theora.ti.pic_width;
     UInt32 frame_width_fraction = 0;
 
     if (si->si_theora.ti.aspect_numerator != si->si_theora.ti.aspect_denominator) {
@@ -189,7 +189,7 @@
     dbg_printf("! -T calling => NewMovieTrack()\n");
     si->theTrack = NewMovieTrack(globals->theMovie,
                                  frame_width << 16 | (frame_width_fraction & 0xffff),
-                                 si->si_theora.ti.frame_height << 16, 0);
+                                 si->si_theora.ti.pic_height << 16, 0);
 
     return ret;
 };

Modified: trunk/xiph-qt/OggImport/src/stream_types_flac.h
===================================================================
--- trunk/xiph-qt/OggImport/src/stream_types_flac.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggImport/src/stream_types_flac.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -43,6 +43,11 @@
     kFStateReadingPackets
 } FLACImportStates;
 
+enum {
+    kSRefsInitial = 32,
+    kSRefsIncrement = 8
+};
+
 typedef struct {
     FLACImportStates state;
 
@@ -51,6 +56,12 @@
     SInt32 metablocks;
     SInt32 skipped;
     UInt32 bps;
+
+    //SampleReference array
+    SampleReference64Record *sample_refs;
+    UInt32 sample_refs_size;
+    UInt32 sample_refs_count;
+    TimeValue sample_refs_duration;
 } StreamInfo__flac;
 
 

Modified: trunk/xiph-qt/OggImport/src/stream_types_theora.h
===================================================================
--- trunk/xiph-qt/OggImport/src/stream_types_theora.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggImport/src/stream_types_theora.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -33,10 +33,10 @@
 
 
 #if !defined(_NO_THEORA_SUPPORT)
-#if defined(__APPLE_CC__)
+#if defined(__APPLE_CC__) && defined(XIPHQT_USE_FRAMEWORKS)
 #include <TheoraExp/theoradec.h>
 #else
-#include <theoradec.h>
+#include <theora/theoradec.h>
 #endif
 
 typedef enum TheoraImportStates {

Modified: trunk/xiph-qt/OggImport/src/versions.h
===================================================================
--- trunk/xiph-qt/OggImport/src/versions.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/OggImport/src/versions.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -32,9 +32,9 @@
 #define __versions_h__
 
 #ifdef DEBUG
-#define kOgg_eat__Version		(0x00FF0107)
+#define kOgg_eat__Version		(0x00FF0108)
 #else
-#define kOgg_eat__Version		(0x00000107)
+#define kOgg_eat__Version		(0x00000108)
 #endif /* DEBUG */
 
 #endif /* __versions_h__ */

Modified: trunk/xiph-qt/Theora/Theora.xcodeproj/project.pbxproj
===================================================================
--- trunk/xiph-qt/Theora/Theora.xcodeproj/project.pbxproj	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/Theora.xcodeproj/project.pbxproj	2007-01-18 13:45:42 UTC (rev 12346)
@@ -8,11 +8,15 @@
 
 /* Begin PBXBuildFile section */
 		7321B37E0A022D43004A699F /* TheoraExp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7321B37D0A022D43004A699F /* TheoraExp.framework */; };
+		73317FCA0B0D14FC0021F8A8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73317FC90B0D14FC0021F8A8 /* QuartzCore.framework */; };
+		73514EE50B0C808C00CEC060 /* Theora.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73514EE40B0C808C00CEC060 /* Theora.framework */; };
 		736ED37B0A0FF641005F518F /* PkgInfo in CopyFiles */ = {isa = PBXBuildFile; fileRef = 736ED35F0A0FF57E005F518F /* PkgInfo */; };
 		7380D65E09D9853300A36679 /* TheoraDecoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 7380D65C09D9853300A36679 /* TheoraDecoder.c */; };
 		7380D66909D9859D00A36679 /* Ogg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7380D66709D9859D00A36679 /* Ogg.framework */; };
 		7380D66E09D985B800A36679 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7380D66D09D985B800A36679 /* QuickTime.framework */; };
 		7380D6A009D9884600A36679 /* TheoraDecoder.r in Rez */ = {isa = PBXBuildFile; fileRef = 7380D65F09D9854100A36679 /* TheoraDecoder.r */; };
+		73D286E00B0BFCE800A4C9E3 /* TheoraEncoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 73D286DC0B0BFCE800A4C9E3 /* TheoraEncoder.c */; };
+		73D286E60B0BFD2300A4C9E3 /* TheoraEncoder.r in Rez */ = {isa = PBXBuildFile; fileRef = 73D286E50B0BFD2300A4C9E3 /* TheoraEncoder.r */; };
 		8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
 		8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; };
 /* End PBXBuildFile section */
@@ -37,6 +41,8 @@
 		7321B37D0A022D43004A699F /* TheoraExp.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TheoraExp.framework; path = /Library/Frameworks/TheoraExp.framework; sourceTree = "<absolute>"; };
 		7321B3B10A04F1CC004A699F /* TheoraDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TheoraDecoder.h; path = src/TheoraDecoder.h; sourceTree = "<group>"; };
 		7321B3C20A04F91D004A699F /* decoder_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = decoder_types.h; path = src/decoder_types.h; sourceTree = "<group>"; };
+		73317FC90B0D14FC0021F8A8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
+		73514EE40B0C808C00CEC060 /* Theora.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Theora.framework; path = ../../../../../../Library/Frameworks/Theora.framework; sourceTree = SOURCE_ROOT; };
 		736ED35F0A0FF57E005F518F /* PkgInfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PkgInfo; sourceTree = "<group>"; };
 		7380D65509D9849B00A36679 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../common/config.h; sourceTree = SOURCE_ROOT; };
 		7380D65609D984CD00A36679 /* fccs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fccs.h; path = ../common/fccs.h; sourceTree = SOURCE_ROOT; };
@@ -50,6 +56,11 @@
 		7380D66709D9859D00A36679 /* Ogg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Ogg.framework; path = /Library/Frameworks/Ogg.framework; sourceTree = "<absolute>"; };
 		7380D66D09D985B800A36679 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
 		7380D6E809D98EEE00A36679 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = debug.h; path = ../utils/debug.h; sourceTree = SOURCE_ROOT; };
+		73D286DB0B0BFCE800A4C9E3 /* encoder_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = encoder_types.h; path = src/encoder_types.h; sourceTree = "<group>"; };
+		73D286DC0B0BFCE800A4C9E3 /* TheoraEncoder.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = TheoraEncoder.c; path = src/TheoraEncoder.c; sourceTree = "<group>"; };
+		73D286DD0B0BFCE800A4C9E3 /* TheoraEncoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TheoraEncoder.h; path = src/TheoraEncoder.h; sourceTree = "<group>"; };
+		73D286DE0B0BFCE800A4C9E3 /* TheoraEncoderDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TheoraEncoderDispatch.h; path = src/TheoraEncoderDispatch.h; sourceTree = "<group>"; };
+		73D286E50B0BFD2300A4C9E3 /* TheoraEncoder.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = TheoraEncoder.r; path = src/TheoraEncoder.r; sourceTree = "<group>"; };
 		8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
 		8D01CCD20486CAD60068D4B7 /* Theora.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Theora.component; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
@@ -63,6 +74,8 @@
 				7380D66909D9859D00A36679 /* Ogg.framework in Frameworks */,
 				7380D66E09D985B800A36679 /* QuickTime.framework in Frameworks */,
 				7321B37E0A022D43004A699F /* TheoraExp.framework in Frameworks */,
+				73514EE50B0C808C00CEC060 /* Theora.framework in Frameworks */,
+				73317FCA0B0D14FC0021F8A8 /* QuartzCore.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -83,6 +96,8 @@
 		089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
 			isa = PBXGroup;
 			children = (
+				73317FC90B0D14FC0021F8A8 /* QuartzCore.framework */,
+				73514EE40B0C808C00CEC060 /* Theora.framework */,
 				7321B37D0A022D43004A699F /* TheoraExp.framework */,
 				7380D66709D9859D00A36679 /* Ogg.framework */,
 				7380D66D09D985B800A36679 /* QuickTime.framework */,
@@ -94,6 +109,7 @@
 		089C167CFE841241C02AAC07 /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				73D286E50B0BFD2300A4C9E3 /* TheoraEncoder.r */,
 				736ED35F0A0FF57E005F518F /* PkgInfo */,
 				7380D65F09D9854100A36679 /* TheoraDecoder.r */,
 				7380D65809D984FD00A36679 /* icon.icns */,
@@ -107,6 +123,10 @@
 		08FB77ADFE841716C02AAC07 /* Source */ = {
 			isa = PBXGroup;
 			children = (
+				73D286DB0B0BFCE800A4C9E3 /* encoder_types.h */,
+				73D286DC0B0BFCE800A4C9E3 /* TheoraEncoder.c */,
+				73D286DD0B0BFCE800A4C9E3 /* TheoraEncoder.h */,
+				73D286DE0B0BFCE800A4C9E3 /* TheoraEncoderDispatch.h */,
 				7321B3C20A04F91D004A699F /* decoder_types.h */,
 				7321B3B10A04F1CC004A699F /* TheoraDecoder.h */,
 				7380D6E809D98EEE00A36679 /* debug.h */,
@@ -185,6 +205,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				7380D6A009D9884600A36679 /* TheoraDecoder.r in Rez */,
+				73D286E60B0BFD2300A4C9E3 /* TheoraEncoder.r in Rez */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -214,6 +235,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				7380D65E09D9853300A36679 /* TheoraDecoder.c in Sources */,
+				73D286E00B0BFCE800A4C9E3 /* TheoraEncoder.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: trunk/xiph-qt/Theora/src/Theora.exp
===================================================================
--- trunk/xiph-qt/Theora/src/Theora.exp	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/Theora.exp	2007-01-18 13:45:42 UTC (rev 12346)
@@ -1 +1,2 @@
 _Theora_ImageCodecComponentDispatch
+_Theora_ImageEncoderComponentDispatch

Modified: trunk/xiph-qt/Theora/src/TheoraDecoder.c
===================================================================
--- trunk/xiph-qt/Theora/src/TheoraDecoder.c	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/TheoraDecoder.c	2007-01-18 13:45:42 UTC (rev 12346)
@@ -54,10 +54,14 @@
 #define pascal
 #endif
 
-static OSStatus CopyPlanarYCbCr420ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy);
-static OSStatus CopyPlanarYCbCr422ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy);
-static OSStatus CopyPlanarYCbCr444ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy);
-static OSErr CopyPlanarYCbCr422ToPlanarYUV422(th_ycbcr_buffer ycbcr, ICMDataProcRecordPtr dataProc, UInt8 *baseAddr, long stride, long width, long height);
+static OSStatus CopyPlanarYCbCr420ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy,
+                                                 size_t offset_x, size_t offset_y);
+static OSStatus CopyPlanarYCbCr422ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy,
+                                                 size_t offset_x, size_t offset_y);
+static OSStatus CopyPlanarYCbCr444ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy,
+                                                 size_t offset_x, size_t offset_y);
+static OSErr CopyPlanarYCbCr422ToPlanarYUV422(th_ycbcr_buffer ycbcr, ICMDataProcRecordPtr dataProc, UInt8 *baseAddr, long stride, long width, long height,
+                                              size_t offset_x, size_t offset_y);
 
 // Setup required for ComponentDispatchHelper.c
 #define IMAGECODEC_BASENAME() 		Theora_ImageCodec
@@ -87,13 +91,12 @@
 {
     OSErr err = noErr;
     Handle ext;
-    OggSerialNoAtom *atom;
-    Byte *ptrheader, *mCookie;
+    //OggSerialNoAtom *atom;
+    Byte *ptrheader, *mCookie, *cend;
     UInt32 mCookieSize;
     CookieAtomHeader *aheader;
     th_comment tc;
-    ogg_packet op;
-    int i = 0;
+    ogg_packet header, header_tc, header_cb;
 
     if (glob->info_initialised) {
         dbg_printf("--:Theora:- Decoder already initialised, skipping...\n");
@@ -102,50 +105,72 @@
 
     err = GetImageDescriptionExtension(p->imageDescription, &ext, kSampleDescriptionExtensionTheora, 1);
     if (err != noErr) {
-        dbg_printf("XXX GetImageDescriptionExtension() failed!\n");
+        dbg_printf("XXX GetImageDescriptionExtension() failed! ('%4.4s')\n", &(*p->imageDescription)->cType);
         err = codecBadDataErr;
         return err;
     }
 
-    mCookie = *ext;
+    mCookie = (UInt8 *) *ext;
     mCookieSize = GetHandleSize(ext);
 
-    atom = (OggSerialNoAtom*)mCookie;
-    ptrheader = mCookie + EndianU32_BtoN(atom->size);
+    ptrheader = mCookie;
+    cend = mCookie + mCookieSize;
+
     aheader = (CookieAtomHeader*)ptrheader;
 
+
+    header.bytes = header_tc.bytes = header_cb.bytes = 0;
+
+    while (ptrheader < cend) {
+        aheader = (CookieAtomHeader *) ptrheader;
+        ptrheader += EndianU32_BtoN(aheader->size);
+        if (ptrheader > cend || EndianU32_BtoN(aheader->size) <= 0)
+            break;
+
+        switch(EndianS32_BtoN(aheader->type)) {
+        case kCookieTypeTheoraHeader:
+            header.b_o_s = 1;
+            header.e_o_s = 0;
+            header.granulepos = 0;
+            header.packetno = 0;
+            header.bytes = EndianS32_BtoN(aheader->size) - 2 * sizeof(long);
+            header.packet = aheader->data;
+            break;
+
+        case kCookieTypeTheoraComments:
+            header_tc.b_o_s = 0;
+            header_tc.e_o_s = 0;
+            header_tc.granulepos = 0;
+            header_tc.packetno = 1;
+            header_tc.bytes = EndianS32_BtoN(aheader->size) - 2 * sizeof(long);
+            header_tc.packet = aheader->data;
+            break;
+
+        case kCookieTypeTheoraCodebooks:
+            header_cb.b_o_s = 0;
+            header_cb.e_o_s = 0;
+            header_cb.granulepos = 0;
+            header_cb.packetno = 2;
+            header_cb.bytes = EndianS32_BtoN(aheader->size) - 2 * sizeof(long);
+            header_cb.packet = aheader->data;
+            break;
+
+        default:
+            break;
+        }
+    }
+
     err = codecBadDataErr;
-    // scan quickly through the cookie, check types and packet sizes
-    if (EndianS32_BtoN(atom->type) != kCookieTypeOggSerialNo || (UInt32) (ptrheader - mCookie) > mCookieSize)
+
+    if (header.bytes == 0 || header_tc.bytes == 0 || header_cb.bytes == 0)
         return err;
-    ptrheader += EndianU32_BtoN(aheader->size);
-    if (EndianS32_BtoN(aheader->type) != kCookieTypeTheoraHeader || (UInt32) (ptrheader - mCookie) > mCookieSize)
-        return err;
-    aheader = (CookieAtomHeader*) ptrheader;
-    ptrheader += EndianU32_BtoN(aheader->size);
-    if (EndianS32_BtoN(aheader->type) != kCookieTypeTheoraComments || (UInt32) (ptrheader - mCookie) > mCookieSize)
-        return err;
-    aheader = (CookieAtomHeader*) ptrheader;
-    ptrheader += EndianU32_BtoN(aheader->size);
-    if (EndianS32_BtoN(aheader->type) != kCookieTypeTheoraCodebooks || (UInt32) (ptrheader - mCookie) > mCookieSize)
-        return err;
 
-    // all OK, back to the first theora packet
-    aheader = (CookieAtomHeader*) (mCookie + EndianU32_BtoN(atom->size));
-
     th_info_init(&glob->ti);
     th_comment_init(&tc);
     glob->ts = NULL;
 
-    op.b_o_s = 1;
-    op.e_o_s = 0;
-    op.granulepos = 0;
-    op.packetno = 0;
-    op.bytes = EndianU32_BtoN(aheader->size) - 2 * sizeof(long); // FIXME??
-    op.packet = aheader->data;
+    if (th_decode_headerin(&glob->ti, &tc, &glob->ts, &header) < 0) {
 
-    if (th_decode_headerin(&glob->ti, &tc, &glob->ts, &op) < 0) {
-
         if (glob->ts != NULL)
             th_setup_free (glob->ts);
         th_comment_clear(&tc);
@@ -154,18 +179,9 @@
         return err;
     }
 
-    op.b_o_s = 0;
+    th_decode_headerin(&glob->ti, &tc, &glob->ts, &header_tc);
+    th_decode_headerin(&glob->ti, &tc, &glob->ts, &header_cb);
 
-    while (i < 2) {
-        aheader = (CookieAtomHeader*) ((Byte*) (aheader) + EndianU32_BtoN(aheader->size));
-        op.packetno += 1;
-        op.bytes = EndianU32_BtoN(aheader->size) - 2 * sizeof(long); // FIXME??
-        op.packet = aheader->data;
-
-        th_decode_headerin(&glob->ti, &tc, &glob->ts, &op);
-        i++;
-    }
-
     err = noErr;
 
     th_comment_clear(&tc);
@@ -270,8 +286,8 @@
     OSTypePtr         formats = *glob->wantedDestinationPixelTypeH;
     OSErr             ret = noErr;
 
-    dbg_printf("--:Theora:- CodecPreflight(%08lx) called (seqid: %08lx, frN: %8ld, first: %d, data1: %02x, flags: %08lx, flags2: %08lx)\n",
-               (long)glob, p->sequenceID, p->frameNumber, (p->conditionFlags & codecConditionFirstFrame) != 1, p->bufferSize > 1 ? p->data[1] : 0,
+    dbg_printf("[TD  ]  >> [%08lx] :: CodecPreflight() called (seqid: %08lx, frN: %8ld, first: %d, data1: %02x, flags: %08lx, flags2: %08lx)\n",
+               (long) glob, p->sequenceID, p->frameNumber, (p->conditionFlags & codecConditionFirstFrame) != 1, p->bufferSize > 1 ? p->data[1] : 0,
                capabilities->flags, capabilities->flags2);
     dbg_printf("         :- image: %dx%d, pixform: %x\n", (**p->imageDescription).width, (**p->imageDescription).height, glob->ti.pixel_fmt);
 
@@ -294,6 +310,7 @@
         *formats++	= 0;
     }
 
+    dbg_printf("[TD  ] <   [%08lx] :: CodecPreflight() = %ld\n", (long) glob, ret);
     return ret;
 }
 
@@ -486,17 +503,17 @@
             th_decode_ycbcr_out(glob->td, ycbcrB);
             if (myDrp->pixelFormat == k422YpCbCr8PixelFormat) {
                 if (glob->ti.pixel_fmt == TH_PF_420) {
-                    err = CopyPlanarYCbCr420ToChunkyYUV422(myDrp->width, myDrp->height, ycbcrB, (UInt8 *)drp->baseAddr, drp->rowBytes);
+                    err = CopyPlanarYCbCr420ToChunkyYUV422(myDrp->width, myDrp->height, ycbcrB, (UInt8 *)drp->baseAddr, drp->rowBytes, glob->ti.pic_x, glob->ti.pic_y);
                 } else if (glob->ti.pixel_fmt == TH_PF_422) {
-                    err = CopyPlanarYCbCr422ToChunkyYUV422(myDrp->width, myDrp->height, ycbcrB, (UInt8 *)drp->baseAddr, drp->rowBytes);
+                    err = CopyPlanarYCbCr422ToChunkyYUV422(myDrp->width, myDrp->height, ycbcrB, (UInt8 *)drp->baseAddr, drp->rowBytes, glob->ti.pic_x, glob->ti.pic_y);
                 } else if (glob->ti.pixel_fmt == TH_PF_444) {
-                    err = CopyPlanarYCbCr444ToChunkyYUV422(myDrp->width, myDrp->height, ycbcrB, (UInt8 *)drp->baseAddr, drp->rowBytes);
+                    err = CopyPlanarYCbCr444ToChunkyYUV422(myDrp->width, myDrp->height, ycbcrB, (UInt8 *)drp->baseAddr, drp->rowBytes, glob->ti.pic_x, glob->ti.pic_y);
                 } else {
                     dbg_printf("--:Theora:-  'What PLANET is this!?' (%d)\n", glob->ti.pixel_fmt);
                     err = codecBadDataErr;
                 }
             } else if (myDrp->pixelFormat == kYUV420PixelFormat) {
-                err = CopyPlanarYCbCr422ToPlanarYUV422(ycbcrB, dataProc, (UInt8 *)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height);
+                err = CopyPlanarYCbCr422ToPlanarYUV422(ycbcrB, dataProc, (UInt8 *)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height, glob->ti.pic_x, glob->ti.pic_y);
             } else {
                 dbg_printf("--:Theora:-  'Again, What PLANET is this!?' (%lx)\n", myDrp->pixelFormat);
                 err = codecBadDataErr;
@@ -579,22 +596,27 @@
 #define PACK_2VUY(Cb, Y1, Cr, Y2) ((UInt32) ((Cb) | ((Y1) << 8) | ((Cr) << 16) | ((Y2) << 24)))
 #endif /* TARGET_RT_BIG_ENDIAN */
 
-OSStatus CopyPlanarYCbCr420ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy)
+OSStatus CopyPlanarYCbCr420ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy, size_t offset_x, size_t offset_y)
 {
     size_t x, y;
-    const UInt8 *lineBase_Y  = pb[0].data;
-    const UInt8 *lineBase_Cb = pb[1].data;
-    const UInt8 *lineBase_Cr = pb[2].data;
+    size_t off_x = offset_x & ~0x01, off_y = offset_y & ~0x01;
+    size_t off_x2 = offset_x >> 1, off_y2 = offset_y >> 1;
+    const UInt8 *lineBase_Y  = pb[0].data + off_y * pb[0].ystride + off_x;
+    const UInt8 *lineBase_Cb = pb[1].data + off_y2 * pb[1].ystride + off_x2;
+    const UInt8 *lineBase_Cr = pb[2].data + off_y2 * pb[2].ystride + off_x2;
     UInt8 *lineBase_2vuy = baseAddr_2vuy;
+    Boolean odd_rows = height & 0x01;
 
     dbg_printf("BLIT: Yw: %d, Yh: %d, Ys: %d;  w: %ld,  h: %ld; stride: %ld\n", pb[0].width, pb[0].height, pb[0].ystride, width, height, rowBytes_2vuy);
     dbg_printf("BLIT: Bw: %d, Bh: %d, Bs: %d; Rw: %d, Rh: %d;     Rs: %d\n", pb[1].width, pb[1].height, pb[1].ystride,
                pb[2].width, pb[2].height, pb[2].ystride);
 
+    height = height & ~0x01;
+
     for( y = 0; y < height; y += 2 ) {
         // Take two lines at a time.
         const UInt8 *pixelPtr_Y_top  = lineBase_Y;
-        const UInt8 *pixelPtr_Y_bot  = lineBase_Y  + pb[0].ystride;
+        const UInt8 *pixelPtr_Y_bot  = lineBase_Y + pb[0].ystride;
         const UInt8 *pixelPtr_Cb = lineBase_Cb;
         const UInt8 *pixelPtr_Cr = lineBase_Cr;
         UInt8 *pixelPtr_2vuy_top = lineBase_2vuy;
@@ -614,21 +636,40 @@
         lineBase_Cr += pb[2].ystride;
         lineBase_2vuy += 2 * rowBytes_2vuy;
     }
+
+    if (odd_rows) {
+        // The last, odd row.
+        const UInt8 *pixelPtr_Y_top  = lineBase_Y;
+        const UInt8 *pixelPtr_Cb = lineBase_Cb;
+        const UInt8 *pixelPtr_Cr = lineBase_Cr;
+        UInt8 *pixelPtr_2vuy_top = lineBase_2vuy;
+        for (x = 0; x < width; x += 2) {
+            *((UInt32 *) pixelPtr_2vuy_top) = PACK_2VUY(*pixelPtr_Cb++, *pixelPtr_Y_top, *pixelPtr_Cr++, *(pixelPtr_Y_top + 1));
+            pixelPtr_2vuy_top += 4;
+            pixelPtr_Y_top += 2;
+        }
+    }
+
     return noErr;
 }
 
-OSStatus CopyPlanarYCbCr422ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy)
+OSStatus CopyPlanarYCbCr422ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy, size_t offset_x, size_t offset_y)
 {
     size_t x, y;
-    const UInt8 *lineBase_Y  = pb[0].data;
-    const UInt8 *lineBase_Cb = pb[1].data;
-    const UInt8 *lineBase_Cr = pb[2].data;
+    size_t off_x = offset_x & ~0x01, off_y = offset_y & ~0x01;
+    size_t off_x2 = offset_x >> 1;
+    const UInt8 *lineBase_Y  = pb[0].data + off_y * pb[0].ystride + off_x;
+    const UInt8 *lineBase_Cb = pb[1].data + off_y * pb[1].ystride + off_x2;
+    const UInt8 *lineBase_Cr = pb[2].data + off_y * pb[2].ystride + off_x2;
     UInt8 *lineBase_2vuy = baseAddr_2vuy;
+    Boolean odd_rows = height & 0x01;
 
     dbg_printf("BLIT> Yw: %d, Yh: %d, Ys: %d;  w: %ld,  h: %ld; stride: %ld\n", pb[0].width, pb[0].height, pb[0].ystride, width, height, rowBytes_2vuy);
     dbg_printf("BLIT> Bw: %d, Bh: %d, Bs: %d; Rw: %d, Rh: %d;     Rs: %d\n", pb[1].width, pb[1].height, pb[1].ystride,
                pb[2].width, pb[2].height, pb[2].ystride);
 
+    height = height & ~0x01;
+
     for( y = 0; y < height; y += 2 ) {
         // Take two lines at a time.
         const UInt8 *pixelPtr_Y_top  = lineBase_Y;
@@ -656,24 +697,42 @@
         lineBase_Cr += 2 * pb[2].ystride;
         lineBase_2vuy += 2 * rowBytes_2vuy;
     }
+
+    if (odd_rows) {
+        // The last, odd row.
+        const UInt8 *pixelPtr_Y_top  = lineBase_Y;
+        const UInt8 *pixelPtr_Cb_top = lineBase_Cb;
+        const UInt8 *pixelPtr_Cr_top = lineBase_Cr;
+        UInt8 *pixelPtr_2vuy_top = lineBase_2vuy;
+        for (x = 0; x < width; x += 2) {
+            *((UInt32 *) pixelPtr_2vuy_top) = PACK_2VUY(*pixelPtr_Cb_top++, *pixelPtr_Y_top, *pixelPtr_Cr_top++, *(pixelPtr_Y_top + 1));
+            pixelPtr_2vuy_top += 4;
+            pixelPtr_Y_top += 2;
+        }
+    }
+
     return noErr;
 }
 
 
 /* !!: At the moment this function does nice 'decimation' rather than subsampling!!(?)
    TODO: proper subsampling? */
-OSStatus CopyPlanarYCbCr444ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy)
+OSStatus CopyPlanarYCbCr444ToChunkyYUV422(size_t width, size_t height, th_ycbcr_buffer pb, UInt8 *baseAddr_2vuy, long rowBytes_2vuy, size_t offset_x, size_t offset_y)
 {
     size_t x, y;
-    const UInt8 *lineBase_Y  = pb[0].data;
-    const UInt8 *lineBase_Cb = pb[1].data;
-    const UInt8 *lineBase_Cr = pb[2].data;
+    size_t off_x = offset_x & ~0x01, off_y = offset_y & ~0x01;
+    const UInt8 *lineBase_Y  = pb[0].data + off_y * pb[0].ystride + off_x;
+    const UInt8 *lineBase_Cb = pb[1].data + off_y * pb[1].ystride + off_x;
+    const UInt8 *lineBase_Cr = pb[2].data + off_y * pb[2].ystride + off_x;
     UInt8 *lineBase_2vuy = baseAddr_2vuy;
+    Boolean odd_rows = height & 0x01;
 
     dbg_printf("BLIT? Yw: %d, Yh: %d, Ys: %d;  w: %ld,  h: %ld; stride: %ld\n", pb[0].width, pb[0].height, pb[0].ystride, width, height, rowBytes_2vuy);
     dbg_printf("BLIT? Bw: %d, Bh: %d, Bs: %d; Rw: %d, Rh: %d;     Rs: %d\n", pb[1].width, pb[1].height, pb[1].ystride,
                pb[2].width, pb[2].height, pb[2].ystride);
 
+    height = height & ~0x01;
+
     for( y = 0; y < height; y += 2 ) {
         // Take two lines at a time.
         const UInt8 *pixelPtr_Y_top  = lineBase_Y;
@@ -703,18 +762,37 @@
         lineBase_Cr += 2 * pb[2].ystride;
         lineBase_2vuy += 2 * rowBytes_2vuy;
     }
+
+    if (odd_rows) {
+        // The last, odd row.
+        const UInt8 *pixelPtr_Y_top  = lineBase_Y;
+        const UInt8 *pixelPtr_Cb_top = lineBase_Cb;
+        const UInt8 *pixelPtr_Cr_top = lineBase_Cr;
+        UInt8 *pixelPtr_2vuy_top = lineBase_2vuy;
+        for (x = 0; x < width; x += 2) {
+            *((UInt32 *) pixelPtr_2vuy_top) = PACK_2VUY(*pixelPtr_Cb_top, *pixelPtr_Y_top, *pixelPtr_Cr_top, *(pixelPtr_Y_top + 1));
+            pixelPtr_2vuy_top += 4;
+            pixelPtr_Y_top += 2;
+            pixelPtr_Cb_top += 2;
+            pixelPtr_Cr_top += 2;
+        }
+    }
+
     return noErr;
 }
 
 /* Presently, This function assumes YCbCr 4:2:0 as input.
    TODO: take into account different subsampling types? */
-OSErr CopyPlanarYCbCr422ToPlanarYUV422(th_ycbcr_buffer ycbcr, ICMDataProcRecordPtr dataProc, UInt8 *baseAddr, long stride, long width, long height)
+OSErr CopyPlanarYCbCr422ToPlanarYUV422(th_ycbcr_buffer ycbcr, ICMDataProcRecordPtr dataProc, UInt8 *baseAddr, long stride, long width, long height,
+                                       size_t offset_x, size_t offset_y)
 {
     OSErr err = noErr;
     UInt8 *endOfScanLine, *dst_base, *src_base;
     PlanarPixmapInfoYUV420 *pinfo = (PlanarPixmapInfoYUV420 *) baseAddr;
     UInt32 lines;
     SInt32 dst_stride, src_stride;
+    size_t off_x = offset_x & ~0x01, off_y = offset_y & ~0x01;
+    size_t off_x2 = offset_x >> 1;
     endOfScanLine = baseAddr + (width * 4);
 
     dbg_printf("BLIT= yw: %d, yh: %d, ys: %d; w: %ld, h: %ld; stride: %ld\n", ycbcr[0].width, ycbcr[0].height, ycbcr[0].ystride, width, height, stride);
@@ -724,7 +802,7 @@
     lines = height;
     dst_base = baseAddr + pinfo->componentInfoY.offset;
     dst_stride = pinfo->componentInfoY.rowBytes;
-    src_base = ycbcr[0].data;
+    src_base = ycbcr[0].data + off_y * ycbcr[0].ystride + off_x;
     src_stride = ycbcr[0].ystride;
     while (lines-- > 0) {
         BlockMoveData(src_base, dst_base, width);
@@ -735,7 +813,7 @@
     lines = height / 2;
     dst_base = baseAddr + pinfo->componentInfoCb.offset;
     dst_stride = pinfo->componentInfoCb.rowBytes;
-    src_base = ycbcr[1].data;
+    src_base = ycbcr[1].data + off_y * ycbcr[1].ystride + off_x2;
     src_stride = ycbcr[1].ystride;
     while (lines-- > 0) {
         BlockMoveData(src_base, dst_base, width);
@@ -746,7 +824,7 @@
     lines = height / 2;
     dst_base = baseAddr + pinfo->componentInfoCr.offset;
     dst_stride = pinfo->componentInfoCr.rowBytes;
-    src_base = ycbcr[2].data;
+    src_base = ycbcr[2].data + off_y * ycbcr[2].ystride + off_x2;;
     src_stride = ycbcr[2].ystride;
     while (lines-- > 0) {
         BlockMoveData(src_base, dst_base, width);

Modified: trunk/xiph-qt/Theora/src/TheoraDecoder.r
===================================================================
--- trunk/xiph-qt/Theora/src/TheoraDecoder.r	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/TheoraDecoder.r	2007-01-18 13:45:42 UTC (rev 12346)
@@ -71,8 +71,10 @@
   #else
     #define Target_PlatformType       platformPowerPCNativeEntryPoint
   #endif
+  #define theoraThreadSafe cmpThreadSafe
 #elif TARGET_OS_WIN32
   #define Target_PlatformType platformWin32
+  #define theoraThreadSafe 0
 #else
   #error get a real platform type
 #endif /* TARGET_OS_MAC */
@@ -83,6 +85,7 @@
 
 
 #define kTheoraDecoderFlags (codecInfoDoes32 | codecInfoDoesTemporal | codecInfoDoesSpool)
+//#define kTheoraEncoderFlags (codecInfoDoes32 | codecInfoDoesTemporal | codecInfoDoesRateConstrain | theoraThreadSafe)
 
 #define kTheoraFormatFlags	(codecInfoDepth24)
 
@@ -94,9 +97,9 @@
 	kTheoraDecoderFlags, // Decompression Flags
 	0, // Compression Flags
 	kTheoraFormatFlags, // Format Flags
-	128, // Compression Accuracy
+            0, //128, // Compression Accuracy
 	128, // Decomression Accuracy
-	128, // Compression Speed
+            0, //128, // Compression Speed
 	128, // Decompression Speed
 	128, // Compression Level
 	0, // Reserved

Added: trunk/xiph-qt/Theora/src/TheoraEncoder.c
===================================================================
--- trunk/xiph-qt/Theora/src/TheoraEncoder.c	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/TheoraEncoder.c	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,972 @@
+/*
+ *  TheoraEncoder.c
+ *
+ *    Theora video encoder (ImageCodec) implementation.
+ *
+ *
+ *  Copyright (c) 2006  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$
+ *
+ */
+
+/*
+ *  The implementation in this file is based on the 'ElectricImageCodec' and
+ *  the 'ExampleIPBCodec' example QuickTime components.
+ */
+
+
+#if defined(__APPLE_CC__)
+#include <Carbon/Carbon.h>
+#include <QuickTime/QuickTime.h>
+#else
+#include <ConditionalMacros.h>
+#include <Endian.h>
+#include <QuickTimeComponents.h>
+#include <ImageCodec.h>
+#endif /* __APPLE_CC__ */
+
+#include "encoder_types.h"
+#include "theora_versions.h"
+
+#include "data_types.h"
+#include "TheoraEncoder.h"
+#include "debug.h"
+
+#if !TARGET_OS_MAC
+#undef pascal
+#define pascal
+#endif
+
+// Setup required for ComponentDispatchHelper.c
+#define IMAGECODEC_BASENAME()       Theora_ImageEncoder
+#define IMAGECODEC_GLOBALS() 	    TheoraGlobalsPtr storage
+
+#define CALLCOMPONENT_BASENAME()    IMAGECODEC_BASENAME()
+#define	CALLCOMPONENT_GLOBALS()	    IMAGECODEC_GLOBALS()
+
+#define COMPONENT_UPP_PREFIX()	    uppImageCodec
+#define COMPONENT_DISPATCH_FILE	    "TheoraEncoderDispatch.h"
+#define COMPONENT_SELECT_PREFIX()   kImageCodec
+
+
+#if defined(__APPLE_CC__)
+#include <CoreServices/Components.k.h>
+#include <QuickTime/ImageCodec.k.h>
+#include <QuickTime/ImageCompression.k.h>
+#include <QuickTime/ComponentDispatchHelper.c>
+#else
+#include <Components.k.h>
+#include <ImageCodec.k.h>
+#include <ImageCompression.k.h>
+#include <ComponentDispatchHelper.c>
+#endif /* __APPLE_CC__ */
+
+
+ComponentResult
+yuv_copy__422_to_420(void *b_2vuy, SInt32 b_2vuy_stride, size_t width, size_t height,
+                     size_t offset_x, size_t offset_y, yuv_buffer *dst);
+ComponentResult
+vuy_copy__422_to_420(void *b_2vuy, SInt32 b_2vuy_stride, size_t width, size_t height,
+                     size_t offset_x, size_t offset_y, yuv_buffer *dst);
+ComponentResult create_pb_attribs(SInt32 width, SInt32 height, const OSType *pixelFormatList,
+                                  int pixelFormatCount, CFMutableDictionaryRef *pixelBufferAttributesOut);
+
+
+ComponentResult
+Theora_ImageEncoderOpen(TheoraGlobalsPtr globals, ComponentInstance self)
+{
+    ComponentResult err = noErr;
+    dbg_printf("\n[  TE]  >> [%08lx] :: Open()\n", (UInt32) globals);
+
+    globals = (TheoraGlobalsPtr) calloc(1, sizeof(TheoraGlobals));
+    if (!globals)
+        err = memFullErr;
+
+    if (!err) {
+        SetComponentInstanceStorage(self, (Handle) globals);
+
+        globals->self = self;
+        globals->target = self;
+
+        globals->yuv_buffer_size = 0;
+        globals->yuv_buffer = NULL;
+
+        globals->set_quality = codecNormalQuality;
+        globals->set_fps_numer = 0;
+        globals->set_fps_denom = 0;
+        globals->set_bitrate = 0;
+        globals->set_keyrate = 64;
+
+        globals->set_sharp = 2;
+        globals->set_quick = 1;
+    }
+
+    dbg_printf("[  TE] <   [%08lx] :: Open() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderClose(TheoraGlobalsPtr globals, ComponentInstance self)
+{
+    ComponentResult err = noErr;
+    dbg_printf("[  TE]  >> [%08lx] :: Close()\n", (UInt32) globals);
+
+    if (globals) {
+
+        if (globals->yuv_buffer)
+            free(globals->yuv_buffer);
+
+        free(globals);
+        globals = NULL;
+    }
+
+    dbg_printf("[  TE] <   [%08lx] :: Close() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
+ComponentResult Theora_ImageEncoderVersion(TheoraGlobalsPtr globals)
+{
+#pragma unused(globals)
+    return kTheora_imco_Version;
+}
+
+ComponentResult
+Theora_ImageEncoderTarget(TheoraGlobalsPtr globals, ComponentInstance target)
+{
+    globals->target = target;
+    return noErr;
+}
+
+ComponentResult
+Theora_ImageEncoderGetCodecInfo(TheoraGlobalsPtr globals, CodecInfo *info)
+{
+    ComponentResult err = noErr;
+    dbg_printf("[  TE]  >> [%08lx] :: GetCodecInfo()\n", (UInt32) globals);
+
+    if (info == NULL) {
+        err = paramErr;
+    } else {
+        CodecInfo **tempCodecInfo;
+
+        err = GetComponentResource((Component) globals->self,
+                                   codecInfoResourceType, kTheoraEncoderResID,
+                                   (Handle *) &tempCodecInfo);
+        if (!err) {
+            *info = **tempCodecInfo;
+            DisposeHandle((Handle) tempCodecInfo);
+        }
+    }
+
+    dbg_printf("[  TE] <   [%08lx] :: GetCodecInfo() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderGetMaxCompressionSize(TheoraGlobalsPtr globals,
+                                         PixMapHandle src, const Rect *srcRect,
+                                         short depth, CodecQ quality,
+                                         long *size)
+{
+    ComponentResult err = noErr;
+    dbg_printf("[  TE]  >> [%08lx] :: GetMaxCompressionSize()\n", (UInt32) globals);
+
+    if (!size) {
+        err = paramErr;
+    } else {
+        *size = (((srcRect->right - srcRect->left) + 0x0f) & ~0x0f) *
+            (((srcRect->bottom - srcRect->top) + 0x0f) & ~0x0f) *
+            3; // ?!?
+    }
+
+    dbg_printf("[  TE] <   [%08lx] :: GetMaxCompressionSize() = %ld [%ld]\n", (UInt32) globals, err, *size);
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderRequestSettings(TheoraGlobalsPtr globals, Handle settings,
+                                   Rect *rp, ModalFilterUPP filterProc)
+{
+    ComponentResult err = noErr;
+
+    dbg_printf("[  TE]  >> [%08lx] :: RequestSettings()\n", (UInt32) globals);
+
+    err = badComponentSelector;
+
+    dbg_printf("[  TE] <   [%08lx] :: RequestSettings() = %ld\n", (UInt32) globals, err);
+
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderGetSettings(TheoraGlobalsPtr globals, Handle settings)
+{
+    ComponentResult err = noErr;
+
+    dbg_printf("[  TE]  >> [%08lx] :: GetSettings()\n", (UInt32) globals);
+
+    if (!settings) {
+        err = paramErr;
+    } else {
+        SetHandleSize(settings, 8);
+        ((UInt32 *) *settings)[0] = 'XiTh';
+        ((UInt16 *) *settings)[2] = globals->set_sharp;
+        ((UInt16 *) *settings)[3] = globals->set_quick;
+    }
+
+    dbg_printf("[  TE] <   [%08lx] :: GetSettings() = %ld\n", (UInt32) globals, err);
+
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderSetSettings(TheoraGlobalsPtr globals, Handle settings)
+{
+    ComponentResult err = noErr;
+
+    dbg_printf("[  TE]  >> [%08lx] :: SetSettings() %ld\n", (UInt32) globals, GetHandleSize(settings));
+
+    if (!settings || GetHandleSize(settings) == 0) {
+        globals->set_sharp = 2;
+        globals->set_quick = 1;
+    } else if (GetHandleSize(settings) == 8 && ((UInt32 *) *settings)[0] == 'XiTh') {
+        globals->set_sharp = ((UInt16 *) *settings)[2];
+        globals->set_quick = ((UInt16 *) *settings)[3];
+
+        if (globals->set_sharp > 2)
+            globals->set_sharp = 2;
+        if (globals->set_quick > 1)
+            globals->set_quick = 1;
+    } else {
+        err = paramErr;
+    }
+
+    dbg_printf("[  TE] <   [%08lx] :: SetSettings() = %ld\n", (UInt32) globals, err);
+
+    return err;
+}
+
+
+ComponentResult
+Theora_ImageEncoderPrepareToCompressFrames(TheoraGlobalsPtr globals,
+                                           ICMCompressorSessionRef session,
+                                           ICMCompressionSessionOptionsRef sessionOptions,
+                                           ImageDescriptionHandle imageDescription,
+                                           void *reserved,
+                                           CFDictionaryRef *compressorPixelBufferAttributesOut)
+{
+    ComponentResult err = noErr;
+    dbg_printf("[  TE]  >> [%08lx] :: PrepareToCompressFrames()\n", (UInt32) globals);
+
+    CFMutableDictionaryRef compressorPixelBufferAttributes = NULL;
+    //OSType pixelFormatList[] = { k422YpCbCr8PixelFormat,    /* '2vuy' */
+    //                             kComponentVideoUnsigned }; /* 'yuvs' */
+    OSType pixelFormatList[] = { k422YpCbCr8PixelFormat };    /* '2vuy' */
+    Fixed gammaLevel;
+    //int frameIndex;
+    SInt32 widthRoundedUp, heightRoundedUp;
+    UInt32 buffer_size_needed;
+    int result;
+
+    Fixed cs_fps = 0;
+    CodecQ cs_quality = 0;
+    SInt32 cs_bitrate = 0;
+    SInt32 cs_keyrate = 0;
+
+    // Record the compressor session for later calls to the ICM.
+    // Note: this is NOT a CF type and should NOT be CFRetained or CFReleased.
+    globals->session = session;
+
+    // Retain the session options for later use.
+    ICMCompressionSessionOptionsRelease(globals->sessionOptions);
+    globals->sessionOptions = sessionOptions;
+    ICMCompressionSessionOptionsRetain(globals->sessionOptions);
+
+    if (globals->sessionOptions) {
+        UInt64 _frames = 0;
+
+        err = ICMCompressionSessionOptionsGetProperty(globals->sessionOptions,
+                                                      kQTPropertyClass_ICMCompressionSessionOptions,
+                                                      kICMCompressionSessionOptionsPropertyID_ExpectedFrameRate,
+                                                      sizeof(cs_fps), &cs_fps, NULL);
+        dbg_printf("[  TE] fps [%08lx] :: PrepareToCompressFrames() = %ld, %f\n", (UInt32) globals, err, cs_fps / 65536.0f);
+
+        if (!err && cs_fps > 0.0) {
+            err = ICMCompressionSessionOptionsGetProperty(globals->sessionOptions,
+                                                          kQTPropertyClass_ICMCompressionSessionOptions,
+                                                          kICMCompressionSessionOptionsPropertyID_AverageDataRate,
+                                                          sizeof(cs_bitrate), &cs_bitrate, NULL);
+            dbg_printf("[  TE]  br [%08lx] :: PrepareToCompressFrames() = %ld, %ld\n", (UInt32) globals, err, cs_bitrate);
+            //cs_bitrate = 0;
+        }
+
+        if (cs_bitrate == 0) {
+            err = ICMCompressionSessionOptionsGetProperty(globals->sessionOptions,
+                                                          kQTPropertyClass_ICMCompressionSessionOptions,
+                                                          kICMCompressionSessionOptionsPropertyID_Quality,
+                                                          sizeof(cs_quality), &cs_quality, NULL);
+            dbg_printf("[  TE]  qu [%08lx] :: PrepareToCompressFrames() = %ld, %ld\n", (UInt32) globals, err, cs_quality);
+            if (!err && cs_quality == 0)
+                cs_quality = 1;
+        }
+
+        err = ICMCompressionSessionOptionsGetProperty(globals->sessionOptions,
+                                                      kQTPropertyClass_ICMCompressionSessionOptions,
+                                                      kICMCompressionSessionOptionsPropertyID_MaxKeyFrameInterval,
+                                                      sizeof(cs_keyrate), &cs_keyrate, NULL);
+        dbg_printf("[  TE]  kr [%08lx] :: PrepareToCompressFrames() = %ld, %ld\n", (UInt32) globals, err, cs_keyrate);
+        if (err)
+            cs_keyrate = 0;
+        else if (cs_keyrate > 32768)
+            cs_keyrate = 32768;
+
+        err = ICMCompressionSessionOptionsGetProperty(globals->sessionOptions,
+                                                      kQTPropertyClass_ICMCompressionSessionOptions,
+                                                      kICMCompressionSessionOptionsPropertyID_SourceFrameCount,
+                                                      sizeof(_frames), &_frames, NULL);
+        dbg_printf("[  TE]  f# [%08lx] :: PrepareToCompressFrames() = %ld, %lld\n", (UInt32) globals, err, _frames);
+
+        err = noErr;
+    }
+
+    // Modify imageDescription here if needed.
+    gammaLevel = kQTCCIR601VideoGammaLevel;
+    //gammaLevel = kQTUseSourceGammaLevel;
+    err = ICMImageDescriptionSetProperty(imageDescription,
+                                         kQTPropertyClass_ImageDescription,
+                                         kICMImageDescriptionPropertyID_GammaLevel,
+                                         sizeof(gammaLevel),
+                                         &gammaLevel);
+    if (err)
+        goto bail;
+
+    // Record the dimensions from the image description.
+    globals->width = (*imageDescription)->width;
+    globals->height = (*imageDescription)->height;
+
+    // Create a pixel buffer attributes dictionary.
+    err = create_pb_attribs(globals->width, globals->height,
+                            pixelFormatList, sizeof(pixelFormatList) / sizeof(OSType),
+                            &compressorPixelBufferAttributes);
+    if (err)
+        goto bail;
+
+    *compressorPixelBufferAttributesOut = compressorPixelBufferAttributes;
+    compressorPixelBufferAttributes = NULL;
+
+    globals->maxEncodedDataSize = globals->width * globals->height * 3;
+
+    globals->keyFrameCountDown = ICMCompressionSessionOptionsGetMaxKeyFrameInterval( globals->sessionOptions );
+
+    widthRoundedUp = (globals->width + 0x0f) & ~0x0f;
+    heightRoundedUp = (globals->height + 0x0f) & ~0x0f;
+
+    theora_info_init(&globals->ti);
+    globals->ti.width = widthRoundedUp;
+    globals->ti.height = heightRoundedUp;
+    globals->ti.frame_width = globals->width;
+    globals->ti.frame_height = globals->height;
+    globals->ti.offset_x = ((widthRoundedUp - globals->width) / 2) & ~0x01;
+    globals->ti.offset_y = ((heightRoundedUp - globals->height) / 2) & ~0x01;
+    if (cs_fps != 0) {
+        globals->ti.fps_numerator = cs_fps;
+        globals->ti.fps_denominator = 0x010000;
+    } else {
+        globals->ti.fps_numerator = 1;
+        globals->ti.fps_denominator = 1;
+    }
+    globals->ti.aspect_numerator = 1;
+    globals->ti.aspect_denominator = 1;
+    globals->ti.colorspace = OC_CS_UNSPECIFIED;
+    globals->ti.pixelformat = OC_PF_420;
+    if (cs_bitrate != 0) {
+        globals->ti.target_bitrate = cs_bitrate * 8;
+    } else {
+        globals->ti.target_bitrate = 0;
+    }
+    if (cs_quality != 0) {
+        globals->ti.quality = 64 * cs_quality / codecLosslessQuality;
+    } else if (cs_bitrate == 0) {
+        globals->ti.quality = 32; /* medium quality */
+    } else {
+        globals->ti.quality = 0;
+    }
+
+    globals->ti.quick_p = globals->set_quick;
+    globals->ti.sharpness = globals->set_sharp;
+
+    globals->ti.dropframes_p = 0;
+    globals->ti.keyframe_auto_p = 1;
+    if (cs_keyrate == 0) {
+        globals->ti.keyframe_frequency = 64;
+        globals->ti.keyframe_frequency_force = 64;
+        globals->ti.keyframe_mindistance = 8;
+    } else {
+        globals->ti.keyframe_frequency = cs_keyrate;
+        globals->ti.keyframe_frequency_force = cs_keyrate;
+        globals->ti.keyframe_mindistance = 8;
+        if (globals->ti.keyframe_mindistance > cs_keyrate)
+            globals->ti.keyframe_mindistance = cs_keyrate;
+    }
+    globals->ti.keyframe_data_target_bitrate = globals->ti.target_bitrate * 1.5;
+    globals->ti.keyframe_auto_threshold = 80;
+    globals->ti.noise_sensitivity = 1;
+
+    result = theora_encode_init(&globals->ts, &globals->ti);
+    dbg_printf("[  TE]   i [%08lx] :: PrepareToCompressFrames() = %ld\n", (UInt32) globals, result);
+    //theora_info_clear(ti);
+
+    buffer_size_needed = globals->ti.width * globals->ti.height * 3 / 2;
+
+    if (globals->yuv_buffer) {
+        if (globals->yuv_buffer_size < buffer_size_needed) {
+            globals->yuv_buffer = realloc(globals->yuv_buffer, buffer_size_needed);
+            globals->yuv_buffer_size = buffer_size_needed;
+        }
+    } else {
+        globals->yuv_buffer_size = buffer_size_needed;
+        globals->yuv_buffer = malloc(buffer_size_needed);
+    }
+
+    globals->yuv.y_width = globals->ti.width;
+    globals->yuv.y_height = globals->ti.height;
+    globals->yuv.y_stride = globals->ti.width;
+
+    globals->yuv.uv_width = globals->ti.width / 2;
+    globals->yuv.uv_height = globals->ti.height / 2;
+    globals->yuv.uv_stride = globals->ti.width / 2;
+
+    globals->yuv.y = &globals->yuv_buffer[0];
+    globals->yuv.u = &globals->yuv_buffer[0] + globals->ti.width * globals->ti.height;
+    globals->yuv.v = &globals->yuv_buffer[0] + globals->ti.width * globals->ti.height * 5/4;
+
+
+
+    if (err)
+        goto bail;
+
+    {
+        ogg_packet header, header_tc, header_cb;
+        //UInt32 cookie_size;
+        UInt8 *cookie;
+        UInt32 *qtatom;
+        Handle cookie_handle;
+        UInt32 atomhead[2];
+
+        theora_encode_header(&globals->ts, &header);
+        theora_comment_init(&globals->tc);
+
+        cookie_handle = NewHandleClear(2 * sizeof(UInt32));
+        cookie = (UInt8 *) *cookie_handle;
+
+        qtatom = (UInt32 *) cookie;
+        *qtatom++ = EndianU32_NtoB(header.bytes + 2 * sizeof(UInt32));
+        *qtatom = EndianU32_NtoB(kCookieTypeTheoraHeader);
+        PtrAndHand(header.packet, cookie_handle, header.bytes);
+
+        theora_encode_comment(&globals->tc, &header_tc);
+        atomhead[0] = EndianU32_NtoB(header_tc.bytes + 2 * sizeof(UInt32));
+        atomhead[1] = EndianU32_NtoB(kCookieTypeTheoraComments);
+        PtrAndHand(atomhead, cookie_handle, sizeof(atomhead));
+        PtrAndHand(header_tc.packet, cookie_handle, header_tc.bytes);
+
+        theora_encode_tables(&globals->ts, &header_cb);
+        atomhead[0] = EndianU32_NtoB(header_cb.bytes + 2 * sizeof(UInt32));
+        atomhead[1] = EndianU32_NtoB(kCookieTypeTheoraCodebooks);
+        PtrAndHand(atomhead, cookie_handle, sizeof(atomhead));
+        PtrAndHand(header_cb.packet, cookie_handle, header_cb.bytes);
+
+        atomhead[0] = EndianU32_NtoB(2 * sizeof(UInt32));
+        atomhead[1] = EndianU32_NtoB(kAudioTerminatorAtomType);
+        PtrAndHand(atomhead, cookie_handle, sizeof(atomhead));
+
+        err = AddImageDescriptionExtension(imageDescription, cookie_handle, kSampleDescriptionExtensionTheora);
+        DisposeHandle(cookie_handle);
+        free(header_tc.packet);
+    }
+
+ bail:
+    if (compressorPixelBufferAttributes)
+        CFRelease(compressorPixelBufferAttributes);
+
+    
+    dbg_printf("[  TE] <   [%08lx] :: PrepareToCompressFrames() = %ld [fps: %f, q: 0x%04lx, kr: %ld, br: %ld, #: %d, O: %d]\n",
+               (UInt32) globals, err, cs_fps / 65536.0, cs_quality, cs_keyrate, cs_bitrate, globals->set_sharp, !globals->set_quick);
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderEncodeFrame(TheoraGlobalsPtr globals,
+                               ICMCompressorSourceFrameRef sourceFrame,
+                               UInt32 flags)
+{
+    ComponentResult err = noErr;
+    ICMCompressionFrameOptionsRef frameOptions;
+    ICMMutableEncodedFrameRef encodedFrame = NULL;
+    UInt8 *dataPtr = NULL;
+    CVPixelBufferRef sourcePixelBuffer = NULL;
+    ogg_packet op;
+    MediaSampleFlags mediaSampleFlags;
+    ICMFrameType frameType;
+    int result;
+
+
+    dbg_printf("[  TE]  >> [%08lx] :: EncodeFrame()\n", (UInt32) globals);
+
+    /* 1. copy pixels to a theora's yuv_buffer
+     * 2. theora_encode_YUVin()
+     * 3. theora_encode_packetout()
+     * 4. copy the packet's body back to QT's encodedBuffer */
+
+    memset(&op, 0, sizeof(op));
+
+    // Create the buffer for the encoded frame.
+    err = ICMEncodedFrameCreateMutable(globals->session, sourceFrame, globals->maxEncodedDataSize, &encodedFrame);
+    dbg_printf("[  TE]   ? [%08lx] :: EncodeFrame() = %ld [%ld]\n", (UInt32) globals, err, globals->maxEncodedDataSize);
+    if (err)
+        goto bail;
+
+    dataPtr = ICMEncodedFrameGetDataPtr(encodedFrame);
+
+    // Transfer the source frame into glob->currentFrame, converting it from chunky YUV422 to planar YUV420.
+    sourcePixelBuffer = ICMCompressorSourceFrameGetPixelBuffer(sourceFrame);
+    CVPixelBufferLockBaseAddress(sourcePixelBuffer, 0);
+    err = yuv_copy__422_to_420(CVPixelBufferGetBaseAddress(sourcePixelBuffer),
+                               CVPixelBufferGetBytesPerRow(sourcePixelBuffer),
+                               globals->width, globals->height,
+                               globals->ti.offset_x, globals->ti.offset_y,
+                               &globals->yuv);
+    CVPixelBufferUnlockBaseAddress( sourcePixelBuffer, 0 );
+    //dbg_printf("[  TE]  >  [%08lx] :: EncodeFrame() = %ld\n", (UInt32) globals, err);
+    if (err)
+        goto bail;
+
+    result = theora_encode_YUVin(&globals->ts, &globals->yuv);
+    //dbg_printf("[  TE]  Y> [%08lx] :: EncodeFrame() = %d\n", (UInt32) globals, result);
+
+    result = theora_encode_packetout(&globals->ts, 0, &op);
+    //dbg_printf("[  TE]  T< [%08lx] :: EncodeFrame() = %d\n", (UInt32) globals, result);
+
+
+    /* The first byte in the returned encoded frame packet is left
+       empty, the actuall data starting at position 1 and the size
+       reported is increased by one to compensate for the
+       pre-padding. This is because QT doesn't allow zero-size
+       packets. See also TheoraDecoder.c, Theora_ImageCodecBeginBand()
+       function. */
+    memcpy(dataPtr + 1, op.packet, op.bytes);
+
+    err = ICMEncodedFrameSetDataSize(encodedFrame, op.bytes + 1);
+    dbg_printf("[  TE]  =  [%08lx] :: EncodeFrame() = %ld [%ld (%ld)]\n", (UInt32) globals, err, op.bytes, op.bytes + 1);
+    if (err)
+        goto bail;
+
+    mediaSampleFlags = 0;
+
+    if (!theora_packet_iskeyframe(&op)) {
+        mediaSampleFlags |= mediaSampleNotSync;
+        frameType = kICMFrameType_P;
+    } else {
+        mediaSampleFlags |= mediaSampleDoesNotDependOnOthers;
+        frameType = kICMFrameType_I;
+    }
+
+    err = ICMEncodedFrameSetMediaSampleFlags(encodedFrame, mediaSampleFlags);
+    //dbg_printf("[  TE]  .  [%08lx] :: EncodeFrame() = %ld\n", (UInt32) globals, err);
+    if (err)
+        goto bail;
+
+    err = ICMEncodedFrameSetFrameType(encodedFrame, frameType);
+    //dbg_printf("[  TE]  *  [%08lx] :: EncodeFrame() = %ld\n", (UInt32) globals, err);
+    if (err)
+        goto bail;
+
+    // Output the encoded frame.
+    err = ICMCompressorSessionEmitEncodedFrame(globals->session, encodedFrame, 1, &sourceFrame);
+    //dbg_printf("[  TE] ->  [%08lx] :: EncodeFrame() = %ld\n", (UInt32) globals, err);
+    if (err)
+        goto bail;
+
+bail:
+    // Since we created this, we must also release it.
+    ICMEncodedFrameRelease(encodedFrame);
+
+    dbg_printf("[  TE] <   [%08lx] :: EncodeFrame() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderCompleteFrame(TheoraGlobalsPtr globals,
+                                 ICMCompressorSourceFrameRef sourceFrame,
+                                 UInt32 flags )
+{
+    ComponentResult err = noErr;
+    dbg_printf("[  TE]  >> [%08lx] :: CompleteFrame()\n", (UInt32) globals);
+
+    dbg_printf("[  TE] <   [%08lx] :: CompleteFrame() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
+/* ========================================================================= */
+
+ComponentResult
+Theora_ImageEncoderGetDITLForSize(TheoraGlobalsPtr globals,
+                                  Handle *ditl,
+                                  Point *requestedSize)
+{
+    ComponentResult err = noErr;
+    Handle h = NULL;
+
+    dbg_printf("[  TE]  >> [%08lx] :: GetDITLForSize()\n", (UInt32) globals);
+
+    switch (requestedSize->h) {
+    case kSGSmallestDITLSize:
+        GetComponentResource((Component) globals->self, FOUR_CHAR_CODE('DITL'),
+                             kTheoraEncoderDITLResID, &h);
+        if (h != NULL)
+            *ditl = h;
+        else
+            err = resNotFound;
+        break;
+    default:
+        err = badComponentSelector;
+        break;
+    }
+
+    dbg_printf("[  TE] <   [%08lx] :: GetDITLForSize() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
+#define kItemSharp 1
+#define kItemSlow  2
+
+ComponentResult
+Theora_ImageEncoderDITLInstall(TheoraGlobalsPtr globals,
+                               DialogRef d,
+                               short itemOffset)
+{
+    ComponentResult err = noErr;
+    ControlRef cRef;
+
+    dbg_printf("[  TE]  >> [%08lx] :: DITLInstall(%d)\n", (UInt32) globals, itemOffset);
+
+    UInt32 v_sharp = 3 - globals->set_sharp;
+    if (v_sharp > 3)
+        v_sharp = 3;
+    else if (v_sharp < 1)
+        v_sharp = 1;
+
+    GetDialogItemAsControl(d, kItemSlow + itemOffset, &cRef);
+    SetControl32BitValue(cRef, (UInt32) (globals->set_quick == 0));
+
+    GetDialogItemAsControl(d, kItemSharp + itemOffset, &cRef);
+    SetControl32BitValue(cRef, (UInt32) v_sharp);
+
+    dbg_printf("[  TE] <   [%08lx] :: DITLInstall() = %ld\n", (UInt32) globals, err);
+
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderDITLEvent(TheoraGlobalsPtr globals,
+                             DialogRef d,
+                             short itemOffset,
+                             const EventRecord *theEvent,
+                             short *itemHit,
+                             Boolean *handled)
+{
+    ComponentResult err = noErr;
+    //dbg_printf("[  TE]  >> [%08lx] :: DITLEvent(%d, %d)\n", (UInt32) globals, itemOffset, *itemHit);
+
+    *handled = false;
+
+    //dbg_printf("[  TE] <   [%08lx] :: DITLEvent() = %ld\n", (UInt32) globals, err);
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderDITLItem(TheoraGlobalsPtr globals,
+                            DialogRef d,
+                            short itemOffset,
+                            short itemNum)
+{
+    ComponentResult err = noErr;
+    ControlRef cRef;
+
+    dbg_printf("[  TE]  >> [%08lx] :: DITLItem()\n", (UInt32) globals);
+
+    switch (itemNum - itemOffset) {
+    case kItemSlow:
+        GetDialogItemAsControl(d, itemOffset + kItemSlow, &cRef);
+        SetControl32BitValue(cRef, !GetControl32BitValue(cRef));
+        break;
+    case kItemSharp:
+        break;
+    }
+
+    dbg_printf("[  TE] <   [%08lx] :: DITLItem() = %ld\n", (UInt32) globals, err);
+
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderDITLRemove(TheoraGlobalsPtr globals,
+                              DialogRef d,
+                              short itemOffset)
+{
+    ComponentResult err = noErr;
+    ControlRef cRef;
+    UInt32 v_sharp;
+
+    dbg_printf("[  TE]  >> [%08lx] :: DITLRemove()\n", (UInt32) globals);
+
+    GetDialogItemAsControl(d, kItemSlow + itemOffset, &cRef);
+    globals->set_quick = GetControl32BitValue(cRef) == 0 ? 1 : 0;
+
+    GetDialogItemAsControl(d, kItemSharp + itemOffset, &cRef);
+    v_sharp = 3 - GetControl32BitValue(cRef);
+    if (v_sharp > 2)
+        v_sharp = 2;
+    else if (v_sharp < 0)
+        v_sharp = 0;
+
+    globals->set_sharp = v_sharp;
+
+    dbg_printf("[  TE] <   [%08lx] :: DITLRemove() = %ld\n", (UInt32) globals, err);
+
+    return err;
+}
+
+ComponentResult
+Theora_ImageEncoderDITLValidateInput(TheoraGlobalsPtr globals,
+                                     Boolean *ok)
+{
+    ComponentResult err = noErr;
+
+    dbg_printf("[  TE]  >> [%08lx] :: DITLValidateInput()\n", (UInt32) globals);
+
+    if (ok)
+        *ok = true;
+
+    dbg_printf("[  TE] <   [%08lx] :: DITLValidateInput() = %ld\n", (UInt32) globals, err);
+
+    return err;
+}
+
+
+/* ========================================================================= */
+
+ComponentResult
+encode_frame(TheoraGlobalsPtr globals, ICMCompressorSourceFrameRef sourceFrame,
+             ICMFrameType frameType)
+{
+    ComponentResult err = noErr;
+
+    return err;
+}
+
+ComponentResult
+yuv_copy__422_to_420(void *b_2vuy, SInt32 b_2vuy_stride, size_t width, size_t height,
+                     size_t offset_x, size_t offset_y, yuv_buffer *dst)
+{
+    UInt8 *base = b_2vuy;
+    size_t off_x = offset_x & ~0x01, off_y = offset_y & ~0x01;
+    size_t off_x2 = offset_x >> 1, off_y2 = offset_y >> 1;
+    UInt8 *y_base = dst->y + off_y * dst->y_stride + off_x;
+    UInt8 *cb_base = dst->u + off_y2 * dst->uv_stride + off_x2;
+    UInt8 *cr_base = dst->v + off_y2 * dst->uv_stride + off_x2;
+    size_t x, y;
+
+    for (y = 0; y < height; y += 2) {
+        UInt8 *b_top = base;
+        UInt8 *b_bot = base + b_2vuy_stride;
+        UInt8 *y_top = y_base;
+        UInt8 *y_bot = y_base + dst->y_stride;
+        UInt8 *cb = cb_base;
+        UInt8 *cr = cr_base;
+        for (x = 0; x < width; x += 2) {
+            *cb++ = (UInt8) (((UInt16) *b_top++ + (UInt16) *b_bot++) >> 1);
+            *y_top++ = *b_top++;
+            *y_bot++ = *b_bot++;
+            *cr++ = (UInt8) (((UInt16) *b_top++ + (UInt16) *b_bot++) >> 1);
+            *y_top++ = *b_top++;
+            *y_bot++ = *b_bot++;
+        }
+        base += 2 * b_2vuy_stride;
+        y_base += 2 * dst->y_stride;
+        cb_base += dst->uv_stride;
+        cr_base += dst->uv_stride;
+    }
+
+    return noErr;
+}
+
+ComponentResult
+vuy_copy__422_to_420(void *b_2vuy, SInt32 b_2vuy_stride, size_t width, size_t height,
+                     size_t offset_x, size_t offset_y, yuv_buffer *dst)
+{
+    UInt8 *base = b_2vuy;
+    size_t off_x = offset_x & ~0x01, off_y = offset_y & ~0x01;
+    size_t off_x2 = offset_x >> 1, off_y2 = offset_y >> 1;
+    UInt8 *y_base = dst->y + off_y * dst->y_stride + off_x;
+    UInt8 *cb_base = dst->u + off_y2 * dst->uv_stride + off_x2;
+    UInt8 *cr_base = dst->v + off_y2 * dst->uv_stride + off_x2;
+    size_t x, y;
+
+    for (y = 0; y < height; y += 2) {
+        UInt8 *b_top = base;
+        UInt8 *b_bot = base + b_2vuy_stride;
+        UInt8 *y_top = y_base;
+        UInt8 *y_bot = y_base + dst->y_stride;
+        UInt8 *cb = cb_base;
+        UInt8 *cr = cr_base;
+        for (x = 0; x < width; x += 2) {
+            *y_top++ = *b_top++;
+            *y_bot++ = *b_bot++;
+            *cb++ = (UInt8) (((UInt16) *b_top++ + (UInt16) *b_bot++) >> 1);
+            *y_top++ = *b_top++;
+            *y_bot++ = *b_bot++;
+            *cr++ = (UInt8) (((UInt16) *b_top++ + (UInt16) *b_bot++) >> 1);
+        }
+        base += 2 * b_2vuy_stride;
+        y_base += 2 * dst->y_stride;
+        cb_base += dst->uv_stride;
+        cr_base += dst->uv_stride;
+    }
+
+    return noErr;
+}
+
+// Utility to add an SInt32 to a CFMutableDictionary.
+static void
+addNumberToDictionary(CFMutableDictionaryRef dictionary, CFStringRef key, SInt32 numberSInt32)
+{
+    CFNumberRef number = CFNumberCreate(NULL, kCFNumberSInt32Type, &numberSInt32);
+    if (!number)
+        return;
+    CFDictionaryAddValue(dictionary, key, number);
+    CFRelease(number);
+}
+
+// Utility to add a double to a CFMutableDictionary.
+static void
+addDoubleToDictionary(CFMutableDictionaryRef dictionary, CFStringRef key, double numberDouble)
+{
+    CFNumberRef number = CFNumberCreate(NULL, kCFNumberDoubleType, &numberDouble);
+    if (!number)
+        return;
+    CFDictionaryAddValue(dictionary, key, number);
+    CFRelease(number);
+}
+
+ComponentResult
+create_pb_attribs(SInt32 width, SInt32 height,
+                  const OSType *pixelFormatList, int pixelFormatCount,
+                  CFMutableDictionaryRef *pixelBufferAttributesOut)
+{
+    ComponentResult err = memFullErr;
+    int i;
+    CFMutableDictionaryRef pixelBufferAttributes = NULL;
+    CFNumberRef number = NULL;
+    CFMutableArrayRef array = NULL;
+    SInt32 widthRoundedUp, heightRoundedUp, x_l, x_r, x_t, x_b;
+
+    pixelBufferAttributes =
+        CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks,
+                                  &kCFTypeDictionaryValueCallBacks);
+    if (!pixelBufferAttributes)
+        goto bail;
+
+    array = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+    if (!array)
+        goto bail;
+
+    // Under kCVPixelBufferPixelFormatTypeKey, add the list of source pixel formats.
+    // This can be a CFNumber or a CFArray of CFNumbers.
+    for (i = 0; i < pixelFormatCount; i++) {
+        number = CFNumberCreate(NULL, kCFNumberSInt32Type, &pixelFormatList[i]);
+        if (!number)
+            goto bail;
+
+        CFArrayAppendValue(array, number);
+
+        CFRelease(number);
+        number = NULL;
+    }
+
+    CFDictionaryAddValue(pixelBufferAttributes, kCVPixelBufferPixelFormatTypeKey, array);
+    CFRelease(array);
+    array = NULL;
+
+    // Add kCVPixelBufferWidthKey and kCVPixelBufferHeightKey to specify the dimensions
+    // of the source pixel buffers.  Normally this is the same as the compression target dimensions.
+    addNumberToDictionary(pixelBufferAttributes, kCVPixelBufferWidthKey, width);
+    addNumberToDictionary(pixelBufferAttributes, kCVPixelBufferHeightKey, height);
+
+    // If you want to require that extra scratch pixels be allocated on the edges of source pixel buffers,
+    // add the kCVPixelBufferExtendedPixels{Left,Top,Right,Bottom}Keys to indicate how much.
+    // Internally our encoded can only support multiples of 16x16 macroblocks;
+    // we will round the compression dimensions up to a multiple of 16x16 and encode that size.
+    // (Note that if your compressor needs to copy the pixels anyhow (eg, in order to convert to a different
+    // format) you may get better performance if your copy routine does not require extended pixels.)
+
+    widthRoundedUp = (width + 0x0f) & ~0x0f;
+    heightRoundedUp = (height + 0x0f) & ~0x0f;
+    x_l = ((widthRoundedUp - width) / 2) & ~0x01;
+    x_t = ((heightRoundedUp - height) / 2) & ~0x01;
+    x_r = widthRoundedUp - width - x_l;
+    x_b = heightRoundedUp - height - x_t;
+
+    if (x_l)
+        addNumberToDictionary(pixelBufferAttributes, kCVPixelBufferExtendedPixelsLeftKey, x_l);
+    if (x_t)
+        addNumberToDictionary(pixelBufferAttributes, kCVPixelBufferExtendedPixelsTopKey, x_t);
+    if (x_r)
+        addNumberToDictionary(pixelBufferAttributes, kCVPixelBufferExtendedPixelsRightKey, x_r);
+    if (x_b)
+        addNumberToDictionary(pixelBufferAttributes, kCVPixelBufferExtendedPixelsBottomKey, x_b);
+
+
+    // Altivec code is most efficient reading data aligned at addresses that are multiples of 16.
+    // Pretending that we have some altivec code, we set kCVPixelBufferBytesPerRowAlignmentKey to
+    // ensure that each row of pixels starts at a 16-byte-aligned address.
+    addNumberToDictionary(pixelBufferAttributes, kCVPixelBufferBytesPerRowAlignmentKey, 16);
+
+    // This codec accepts YCbCr input in the form of '2vuy' format pixel buffers.
+    // We recommend explicitly defining the gamma level and YCbCr matrix that should be used.
+    addDoubleToDictionary(pixelBufferAttributes, kCVImageBufferGammaLevelKey, 2.2);
+    CFDictionaryAddValue(pixelBufferAttributes, kCVImageBufferYCbCrMatrixKey, kCVImageBufferYCbCrMatrix_ITU_R_601_4);
+
+    err = noErr;
+    *pixelBufferAttributesOut = pixelBufferAttributes;
+    pixelBufferAttributes = NULL;
+
+bail:
+    if (pixelBufferAttributes)
+        CFRelease(pixelBufferAttributes);
+
+    if (number)
+        CFRelease(number);
+
+    if (array)
+        CFRelease(array);
+
+    return err;
+}


Property changes on: trunk/xiph-qt/Theora/src/TheoraEncoder.c
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/xiph-qt/Theora/src/TheoraEncoder.h
===================================================================
--- trunk/xiph-qt/Theora/src/TheoraEncoder.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/TheoraEncoder.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,59 @@
+/*
+ *  TheoraEncoder.h
+ *
+ *    TheoraEncoder.h - some constants definitions.
+ *
+ *
+ *  Copyright (c) 2006  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$
+ *
+ */
+
+
+#ifndef __theoraencoder_h__
+#define __theoraencoder_h__ 1
+
+#include "theora_versions.h"
+#include "fccs.h"
+
+#define kTheoraEncoderResID                  -17790
+#define kTheoraEncoderNameStringResID        -17790
+#define kTheoraEncoderInfoStringResID        -17791
+
+#define	kTheoraEncoderFormatName  "Xiph Theora"
+
+
+#define kTheoraEncoderDITLResID              -17790
+#define kTheoraEncoderPopupCNTLResID         -17790
+#define kTheoraEncoderPopupMENUResID         -17790
+
+#define TEXT_HEIGHT            16
+#define INTER_CONTROL_SPACING  12
+#define POPUP_CONTROL_HEIGHT   22
+
+
+#ifdef _DEBUG
+#define TheoraEncoderName        "Xiph Theora Decoder"
+#else
+#define TheoraEncoderName        ""
+#endif
+
+#endif /* __theoraencoder_h__ */


Property changes on: trunk/xiph-qt/Theora/src/TheoraEncoder.h
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/xiph-qt/Theora/src/TheoraEncoder.r
===================================================================
--- trunk/xiph-qt/Theora/src/TheoraEncoder.r	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/TheoraEncoder.r	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,184 @@
+/*
+ *  TheoraEncoder.r
+ *
+ *    Information bit definitions for the 'thng' and other TheoraEncoder
+ *    resources.
+ *
+ *
+ *  Copyright (c) 2006  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$
+ *
+ */
+
+
+#define thng_RezTemplateVersion 1
+
+#define cfrg_RezTemplateVersion 1
+
+#ifdef TARGET_REZ_MAC_PPC
+#include <CoreServices/CoreServices.r>
+#include <QuickTime/QuickTime.r>
+#include <QuickTime/QuickTimeComponents.r>
+#else
+#include "ConditionalMacros.r"
+#include "CoreServices.r"
+#include "QuickTimeComponents.r"
+#include "ImageCodec.r"
+#endif /* TARGET_REZ_MAC_PPC */
+
+#include "TheoraEncoder.h"
+
+
+/* How do I do this properly... anybody? */
+#if defined(BUILD_UNIVERSAL)
+  #define TARGET_CPU_PPC 1
+  #define TARGET_CPU_X86 1
+#endif
+
+
+#if TARGET_OS_MAC
+  #if TARGET_CPU_PPC && TARGET_CPU_X86
+    #define TARGET_REZ_FAT_COMPONENTS 1
+    #define Target_PlatformType       platformPowerPCNativeEntryPoint
+    #define Target_SecondPlatformType platformIA32NativeEntryPoint
+  #elif TARGET_CPU_X86
+    #define Target_PlatformType       platformIA32NativeEntryPoint
+  #else
+    #define Target_PlatformType       platformPowerPCNativeEntryPoint
+  #endif
+  #define theoraThreadSafe cmpThreadSafe
+#elif TARGET_OS_WIN32
+  #define Target_PlatformType platformWin32
+  #define theoraThreadSafe 0
+#else
+  #error get a real platform type
+#endif /* TARGET_OS_MAC */
+
+#if !defined(TARGET_REZ_FAT_COMPONENTS)
+  #define TARGET_REZ_FAT_COMPONENTS 0
+#endif
+
+
+#define kTheoraEncoderFlags (codecInfoDoes32 | codecInfoDoesTemporal | codecInfoDoesRateConstrain | theoraThreadSafe)
+
+#define kTheoraFormatFlags	(codecInfoDepth24)
+
+resource 'cdci' (kTheoraEncoderResID) {
+	kTheoraEncoderFormatName, // Type
+	1, // Version
+        kTheora_imco_Version,
+	kXiphComponentsManufacturer, // Manufacturer
+	0, // Decompression Flags
+	kTheoraEncoderFlags, // Compression Flags
+	kTheoraFormatFlags, // Format Flags
+	128, // Compression Accuracy
+            0, //128, // Decomression Accuracy
+	128, // Compression Speed
+            0, //128, // Decompression Speed
+	128, // Compression Level
+	0, // Reserved
+	16, // Minimum Height
+	16, // Minimum Width
+	0, // Decompression Pipeline Latency
+	0, // Compression Pipeline Latency
+	0 // Private Data
+};
+
+resource 'thng' (kTheoraEncoderResID) {
+    compressorComponentType, kVideoFormatXiphTheora,
+    kXiphComponentsManufacturer, // Manufacturer(??)
+    0, 0, 0, 0,
+    'STR ', kTheoraEncoderNameStringResID,
+    'STR ', kTheoraEncoderInfoStringResID,
+    0, 0, // no icon
+    kTheora_imco_Version,
+    componentDoAutoVersion | componentHasMultiplePlatforms, 0,
+    {
+        // component platform information
+        kTheoraEncoderFlags,
+        'dlle',
+        kTheoraEncoderResID,
+        Target_PlatformType,
+#if TARGET_REZ_FAT_COMPONENTS
+        kTheoraEncoderFlags,
+        'dlle',
+        kTheoraEncoderResID,
+        Target_SecondPlatformType,
+#endif
+    };
+};
+
+// Component Name
+resource 'STR ' (kTheoraEncoderNameStringResID) {
+	"Xiph Theora Encoder"
+};
+
+// Component Information
+resource 'STR ' (kTheoraEncoderInfoStringResID) {
+	"Compresses into the Xiph Theora format."
+};
+
+resource 'dlle' (kTheoraEncoderResID) {
+    "Theora_ImageEncoderComponentDispatch"
+};
+
+
+/* ========= Settings dialog resources ========= */
+
+resource 'DITL' (kTheoraEncoderDITLResID, "Compressor Options", purgeable) {
+{
+ //{0, 0, TEXT_HEIGHT, 100}, CheckBox { enabled, "Checkbox" },
+ //{TEXT_HEIGHT + INTER_CONTROL_SPACING, 0, TEXT_HEIGHT + INTER_CONTROL_SPACING + POPUP_CONTROL_HEIGHT, 165}, Control { enabled, kTheoraEncoderPopupCNTLResID },
+ //{0, 0, TEXT_HEIGHT, 100}, Control { enabled, kTheoraEncoderPopupCNTLResID },
+ //{TEXT_HEIGHT + INTER_CONTROL_SPACING, 0, TEXT_HEIGHT + INTER_CONTROL_SPACING + POPUP_CONTROL_HEIGHT, 165}, CheckBox { enabled, "Checkbox" },
+ {0, 0, POPUP_CONTROL_HEIGHT, 205}, Control { enabled, kTheoraEncoderPopupCNTLResID },
+ {POPUP_CONTROL_HEIGHT + INTER_CONTROL_SPACING, 100, TEXT_HEIGHT + INTER_CONTROL_SPACING + POPUP_CONTROL_HEIGHT, 200}, CheckBox { enabled, "Optimize" },
+ }
+};
+
+resource 'CNTL' (kTheoraEncoderPopupCNTLResID, "Compressor Popup") {
+ {0, 0, 20, 205},
+ popupTitleRightJust,
+     //1,
+ visible,
+ 100,        /* title width */
+ kTheoraEncoderPopupMENUResID,
+ //popupMenuCDEFProc + popupFixedWidth,
+ popupMenuCDEFProc + popupFixedWidth,
+ 0,
+ "Sharpness:"
+};
+
+resource 'MENU' (kTheoraEncoderPopupMENUResID, "Compressor Popup") {
+ kTheoraEncoderPopupMENUResID,
+ textMenuProc,
+ allEnabled,       /* Enable flags */
+ enabled,
+ "Sharpness",
+ { /* array: 8 elements */
+  /* [1] */
+  "Low", noIcon, noKey, noMark, plain,
+  /* [2] */
+  "Medium", noIcon, noKey, noMark, plain,
+  /* [3] */
+  "High", noIcon, noKey, noMark, plain,
+ }
+};


Property changes on: trunk/xiph-qt/Theora/src/TheoraEncoder.r
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/xiph-qt/Theora/src/TheoraEncoderDispatch.h
===================================================================
--- trunk/xiph-qt/Theora/src/TheoraEncoderDispatch.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/TheoraEncoderDispatch.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,110 @@
+/*
+ *  TheoraEncoderDispatch.h
+ *
+ *    TheoraEncoder component dispatch helper header.
+ *
+ *
+ *  Copyright (c) 2006  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$
+ *
+ */
+
+
+	ComponentSelectorOffset (8)
+
+	ComponentRangeCount (1)
+	ComponentRangeShift (8)
+	ComponentRangeMask	(FF)
+
+	ComponentRangeBegin (0)
+		ComponentError	 (GetMPWorkFunction)
+		ComponentError	 (Unregister)
+		StdComponentCall (Target)
+		ComponentError   (Register)
+		StdComponentCall (Version)
+		StdComponentCall (CanDo)
+		StdComponentCall (Close)
+		StdComponentCall (Open)
+	ComponentRangeEnd (0)
+
+	ComponentRangeBegin (1)
+		ComponentCall (GetCodecInfo)
+		ComponentError (GetCompressionTime)
+		ComponentCall (GetMaxCompressionSize)
+		ComponentError (PreCompress)
+		ComponentError (BandCompress)
+		ComponentError (PreDecompress)
+		ComponentError (BandDecompress)
+		ComponentError (Busy)
+		ComponentError (GetCompressedImageSize)
+		ComponentError (GetSimilarity)
+		ComponentError (TrimImage)
+		ComponentCall (RequestSettings)
+		ComponentCall (GetSettings)
+		ComponentCall (SetSettings)
+		ComponentError (Flush)
+		ComponentError (SetTimeCode)
+		ComponentError (IsImageDescriptionEquivalent)
+		ComponentError (NewMemory)
+		ComponentError (DisposeMemory)
+		ComponentError (HitTestData)
+		ComponentError (NewImageBufferMemory)
+		ComponentError (ExtractAndCombineFields)
+		ComponentError (GetMaxCompressionSizeWithSources)
+		ComponentError (SetTimeBase)
+		ComponentError (SourceChanged)
+		ComponentError (FlushLastFrame)
+		ComponentError (GetSettingsAsText)
+		ComponentError (GetParameterListHandle)
+		ComponentError (GetParameterList)
+		ComponentError (CreateStandardParameterDialog)
+		ComponentError (IsStandardParameterDialogEvent)
+		ComponentError (DismissStandardParameterDialog)
+		ComponentError (StandardParameterDialogDoAction)
+		ComponentError (NewImageGWorld)
+		ComponentError (DisposeImageGWorld)
+		ComponentError (HitTestDataWithFlags)
+		ComponentError (ValidateParameters)
+		ComponentError (GetBaseMPWorkFunction)
+		ComponentError (LockBits)
+		ComponentError (UnlockBits)
+		ComponentError (RequestGammaLevel)
+		ComponentError (GetSourceDataGammaLevel)
+		ComponentError (42)
+		ComponentError (GetDecompressLatency)
+		ComponentError (MergeFloatingImageOntoWindow)
+		ComponentError (RemoveFloatingImage)
+		ComponentCall (GetDITLForSize)
+		ComponentCall (DITLInstall)
+		ComponentCall (DITLEvent)
+		ComponentCall (DITLItem)
+		ComponentCall (DITLRemove)
+		ComponentCall (DITLValidateInput)
+		ComponentError (52)
+		ComponentError (53)
+		ComponentError (GetPreferredChunkSizeAndAlignment)
+		ComponentCall (PrepareToCompressFrames)
+		ComponentCall (EncodeFrame)
+		ComponentCall (CompleteFrame)
+		ComponentError (BeginPass)
+		ComponentError (EndPass)
+		ComponentError (ProcessBetweenPasses)
+	ComponentRangeEnd (1)


Property changes on: trunk/xiph-qt/Theora/src/TheoraEncoderDispatch.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: trunk/xiph-qt/Theora/src/decoder_types.h
===================================================================
--- trunk/xiph-qt/Theora/src/decoder_types.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/decoder_types.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -59,10 +59,10 @@
 #endif /* __DO_WE_NEED_ALL_THOSE_P__ */
 #endif /* __APPLE_CC__ */
 
-#if defined(__APPLE_CC__)
+#if defined(__APPLE_CC__) && defined(XIPHQT_USE_FRAMEWORKS)
 #include <TheoraExp/theoradec.h>
 #else
-#include <theoradec.h>
+#include <theora/theoradec.h>
 #endif /* __APPLE_CC__ */
 
 

Added: trunk/xiph-qt/Theora/src/encoder_types.h
===================================================================
--- trunk/xiph-qt/Theora/src/encoder_types.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/encoder_types.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,100 @@
+/*
+ *  encoder_types.h
+ *
+ *    Definitions of TheoraEncoder data structures.
+ *
+ *
+ *  Copyright (c) 2006  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(__encoder_types_h__)
+#define __encoder_types_h__
+
+#if defined(__APPLE_CC__)
+#include <QuickTime/QuickTime.h>
+#else
+#include <QuickTimeComponents.h>
+
+#if defined(TARGET_OS_WIN32)
+#define _WINIOCTL_
+#include <windows.h>
+#endif
+#endif /* __APPLE_CC__ */
+
+#if defined(__APPLE_CC__)
+#include <Theora/theora.h>
+#else
+#include <theora.h>
+#endif /* __APPLE_CC__ */
+
+
+// Constants
+//const UInt8 kNumPixelFormatsSupported = 2;
+//const UInt32 kPacketBufferAllocIncrement = 64 * 1024;
+
+// Data structures
+typedef struct	{
+    ComponentInstance       self;
+    ComponentInstance       target;
+
+    ICMCompressorSessionRef session;
+    ICMCompressionSessionOptionsRef sessionOptions;
+
+    theora_info ti;
+    theora_comment tc;
+    theora_state ts;
+
+    Boolean info_initialised;
+    long last_frame;
+
+    /* packet buffer information */
+    UInt8* p_buffer;
+    UInt32 p_buffer_len;
+    UInt32 p_buffer_used;
+
+    long width;
+    long height;
+    size_t maxEncodedDataSize;
+    int nextDecodeNumber;
+
+    //struct InternalPixelBuffer currentFrame;
+    yuv_buffer yuv;
+    UInt8     *yuv_buffer;
+    UInt32     yuv_buffer_size;
+
+    /* ========================= */
+    int keyFrameCountDown;
+
+    /* ======= settings ======== */
+    CodecQ set_quality;
+    UInt32 set_fps_numer;
+    UInt32 set_fps_denom;
+    UInt32 set_bitrate;
+    UInt32 set_keyrate;
+
+    UInt16 set_sharp;
+    UInt16 set_quick;
+} TheoraGlobals, *TheoraGlobalsPtr;
+
+#endif /* __decoder_types_h__ */


Property changes on: trunk/xiph-qt/Theora/src/encoder_types.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: trunk/xiph-qt/Theora/src/theora_versions.h
===================================================================
--- trunk/xiph-qt/Theora/src/theora_versions.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/Theora/src/theora_versions.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -33,9 +33,11 @@
 
 
 #ifdef DEBUG
-#define kTheora_imdc_Version		(0x00FF0101)
+#define kTheora_imdc_Version		(0x00FF0102)
+#define kTheora_imco_Version		(0x00FF0101)
 #else
-#define kTheora_imdc_Version		(0x00000101)
+#define kTheora_imdc_Version		(0x00000102)
+#define kTheora_imco_Version		(0x00000101)
 #endif /* DEBUG */
 
 


Property changes on: trunk/xiph-qt/build-macosx
___________________________________________________________________
Name: svn:ignore
   + build


Added: trunk/xiph-qt/build-macosx/English.lproj/InfoPlist.strings
===================================================================
(Binary files differ)


Property changes on: trunk/xiph-qt/build-macosx/English.lproj/InfoPlist.strings
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/xiph-qt/build-macosx/Info (decoders).plist
===================================================================
--- trunk/xiph-qt/build-macosx/Info (decoders).plist	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/build-macosx/Info (decoders).plist	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>XiphQT (decoders)</string>
+	<key>CFBundleGetInfoString</key>
+	<string>Xiph QuickTime Components 0.1.7 (decoders only), Copyright © 2005-2007 Arek Korbik</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>org.xiph.xiph-qt.xiphqt-decoders</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>0.1.7</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>0.1.7</string>
+	<key>CSResourcesFileMapped</key>
+	<true/>
+	<key>NSHumanReadableCopyright</key>
+	<string>Xiph QuickTime Components 0.1.7 (decoders only), Copyright © 2005-2007 Arek Korbik</string>
+</dict>
+</plist>

Added: trunk/xiph-qt/build-macosx/Info.plist
===================================================================
--- trunk/xiph-qt/build-macosx/Info.plist	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/build-macosx/Info.plist	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>XiphQT</string>
+	<key>CFBundleGetInfoString</key>
+	<string>Xiph QuickTime Components 0.1.7, Copyright © 2005-2006 Arek Korbik</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>org.xiph.xiph-qt.xiphqt</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>0.1.7</string>
+	<key>CFBundleShortVersionString</key>
+	<string>0.1.7</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Xiph QuickTime Components 0.1.7, Copyright © 2005-2006 Arek Korbik</string>
+	<key>CSResourcesFileMapped</key>
+	<true/>
+</dict>
+</plist>


Property changes on: trunk/xiph-qt/build-macosx/XiphQT.xcodeproj
___________________________________________________________________
Name: svn:ignore
   + *.mode*
*.pbxuser


Added: trunk/xiph-qt/build-macosx/XiphQT.xcodeproj/project.pbxproj
===================================================================
--- trunk/xiph-qt/build-macosx/XiphQT.xcodeproj/project.pbxproj	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/build-macosx/XiphQT.xcodeproj/project.pbxproj	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,1548 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 42;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		7326B5130B5AC44B004CE9D3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
+		7326B5160B5AC44B004CE9D3 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 7374489F0B19EC05002B059E /* common.c */; };
+		7326B5170B5AC44B004CE9D3 /* OggImport.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448A20B19EC05002B059E /* OggImport.c */; };
+		7326B5180B5AC44B004CE9D3 /* rb.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448A50B19EC05002B059E /* rb.c */; };
+		7326B5190B5AC44B004CE9D3 /* stream_flac.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448A70B19EC05002B059E /* stream_flac.c */; };
+		7326B51A0B5AC44B004CE9D3 /* stream_speex.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448A90B19EC05002B059E /* stream_speex.c */; };
+		7326B51B0B5AC44B004CE9D3 /* stream_theora.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448AB0B19EC05002B059E /* stream_theora.c */; };
+		7326B51C0B5AC44B004CE9D3 /* stream_vorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448B10B19EC05002B059E /* stream_vorbis.c */; };
+		7326B51D0B5AC44B004CE9D3 /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448B30B19EC05002B059E /* utils.c */; };
+		7326B51E0B5AC44B004CE9D3 /* XCACodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 737449EF0B1A012B002B059E /* XCACodec.cpp */; };
+		7326B51F0B5AC44B004CE9D3 /* ringbuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 737449F30B1A0159002B059E /* ringbuffer.cpp */; };
+		7326B5200B5AC44B004CE9D3 /* wrap_ogg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 737449F50B1A0159002B059E /* wrap_ogg.cpp */; };
+		7326B5210B5AC44B004CE9D3 /* AudioCodecComponentGlue.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744A010B1A023D002B059E /* AudioCodecComponentGlue.c */; };
+		7326B5220B5AC44B004CE9D3 /* ACBaseCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A030B1A0270002B059E /* ACBaseCodec.cpp */; };
+		7326B5230B5AC44B004CE9D3 /* ACCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A050B1A0270002B059E /* ACCodec.cpp */; };
+		7326B5240B5AC44B004CE9D3 /* GetCodecBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A0A0B1A0270002B059E /* GetCodecBundle.cpp */; };
+		7326B5250B5AC44B004CE9D3 /* CABundleLocker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A150B1A0288002B059E /* CABundleLocker.cpp */; };
+		7326B5260B5AC44B004CE9D3 /* CADebugMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A180B1A0288002B059E /* CADebugMacros.cpp */; };
+		7326B5270B5AC44B004CE9D3 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A1B0B1A0288002B059E /* CAStreamBasicDescription.cpp */; };
+		7326B5280B5AC44B004CE9D3 /* CAOggVorbisDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A250B1A031D002B059E /* CAOggVorbisDecoder.cpp */; };
+		7326B5290B5AC44B004CE9D3 /* CAVorbisDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A270B1A031D002B059E /* CAVorbisDecoder.cpp */; };
+		7326B52A0B5AC44B004CE9D3 /* vorbis_entrypoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A290B1A031D002B059E /* vorbis_entrypoints.cpp */; };
+		7326B52C0B5AC44B004CE9D3 /* CAOggSpeexDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A570B1A0657002B059E /* CAOggSpeexDecoder.cpp */; };
+		7326B52D0B5AC44B004CE9D3 /* CASpeexDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A590B1A0657002B059E /* CASpeexDecoder.cpp */; };
+		7326B52E0B5AC44B004CE9D3 /* speex_entrypoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A5B0B1A0657002B059E /* speex_entrypoints.cpp */; };
+		7326B52F0B5AC44B004CE9D3 /* TheoraDecoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744A770B1A0A82002B059E /* TheoraDecoder.c */; };
+		7326B5310B5AC44B004CE9D3 /* CAFLACDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744C600B1A2AD8002B059E /* CAFLACDecoder.cpp */; };
+		7326B5320B5AC44B004CE9D3 /* CAOggFLACDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744C620B1A2AD8002B059E /* CAOggFLACDecoder.cpp */; };
+		7326B5330B5AC44B004CE9D3 /* flac_entrypoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744C640B1A2AD8002B059E /* flac_entrypoints.cpp */; };
+		7326B5380B5AC44B004CE9D3 /* libtheora.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1C960B19C33B00E06B34 /* libtheora.a */; };
+		7326B5390B5AC44B004CE9D3 /* libtheoradec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CA10B19C35300E06B34 /* libtheoradec.a */; };
+		7326B53A0B5AC44B004CE9D3 /* libflac++.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 73744C420B1A25B2002B059E /* libflac++.a */; };
+		7326B53B0B5AC44B004CE9D3 /* libflac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 73744C400B1A25B2002B059E /* libflac.a */; };
+		7326B53C0B5AC44B004CE9D3 /* libspeex.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CAC0B19C36500E06B34 /* libspeex.a */; };
+		7326B53D0B5AC44B004CE9D3 /* libvorbisenc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CBB0B19C37600E06B34 /* libvorbisenc.a */; };
+		7326B53E0B5AC44B004CE9D3 /* libvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CB90B19C37600E06B34 /* libvorbis.a */; };
+		7326B53F0B5AC44B004CE9D3 /* libogg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CC80B19C38700E06B34 /* libogg.a */; };
+		7326B5400B5AC44B004CE9D3 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; };
+		7326B5410B5AC44B004CE9D3 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 737448DC0B19EF3D002B059E /* QuickTime.framework */; };
+		7326B5420B5AC44B004CE9D3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73744A900B1A0BB0002B059E /* QuartzCore.framework */; };
+		7326B5440B5AC44B004CE9D3 /* OggImport.r in Rez */ = {isa = PBXBuildFile; fileRef = 737449AF0B19F93E002B059E /* OggImport.r */; };
+		7326B5450B5AC44B004CE9D3 /* CAVorbisDecoderPublic.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744A320B1A035B002B059E /* CAVorbisDecoderPublic.r */; };
+		7326B5470B5AC44B004CE9D3 /* CASpeexDecoderPublic.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744A650B1A068A002B059E /* CASpeexDecoderPublic.r */; };
+		7326B5480B5AC44B004CE9D3 /* TheoraDecoder.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744A870B1A0AFF002B059E /* TheoraDecoder.r */; };
+		7326B54A0B5AC44B004CE9D3 /* CAFLACDecoderPublic.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744C6C0B1A2B78002B059E /* CAFLACDecoderPublic.r */; };
+		7326B54D0B5AC44B004CE9D3 /* MetaDataConfig.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 737449730B19F922002B059E /* MetaDataConfig.plist */; };
+		737448B60B19EC05002B059E /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 7374489F0B19EC05002B059E /* common.c */; };
+		737448B70B19EC05002B059E /* OggImport.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448A20B19EC05002B059E /* OggImport.c */; };
+		737448B80B19EC05002B059E /* rb.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448A50B19EC05002B059E /* rb.c */; };
+		737448B90B19EC05002B059E /* stream_flac.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448A70B19EC05002B059E /* stream_flac.c */; };
+		737448BA0B19EC05002B059E /* stream_speex.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448A90B19EC05002B059E /* stream_speex.c */; };
+		737448BB0B19EC05002B059E /* stream_theora.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448AB0B19EC05002B059E /* stream_theora.c */; };
+		737448BC0B19EC05002B059E /* stream_vorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448B10B19EC05002B059E /* stream_vorbis.c */; };
+		737448BD0B19EC05002B059E /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 737448B30B19EC05002B059E /* utils.c */; };
+		737448DD0B19EF3D002B059E /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 737448DC0B19EF3D002B059E /* QuickTime.framework */; };
+		737448E10B19EF8D002B059E /* libogg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CC80B19C38700E06B34 /* libogg.a */; };
+		737449320B19F317002B059E /* libvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CB90B19C37600E06B34 /* libvorbis.a */; };
+		737449340B19F32D002B059E /* libtheoradec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CA10B19C35300E06B34 /* libtheoradec.a */; };
+		737449490B19F67A002B059E /* libspeex.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CAC0B19C36500E06B34 /* libspeex.a */; };
+		737449910B19F922002B059E /* MetaDataConfig.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 737449730B19F922002B059E /* MetaDataConfig.plist */; };
+		737449BD0B19F99D002B059E /* OggImport.r in Rez */ = {isa = PBXBuildFile; fileRef = 737449AF0B19F93E002B059E /* OggImport.r */; };
+		737449F10B1A012B002B059E /* XCACodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 737449EF0B1A012B002B059E /* XCACodec.cpp */; };
+		737449F70B1A0159002B059E /* ringbuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 737449F30B1A0159002B059E /* ringbuffer.cpp */; };
+		737449F90B1A0159002B059E /* wrap_ogg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 737449F50B1A0159002B059E /* wrap_ogg.cpp */; };
+		73744A020B1A023D002B059E /* AudioCodecComponentGlue.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744A010B1A023D002B059E /* AudioCodecComponentGlue.c */; };
+		73744A0C0B1A0270002B059E /* ACBaseCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A030B1A0270002B059E /* ACBaseCodec.cpp */; };
+		73744A0E0B1A0270002B059E /* ACCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A050B1A0270002B059E /* ACCodec.cpp */; };
+		73744A130B1A0270002B059E /* GetCodecBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A0A0B1A0270002B059E /* GetCodecBundle.cpp */; };
+		73744A1D0B1A0288002B059E /* CABundleLocker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A150B1A0288002B059E /* CABundleLocker.cpp */; };
+		73744A200B1A0288002B059E /* CADebugMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A180B1A0288002B059E /* CADebugMacros.cpp */; };
+		73744A230B1A0288002B059E /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A1B0B1A0288002B059E /* CAStreamBasicDescription.cpp */; };
+		73744A2B0B1A031D002B059E /* CAOggVorbisDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A250B1A031D002B059E /* CAOggVorbisDecoder.cpp */; };
+		73744A2D0B1A031D002B059E /* CAVorbisDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A270B1A031D002B059E /* CAVorbisDecoder.cpp */; };
+		73744A2F0B1A031D002B059E /* vorbis_entrypoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A290B1A031D002B059E /* vorbis_entrypoints.cpp */; };
+		73744A330B1A035B002B059E /* CAVorbisDecoderPublic.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744A320B1A035B002B059E /* CAVorbisDecoderPublic.r */; };
+		73744A3A0B1A03E6002B059E /* CAVorbisEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A380B1A03E6002B059E /* CAVorbisEncoder.cpp */; };
+		73744A3D0B1A043F002B059E /* CAVorbisEncoderPublic.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744A3C0B1A043F002B059E /* CAVorbisEncoderPublic.r */; };
+		73744A430B1A048C002B059E /* libvorbisenc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1CBB0B19C37600E06B34 /* libvorbisenc.a */; };
+		73744A5D0B1A0657002B059E /* CAOggSpeexDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A570B1A0657002B059E /* CAOggSpeexDecoder.cpp */; };
+		73744A5F0B1A0657002B059E /* CASpeexDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A590B1A0657002B059E /* CASpeexDecoder.cpp */; };
+		73744A630B1A065C002B059E /* speex_entrypoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744A5B0B1A0657002B059E /* speex_entrypoints.cpp */; };
+		73744A660B1A068A002B059E /* CASpeexDecoderPublic.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744A650B1A068A002B059E /* CASpeexDecoderPublic.r */; };
+		73744A800B1A0A82002B059E /* TheoraDecoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744A770B1A0A82002B059E /* TheoraDecoder.c */; };
+		73744A830B1A0A82002B059E /* TheoraEncoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744A7A0B1A0A82002B059E /* TheoraEncoder.c */; };
+		73744A890B1A0AFF002B059E /* TheoraDecoder.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744A870B1A0AFF002B059E /* TheoraDecoder.r */; };
+		73744A8A0B1A0AFF002B059E /* TheoraEncoder.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744A880B1A0AFF002B059E /* TheoraEncoder.r */; };
+		73744A910B1A0BB0002B059E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73744A900B1A0BB0002B059E /* QuartzCore.framework */; };
+		73744ABC0B1A0CC4002B059E /* libtheora.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730B1C960B19C33B00E06B34 /* libtheora.a */; };
+		73744C660B1A2AD8002B059E /* CAFLACDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744C600B1A2AD8002B059E /* CAFLACDecoder.cpp */; };
+		73744C680B1A2AD8002B059E /* CAOggFLACDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744C620B1A2AD8002B059E /* CAOggFLACDecoder.cpp */; };
+		73744C6A0B1A2AD8002B059E /* flac_entrypoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73744C640B1A2AD8002B059E /* flac_entrypoints.cpp */; };
+		73744C6D0B1A2B78002B059E /* CAFLACDecoderPublic.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744C6C0B1A2B78002B059E /* CAFLACDecoderPublic.r */; };
+		73744C920B1A3661002B059E /* libflac++.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 73744C420B1A25B2002B059E /* libflac++.a */; };
+		73744C970B1A36D8002B059E /* libflac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 73744C400B1A25B2002B059E /* libflac.a */; };
+		73744CAB0B1A3D07002B059E /* OggExport.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744CA00B1A3D07002B059E /* OggExport.c */; };
+		73744CAE0B1A3D07002B059E /* stream_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744CA30B1A3D07002B059E /* stream_audio.c */; };
+		73744CB20B1A3D07002B059E /* stream_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744CA70B1A3D07002B059E /* stream_video.c */; };
+		73744CB70B1A3D5E002B059E /* OggExport.nib in Resources */ = {isa = PBXBuildFile; fileRef = 73744CB50B1A3D5E002B059E /* OggExport.nib */; };
+		73744CB80B1A3D5E002B059E /* OggExport.r in Rez */ = {isa = PBXBuildFile; fileRef = 73744CB60B1A3D5E002B059E /* OggExport.r */; };
+		8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
+		8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		730B1C930B19C33B00E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837DE0B1938DC005C7A69 /* Theora.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
+			remoteInfo = Theora;
+		};
+		730B1C950B19C33B00E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837DE0B1938DC005C7A69 /* Theora.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 738837100B192732005C7A69;
+			remoteInfo = "libtheora (static)";
+		};
+		730B1C9E0B19C35300E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837D00B1938B1005C7A69 /* TheoraExp.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
+			remoteInfo = TheoraExp;
+		};
+		730B1CA00B19C35300E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837D00B1938B1005C7A69 /* TheoraExp.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 738836400B191426005C7A69;
+			remoteInfo = "libtheoradec (static)";
+		};
+		730B1CA90B19C36500E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837C50B193896005C7A69 /* Speex.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
+			remoteInfo = Speex;
+		};
+		730B1CAB0B19C36500E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837C50B193896005C7A69 /* Speex.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 738837770B193667005C7A69;
+			remoteInfo = "libspeex (static)";
+		};
+		730B1CB60B19C37600E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837B00B19386C005C7A69 /* Vorbis.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 730F23F1091827B100AB638C;
+			remoteInfo = Vorbis;
+		};
+		730B1CB80B19C37600E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837B00B19386C005C7A69 /* Vorbis.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 738835E40B18F870005C7A69;
+			remoteInfo = "libvorbis (static)";
+		};
+		730B1CBA0B19C37600E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837B00B19386C005C7A69 /* Vorbis.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 738836130B190488005C7A69;
+			remoteInfo = "libvorbisenc (static)";
+		};
+		730B1CBC0B19C37600E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837B00B19386C005C7A69 /* Vorbis.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 738836220B1905E5005C7A69;
+			remoteInfo = "libvorbisfile (static)";
+		};
+		730B1CC50B19C38700E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738A452D0B18659A00B43A0C /* Ogg.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
+			remoteInfo = Ogg;
+		};
+		730B1CC70B19C38700E06B34 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738A452D0B18659A00B43A0C /* Ogg.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 734FB2E50B18B33E00D561D7;
+			remoteInfo = "libogg (static)";
+		};
+		7326B5030B5AC44B004CE9D3 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738A452D0B18659A00B43A0C /* Ogg.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 734FB2E40B18B33E00D561D7;
+			remoteInfo = "libogg (static)";
+		};
+		7326B5050B5AC44B004CE9D3 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837B00B19386C005C7A69 /* Vorbis.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 738835E30B18F870005C7A69;
+			remoteInfo = "libvorbis (static)";
+		};
+		7326B5090B5AC44B004CE9D3 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837C50B193896005C7A69 /* Speex.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 738837760B193667005C7A69;
+			remoteInfo = "libspeex (static)";
+		};
+		7326B50B0B5AC44B004CE9D3 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 73744C260B1A25A2002B059E /* FLAC.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 73744B1A0B1A1C43002B059E;
+			remoteInfo = "libflac (static)";
+		};
+		7326B50D0B5AC44B004CE9D3 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 73744C260B1A25A2002B059E /* FLAC.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 73744B510B1A21DA002B059E;
+			remoteInfo = "libflac++ (static)";
+		};
+		7326B50F0B5AC44B004CE9D3 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837D00B1938B1005C7A69 /* TheoraExp.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 7388363F0B191426005C7A69;
+			remoteInfo = "libtheoradec (static)";
+		};
+		737449200B19F043002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738A452D0B18659A00B43A0C /* Ogg.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 734FB2E40B18B33E00D561D7;
+			remoteInfo = "libogg (static)";
+		};
+		737449420B19F64B002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837B00B19386C005C7A69 /* Vorbis.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 738835E30B18F870005C7A69;
+			remoteInfo = "libvorbis (static)";
+		};
+		737449440B19F653002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837C50B193896005C7A69 /* Speex.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 738837760B193667005C7A69;
+			remoteInfo = "libspeex (static)";
+		};
+		737449460B19F662002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837D00B1938B1005C7A69 /* TheoraExp.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 7388363F0B191426005C7A69;
+			remoteInfo = "libtheoradec (static)";
+		};
+		73744A3F0B1A045B002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837B00B19386C005C7A69 /* Vorbis.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 738836120B190488005C7A69;
+			remoteInfo = "libvorbisenc (static)";
+		};
+		73744A980B1A0BEA002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 738837DE0B1938DC005C7A69 /* Theora.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 7388370F0B192732005C7A69;
+			remoteInfo = "libtheora (static)";
+		};
+		73744C3B0B1A25B2002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 73744C260B1A25A2002B059E /* FLAC.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
+			remoteInfo = FLAC;
+		};
+		73744C3D0B1A25B2002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 73744C260B1A25A2002B059E /* FLAC.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 73E1968C0A0D24C100D40234;
+			remoteInfo = "FLAC++";
+		};
+		73744C3F0B1A25B2002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 73744C260B1A25A2002B059E /* FLAC.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 73744B1B0B1A1C43002B059E;
+			remoteInfo = "libflac (static)";
+		};
+		73744C410B1A25B2002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 73744C260B1A25A2002B059E /* FLAC.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 73744B520B1A21DA002B059E;
+			remoteInfo = "libflac++ (static)";
+		};
+		73744C740B1A2D44002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 73744C260B1A25A2002B059E /* FLAC.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 73744B1A0B1A1C43002B059E;
+			remoteInfo = "libflac (static)";
+		};
+		73744C760B1A2D44002B059E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 73744C260B1A25A2002B059E /* FLAC.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 73744B510B1A21DA002B059E;
+			remoteInfo = "libflac++ (static)";
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		7326B54C0B5AC44B004CE9D3 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 7;
+			files = (
+				7326B54D0B5AC44B004CE9D3 /* MetaDataConfig.plist in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		737449BE0B19F9C0002B059E /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 7;
+			files = (
+				737449910B19F922002B059E /* MetaDataConfig.plist in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+		32BAE0B30371A71500C91783 /* XiphQT_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XiphQT_Prefix.pch; sourceTree = "<group>"; };
+		7326B5510B5AC44B004CE9D3 /* XiphQT (decoders).component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "XiphQT (decoders).component"; sourceTree = BUILT_PRODUCTS_DIR; };
+		7326B5520B5AC44B004CE9D3 /* Info (decoders).plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Info (decoders).plist"; sourceTree = "<group>"; };
+		7374489F0B19EC05002B059E /* common.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../OggImport/src/common.c; sourceTree = SOURCE_ROOT; };
+		737448A00B19EC05002B059E /* common.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../OggImport/src/common.h; sourceTree = SOURCE_ROOT; };
+		737448A10B19EC05002B059E /* importer_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = importer_types.h; path = ../OggImport/src/importer_types.h; sourceTree = SOURCE_ROOT; };
+		737448A20B19EC05002B059E /* OggImport.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = OggImport.c; path = ../OggImport/src/OggImport.c; sourceTree = SOURCE_ROOT; };
+		737448A30B19EC05002B059E /* OggImport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = OggImport.h; path = ../OggImport/src/OggImport.h; sourceTree = SOURCE_ROOT; };
+		737448A40B19EC05002B059E /* OggImportDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = OggImportDispatch.h; path = ../OggImport/src/OggImportDispatch.h; sourceTree = SOURCE_ROOT; };
+		737448A50B19EC05002B059E /* rb.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = rb.c; path = ../OggImport/src/rb.c; sourceTree = SOURCE_ROOT; };
+		737448A60B19EC05002B059E /* rb.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = rb.h; path = ../OggImport/src/rb.h; sourceTree = SOURCE_ROOT; };
+		737448A70B19EC05002B059E /* stream_flac.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_flac.c; path = ../OggImport/src/stream_flac.c; sourceTree = SOURCE_ROOT; };
+		737448A80B19EC05002B059E /* stream_flac.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_flac.h; path = ../OggImport/src/stream_flac.h; sourceTree = SOURCE_ROOT; };
+		737448A90B19EC05002B059E /* stream_speex.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_speex.c; path = ../OggImport/src/stream_speex.c; sourceTree = SOURCE_ROOT; };
+		737448AA0B19EC05002B059E /* stream_speex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_speex.h; path = ../OggImport/src/stream_speex.h; sourceTree = SOURCE_ROOT; };
+		737448AB0B19EC05002B059E /* stream_theora.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_theora.c; path = ../OggImport/src/stream_theora.c; sourceTree = SOURCE_ROOT; };
+		737448AC0B19EC05002B059E /* stream_theora.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_theora.h; path = ../OggImport/src/stream_theora.h; sourceTree = SOURCE_ROOT; };
+		737448AD0B19EC05002B059E /* stream_types_flac.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_types_flac.h; path = ../OggImport/src/stream_types_flac.h; sourceTree = SOURCE_ROOT; };
+		737448AE0B19EC05002B059E /* stream_types_speex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_types_speex.h; path = ../OggImport/src/stream_types_speex.h; sourceTree = SOURCE_ROOT; };
+		737448AF0B19EC05002B059E /* stream_types_theora.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_types_theora.h; path = ../OggImport/src/stream_types_theora.h; sourceTree = SOURCE_ROOT; };
+		737448B00B19EC05002B059E /* stream_types_vorbis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_types_vorbis.h; path = ../OggImport/src/stream_types_vorbis.h; sourceTree = SOURCE_ROOT; };
+		737448B10B19EC05002B059E /* stream_vorbis.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_vorbis.c; path = ../OggImport/src/stream_vorbis.c; sourceTree = SOURCE_ROOT; };
+		737448B20B19EC05002B059E /* stream_vorbis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_vorbis.h; path = ../OggImport/src/stream_vorbis.h; sourceTree = SOURCE_ROOT; };
+		737448B30B19EC05002B059E /* utils.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = utils.c; path = ../OggImport/src/utils.c; sourceTree = SOURCE_ROOT; };
+		737448B40B19EC05002B059E /* utils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = utils.h; path = ../OggImport/src/utils.h; sourceTree = SOURCE_ROOT; };
+		737448B50B19EC05002B059E /* versions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = versions.h; path = ../OggImport/src/versions.h; sourceTree = SOURCE_ROOT; };
+		737448C30B19ECDC002B059E /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../common/config.h; sourceTree = SOURCE_ROOT; };
+		737448C40B19ECDC002B059E /* data_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = data_types.h; path = ../common/data_types.h; sourceTree = SOURCE_ROOT; };
+		737448C50B19ECDC002B059E /* fccs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fccs.h; path = ../common/fccs.h; sourceTree = SOURCE_ROOT; };
+		737448C60B19ECF7002B059E /* debug.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = debug.h; path = ../utils/debug.h; sourceTree = SOURCE_ROOT; };
+		737448DC0B19EF3D002B059E /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
+		737449730B19F922002B059E /* MetaDataConfig.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = MetaDataConfig.plist; path = ../OggImport/MetaDataConfig.plist; sourceTree = SOURCE_ROOT; };
+		737449AF0B19F93E002B059E /* OggImport.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = OggImport.r; path = ../OggImport/src/OggImport.r; sourceTree = SOURCE_ROOT; };
+		737449EF0B1A012B002B059E /* XCACodec.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = XCACodec.cpp; path = ../common/XCACodec.cpp; sourceTree = SOURCE_ROOT; };
+		737449F00B1A012B002B059E /* XCACodec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = XCACodec.h; path = ../common/XCACodec.h; sourceTree = SOURCE_ROOT; };
+		737449F30B1A0159002B059E /* ringbuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ringbuffer.cpp; path = ../utils/ringbuffer.cpp; sourceTree = SOURCE_ROOT; };
+		737449F40B1A0159002B059E /* ringbuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ringbuffer.h; path = ../utils/ringbuffer.h; sourceTree = SOURCE_ROOT; };
+		737449F50B1A0159002B059E /* wrap_ogg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wrap_ogg.cpp; path = ../utils/wrap_ogg.cpp; sourceTree = SOURCE_ROOT; };
+		737449F60B1A0159002B059E /* wrap_ogg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wrap_ogg.h; path = ../utils/wrap_ogg.h; sourceTree = SOURCE_ROOT; };
+		73744A010B1A023D002B059E /* AudioCodecComponentGlue.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = AudioCodecComponentGlue.c; path = ../AppleSDK/CoreAudio/AudioCodecs/AudioCodecComponentGlue.c; sourceTree = SOURCE_ROOT; };
+		73744A030B1A0270002B059E /* ACBaseCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ACBaseCodec.cpp; path = ../AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACBaseCodec.cpp; sourceTree = SOURCE_ROOT; };
+		73744A040B1A0270002B059E /* ACBaseCodec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ACBaseCodec.h; path = ../AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACBaseCodec.h; sourceTree = SOURCE_ROOT; };
+		73744A050B1A0270002B059E /* ACCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ACCodec.cpp; path = ../AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACCodec.cpp; sourceTree = SOURCE_ROOT; };
+		73744A060B1A0270002B059E /* ACCodec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ACCodec.h; path = ../AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACCodec.h; sourceTree = SOURCE_ROOT; };
+		73744A070B1A0270002B059E /* ACCodecDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ACCodecDispatch.h; path = ../AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACCodecDispatch.h; sourceTree = SOURCE_ROOT; };
+		73744A080B1A0270002B059E /* ACCodecDispatchTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ACCodecDispatchTypes.h; path = ../AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACCodecDispatchTypes.h; sourceTree = SOURCE_ROOT; };
+		73744A090B1A0270002B059E /* ACConditionalMacros.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ACConditionalMacros.h; path = ../AppleSDK/CoreAudio/AudioCodecs/ACPublic/ACConditionalMacros.h; sourceTree = SOURCE_ROOT; };
+		73744A0A0B1A0270002B059E /* GetCodecBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GetCodecBundle.cpp; path = ../AppleSDK/CoreAudio/AudioCodecs/ACPublic/GetCodecBundle.cpp; sourceTree = SOURCE_ROOT; };
+		73744A0B0B1A0270002B059E /* GetCodecBundle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GetCodecBundle.h; path = ../AppleSDK/CoreAudio/AudioCodecs/ACPublic/GetCodecBundle.h; sourceTree = SOURCE_ROOT; };
+		73744A150B1A0288002B059E /* CABundleLocker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CABundleLocker.cpp; path = ../AppleSDK/CoreAudio/PublicUtility/CABundleLocker.cpp; sourceTree = SOURCE_ROOT; };
+		73744A160B1A0288002B059E /* CABundleLocker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CABundleLocker.h; path = ../AppleSDK/CoreAudio/PublicUtility/CABundleLocker.h; sourceTree = SOURCE_ROOT; };
+		73744A170B1A0288002B059E /* CAConditionalMacros.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CAConditionalMacros.h; path = ../AppleSDK/CoreAudio/PublicUtility/CAConditionalMacros.h; sourceTree = SOURCE_ROOT; };
+		73744A180B1A0288002B059E /* CADebugMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CADebugMacros.cpp; path = ../AppleSDK/CoreAudio/PublicUtility/CADebugMacros.cpp; sourceTree = SOURCE_ROOT; };
+		73744A190B1A0288002B059E /* CADebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CADebugMacros.h; path = ../AppleSDK/CoreAudio/PublicUtility/CADebugMacros.h; sourceTree = SOURCE_ROOT; };
+		73744A1A0B1A0288002B059E /* CAMath.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CAMath.h; path = ../AppleSDK/CoreAudio/PublicUtility/CAMath.h; sourceTree = SOURCE_ROOT; };
+		73744A1B0B1A0288002B059E /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CAStreamBasicDescription.cpp; path = ../AppleSDK/CoreAudio/PublicUtility/CAStreamBasicDescription.cpp; sourceTree = SOURCE_ROOT; };
+		73744A1C0B1A0288002B059E /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CAStreamBasicDescription.h; path = ../AppleSDK/CoreAudio/PublicUtility/CAStreamBasicDescription.h; sourceTree = SOURCE_ROOT; };
+		73744A250B1A031D002B059E /* CAOggVorbisDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CAOggVorbisDecoder.cpp; path = ../CAVorbis/src/CAOggVorbisDecoder.cpp; sourceTree = SOURCE_ROOT; };
+		73744A260B1A031D002B059E /* CAOggVorbisDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CAOggVorbisDecoder.h; path = ../CAVorbis/src/CAOggVorbisDecoder.h; sourceTree = SOURCE_ROOT; };
+		73744A270B1A031D002B059E /* CAVorbisDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CAVorbisDecoder.cpp; path = ../CAVorbis/src/CAVorbisDecoder.cpp; sourceTree = SOURCE_ROOT; };
+		73744A280B1A031D002B059E /* CAVorbisDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CAVorbisDecoder.h; path = ../CAVorbis/src/CAVorbisDecoder.h; sourceTree = SOURCE_ROOT; };
+		73744A290B1A031D002B059E /* vorbis_entrypoints.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = vorbis_entrypoints.cpp; path = ../CAVorbis/src/vorbis_entrypoints.cpp; sourceTree = SOURCE_ROOT; };
+		73744A2A0B1A031D002B059E /* vorbis_versions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = vorbis_versions.h; path = ../CAVorbis/src/vorbis_versions.h; sourceTree = SOURCE_ROOT; };
+		73744A320B1A035B002B059E /* CAVorbisDecoderPublic.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = CAVorbisDecoderPublic.r; path = ../CAVorbis/src/CAVorbisDecoderPublic.r; sourceTree = SOURCE_ROOT; };
+		73744A350B1A0382002B059E /* XCAResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = XCAResources.r; path = ../resources/XCAResources.r; sourceTree = SOURCE_ROOT; };
+		73744A380B1A03E6002B059E /* CAVorbisEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CAVorbisEncoder.cpp; path = ../CAVorbis/src/CAVorbisEncoder.cpp; sourceTree = SOURCE_ROOT; };
+		73744A390B1A03E6002B059E /* CAVorbisEncoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CAVorbisEncoder.h; path = ../CAVorbis/src/CAVorbisEncoder.h; sourceTree = SOURCE_ROOT; };
+		73744A3C0B1A043F002B059E /* CAVorbisEncoderPublic.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = CAVorbisEncoderPublic.r; path = ../CAVorbis/src/CAVorbisEncoderPublic.r; sourceTree = SOURCE_ROOT; };
+		73744A570B1A0657002B059E /* CAOggSpeexDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CAOggSpeexDecoder.cpp; path = ../CASpeex/src/CAOggSpeexDecoder.cpp; sourceTree = SOURCE_ROOT; };
+		73744A580B1A0657002B059E /* CAOggSpeexDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CAOggSpeexDecoder.h; path = ../CASpeex/src/CAOggSpeexDecoder.h; sourceTree = SOURCE_ROOT; };
+		73744A590B1A0657002B059E /* CASpeexDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CASpeexDecoder.cpp; path = ../CASpeex/src/CASpeexDecoder.cpp; sourceTree = SOURCE_ROOT; };
+		73744A5A0B1A0657002B059E /* CASpeexDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CASpeexDecoder.h; path = ../CASpeex/src/CASpeexDecoder.h; sourceTree = SOURCE_ROOT; };
+		73744A5B0B1A0657002B059E /* speex_entrypoints.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = speex_entrypoints.cpp; path = ../CASpeex/src/speex_entrypoints.cpp; sourceTree = SOURCE_ROOT; };
+		73744A5C0B1A0657002B059E /* speex_versions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = speex_versions.h; path = ../CASpeex/src/speex_versions.h; sourceTree = SOURCE_ROOT; };
+		73744A650B1A068A002B059E /* CASpeexDecoderPublic.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = CASpeexDecoderPublic.r; path = ../CASpeex/src/CASpeexDecoderPublic.r; sourceTree = SOURCE_ROOT; };
+		73744A740B1A0A82002B059E /* decoder_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = decoder_types.h; path = ../Theora/src/decoder_types.h; sourceTree = SOURCE_ROOT; };
+		73744A750B1A0A82002B059E /* encoder_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = encoder_types.h; path = ../Theora/src/encoder_types.h; sourceTree = SOURCE_ROOT; };
+		73744A760B1A0A82002B059E /* theora_versions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = theora_versions.h; path = ../Theora/src/theora_versions.h; sourceTree = SOURCE_ROOT; };
+		73744A770B1A0A82002B059E /* TheoraDecoder.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = TheoraDecoder.c; path = ../Theora/src/TheoraDecoder.c; sourceTree = SOURCE_ROOT; };
+		73744A780B1A0A82002B059E /* TheoraDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TheoraDecoder.h; path = ../Theora/src/TheoraDecoder.h; sourceTree = SOURCE_ROOT; };
+		73744A790B1A0A82002B059E /* TheoraDecoderDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TheoraDecoderDispatch.h; path = ../Theora/src/TheoraDecoderDispatch.h; sourceTree = SOURCE_ROOT; };
+		73744A7A0B1A0A82002B059E /* TheoraEncoder.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = TheoraEncoder.c; path = ../Theora/src/TheoraEncoder.c; sourceTree = SOURCE_ROOT; };
+		73744A7B0B1A0A82002B059E /* TheoraEncoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TheoraEncoder.h; path = ../Theora/src/TheoraEncoder.h; sourceTree = SOURCE_ROOT; };
+		73744A7C0B1A0A82002B059E /* TheoraEncoderDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TheoraEncoderDispatch.h; path = ../Theora/src/TheoraEncoderDispatch.h; sourceTree = SOURCE_ROOT; };
+		73744A870B1A0AFF002B059E /* TheoraDecoder.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = TheoraDecoder.r; path = ../Theora/src/TheoraDecoder.r; sourceTree = SOURCE_ROOT; };
+		73744A880B1A0AFF002B059E /* TheoraEncoder.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = TheoraEncoder.r; path = ../Theora/src/TheoraEncoder.r; sourceTree = SOURCE_ROOT; };
+		73744A900B1A0BB0002B059E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
+		73744C260B1A25A2002B059E /* FLAC.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FLAC.xcodeproj; path = "flac-support/FLAC.xcodeproj"; sourceTree = SOURCE_ROOT; };
+		73744C600B1A2AD8002B059E /* CAFLACDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CAFLACDecoder.cpp; path = ../CAFLAC/src/CAFLACDecoder.cpp; sourceTree = SOURCE_ROOT; };
+		73744C610B1A2AD8002B059E /* CAFLACDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CAFLACDecoder.h; path = ../CAFLAC/src/CAFLACDecoder.h; sourceTree = SOURCE_ROOT; };
+		73744C620B1A2AD8002B059E /* CAOggFLACDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CAOggFLACDecoder.cpp; path = ../CAFLAC/src/CAOggFLACDecoder.cpp; sourceTree = SOURCE_ROOT; };
+		73744C630B1A2AD8002B059E /* CAOggFLACDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CAOggFLACDecoder.h; path = ../CAFLAC/src/CAOggFLACDecoder.h; sourceTree = SOURCE_ROOT; };
+		73744C640B1A2AD8002B059E /* flac_entrypoints.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flac_entrypoints.cpp; path = ../CAFLAC/src/flac_entrypoints.cpp; sourceTree = SOURCE_ROOT; };
+		73744C650B1A2AD8002B059E /* flac_versions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = flac_versions.h; path = ../CAFLAC/src/flac_versions.h; sourceTree = SOURCE_ROOT; };
+		73744C6C0B1A2B78002B059E /* CAFLACDecoderPublic.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = CAFLACDecoderPublic.r; path = ../CAFLAC/src/CAFLACDecoderPublic.r; sourceTree = SOURCE_ROOT; };
+		73744C9E0B1A3D07002B059E /* exporter_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = exporter_types.h; path = ../OggExport/src/exporter_types.h; sourceTree = SOURCE_ROOT; };
+		73744C9F0B1A3D07002B059E /* oggexport_versions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = oggexport_versions.h; path = ../OggExport/src/oggexport_versions.h; sourceTree = SOURCE_ROOT; };
+		73744CA00B1A3D07002B059E /* OggExport.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = OggExport.c; path = ../OggExport/src/OggExport.c; sourceTree = SOURCE_ROOT; };
+		73744CA10B1A3D07002B059E /* OggExport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = OggExport.h; path = ../OggExport/src/OggExport.h; sourceTree = SOURCE_ROOT; };
+		73744CA20B1A3D07002B059E /* OggExportDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = OggExportDispatch.h; path = ../OggExport/src/OggExportDispatch.h; sourceTree = SOURCE_ROOT; };
+		73744CA30B1A3D07002B059E /* stream_audio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_audio.c; path = ../OggExport/src/stream_audio.c; sourceTree = SOURCE_ROOT; };
+		73744CA40B1A3D07002B059E /* stream_audio.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_audio.h; path = ../OggExport/src/stream_audio.h; sourceTree = SOURCE_ROOT; };
+		73744CA50B1A3D07002B059E /* stream_types_audio.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_types_audio.h; path = ../OggExport/src/stream_types_audio.h; sourceTree = SOURCE_ROOT; };
+		73744CA60B1A3D07002B059E /* stream_types_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_types_video.h; path = ../OggExport/src/stream_types_video.h; sourceTree = SOURCE_ROOT; };
+		73744CA70B1A3D07002B059E /* stream_video.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_video.c; path = ../OggExport/src/stream_video.c; sourceTree = SOURCE_ROOT; };
+		73744CA80B1A3D07002B059E /* stream_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_video.h; path = ../OggExport/src/stream_video.h; sourceTree = SOURCE_ROOT; };
+		73744CB50B1A3D5E002B059E /* OggExport.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = OggExport.nib; path = ../OggExport/src/OggExport.nib; sourceTree = SOURCE_ROOT; };
+		73744CB60B1A3D5E002B059E /* OggExport.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = OggExport.r; path = ../OggExport/src/OggExport.r; sourceTree = SOURCE_ROOT; };
+		738837B00B19386C005C7A69 /* Vorbis.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Vorbis.xcodeproj; path = "../external-libs/vorbis/macosx/Vorbis.xcodeproj"; sourceTree = SOURCE_ROOT; };
+		738837C50B193896005C7A69 /* Speex.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Speex.xcodeproj; path = "../external-libs/speex/macosx/Speex.xcodeproj"; sourceTree = SOURCE_ROOT; };
+		738837D00B1938B1005C7A69 /* TheoraExp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TheoraExp.xcodeproj; path = "../external-libs/theora-exp/macosx/TheoraExp.xcodeproj"; sourceTree = SOURCE_ROOT; };
+		738837DE0B1938DC005C7A69 /* Theora.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Theora.xcodeproj; path = "../external-libs/theora/macosx/Theora.xcodeproj"; sourceTree = SOURCE_ROOT; };
+		738A452D0B18659A00B43A0C /* Ogg.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Ogg.xcodeproj; path = "../external-libs/ogg/macosx/Ogg.xcodeproj"; sourceTree = SOURCE_ROOT; };
+		8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+		8D01CCD20486CAD60068D4B7 /* XiphQT.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XiphQT.component; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		7326B5370B5AC44B004CE9D3 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				7326B5380B5AC44B004CE9D3 /* libtheora.a in Frameworks */,
+				7326B5390B5AC44B004CE9D3 /* libtheoradec.a in Frameworks */,
+				7326B53A0B5AC44B004CE9D3 /* libflac++.a in Frameworks */,
+				7326B53B0B5AC44B004CE9D3 /* libflac.a in Frameworks */,
+				7326B53C0B5AC44B004CE9D3 /* libspeex.a in Frameworks */,
+				7326B53D0B5AC44B004CE9D3 /* libvorbisenc.a in Frameworks */,
+				7326B53E0B5AC44B004CE9D3 /* libvorbis.a in Frameworks */,
+				7326B53F0B5AC44B004CE9D3 /* libogg.a in Frameworks */,
+				7326B5400B5AC44B004CE9D3 /* Carbon.framework in Frameworks */,
+				7326B5410B5AC44B004CE9D3 /* QuickTime.framework in Frameworks */,
+				7326B5420B5AC44B004CE9D3 /* QuartzCore.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D01CCCD0486CAD60068D4B7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				73744ABC0B1A0CC4002B059E /* libtheora.a in Frameworks */,
+				737449340B19F32D002B059E /* libtheoradec.a in Frameworks */,
+				73744C920B1A3661002B059E /* libflac++.a in Frameworks */,
+				73744C970B1A36D8002B059E /* libflac.a in Frameworks */,
+				737449490B19F67A002B059E /* libspeex.a in Frameworks */,
+				73744A430B1A048C002B059E /* libvorbisenc.a in Frameworks */,
+				737449320B19F317002B059E /* libvorbis.a in Frameworks */,
+				737448E10B19EF8D002B059E /* libogg.a in Frameworks */,
+				8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */,
+				737448DD0B19EF3D002B059E /* QuickTime.framework in Frameworks */,
+				73744A910B1A0BB0002B059E /* QuartzCore.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		089C166AFE841209C02AAC07 /* XiphQT */ = {
+			isa = PBXGroup;
+			children = (
+				08FB77ADFE841716C02AAC07 /* Source */,
+				089C167CFE841241C02AAC07 /* Resources */,
+				738A45290B18604100B43A0C /* libs */,
+				089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
+				19C28FB4FE9D528D11CA2CBB /* Products */,
+			);
+			name = XiphQT;
+			sourceTree = "<group>";
+		};
+		089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
+			isa = PBXGroup;
+			children = (
+				73744A900B1A0BB0002B059E /* QuartzCore.framework */,
+				737448DC0B19EF3D002B059E /* QuickTime.framework */,
+				08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */,
+			);
+			name = "External Frameworks and Libraries";
+			sourceTree = "<group>";
+		};
+		089C167CFE841241C02AAC07 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				737449720B19F8D2002B059E /* OggImport */,
+				73744A310B1A0332002B059E /* CAVorbis */,
+				73744A640B1A0675002B059E /* CASpeex */,
+				73744C450B1A29C9002B059E /* CAFLAC */,
+				73744A860B1A0AC8002B059E /* Theora */,
+				73744CB40B1A3D2B002B059E /* OggExport */,
+				73744A340B1A036E002B059E /* common */,
+				8D01CCD10486CAD60068D4B7 /* Info.plist */,
+				089C167DFE841241C02AAC07 /* InfoPlist.strings */,
+				7326B5520B5AC44B004CE9D3 /* Info (decoders).plist */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		08FB77ADFE841716C02AAC07 /* Source */ = {
+			isa = PBXGroup;
+			children = (
+				737448880B19EAE7002B059E /* OggImport */,
+				737449E60B1A00CC002B059E /* CAVorbis */,
+				73744A4B0B1A060E002B059E /* CASpeex */,
+				73744C440B1A29B9002B059E /* CAFLAC */,
+				73744A730B1A0874002B059E /* Theora */,
+				73744C9D0B1A3C1C002B059E /* OggExport */,
+				737449FB0B1A0197002B059E /* external */,
+				737448C20B19ECC1002B059E /* common */,
+				32BAE0B30371A71500C91783 /* XiphQT_Prefix.pch */,
+			);
+			name = Source;
+			sourceTree = "<group>";
+		};
+		19C28FB4FE9D528D11CA2CBB /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				8D01CCD20486CAD60068D4B7 /* XiphQT.component */,
+				7326B5510B5AC44B004CE9D3 /* XiphQT (decoders).component */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		730B1C8F0B19C33B00E06B34 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				730B1C940B19C33B00E06B34 /* Theora.framework */,
+				730B1C960B19C33B00E06B34 /* libtheora.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		730B1C9A0B19C35300E06B34 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				730B1C9F0B19C35300E06B34 /* TheoraExp.framework */,
+				730B1CA10B19C35300E06B34 /* libtheoradec.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		730B1CA50B19C36500E06B34 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				730B1CAA0B19C36500E06B34 /* Speex.framework */,
+				730B1CAC0B19C36500E06B34 /* libspeex.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		730B1CB00B19C37600E06B34 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				730B1CB70B19C37600E06B34 /* Vorbis.framework */,
+				730B1CB90B19C37600E06B34 /* libvorbis.a */,
+				730B1CBB0B19C37600E06B34 /* libvorbisenc.a */,
+				730B1CBD0B19C37600E06B34 /* libvorbisfile.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		730B1CC10B19C38700E06B34 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				730B1CC60B19C38700E06B34 /* Ogg.framework */,
+				730B1CC80B19C38700E06B34 /* libogg.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		737448880B19EAE7002B059E /* OggImport */ = {
+			isa = PBXGroup;
+			children = (
+				737448C10B19EC3E002B059E /* vorbis */,
+				737448C00B19EC37002B059E /* speex */,
+				737448BF0B19EC2C002B059E /* flac */,
+				737448BE0B19EC18002B059E /* theora */,
+				7374489F0B19EC05002B059E /* common.c */,
+				737448A00B19EC05002B059E /* common.h */,
+				737448A10B19EC05002B059E /* importer_types.h */,
+				737448A20B19EC05002B059E /* OggImport.c */,
+				737448A30B19EC05002B059E /* OggImport.h */,
+				737448A40B19EC05002B059E /* OggImportDispatch.h */,
+				737448A50B19EC05002B059E /* rb.c */,
+				737448A60B19EC05002B059E /* rb.h */,
+				737448B30B19EC05002B059E /* utils.c */,
+				737448B40B19EC05002B059E /* utils.h */,
+				737448B50B19EC05002B059E /* versions.h */,
+			);
+			name = OggImport;
+			sourceTree = "<group>";
+		};
+		737448BE0B19EC18002B059E /* theora */ = {
+			isa = PBXGroup;
+			children = (
+				737448AB0B19EC05002B059E /* stream_theora.c */,
+				737448AC0B19EC05002B059E /* stream_theora.h */,
+				737448AF0B19EC05002B059E /* stream_types_theora.h */,
+			);
+			name = theora;
+			sourceTree = "<group>";
+		};
+		737448BF0B19EC2C002B059E /* flac */ = {
+			isa = PBXGroup;
+			children = (
+				737448A70B19EC05002B059E /* stream_flac.c */,
+				737448A80B19EC05002B059E /* stream_flac.h */,
+				737448AD0B19EC05002B059E /* stream_types_flac.h */,
+			);
+			name = flac;
+			sourceTree = "<group>";
+		};
+		737448C00B19EC37002B059E /* speex */ = {
+			isa = PBXGroup;
+			children = (
+				737448A90B19EC05002B059E /* stream_speex.c */,
+				737448AA0B19EC05002B059E /* stream_speex.h */,
+				737448AE0B19EC05002B059E /* stream_types_speex.h */,
+			);
+			name = speex;
+			sourceTree = "<group>";
+		};
+		737448C10B19EC3E002B059E /* vorbis */ = {
+			isa = PBXGroup;
+			children = (
+				737448B00B19EC05002B059E /* stream_types_vorbis.h */,
+				737448B10B19EC05002B059E /* stream_vorbis.c */,
+				737448B20B19EC05002B059E /* stream_vorbis.h */,
+			);
+			name = vorbis;
+			sourceTree = "<group>";
+		};
+		737448C20B19ECC1002B059E /* common */ = {
+			isa = PBXGroup;
+			children = (
+				737449F30B1A0159002B059E /* ringbuffer.cpp */,
+				737449F40B1A0159002B059E /* ringbuffer.h */,
+				737449F50B1A0159002B059E /* wrap_ogg.cpp */,
+				737449F60B1A0159002B059E /* wrap_ogg.h */,
+				737449EF0B1A012B002B059E /* XCACodec.cpp */,
+				737449F00B1A012B002B059E /* XCACodec.h */,
+				737448C60B19ECF7002B059E /* debug.h */,
+				737448C30B19ECDC002B059E /* config.h */,
+				737448C40B19ECDC002B059E /* data_types.h */,
+				737448C50B19ECDC002B059E /* fccs.h */,
+			);
+			name = common;
+			sourceTree = "<group>";
+		};
+		737449720B19F8D2002B059E /* OggImport */ = {
+			isa = PBXGroup;
+			children = (
+				737449AF0B19F93E002B059E /* OggImport.r */,
+				737449730B19F922002B059E /* MetaDataConfig.plist */,
+			);
+			name = OggImport;
+			sourceTree = "<group>";
+		};
+		737449E60B1A00CC002B059E /* CAVorbis */ = {
+			isa = PBXGroup;
+			children = (
+				73744A380B1A03E6002B059E /* CAVorbisEncoder.cpp */,
+				73744A390B1A03E6002B059E /* CAVorbisEncoder.h */,
+				73744A250B1A031D002B059E /* CAOggVorbisDecoder.cpp */,
+				73744A260B1A031D002B059E /* CAOggVorbisDecoder.h */,
+				73744A270B1A031D002B059E /* CAVorbisDecoder.cpp */,
+				73744A280B1A031D002B059E /* CAVorbisDecoder.h */,
+				73744A290B1A031D002B059E /* vorbis_entrypoints.cpp */,
+				73744A2A0B1A031D002B059E /* vorbis_versions.h */,
+			);
+			name = CAVorbis;
+			sourceTree = "<group>";
+		};
+		737449FB0B1A0197002B059E /* external */ = {
+			isa = PBXGroup;
+			children = (
+				737449FC0B1A01C9002B059E /* AppleSDK */,
+			);
+			name = external;
+			sourceTree = "<group>";
+		};
+		737449FC0B1A01C9002B059E /* AppleSDK */ = {
+			isa = PBXGroup;
+			children = (
+				737449FD0B1A01E9002B059E /* CoreAudio */,
+			);
+			name = AppleSDK;
+			sourceTree = "<group>";
+		};
+		737449FD0B1A01E9002B059E /* CoreAudio */ = {
+			isa = PBXGroup;
+			children = (
+				737449FE0B1A01F8002B059E /* AudioCodecs */,
+				73744A000B1A0219002B059E /* PublicUtility */,
+			);
+			name = CoreAudio;
+			sourceTree = "<group>";
+		};
+		737449FE0B1A01F8002B059E /* AudioCodecs */ = {
+			isa = PBXGroup;
+			children = (
+				73744A010B1A023D002B059E /* AudioCodecComponentGlue.c */,
+				737449FF0B1A020D002B059E /* ACPublic */,
+			);
+			name = AudioCodecs;
+			sourceTree = "<group>";
+		};
+		737449FF0B1A020D002B059E /* ACPublic */ = {
+			isa = PBXGroup;
+			children = (
+				73744A030B1A0270002B059E /* ACBaseCodec.cpp */,
+				73744A040B1A0270002B059E /* ACBaseCodec.h */,
+				73744A050B1A0270002B059E /* ACCodec.cpp */,
+				73744A060B1A0270002B059E /* ACCodec.h */,
+				73744A070B1A0270002B059E /* ACCodecDispatch.h */,
+				73744A080B1A0270002B059E /* ACCodecDispatchTypes.h */,
+				73744A090B1A0270002B059E /* ACConditionalMacros.h */,
+				73744A0A0B1A0270002B059E /* GetCodecBundle.cpp */,
+				73744A0B0B1A0270002B059E /* GetCodecBundle.h */,
+			);
+			name = ACPublic;
+			sourceTree = "<group>";
+		};
+		73744A000B1A0219002B059E /* PublicUtility */ = {
+			isa = PBXGroup;
+			children = (
+				73744A150B1A0288002B059E /* CABundleLocker.cpp */,
+				73744A160B1A0288002B059E /* CABundleLocker.h */,
+				73744A170B1A0288002B059E /* CAConditionalMacros.h */,
+				73744A180B1A0288002B059E /* CADebugMacros.cpp */,
+				73744A190B1A0288002B059E /* CADebugMacros.h */,
+				73744A1A0B1A0288002B059E /* CAMath.h */,
+				73744A1B0B1A0288002B059E /* CAStreamBasicDescription.cpp */,
+				73744A1C0B1A0288002B059E /* CAStreamBasicDescription.h */,
+			);
+			name = PublicUtility;
+			sourceTree = "<group>";
+		};
+		73744A310B1A0332002B059E /* CAVorbis */ = {
+			isa = PBXGroup;
+			children = (
+				73744A3C0B1A043F002B059E /* CAVorbisEncoderPublic.r */,
+				73744A320B1A035B002B059E /* CAVorbisDecoderPublic.r */,
+			);
+			name = CAVorbis;
+			sourceTree = "<group>";
+		};
+		73744A340B1A036E002B059E /* common */ = {
+			isa = PBXGroup;
+			children = (
+				73744A350B1A0382002B059E /* XCAResources.r */,
+			);
+			name = common;
+			sourceTree = "<group>";
+		};
+		73744A4B0B1A060E002B059E /* CASpeex */ = {
+			isa = PBXGroup;
+			children = (
+				73744A570B1A0657002B059E /* CAOggSpeexDecoder.cpp */,
+				73744A580B1A0657002B059E /* CAOggSpeexDecoder.h */,
+				73744A590B1A0657002B059E /* CASpeexDecoder.cpp */,
+				73744A5A0B1A0657002B059E /* CASpeexDecoder.h */,
+				73744A5B0B1A0657002B059E /* speex_entrypoints.cpp */,
+				73744A5C0B1A0657002B059E /* speex_versions.h */,
+			);
+			name = CASpeex;
+			sourceTree = "<group>";
+		};
+		73744A640B1A0675002B059E /* CASpeex */ = {
+			isa = PBXGroup;
+			children = (
+				73744A650B1A068A002B059E /* CASpeexDecoderPublic.r */,
+			);
+			name = CASpeex;
+			sourceTree = "<group>";
+		};
+		73744A730B1A0874002B059E /* Theora */ = {
+			isa = PBXGroup;
+			children = (
+				73744A740B1A0A82002B059E /* decoder_types.h */,
+				73744A750B1A0A82002B059E /* encoder_types.h */,
+				73744A760B1A0A82002B059E /* theora_versions.h */,
+				73744A770B1A0A82002B059E /* TheoraDecoder.c */,
+				73744A780B1A0A82002B059E /* TheoraDecoder.h */,
+				73744A790B1A0A82002B059E /* TheoraDecoderDispatch.h */,
+				73744A7A0B1A0A82002B059E /* TheoraEncoder.c */,
+				73744A7B0B1A0A82002B059E /* TheoraEncoder.h */,
+				73744A7C0B1A0A82002B059E /* TheoraEncoderDispatch.h */,
+			);
+			name = Theora;
+			sourceTree = "<group>";
+		};
+		73744A860B1A0AC8002B059E /* Theora */ = {
+			isa = PBXGroup;
+			children = (
+				73744A870B1A0AFF002B059E /* TheoraDecoder.r */,
+				73744A880B1A0AFF002B059E /* TheoraEncoder.r */,
+			);
+			name = Theora;
+			sourceTree = "<group>";
+		};
+		73744C350B1A25B2002B059E /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				73744C3C0B1A25B2002B059E /* FLAC.framework */,
+				73744C3E0B1A25B2002B059E /* FLAC++.framework */,
+				73744C400B1A25B2002B059E /* libflac.a */,
+				73744C420B1A25B2002B059E /* libflac++.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		73744C440B1A29B9002B059E /* CAFLAC */ = {
+			isa = PBXGroup;
+			children = (
+				73744C600B1A2AD8002B059E /* CAFLACDecoder.cpp */,
+				73744C610B1A2AD8002B059E /* CAFLACDecoder.h */,
+				73744C620B1A2AD8002B059E /* CAOggFLACDecoder.cpp */,
+				73744C630B1A2AD8002B059E /* CAOggFLACDecoder.h */,
+				73744C640B1A2AD8002B059E /* flac_entrypoints.cpp */,
+				73744C650B1A2AD8002B059E /* flac_versions.h */,
+			);
+			name = CAFLAC;
+			sourceTree = "<group>";
+		};
+		73744C450B1A29C9002B059E /* CAFLAC */ = {
+			isa = PBXGroup;
+			children = (
+				73744C6C0B1A2B78002B059E /* CAFLACDecoderPublic.r */,
+			);
+			name = CAFLAC;
+			sourceTree = "<group>";
+		};
+		73744C9D0B1A3C1C002B059E /* OggExport */ = {
+			isa = PBXGroup;
+			children = (
+				73744C9E0B1A3D07002B059E /* exporter_types.h */,
+				73744C9F0B1A3D07002B059E /* oggexport_versions.h */,
+				73744CA00B1A3D07002B059E /* OggExport.c */,
+				73744CA10B1A3D07002B059E /* OggExport.h */,
+				73744CA20B1A3D07002B059E /* OggExportDispatch.h */,
+				73744CA30B1A3D07002B059E /* stream_audio.c */,
+				73744CA40B1A3D07002B059E /* stream_audio.h */,
+				73744CA50B1A3D07002B059E /* stream_types_audio.h */,
+				73744CA60B1A3D07002B059E /* stream_types_video.h */,
+				73744CA70B1A3D07002B059E /* stream_video.c */,
+				73744CA80B1A3D07002B059E /* stream_video.h */,
+			);
+			name = OggExport;
+			sourceTree = "<group>";
+		};
+		73744CB40B1A3D2B002B059E /* OggExport */ = {
+			isa = PBXGroup;
+			children = (
+				73744CB50B1A3D5E002B059E /* OggExport.nib */,
+				73744CB60B1A3D5E002B059E /* OggExport.r */,
+			);
+			name = OggExport;
+			sourceTree = "<group>";
+		};
+		738A45290B18604100B43A0C /* libs */ = {
+			isa = PBXGroup;
+			children = (
+				73744C260B1A25A2002B059E /* FLAC.xcodeproj */,
+				738837DE0B1938DC005C7A69 /* Theora.xcodeproj */,
+				738837D00B1938B1005C7A69 /* TheoraExp.xcodeproj */,
+				738837C50B193896005C7A69 /* Speex.xcodeproj */,
+				738837B00B19386C005C7A69 /* Vorbis.xcodeproj */,
+				738A452D0B18659A00B43A0C /* Ogg.xcodeproj */,
+			);
+			name = libs;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		7326B5010B5AC44B004CE9D3 /* XiphQT (decoders) */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 7326B54E0B5AC44B004CE9D3 /* Build configuration list for PBXNativeTarget "XiphQT (decoders)" */;
+			buildPhases = (
+				7326B5120B5AC44B004CE9D3 /* Resources */,
+				7326B5150B5AC44B004CE9D3 /* Sources */,
+				7326B5370B5AC44B004CE9D3 /* Frameworks */,
+				7326B5430B5AC44B004CE9D3 /* Rez */,
+				7326B54C0B5AC44B004CE9D3 /* CopyFiles */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				7326B5020B5AC44B004CE9D3 /* PBXTargetDependency */,
+				7326B5040B5AC44B004CE9D3 /* PBXTargetDependency */,
+				7326B5080B5AC44B004CE9D3 /* PBXTargetDependency */,
+				7326B50A0B5AC44B004CE9D3 /* PBXTargetDependency */,
+				7326B50C0B5AC44B004CE9D3 /* PBXTargetDependency */,
+				7326B50E0B5AC44B004CE9D3 /* PBXTargetDependency */,
+			);
+			name = "XiphQT (decoders)";
+			productInstallPath = "$(HOME)/Library/Bundles";
+			productName = XiphQT;
+			productReference = 7326B5510B5AC44B004CE9D3 /* XiphQT (decoders).component */;
+			productType = "com.apple.product-type.bundle";
+		};
+		8D01CCC60486CAD60068D4B7 /* XiphQT */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 4FADC23308B4156C00ABE55E /* Build configuration list for PBXNativeTarget "XiphQT" */;
+			buildPhases = (
+				8D01CCC90486CAD60068D4B7 /* Resources */,
+				8D01CCCB0486CAD60068D4B7 /* Sources */,
+				8D01CCCD0486CAD60068D4B7 /* Frameworks */,
+				737449BB0B19F993002B059E /* Rez */,
+				737449BE0B19F9C0002B059E /* CopyFiles */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				737449210B19F043002B059E /* PBXTargetDependency */,
+				737449430B19F64B002B059E /* PBXTargetDependency */,
+				73744A400B1A045B002B059E /* PBXTargetDependency */,
+				737449450B19F653002B059E /* PBXTargetDependency */,
+				73744C750B1A2D44002B059E /* PBXTargetDependency */,
+				73744C770B1A2D44002B059E /* PBXTargetDependency */,
+				737449470B19F662002B059E /* PBXTargetDependency */,
+				73744A990B1A0BEA002B059E /* PBXTargetDependency */,
+			);
+			name = XiphQT;
+			productInstallPath = "$(HOME)/Library/Bundles";
+			productName = XiphQT;
+			productReference = 8D01CCD20486CAD60068D4B7 /* XiphQT.component */;
+			productType = "com.apple.product-type.bundle";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		089C1669FE841209C02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 4FADC23708B4156C00ABE55E /* Build configuration list for PBXProject "XiphQT" */;
+			hasScannedForEncodings = 1;
+			mainGroup = 089C166AFE841209C02AAC07 /* XiphQT */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = 73744C350B1A25B2002B059E /* Products */;
+					ProjectRef = 73744C260B1A25A2002B059E /* FLAC.xcodeproj */;
+				},
+				{
+					ProductGroup = 730B1CC10B19C38700E06B34 /* Products */;
+					ProjectRef = 738A452D0B18659A00B43A0C /* Ogg.xcodeproj */;
+				},
+				{
+					ProductGroup = 730B1CA50B19C36500E06B34 /* Products */;
+					ProjectRef = 738837C50B193896005C7A69 /* Speex.xcodeproj */;
+				},
+				{
+					ProductGroup = 730B1C8F0B19C33B00E06B34 /* Products */;
+					ProjectRef = 738837DE0B1938DC005C7A69 /* Theora.xcodeproj */;
+				},
+				{
+					ProductGroup = 730B1C9A0B19C35300E06B34 /* Products */;
+					ProjectRef = 738837D00B1938B1005C7A69 /* TheoraExp.xcodeproj */;
+				},
+				{
+					ProductGroup = 730B1CB00B19C37600E06B34 /* Products */;
+					ProjectRef = 738837B00B19386C005C7A69 /* Vorbis.xcodeproj */;
+				},
+			);
+			targets = (
+				8D01CCC60486CAD60068D4B7 /* XiphQT */,
+				7326B5010B5AC44B004CE9D3 /* XiphQT (decoders) */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		730B1C940B19C33B00E06B34 /* Theora.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = Theora.framework;
+			remoteRef = 730B1C930B19C33B00E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1C960B19C33B00E06B34 /* libtheora.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libtheora.a;
+			remoteRef = 730B1C950B19C33B00E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1C9F0B19C35300E06B34 /* TheoraExp.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = TheoraExp.framework;
+			remoteRef = 730B1C9E0B19C35300E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1CA10B19C35300E06B34 /* libtheoradec.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libtheoradec.a;
+			remoteRef = 730B1CA00B19C35300E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1CAA0B19C36500E06B34 /* Speex.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = Speex.framework;
+			remoteRef = 730B1CA90B19C36500E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1CAC0B19C36500E06B34 /* libspeex.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libspeex.a;
+			remoteRef = 730B1CAB0B19C36500E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1CB70B19C37600E06B34 /* Vorbis.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = Vorbis.framework;
+			remoteRef = 730B1CB60B19C37600E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1CB90B19C37600E06B34 /* libvorbis.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libvorbis.a;
+			remoteRef = 730B1CB80B19C37600E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1CBB0B19C37600E06B34 /* libvorbisenc.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libvorbisenc.a;
+			remoteRef = 730B1CBA0B19C37600E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1CBD0B19C37600E06B34 /* libvorbisfile.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libvorbisfile.a;
+			remoteRef = 730B1CBC0B19C37600E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1CC60B19C38700E06B34 /* Ogg.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = Ogg.framework;
+			remoteRef = 730B1CC50B19C38700E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		730B1CC80B19C38700E06B34 /* libogg.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libogg.a;
+			remoteRef = 730B1CC70B19C38700E06B34 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		73744C3C0B1A25B2002B059E /* FLAC.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = FLAC.framework;
+			remoteRef = 73744C3B0B1A25B2002B059E /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		73744C3E0B1A25B2002B059E /* FLAC++.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = "FLAC++.framework";
+			remoteRef = 73744C3D0B1A25B2002B059E /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		73744C400B1A25B2002B059E /* libflac.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libflac.a;
+			remoteRef = 73744C3F0B1A25B2002B059E /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		73744C420B1A25B2002B059E /* libflac++.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = "libflac++.a";
+			remoteRef = 73744C410B1A25B2002B059E /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		7326B5120B5AC44B004CE9D3 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				7326B5130B5AC44B004CE9D3 /* InfoPlist.strings in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D01CCC90486CAD60068D4B7 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */,
+				73744CB70B1A3D5E002B059E /* OggExport.nib in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXRezBuildPhase section */
+		7326B5430B5AC44B004CE9D3 /* Rez */ = {
+			isa = PBXRezBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				7326B5440B5AC44B004CE9D3 /* OggImport.r in Rez */,
+				7326B5450B5AC44B004CE9D3 /* CAVorbisDecoderPublic.r in Rez */,
+				7326B5470B5AC44B004CE9D3 /* CASpeexDecoderPublic.r in Rez */,
+				7326B5480B5AC44B004CE9D3 /* TheoraDecoder.r in Rez */,
+				7326B54A0B5AC44B004CE9D3 /* CAFLACDecoderPublic.r in Rez */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		737449BB0B19F993002B059E /* Rez */ = {
+			isa = PBXRezBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				737449BD0B19F99D002B059E /* OggImport.r in Rez */,
+				73744A330B1A035B002B059E /* CAVorbisDecoderPublic.r in Rez */,
+				73744A3D0B1A043F002B059E /* CAVorbisEncoderPublic.r in Rez */,
+				73744A660B1A068A002B059E /* CASpeexDecoderPublic.r in Rez */,
+				73744A890B1A0AFF002B059E /* TheoraDecoder.r in Rez */,
+				73744A8A0B1A0AFF002B059E /* TheoraEncoder.r in Rez */,
+				73744C6D0B1A2B78002B059E /* CAFLACDecoderPublic.r in Rez */,
+				73744CB80B1A3D5E002B059E /* OggExport.r in Rez */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		7326B5150B5AC44B004CE9D3 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				7326B5160B5AC44B004CE9D3 /* common.c in Sources */,
+				7326B5170B5AC44B004CE9D3 /* OggImport.c in Sources */,
+				7326B5180B5AC44B004CE9D3 /* rb.c in Sources */,
+				7326B5190B5AC44B004CE9D3 /* stream_flac.c in Sources */,
+				7326B51A0B5AC44B004CE9D3 /* stream_speex.c in Sources */,
+				7326B51B0B5AC44B004CE9D3 /* stream_theora.c in Sources */,
+				7326B51C0B5AC44B004CE9D3 /* stream_vorbis.c in Sources */,
+				7326B51D0B5AC44B004CE9D3 /* utils.c in Sources */,
+				7326B51E0B5AC44B004CE9D3 /* XCACodec.cpp in Sources */,
+				7326B51F0B5AC44B004CE9D3 /* ringbuffer.cpp in Sources */,
+				7326B5200B5AC44B004CE9D3 /* wrap_ogg.cpp in Sources */,
+				7326B5210B5AC44B004CE9D3 /* AudioCodecComponentGlue.c in Sources */,
+				7326B5220B5AC44B004CE9D3 /* ACBaseCodec.cpp in Sources */,
+				7326B5230B5AC44B004CE9D3 /* ACCodec.cpp in Sources */,
+				7326B5240B5AC44B004CE9D3 /* GetCodecBundle.cpp in Sources */,
+				7326B5250B5AC44B004CE9D3 /* CABundleLocker.cpp in Sources */,
+				7326B5260B5AC44B004CE9D3 /* CADebugMacros.cpp in Sources */,
+				7326B5270B5AC44B004CE9D3 /* CAStreamBasicDescription.cpp in Sources */,
+				7326B5280B5AC44B004CE9D3 /* CAOggVorbisDecoder.cpp in Sources */,
+				7326B5290B5AC44B004CE9D3 /* CAVorbisDecoder.cpp in Sources */,
+				7326B52A0B5AC44B004CE9D3 /* vorbis_entrypoints.cpp in Sources */,
+				7326B52C0B5AC44B004CE9D3 /* CAOggSpeexDecoder.cpp in Sources */,
+				7326B52D0B5AC44B004CE9D3 /* CASpeexDecoder.cpp in Sources */,
+				7326B52E0B5AC44B004CE9D3 /* speex_entrypoints.cpp in Sources */,
+				7326B52F0B5AC44B004CE9D3 /* TheoraDecoder.c in Sources */,
+				7326B5310B5AC44B004CE9D3 /* CAFLACDecoder.cpp in Sources */,
+				7326B5320B5AC44B004CE9D3 /* CAOggFLACDecoder.cpp in Sources */,
+				7326B5330B5AC44B004CE9D3 /* flac_entrypoints.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D01CCCB0486CAD60068D4B7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				737448B60B19EC05002B059E /* common.c in Sources */,
+				737448B70B19EC05002B059E /* OggImport.c in Sources */,
+				737448B80B19EC05002B059E /* rb.c in Sources */,
+				737448B90B19EC05002B059E /* stream_flac.c in Sources */,
+				737448BA0B19EC05002B059E /* stream_speex.c in Sources */,
+				737448BB0B19EC05002B059E /* stream_theora.c in Sources */,
+				737448BC0B19EC05002B059E /* stream_vorbis.c in Sources */,
+				737448BD0B19EC05002B059E /* utils.c in Sources */,
+				737449F10B1A012B002B059E /* XCACodec.cpp in Sources */,
+				737449F70B1A0159002B059E /* ringbuffer.cpp in Sources */,
+				737449F90B1A0159002B059E /* wrap_ogg.cpp in Sources */,
+				73744A020B1A023D002B059E /* AudioCodecComponentGlue.c in Sources */,
+				73744A0C0B1A0270002B059E /* ACBaseCodec.cpp in Sources */,
+				73744A0E0B1A0270002B059E /* ACCodec.cpp in Sources */,
+				73744A130B1A0270002B059E /* GetCodecBundle.cpp in Sources */,
+				73744A1D0B1A0288002B059E /* CABundleLocker.cpp in Sources */,
+				73744A200B1A0288002B059E /* CADebugMacros.cpp in Sources */,
+				73744A230B1A0288002B059E /* CAStreamBasicDescription.cpp in Sources */,
+				73744A2B0B1A031D002B059E /* CAOggVorbisDecoder.cpp in Sources */,
+				73744A2D0B1A031D002B059E /* CAVorbisDecoder.cpp in Sources */,
+				73744A2F0B1A031D002B059E /* vorbis_entrypoints.cpp in Sources */,
+				73744A3A0B1A03E6002B059E /* CAVorbisEncoder.cpp in Sources */,
+				73744A5D0B1A0657002B059E /* CAOggSpeexDecoder.cpp in Sources */,
+				73744A5F0B1A0657002B059E /* CASpeexDecoder.cpp in Sources */,
+				73744A630B1A065C002B059E /* speex_entrypoints.cpp in Sources */,
+				73744A800B1A0A82002B059E /* TheoraDecoder.c in Sources */,
+				73744A830B1A0A82002B059E /* TheoraEncoder.c in Sources */,
+				73744C660B1A2AD8002B059E /* CAFLACDecoder.cpp in Sources */,
+				73744C680B1A2AD8002B059E /* CAOggFLACDecoder.cpp in Sources */,
+				73744C6A0B1A2AD8002B059E /* flac_entrypoints.cpp in Sources */,
+				73744CAB0B1A3D07002B059E /* OggExport.c in Sources */,
+				73744CAE0B1A3D07002B059E /* stream_audio.c in Sources */,
+				73744CB20B1A3D07002B059E /* stream_video.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		7326B5020B5AC44B004CE9D3 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libogg (static)";
+			targetProxy = 7326B5030B5AC44B004CE9D3 /* PBXContainerItemProxy */;
+		};
+		7326B5040B5AC44B004CE9D3 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libvorbis (static)";
+			targetProxy = 7326B5050B5AC44B004CE9D3 /* PBXContainerItemProxy */;
+		};
+		7326B5080B5AC44B004CE9D3 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libspeex (static)";
+			targetProxy = 7326B5090B5AC44B004CE9D3 /* PBXContainerItemProxy */;
+		};
+		7326B50A0B5AC44B004CE9D3 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libflac (static)";
+			targetProxy = 7326B50B0B5AC44B004CE9D3 /* PBXContainerItemProxy */;
+		};
+		7326B50C0B5AC44B004CE9D3 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libflac++ (static)";
+			targetProxy = 7326B50D0B5AC44B004CE9D3 /* PBXContainerItemProxy */;
+		};
+		7326B50E0B5AC44B004CE9D3 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libtheoradec (static)";
+			targetProxy = 7326B50F0B5AC44B004CE9D3 /* PBXContainerItemProxy */;
+		};
+		737449210B19F043002B059E /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libogg (static)";
+			targetProxy = 737449200B19F043002B059E /* PBXContainerItemProxy */;
+		};
+		737449430B19F64B002B059E /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libvorbis (static)";
+			targetProxy = 737449420B19F64B002B059E /* PBXContainerItemProxy */;
+		};
+		737449450B19F653002B059E /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libspeex (static)";
+			targetProxy = 737449440B19F653002B059E /* PBXContainerItemProxy */;
+		};
+		737449470B19F662002B059E /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libtheoradec (static)";
+			targetProxy = 737449460B19F662002B059E /* PBXContainerItemProxy */;
+		};
+		73744A400B1A045B002B059E /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libvorbisenc (static)";
+			targetProxy = 73744A3F0B1A045B002B059E /* PBXContainerItemProxy */;
+		};
+		73744A990B1A0BEA002B059E /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libtheora (static)";
+			targetProxy = 73744A980B1A0BEA002B059E /* PBXContainerItemProxy */;
+		};
+		73744C750B1A2D44002B059E /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libflac (static)";
+			targetProxy = 73744C740B1A2D44002B059E /* PBXContainerItemProxy */;
+		};
+		73744C770B1A2D44002B059E /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "libflac++ (static)";
+			targetProxy = 73744C760B1A2D44002B059E /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				089C167EFE841241C02AAC07 /* English */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		4FADC23408B4156C00ABE55E /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = XiphQT_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					"XIPHQT_BUNDLE_ID=org.xiph.xiph-qt.xiphqt",
+				);
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					"../external-libs/ogg/include",
+					"../external-libs/vorbis/include",
+					"../external-libs/speex/include",
+					"../external-libs/theora-exp/include",
+					"../external-libs/theora/include",
+					"../external-libs/flac/include",
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = "$(HOME)/Library/QuickTime";
+				OTHER_REZFLAGS = "$(inherited) -D TARGET_REZ_MAC_PPC=1 -D BUILD_UNIVERSAL";
+				PRODUCT_NAME = XiphQT;
+				WRAPPER_EXTENSION = component;
+				ZERO_LINK = YES;
+			};
+			name = Debug;
+		};
+		4FADC23508B4156C00ABE55E /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					ppc,
+					i386,
+				);
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = XiphQT_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					"XIPHQT_BUNDLE_ID=org.xiph.xiph-qt.xiphqt",
+				);
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					"../external-libs/ogg/include",
+					"../external-libs/vorbis/include",
+					"../external-libs/speex/include",
+					"../external-libs/theora-exp/include",
+					"../external-libs/theora/include",
+					"../external-libs/flac/include",
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = "$(HOME)/Library/QuickTime";
+				OTHER_CFLAGS = (
+					"$(inherited)",
+					"-falign-loops=16",
+					"-ffast-math",
+				);
+				OTHER_REZFLAGS = "$(inherited) -D TARGET_REZ_MAC_PPC=1 -D BUILD_UNIVERSAL";
+				PRODUCT_NAME = XiphQT;
+				WRAPPER_EXTENSION = component;
+			};
+			name = Release;
+		};
+		4FADC23808B4156C00ABE55E /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					__MACOSX__,
+				);
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				PREBINDING = NO;
+				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+			};
+			name = Debug;
+		};
+		4FADC23908B4156C00ABE55E /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_OPTIMIZATION_LEVEL = 3;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					__MACOSX__,
+					NDEBUG,
+				);
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				PREBINDING = NO;
+				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+			};
+			name = Release;
+		};
+		7326B54F0B5AC44B004CE9D3 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = XiphQT_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					"XIPHQT_BUNDLE_ID=org.xiph.xiph-qt.xiphqt-decoders",
+					XIPHQT_NO_ENCODERS,
+				);
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					"../external-libs/ogg/include",
+					"../external-libs/vorbis/include",
+					"../external-libs/speex/include",
+					"../external-libs/theora-exp/include",
+					"../external-libs/theora/include",
+					"../external-libs/flac/include",
+				);
+				INFOPLIST_FILE = "Info (decoders).plist";
+				INSTALL_PATH = "$(HOME)/Library/QuickTime";
+				OTHER_REZFLAGS = "$(inherited) -D TARGET_REZ_MAC_PPC=1 -D BUILD_UNIVERSAL";
+				PRODUCT_NAME = "XiphQT (decoders)";
+				WRAPPER_EXTENSION = component;
+				ZERO_LINK = YES;
+			};
+			name = Debug;
+		};
+		7326B5500B5AC44B004CE9D3 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					ppc,
+					i386,
+				);
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = XiphQT_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					"XIPHQT_BUNDLE_ID=org.xiph.xiph-qt.xiphqt-decoders",
+					XIPHQT_NO_ENCODERS,
+				);
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					"../external-libs/ogg/include",
+					"../external-libs/vorbis/include",
+					"../external-libs/speex/include",
+					"../external-libs/theora-exp/include",
+					"../external-libs/theora/include",
+					"../external-libs/flac/include",
+				);
+				INFOPLIST_FILE = "Info (decoders).plist";
+				INSTALL_PATH = "$(HOME)/Library/QuickTime";
+				OTHER_CFLAGS = (
+					"$(inherited)",
+					"-falign-loops=16",
+					"-ffast-math",
+				);
+				OTHER_REZFLAGS = "$(inherited) -D TARGET_REZ_MAC_PPC=1 -D BUILD_UNIVERSAL";
+				PRODUCT_NAME = "XiphQT (decoders)";
+				WRAPPER_EXTENSION = component;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		4FADC23308B4156C00ABE55E /* Build configuration list for PBXNativeTarget "XiphQT" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				4FADC23408B4156C00ABE55E /* Debug */,
+				4FADC23508B4156C00ABE55E /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		4FADC23708B4156C00ABE55E /* Build configuration list for PBXProject "XiphQT" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				4FADC23808B4156C00ABE55E /* Debug */,
+				4FADC23908B4156C00ABE55E /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		7326B54E0B5AC44B004CE9D3 /* Build configuration list for PBXNativeTarget "XiphQT (decoders)" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				7326B54F0B5AC44B004CE9D3 /* Debug */,
+				7326B5500B5AC44B004CE9D3 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 089C1669FE841209C02AAC07 /* Project object */;
+}

Added: trunk/xiph-qt/build-macosx/XiphQT_Prefix.pch
===================================================================
--- trunk/xiph-qt/build-macosx/XiphQT_Prefix.pch	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/build-macosx/XiphQT_Prefix.pch	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,5 @@
+//
+// Prefix header for all source files of the 'XiphQT' target in the 'XiphQT' project.
+//
+
+#include <Carbon/Carbon.h>


Property changes on: trunk/xiph-qt/build-macosx/flac-support
___________________________________________________________________
Name: svn:ignore
   + build


Added: trunk/xiph-qt/build-macosx/flac-support/English.lproj/InfoPlist.strings
===================================================================
(Binary files differ)


Property changes on: trunk/xiph-qt/build-macosx/flac-support/English.lproj/InfoPlist.strings
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/xiph-qt/build-macosx/flac-support/FLAC++-Info.plist
===================================================================
--- trunk/xiph-qt/build-macosx/flac-support/FLAC++-Info.plist	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/build-macosx/flac-support/FLAC++-Info.plist	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>FLAC++</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>org.xiph.flac++</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.1.3</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.1.3</string>
+	<key>CSResourcesFileMapped</key>
+	<true/>
+</dict>
+</plist>

Added: trunk/xiph-qt/build-macosx/flac-support/FLAC++_Prefix.pch
===================================================================
--- trunk/xiph-qt/build-macosx/flac-support/FLAC++_Prefix.pch	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/build-macosx/flac-support/FLAC++_Prefix.pch	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,5 @@
+//
+// Prefix header for all source files of the 'FLAC++' target in the 'FLAC' project.
+//
+
+#include <Carbon/Carbon.h>


Property changes on: trunk/xiph-qt/build-macosx/flac-support/FLAC.xcodeproj
___________________________________________________________________
Name: svn:ignore
   + *.mode*
*.pbxuser


Added: trunk/xiph-qt/build-macosx/flac-support/FLAC.xcodeproj/project.pbxproj
===================================================================
--- trunk/xiph-qt/build-macosx/flac-support/FLAC.xcodeproj/project.pbxproj	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/build-macosx/flac-support/FLAC.xcodeproj/project.pbxproj	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,934 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 42;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		73744B060B1A1925002B059E /* window.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744B050B1A1925002B059E /* window.c */; };
+		73744B1F0B1A1D3A002B059E /* bitbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1963D0A0D1AB900D40234 /* bitbuffer.c */; };
+		73744B200B1A1D3A002B059E /* bitmath.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1963E0A0D1AB900D40234 /* bitmath.c */; };
+		73744B210B1A1D3B002B059E /* cpu.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1963F0A0D1AB900D40234 /* cpu.c */; };
+		73744B220B1A1D3C002B059E /* crc.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196400A0D1AB900D40234 /* crc.c */; };
+		73744B230B1A1D3D002B059E /* fixed.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196430A0D1AB900D40234 /* fixed.c */; };
+		73744B240B1A1D3E002B059E /* float.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196440A0D1AB900D40234 /* float.c */; };
+		73744B250B1A1D3F002B059E /* format.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196450A0D1AB900D40234 /* format.c */; };
+		73744B260B1A1D40002B059E /* lpc.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196460A0D1AB900D40234 /* lpc.c */; };
+		73744B270B1A1D40002B059E /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196470A0D1AB900D40234 /* md5.c */; };
+		73744B280B1A1D41002B059E /* memory.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196480A0D1AB900D40234 /* memory.c */; };
+		73744B290B1A1D41002B059E /* metadata_iterators.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196490A0D1AB900D40234 /* metadata_iterators.c */; };
+		73744B2A0B1A1D42002B059E /* metadata_object.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1964A0A0D1AB900D40234 /* metadata_object.c */; };
+		73744B2B0B1A1D43002B059E /* stream_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1964D0A0D1AB900D40234 /* stream_decoder.c */; };
+		73744B2C0B1A1D43002B059E /* stream_encoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1964F0A0D1AB900D40234 /* stream_encoder.c */; };
+		73744B2D0B1A1D44002B059E /* stream_encoder_framing.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1964E0A0D1AB900D40234 /* stream_encoder_framing.c */; };
+		73744B2E0B1A1D45002B059E /* window.c in Sources */ = {isa = PBXBuildFile; fileRef = 73744B050B1A1925002B059E /* window.c */; };
+		73744B530B1A2205002B059E /* metadata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73E196A50A0D277600D40234 /* metadata.cpp */; };
+		73744B540B1A2205002B059E /* stream_decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73E196A80A0D277600D40234 /* stream_decoder.cpp */; };
+		73744B550B1A2206002B059E /* stream_encoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73E196A90A0D277600D40234 /* stream_encoder.cpp */; };
+		73E1961C0A0D19CE00D40234 /* all.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195D40A0D189900D40234 /* all.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E1961D0A0D19CE00D40234 /* assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195D50A0D189900D40234 /* assert.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E1961E0A0D19CE00D40234 /* callback.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195D60A0D189900D40234 /* callback.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E1961F0A0D19CE00D40234 /* export.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195D70A0D189900D40234 /* export.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196220A0D19CE00D40234 /* format.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195DA0A0D189900D40234 /* format.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196230A0D19CE00D40234 /* metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195DB0A0D189900D40234 /* metadata.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196240A0D19CE00D40234 /* ordinals.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195DC0A0D189900D40234 /* ordinals.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196270A0D19CE00D40234 /* stream_decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195DF0A0D189900D40234 /* stream_decoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196280A0D19CE00D40234 /* stream_encoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195E00A0D189900D40234 /* stream_encoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196290A0D1A1E00D40234 /* all.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195F40A0D191000D40234 /* all.h */; };
+		73E1962E0A0D1A1E00D40234 /* stream_decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195F90A0D191000D40234 /* stream_decoder.h */; };
+		73E1962F0A0D1A1E00D40234 /* stream_encoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E195FA0A0D191000D40234 /* stream_encoder.h */; };
+		73E196300A0D1A1E00D40234 /* all.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E196020A0D193600D40234 /* all.h */; };
+		73E196310A0D1A1E00D40234 /* bitbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E196030A0D193700D40234 /* bitbuffer.h */; };
+		73E196320A0D1A1E00D40234 /* bitmath.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E196040A0D193700D40234 /* bitmath.h */; };
+		73E196330A0D1A1E00D40234 /* cpu.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E196050A0D193700D40234 /* cpu.h */; };
+		73E196340A0D1A1E00D40234 /* crc.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E196060A0D193700D40234 /* crc.h */; };
+		73E196350A0D1A1E00D40234 /* fixed.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E196070A0D193700D40234 /* fixed.h */; };
+		73E196360A0D1A1E00D40234 /* float.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E196080A0D193700D40234 /* float.h */; };
+		73E196370A0D1A1E00D40234 /* format.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E196090A0D193700D40234 /* format.h */; };
+		73E196380A0D1A1E00D40234 /* lpc.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E1960A0A0D193700D40234 /* lpc.h */; };
+		73E196390A0D1A1E00D40234 /* md5.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E1960B0A0D193700D40234 /* md5.h */; };
+		73E1963A0A0D1A1E00D40234 /* memory.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E1960C0A0D193700D40234 /* memory.h */; };
+		73E1963B0A0D1A1E00D40234 /* metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E1960D0A0D193700D40234 /* metadata.h */; };
+		73E1963C0A0D1A1E00D40234 /* stream_encoder_framing.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E1960E0A0D193700D40234 /* stream_encoder_framing.h */; };
+		73E196500A0D1AB900D40234 /* bitbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1963D0A0D1AB900D40234 /* bitbuffer.c */; };
+		73E196510A0D1AB900D40234 /* bitmath.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1963E0A0D1AB900D40234 /* bitmath.c */; };
+		73E196520A0D1AB900D40234 /* cpu.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1963F0A0D1AB900D40234 /* cpu.c */; };
+		73E196530A0D1AB900D40234 /* crc.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196400A0D1AB900D40234 /* crc.c */; };
+		73E196560A0D1AB900D40234 /* fixed.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196430A0D1AB900D40234 /* fixed.c */; };
+		73E196570A0D1AB900D40234 /* float.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196440A0D1AB900D40234 /* float.c */; };
+		73E196580A0D1AB900D40234 /* format.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196450A0D1AB900D40234 /* format.c */; };
+		73E196590A0D1AB900D40234 /* lpc.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196460A0D1AB900D40234 /* lpc.c */; };
+		73E1965A0A0D1AB900D40234 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196470A0D1AB900D40234 /* md5.c */; };
+		73E1965B0A0D1AB900D40234 /* memory.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196480A0D1AB900D40234 /* memory.c */; };
+		73E1965C0A0D1AB900D40234 /* metadata_iterators.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E196490A0D1AB900D40234 /* metadata_iterators.c */; };
+		73E1965D0A0D1AB900D40234 /* metadata_object.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1964A0A0D1AB900D40234 /* metadata_object.c */; };
+		73E196600A0D1AB900D40234 /* stream_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1964D0A0D1AB900D40234 /* stream_decoder.c */; };
+		73E196610A0D1AB900D40234 /* stream_encoder_framing.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1964E0A0D1AB900D40234 /* stream_encoder_framing.c */; };
+		73E196620A0D1AB900D40234 /* stream_encoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 73E1964F0A0D1AB900D40234 /* stream_encoder.c */; };
+		73E1969E0A0D273D00D40234 /* all.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E196990A0D273D00D40234 /* all.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E1969F0A0D273D00D40234 /* decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E1969A0A0D273D00D40234 /* decoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196A00A0D273D00D40234 /* encoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E1969B0A0D273D00D40234 /* encoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196A10A0D273D00D40234 /* export.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E1969C0A0D273D00D40234 /* export.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196A20A0D273D00D40234 /* metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E1969D0A0D273D00D40234 /* metadata.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		73E196AC0A0D277700D40234 /* metadata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73E196A50A0D277600D40234 /* metadata.cpp */; };
+		73E196AF0A0D277700D40234 /* stream_decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73E196A80A0D277600D40234 /* stream_decoder.cpp */; };
+		73E196B00A0D277700D40234 /* stream_encoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73E196A90A0D277600D40234 /* stream_encoder.cpp */; };
+		73E196B70A0D27E800D40234 /* FLAC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* FLAC.framework */; };
+		73E196ED0A0D29AE00D40234 /* FLAC++_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 73E196EC0A0D29AE00D40234 /* FLAC++_Prefix.pch */; };
+		8D07F2BE0486CC7A007CD1D0 /* FLAC_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32BAE0B70371A74B00C91783 /* FLAC_Prefix.pch */; settings = {ATTRIBUTES = (); }; };
+		8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		73E196B30A0D27BB00D40234 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
+			remoteInfo = FLAC;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		32BAE0B70371A74B00C91783 /* FLAC_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLAC_Prefix.pch; sourceTree = "<group>"; };
+		73744B050B1A1925002B059E /* window.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = window.c; path = "../../external-libs/flac/src/libFLAC/window.c"; sourceTree = SOURCE_ROOT; };
+		73744B1B0B1A1C43002B059E /* libflac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libflac.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		73744B520B1A21DA002B059E /* libflac++.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libflac++.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+		73E195D40A0D189900D40234 /* all.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = all.h; path = "../../external-libs/flac/include/FLAC/all.h"; sourceTree = SOURCE_ROOT; };
+		73E195D50A0D189900D40234 /* assert.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = assert.h; path = "../../external-libs/flac/include/FLAC/assert.h"; sourceTree = SOURCE_ROOT; };
+		73E195D60A0D189900D40234 /* callback.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = callback.h; path = "../../external-libs/flac/include/FLAC/callback.h"; sourceTree = SOURCE_ROOT; };
+		73E195D70A0D189900D40234 /* export.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = export.h; path = "../../external-libs/flac/include/FLAC/export.h"; sourceTree = SOURCE_ROOT; };
+		73E195DA0A0D189900D40234 /* format.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = format.h; path = "../../external-libs/flac/include/FLAC/format.h"; sourceTree = SOURCE_ROOT; };
+		73E195DB0A0D189900D40234 /* metadata.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = metadata.h; path = "../../external-libs/flac/include/FLAC/metadata.h"; sourceTree = SOURCE_ROOT; };
+		73E195DC0A0D189900D40234 /* ordinals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ordinals.h; path = "../../external-libs/flac/include/FLAC/ordinals.h"; sourceTree = SOURCE_ROOT; };
+		73E195DF0A0D189900D40234 /* stream_decoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_decoder.h; path = "../../external-libs/flac/include/FLAC/stream_decoder.h"; sourceTree = SOURCE_ROOT; };
+		73E195E00A0D189900D40234 /* stream_encoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_encoder.h; path = "../../external-libs/flac/include/FLAC/stream_encoder.h"; sourceTree = SOURCE_ROOT; };
+		73E195F40A0D191000D40234 /* all.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = all.h; path = "../../external-libs/flac/src/libFLAC/include/protected/all.h"; sourceTree = SOURCE_ROOT; };
+		73E195F90A0D191000D40234 /* stream_decoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_decoder.h; path = "../../external-libs/flac/src/libFLAC/include/protected/stream_decoder.h"; sourceTree = SOURCE_ROOT; };
+		73E195FA0A0D191000D40234 /* stream_encoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_encoder.h; path = "../../external-libs/flac/src/libFLAC/include/protected/stream_encoder.h"; sourceTree = SOURCE_ROOT; };
+		73E196020A0D193600D40234 /* all.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = all.h; path = "../../external-libs/flac/src/libFLAC/include/private/all.h"; sourceTree = SOURCE_ROOT; };
+		73E196030A0D193700D40234 /* bitbuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = bitbuffer.h; path = "../../external-libs/flac/src/libFLAC/include/private/bitbuffer.h"; sourceTree = SOURCE_ROOT; };
+		73E196040A0D193700D40234 /* bitmath.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = bitmath.h; path = "../../external-libs/flac/src/libFLAC/include/private/bitmath.h"; sourceTree = SOURCE_ROOT; };
+		73E196050A0D193700D40234 /* cpu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpu.h; path = "../../external-libs/flac/src/libFLAC/include/private/cpu.h"; sourceTree = SOURCE_ROOT; };
+		73E196060A0D193700D40234 /* crc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = crc.h; path = "../../external-libs/flac/src/libFLAC/include/private/crc.h"; sourceTree = SOURCE_ROOT; };
+		73E196070A0D193700D40234 /* fixed.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fixed.h; path = "../../external-libs/flac/src/libFLAC/include/private/fixed.h"; sourceTree = SOURCE_ROOT; };
+		73E196080A0D193700D40234 /* float.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = float.h; path = "../../external-libs/flac/src/libFLAC/include/private/float.h"; sourceTree = SOURCE_ROOT; };
+		73E196090A0D193700D40234 /* format.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = format.h; path = "../../external-libs/flac/src/libFLAC/include/private/format.h"; sourceTree = SOURCE_ROOT; };
+		73E1960A0A0D193700D40234 /* lpc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = lpc.h; path = "../../external-libs/flac/src/libFLAC/include/private/lpc.h"; sourceTree = SOURCE_ROOT; };
+		73E1960B0A0D193700D40234 /* md5.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = md5.h; path = "../../external-libs/flac/src/libFLAC/include/private/md5.h"; sourceTree = SOURCE_ROOT; };
+		73E1960C0A0D193700D40234 /* memory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = memory.h; path = "../../external-libs/flac/src/libFLAC/include/private/memory.h"; sourceTree = SOURCE_ROOT; };
+		73E1960D0A0D193700D40234 /* metadata.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = metadata.h; path = "../../external-libs/flac/src/libFLAC/include/private/metadata.h"; sourceTree = SOURCE_ROOT; };
+		73E1960E0A0D193700D40234 /* stream_encoder_framing.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stream_encoder_framing.h; path = "../../external-libs/flac/src/libFLAC/include/private/stream_encoder_framing.h"; sourceTree = SOURCE_ROOT; };
+		73E1963D0A0D1AB900D40234 /* bitbuffer.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = bitbuffer.c; path = "../../external-libs/flac/src/libFLAC/bitbuffer.c"; sourceTree = SOURCE_ROOT; };
+		73E1963E0A0D1AB900D40234 /* bitmath.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = bitmath.c; path = "../../external-libs/flac/src/libFLAC/bitmath.c"; sourceTree = SOURCE_ROOT; };
+		73E1963F0A0D1AB900D40234 /* cpu.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = cpu.c; path = "../../external-libs/flac/src/libFLAC/cpu.c"; sourceTree = SOURCE_ROOT; };
+		73E196400A0D1AB900D40234 /* crc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = crc.c; path = "../../external-libs/flac/src/libFLAC/crc.c"; sourceTree = SOURCE_ROOT; };
+		73E196430A0D1AB900D40234 /* fixed.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = fixed.c; path = "../../external-libs/flac/src/libFLAC/fixed.c"; sourceTree = SOURCE_ROOT; };
+		73E196440A0D1AB900D40234 /* float.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = float.c; path = "../../external-libs/flac/src/libFLAC/float.c"; sourceTree = SOURCE_ROOT; };
+		73E196450A0D1AB900D40234 /* format.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = format.c; path = "../../external-libs/flac/src/libFLAC/format.c"; sourceTree = SOURCE_ROOT; };
+		73E196460A0D1AB900D40234 /* lpc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = lpc.c; path = "../../external-libs/flac/src/libFLAC/lpc.c"; sourceTree = SOURCE_ROOT; };
+		73E196470A0D1AB900D40234 /* md5.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = md5.c; path = "../../external-libs/flac/src/libFLAC/md5.c"; sourceTree = SOURCE_ROOT; };
+		73E196480A0D1AB900D40234 /* memory.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = memory.c; path = "../../external-libs/flac/src/libFLAC/memory.c"; sourceTree = SOURCE_ROOT; };
+		73E196490A0D1AB900D40234 /* metadata_iterators.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = metadata_iterators.c; path = "../../external-libs/flac/src/libFLAC/metadata_iterators.c"; sourceTree = SOURCE_ROOT; };
+		73E1964A0A0D1AB900D40234 /* metadata_object.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = metadata_object.c; path = "../../external-libs/flac/src/libFLAC/metadata_object.c"; sourceTree = SOURCE_ROOT; };
+		73E1964D0A0D1AB900D40234 /* stream_decoder.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_decoder.c; path = "../../external-libs/flac/src/libFLAC/stream_decoder.c"; sourceTree = SOURCE_ROOT; };
+		73E1964E0A0D1AB900D40234 /* stream_encoder_framing.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_encoder_framing.c; path = "../../external-libs/flac/src/libFLAC/stream_encoder_framing.c"; sourceTree = SOURCE_ROOT; };
+		73E1964F0A0D1AB900D40234 /* stream_encoder.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream_encoder.c; path = "../../external-libs/flac/src/libFLAC/stream_encoder.c"; sourceTree = SOURCE_ROOT; };
+		73E1968C0A0D24C100D40234 /* FLAC++.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "FLAC++.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
+		73E1968D0A0D24C100D40234 /* FLAC++-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "FLAC++-Info.plist"; sourceTree = "<group>"; };
+		73E196990A0D273D00D40234 /* all.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = all.h; path = "../../external-libs/flac/include/FLAC++/all.h"; sourceTree = SOURCE_ROOT; };
+		73E1969A0A0D273D00D40234 /* decoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = decoder.h; path = "../../external-libs/flac/include/FLAC++/decoder.h"; sourceTree = SOURCE_ROOT; };
+		73E1969B0A0D273D00D40234 /* encoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = encoder.h; path = "../../external-libs/flac/include/FLAC++/encoder.h"; sourceTree = SOURCE_ROOT; };
+		73E1969C0A0D273D00D40234 /* export.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = export.h; path = "../../external-libs/flac/include/FLAC++/export.h"; sourceTree = SOURCE_ROOT; };
+		73E1969D0A0D273D00D40234 /* metadata.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = metadata.h; path = "../../external-libs/flac/include/FLAC++/metadata.h"; sourceTree = SOURCE_ROOT; };
+		73E196A50A0D277600D40234 /* metadata.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = metadata.cpp; path = "../../external-libs/flac/src/libFLAC++/metadata.cpp"; sourceTree = SOURCE_ROOT; };
+		73E196A80A0D277600D40234 /* stream_decoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = stream_decoder.cpp; path = "../../external-libs/flac/src/libFLAC++/stream_decoder.cpp"; sourceTree = SOURCE_ROOT; };
+		73E196A90A0D277600D40234 /* stream_encoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = stream_encoder.cpp; path = "../../external-libs/flac/src/libFLAC++/stream_encoder.cpp"; sourceTree = SOURCE_ROOT; };
+		73E196EC0A0D29AE00D40234 /* FLAC++_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "FLAC++_Prefix.pch"; sourceTree = "<group>"; };
+		8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+		8D07F2C80486CC7A007CD1D0 /* FLAC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FLAC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		73744B190B1A1C43002B059E /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		73744B500B1A21DA002B059E /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		73E1968A0A0D24C100D40234 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				73E196B70A0D27E800D40234 /* FLAC.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D07F2C30486CC7A007CD1D0 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		034768DDFF38A45A11DB9C8B /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				8D07F2C80486CC7A007CD1D0 /* FLAC.framework */,
+				73E1968C0A0D24C100D40234 /* FLAC++.framework */,
+				73744B1B0B1A1C43002B059E /* libflac.a */,
+				73744B520B1A21DA002B059E /* libflac++.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		0867D691FE84028FC02AAC07 /* FLAC */ = {
+			isa = PBXGroup;
+			children = (
+				08FB77ACFE841707C02AAC07 /* Source */,
+				089C1665FE841158C02AAC07 /* Resources */,
+				0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
+				034768DDFF38A45A11DB9C8B /* Products */,
+			);
+			name = FLAC;
+			sourceTree = "<group>";
+		};
+		0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			name = "External Frameworks and Libraries";
+			sourceTree = "<group>";
+		};
+		089C1665FE841158C02AAC07 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				8D07F2C70486CC7A007CD1D0 /* Info.plist */,
+				089C1666FE841158C02AAC07 /* InfoPlist.strings */,
+				73E1968D0A0D24C100D40234 /* FLAC++-Info.plist */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		08FB77ACFE841707C02AAC07 /* Source */ = {
+			isa = PBXGroup;
+			children = (
+				73E195D10A0D176C00D40234 /* include */,
+				73E195CE0A0D174A00D40234 /* src */,
+				32BAE0B70371A74B00C91783 /* FLAC_Prefix.pch */,
+				73E196EC0A0D29AE00D40234 /* FLAC++_Prefix.pch */,
+			);
+			name = Source;
+			sourceTree = "<group>";
+		};
+		73E195CE0A0D174A00D40234 /* src */ = {
+			isa = PBXGroup;
+			children = (
+				73E195D00A0D176100D40234 /* FLAC++ */,
+				73E195CF0A0D175400D40234 /* FLAC */,
+			);
+			name = src;
+			sourceTree = "<group>";
+		};
+		73E195CF0A0D175400D40234 /* FLAC */ = {
+			isa = PBXGroup;
+			children = (
+				73744B050B1A1925002B059E /* window.c */,
+				73E1963D0A0D1AB900D40234 /* bitbuffer.c */,
+				73E1963E0A0D1AB900D40234 /* bitmath.c */,
+				73E1963F0A0D1AB900D40234 /* cpu.c */,
+				73E196400A0D1AB900D40234 /* crc.c */,
+				73E196430A0D1AB900D40234 /* fixed.c */,
+				73E196440A0D1AB900D40234 /* float.c */,
+				73E196450A0D1AB900D40234 /* format.c */,
+				73E196460A0D1AB900D40234 /* lpc.c */,
+				73E196470A0D1AB900D40234 /* md5.c */,
+				73E196480A0D1AB900D40234 /* memory.c */,
+				73E196490A0D1AB900D40234 /* metadata_iterators.c */,
+				73E1964A0A0D1AB900D40234 /* metadata_object.c */,
+				73E1964D0A0D1AB900D40234 /* stream_decoder.c */,
+				73E1964E0A0D1AB900D40234 /* stream_encoder_framing.c */,
+				73E1964F0A0D1AB900D40234 /* stream_encoder.c */,
+			);
+			name = FLAC;
+			sourceTree = "<group>";
+		};
+		73E195D00A0D176100D40234 /* FLAC++ */ = {
+			isa = PBXGroup;
+			children = (
+				73E196A50A0D277600D40234 /* metadata.cpp */,
+				73E196A80A0D277600D40234 /* stream_decoder.cpp */,
+				73E196A90A0D277600D40234 /* stream_encoder.cpp */,
+			);
+			name = "FLAC++";
+			sourceTree = "<group>";
+		};
+		73E195D10A0D176C00D40234 /* include */ = {
+			isa = PBXGroup;
+			children = (
+				73E195D30A0D177F00D40234 /* FLAC++ */,
+				73E195D20A0D177600D40234 /* FLAC */,
+			);
+			name = include;
+			sourceTree = "<group>";
+		};
+		73E195D20A0D177600D40234 /* FLAC */ = {
+			isa = PBXGroup;
+			children = (
+				73E195F10A0D18CE00D40234 /* protected */,
+				73E195EE0A0D18B600D40234 /* private */,
+				73E195D40A0D189900D40234 /* all.h */,
+				73E195D50A0D189900D40234 /* assert.h */,
+				73E195D60A0D189900D40234 /* callback.h */,
+				73E195D70A0D189900D40234 /* export.h */,
+				73E195DA0A0D189900D40234 /* format.h */,
+				73E195DB0A0D189900D40234 /* metadata.h */,
+				73E195DC0A0D189900D40234 /* ordinals.h */,
+				73E195DF0A0D189900D40234 /* stream_decoder.h */,
+				73E195E00A0D189900D40234 /* stream_encoder.h */,
+			);
+			name = FLAC;
+			sourceTree = "<group>";
+		};
+		73E195D30A0D177F00D40234 /* FLAC++ */ = {
+			isa = PBXGroup;
+			children = (
+				73E196990A0D273D00D40234 /* all.h */,
+				73E1969A0A0D273D00D40234 /* decoder.h */,
+				73E1969B0A0D273D00D40234 /* encoder.h */,
+				73E1969C0A0D273D00D40234 /* export.h */,
+				73E1969D0A0D273D00D40234 /* metadata.h */,
+			);
+			name = "FLAC++";
+			sourceTree = "<group>";
+		};
+		73E195EE0A0D18B600D40234 /* private */ = {
+			isa = PBXGroup;
+			children = (
+				73E196020A0D193600D40234 /* all.h */,
+				73E196030A0D193700D40234 /* bitbuffer.h */,
+				73E196040A0D193700D40234 /* bitmath.h */,
+				73E196050A0D193700D40234 /* cpu.h */,
+				73E196060A0D193700D40234 /* crc.h */,
+				73E196070A0D193700D40234 /* fixed.h */,
+				73E196080A0D193700D40234 /* float.h */,
+				73E196090A0D193700D40234 /* format.h */,
+				73E1960A0A0D193700D40234 /* lpc.h */,
+				73E1960B0A0D193700D40234 /* md5.h */,
+				73E1960C0A0D193700D40234 /* memory.h */,
+				73E1960D0A0D193700D40234 /* metadata.h */,
+				73E1960E0A0D193700D40234 /* stream_encoder_framing.h */,
+			);
+			name = private;
+			sourceTree = "<group>";
+		};
+		73E195F10A0D18CE00D40234 /* protected */ = {
+			isa = PBXGroup;
+			children = (
+				73E195F40A0D191000D40234 /* all.h */,
+				73E195F90A0D191000D40234 /* stream_decoder.h */,
+				73E195FA0A0D191000D40234 /* stream_encoder.h */,
+			);
+			name = protected;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		73744B170B1A1C43002B059E /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		73744B4E0B1A21DA002B059E /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		73E196870A0D24C100D40234 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				73E1969E0A0D273D00D40234 /* all.h in Headers */,
+				73E1969F0A0D273D00D40234 /* decoder.h in Headers */,
+				73E196A00A0D273D00D40234 /* encoder.h in Headers */,
+				73E196A10A0D273D00D40234 /* export.h in Headers */,
+				73E196A20A0D273D00D40234 /* metadata.h in Headers */,
+				73E196ED0A0D29AE00D40234 /* FLAC++_Prefix.pch in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D07F2BD0486CC7A007CD1D0 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8D07F2BE0486CC7A007CD1D0 /* FLAC_Prefix.pch in Headers */,
+				73E1961C0A0D19CE00D40234 /* all.h in Headers */,
+				73E1961D0A0D19CE00D40234 /* assert.h in Headers */,
+				73E1961E0A0D19CE00D40234 /* callback.h in Headers */,
+				73E1961F0A0D19CE00D40234 /* export.h in Headers */,
+				73E196220A0D19CE00D40234 /* format.h in Headers */,
+				73E196230A0D19CE00D40234 /* metadata.h in Headers */,
+				73E196240A0D19CE00D40234 /* ordinals.h in Headers */,
+				73E196270A0D19CE00D40234 /* stream_decoder.h in Headers */,
+				73E196280A0D19CE00D40234 /* stream_encoder.h in Headers */,
+				73E196290A0D1A1E00D40234 /* all.h in Headers */,
+				73E1962E0A0D1A1E00D40234 /* stream_decoder.h in Headers */,
+				73E1962F0A0D1A1E00D40234 /* stream_encoder.h in Headers */,
+				73E196300A0D1A1E00D40234 /* all.h in Headers */,
+				73E196310A0D1A1E00D40234 /* bitbuffer.h in Headers */,
+				73E196320A0D1A1E00D40234 /* bitmath.h in Headers */,
+				73E196330A0D1A1E00D40234 /* cpu.h in Headers */,
+				73E196340A0D1A1E00D40234 /* crc.h in Headers */,
+				73E196350A0D1A1E00D40234 /* fixed.h in Headers */,
+				73E196360A0D1A1E00D40234 /* float.h in Headers */,
+				73E196370A0D1A1E00D40234 /* format.h in Headers */,
+				73E196380A0D1A1E00D40234 /* lpc.h in Headers */,
+				73E196390A0D1A1E00D40234 /* md5.h in Headers */,
+				73E1963A0A0D1A1E00D40234 /* memory.h in Headers */,
+				73E1963B0A0D1A1E00D40234 /* metadata.h in Headers */,
+				73E1963C0A0D1A1E00D40234 /* stream_encoder_framing.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		73744B1A0B1A1C43002B059E /* libflac (static) */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 73744B1C0B1A1C61002B059E /* Build configuration list for PBXNativeTarget "libflac (static)" */;
+			buildPhases = (
+				73744B170B1A1C43002B059E /* Headers */,
+				73744B180B1A1C43002B059E /* Sources */,
+				73744B190B1A1C43002B059E /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "libflac (static)";
+			productName = flac;
+			productReference = 73744B1B0B1A1C43002B059E /* libflac.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		73744B510B1A21DA002B059E /* libflac++ (static) */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 73744B560B1A2224002B059E /* Build configuration list for PBXNativeTarget "libflac++ (static)" */;
+			buildPhases = (
+				73744B4E0B1A21DA002B059E /* Headers */,
+				73744B4F0B1A21DA002B059E /* Sources */,
+				73744B500B1A21DA002B059E /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "libflac++ (static)";
+			productName = "flac++";
+			productReference = 73744B520B1A21DA002B059E /* libflac++.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		73E1968B0A0D24C100D40234 /* FLAC++ */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 73E1968E0A0D24C200D40234 /* Build configuration list for PBXNativeTarget "FLAC++" */;
+			buildPhases = (
+				73E196870A0D24C100D40234 /* Headers */,
+				73E196880A0D24C100D40234 /* Resources */,
+				73E196890A0D24C100D40234 /* Sources */,
+				73E1968A0A0D24C100D40234 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				73E196B40A0D27BB00D40234 /* PBXTargetDependency */,
+			);
+			name = "FLAC++";
+			productName = "FLAC++";
+			productReference = 73E1968C0A0D24C100D40234 /* FLAC++.framework */;
+			productType = "com.apple.product-type.framework";
+		};
+		8D07F2BC0486CC7A007CD1D0 /* FLAC */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "FLAC" */;
+			buildPhases = (
+				8D07F2BD0486CC7A007CD1D0 /* Headers */,
+				8D07F2BF0486CC7A007CD1D0 /* Resources */,
+				8D07F2C10486CC7A007CD1D0 /* Sources */,
+				8D07F2C30486CC7A007CD1D0 /* Frameworks */,
+				8D07F2C50486CC7A007CD1D0 /* Rez */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = FLAC;
+			productInstallPath = "$(HOME)/Library/Frameworks";
+			productName = FLAC;
+			productReference = 8D07F2C80486CC7A007CD1D0 /* FLAC.framework */;
+			productType = "com.apple.product-type.framework";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		0867D690FE84028FC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "FLAC" */;
+			hasScannedForEncodings = 1;
+			mainGroup = 0867D691FE84028FC02AAC07 /* FLAC */;
+			productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
+			projectDirPath = "";
+			targets = (
+				8D07F2BC0486CC7A007CD1D0 /* FLAC */,
+				73E1968B0A0D24C100D40234 /* FLAC++ */,
+				73744B1A0B1A1C43002B059E /* libflac (static) */,
+				73744B510B1A21DA002B059E /* libflac++ (static) */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		73E196880A0D24C100D40234 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXRezBuildPhase section */
+		8D07F2C50486CC7A007CD1D0 /* Rez */ = {
+			isa = PBXRezBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		73744B180B1A1C43002B059E /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				73744B1F0B1A1D3A002B059E /* bitbuffer.c in Sources */,
+				73744B200B1A1D3A002B059E /* bitmath.c in Sources */,
+				73744B210B1A1D3B002B059E /* cpu.c in Sources */,
+				73744B220B1A1D3C002B059E /* crc.c in Sources */,
+				73744B230B1A1D3D002B059E /* fixed.c in Sources */,
+				73744B240B1A1D3E002B059E /* float.c in Sources */,
+				73744B250B1A1D3F002B059E /* format.c in Sources */,
+				73744B260B1A1D40002B059E /* lpc.c in Sources */,
+				73744B270B1A1D40002B059E /* md5.c in Sources */,
+				73744B280B1A1D41002B059E /* memory.c in Sources */,
+				73744B290B1A1D41002B059E /* metadata_iterators.c in Sources */,
+				73744B2A0B1A1D42002B059E /* metadata_object.c in Sources */,
+				73744B2B0B1A1D43002B059E /* stream_decoder.c in Sources */,
+				73744B2C0B1A1D43002B059E /* stream_encoder.c in Sources */,
+				73744B2D0B1A1D44002B059E /* stream_encoder_framing.c in Sources */,
+				73744B2E0B1A1D45002B059E /* window.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		73744B4F0B1A21DA002B059E /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				73744B530B1A2205002B059E /* metadata.cpp in Sources */,
+				73744B540B1A2205002B059E /* stream_decoder.cpp in Sources */,
+				73744B550B1A2206002B059E /* stream_encoder.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		73E196890A0D24C100D40234 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				73E196AC0A0D277700D40234 /* metadata.cpp in Sources */,
+				73E196AF0A0D277700D40234 /* stream_decoder.cpp in Sources */,
+				73E196B00A0D277700D40234 /* stream_encoder.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D07F2C10486CC7A007CD1D0 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				73E196500A0D1AB900D40234 /* bitbuffer.c in Sources */,
+				73E196510A0D1AB900D40234 /* bitmath.c in Sources */,
+				73E196520A0D1AB900D40234 /* cpu.c in Sources */,
+				73E196530A0D1AB900D40234 /* crc.c in Sources */,
+				73E196560A0D1AB900D40234 /* fixed.c in Sources */,
+				73E196570A0D1AB900D40234 /* float.c in Sources */,
+				73E196580A0D1AB900D40234 /* format.c in Sources */,
+				73E196590A0D1AB900D40234 /* lpc.c in Sources */,
+				73E1965A0A0D1AB900D40234 /* md5.c in Sources */,
+				73E1965B0A0D1AB900D40234 /* memory.c in Sources */,
+				73E1965C0A0D1AB900D40234 /* metadata_iterators.c in Sources */,
+				73E1965D0A0D1AB900D40234 /* metadata_object.c in Sources */,
+				73E196600A0D1AB900D40234 /* stream_decoder.c in Sources */,
+				73E196610A0D1AB900D40234 /* stream_encoder_framing.c in Sources */,
+				73E196620A0D1AB900D40234 /* stream_encoder.c in Sources */,
+				73744B060B1A1925002B059E /* window.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		73E196B40A0D27BB00D40234 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 8D07F2BC0486CC7A007CD1D0 /* FLAC */;
+			targetProxy = 73E196B30A0D27BB00D40234 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				089C1667FE841158C02AAC07 /* English */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		4FADC24308B4156D00ABE55E /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				FRAMEWORK_VERSION = A;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = FLAC_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(GCC_PREPROCESSOR_DEFINITIONS)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					HAVE_INTTYPES_H,
+					FLAC__NO_ASM,
+					FLAC__SYS_DARWIN,
+					FLAC__ALIGN_MALLOC_DATA,
+				);
+				GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "VERSION=\\\"1.1.3\\\"";
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					"../../external-libs/flac/src/libFLAC/include",
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = /Library/Frameworks;
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				PRODUCT_NAME = FLAC;
+				WRAPPER_EXTENSION = framework;
+				ZERO_LINK = YES;
+			};
+			name = Debug;
+		};
+		4FADC24408B4156D00ABE55E /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				FRAMEWORK_VERSION = A;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = FLAC_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(GCC_PREPROCESSOR_DEFINITIONS)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					HAVE_INTTYPES_H,
+					FLAC__NO_ASM,
+					FLAC__SYS_DARWIN,
+					FLAC__ALIGN_MALLOC_DATA,
+				);
+				GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "VERSION=\\\"1.1.3\\\"";
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					"../../external-libs/flac/src/libFLAC/include",
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = /Library/Frameworks;
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				PRODUCT_NAME = FLAC;
+				WRAPPER_EXTENSION = framework;
+			};
+			name = Release;
+		};
+		4FADC24708B4156D00ABE55E /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				PER_ARCH_CFLAGS_i386 = "-D FLAC__CPU_IA32";
+				PER_ARCH_CFLAGS_ppc = "-D FLAC__CPU_PPC";
+				PREBINDING = NO;
+				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+			};
+			name = Debug;
+		};
+		4FADC24808B4156D00ABE55E /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					ppc,
+					i386,
+				);
+				GCC_OPTIMIZATION_LEVEL = 3;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				OTHER_CFLAGS = (
+					"$(OTHER_CFLAGS)",
+					"-fomit-frame-pointer",
+					"-funroll-loops",
+					"-finline-functions",
+					"-D",
+					"FLaC__INLINE=__inline__",
+				);
+				PER_ARCH_CFLAGS_i386 = "-D FLAC__CPU_IA32";
+				PER_ARCH_CFLAGS_ppc = "-D FLAC__CPU_PPC";
+				PREBINDING = NO;
+				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+			};
+			name = Release;
+		};
+		73744B1D0B1A1C61002B059E /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					HAVE_INTTYPES_H,
+					FLAC__NO_ASM,
+					FLAC__SYS_DARWIN,
+					FLAC__ALIGN_MALLOC_DATA,
+				);
+				GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "VERSION=\\\"1.1.3\\\"";
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					"../../external-libs/flac/src/libFLAC/include",
+				);
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = flac;
+				ZERO_LINK = YES;
+			};
+			name = Debug;
+		};
+		73744B1E0B1A1C61002B059E /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = YES;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					HAVE_INTTYPES_H,
+					FLAC__NO_ASM,
+					FLAC__SYS_DARWIN,
+					FLAC__ALIGN_MALLOC_DATA,
+				);
+				GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "VERSION=\\\"1.1.3\\\"";
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					"../../external-libs/flac/src/libFLAC/include",
+				);
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = flac;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		73744B570B1A2224002B059E /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					HAVE_INTTYPES_H,
+					FLAC__NO_ASM,
+					FLAC__SYS_DARWIN,
+					FLAC__ALIGN_MALLOC_DATA,
+				);
+				GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "VERSION=\\\"1.1.3\\\"";
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = "flac++";
+				ZERO_LINK = YES;
+			};
+			name = Debug;
+		};
+		73744B580B1A2224002B059E /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = YES;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					HAVE_INTTYPES_H,
+					FLAC__NO_ASM,
+					FLAC__SYS_DARWIN,
+					FLAC__ALIGN_MALLOC_DATA,
+				);
+				GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "VERSION=\\\"1.1.3\\\"";
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = "flac++";
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		73E1968F0A0D24C200D40234 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				FRAMEWORK_VERSION = A;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "FLAC++_Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(GCC_PREPROCESSOR_DEFINITIONS)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					HAVE_INTTYPES_H,
+					FLAC__NO_ASM,
+					FLAC__SYS_DARWIN,
+					FLAC__ALIGN_MALLOC_DATA,
+				);
+				GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "VERSION=\\\"1.1.2\\\"";
+				INFOPLIST_FILE = "FLAC++-Info.plist";
+				INSTALL_PATH = /Library/Frameworks;
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				PRODUCT_NAME = "FLAC++";
+				ZERO_LINK = YES;
+			};
+			name = Debug;
+		};
+		73E196900A0D24C200D40234 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = YES;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				FRAMEWORK_VERSION = A;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "FLAC++_Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(GCC_PREPROCESSOR_DEFINITIONS)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					HAVE_INTTYPES_H,
+					FLAC__NO_ASM,
+					FLAC__SYS_DARWIN,
+					FLAC__ALIGN_MALLOC_DATA,
+				);
+				GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "VERSION=\\\"1.1.2\\\"";
+				INFOPLIST_FILE = "FLAC++-Info.plist";
+				INSTALL_PATH = /Library/Frameworks;
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				PRODUCT_NAME = "FLAC++";
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "FLAC" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				4FADC24308B4156D00ABE55E /* Debug */,
+				4FADC24408B4156D00ABE55E /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "FLAC" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				4FADC24708B4156D00ABE55E /* Debug */,
+				4FADC24808B4156D00ABE55E /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		73744B1C0B1A1C61002B059E /* Build configuration list for PBXNativeTarget "libflac (static)" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				73744B1D0B1A1C61002B059E /* Debug */,
+				73744B1E0B1A1C61002B059E /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		73744B560B1A2224002B059E /* Build configuration list for PBXNativeTarget "libflac++ (static)" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				73744B570B1A2224002B059E /* Debug */,
+				73744B580B1A2224002B059E /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		73E1968E0A0D24C200D40234 /* Build configuration list for PBXNativeTarget "FLAC++" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				73E1968F0A0D24C200D40234 /* Debug */,
+				73E196900A0D24C200D40234 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}

Added: trunk/xiph-qt/build-macosx/flac-support/FLAC_Prefix.pch
===================================================================
--- trunk/xiph-qt/build-macosx/flac-support/FLAC_Prefix.pch	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/build-macosx/flac-support/FLAC_Prefix.pch	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,5 @@
+//
+// Prefix header for all source files of the 'FLAC' target in the 'FLAC' project.
+//
+
+#include <Carbon/Carbon.h>

Added: trunk/xiph-qt/build-macosx/flac-support/Info.plist
===================================================================
--- trunk/xiph-qt/build-macosx/flac-support/Info.plist	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/build-macosx/flac-support/Info.plist	2007-01-18 13:45:42 UTC (rev 12346)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>FLAC</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>org.xiph.flac</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.1.3</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.1.3</string>
+	<key>CSResourcesFileMapped</key>
+	<true/>
+</dict>
+</plist>

Modified: trunk/xiph-qt/common/config.h
===================================================================
--- trunk/xiph-qt/common/config.h	2007-01-18 13:08:02 UTC (rev 12345)
+++ trunk/xiph-qt/common/config.h	2007-01-18 13:45:42 UTC (rev 12346)
@@ -4,7 +4,7 @@
  *    General compilation environment configuration file.
  *
  *
- *  Copyright (c) 2005  Arek Korbik
+ *  Copyright (c) 2005-2006  Arek Korbik
  *
  *  This file is part of XiphQT, the Xiph QuickTime Components.
  *
@@ -32,11 +32,6 @@
 #define __xiphqt_config_h__
 
 
-#if defined(__APPLE_CC__)
-#include <CoreServices/CoreServices.h>
-#else
-#include <CoreServices.h>
-#endif
+#define kXiphQTBundleID "org.xiph.xiph-qt.xiphqt"
 
-
 #endif /* __data_types_h__ */


Property changes on: trunk/xiph-qt/external-libs
___________________________________________________________________
Name: svn:ignore
   + flac





More information about the commits mailing list