Reviewed by Darin, Adam and Steve.
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Dec 2007 01:07:24 +0000 (01:07 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Dec 2007 01:07:24 +0000 (01:07 +0000)
        Add media playback support for Windows.

        The implementation uses low level QuickTime API. DLL is
        needed to work around CF use in both WebKit and QuickTime.

        This makes Windows build depend on the QuickTime SDK

        http://developer.apple.com/quicktime/download/

        but not QuickTime itself.

        QTMovieWinTimer contains some copy code from SharedTimerWin. It
        is used in the QuickTime access DLL which can't use WebCore
        SharedTimer due to dependency problems.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28945 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
WebCore/ChangeLog
WebCore/WebCore.vcproj/QTMovieWin.vcproj [new file with mode: 0644]
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.vcproj/build-generated-files.sh
WebCore/html/HTMLMediaElement.cpp
WebCore/platform/graphics/MediaPlayer.cpp
WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp [new file with mode: 0644]
WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h [new file with mode: 0644]
WebCore/platform/graphics/win/QTMovieWin.cpp [new file with mode: 0644]
WebCore/platform/graphics/win/QTMovieWin.h [new file with mode: 0644]
WebCore/platform/graphics/win/QTMovieWinTimer.cpp [new file with mode: 0644]
WebCore/platform/graphics/win/QTMovieWinTimer.h [new file with mode: 0644]
WebCore/rendering/RenderMedia.cpp
WebKit/win/ChangeLog
WebKit/win/WebKit.vcproj/WebKit.sln
WebKit/win/WebKit.vcproj/WebKit.vcproj
WebKitTools/ChangeLog
WebKitTools/Scripts/build-webkit
WebKitTools/Scripts/webkitdirs.pm

index a53699c..2c0da8f 100644 (file)
@@ -1,3 +1,123 @@
+2007-12-21  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Darin, Adam and Steve.
+
+        Add media playback support for Windows.
+        
+        The implementation uses low level QuickTime API. DLL is
+        needed to work around CF use in both WebKit and QuickTime.
+        
+        This makes Windows build depend on the QuickTime SDK 
+        
+        http://developer.apple.com/quicktime/download/
+        
+        but not QuickTime itself.
+        
+        QTMovieWinTimer contains some copy code from SharedTimerWin. It
+        is used in the QuickTime access DLL which can't use WebCore
+        SharedTimer due to dependency problems.
+
+        * WebCore.vcproj/QTMovieWin.vcproj: Added.
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.vcproj/build-generated-files.sh:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::setSrc):
+        * platform/graphics/MediaPlayer.cpp:
+        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
+        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+        (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+        (WebCore::MediaPlayerPrivate::load):
+        (WebCore::MediaPlayerPrivate::play):
+        (WebCore::MediaPlayerPrivate::pause):
+        (WebCore::MediaPlayerPrivate::duration):
+        (WebCore::MediaPlayerPrivate::currentTime):
+        (WebCore::MediaPlayerPrivate::seek):
+        (WebCore::MediaPlayerPrivate::doSeek):
+        (WebCore::MediaPlayerPrivate::cancelSeek):
+        (WebCore::MediaPlayerPrivate::seekTimerFired):
+        (WebCore::MediaPlayerPrivate::setEndTime):
+        (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
+        (WebCore::MediaPlayerPrivate::endPointTimerFired):
+        (WebCore::MediaPlayerPrivate::paused):
+        (WebCore::MediaPlayerPrivate::seeking):
+        (WebCore::MediaPlayerPrivate::naturalSize):
+        (WebCore::MediaPlayerPrivate::hasVideo):
+        (WebCore::MediaPlayerPrivate::setVolume):
+        (WebCore::MediaPlayerPrivate::setMuted):
+        (WebCore::MediaPlayerPrivate::setRate):
+        (WebCore::MediaPlayerPrivate::dataRate):
+        (WebCore::MediaPlayerPrivate::maxTimeBuffered):
+        (WebCore::MediaPlayerPrivate::maxTimeSeekable):
+        (WebCore::MediaPlayerPrivate::maxTimeLoaded):
+        (WebCore::MediaPlayerPrivate::bytesLoaded):
+        (WebCore::MediaPlayerPrivate::totalBytesKnown):
+        (WebCore::MediaPlayerPrivate::totalBytes):
+        (WebCore::MediaPlayerPrivate::cancelLoad):
+        (WebCore::MediaPlayerPrivate::updateStates):
+        (WebCore::MediaPlayerPrivate::didEnd):
+        (WebCore::MediaPlayerPrivate::setRect):
+        (WebCore::MediaPlayerPrivate::setVisible):
+        (WebCore::MediaPlayerPrivate::paint):
+        (WebCore::MediaPlayerPrivate::getSupportedTypes):
+        (WebCore::MediaPlayerPrivate::movieEnded):
+        (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
+        (WebCore::MediaPlayerPrivate::movieTimeChanged):
+        (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
+        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
+        (WebCore::MediaPlayerPrivate::networkState):
+        (WebCore::MediaPlayerPrivate::readyState):
+        * platform/graphics/win/QTMovieWin.cpp: Added.
+        (updateTaskTimer):
+        (QTMovieWinPrivate::QTMovieWinPrivate):
+        (QTMovieWinPrivate::~QTMovieWinPrivate):
+        (taskTimerFired):
+        (QTMovieWinPrivate::startTask):
+        (QTMovieWinPrivate::endTask):
+        (QTMovieWinPrivate::task):
+        (QTMovieWinPrivate::registerDrawingCallback):
+        (QTMovieWinPrivate::drawingComplete):
+        (QTMovieWinPrivate::createGWorld):
+        (QTMovieWinPrivate::setSize):
+        (QTMovieWinPrivate::deleteGWorld):
+        (QTMovieWin::QTMovieWin):
+        (QTMovieWin::~QTMovieWin):
+        (QTMovieWin::play):
+        (QTMovieWin::pause):
+        (QTMovieWin::rate):
+        (QTMovieWin::setRate):
+        (QTMovieWin::duration):
+        (QTMovieWin::currentTime):
+        (QTMovieWin::setCurrentTime):
+        (QTMovieWin::setVolume):
+        (QTMovieWin::setMuted):
+        (QTMovieWin::dataSize):
+        (QTMovieWin::maxTimeLoaded):
+        (QTMovieWin::loadState):
+        (QTMovieWin::getNaturalSize):
+        (QTMovieWin::setSize):
+        (QTMovieWin::setVisible):
+        (QTMovieWin::paint):
+        (QTMovieWin::load):
+        (movieDrawingCompleteProc):
+        (initializeSupportedTypes):
+        (QTMovieWin::countSupportedTypes):
+        (QTMovieWin::getSupportedType):
+        (QTMovieWin::initializeQuickTime):
+        (DllMain):
+        * platform/graphics/win/QTMovieWin.h: Added.
+        * platform/graphics/win/QTMovieWinTimer.cpp: Added.
+        (TimerWindowWndProc):
+        (initializeOffScreenTimerWindow):
+        (setSharedTimerFiredFunction):
+        (timerFired):
+        (setSharedTimerFireDelay):
+        (stopSharedTimer):
+        (setSharedTimerInstanceHandle):
+        (systemTime):
+        * platform/graphics/win/QTMovieWinTimer.h: Added.
+        * rendering/RenderMedia.cpp:
+        (WebCore::MediaControlPlayButtonElement::update):
+
 2007-12-21  Brent Fulgham  <bfulgham@gmail.com>
 
         Reviewed by Alp Toker.
diff --git a/WebCore/WebCore.vcproj/QTMovieWin.vcproj b/WebCore/WebCore.vcproj/QTMovieWin.vcproj
new file mode 100644 (file)
index 0000000..a1df0b9
--- /dev/null
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="QTMovieWin"\r
+       ProjectGUID="{E498CA9D-3BD2-4D52-8E37-C8DC76526325}"\r
+       RootNamespace="QuickTimeWin"\r
+       Keyword="Win32Proj"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(WebKitOutputDir)\bin"\r
+                       IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\debug.vsprops"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;QTMOVIEWIN_EXPORTS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="&quot;$(ProgramFiles)\QuickTime SDK\Libraries\QTMLClient.lib&quot; WTF$(WebKitConfigSuffix).lib winmm.lib pthreadVC2$(WebKitConfigSuffix).lib Msimg32.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="&quot;$(WebKitOutputDir)\lib&quot;;$(WebKitLibrariesDir)\lib"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               DelayLoadDLLs="pthreadVC2$(WebKitConfigSuffix).dll;Msimg32.dll"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               ImportLibrary="$(WebKitOutputDir)\lib\$(TargetName).lib"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\QTMovieWin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\QTMovieWin.h&quot; &quot;$(WebKitOutputDir)\include\QTMovieWin&quot;&#x0D;&#x0A;"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(WebKitOutputDir)\bin"\r
+                       IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\release.vsprops"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;QTMOVIEWIN_EXPORTS"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="&quot;$(ProgramFiles)\QuickTime SDK\Libraries\QTMLClient.lib&quot; WTF$(WebKitConfigSuffix).lib winmm.lib pthreadVC2$(WebKitConfigSuffix).lib Msimg32.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="&quot;$(WebKitOutputDir)\lib&quot;;$(WebKitLibrariesDir)\lib"\r
+                               DelayLoadDLLs="pthreadVC2$(WebKitConfigSuffix).dll;Msimg32.dll"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug_Internal|Win32"\r
+                       OutputDirectory="$(WebKitOutputDir)\bin"\r
+                       IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\debug_internal.vsprops"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;QTMOVIEWIN_EXPORTS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="&quot;$(ProgramFiles)\QuickTime SDK\Libraries\QTMLClient.lib&quot; WTF$(WebKitConfigSuffix).lib winmm.lib pthreadVC2$(WebKitConfigSuffix).lib Msimg32.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="&quot;$(WebKitOutputDir)\lib&quot;;$(WebKitLibrariesDir)\lib"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               DelayLoadDLLs="pthreadVC2$(WebKitConfigSuffix).dll;Msimg32.dll"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               ImportLibrary="$(WebKitOutputDir)\lib\$(TargetName).lib"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\QTMovieWin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\QTMovieWin.h&quot; &quot;$(WebKitOutputDir)\include\QTMovieWin&quot;&#x0D;&#x0A;"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\platform\graphics\win\QTMovieWin.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\platform\graphics\win\QTMovieWinTimer.cpp"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\platform\graphics\win\QTMovieWin.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\platform\graphics\win\QTMovieWinTimer.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
index 3cb84c6..3057eac 100644 (file)
@@ -43,8 +43,8 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\win&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\network\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\cairo&quot;;&quot;$(ProjectDir)..\platform\graphics\cg&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\platform\image-decoders&quot;;&quot;$(ProjectDir)..\platform\image-decoders\bmp&quot;;&quot;$(ProjectDir)..\platform\image-decoders\gif&quot;;&quot;$(ProjectDir)..\platform\image-decoders\ico&quot;;&quot;$(ProjectDir)..\platform\image-decoders\jpeg&quot;;&quot;$(ProjectDir)..\platform\image-decoders\png&quot;;&quot;$(ProjectDir)..\platform\image-decoders\xbm&quot;;&quot;$(ProjectDir)..\platform\image-decoders\zlib&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\platform\cairo\pixman\src&quot;;&quot;$(ProjectDir)..\platform\cairo\cairo\src&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\cg&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\kcanvas&quot;;&quot;$(ProjectDir)..\kcanvas\device&quot;;&quot;$(ProjectDir)..\kcanvas\device\quartz&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"\r
-                               PreprocessorDefinitions="WIN32;__WIN32__;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ENABLE_XSLT;ENABLE_XPATH;ENABLE_SVG;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_USE;WEBCORE_CONTEXT_MENUS;USE_SAFARI_THEME"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\win&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\network\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\cairo&quot;;&quot;$(ProjectDir)..\platform\graphics\cg&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\platform\image-decoders&quot;;&quot;$(ProjectDir)..\platform\image-decoders\bmp&quot;;&quot;$(ProjectDir)..\platform\image-decoders\gif&quot;;&quot;$(ProjectDir)..\platform\image-decoders\ico&quot;;&quot;$(ProjectDir)..\platform\image-decoders\jpeg&quot;;&quot;$(ProjectDir)..\platform\image-decoders\png&quot;;&quot;$(ProjectDir)..\platform\image-decoders\xbm&quot;;&quot;$(ProjectDir)..\platform\image-decoders\zlib&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\platform\cairo\pixman\src&quot;;&quot;$(ProjectDir)..\platform\cairo\cairo\src&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\cg&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\kcanvas&quot;;&quot;$(ProjectDir)..\kcanvas\device&quot;;&quot;$(ProjectDir)..\kcanvas\device\quartz&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;$(WebKitOutputDir)\include\QtMovieWin"\r
+                               PreprocessorDefinitions="WIN32;__WIN32__;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ENABLE_XSLT;ENABLE_XPATH;ENABLE_SVG;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_USE;ENABLE_VIDEO;WEBCORE_CONTEXT_MENUS;USE_SAFARI_THEME"\r
                                MinimalRebuild="true"\r
                                ExceptionHandling="0"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\win&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\network\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\cairo&quot;;&quot;$(ProjectDir)..\platform\graphics\cg&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\platform\image-decoders&quot;;&quot;$(ProjectDir)..\platform\image-decoders\bmp&quot;;&quot;$(ProjectDir)..\platform\image-decoders\gif&quot;;&quot;$(ProjectDir)..\platform\image-decoders\ico&quot;;&quot;$(ProjectDir)..\platform\image-decoders\jpeg&quot;;&quot;$(ProjectDir)..\platform\image-decoders\png&quot;;&quot;$(ProjectDir)..\platform\image-decoders\xbm&quot;;&quot;$(ProjectDir)..\platform\image-decoders\zlib&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\platform\cairo\pixman\src&quot;;&quot;$(ProjectDir)..\platform\cairo\cairo\src&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\cg&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\kcanvas&quot;;&quot;$(ProjectDir)..\kcanvas\device&quot;;&quot;$(ProjectDir)..\kcanvas\device\quartz&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"\r
-                               PreprocessorDefinitions="WIN32;__WIN32__;ENABLE_XSLT;ENABLE_XPATH;ENABLE_SVG;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_USE;NDEBUG;WEBCORE_CONTEXT_MENUS;USE_SAFARI_THEME"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\win&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\network\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\cairo&quot;;&quot;$(ProjectDir)..\platform\graphics\cg&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\platform\image-decoders&quot;;&quot;$(ProjectDir)..\platform\image-decoders\bmp&quot;;&quot;$(ProjectDir)..\platform\image-decoders\gif&quot;;&quot;$(ProjectDir)..\platform\image-decoders\ico&quot;;&quot;$(ProjectDir)..\platform\image-decoders\jpeg&quot;;&quot;$(ProjectDir)..\platform\image-decoders\png&quot;;&quot;$(ProjectDir)..\platform\image-decoders\xbm&quot;;&quot;$(ProjectDir)..\platform\image-decoders\zlib&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\platform\cairo\pixman\src&quot;;&quot;$(ProjectDir)..\platform\cairo\cairo\src&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\cg&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\kcanvas&quot;;&quot;$(ProjectDir)..\kcanvas\device&quot;;&quot;$(ProjectDir)..\kcanvas\device\quartz&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;$(WebKitOutputDir)\include\QtMovieWin"\r
+                               PreprocessorDefinitions="WIN32;__WIN32__;ENABLE_XSLT;ENABLE_XPATH;ENABLE_SVG;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_USE;ENABLE_VIDEO;NDEBUG;WEBCORE_CONTEXT_MENUS;USE_SAFARI_THEME"\r
                                ExceptionHandling="0"\r
                                RuntimeLibrary="2"\r
                                RuntimeTypeInfo="false"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\win&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\network\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\cairo&quot;;&quot;$(ProjectDir)..\platform\graphics\cg&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\platform\image-decoders&quot;;&quot;$(ProjectDir)..\platform\image-decoders\bmp&quot;;&quot;$(ProjectDir)..\platform\image-decoders\gif&quot;;&quot;$(ProjectDir)..\platform\image-decoders\ico&quot;;&quot;$(ProjectDir)..\platform\image-decoders\jpeg&quot;;&quot;$(ProjectDir)..\platform\image-decoders\png&quot;;&quot;$(ProjectDir)..\platform\image-decoders\xbm&quot;;&quot;$(ProjectDir)..\platform\image-decoders\zlib&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\platform\cairo\pixman\src&quot;;&quot;$(ProjectDir)..\platform\cairo\cairo\src&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\cg&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\kcanvas&quot;;&quot;$(ProjectDir)..\kcanvas\device&quot;;&quot;$(ProjectDir)..\kcanvas\device\quartz&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"\r
-                               PreprocessorDefinitions="WIN32;__WIN32__;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ENABLE_XSLT;ENABLE_XPATH;ENABLE_SVG;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_USE;WEBCORE_CONTEXT_MENUS;USE_SAFARI_THEME"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\win&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\network\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\cairo&quot;;&quot;$(ProjectDir)..\platform\graphics\cg&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\platform\image-decoders&quot;;&quot;$(ProjectDir)..\platform\image-decoders\bmp&quot;;&quot;$(ProjectDir)..\platform\image-decoders\gif&quot;;&quot;$(ProjectDir)..\platform\image-decoders\ico&quot;;&quot;$(ProjectDir)..\platform\image-decoders\jpeg&quot;;&quot;$(ProjectDir)..\platform\image-decoders\png&quot;;&quot;$(ProjectDir)..\platform\image-decoders\xbm&quot;;&quot;$(ProjectDir)..\platform\image-decoders\zlib&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\platform\cairo\pixman\src&quot;;&quot;$(ProjectDir)..\platform\cairo\cairo\src&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\cg&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\kcanvas&quot;;&quot;$(ProjectDir)..\kcanvas\device&quot;;&quot;$(ProjectDir)..\kcanvas\device\quartz&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;$(WebKitOutputDir)\include\QtMovieWin"\r
+                               PreprocessorDefinitions="WIN32;__WIN32__;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ENABLE_XSLT;ENABLE_XPATH;ENABLE_SVG;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_USE;ENABLE_VIDEO;WEBCORE_CONTEXT_MENUS;USE_SAFARI_THEME"\r
                                MinimalRebuild="true"\r
                                ExceptionHandling="0"\r
                                BasicRuntimeChecks="3"\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSHTMLAudioElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSHTMLAudioElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLBaseElement.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSHTMLMediaElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSHTMLMediaElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLMenuElement.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSHTMLSourceElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSHTMLSourceElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLStyleElement.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSHTMLVideoElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSHTMLVideoElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSKeyboardEvent.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSMediaError.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSMediaError.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSMediaList.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSTimeRanges.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSTimeRanges.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSTreeWalker.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSVoidCallback.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\..\WebKitBuild\obj\WebCore\DerivedSources\JSVoidCallback.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSWheelEvent.cpp"\r
                                >\r
                        </File>\r
                                        RelativePath="..\platform\win\MIMETypeRegistryWin.cpp"\r
                                        >\r
                                </File>\r
-                               <File\r
+                               <File\r
                                        RelativePath="..\platform\win\MutexWin.cpp"\r
                                        >\r
                                </File>\r
                                        RelativePath="..\platform\text\win\TextBreakIteratorInternalICUWin.cpp"\r
                                        >\r
                                </File>\r
-                               <File\r
+                               <File\r
                                        RelativePath="..\platform\win\ThreadConditionWin.cpp"\r
                                        >\r
                                </File>\r
                                        >\r
                                </File>\r
                                <File\r
+                                       RelativePath="..\platform\graphics\MediaPlayer.cpp"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\platform\graphics\MediaPlayer.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath="..\platform\graphics\Path.cpp"\r
                                        >\r
                                </File>\r
                                                RelativePath="..\platform\graphics\win\IntSizeWin.cpp"\r
                                                >\r
                                        </File>\r
+                                       <File\r
+                                               RelativePath="..\platform\graphics\win\MediaPlayerPrivateQuickTimeWin.cpp"\r
+                                               >\r
+                                       </File>\r
+                                       <File\r
+                                               RelativePath="..\platform\graphics\win\MediaPlayerPrivateQuickTimeWin.h"\r
+                                               >\r
+                                       </File>\r
                                </Filter>\r
                                <Filter\r
                                        Name="cg"\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\rendering\RenderMedia.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\rendering\RenderMedia.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\rendering\RenderMenuList.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\rendering\RenderVideo.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\rendering\RenderVideo.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\rendering\RenderView.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\html\HTMLAudioElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\html\HTMLAudioElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\html\HTMLBaseElement.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\html\HTMLMediaElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\html\HTMLMediaElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\html\HTMLMenuElement.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\html\HTMLSourceElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\html\HTMLSourceElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\html\HTMLStyleElement.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\html\HTMLVideoElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\html\HTMLVideoElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\html\HTMLViewSourceDocument.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\html\MediaError.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\html\TimeRanges.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\html\TimeRanges.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\html\VoidCallback.h"\r
                                >\r
                        </File>\r
                                        >\r
                                </File>\r
                                <File\r
+                                       RelativePath="..\bindings\js\JSHTMLAudioElementConstructor.cpp"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\bindings\js\JSHTMLAudioElementConstructor.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath="..\bindings\js\JSHTMLCollectionCustom.cpp"\r
                                        >\r
                                </File>\r
index 445c91f..6e15582 100644 (file)
@@ -65,5 +65,5 @@ mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources"
 cd "${BUILT_PRODUCTS_DIR}/DerivedSources"
 
 export WebCore="${XSRCROOT}"
-export FEATURE_DEFINES="ENABLE_DATABASE ENABLE_ICONDATABASE ENABLE_XPATH ENABLE_SVG ENABLE_SVG_AS_IMAGE ENABLE_SVG_USE"
+export FEATURE_DEFINES="ENABLE_DATABASE ENABLE_ICONDATABASE ENABLE_XPATH ENABLE_SVG ENABLE_SVG_AS_IMAGE ENABLE_SVG_USE ENABLE_VIDEO"
 make -f "$WebCore/DerivedSources.make" -j ${NUMCPUS} || exit 1
index 53e2d99..bc9bb3d 100644 (file)
@@ -229,7 +229,7 @@ String HTMLMediaElement::src() const
     return document()->completeURL(getAttribute(srcAttr));
 }
 
-void HTMLMediaElement::HTMLMediaElement::setSrc(const String& url)
+void HTMLMediaElement::setSrc(const String& url)
 {
     setAttribute(srcAttr, url);
 }
index e24661f..23ae479 100644 (file)
@@ -33,6 +33,8 @@
 
 #if PLATFORM(MAC)
 #include "MediaPlayerPrivateQTKit.h"
+#elif PLATFORM(WIN)
+#include "MediaPlayerPrivateQuickTimeWin.h"
 #elif PLATFORM(GTK)
 #include "MediaPlayerPrivateGStreamer.h"
 #endif
diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
new file mode 100644 (file)
index 0000000..c17eb4b
--- /dev/null
@@ -0,0 +1,419 @@
+/*\r
+ * Copyright (C) 2007 Apple Inc. All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY\r
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ */\r
+\r
+#include "config.h"\r
+\r
+#if ENABLE(VIDEO)\r
+#include "MediaPlayerPrivateQuickTimeWin.h"\r
+\r
+#include "DeprecatedString.h"\r
+#include "GraphicsContext.h"\r
+#include "KURL.h"\r
+#include "QTMovieWin.h"\r
+#include "ScrollView.h"\r
+#include <wtf/MathExtras.h>\r
+\r
+using namespace std;\r
+\r
+namespace WebCore {\r
+\r
+static const double endPointTimerInterval = 0.020;\r
+    \r
+MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)\r
+    : m_player(player)\r
+    , m_seekTo(-1)\r
+    , m_endTime(numeric_limits<float>::infinity())\r
+    , m_seekTimer(this, &MediaPlayerPrivate::seekTimerFired)\r
+    , m_endPointTimer(this, &MediaPlayerPrivate::endPointTimerFired)\r
+    , m_networkState(MediaPlayer::Empty)\r
+    , m_readyState(MediaPlayer::DataUnavailable)\r
+    , m_startedPlaying(false)\r
+    , m_isStreaming(false)\r
+{\r
+}\r
+\r
+MediaPlayerPrivate::~MediaPlayerPrivate()\r
+{\r
+}\r
+\r
+void MediaPlayerPrivate::load(const String& url)\r
+{\r
+    if (!QTMovieWin::initializeQuickTime()) {\r
+        m_networkState = MediaPlayer::LoadFailed;\r
+        m_player->networkStateChanged();\r
+        return;\r
+    }\r
+\r
+    if (m_networkState != MediaPlayer::Loading) {\r
+        m_networkState = MediaPlayer::Loading;\r
+        m_player->networkStateChanged();\r
+    }\r
+    if (m_readyState != MediaPlayer::DataUnavailable) {\r
+        m_readyState = MediaPlayer::DataUnavailable;\r
+        m_player->readyStateChanged();\r
+    }\r
+    cancelSeek();\r
+    m_endPointTimer.stop();\r
+\r
+    m_qtMovie.set(new QTMovieWin(this));\r
+    m_qtMovie->load(url.characters(), url.length());\r
+    m_qtMovie->setMuted(m_player->m_muted);\r
+    m_qtMovie->setVolume(m_player->m_volume);\r
+}\r
+\r
+void MediaPlayerPrivate::play()\r
+{\r
+    if (!m_qtMovie)\r
+        return;\r
+    m_startedPlaying = true;\r
+\r
+    m_qtMovie->play();\r
+    startEndPointTimerIfNeeded();\r
+}\r
+\r
+void MediaPlayerPrivate::pause()\r
+{\r
+    if (!m_qtMovie)\r
+        return;\r
+    m_startedPlaying = false;\r
+    m_qtMovie->pause();\r
+    m_endPointTimer.stop();\r
+}\r
+\r
+float MediaPlayerPrivate::duration() const\r
+{\r
+    if (!m_qtMovie)\r
+        return 0;\r
+    return m_qtMovie->duration();\r
+}\r
+\r
+float MediaPlayerPrivate::currentTime() const\r
+{\r
+    if (!m_qtMovie)\r
+        return 0;\r
+    return min(m_qtMovie->currentTime(), m_endTime);\r
+}\r
+\r
+void MediaPlayerPrivate::seek(float time)\r
+{\r
+    cancelSeek();\r
+    \r
+    if (!m_qtMovie)\r
+        return;\r
+    \r
+    if (time > duration())\r
+        time = duration();\r
+    \r
+    m_seekTo = time;\r
+    if (maxTimeLoaded() >= m_seekTo)\r
+        doSeek();\r
+    else \r
+        m_seekTimer.start(0, 0.5f);\r
+}\r
+    \r
+void MediaPlayerPrivate::doSeek() \r
+{\r
+    float oldRate = m_qtMovie->rate();\r
+    m_qtMovie->setRate(0);\r
+    m_qtMovie->setCurrentTime(m_seekTo);\r
+    float timeAfterSeek = currentTime();\r
+    // restore playback only if not at end, othewise QTMovie will loop\r
+    if (timeAfterSeek < duration() && timeAfterSeek < m_endTime)\r
+        m_qtMovie->setRate(oldRate);\r
+    cancelSeek();\r
+}\r
+\r
+void MediaPlayerPrivate::cancelSeek()\r
+{\r
+    m_seekTo = -1;\r
+    m_seekTimer.stop();\r
+}\r
+\r
+void MediaPlayerPrivate::seekTimerFired(Timer<MediaPlayerPrivate>*)\r
+{        \r
+    if (!m_qtMovie || !seeking() || currentTime() == m_seekTo) {\r
+        cancelSeek();\r
+        updateStates();\r
+        m_player->timeChanged(); \r
+        return;\r
+    } \r
+    \r
+    if (maxTimeLoaded() >= m_seekTo)\r
+        doSeek();\r
+    else {\r
+        MediaPlayer::NetworkState state = networkState();\r
+        if (state == MediaPlayer::Empty || state == MediaPlayer::Loaded) {\r
+            cancelSeek();\r
+            updateStates();\r
+            m_player->timeChanged();\r
+        }\r
+    }\r
+}\r
+\r
+void MediaPlayerPrivate::setEndTime(float time)\r
+{\r
+    m_endTime = time;\r
+    startEndPointTimerIfNeeded();\r
+}\r
+\r
+void MediaPlayerPrivate::startEndPointTimerIfNeeded()\r
+{\r
+    if (m_endTime < duration() && m_startedPlaying && !m_endPointTimer.isActive())\r
+        m_endPointTimer.startRepeating(endPointTimerInterval);\r
+}\r
+\r
+void MediaPlayerPrivate::endPointTimerFired(Timer<MediaPlayerPrivate>*)\r
+{\r
+    float time = currentTime();\r
+    if (time >= m_endTime) {\r
+        pause();\r
+        didEnd();\r
+    }\r
+}\r
+\r
+bool MediaPlayerPrivate::paused() const\r
+{\r
+    if (!m_qtMovie)\r
+        return true;\r
+    return m_qtMovie->rate() == 0.0f;\r
+}\r
+\r
+bool MediaPlayerPrivate::seeking() const\r
+{\r
+    if (!m_qtMovie)\r
+        return false;\r
+    return m_seekTo >= 0;\r
+}\r
+\r
+IntSize MediaPlayerPrivate::naturalSize() const\r
+{\r
+    if (!m_qtMovie)\r
+        return IntSize();\r
+    int width;\r
+    int height;\r
+    m_qtMovie->getNaturalSize(width, height);\r
+    return IntSize(width, height);\r
+}\r
+\r
+bool MediaPlayerPrivate::hasVideo() const\r
+{\r
+    // This is not used at the moment\r
+    return true;\r
+}\r
+\r
+void MediaPlayerPrivate::setVolume(float volume)\r
+{\r
+    if (!m_qtMovie)\r
+        return;\r
+    m_qtMovie->setVolume(volume);\r
+}\r
+\r
+void MediaPlayerPrivate::setMuted(bool b)\r
+{\r
+    if (!m_qtMovie)\r
+        return;\r
+    m_qtMovie->setMuted(b);\r
+}\r
+\r
+void MediaPlayerPrivate::setRate(float rate)\r
+{\r
+    if (!m_qtMovie)\r
+        return;\r
+    if (!paused())\r
+        m_qtMovie->setRate(rate);\r
+}\r
+\r
+int MediaPlayerPrivate::dataRate() const\r
+{\r
+    // This is not used at the moment\r
+    return 0;\r
+}\r
+\r
+float MediaPlayerPrivate::maxTimeBuffered() const\r
+{\r
+    // rtsp streams are not buffered\r
+    return m_isStreaming ? 0 : maxTimeLoaded();\r
+}\r
+\r
+float MediaPlayerPrivate::maxTimeSeekable() const\r
+{\r
+    // infinite duration means live stream\r
+    return !isfinite(duration()) ? 0 : maxTimeLoaded();\r
+}\r
+\r
+float MediaPlayerPrivate::maxTimeLoaded() const\r
+{\r
+    if (!m_qtMovie)\r
+        return 0;\r
+    return m_qtMovie->maxTimeLoaded(); \r
+}\r
+\r
+unsigned MediaPlayerPrivate::bytesLoaded() const\r
+{\r
+    if (!m_qtMovie)\r
+        return 0;\r
+    float dur = duration();\r
+    float maxTime = maxTimeLoaded();\r
+    if (!dur)\r
+        return 0;\r
+    return totalBytes() * maxTime / dur;\r
+}\r
+\r
+bool MediaPlayerPrivate::totalBytesKnown() const\r
+{\r
+    return totalBytes() > 0;\r
+}\r
+\r
+unsigned MediaPlayerPrivate::totalBytes() const\r
+{\r
+    if (!m_qtMovie)\r
+        return 0;\r
+    return m_qtMovie->dataSize();\r
+}\r
+\r
+void MediaPlayerPrivate::cancelLoad()\r
+{\r
+    if (m_networkState < MediaPlayer::Loading || m_networkState == MediaPlayer::Loaded)\r
+        return;\r
+    \r
+    // Cancel the load by destroying the movie.\r
+    m_qtMovie.clear();\r
+    \r
+    updateStates();\r
+}\r
+\r
+void MediaPlayerPrivate::updateStates()\r
+{\r
+    MediaPlayer::NetworkState oldNetworkState = m_networkState;\r
+    MediaPlayer::ReadyState oldReadyState = m_readyState;\r
+  \r
+    long loadState = m_qtMovie ? m_qtMovie->loadState() : -1;\r
+    // "Loaded" is reserved for fully buffered movies, never the case when streaming\r
+    if (loadState >= QTMovieLoadStateComplete && !m_isStreaming) {\r
+        if (m_networkState < MediaPlayer::Loaded)\r
+            m_networkState = MediaPlayer::Loaded;\r
+        m_readyState = MediaPlayer::CanPlayThrough;\r
+    } else if (loadState >= QTMovieLoadStatePlaythroughOK) {\r
+        if (m_networkState < MediaPlayer::LoadedFirstFrame && !seeking())\r
+            m_networkState = MediaPlayer::LoadedFirstFrame;\r
+        m_readyState = (m_qtMovie->rate() == 0.0f && m_startedPlaying) ? MediaPlayer::DataUnavailable : MediaPlayer::CanPlayThrough;\r
+    } else if (loadState >= QTMovieLoadStatePlayable) {\r
+        if (m_networkState < MediaPlayer::LoadedFirstFrame && !seeking())\r
+            m_networkState = MediaPlayer::LoadedFirstFrame;\r
+        m_readyState = (m_qtMovie->rate() == 0.0f && m_startedPlaying) ? MediaPlayer::DataUnavailable : MediaPlayer::CanPlay;\r
+    } else if (loadState >= QTMovieLoadStateLoaded) {\r
+        if (m_networkState < MediaPlayer::LoadedMetaData)\r
+            m_networkState = MediaPlayer::LoadedMetaData;\r
+        m_readyState = MediaPlayer::DataUnavailable;\r
+    } else if (loadState >= 0) {\r
+        if (m_networkState < MediaPlayer::Loading)\r
+            m_networkState = MediaPlayer::Loading;\r
+        m_readyState = MediaPlayer::DataUnavailable;        \r
+    } else {\r
+        m_networkState = MediaPlayer::LoadFailed;\r
+        m_readyState = MediaPlayer::DataUnavailable; \r
+    }\r
+\r
+    if (seeking())\r
+        m_readyState = MediaPlayer::DataUnavailable;\r
+    \r
+    if (m_networkState != oldNetworkState)\r
+        m_player->networkStateChanged();\r
+    if (m_readyState != oldReadyState)\r
+        m_player->readyStateChanged();\r
+}\r
+\r
+\r
+void MediaPlayerPrivate::didEnd()\r
+{\r
+    m_endPointTimer.stop();\r
+    m_startedPlaying = false;\r
+    updateStates();\r
+    m_player->timeChanged();\r
+}\r
+\r
+void MediaPlayerPrivate::setRect(const IntRect& r) \r
+{ \r
+    if (m_qtMovie)\r
+        m_qtMovie->setSize(r.width(), r.height());\r
+}\r
+\r
+void MediaPlayerPrivate::setVisible(bool b)\r
+{\r
+    if (!m_qtMovie)\r
+        return;\r
+    m_qtMovie->setVisible(b);\r
+}\r
+\r
+void MediaPlayerPrivate::paint(GraphicsContext* p, const IntRect& r)\r
+{\r
+    if (p->paintingDisabled() || !m_qtMovie)\r
+        return;\r
+    HDC hdc = p->getWindowsContext(r);\r
+    m_qtMovie->paint(hdc, r.x(), r.y());\r
+    p->releaseWindowsContext(hdc, r);\r
+}\r
+\r
+void MediaPlayerPrivate::getSupportedTypes(HashSet<String>& types)\r
+{\r
+    unsigned count = QTMovieWin::countSupportedTypes();\r
+    for (unsigned n = 0; n < count; n++) {\r
+        const UChar* character;\r
+        unsigned len;\r
+        QTMovieWin::getSupportedType(n, character, len);\r
+        if (len)\r
+            types.add(String(character, len));\r
+    }\r
+} \r
+\r
+void MediaPlayerPrivate::movieEnded(QTMovieWin* movie)\r
+{\r
+    ASSERT(m_qtMovie.get() == movie);\r
+    didEnd();\r
+}\r
+\r
+void MediaPlayerPrivate::movieLoadStateChanged(QTMovieWin* movie)\r
+{\r
+    ASSERT(m_qtMovie.get() == movie);\r
+    updateStates();\r
+}\r
+\r
+void MediaPlayerPrivate::movieTimeChanged(QTMovieWin* movie)\r
+{\r
+    ASSERT(m_qtMovie.get() == movie);\r
+    updateStates();\r
+    m_player->timeChanged();\r
+}\r
+\r
+void MediaPlayerPrivate::movieNewImageAvailable(QTMovieWin* movie)\r
+{\r
+    ASSERT(m_qtMovie.get() == movie);\r
+    m_player->repaint();\r
+}\r
+\r
+}\r
+\r
+#endif\r
+\r
diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h
new file mode 100644 (file)
index 0000000..a45e49d
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef MediaPlayerPrivateQTKit_h
+#define MediaPlayerPrivateQTKit_h
+
+#if ENABLE(VIDEO)
+
+#include "MediaPlayer.h"
+#include "Timer.h"
+#include <QTMovieWin.h>
+#include <wtf/OwnPtr.h>
+
+namespace WebCore {
+
+class GraphicsContext;
+class IntSize;
+class IntRect;
+class String;
+
+class MediaPlayerPrivate : QTMovieWinClient, Noncopyable {
+public:
+    MediaPlayerPrivate(MediaPlayer*);
+    ~MediaPlayerPrivate();
+    
+    IntSize naturalSize() const;
+    bool hasVideo() const;
+    
+    void load(const String& url);
+    void cancelLoad();
+    
+    void play();
+    void pause();    
+    
+    bool paused() const;
+    bool seeking() const;
+    
+    float duration() const;
+    float currentTime() const;
+    void seek(float time);
+    void setEndTime(float);
+    
+    void setRate(float);
+    void setVolume(float);
+    void setMuted(bool);
+    
+    int dataRate() const;
+    
+    MediaPlayer::NetworkState networkState() const { return m_networkState; }
+    MediaPlayer::ReadyState readyState() const { return m_readyState; }
+    
+    float maxTimeBuffered() const;
+    float maxTimeSeekable() const;
+    unsigned bytesLoaded() const;
+    bool totalBytesKnown() const;
+    unsigned totalBytes() const;
+    
+    void setVisible(bool);
+    void setRect(const IntRect&);
+    
+    void loadStateChanged();
+    void didEnd();
+    
+    void paint(GraphicsContext*, const IntRect&);
+    
+    static void getSupportedTypes(HashSet<String>& types);
+
+private:
+    void updateStates();
+    void doSeek();
+    void cancelSeek();
+    void seekTimerFired(Timer<MediaPlayerPrivate>*);
+    void endPointTimerFired(Timer<MediaPlayerPrivate>*);
+    float maxTimeLoaded() const;
+    void startEndPointTimerIfNeeded();
+
+    virtual void movieEnded(QTMovieWin*);
+    virtual void movieLoadStateChanged(QTMovieWin*);
+    virtual void movieTimeChanged(QTMovieWin*);
+    virtual void movieNewImageAvailable(QTMovieWin*);
+      
+    MediaPlayer* m_player;
+    OwnPtr<QTMovieWin> m_qtMovie;
+    float m_seekTo;
+    float m_endTime;
+    Timer<MediaPlayerPrivate> m_seekTimer;
+    Timer<MediaPlayerPrivate> m_endPointTimer;
+    MediaPlayer::NetworkState m_networkState;
+    MediaPlayer::ReadyState m_readyState;
+    bool m_startedPlaying;
+    bool m_isStreaming;
+};
+
+}
+
+#endif
+#endif
diff --git a/WebCore/platform/graphics/win/QTMovieWin.cpp b/WebCore/platform/graphics/win/QTMovieWin.cpp
new file mode 100644 (file)
index 0000000..268f987
--- /dev/null
@@ -0,0 +1,563 @@
+/*
+ * Copyright (C) 2007 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+#include "config.h"
+
+#include <windows.h>
+
+#include "QTMovieWin.h"
+
+#include <GXMath.h>
+#include <Movies.h>
+#include <QTML.h>
+#include "QTMovieWinTimer.h"
+
+#include <wtf/Assertions.h>
+#include <wtf/HashSet.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/Vector.h>
+
+using namespace std;
+
+// Resizing GWorlds is slow, give them a minimum size so size of small 
+// videos can be animated smoothly
+static const int cGWorldMinWidth = 640;
+static const int cGWorldMinHeight = 360;
+
+static const float cNonContinuousTimeChange = 0.2f;
+
+union UppParam {
+    long longValue;
+    void* ptr;
+};
+
+static void initializeQuickTime();
+
+static MovieDrawingCompleteUPP gMovieDrawingCompleteUPP = 0;
+static HashSet<QTMovieWinPrivate*>* gTaskList;
+static Vector<CFStringRef>* gSupportedTypes = 0;
+
+static void updateTaskTimer(int maxInterval = 1000)
+{
+    if (!gTaskList->size()) {
+        stopSharedTimer();
+        return;    
+    }
+    
+    long intervalInMS;
+    QTGetTimeUntilNextTask(&intervalInMS, 1000);
+    if (intervalInMS > maxInterval)
+        intervalInMS = maxInterval;
+    setSharedTimerFireDelay(static_cast<float>(intervalInMS) / 1000);
+}
+
+class QTMovieWinPrivate : Noncopyable {
+public:
+    QTMovieWinPrivate();
+    ~QTMovieWinPrivate();
+    void task();
+    void startTask();
+    void endTask();
+
+    void registerDrawingCallback();
+    void drawingComplete();
+    void createGWorld();
+    void deleteGWorld();
+
+    void setSize(int, int);
+
+    QTMovieWin* m_movieWin;
+    Movie m_movie;
+    bool m_tasking;
+    QTMovieWinClient* m_client;
+    long m_loadState;
+    bool m_ended;
+    bool m_seeking;
+    float m_lastMediaTime;
+    double m_lastLoadStateCheckTime;
+    int m_width;
+    int m_height;
+    GWorldPtr m_gWorld;
+    int m_gWorldWidth;
+    int m_gWorldHeight;
+    GWorldPtr m_savedGWorld;
+    long m_loadError;
+};
+
+QTMovieWinPrivate::QTMovieWinPrivate()
+    : m_movieWin(0)
+    , m_movie(0)
+    , m_tasking(false)
+    , m_client(0)
+    , m_loadState(0)
+    , m_ended(false)
+    , m_seeking(false)
+    , m_lastMediaTime(0)
+    , m_lastLoadStateCheckTime(0)
+    , m_width(0)
+    , m_height(0)
+    , m_gWorld(0)
+    , m_gWorldWidth(0)
+    , m_gWorldHeight(0)
+    , m_savedGWorld(0)
+    , m_loadError(0)
+{
+}
+
+QTMovieWinPrivate::~QTMovieWinPrivate()
+{
+    endTask();
+    if (m_gWorld)
+        deleteGWorld();
+    if (m_movie)
+        DisposeMovie(m_movie);
+}
+
+static void taskTimerFired()
+{
+    // The hash content might change during task()
+    Vector<QTMovieWinPrivate*> tasks;
+    copyToVector(*gTaskList, tasks);
+    size_t count = tasks.size();
+    for (unsigned n = 0; n < count; ++n)
+        tasks[n]->task();
+
+    updateTaskTimer();
+}
+
+void QTMovieWinPrivate::startTask() 
+{
+    if (m_tasking)
+        return;
+    if (!gTaskList)
+        gTaskList = new HashSet<QTMovieWinPrivate*>;
+    gTaskList->add(this);
+    m_tasking = true;
+    updateTaskTimer();
+}
+
+void QTMovieWinPrivate::endTask() 
+{
+    if (!m_tasking)
+        return;
+    gTaskList->remove(this);
+    m_tasking = false;
+    updateTaskTimer();
+}
+
+void QTMovieWinPrivate::task() 
+{
+    ASSERT(m_tasking);
+
+    if (!m_loadError)
+        MoviesTask(m_movie, 0);
+
+    // GetMovieLoadState documentation says that you should not call it more often than every quarter of a second.
+    if (systemTime() >= m_lastLoadStateCheckTime + 0.25 || m_loadError) { 
+        // If load fails QT's load state is kMovieLoadStateComplete.
+        // This is different from QTKit API and seems strange.
+        long loadState = m_loadError ? kMovieLoadStateError : GetMovieLoadState(m_movie);
+        if (loadState != m_loadState) {
+            m_loadState = loadState;
+            m_client->movieLoadStateChanged(m_movieWin);
+        }
+        m_lastLoadStateCheckTime = systemTime();
+    }
+
+    bool ended = !!IsMovieDone(m_movie);
+    if (ended != m_ended) {
+        m_ended = ended;
+        if (m_client && ended)
+            m_client->movieEnded(m_movieWin);
+    }
+
+    float time = m_movieWin->currentTime();
+    if (time < m_lastMediaTime || time >= m_lastMediaTime + cNonContinuousTimeChange || m_seeking) {
+        m_seeking = false;
+        if (m_client)
+            m_client->movieTimeChanged(m_movieWin);
+    }
+    m_lastMediaTime = time;
+
+    if (m_loadError)
+        endTask();
+}
+
+void QTMovieWinPrivate::registerDrawingCallback()
+{
+    UppParam param;
+    param.ptr = this;
+    SetMovieDrawingCompleteProc(m_movie, movieDrawingCallWhenChanged, gMovieDrawingCompleteUPP, param.longValue);
+}
+
+void QTMovieWinPrivate::drawingComplete()
+{
+    if (!m_gWorld)
+        return;
+    m_client->movieNewImageAvailable(m_movieWin);
+}
+
+void QTMovieWinPrivate::createGWorld()
+{
+    ASSERT(!m_gWorld);
+    if (!m_movie)
+        return;
+
+    m_gWorldWidth = max(cGWorldMinWidth, m_width);
+    m_gWorldHeight = max(cGWorldMinHeight, m_height);
+    Rect bounds; 
+    bounds.top = 0;
+    bounds.left = 0; 
+    bounds.right = m_gWorldWidth;
+    bounds.bottom = m_gWorldHeight;
+    OSErr err = QTNewGWorld(&m_gWorld, k32BGRAPixelFormat, &bounds, NULL, NULL, NULL); 
+    if (err) 
+        return;
+    GetMovieGWorld(m_movie, &m_savedGWorld, 0);
+    SetMovieGWorld(m_movie, m_gWorld, 0);
+    bounds.right = m_width;
+    bounds.bottom = m_height;
+    SetMovieBox(m_movie, &bounds);
+}
+
+void QTMovieWinPrivate::setSize(int width, int height)
+{
+    if (m_width == width && m_height == height)
+        return;
+    m_width = width;
+    m_height = height;
+    if (!m_movie)
+        return;
+    Rect bounds; 
+    bounds.top = 0;
+    bounds.left = 0; 
+    bounds.right = width;
+    bounds.bottom = height;
+    SetMovieBox(m_movie, &bounds);
+    if (m_gWorld && (m_width > m_gWorldWidth || m_height > m_gWorldHeight)) {
+        // need a bigger, better gWorld
+        deleteGWorld();
+        createGWorld();
+    }
+}
+
+void QTMovieWinPrivate::deleteGWorld()
+{
+    ASSERT(m_gWorld);
+    if (m_movie)
+        SetMovieGWorld(m_movie, m_savedGWorld, 0);
+    m_savedGWorld = 0;
+    DisposeGWorld(m_gWorld); 
+    m_gWorld = 0;
+}
+
+
+QTMovieWin::QTMovieWin(QTMovieWinClient* client)
+    : m_private(new QTMovieWinPrivate())
+{
+    m_private->m_movieWin = this;
+    m_private->m_client = client;
+    initializeQuickTime();
+}
+
+QTMovieWin::~QTMovieWin()
+{
+    delete m_private;
+}
+
+void QTMovieWin::play()
+{
+    StartMovie(m_private->m_movie);
+    m_private->startTask();
+}
+
+void QTMovieWin::pause()
+{
+    StopMovie(m_private->m_movie);
+    updateTaskTimer();
+}
+
+float QTMovieWin::rate() const
+{
+    return FixedToFloat(GetMovieRate(m_private->m_movie));
+}
+
+void QTMovieWin::setRate(float rate)
+{
+    SetMovieRate(m_private->m_movie, FloatToFixed(rate));
+    updateTaskTimer();
+}
+
+float QTMovieWin::duration() const
+{
+    TimeValue val = GetMovieDuration(m_private->m_movie);
+    TimeScale scale = GetMovieTimeScale(m_private->m_movie);
+    return static_cast<float>(val) / scale;
+}
+
+float QTMovieWin::currentTime() const
+{
+    TimeValue val = GetMovieTime(m_private->m_movie, 0);
+    TimeScale scale = GetMovieTimeScale(m_private->m_movie);
+    return static_cast<float>(val) / scale;
+}
+
+void QTMovieWin::setCurrentTime(float time) const
+{
+    m_private->m_seeking = true;
+    TimeScale scale = GetMovieTimeScale(m_private->m_movie);
+    SetMovieTimeValue(m_private->m_movie, TimeValue(time * scale));
+    updateTaskTimer();
+}
+
+void QTMovieWin::setVolume(float volume)
+{
+    SetMovieVolume(m_private->m_movie, static_cast<short>(volume * 256));
+}
+
+void QTMovieWin::setMuted(bool muted)
+{
+    // FIXME: Implement mute using setVolume in HTMLMediaElement, remove it everywhere else
+    if (muted)
+        SetMovieVolume(m_private->m_movie, 0);
+    else
+        SetMovieVolume(m_private->m_movie, 128);
+}
+
+unsigned QTMovieWin::dataSize() const
+{
+    // FIXME: How to get this?
+    return 1000;
+}
+
+float QTMovieWin::maxTimeLoaded() const
+{
+    TimeValue val;
+    GetMaxLoadedTimeInMovie(m_private->m_movie, &val);
+    TimeScale scale = GetMovieTimeScale(m_private->m_movie);
+    return static_cast<float>(val) / scale;
+}
+
+long QTMovieWin::loadState() const
+{
+    return m_private->m_loadState;
+}
+
+void QTMovieWin::getNaturalSize(int& width, int& height)
+{
+    Rect rect;
+    GetMovieNaturalBoundsRect(m_private->m_movie, &rect);
+    width = rect.right;
+    height = rect.bottom;
+}
+
+void QTMovieWin::setSize(int width, int height)
+{
+    m_private->setSize(width, height);
+    updateTaskTimer(0);
+}
+
+void QTMovieWin::setVisible(bool b)
+{
+    if (!m_private->m_height || !m_private->m_width)
+        b = false;
+
+    if (b && !m_private->m_gWorld)
+        m_private->createGWorld();
+    else if (!b && m_private->m_gWorld)
+        m_private->deleteGWorld();
+}
+
+void QTMovieWin::paint(HDC hdc, int x, int y)
+{
+    if (!m_private->m_gWorld)
+        return;
+
+    HDC hdcSrc = static_cast<HDC>(GetPortHDC(reinterpret_cast<GrafPtr>(m_private->m_gWorld))); 
+    if (!hdcSrc)
+        return;
+
+    // FIXME: If we could determine the movie has no alpha, we could use BitBlt for those cases, which might be faster.
+    BLENDFUNCTION blendFunction; 
+    blendFunction.BlendOp = AC_SRC_OVER;
+    blendFunction.BlendFlags = 0;
+    blendFunction.SourceConstantAlpha = 255;
+    blendFunction.AlphaFormat = AC_SRC_ALPHA;
+    AlphaBlend(hdc, x, y, m_private->m_width, m_private->m_height, hdcSrc, 
+         0, 0, m_private->m_width, m_private->m_height, blendFunction);
+}
+
+void QTMovieWin::load(const UChar* url, int len)
+{
+    if (m_private->m_movie) {
+        m_private->endTask();
+        setVisible(false);
+        DisposeMovie(m_private->m_movie);
+        m_private->m_movie = 0;
+    }  
+
+    // Define a property array for NewMovieFromProperties. 8 should be enough for our needs. 
+    QTNewMoviePropertyElement movieProps[8]; 
+    ItemCount moviePropCount = 0; 
+
+    bool boolTrue = true;
+
+    // Create a URL data reference of type CFURL 
+    CFStringRef urlStringRef = CFStringCreateWithCharacters (kCFAllocatorDefault, reinterpret_cast<const UniChar*>(url), len);
+    CFURLRef urlRef = CFURLCreateWithString(kCFAllocatorDefault, urlStringRef, 0); 
+
+    // Add the movie data location to the property array 
+    movieProps[moviePropCount].propClass = kQTPropertyClass_DataLocation; 
+    movieProps[moviePropCount].propID = kQTDataLocationPropertyID_CFURL; 
+    movieProps[moviePropCount].propValueSize = sizeof(urlRef); 
+    movieProps[moviePropCount].propValueAddress = &urlRef; 
+    movieProps[moviePropCount].propStatus = 0; 
+    moviePropCount++; 
+
+    movieProps[moviePropCount].propClass = kQTPropertyClass_MovieInstantiation; 
+    movieProps[moviePropCount].propID = kQTMovieInstantiationPropertyID_DontAskUnresolvedDataRefs; 
+    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
+    movieProps[moviePropCount].propValueAddress = &boolTrue; 
+    movieProps[moviePropCount].propStatus = 0; 
+    moviePropCount++; 
+
+    movieProps[moviePropCount].propClass = kQTPropertyClass_MovieInstantiation; 
+    movieProps[moviePropCount].propID = kQTMovieInstantiationPropertyID_AsyncOK; 
+    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
+    movieProps[moviePropCount].propValueAddress = &boolTrue; 
+    movieProps[moviePropCount].propStatus = 0; 
+    moviePropCount++; 
+
+    movieProps[moviePropCount].propClass = kQTPropertyClass_NewMovieProperty; 
+    movieProps[moviePropCount].propID = kQTNewMoviePropertyID_Active; 
+    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
+    movieProps[moviePropCount].propValueAddress = &boolTrue; 
+    movieProps[moviePropCount].propStatus = 0; 
+    moviePropCount++; 
+
+    movieProps[moviePropCount].propClass = kQTPropertyClass_NewMovieProperty; 
+    movieProps[moviePropCount].propID = kQTNewMoviePropertyID_DontInteractWithUser; 
+    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
+    movieProps[moviePropCount].propValueAddress = &boolTrue; 
+    movieProps[moviePropCount].propStatus = 0; 
+    moviePropCount++; 
+
+    m_private->m_loadError = NewMovieFromProperties(moviePropCount, movieProps, 0, NULL, &m_private->m_movie);
+    m_private->startTask();
+
+    // get the load fail callback quickly 
+    if (m_private->m_loadError)
+        updateTaskTimer(0);
+    else
+        m_private->registerDrawingCallback();
+
+    CFRelease(urlStringRef);
+    CFRelease(urlRef);
+}
+
+pascal OSErr movieDrawingCompleteProc(Movie movie, long data)
+{
+    UppParam param;
+    param.longValue = data;
+    QTMovieWinPrivate* mp = static_cast<QTMovieWinPrivate*>(param.ptr);
+    if (mp)
+        mp->drawingComplete();
+    return 0;
+}
+
+static void initializeSupportedTypes() 
+{
+    if (gSupportedTypes)
+        return;
+    // FIXME: This list might not be complete. 
+    // There must be some way to get it out from QuickTime.
+    gSupportedTypes = new Vector<CFStringRef>;
+    gSupportedTypes->append(CFSTR("video/3gpp"));
+    gSupportedTypes->append(CFSTR("video/3gpp2"));
+    gSupportedTypes->append(CFSTR("video/mp4"));
+    gSupportedTypes->append(CFSTR("video/mpeg"));
+    gSupportedTypes->append(CFSTR("video/quicktime"));
+    gSupportedTypes->append(CFSTR("audio/ac3"));
+    gSupportedTypes->append(CFSTR("audio/aiff"));
+    gSupportedTypes->append(CFSTR("audio/basic"));
+    gSupportedTypes->append(CFSTR("audio/mpeg"));
+}
+
+unsigned QTMovieWin::countSupportedTypes()
+{
+    initializeSupportedTypes();
+    return static_cast<unsigned>(gSupportedTypes->size());
+}
+
+void QTMovieWin::getSupportedType(unsigned index, const UChar*& str, unsigned& len)
+{
+    initializeSupportedTypes();
+    ASSERT(index < gSupportedTypes->size());
+
+    // Allocate sufficient buffer to hold any MIME type
+    static UniChar* staticBuffer = 0;
+    if (!staticBuffer)
+        staticBuffer = new UniChar[32];
+
+    CFStringRef cfstr = gSupportedTypes->at(index);
+    len = CFStringGetLength(cfstr);
+    CFRange range = { 0, len };
+    CFStringGetCharacters(cfstr, range, staticBuffer);
+    str = reinterpret_cast<const UChar*>(staticBuffer);
+    
+}
+
+bool QTMovieWin::initializeQuickTime() 
+{
+    static bool initialized = false;
+    static OSErr initializationError = 0;
+    if (initializationError)
+        return false;
+    if (!initialized) {
+        initializationError = InitializeQTML(0);
+        if (initializationError)
+            return false;
+        EnterMovies();
+        setSharedTimerFiredFunction(taskTimerFired);
+        gMovieDrawingCompleteUPP = NewMovieDrawingCompleteUPP(movieDrawingCompleteProc);
+
+        initialized = true;
+    }
+    return true;
+}
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+    switch (fdwReason) {
+        case DLL_PROCESS_ATTACH:
+            setSharedTimerInstanceHandle(hinstDLL);
+            return TRUE;
+        case DLL_PROCESS_DETACH:
+        case DLL_THREAD_ATTACH:
+        case DLL_THREAD_DETACH:
+            return FALSE;
+    }
+    ASSERT_NOT_REACHED();
+    return FALSE;
+}
diff --git a/WebCore/platform/graphics/win/QTMovieWin.h b/WebCore/platform/graphics/win/QTMovieWin.h
new file mode 100644 (file)
index 0000000..3baec36
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2007 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef QTMovieWin_h
+#define QTMovieWin_h
+
+#include <Unicode.h>
+
+#ifdef QTMOVIEWIN_EXPORTS
+#define QTMOVIEWIN_API __declspec(dllexport)
+#else
+#define QTMOVIEWIN_API __declspec(dllimport)
+#endif
+
+class QTMovieWin;
+class QTMovieWinPrivate;
+
+class QTMovieWinClient {
+public:
+    virtual void movieEnded(QTMovieWin*) = 0;
+    virtual void movieLoadStateChanged(QTMovieWin*) = 0;
+    virtual void movieTimeChanged(QTMovieWin*) = 0;
+    virtual void movieNewImageAvailable(QTMovieWin*) = 0;
+};
+
+enum {
+    QTMovieLoadStateLoaded  = 2000L,
+    QTMovieLoadStatePlayable = 10000L,
+    QTMovieLoadStatePlaythroughOK = 20000L,
+    QTMovieLoadStateComplete = 100000L
+};
+
+class QTMOVIEWIN_API QTMovieWin {
+public:
+    static bool initializeQuickTime();
+
+    QTMovieWin(QTMovieWinClient*);
+    ~QTMovieWin();
+
+    void load(const UChar* url, int len);
+    long loadState() const;
+    float maxTimeLoaded() const;
+
+    void play();
+    void pause();
+
+    float rate() const;
+    void setRate(float);
+
+    float duration() const;
+    float currentTime() const;
+    void setCurrentTime(float) const;
+
+    void setVolume(float);
+    void setMuted(bool);
+
+    unsigned dataSize() const;
+
+    void getNaturalSize(int& width, int& height);
+    void setSize(int width, int height);
+
+    void setVisible(bool);
+    void paint(HDC, int x, int y);
+
+    static unsigned countSupportedTypes();
+    static void getSupportedType(unsigned index, const UChar*& str, unsigned& len);
+
+private:
+    QTMovieWinPrivate* m_private;
+    friend class QTMovieWinPrivate;
+};
+
+#endif
diff --git a/WebCore/platform/graphics/win/QTMovieWinTimer.cpp b/WebCore/platform/graphics/win/QTMovieWinTimer.cpp
new file mode 100644 (file)
index 0000000..d0aa3e6
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2006, 2007 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+#include "config.h"
+
+#include <windows.h>
+
+#include "QTMovieWinTimer.h"
+
+#include <wtf/Assertions.h>
+
+// This file is used by the QuickTime access DLL. It copies some WebCore code 
+// which can't be used directly due to dependency issues.
+
+// FIXME: Find a way to do timers that can manage <10ms resolution properly too.
+
+static UINT_PTR timerID;
+static void (*sharedTimerFiredFunction)();
+
+static HINSTANCE instanceHandle = 0;
+
+static HWND timerWindowHandle = 0;
+static UINT timerFiredMessage = 0;
+static const LPCWSTR kTimerWindowClassName = L"TimerWindowClass";
+static bool processingCustomTimerMessage = false;
+
+static LRESULT CALLBACK TimerWindowWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    if (message == timerFiredMessage) {
+        processingCustomTimerMessage = true;
+        sharedTimerFiredFunction();
+        processingCustomTimerMessage = false;
+    } else
+        return DefWindowProc(hWnd, message, wParam, lParam);
+    return 0;
+}
+
+static void initializeOffScreenTimerWindow()
+{
+    if (timerWindowHandle)
+        return;
+    
+    WNDCLASSEX wcex;
+    memset(&wcex, 0, sizeof(WNDCLASSEX));
+    wcex.cbSize = sizeof(WNDCLASSEX);
+    wcex.lpfnWndProc    = TimerWindowWndProc;
+    wcex.hInstance      = instanceHandle;
+    wcex.lpszClassName  = kTimerWindowClassName;
+    RegisterClassEx(&wcex);
+
+    timerWindowHandle = CreateWindow(kTimerWindowClassName, 0, 0,
+       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, instanceHandle, 0);
+    timerFiredMessage = RegisterWindowMessage(L"com.apple.WebKit.TimerFired");
+}
+
+void setSharedTimerFiredFunction(void (*f)())
+{
+    sharedTimerFiredFunction = f;
+}
+
+static void CALLBACK timerFired(HWND, UINT, UINT_PTR, DWORD)
+{
+    sharedTimerFiredFunction();
+}
+
+void setSharedTimerFireDelay(double interval)
+{
+    ASSERT(sharedTimerFiredFunction);
+
+    unsigned intervalInMS;
+    if (interval < 0)
+        intervalInMS = 0;
+    else {
+        interval *= 1000;
+        if (interval > USER_TIMER_MAXIMUM)
+            intervalInMS = USER_TIMER_MAXIMUM;
+        else
+            intervalInMS = (unsigned)interval;
+    }
+
+    if (timerID) {
+        KillTimer(0, timerID);
+        timerID = 0;
+    }
+
+    // We don't allow nested PostMessages, since the custom messages will effectively starve
+    // painting and user input. (Win32 has a tri-level queue with application messages > 
+    // user input > WM_PAINT/WM_TIMER.)
+    // In addition, if the queue contains input events that have been there since the last call to
+    // GetQueueStatus, PeekMessage or GetMessage we favor timers.
+    if (intervalInMS < USER_TIMER_MINIMUM && processingCustomTimerMessage &&
+        !LOWORD(::GetQueueStatus(QS_ALLINPUT))) {
+        // Windows SetTimer does not allow timeouts smaller than 10ms (USER_TIMER_MINIMUM)
+        initializeOffScreenTimerWindow();
+        PostMessage(timerWindowHandle, timerFiredMessage, 0, 0);
+    } else
+        timerID = SetTimer(0, 0, intervalInMS, timerFired);
+}
+
+void stopSharedTimer()
+{
+    if (timerID) {
+        KillTimer(0, timerID);
+        timerID = 0;
+    }
+}
+
+void setSharedTimerInstanceHandle(HINSTANCE handle)
+{
+    instanceHandle = handle;
+}
+
+double systemTime()
+{
+    FILETIME ft;
+    GetSystemTimeAsFileTime(&ft);
+    ULARGE_INTEGER t;
+    memcpy(&t, &ft, sizeof(t));
+    return t.QuadPart * 0.0000001 - 11644473600.0;
+}
diff --git a/WebCore/platform/graphics/win/QTMovieWinTimer.h b/WebCore/platform/graphics/win/QTMovieWinTimer.h
new file mode 100644 (file)
index 0000000..3e3c2bc
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2006, 2007 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef QTMovieViewTimer_h
+#define QTMovieViewTimer_h
+
+// This header should not be included from WebCore.
+// It is used by the QuickTime access DLL. It copies some WebCore code 
+// which can't be used directly due to dependency issues.
+
+void setSharedTimerFiredFunction(void (*)());
+void setSharedTimerFireDelay(double delay);
+void stopSharedTimer();
+void setSharedTimerInstanceHandle(HINSTANCE handle);
+double systemTime();
+
+#endif
index 131e4e9..359a708 100644 (file)
@@ -150,10 +150,9 @@ void MediaControlPlayButtonElement::defaultEventHandler(Event* event)
 
 void MediaControlPlayButtonElement::update()
 {
-    // FIXME: these are here just for temporary look
-    static const UChar blackRightPointingTriangle = 0x25b6;
-    const UChar twoBlackVerticalRectangles[] = { 0x25AE, 0x25AE };
-    setValue(inPausedState() ? String(&blackRightPointingTriangle, 1) : String(&twoBlackVerticalRectangles[0], 2));
+    // FIXME: These are here just for temporary look,
+    // switch to using bitmaps
+    setValue(inPausedState() ? ">" : "||");
     renderer()->updateFromElement();
 }
 
index d380ad9..0e12524 100644 (file)
@@ -1,3 +1,12 @@
+2007-12-21  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Steve.
+        
+        Build media support on Windows.
+
+        * WebKit.vcproj/WebKit.sln:
+        * WebKit.vcproj/WebKit.vcproj:
+
 2007-12-21  Ada Chan  <adachan@apple.com>
 
         Implemented DOMDocument::getElementById().
index 0af2efc..d293f95 100644 (file)
@@ -23,8 +23,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interfaces", "Interfaces.vc
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\..\WebCore\WebCore.vcproj\WebCore.vcproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}"\r
        ProjectSection(ProjectDependencies) = postProject\r
-               {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
                {0A324352-B3B6-496C-9E5B-4C7E923E628B} = {0A324352-B3B6-496C-9E5B-4C7E923E628B}\r
+               {E498CA9D-3BD2-4D52-8E37-C8DC76526325} = {E498CA9D-3BD2-4D52-8E37-C8DC76526325}\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DumpRenderTree", "..\..\..\WebKitTools\DumpRenderTree\win\DumpRenderTree.vcproj", "{6567DFD4-D6DE-4CD5-825D-17E353D160E1}"\r
@@ -82,76 +83,121 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCoreGenerated", "..\..\.
                {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
        EndProjectSection\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QTMovieWin", "..\..\..\WebCore\WebCore.vcproj\QTMovieWin.vcproj", "{E498CA9D-3BD2-4D52-8E37-C8DC76526325}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
+               {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}\r
+       EndProjectSection\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug_Internal|Win32 = Debug_Internal|Win32\r
                Debug|Win32 = Debug|Win32\r
                Release|Win32 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32\r
+               {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32\r
                {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.Build.0 = Debug|Win32\r
                {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.ActiveCfg = Release|Win32\r
                {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.Build.0 = Release|Win32\r
+               {B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.ActiveCfg = Debug|Win32\r
+               {B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.Build.0 = Debug|Win32\r
                {B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.Build.0 = Debug|Win32\r
                {B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.ActiveCfg = Release|Win32\r
                {B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.Build.0 = Release|Win32\r
+               {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.ActiveCfg = Debug|Win32\r
+               {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.Build.0 = Debug|Win32\r
                {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.Build.0 = Debug|Win32\r
                {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.ActiveCfg = Release|Win32\r
                {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.Build.0 = Release|Win32\r
+               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32\r
+               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32\r
                {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.Build.0 = Debug|Win32\r
                {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.ActiveCfg = Release|Win32\r
                {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.Build.0 = Release|Win32\r
+               {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32\r
+               {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32\r
                {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.Build.0 = Debug|Win32\r
                {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32\r
                {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32\r
+               {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.ActiveCfg = Debug|Win32\r
+               {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.Build.0 = Debug|Win32\r
                {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.Build.0 = Debug|Win32\r
                {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32\r
                {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.ActiveCfg = Debug|Win32\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.Build.0 = Debug|Win32\r
                {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.Build.0 = Debug|Win32\r
                {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32\r
                {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32\r
+               {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32\r
+               {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32\r
                {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.Build.0 = Debug|Win32\r
                {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32\r
                {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32\r
+               {BC2981C0-67A5-4A3C-879B-784BCBDE2541}.Debug_Internal|Win32.ActiveCfg = Debug|Win32\r
+               {BC2981C0-67A5-4A3C-879B-784BCBDE2541}.Debug_Internal|Win32.Build.0 = Debug|Win32\r
                {BC2981C0-67A5-4A3C-879B-784BCBDE2541}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {BC2981C0-67A5-4A3C-879B-784BCBDE2541}.Debug|Win32.Build.0 = Debug|Win32\r
                {BC2981C0-67A5-4A3C-879B-784BCBDE2541}.Release|Win32.ActiveCfg = Debug|Win32\r
                {BC2981C0-67A5-4A3C-879B-784BCBDE2541}.Release|Win32.Build.0 = Debug|Win32\r
+               {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.ActiveCfg = Debug|Win32\r
+               {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.Build.0 = Debug|Win32\r
                {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.Build.0 = Debug|Win32\r
                {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.ActiveCfg = Release|Win32\r
                {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.Build.0 = Release|Win32\r
+               {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = Debug|Win32\r
+               {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = Debug|Win32\r
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Debug|Win32\r
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = Release|Win32\r
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = Release|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug|Win32\r
                {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32\r
                {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32\r
                {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32\r
+               {91671475-2114-4D8F-A051-9A1B270F6467}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32\r
+               {91671475-2114-4D8F-A051-9A1B270F6467}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32\r
                {91671475-2114-4D8F-A051-9A1B270F6467}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {91671475-2114-4D8F-A051-9A1B270F6467}.Debug|Win32.Build.0 = Debug|Win32\r
                {91671475-2114-4D8F-A051-9A1B270F6467}.Release|Win32.ActiveCfg = Release|Win32\r
                {91671475-2114-4D8F-A051-9A1B270F6467}.Release|Win32.Build.0 = Release|Win32\r
+               {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.ActiveCfg = Release|Win32\r
+               {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.Build.0 = Release|Win32\r
                {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = Release|Win32\r
                {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = Release|Win32\r
                {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = Release|Win32\r
                {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = Release|Win32\r
+               {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Internal|Win32.ActiveCfg = Release|Win32\r
+               {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Internal|Win32.Build.0 = Release|Win32\r
                {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug|Win32.ActiveCfg = Release|Win32\r
                {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug|Win32.Build.0 = Release|Win32\r
                {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release|Win32.ActiveCfg = Release|Win32\r
                {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release|Win32.Build.0 = Release|Win32\r
+               {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.ActiveCfg = Release|Win32\r
+               {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.Build.0 = Release|Win32\r
                {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.ActiveCfg = Release|Win32\r
                {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.Build.0 = Release|Win32\r
                {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.ActiveCfg = Release|Win32\r
                {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.Build.0 = Release|Win32\r
+               {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32\r
+               {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32\r
+               {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.Build.0 = Debug|Win32\r
+               {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.ActiveCfg = Release|Win32\r
+               {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.Build.0 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index 47096f1..3b27247 100644 (file)
                        <Tool\r
                                Name="VCLinkerTool"\r
                                LinkLibraryDependencies="false"\r
-                               AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib"\r
+                               AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib"\r
                                OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"\r
                                LinkIncremental="2"\r
                                AdditionalLibraryDirectories="&quot;$(WebKitOutputDir)\lib&quot;;&quot;$(WebKitLibrariesDir)\lib&quot;"\r
                                ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"\r
-                               DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll"\r
+                               DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                ImportLibrary="$(WebKitOutputDir)\lib\$(TargetName).lib"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                LinkLibraryDependencies="false"\r
-                               AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib"\r
+                               AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib"\r
                                OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"\r
                                LinkIncremental="1"\r
                                AdditionalLibraryDirectories="&quot;$(WebKitOutputDir)\lib&quot;;&quot;$(WebKitLibrariesDir)\lib&quot;"\r
                                ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"\r
-                               DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll"\r
+                               DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                OptimizeReferences="2"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                LinkLibraryDependencies="false"\r
-                               AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib"\r
+                               AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WTF$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib"\r
                                OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"\r
                                LinkIncremental="2"\r
                                AdditionalLibraryDirectories="&quot;$(WebKitOutputDir)\lib&quot;;&quot;$(WebKitLibrariesDir)\lib&quot;"\r
                                ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"\r
-                               DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll"\r
+                               DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                ImportLibrary="$(WebKitOutputDir)\lib\$(TargetName).lib"\r
index 30eb0bd..66103bb 100644 (file)
@@ -1,3 +1,13 @@
+2007-12-13  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Darin and Steve.
+        
+        - check for QuickTime SDK on Windows.
+        - build media support on Windows by default
+
+        * Scripts/build-webkit:
+        * Scripts/webkitdirs.pm:
+
 2007-12-21  Kevin Ollivier  <kevino@theolliviers.com>
 
         Build script fix for buildbot.
index abc4bf3..13dd49c 100755 (executable)
@@ -49,7 +49,7 @@ my $svgAsImageSupport = 1;
 my $xpathSupport = 1;
 my $xsltSupport = 1;
 my $coverageSupport = 0;
-my $videoSupport = isOSX(); # Enable by default on OSX
+my $videoSupport = isOSX() || isCygwin(); # Enable by default on OSX and Windows
 my $showHelp = 0;
 my $clean = 0;
 
index 6167be2..fd2ceb1 100644 (file)
@@ -644,6 +644,16 @@ sub setupCygwinEnv()
         }
     }
 
+    my $qtSDKPath = "$programFilesPath/QuickTime SDK";
+    if (! -e $qtSDKPath) {
+        print "*************************************************************\n";
+        print "Cannot find '$qtSDKPath'\n";
+        print "Pleased download QuickTime SDK for Windows from\n";
+        print "http://developer.apple.com/quicktime/download/\n";
+        print "*************************************************************\n";
+        die;
+    }
+    
     chomp($ENV{'WEBKITLIBRARIESDIR'} = `cygpath -wa "$sourceDir/WebKitLibraries/win"`) unless $ENV{'WEBKITLIBRARIESDIR'};
 
     $windowsTmpPath = `cygpath -w /tmp`;