shithub: aacdec

Download patch

ref: 70d8b0d6858c03a2de235e070e12f8e55859cf65
parent: 4139a363f7759de8928a833de7b7b29613817b1e
author: menno <menno>
date: Fri Dec 27 15:01:52 EST 2002

Added file callback functionality to mp4 file library
Updated foo_mp4 to use it

--- /dev/null
+++ b/common/mp4v2/libmp4v2_cb.dsp
@@ -1,0 +1,514 @@
+# Microsoft Developer Studio Project File - Name="libmp4v2_cb" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=libmp4v2_cb - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "libmp4v2_cb.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "libmp4v2_cb.mak" CFG="libmp4v2_cb - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "libmp4v2_cb - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "libmp4v2_cb - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=xicl6.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "libmp4v2_cb - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "CB_Release"
+# PROP Intermediate_Dir "CB_Release"
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_FILE_CALLBACKS" /YX /FD /c
+# ADD BASE RSC /l 0x413 /d "NDEBUG"
+# ADD RSC /l 0x413 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=xilink6.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF  "$(CFG)" == "libmp4v2_cb - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "CB_Debug"
+# PROP Intermediate_Dir "CB_Debug"
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_FILE_CALLBACKS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x413 /d "_DEBUG"
+# ADD RSC /l 0x413 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=xilink6.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "libmp4v2_cb - Win32 Release"
+# Name "libmp4v2_cb - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\atom_co64.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_cprt.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_ctts.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_dimm.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_dinf.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_dmax.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_dmed.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_dref.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_drep.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_edts.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_elst.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_esds.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_free.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_ftyp.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_hdlr.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_hinf.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_hmhd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_hnti.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_iods.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_maxr.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_mdat.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_mdhd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_mdia.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_mfhd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_minf.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_moof.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_moov.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_mp4a.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_mp4s.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_mp4v.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_mvex.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_mvhd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_nmhd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_nump.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_payt.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_pmax.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_root.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_rtp.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_sdp.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_smhd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_snro.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_stbl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_stco.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_stdp.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_stsc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_stsd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_stsh.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_stss.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_stsz.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_stts.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_tfhd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_tims.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_tkhd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_tmax.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_tmin.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_tpyl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_traf.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_trak.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_tref.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_treftype.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_trex.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_trpy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_trun.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_tsro.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_udta.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_url.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_urn.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\atom_vmhd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\descriptors.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\isma.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4atom.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4container.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4descriptor.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4file.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4file_io.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4info.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4property.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4track.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4util.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\need_for_win32.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\ocidescriptors.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\odcommands.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\qosqualifiers.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\rtphint.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\acconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\atoms.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\descriptors.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4array.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4atom.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4common.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4container.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4descriptor.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4file.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4property.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4track.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mp4util.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mpeg4ip.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ocidescriptors.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\odcommands.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\qosqualifiers.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\rtphint.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\systems.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\win32_ver.h
+# End Source File
+# End Group
+# End Target
+# End Project
--- /dev/null
+++ b/common/mp4v2/libmp4v2_cb.vcproj
@@ -1,0 +1,349 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="libmp4v2_cb"
+	ProjectGUID="{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\CB_Release"
+			IntermediateDirectory=".\CB_Release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".\"
+				PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,USE_FILE_CALLBACKS"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\CB_Release/libmp4v2_cb.pch"
+				AssemblerListingLocation=".\CB_Release/"
+				ObjectFile=".\CB_Release/"
+				ProgramDataBaseFileName=".\CB_Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0">
+				<IntelOptions
+					Optimization="2"
+					InlineFuncExpansion="1"
+					OmitFramePtrs="1"
+					StringPooling="1"
+					RuntimeLibrary="2"
+					BufferSecurityCheck="1"
+					FunctionLevelLinking="1"
+					AllOptions="/c  /I &quot;.\\&quot; /nologo /W3 /O2 /Ob1 /Oy /D &quot;NDEBUG&quot; /D &quot;WIN32&quot; /D &quot;_WINDOWS&quot; /D &quot;USE_FILE_CALLBACKS&quot; /GF /FD /EHsc /MD /GS /Gy /YX&quot;StdAfx.h&quot; /Fp&quot;.\CB_Release/libmp4v2_cb.pch&quot; /Fo&quot;.\CB_Release/&quot; /Fd&quot;.\CB_Release/&quot; /Gd"/>
+			</Tool>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\CB_Release\libmp4v2_cb.lib"
+				SuppressStartupBanner="TRUE">
+				<IntelOptions
+					AllOptions="/OUT:&quot;.\CB_Release\libmp4v2_cb.lib&quot; /NOLOGO"/>
+			</Tool>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1043"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<IntelOptions
+				CompilerName="1"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\CB_Debug"
+			IntermediateDirectory=".\CB_Debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".\"
+				PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,USE_FILE_CALLBACKS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\CB_Debug/libmp4v2_cb.pch"
+				AssemblerListingLocation=".\CB_Debug/"
+				ObjectFile=".\CB_Debug/"
+				ProgramDataBaseFileName=".\CB_Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0">
+				<IntelOptions
+					Optimization="0"
+					MinimalRebuild="1"
+					BasicRuntimeChecks="3"
+					RuntimeLibrary="3"
+					AllOptions="/c  /I &quot;.\\&quot; /ZI /nologo /W3 /Od /D &quot;_DEBUG&quot; /D &quot;WIN32&quot; /D &quot;_WINDOWS&quot; /D &quot;USE_FILE_CALLBACKS&quot; /Gm /EHsc /RTC1 /MDd /YX&quot;StdAfx.h&quot; /Fp&quot;.\CB_Debug/libmp4v2_cb.pch&quot; /Fo&quot;.\CB_Debug/&quot; /Fd&quot;.\CB_Debug/&quot; /Gd"/>
+			</Tool>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\CB_Debug\libmp4v2_cb.lib"
+				SuppressStartupBanner="TRUE">
+				<IntelOptions
+					AllOptions="/OUT:&quot;.\CB_Debug\libmp4v2_cb.lib&quot; /NOLOGO"/>
+			</Tool>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1043"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath=".\atom_co64.cpp"/>
+			<File
+				RelativePath=".\atom_cprt.cpp"/>
+			<File
+				RelativePath=".\atom_ctts.cpp"/>
+			<File
+				RelativePath=".\atom_dimm.cpp"/>
+			<File
+				RelativePath=".\atom_dinf.cpp"/>
+			<File
+				RelativePath=".\atom_dmax.cpp"/>
+			<File
+				RelativePath=".\atom_dmed.cpp"/>
+			<File
+				RelativePath=".\atom_dref.cpp"/>
+			<File
+				RelativePath=".\atom_drep.cpp"/>
+			<File
+				RelativePath=".\atom_edts.cpp"/>
+			<File
+				RelativePath=".\atom_elst.cpp"/>
+			<File
+				RelativePath=".\atom_esds.cpp"/>
+			<File
+				RelativePath=".\atom_free.cpp"/>
+			<File
+				RelativePath=".\atom_ftyp.cpp"/>
+			<File
+				RelativePath=".\atom_hdlr.cpp"/>
+			<File
+				RelativePath=".\atom_hinf.cpp"/>
+			<File
+				RelativePath=".\atom_hmhd.cpp"/>
+			<File
+				RelativePath=".\atom_hnti.cpp"/>
+			<File
+				RelativePath=".\atom_iods.cpp"/>
+			<File
+				RelativePath=".\atom_maxr.cpp"/>
+			<File
+				RelativePath=".\atom_mdat.cpp"/>
+			<File
+				RelativePath=".\atom_mdhd.cpp"/>
+			<File
+				RelativePath=".\atom_mdia.cpp"/>
+			<File
+				RelativePath=".\atom_mfhd.cpp"/>
+			<File
+				RelativePath=".\atom_minf.cpp"/>
+			<File
+				RelativePath=".\atom_moof.cpp"/>
+			<File
+				RelativePath=".\atom_moov.cpp"/>
+			<File
+				RelativePath=".\atom_mp4a.cpp"/>
+			<File
+				RelativePath=".\atom_mp4s.cpp"/>
+			<File
+				RelativePath=".\atom_mp4v.cpp"/>
+			<File
+				RelativePath=".\atom_mvex.cpp"/>
+			<File
+				RelativePath=".\atom_mvhd.cpp"/>
+			<File
+				RelativePath=".\atom_nmhd.cpp"/>
+			<File
+				RelativePath=".\atom_nump.cpp"/>
+			<File
+				RelativePath=".\atom_payt.cpp"/>
+			<File
+				RelativePath=".\atom_pmax.cpp"/>
+			<File
+				RelativePath=".\atom_root.cpp"/>
+			<File
+				RelativePath=".\atom_rtp.cpp"/>
+			<File
+				RelativePath=".\atom_sdp.cpp"/>
+			<File
+				RelativePath=".\atom_smhd.cpp"/>
+			<File
+				RelativePath=".\atom_snro.cpp"/>
+			<File
+				RelativePath=".\atom_stbl.cpp"/>
+			<File
+				RelativePath=".\atom_stco.cpp"/>
+			<File
+				RelativePath=".\atom_stdp.cpp"/>
+			<File
+				RelativePath=".\atom_stsc.cpp"/>
+			<File
+				RelativePath=".\atom_stsd.cpp"/>
+			<File
+				RelativePath=".\atom_stsh.cpp"/>
+			<File
+				RelativePath=".\atom_stss.cpp"/>
+			<File
+				RelativePath=".\atom_stsz.cpp"/>
+			<File
+				RelativePath=".\atom_stts.cpp"/>
+			<File
+				RelativePath=".\atom_tfhd.cpp"/>
+			<File
+				RelativePath=".\atom_tims.cpp"/>
+			<File
+				RelativePath=".\atom_tkhd.cpp"/>
+			<File
+				RelativePath=".\atom_tmax.cpp"/>
+			<File
+				RelativePath=".\atom_tmin.cpp"/>
+			<File
+				RelativePath=".\atom_tpyl.cpp"/>
+			<File
+				RelativePath=".\atom_traf.cpp"/>
+			<File
+				RelativePath=".\atom_trak.cpp"/>
+			<File
+				RelativePath=".\atom_tref.cpp"/>
+			<File
+				RelativePath=".\atom_treftype.cpp"/>
+			<File
+				RelativePath=".\atom_trex.cpp"/>
+			<File
+				RelativePath=".\atom_trpy.cpp"/>
+			<File
+				RelativePath=".\atom_trun.cpp"/>
+			<File
+				RelativePath=".\atom_tsro.cpp"/>
+			<File
+				RelativePath=".\atom_udta.cpp"/>
+			<File
+				RelativePath=".\atom_url.cpp"/>
+			<File
+				RelativePath=".\atom_urn.cpp"/>
+			<File
+				RelativePath=".\atom_vmhd.cpp"/>
+			<File
+				RelativePath=".\descriptors.cpp"/>
+			<File
+				RelativePath=".\isma.cpp"/>
+			<File
+				RelativePath=".\mp4.cpp"/>
+			<File
+				RelativePath=".\mp4atom.cpp"/>
+			<File
+				RelativePath=".\mp4container.cpp"/>
+			<File
+				RelativePath=".\mp4descriptor.cpp"/>
+			<File
+				RelativePath=".\mp4file.cpp"/>
+			<File
+				RelativePath=".\mp4file_io.cpp"/>
+			<File
+				RelativePath=".\mp4info.cpp"/>
+			<File
+				RelativePath=".\mp4property.cpp"/>
+			<File
+				RelativePath=".\mp4track.cpp"/>
+			<File
+				RelativePath=".\mp4util.cpp"/>
+			<File
+				RelativePath=".\need_for_win32.c"/>
+			<File
+				RelativePath=".\ocidescriptors.cpp"/>
+			<File
+				RelativePath=".\odcommands.cpp"/>
+			<File
+				RelativePath=".\qosqualifiers.cpp"/>
+			<File
+				RelativePath=".\rtphint.cpp"/>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath=".\acconfig.h"/>
+			<File
+				RelativePath=".\atoms.h"/>
+			<File
+				RelativePath=".\descriptors.h"/>
+			<File
+				RelativePath=".\mp4.h"/>
+			<File
+				RelativePath=".\mp4array.h"/>
+			<File
+				RelativePath=".\mp4atom.h"/>
+			<File
+				RelativePath=".\mp4common.h"/>
+			<File
+				RelativePath=".\mp4container.h"/>
+			<File
+				RelativePath=".\mp4descriptor.h"/>
+			<File
+				RelativePath=".\mp4file.h"/>
+			<File
+				RelativePath=".\mp4property.h"/>
+			<File
+				RelativePath=".\mp4track.h"/>
+			<File
+				RelativePath=".\mp4util.h"/>
+			<File
+				RelativePath=".\mpeg4ip.h"/>
+			<File
+				RelativePath=".\ocidescriptors.h"/>
+			<File
+				RelativePath=".\odcommands.h"/>
+			<File
+				RelativePath=".\qosqualifiers.h"/>
+			<File
+				RelativePath=".\rtphint.h"/>
+			<File
+				RelativePath=".\systems.h"/>
+			<File
+				RelativePath=".\win32_ver.h"/>
+		</Filter>
+	</Files>
+	<Globals/>
+</VisualStudioProject>
--- a/common/mp4v2/libmp4v2_st60.vcproj
+++ b/common/mp4v2/libmp4v2_st60.vcproj
@@ -70,6 +70,8 @@
 				Culture="1033"/>
 			<Tool
 				Name="VCWebServiceProxyGeneratorTool"/>
+			<IntelOptions
+				CompilerName="1"/>
 		</Configuration>
 		<Configuration
 			Name="Debug|Win32"
--- a/common/mp4v2/mp4.cpp
+++ b/common/mp4v2/mp4.cpp
@@ -50,6 +50,44 @@
 	}
 }
 
+#ifdef USE_FILE_CALLBACKS
+extern "C" MP4FileHandle MP4ReadCb(const char* fileName, u_int32_t verbosity,
+                                   MP4OpenCallback MP4fopen,
+                                   MP4CloseCallback MP4fclose,
+                                   MP4ReadCallback MP4fread,
+                                   MP4WriteCallback MP4fwrite,
+                                   MP4SetposCallback MP4fsetpos,
+                                   MP4GetposCallback MP4fgetpos,
+                                   MP4FilesizeCallback MP4filesize,
+                                   void *userData
+                                   )
+{
+	MP4File* pFile = NULL;
+	try {
+		pFile = new MP4File(verbosity);
+
+        // Set user data and callbacks
+        pFile->m_userData = userData;
+        pFile->m_MP4fopen = MP4fopen;
+        pFile->m_MP4fclose = MP4fclose;
+        pFile->m_MP4fread = MP4fread;
+        pFile->m_MP4fwrite = MP4fwrite;
+        pFile->m_MP4fsetpos = MP4fsetpos;
+        pFile->m_MP4fgetpos = MP4fgetpos;
+        pFile->m_MP4filesize = MP4filesize;
+
+		pFile->Read(fileName);
+		return (MP4FileHandle)pFile;
+	}
+	catch (MP4Error* e) {
+		VERBOSE_ERROR(verbosity, e->Print());
+		delete e;
+		delete pFile;
+		return MP4_INVALID_FILE_HANDLE;
+	}
+}
+#endif
+
 extern "C" MP4FileHandle MP4Create(const char* fileName, 
 	u_int32_t verbosity, bool use64bits, bool useExtensibleFormat)
 {
--- a/common/mp4v2/mp4.h
+++ b/common/mp4v2/mp4.h
@@ -206,6 +206,15 @@
 
 /* MP4 API declarations */
 
+typedef u_int32_t (*MP4OpenCallback)(const char *pName, const char *mode, void *userData);
+typedef void (*MP4CloseCallback)(void *userData);
+typedef u_int32_t (*MP4ReadCallback)(void *pBuffer, unsigned int nBytesToRead, void *userData);
+typedef u_int32_t (*MP4WriteCallback)(void *pBuffer, unsigned int nBytesToWrite, void *userData);
+typedef int32_t (*MP4SetposCallback)(u_int32_t pos, void *userData);
+typedef int64_t (*MP4GetposCallback)(void *userData);
+typedef int64_t (*MP4FilesizeCallback)(void *userData);
+
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -226,6 +235,16 @@
 MP4FileHandle MP4Read(
 	const char* fileName, 
 	u_int32_t verbosity DEFAULT(0));
+
+MP4FileHandle MP4ReadCb(const char* fileName, u_int32_t verbosity,
+                        MP4OpenCallback MP4fopen,
+                        MP4CloseCallback MP4fclose,
+                        MP4ReadCallback MP4fread,
+                        MP4WriteCallback MP4fwrite,
+                        MP4SetposCallback MP4fsetpos,
+                        MP4GetposCallback MP4fgetpos,
+                        MP4FilesizeCallback MP4filesize,
+                        void *userData);
 
 bool MP4Close(
 	MP4FileHandle hFile);
--- a/common/mp4v2/mp4file.cpp
+++ b/common/mp4v2/mp4file.cpp
@@ -47,6 +47,18 @@
 	m_bufReadBits = 0;
 	m_numWriteBits = 0;
 	m_bufWriteBits = 0;
+
+#ifdef USE_FILE_CALLBACKS
+    // These are the default for when no callbacks are specified
+    m_userData = (void*)this;
+    m_MP4fopen = MP4fopen_cb;
+    m_MP4fclose = MP4fclose_cb;
+    m_MP4fread = MP4fread_cb;
+    m_MP4fwrite = MP4fwrite_cb;
+    m_MP4fgetpos = MP4fgetpos_cb;
+    m_MP4fsetpos = MP4fsetpos_cb;
+    m_MP4filesize = MP4filesize_cb;
+#endif
 }
 
 MP4File::~MP4File()
@@ -187,6 +199,7 @@
 
 void MP4File::Optimize(const char* orgFileName, const char* newFileName)
 {
+#ifndef USE_FILE_CALLBACKS
 	m_fileName = MP4Stralloc(orgFileName);
 	m_mode = 'r';
 
@@ -233,6 +246,9 @@
 	if (newFileName == NULL) {
 		Rename(m_fileName, orgFileName);
 	}
+#else
+    throw new MP4Error(errno, "Function not supported when using callbacks", "MP4Optimize");
+#endif
 }
 
 void MP4File::RewriteMdat(FILE* pReadFile, FILE* pWriteFile)
@@ -318,6 +334,7 @@
 {
 	ASSERT(m_pFile == NULL);
 
+#ifndef USE_FILE_CALLBACKS
 #ifdef O_LARGEFILE
 	// UGH! fopen doesn't open a file in 64-bit mode, period.
 	// So we need to use open() and then fdopen()
@@ -347,13 +364,27 @@
 	if (m_pFile == NULL) {
 		throw new MP4Error(errno, "failed", "MP4Open");
 	}
+#else
+    u_int32_t rc = m_MP4fopen(m_fileName, fmode, m_userData);
+    if (rc == 0) {
+		throw new MP4Error(errno, "failed", "MP4Open");
+    }
+#endif
 
 	if (m_mode == 'r') {
+#ifndef USE_FILE_CALLBACKS
 		struct stat s;
 		if (fstat(fileno(m_pFile), &s) < 0) {
 			throw new MP4Error(errno, "stat failed", "MP4Open");
 		}
 		m_orgFileSize = m_fileSize = s.st_size;
+#else
+        int64_t s = m_MP4filesize(m_userData);
+		if (s < 0) {
+			throw new MP4Error(errno, "retreiving filesize failed", "MP4Open");
+		}
+		m_orgFileSize = m_fileSize = (u_int64_t)s;
+#endif
 	} else {
 		m_orgFileSize = m_fileSize = 0;
 	}
@@ -515,8 +546,12 @@
 		FinishWrite();
 	}
 
-	fclose(m_pFile);
-	m_pFile = NULL;
+#ifndef USE_FILE_CALLBACKS
+    fclose(m_pFile);
+    m_pFile = NULL;
+#else
+	m_MP4fclose(this);
+#endif
 }
 
 const char* MP4File::TempFileName()
--- a/common/mp4v2/mp4file.h
+++ b/common/mp4v2/mp4file.h
@@ -31,6 +31,17 @@
 class MP4Descriptor;
 class MP4DescriptorProperty;
 
+#ifdef USE_FILE_CALLBACKS
+typedef u_int32_t (*MP4OpenCallback)(const char *pName, const char *mode, void *userData);
+typedef void (*MP4CloseCallback)(void *userData);
+typedef u_int32_t (*MP4ReadCallback)(void *pBuffer, unsigned int nBytesToRead, void *userData);
+typedef u_int32_t (*MP4WriteCallback)(void *pBuffer, unsigned int nBytesToWrite, void *userData);
+typedef int32_t (*MP4SetposCallback)(u_int32_t pos, void *userData);
+typedef int64_t (*MP4GetposCallback)(void *userData);
+typedef int64_t (*MP4FilesizeCallback)(void *userData);
+#endif
+
+
 class MP4File {
 public: /* equivalent to MP4 library API */
 	MP4File(u_int32_t verbosity = 0);
@@ -500,6 +511,18 @@
 		MP4Atom* pAncestorAtom,
 		const char* childName);
 
+#ifdef USE_FILE_CALLBACKS
+    MP4OpenCallback m_MP4fopen;
+    MP4CloseCallback m_MP4fclose;
+    MP4ReadCallback m_MP4fread;
+    MP4WriteCallback m_MP4fwrite;
+    MP4SetposCallback m_MP4fsetpos;
+    MP4GetposCallback m_MP4fgetpos;
+    MP4FilesizeCallback m_MP4filesize;
+
+    void *m_userData;
+#endif
+
 protected:
 	void Open(const char* fmode);
 	void ReadFromFile();
@@ -622,6 +645,16 @@
 	u_int8_t	m_bufReadBits;
 	u_int8_t	m_numWriteBits;
 	u_int8_t	m_bufWriteBits;
+
+#ifdef USE_FILE_CALLBACKS
+    static u_int32_t MP4fopen_cb(const char *pName, const char *mode, void *userData);
+    static void MP4fclose_cb(void *userData);
+    static u_int32_t MP4fread_cb(void *pBuffer, unsigned int nBytesToRead, void *userData);
+    static u_int32_t MP4fwrite_cb(void *pBuffer, unsigned int nBytesToWrite, void *userData);
+    static int32_t MP4fsetpos_cb(u_int32_t pos, void *userData);
+    static int64_t MP4fgetpos_cb(void *userData);
+    static int64_t MP4filesize_cb(void *userData);
+#endif
 };
 
 #endif /* __MP4_FILE_INCLUDED__ */
--- a/common/mp4v2/mp4file_io.cpp
+++ b/common/mp4v2/mp4file_io.cpp
@@ -34,6 +34,8 @@
 u_int64_t MP4File::GetPosition(FILE* pFile)
 {
 	if (m_memoryBuffer == NULL) {
+        int64_t pos;
+#ifndef USE_FILE_CALLBACKS
 		if (pFile == NULL) {
 			ASSERT(m_pFile);
 			pFile = m_pFile;
@@ -44,6 +46,13 @@
 			throw new MP4Error(errno, "MP4GetPosition");
 		}
 		return FPOS_TO_UINT64(fpos);
+#else
+
+		if ((pos = m_MP4fgetpos(m_userData)) < 0) {
+			throw new MP4Error(errno, "MP4GetPosition");
+		}
+		return (u_int64_t)pos;
+#endif
 	} else {
 		return m_memoryBufferPosition;
 	}
@@ -52,6 +61,7 @@
 void MP4File::SetPosition(u_int64_t pos, FILE* pFile)
 {
 	if (m_memoryBuffer == NULL) {
+#ifndef USE_FILE_CALLBACKS
 		if (pFile == NULL) {
 			ASSERT(m_pFile);
 			pFile = m_pFile;
@@ -62,6 +72,11 @@
 		if (fsetpos(pFile, &fpos) < 0) {
 			throw new MP4Error(errno, "MP4SetPosition");
 		}
+#else
+		if (m_MP4fsetpos(pos, m_userData) < 0) {
+			throw new MP4Error(errno, "MP4SetPosition");
+		}
+#endif
 	} else {
 		if (pos >= m_memoryBufferSize) {
 		  //		  abort();
@@ -94,14 +109,21 @@
 	ASSERT(pBytes);
 	WARNING(m_numReadBits > 0);
 
+#ifndef USE_FILE_CALLBACKS
 	if (pFile == NULL) {
 		pFile = m_pFile;
 	}
 	ASSERT(pFile);
+#endif
 
 	if (m_memoryBuffer == NULL) {
+#ifndef USE_FILE_CALLBACKS
 		if (fread(pBytes, 1, numBytes, pFile) != numBytes) {
+			if (numBytes == 0) {
+#else
+		if (m_MP4fread(pBytes, numBytes, m_userData) != numBytes) {
 			if (feof(pFile)) {
+#endif
 				throw new MP4Error(
 					"not enough bytes, reached end-of-file",
 					"MP4ReadBytes");
@@ -172,12 +194,15 @@
 	}
 
 	if (m_memoryBuffer == NULL) {
+#ifndef USE_FILE_CALLBACKS
 		if (pFile == NULL) {
 			ASSERT(m_pFile);
 			pFile = m_pFile;
 		}
-
 		u_int32_t rc = fwrite(pBytes, 1, numBytes, pFile);
+#else
+		u_int32_t rc = m_MP4fwrite(pBytes, numBytes, m_userData);
+#endif
 		if (rc != numBytes) {
 			throw new MP4Error(errno, "MP4WriteBytes");
 		}
@@ -561,3 +586,69 @@
 	} while (i > 0);
 }
 
+#ifdef USE_FILE_CALLBACKS
+u_int32_t MP4File::MP4fopen_cb(const char *pName,
+                               const char *mode, void *userData)
+{
+    MP4File *myFile = (MP4File*)userData;
+
+    myFile->m_pFile = fopen(pName, mode);
+    if (myFile->m_pFile == NULL)
+        return 0;
+
+    return 1;
+}
+
+void MP4File::MP4fclose_cb(void *userData)
+{
+    MP4File *myFile = (MP4File*)userData;
+
+    fclose(myFile->m_pFile);
+    myFile->m_pFile = NULL;
+}
+
+u_int32_t MP4File::MP4fread_cb(void *pBuffer, unsigned int nBytesToRead,
+                               void *userData)
+{
+    MP4File *myFile = (MP4File*)userData;
+
+    return fread(pBuffer, 1, nBytesToRead, myFile->m_pFile);
+}
+
+u_int32_t MP4File::MP4fwrite_cb(void *pBuffer, unsigned int nBytesToWrite,
+                                void *userData)
+{
+    MP4File *myFile = (MP4File*)userData;
+
+    return fwrite(pBuffer, 1, nBytesToWrite, myFile->m_pFile);
+}
+
+int64_t MP4File::MP4fgetpos_cb(void *userData)
+{
+    fpos_t fpos;
+    MP4File *myFile = (MP4File*)userData;
+
+    if (fgetpos(myFile->m_pFile, &fpos) < 0)
+        return -1;
+    return FPOS_TO_UINT64(fpos);
+}
+
+int32_t MP4File::MP4fsetpos_cb(u_int32_t pos, void *userData)
+{
+    fpos_t fpos;
+    MP4File *myFile = (MP4File*)userData;
+
+    VAR_TO_FPOS(fpos, pos);
+    return fsetpos(myFile->m_pFile, &fpos);
+}
+
+int64_t MP4File::MP4filesize_cb(void *userData)
+{
+    struct stat s;
+    MP4File *myFile = (MP4File*)userData;
+
+    if (fstat(fileno(myFile->m_pFile), &s) < 0)
+        return -1;
+    return s.st_size;
+}
+#endif
--- a/common/mp4v2/mp4track.cpp
+++ b/common/mp4v2/mp4track.cpp
@@ -672,6 +672,7 @@
 	if (pUrlAtom->GetFlags() & 1) {
 		pFile = NULL;	// self-contained
 	} else {
+#ifndef USE_FILE_CALLBACKS
 		MP4StringProperty* pLocationProperty = NULL;
 		pUrlAtom->FindProperty(
 			"*.location", 
@@ -699,10 +700,17 @@
 				}
 			}
 		} 
+#else
+        throw new MP4Error(errno, "Function not supported when using callbacks", "GetSampleFile");
+#endif
 	}
 
 	if (m_lastSampleFile) {
+#ifndef USE_FILE_CALLBACKS
 		fclose(m_lastSampleFile);
+#else
+        throw new MP4Error(errno, "Function not supported when using callbacks", "GetSampleFile");
+#endif
 	}
 
 	// cache the answer
--- a/common/mp4v2/systems.h
+++ b/common/mp4v2/systems.h
@@ -35,7 +35,6 @@
 
 
 
-
 #ifdef WIN32
 
 #define _WIN32_WINNT 0x0400
@@ -265,6 +264,7 @@
 #ifndef FALSE
 #define FALSE 0
 #endif
+
 
 #endif /* __SYSTEMS_H__ */
 
--- a/frontend/faad.vcproj
+++ b/frontend/faad.vcproj
@@ -146,7 +146,7 @@
 			<Tool
 				Name="VCWebDeploymentTool"/>
 			<IntelOptions
-				CompilerName="0"/>
+				CompilerName="1"/>
 		</Configuration>
 	</Configurations>
 	<Files>
--- a/libfaad/libfaad.dsp
+++ b/libfaad/libfaad.dsp
@@ -66,7 +66,7 @@
 # PROP Target_Dir ""
 MTL=midl.exe
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "fftw" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FFTW_ENABLE_FLOAT" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "fftw" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FFTW_ENABLE_FLOAT" /YX /FD /GZ /c
 # ADD BASE RSC /l 0x413 /d "_DEBUG"
 # ADD RSC /l 0x413 /d "_DEBUG"
 BSC32=bscmake.exe
--- a/libfaad/libfaad.vcproj
+++ b/libfaad/libfaad.vcproj
@@ -139,6 +139,8 @@
 				Culture="1043"/>
 			<Tool
 				Name="VCWebServiceProxyGeneratorTool"/>
+			<IntelOptions
+				CompilerName="1"/>
 		</Configuration>
 	</Configurations>
 	<Files>
--- a/plugins/foo_mp4/foo_mp4.cpp
+++ b/plugins/foo_mp4/foo_mp4.cpp
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: foo_mp4.cpp,v 1.5 2002/12/26 20:22:09 menno Exp $
+** $Id: foo_mp4.cpp,v 1.6 2002/12/27 20:01:52 menno Exp $
 **/
 
 #include <mp4.h>
@@ -28,12 +28,12 @@
 {
 public:
 
-    virtual int test_filename(const WCHAR * fn,const WCHAR * ext)
+    virtual int test_filename(const WCHAR *fn, const WCHAR *ext)
     {
         return !wcsicmp(ext,L"MP4");
     }
 
-    virtual int open(reader * r,file_info * info,int full_open)
+    virtual int open(reader *r, file_info *info, int full_open)
     {
         unsigned __int8 *buffer;
         unsigned __int32 buffer_size;
@@ -40,6 +40,8 @@
         unsigned __int8 channels;
         faacDecConfigurationPtr config;
 
+        m_reader = r;
+
         hDecoder = faacDecOpen();
         if (!hDecoder) return 0;
 
@@ -47,11 +49,13 @@
         config->outputFormat = FAAD_FMT_FLOAT;
         faacDecSetConfiguration(hDecoder, config);
 
-        char filename[_MAX_PATH];
-        int len = (wcslen(info->get_file_path())+1)*2;
-        WideCharToMultiByte(CP_ACP,0,info->get_file_path(),-1,filename,len,0,0);
+//        char filename[_MAX_PATH];
+//        int len = (wcslen(info->get_file_path())+1)*2;
+//        WideCharToMultiByte(CP_ACP,0,info->get_file_path(),-1,filename,len,0,0);
 
-        hFile = MP4Read(filename, 0);
+//        hFile = MP4Read(filename, 0);
+        hFile = MP4ReadCb("blablabla", 0, open_cb, close_cb, read_cb, write_cb,
+            setpos_cb, getpos_cb, filesize_cb, (void*)m_reader);
         if (hFile == MP4_INVALID_FILE_HANDLE) return 0;
 
         track = GetAACTrack(hFile);
@@ -153,6 +157,8 @@
 
 private:
 
+    reader *m_reader;
+
     MP4FileHandle hFile;
     MP4SampleId sampleId, numSamples;
     int track;
@@ -198,6 +204,49 @@
 
         /* can't decode this */
         return -1;
+    }
+
+    /* file callback stuff */
+    static unsigned __int32 open_cb(const char *pName,
+        const char *mode, void *userData)
+    {
+        return 1;
+    }
+
+    static void close_cb(void *userData)
+    {
+        return;
+    }
+
+    static unsigned __int32 read_cb(void *pBuffer, unsigned int nBytesToRead,
+        void *userData)
+    {
+        reader *r = (reader*)userData;
+        return r->read(pBuffer, nBytesToRead);
+    }
+
+    static unsigned __int32 write_cb(void *pBuffer, unsigned int nBytesToWrite,
+        void *userData)
+    {
+        return 0;
+    }
+
+    static __int64 getpos_cb(void *userData)
+    {
+        reader *r = (reader*)userData;
+        return r->get_position();
+    }
+
+    static __int32 setpos_cb(unsigned __int32 pos, void *userData)
+    {
+        reader *r = (reader*)userData;
+        return !(r->seek(pos));
+    }
+
+    static __int64 filesize_cb(void *userData)
+    {
+        reader *r = (reader*)userData;
+        return r->get_length();
     }
 };
 
--- a/plugins/foo_mp4/foo_mp4.dsp
+++ b/plugins/foo_mp4/foo_mp4.dsp
@@ -69,7 +69,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../common/mp4v2" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../common/mp4v2" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x413 /d "_DEBUG"
--- a/plugins/foo_mp4/foo_mp4.dsw
+++ b/plugins/foo_mp4/foo_mp4.dsw
@@ -15,14 +15,14 @@
     Project_Dep_Name libfaad
     End Project Dependency
     Begin Project Dependency
-    Project_Dep_Name libmp4v2_st
-    End Project Dependency
-    Begin Project Dependency
     Project_Dep_Name pfc_unicode
     End Project Dependency
     Begin Project Dependency
     Project_Dep_Name foobar2000_SDK
     End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name libmp4v2_cb
+    End Project Dependency
 }}}
 
 ###############################################################################
@@ -51,7 +51,7 @@
 
 ###############################################################################
 
-Project: "libmp4v2_st"=..\..\common\mp4v2\libmp4v2_st60.dsp - Package Owner=<4>
+Project: "libmp4v2_cb"=..\..\common\mp4v2\libmp4v2_cb.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
--- a/plugins/foo_mp4/foo_mp4.sln
+++ b/plugins/foo_mp4/foo_mp4.sln
@@ -5,10 +5,10 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfaad", "..\..\libfaad\libfaad.vcproj", "{AB39547E-6CAC-4E25-8BC4-C97EFC144800}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp4v2_st", "..\..\common\mp4v2\libmp4v2_st60.vcproj", "{0842E354-7635-4B5D-8709-9A373ED27DCA}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pfc_unicode", "pfc\pfc_unicode.vcproj", "{5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp4v2_cb", "..\..\common\mp4v2\libmp4v2_cb.vcproj", "{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}"
+EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		ConfigName.0 = Debug
@@ -17,9 +17,9 @@
 	EndGlobalSection
 	GlobalSection(ProjectDependencies) = postSolution
 		{5CEB23D7-5BDB-4D77-978A-D5B8572843FF}.0 = {409102E1-0B45-41CD-A3F8-C37371520D9B}
-		{5CEB23D7-5BDB-4D77-978A-D5B8572843FF}.1 = {5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}
+		{5CEB23D7-5BDB-4D77-978A-D5B8572843FF}.1 = {FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}
 		{5CEB23D7-5BDB-4D77-978A-D5B8572843FF}.2 = {AB39547E-6CAC-4E25-8BC4-C97EFC144800}
-		{5CEB23D7-5BDB-4D77-978A-D5B8572843FF}.3 = {0842E354-7635-4B5D-8709-9A373ED27DCA}
+		{5CEB23D7-5BDB-4D77-978A-D5B8572843FF}.3 = {5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}
 	EndGlobalSection
 	GlobalSection(ProjectConfiguration) = postSolution
 		{5CEB23D7-5BDB-4D77-978A-D5B8572843FF}.Debug.ActiveCfg = Debug|Win32
@@ -40,12 +40,6 @@
 		{AB39547E-6CAC-4E25-8BC4-C97EFC144800}.Release.Build.0 = Release|Win32
 		{AB39547E-6CAC-4E25-8BC4-C97EFC144800}.Release ANSI.ActiveCfg = Release|Win32
 		{AB39547E-6CAC-4E25-8BC4-C97EFC144800}.Release ANSI.Build.0 = Release|Win32
-		{0842E354-7635-4B5D-8709-9A373ED27DCA}.Debug.ActiveCfg = Debug|Win32
-		{0842E354-7635-4B5D-8709-9A373ED27DCA}.Debug.Build.0 = Debug|Win32
-		{0842E354-7635-4B5D-8709-9A373ED27DCA}.Release.ActiveCfg = Release|Win32
-		{0842E354-7635-4B5D-8709-9A373ED27DCA}.Release.Build.0 = Release|Win32
-		{0842E354-7635-4B5D-8709-9A373ED27DCA}.Release ANSI.ActiveCfg = Release|Win32
-		{0842E354-7635-4B5D-8709-9A373ED27DCA}.Release ANSI.Build.0 = Release|Win32
 		{5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}.Debug.ActiveCfg = Debug|Win32
 		{5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}.Debug.Build.0 = Debug|Win32
 		{5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}.Release.ActiveCfg = Release|Win32
@@ -52,6 +46,12 @@
 		{5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}.Release.Build.0 = Release|Win32
 		{5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}.Release ANSI.ActiveCfg = Release ANSI|Win32
 		{5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}.Release ANSI.Build.0 = Release ANSI|Win32
+		{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}.Debug.ActiveCfg = Debug|Win32
+		{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}.Debug.Build.0 = Debug|Win32
+		{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}.Release.ActiveCfg = Release|Win32
+		{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}.Release.Build.0 = Release|Win32
+		{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}.Release ANSI.ActiveCfg = Release|Win32
+		{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}.Release ANSI.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 	EndGlobalSection
--- a/plugins/foo_mp4/foo_mp4.vcproj
+++ b/plugins/foo_mp4/foo_mp4.vcproj
@@ -32,7 +32,8 @@
 				ProgramDataBaseFileName=".\Release/"
 				WarningLevel="3"
 				SuppressStartupBanner="TRUE"
-				CompileAs="0">
+				CompileAs="0"
+				AdditionalOptions="">
 				<IntelOptions
 					Optimization="2"
 					InlineFuncExpansion="1"
@@ -41,7 +42,8 @@
 					RuntimeLibrary="2"
 					BufferSecurityCheck="1"
 					FunctionLevelLinking="1"
-					AllOptions="/c  /I &quot;../../include&quot; /I &quot;../../common/mp4v2&quot; /nologo /W3 /O2 /Ob1 /Oy /D &quot;WIN32&quot; /D &quot;NDEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_WINDLL&quot; /GF /FD /EHsc /MD /GS /Gy /YX&quot;StdAfx.h&quot; /Fp&quot;.\Release/foo_mp4.pch&quot; /Fo&quot;.\Release/&quot; /Fd&quot;.\Release/&quot; /Gd"/>
+					AllOptions="/c  /I &quot;../../include&quot; /I &quot;../../common/mp4v2&quot; /nologo /W3 /O2 /Ob1 /Oy /D &quot;WIN32&quot; /D &quot;NDEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_WINDLL&quot; /GF /FD /EHsc /MD /GS /Gy /YX&quot;StdAfx.h&quot; /Fp&quot;.\Release/foo_mp4.pch&quot; /Fo&quot;.\Release/&quot; /Fd&quot;.\Release/&quot; /Gd"
+					MSOriginalAdditionalOptions=""/>
 			</Tool>
 			<Tool
 				Name="VCCustomBuildTool"/>
@@ -56,7 +58,8 @@
 				SubSystem="2"
 				ImportLibrary=".\Release/foo_mp4.lib">
 				<IntelOptions
-					AllOptions="/NOLOGO /DLL /OUT:&quot;.\Release/foo_mp4.dll&quot; /INCREMENTAL:NO ws2_32.lib odbc32.lib odbccp32.lib /PDB:&quot;.\Release/foo_mp4.pdb&quot; /SUBSYSTEM:WINDOWS /TLBID:1 /IMPLIB:&quot;.\Release/foo_mp4.lib&quot; /MACHINE:I386 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
+					AllOptions="/NOLOGO /DLL /OUT:&quot;.\Release/foo_mp4.dll&quot; /INCREMENTAL:NO ws2_32.lib odbc32.lib odbccp32.lib /PDB:&quot;.\Release/foo_mp4.pdb&quot; /SUBSYSTEM:WINDOWS /TLBID:1 /IMPLIB:&quot;.\Release/foo_mp4.lib&quot; /MACHINE:I386 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
+					MSOriginalAdditionalOptions="/MACHINE:I386"/>
 			</Tool>
 			<Tool
 				Name="VCMIDLTool"
@@ -79,6 +82,8 @@
 				Name="VCWebServiceProxyGeneratorTool"/>
 			<Tool
 				Name="VCWebDeploymentTool"/>
+			<IntelOptions
+				CompilerName="1"/>
 		</Configuration>
 		<Configuration
 			Name="Debug|Win32"
@@ -102,13 +107,15 @@
 				WarningLevel="3"
 				SuppressStartupBanner="TRUE"
 				DebugInformationFormat="4"
-				CompileAs="0">
+				CompileAs="0"
+				AdditionalOptions="">
 				<IntelOptions
 					Optimization="0"
 					MinimalRebuild="1"
 					BasicRuntimeChecks="3"
 					RuntimeLibrary="1"
-					AllOptions="/c  /I &quot;../../include&quot; /I &quot;../../common/mp4v2&quot; /ZI /nologo /W3 /Od /D &quot;WIN32&quot; /D &quot;_DEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_WINDLL&quot; /Gm /EHsc /RTC1 /MTd /YX&quot;StdAfx.h&quot; /Fp&quot;.\Debug/foo_mp4.pch&quot; /Fo&quot;.\Debug/&quot; /Fd&quot;.\Debug/&quot; /Gd"/>
+					AllOptions="/c  /I &quot;../../include&quot; /I &quot;../../common/mp4v2&quot; /ZI /nologo /W3 /Od /D &quot;WIN32&quot; /D &quot;_DEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_WINDLL&quot; /Gm /EHsc /RTC1 /MTd /YX&quot;StdAfx.h&quot; /Fp&quot;.\Debug/foo_mp4.pch&quot; /Fo&quot;.\Debug/&quot; /Fd&quot;.\Debug/&quot; /Gd"
+					MSOriginalAdditionalOptions=""/>
 			</Tool>
 			<Tool
 				Name="VCCustomBuildTool"/>
@@ -124,7 +131,8 @@
 				SubSystem="2"
 				ImportLibrary=".\Debug/foo_mp4.lib">
 				<IntelOptions
-					AllOptions="/NOLOGO /DLL /OUT:&quot;.\Debug/foo_mp4.dll&quot; /INCREMENTAL ws2_32.lib odbc32.lib odbccp32.lib /DEBUG /PDB:&quot;.\Debug/foo_mp4.pdb&quot; /SUBSYSTEM:WINDOWS /TLBID:1 /IMPLIB:&quot;.\Debug/foo_mp4.lib&quot; /MACHINE:I386 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
+					AllOptions="/NOLOGO /DLL /OUT:&quot;.\Debug/foo_mp4.dll&quot; /INCREMENTAL ws2_32.lib odbc32.lib odbccp32.lib /DEBUG /PDB:&quot;.\Debug/foo_mp4.pdb&quot; /SUBSYSTEM:WINDOWS /TLBID:1 /IMPLIB:&quot;.\Debug/foo_mp4.lib&quot; /MACHINE:I386 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
+					MSOriginalAdditionalOptions="/MACHINE:I386"/>
 			</Tool>
 			<Tool
 				Name="VCMIDLTool"