<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170562] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170562">170562</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-06-27 17:19:41 -0700 (Fri, 27 Jun 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
https://bugs.webkit.org/show_bug.cgi?id=134418
Reviewed by Eric Carlson.
../WebCore:
Land an initial implementation of AVFOUNDATION_LOADER_DELEGATE for
Windows.
* DerivedSources.cpp: Add new IDL files
* DerivedSources.make: Add check for AVFOUNDATION_LOADER_DELEGATE.
* Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Added (ported from
Objective C.)
* WebCore.vcxproj/WebCore.vcxproj: Update for new files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.vcxproj/WebCoreCommon.props: Add new search paths.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj: Update for new files.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
Moved from MediaPlayerPrivateAVFoundationObjC.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
Update for new API calls.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: Added.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Updated for new AVFOUNDATION_LOADER_DELEGATE methods.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Added.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
Remove method that was moved to base class.
../WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add new
export.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcescpp">trunk/Source/WebCore/DerivedSources.cpp</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaCDMPrivateMediaPlayercpp">trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCoreCommonprops">trunk/Source/WebCore/WebCore.vcxproj/WebCoreCommon.props</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCoreTestSupportvcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCoreTestSupportvcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationcpp">trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationh">trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfAVFoundationCFSoftLinkingh">trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFcpp">trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFh">trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin">trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfCDMSessionAVFoundationCFcpp">trunk/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfCDMSessionAVFoundationCFh">trunk/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfWebCoreAVCFResourceLoadercpp">trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfWebCoreAVCFResourceLoaderh">trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/ChangeLog        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-06-27 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
+ https://bugs.webkit.org/show_bug.cgi?id=134418
+
+ Reviewed by Eric Carlson.
+
+ Land an initial implementation of AVFOUNDATION_LOADER_DELEGATE for
+ Windows.
+
+ * DerivedSources.cpp: Add new IDL files
+ * DerivedSources.make: Add check for AVFOUNDATION_LOADER_DELEGATE.
+ * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Added (ported from
+ Objective C.)
+ * WebCore.vcxproj/WebCore.vcxproj: Update for new files.
+ * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
+ * WebCore.vcxproj/WebCoreCommon.props: Add new search paths.
+ * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Update for new files.
+ * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+ (WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
+ Moved from MediaPlayerPrivateAVFoundationObjC.
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
+ * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
+ Update for new API calls.
+ * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: Added.
+ * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added.
+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+ Updated for new AVFOUNDATION_LOADER_DELEGATE methods.
+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
+ * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Added.
+ * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: Added.
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ Remove method that was moved to base class.
+
</ins><span class="cx"> 2014-06-27 Benjamin Poulain <benjamin@webkit.org>
</span><span class="cx">
</span><span class="cx"> Remove BufferForAppendingHyphen
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/DerivedSources.cpp        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -250,6 +250,13 @@
</span><span class="cx"> #endif
</span><span class="cx"> #include "JSMediaError.cpp"
</span><span class="cx"> #include "JSMediaList.cpp"
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+#include "JSMediaKeyError.cpp"
+#include "JSMediaKeyMessageEvent.cpp"
+#include "JSMediaKeyNeededEvent.cpp"
+#include "JSMediaKeySession.cpp"
+#include "JSMediaKeys.cpp"
+#endif
</ins><span class="cx"> #include "JSMediaQueryList.cpp"
</span><span class="cx"> #include "JSMediaQueryListListener.cpp"
</span><span class="cx"> #include "JSMessageChannel.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/DerivedSources.make        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -1309,5 +1309,6 @@
</span><span class="cx">         echo "/* Identifying AVFoundation Support */" > $@
</span><span class="cx">         if [ -f "$(WEBKIT_LIBRARIES)/include/AVFoundationCF/AVCFBase.h" ]||[ -f "$(WEBKITLIBRARIESDIR)/include/AVFoundationCF/AVCFBase.h" ]; then echo "#define HAVE_AVCF 1" >> $@; else echo >> $@; fi
</span><span class="cx">         if [ -f "$(WEBKIT_LIBRARIES)/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h" ]||[ -f "$(WEBKITLIBRARIESDIR)/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h" ]; then echo "#define HAVE_AVCF_LEGIBLE_OUTPUT 1" >> $@; else echo >> $@; fi
</span><ins>+        if [ -f "$(WEBKIT_LIBRARIES)/include/AVFoundationCF/AVCFAssetResourceLoader.h" ]||[ -f "$(WEBKITLIBRARIESDIR)/include/AVFoundationCF/AVCFAssetResourceLoader.h" ]; then echo "#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1" >> $@; else echo >> $@; fi
</ins><span class="cx">
</span><span class="cx"> endif # Windows_NT
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaCDMPrivateMediaPlayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -23,17 +23,17 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#import "config.h"
-#import "CDMPrivateMediaPlayer.h"
</del><ins>+#include "config.h"
+#include "CDMPrivateMediaPlayer.h"
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx">
</span><del>-#import "CDM.h"
-#import "CDMSession.h"
-#import "ContentType.h"
-#import "ExceptionCode.h"
-#import "MediaPlayer.h"
-#import "SoftLinking.h"
</del><ins>+#include "CDM.h"
+#include "CDMSession.h"
+#include "ContentType.h"
+#include "ExceptionCode.h"
+#include "MediaPlayer.h"
+#include "SoftLinking.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -3272,6 +3272,76 @@
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeyError.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeyMessageEvent.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeyNeededEvent.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeys.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeySession.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaList.cpp">
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</span><span class="lines">@@ -6609,6 +6679,12 @@
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\Modules\encryptedmedia\CDM.cpp" />
+ <ClCompile Include="..\Modules\encryptedmedia\CDMPrivateMediaPlayer.cpp" />
+ <ClCompile Include="..\Modules\encryptedmedia\MediaKeyMessageEvent.cpp" />
+ <ClCompile Include="..\Modules\encryptedmedia\MediaKeyNeededEvent.cpp" />
+ <ClCompile Include="..\Modules\encryptedmedia\MediaKeys.cpp" />
+ <ClCompile Include="..\Modules\encryptedmedia\MediaKeySession.cpp" />
</ins><span class="cx"> <ClCompile Include="..\Modules\gamepad\Gamepad.cpp" />
</span><span class="cx"> <ClCompile Include="..\Modules\gamepad\GamepadButton.cpp" />
</span><span class="cx"> <ClCompile Include="..\Modules\gamepad\GamepadEvent.cpp" />
</span><span class="lines">@@ -7256,6 +7332,8 @@
</span><span class="cx"> <ClCompile Include="..\platform\FileChooser.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\FileStream.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\FileSystem.cpp" />
</span><ins>+ <ClCompile Include="..\platform\graphics\avfoundation\cf\CDMSessionAVFoundationCF.cpp" />
+ <ClCompile Include="..\platform\graphics\avfoundation\cf\WebCoreAVCFResourceLoader.cpp" />
</ins><span class="cx"> <ClCompile Include="..\platform\graphics\ISOVTTCue.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\audio\AudioSession.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\audio\MediaSession.cpp" />
</span><span class="lines">@@ -18362,6 +18440,11 @@
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSLocation.h" />
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaControlsHost.h" />
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaError.h" />
</span><ins>+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeyError.h" />
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaMessageEvent.h" />
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaNeededEvent.h" />
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeys.h" />
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeySession.h" />
</ins><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaList.h" />
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaQueryList.h" />
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaQueryListListener.h" />
</span><span class="lines">@@ -18830,6 +18913,13 @@
</span><span class="cx"> <ClInclude Include="..\html\track\VTTRegion.h" />
</span><span class="cx"> <ClInclude Include="..\html\track\VTTRegionList.h" />
</span><span class="cx"> <ClInclude Include="..\html\track\WebVTTElement.h" />
</span><ins>+ <ClInclude Include="..\Modules\encryptedmedia\CDM.h" />
+ <ClInclude Include="..\Modules\encryptedmedia\CDMPrivate.h" />
+ <ClInclude Include="..\Modules\encryptedmedia\CDMPrivateMediaPlayer.h" />
+ <ClInclude Include="..\Modules\encryptedmedia\MediaKeyMessageEvent.h" />
+ <ClInclude Include="..\Modules\encryptedmedia\MediaKeyNeededEvent.h" />
+ <ClInclude Include="..\Modules\encryptedmedia\MediaKeys.h" />
+ <ClInclude Include="..\Modules\encryptedmedia\MediaKeySession.h" />
</ins><span class="cx"> <ClInclude Include="..\Modules\gamepad\Gamepad.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\gamepad\GamepadButton.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\gamepad\GamepadEvent.h" />
</span><span class="lines">@@ -19198,8 +19288,10 @@
</span><span class="cx"> <ClInclude Include="..\platform\audio\MediaSessionManager.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\ANGLEWebKitBridge.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\AudioTrackPrivate.h" />
</span><ins>+ <ClInclude Include="..\platform\graphics\avfoundation\cf\CDMSessionAVFoundationCF.h" />
</ins><span class="cx"> <ClInclude Include="..\platform\graphics\avfoundation\cf\InbandTextTrackPrivateAVCF.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\avfoundation\cf\InbandTextTrackPrivateLegacyAVCF.h" />
</span><ins>+ <ClInclude Include="..\platform\graphics\avfoundation\cf\WebCoreAVCFResourceLoader.h" />
</ins><span class="cx"> <ClInclude Include="..\platform\graphics\avfoundation\InbandTextTrackPrivateAVF.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\cairo\TileCairo.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\ca\LayerPool.h" />
</span><span class="lines">@@ -21230,4 +21322,4 @@
</span><span class="cx"> <ImportGroup Label="ExtensionTargets">
</span><span class="cx"> <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</span><span class="cx"> </ImportGroup>
</span><del>-</Project>
</del><ins>+</Project>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -340,6 +340,9 @@
</span><span class="cx"> <Filter Include="platform\soup">
</span><span class="cx"> <UniqueIdentifier>{b353479a-a6bf-41ad-b655-876165789b99}</UniqueIdentifier>
</span><span class="cx"> </Filter>
</span><ins>+ <Filter Include="Modules\encryptedmedia">
+ <UniqueIdentifier>{f9aa953b-e2a1-4d9e-a049-c34b10c81b4e}</UniqueIdentifier>
+ </Filter>
</ins><span class="cx"> </ItemGroup>
</span><span class="cx"> <ItemGroup>
</span><span class="cx"> <ClCompile Include="..\DerivedSources.cpp">
</span><span class="lines">@@ -7104,6 +7107,53 @@
</span><span class="cx"> <ClCompile Include="..\platform\graphics\ca\TileCoverageMap.cpp">
</span><span class="cx"> <Filter>platform\graphics\ca</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSGamepad.cpp" />
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSGamepadButton.cpp" />
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSGamepadEvent.cpp" />
+ <ClCompile Include="..\Modules\gamepad\Gamepad.cpp" />
+ <ClCompile Include="..\Modules\gamepad\GamepadButton.cpp" />
+ <ClCompile Include="..\Modules\gamepad\GamepadEvent.cpp" />
+ <ClCompile Include="..\Modules\gamepad\NavigatorGamepad.cpp" />
+ <ClCompile Include="..\platform\graphics\ISOVTTCue.cpp" />
+ <ClCompile Include="..\Modules\encryptedmedia\CDM.cpp">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Modules\encryptedmedia\CDMPrivateMediaPlayer.cpp">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Modules\encryptedmedia\MediaKeyMessageEvent.cpp">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Modules\encryptedmedia\MediaKeyNeededEvent.cpp">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Modules\encryptedmedia\MediaKeys.cpp">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Modules\encryptedmedia\MediaKeySession.cpp">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeyMessageEvent.cpp">
+ <Filter>DerivedSources</Filter>
+ </ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeyNeededEvent.cpp">
+ <Filter>DerivedSources</Filter>
+ </ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeys.cpp">
+ <Filter>DerivedSources</Filter>
+ </ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeySession.cpp">
+ <Filter>DerivedSources</Filter>
+ </ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeyError.cpp">
+ <Filter>DerivedSources</Filter>
+ </ClCompile>
+ <ClCompile Include="..\platform\graphics\avfoundation\cf\CDMSessionAVFoundationCF.cpp">
+ <Filter>platform\graphics\avfoundation\cf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\platform\graphics\avfoundation\cf\WebCoreAVCFResourceLoader.cpp">
+ <Filter>platform\graphics\avfoundation\cf</Filter>
+ </ClCompile>
</ins><span class="cx"> </ItemGroup>
</span><span class="cx"> <ItemGroup>
</span><span class="cx"> <ClInclude Include="..\Modules\geolocation\Coordinates.h">
</span><span class="lines">@@ -14964,6 +15014,56 @@
</span><span class="cx"> <ClInclude Include="..\platform\graphics\ca\TileCoverageMap.h">
</span><span class="cx"> <Filter>platform\graphics\ca</Filter>
</span><span class="cx"> </ClInclude>
</span><ins>+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSGamepad.h" />
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSGamepadButton.h" />
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSGamepadEvent.h" />
+ <ClInclude Include="..\Modules\gamepad\Gamepad.h" />
+ <ClInclude Include="..\Modules\gamepad\GamepadButton.h" />
+ <ClInclude Include="..\Modules\gamepad\GamepadEvent.h" />
+ <ClInclude Include="..\Modules\gamepad\NavigatorGamepad.h" />
+ <ClInclude Include="..\platform\graphics\ISOVTTCue.h" />
+ <ClInclude Include="..\Modules\encryptedmedia\CDM.h">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Modules\encryptedmedia\CDMPrivate.h">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Modules\encryptedmedia\CDMPrivateMediaPlayer.h">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Modules\encryptedmedia\MediaKeyMessageEvent.h">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Modules\encryptedmedia\MediaKeyNeededEvent.h">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Modules\encryptedmedia\MediaKeys.h">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Modules\encryptedmedia\MediaKeySession.h">
+ <Filter>Modules\encryptedmedia</Filter>
+ </ClInclude>
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaNeededEvent.h">
+ <Filter>DerivedSources</Filter>
+ </ClInclude>
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeys.h">
+ <Filter>DerivedSources</Filter>
+ </ClInclude>
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeySession.h">
+ <Filter>DerivedSources</Filter>
+ </ClInclude>
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaMessageEvent.h">
+ <Filter>DerivedSources</Filter>
+ </ClInclude>
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaKeyError.h">
+ <Filter>DerivedSources</Filter>
+ </ClInclude>
+ <ClInclude Include="..\platform\graphics\avfoundation\cf\CDMSessionAVFoundationCF.h">
+ <Filter>platform\graphics\avfoundation\cf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\platform\graphics\avfoundation\cf\WebCoreAVCFResourceLoader.h">
+ <Filter>platform\graphics\avfoundation\cf</Filter>
+ </ClInclude>
</ins><span class="cx"> </ItemGroup>
</span><span class="cx"> <ItemGroup>
</span><span class="cx"> <None Include="..\css\CSSGrammar.y.in">
</span><span class="lines">@@ -15172,4 +15272,4 @@
</span><span class="cx"> <Filter>platform\win</Filter>
</span><span class="cx"> </MASM>
</span><span class="cx"> </ItemGroup>
</span><del>-</Project>
</del><ins>+</Project>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCoreCommonprops"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCoreCommon.props (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCoreCommon.props        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCoreCommon.props        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -7,11 +7,11 @@
</span><span class="cx"> </PropertyGroup>
</span><span class="cx"> <ItemDefinitionGroup>
</span><span class="cx"> <ClCompile>
</span><del>- <AdditionalIncludeDirectories>$(ProjectDir)..;$(ProjectDir)..\Modules\mediacontrols;$(ProjectDir)..\Modules\mediastream;$(ProjectDir)..\Modules\filesystem;$(ProjectDir)..\Modules\gamepad;$(ProjectDir)..\Modules\geolocation;$(ProjectDir)..\Modules\indexeddb;$(ProjectDir)..\Modules\mediasource;$(ProjectDir)..\Modules\navigatorcontentutils;$(ProjectDir)..\Modules\plugins;$(ProjectDir)..\Modules\speech;$(ProjectDir)..\Modules\proximity;$(ProjectDir)..\Modules\quota;$(ProjectDir)..\Modules\notifications;$(ProjectDir)..\Modules\webdatabase;$(ProjectDir)..\Modules\websockets;$(ProjectDir)..\accessibility;$(ProjectDir)..\accessibility\win;$(ProjectDir)..\bridge;$(ProjectDir)..\bridge\c;$(ProjectDir)..\bridge\jsc;$(ProjectDir)..\css;$(ProjectDir)..\cssjit;$(ProjectDir)..\editing;$(ProjectDir)..\fileapi;$(ProjectDir)..\rendering;$(ProjectDir)..\rendering\line;$(ProjectDir)..\rendering\mathml;$(ProjectDir)..\rendering\shapes;$(ProjectDir)..\rendering\style;$(ProjectDir)..\rendering\svg;$(ProjectDir)..\bindings;$(ProjectDir)..\bindings\generic;$(ProjectDir)..\bindings\js;$(ProjectDir)..\bindings\js\specialization;$(ProjectDir)..\dom;$(ProjectDir)..\dom\default;$(ProjectDir)..\history;$(ProjectDir)..\html;$(ProjectDir)..\html\canvas;$(ProjectDir)..\html\forms;$(ProjectDir)..\html\parser;$(ProjectDir)..\html\shadow;$(ProjectDir)..\html\track;$(ProjectDir)..\inspector;$(ProjectDir)..\loader;$(ProjectDir)..\loader\appcache;$(ProjectDir)..\loader\archive;$(ProjectDir)..\loader\archive\cf;$(ProjectDir)..\loader\cache;$(ProjectDir)..\loader\icon;$(ProjectDir)..\mathml;$(ProjectDir)..\page;$(ProjectDir)..\page\animation;$(ProjectDir)..\page\scrolling;$(ProjectDir)..\page\win;$(ProjectDir)..\platform;$(ProjectDir)..\platform\animation;$(ProjectDir)..\platform\audio;$(ProjectDir)..\platform\mock;$(ProjectDir)..\platform\sql;$(ProjectDir)..\platform\win;$(ProjectDir)..\platform\network;$(ProjectDir)..\platform\network\win;$(ProjectDir)..\platform\cf;$(ProjectDir)..\platform\graphics;$(ProjectDir)..\platform\graphics\ca;$(ProjectDir)..\platform\graphics\cpu\arm\filters;$(ProjectDir)..\platform\graphics\filters;$(ProjectDir)..\platform\graphics\filters\arm;$(ProjectDir)..\platform\graphics\opentype;$(ProjectDir)..\platform\graphics\transforms;$(ProjectDir)..\platform\text;$(ProjectDir)..\platform\text\icu;$(ProjectDir)..\platform\text\transcoder;$(ProjectDir)..\platform\graphics\win;$(ProjectDir)..\xml;$(ProjectDir)..\xml\parser;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources;$(ProjectDir)..\plugins;$(ProjectDir)..\plugins\win;$(ProjectDir)..\replay;$(ProjectDir)..\svg\animation;$(ProjectDir)..\svg\graphics;$(ProjectDir)..\svg\properties;$(ProjectDir)..\svg\graphics\filters;$(ProjectDir)..\svg;$(ProjectDir)..\testing;$(ProjectDir)..\crypto;$(ProjectDir)..\crypto\keys;$(ProjectDir)..\wml;$(ProjectDir)..\storage;$(ProjectDir)..\style;$(ProjectDir)..\websockets;$(ProjectDir)..\workers;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ProjectDir)..\ForwardingHeaders;$(ProjectDir)..\platform\graphics\gpu;$(ProjectDir)..\platform\graphics\egl;$(ProjectDir)..\platform\graphics\surfaces;$(ProjectDir)..\platform\graphics\surfaces\egl;$(ProjectDir)..\platform\graphics\opengl;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;$(WebKit_Libraries)\include\private\JavaScriptCore;$(WebKit_Libraries)\include\sqlite;$(WebKit_Libraries)\include\JavaScriptCore;$(WebKit_Libraries)\include\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</del><ins>+ <AdditionalIncludeDirectories>$(ProjectDir)..;$(ProjectDir)..\Modules\mediacontrols;$(ProjectDir)..\Modules\mediastream;$(ProjectDir)..\Modules\encryptedmedia;$(ProjectDir)..\Modules\filesystem;$(ProjectDir)..\Modules\gamepad;$(ProjectDir)..\Modules\geolocation;$(ProjectDir)..\Modules\indexeddb;$(ProjectDir)..\Modules\mediasource;$(ProjectDir)..\Modules\navigatorcontentutils;$(ProjectDir)..\Modules\plugins;$(ProjectDir)..\Modules\speech;$(ProjectDir)..\Modules\proximity;$(ProjectDir)..\Modules\quota;$(ProjectDir)..\Modules\notifications;$(ProjectDir)..\Modules\webdatabase;$(ProjectDir)..\Modules\websockets;$(ProjectDir)..\accessibility;$(ProjectDir)..\accessibility\win;$(ProjectDir)..\bridge;$(ProjectDir)..\bridge\c;$(ProjectDir)..\bridge\jsc;$(ProjectDir)..\css;$(ProjectDir)..\cssjit;$(ProjectDir)..\editing;$(ProjectDir)..\fileapi;$(ProjectDir)..\rendering;$(ProjectDir)..\rendering\line;$(ProjectDir)..\rendering\mathml;$(ProjectDir)..\rendering\shapes;$(ProjectDir)..\rendering\style;$(ProjectDir)..\rendering\svg;$(ProjectDir)..\bindings;$(ProjectDir)..\bindings\generic;$(ProjectDir)..\bindings\js;$(ProjectDir)..\bindings\js\specialization;$(ProjectDir)..\dom;$(ProjectDir)..\dom\default;$(ProjectDir)..\history;$(ProjectDir)..\html;$(ProjectDir)..\html\canvas;$(ProjectDir)..\html\forms;$(ProjectDir)..\html\parser;$(ProjectDir)..\html\shadow;$(ProjectDir)..\html\track;$(ProjectDir)..\inspector;$(ProjectDir)..\loader;$(ProjectDir)..\loader\appcache;$(ProjectDir)..\loader\archive;$(ProjectDir)..\loader\archive\cf;$(ProjectDir)..\loader\cache;$(ProjectDir)..\loader\icon;$(ProjectDir)..\mathml;$(ProjectDir)..\page;$(ProjectDir)..\page\animation;$(ProjectDir)..\page\scrolling;$(ProjectDir)..\page\win;$(ProjectDir)..\platform;$(ProjectDir)..\platform\animation;$(ProjectDir)..\platform\audio;$(ProjectDir)..\platform\mock;$(ProjectDir)..\platform\sql;$(ProjectDir)..\platform\win;$(ProjectDir)..\platform\network;$(ProjectDir)..\platform\network\win;$(ProjectDir)..\platform\cf;$(ProjectDir)..\platform\graphics;$(ProjectDir)..\platform\graphics\ca;$(ProjectDir)..\platform\graphics\cpu\arm\filters;$(ProjectDir)..\platform\graphics\filters;$(ProjectDir)..\platform\graphics\filters\arm;$(ProjectDir)..\platform\graphics\opentype;$(ProjectDir)..\platform\graphics\transforms;$(ProjectDir)..\platform\text;$(ProjectDir)..\platform\text\icu;$(ProjectDir)..\platform\text\transcoder;$(ProjectDir)..\platform\graphics\win;$(ProjectDir)..\xml;$(ProjectDir)..\xml\parser;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources;$(ProjectDir)..\plugins;$(ProjectDir)..\plugins\win;$(ProjectDir)..\replay;$(ProjectDir)..\svg\animation;$(ProjectDir)..\svg\graphics;$(ProjectDir)..\svg\properties;$(ProjectDir)..\svg\graphics\filters;$(ProjectDir)..\svg;$(ProjectDir)..\testing;$(ProjectDir)..\crypto;$(ProjectDir)..\crypto\keys;$(ProjectDir)..\wml;$(ProjectDir)..\storage;$(ProjectDir)..\style;$(ProjectDir)..\websockets;$(ProjectDir)..\workers;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ProjectDir)..\ForwardingHeaders;$(ProjectDir)..\platform\graphics\gpu;$(ProjectDir)..\platform\graphics\egl;$(ProjectDir)..\platform\graphics\surfaces;$(ProjectDir)..\platform\graphics\surfaces\egl;$(ProjectDir)..\platform\graphics\opengl;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;$(WebKit_Libraries)\include\private\JavaScriptCore;$(WebKit_Libraries)\include\sqlite;$(WebKit_Libraries)\include\JavaScriptCore;$(WebKit_Libraries)\include\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ins><span class="cx"> <PreprocessorDefinitions>DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</span><span class="cx"> <PrecompiledHeader>Use</PrecompiledHeader>
</span><span class="cx"> <PrecompiledHeaderFile>WebCorePrefix.h</PrecompiledHeaderFile>
</span><span class="cx"> <ForcedIncludeFiles>WebCorePrefix.h;ICUVersion.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
</span><span class="cx"> </ClCompile>
</span><span class="cx"> </ItemDefinitionGroup>
</span><del>-</Project>
</del><span class="cx">\ No newline at end of file
</span><ins>+</Project>
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCoreTestSupportvcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -830,6 +830,14 @@
</span><span class="cx"> <ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Production|x64'">
</span><span class="cx"> </ForcedIncludeFiles>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\testing\MockCDM.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">NotUsing</PrecompiledHeader>
+ </ClCompile>
</ins><span class="cx"> </ItemGroup>
</span><span class="cx"> <ItemGroup>
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\InternalSettingsGenerated.h" />
</span><span class="lines">@@ -841,6 +849,7 @@
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSInternalSettingsGenerated.h" />
</span><span class="cx"> <ClInclude Include="..\testing\MallocStatistics.h" />
</span><span class="cx"> <ClInclude Include="..\testing\MemoryInfo.h" />
</span><ins>+ <ClInclude Include="..\testing\MockCDM.h" />
</ins><span class="cx"> <ClInclude Include="..\testing\TypeConversions.h" />
</span><span class="cx"> <ClInclude Include="..\testing\Internals.h" />
</span><span class="cx"> <ClInclude Include="..\testing\InternalSettings.h" />
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCoreTestSupportvcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -39,6 +39,9 @@
</span><span class="cx"> <ClCompile Include="..\testing\js\WebCoreTestSupport.cpp">
</span><span class="cx"> <Filter>testing</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\testing\MockCDM.cpp">
+ <Filter>testing</Filter>
+ </ClCompile>
</ins><span class="cx"> </ItemGroup>
</span><span class="cx"> <ItemGroup>
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\InternalSettingsGenerated.h">
</span><span class="lines">@@ -81,5 +84,8 @@
</span><span class="cx"> <Filter>testing</Filter>
</span><span class="cx"> </ClInclude>
</span><span class="cx"> <ClInclude Include="..\config.h" />
</span><ins>+ <ClInclude Include="..\testing\MockCDM.h">
+ <Filter>testing</Filter>
+ </ClInclude>
</ins><span class="cx"> </ItemGroup>
</span><del>-</Project>
</del><ins>+</Project>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -42,6 +42,8 @@
</span><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "SoftLinking.h"
</span><span class="cx"> #include <CoreMedia/CoreMedia.h>
</span><ins>+#include <runtime/DataView.h>
+#include <runtime/Uint16Array.h>
</ins><span class="cx"> #include <wtf/MainThread.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><span class="lines">@@ -1003,6 +1005,59 @@
</span><span class="cx"> m_player->currentPlaybackTargetIsWirelessChanged();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><ins>+
+#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
+bool MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData(Uint8Array* initData, String& keyURI, String& keyID, RefPtr<Uint8Array>& certificate)
+{
+ // initData should have the following layout:
+ // [4 bytes: keyURI length][N bytes: keyURI][4 bytes: contentID length], [N bytes: contentID], [4 bytes: certificate length][N bytes: certificate]
+ if (initData->byteLength() < 4)
+ return false;
+
+ RefPtr<ArrayBuffer> initDataBuffer = initData->buffer();
+
+ // Use a DataView to read uint32 values from the buffer, as Uint32Array requires the reads be aligned on 4-byte boundaries.
+ RefPtr<JSC::DataView> initDataView = JSC::DataView::create(initDataBuffer, 0, initDataBuffer->byteLength());
+ uint32_t offset = 0;
+ bool status = true;
+
+ uint32_t keyURILength = initDataView->get<uint32_t>(offset, true, &status);
+ offset += 4;
+ if (!status || offset + keyURILength > initData->length())
+ return false;
+
+ RefPtr<Uint16Array> keyURIArray = Uint16Array::create(initDataBuffer, offset, keyURILength);
+ if (!keyURIArray)
+ return false;
+
+ keyURI = String(reinterpret_cast<UChar*>(keyURIArray->data()), keyURILength / sizeof(unsigned short));
+ offset += keyURILength;
+
+ uint32_t keyIDLength = initDataView->get<uint32_t>(offset, true, &status);
+ offset += 4;
+ if (!status || offset + keyIDLength > initData->length())
+ return false;
+
+ RefPtr<Uint16Array> keyIDArray = Uint16Array::create(initDataBuffer, offset, keyIDLength);
+ if (!keyIDArray)
+ return false;
+
+ keyID = String(reinterpret_cast<UChar*>(keyIDArray->data()), keyIDLength / sizeof(unsigned short));
+ offset += keyIDLength;
+
+ uint32_t certificateLength = initDataView->get<uint32_t>(offset, true, &status);
+ offset += 4;
+ if (!status || offset + certificateLength > initData->length())
+ return false;
+
+ certificate = Uint8Array::create(initDataBuffer, offset, certificateLength);
+ if (!certificate)
+ return false;
+
+ return true;
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -142,6 +142,10 @@
</span><span class="cx"> void dispatchNotification();
</span><span class="cx"> void clearMainThreadPendingFlag();
</span><span class="cx">
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
+ static bool extractKeyURIKeyIDAndCertificateFromInitData(Uint8Array* initData, String& keyURI, String& keyID, RefPtr<Uint8Array>& certificate);
+#endif
+
</ins><span class="cx"> protected:
</span><span class="cx"> MediaPlayerPrivateAVFoundation(MediaPlayer*);
</span><span class="cx"> virtual ~MediaPlayerPrivateAVFoundation();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfAVFoundationCFSoftLinkingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -25,6 +25,16 @@
</span><span class="cx">
</span><span class="cx"> #include "SoftLinking.h"
</span><span class="cx">
</span><ins>+#if HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
+#include <AVFoundationCF/AVCFPlayerItemLegibleOutput.h>
+#endif
+
+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+#include <AVFoundationCF/AVCFAssetResourceLoader.h>
+#endif
+
+#include <d3d9.h>
+
</ins><span class="cx"> // Soft-link against AVFoundationCF functions and variables required by MediaPlayerPrivateAVFoundationCF.cpp.
</span><span class="cx">
</span><span class="cx"> #ifdef DEBUG_ALL
</span><span class="lines">@@ -216,10 +226,11 @@
</span><span class="cx"> #define AVCFURLAssetCreateWithURLAndOptions softLink_AVCFURLAssetCreateWithURLAndOptions
</span><span class="cx">
</span><span class="cx"> SOFT_LINK_DLL_IMPORT_OPTIONAL(AVFoundationCF, AVCFPlayerSetDirect3DDevice, void, __cdecl, (AVCFPlayerRef player, IDirect3DDevice9* d3dDevice))
</span><ins>+#define AVCFPlayerSetDirect3DDevice softLink_AVCFPlayerSetDirect3DDevice
</ins><span class="cx">
</span><span class="cx"> #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) && HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
</span><span class="cx">
</span><del>-SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFAssetGetSelectionGroupForMediaCharacteristic , AVCFMediaSelectionGroupRef, __cdecl, (AVCFAssetRef asset, CFStringRef mediaCharacteristic), (asset, mediaCharacteristic))
</del><ins>+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFAssetGetSelectionGroupForMediaCharacteristic, AVCFMediaSelectionGroupRef, __cdecl, (AVCFAssetRef asset, CFStringRef mediaCharacteristic), (asset, mediaCharacteristic))
</ins><span class="cx"> #define AVCFAssetGetSelectionGroupForMediaCharacteristic softLink_AVCFAssetGetSelectionGroupForMediaCharacteristic
</span><span class="cx">
</span><span class="cx"> SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFMediaSelectionCopyPlayableOptionsFromArray, CFArrayRef, __cdecl, (CFArrayRef selectionOptions), (selectionOptions))
</span><span class="lines">@@ -270,8 +281,29 @@
</span><span class="cx"> SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerItemSelectMediaOptionInMediaSelectionGroup, void, __cdecl, (AVCFPlayerItemRef playerItem, AVCFMediaSelectionOptionRef selectionOption, AVCFMediaSelectionGroupRef selectionGroup), (playerItem, selectionOption, selectionGroup))
</span><span class="cx"> #define AVCFPlayerItemSelectMediaOptionInMediaSelectionGroup softLink_AVCFPlayerItemSelectMediaOptionInMediaSelectionGroup
</span><span class="cx">
</span><ins>+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFURLAssetCopyURL, CFURLRef, __cdecl, (AVCFURLAssetRef asset), (asset))
+#define AVCFURLAssetCopyURL softLink_AVCFURLAssetCopyURL
+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFURLAssetGetResourceLoader, AVCFAssetResourceLoaderRef, __cdecl, (AVCFURLAssetRef asset), (asset))
+#define AVCFURLAssetGetResourceLoader softLink_AVCFURLAssetGetResourceLoader
+
+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFAssetResourceLoaderSetCallbacks, void, __cdecl, (AVCFAssetResourceLoaderRef resourceLoader, const AVCFAssetResourceLoaderCallbacks *callbacks, dispatch_queue_t callbackQueue), (resourceLoader, callbacks, callbackQueue))
+#define AVCFAssetResourceLoaderSetCallbacks softLink_AVCFAssetResourceLoaderSetCallbacks
+
+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFAssetResourceLoadingRequestCreateStreamingContentKeyRequestDataForApp, CFDataRef, __cdecl, (AVCFAssetResourceLoadingRequestRef loadingRequest, CFDataRef appIdentifier, CFDataRef contentIdentifier, CFDictionaryRef options, CFErrorRef *outError), (loadingRequest, appIdentifier, contentIdentifier, options, outError))
+#define AVCFAssetResourceLoadingRequestCreateStreamingContentKeyRequestDataForApp softLink_AVCFAssetResourceLoadingRequestCreateStreamingContentKeyRequestDataForApp
+
+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFAssetResourceLoadingRequestFinishLoadingWithError, void, __cdecl, (AVCFAssetResourceLoadingRequestRef loadingRequest, CFErrorRef error), (loadingRequest, error))
+#define AVCFAssetResourceLoadingRequestFinishLoadingWithError softLink_AVCFAssetResourceLoadingRequestFinishLoadingWithError
+
+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFAssetResourceLoadingRequestGetURLRequest, CFURLRequestRef, __cdecl, (AVCFAssetResourceLoadingRequestRef loadingRequest), (loadingRequest))
+#define AVCFAssetResourceLoadingRequestGetURLRequest softLink_AVCFAssetResourceLoadingRequestGetURLRequest
+
+#endif
+
</ins><span class="cx"> // Variables
</span><span class="cx">
</span><span class="cx"> SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFAssetImageGeneratorApertureModeCleanAperture, const CFStringRef);
</span><span class="lines">@@ -357,6 +389,9 @@
</span><span class="cx"> SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFAssetPropertyAvailableMediaCharacteristicsWithMediaSelectionOptions, const CFStringRef);
</span><span class="cx"> #define AVCFAssetPropertyAvailableMediaCharacteristicsWithMediaSelectionOptions getAVCFAssetPropertyAvailableMediaCharacteristicsWithMediaSelectionOptions()
</span><span class="cx">
</span><ins>+SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey, const CFStringRef);
+#define AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey getAVCFURLAssetInheritURIQueryComponentFromReferencingURIKey()
+
</ins><span class="cx"> SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFMediaCharacteristicEasyToRead, const CFStringRef);
</span><span class="cx"> #define AVCFMediaCharacteristicEasyToRead getAVCFMediaCharacteristicEasyToRead()
</span><span class="cx">
</span><span class="lines">@@ -384,7 +419,4 @@
</span><span class="cx"> SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly, const CFStringRef);
</span><span class="cx"> #define AVCFPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly getAVCFPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly()
</span><span class="cx">
</span><del>-SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey, const CFStringRef);
-#define AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey getAVCFURLAssetInheritURIQueryComponentFromReferencingURIKey()
-
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfCDMSessionAVFoundationCFcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp (0 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 "CDMSessionAVFoundationCF.h"
+
+#if ENABLE(ENCRYPTED_MEDIA_V2) && HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
+
+#include "CDM.h"
+#include "CDMSession.h"
+#include "ExceptionCode.h"
+#include "MediaPlayer.h"
+#include "MediaPlayerPrivateAVFoundationCF.h"
+#include "NotImplemented.h"
+#include "SoftLinking.h"
+#include "UUID.h"
+#include <AVFoundationCF/AVFoundationCF.h>
+#include <wtf/text/CString.h>
+
+// The softlink header files must be included after the AVCF and CoreMedia header files.
+#include "AVFoundationCFSoftLinking.h"
+
+namespace WebCore {
+
+CDMSessionAVFoundationCF::CDMSessionAVFoundationCF(MediaPlayerPrivateAVFoundationCF* parent)
+ : m_parent(parent)
+ , m_client(nullptr)
+ , m_sessionId(createCanonicalUUIDString())
+{
+}
+
+PassRefPtr<Uint8Array> CDMSessionAVFoundationCF::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode)
+{
+ UNUSED_PARAM(mimeType);
+
+ String keyURI;
+ String keyID;
+ RefPtr<Uint8Array> certificate;
+ if (!MediaPlayerPrivateAVFoundationCF::extractKeyURIKeyIDAndCertificateFromInitData(initData, keyURI, keyID, certificate)) {
+ errorCode = MediaPlayer::InvalidPlayerState;
+ return nullptr;
+ }
+
+ m_request = m_parent->takeRequestForKeyURI(keyURI);
+ if (!m_request) {
+ errorCode = MediaPlayer::InvalidPlayerState;
+ return nullptr;
+ }
+
+ RetainPtr<CFMutableDataRef> certificateData = adoptCF(CFDataCreateMutable(kCFAllocatorDefault, certificate->byteLength()));
+ CFDataAppendBytes(certificateData.get(), reinterpret_cast<const UInt8*>(certificate->baseAddress()), certificate->byteLength());
+
+ CString assetStr = keyID.utf8();
+ RetainPtr<CFMutableDataRef> assetID = adoptCF(CFDataCreateMutable(kCFAllocatorDefault, assetStr.length()));
+ CFDataAppendBytes(assetID.get(), reinterpret_cast<const UInt8*>(assetStr.data()), assetStr.length());
+
+ CFErrorRef cfError = nullptr;
+ RetainPtr<CFDataRef> keyRequest = AVCFAssetResourceLoadingRequestCreateStreamingContentKeyRequestDataForApp(m_request.get(), certificateData.get(), assetID.get(), nullptr, &cfError);
+
+ if (!keyRequest) {
+ RetainPtr<CFDictionaryRef> userInfo;
+ if (cfError) {
+ userInfo = adoptCF(CFErrorCopyUserInfo(cfError));
+
+ if (userInfo) {
+ CFErrorRef underlyingError = (CFErrorRef)CFDictionaryGetValue(userInfo.get(), kCFErrorUnderlyingErrorKey);
+ if (underlyingError)
+ systemCode = CFErrorGetCode(underlyingError);
+ }
+
+ CFRelease(cfError);
+ }
+
+ return nullptr;
+ }
+
+ errorCode = MediaPlayer::NoError;
+ systemCode = 0;
+ destinationURL = String();
+
+ RefPtr<ArrayBuffer> keyRequestBuffer = ArrayBuffer::create(CFDataGetBytePtr(keyRequest.get()), CFDataGetLength(keyRequest.get()));
+ return Uint8Array::create(keyRequestBuffer, 0, keyRequestBuffer->byteLength());
+}
+
+void CDMSessionAVFoundationCF::releaseKeys()
+{
+}
+
+bool CDMSessionAVFoundationCF::update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode)
+{
+ RetainPtr<CFMutableDataRef> keyData = adoptCF(CFDataCreateMutable(kCFAllocatorDefault, key->byteLength()));
+ CFDataAppendBytes(keyData.get(), reinterpret_cast<const UInt8*>(key->baseAddress()), key->byteLength());
+
+ // TODO: AVCFAssetResourceLoadingDataRequestRespondWithData(m_request.get(), keyData.get());
+ // TODO: AVCFAssetResourceLoadingRequestFinishedLoading(m_request.get());
+ notImplemented();
+
+ errorCode = MediaPlayer::NoError;
+ systemCode = 0;
+ nextMessage = nullptr;
+
+ return true;
+}
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfCDMSessionAVFoundationCFh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h (0 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 CDMSessionAVFoundationCF_h
+#define CDMSessionAVFoundationCF_h
+
+#include "CDMSession.h"
+#include <wtf/PassOwnPtr.h>
+#include <wtf/RetainPtr.h>
+
+#if ENABLE(ENCRYPTED_MEDIA_V2) && HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
+
+typedef struct OpaqueAVCFAssetResourceLoadingRequest* AVCFAssetResourceLoadingRequestRef;
+
+namespace WebCore {
+
+class MediaPlayerPrivateAVFoundationCF;
+
+class CDMSessionAVFoundationCF : public CDMSession {
+public:
+ CDMSessionAVFoundationCF(MediaPlayerPrivateAVFoundationCF* parent);
+ virtual ~CDMSessionAVFoundationCF() { }
+
+ virtual void setClient(CDMSessionClient* client) override { m_client = client; }
+ virtual const String& sessionId() const override { return m_sessionId; }
+ virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
+ virtual void releaseKeys() override;
+ virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override;
+
+protected:
+ MediaPlayerPrivateAVFoundationCF* m_parent;
+ CDMSessionClient* m_client;
+ String m_sessionId;
+ RetainPtr<AVCFAssetResourceLoadingRequestRef> m_request;
+};
+
+}
+
+#endif
+
+#endif // CDMSessionAVFoundationCF_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "MediaPlayerPrivateAVFoundationCF.h"
</span><span class="cx">
</span><span class="cx"> #include "ApplicationCacheResource.h"
</span><ins>+#include "CDMSessionAVFoundationCF.h"
</ins><span class="cx"> #include "COMPtr.h"
</span><span class="cx"> #include "FloatConversion.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="lines">@@ -46,20 +47,29 @@
</span><span class="cx"> #include "PlatformCALayerWin.h"
</span><span class="cx"> #include "SoftLinking.h"
</span><span class="cx"> #include "TimeRanges.h"
</span><ins>+#include "WebCoreAVCFResourceLoader.h"
</ins><span class="cx">
</span><span class="cx"> #include <AVFoundationCF/AVCFPlayerItem.h>
</span><span class="cx"> #if HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
</span><span class="cx"> #include <AVFoundationCF/AVCFPlayerItemLegibleOutput.h>
</span><span class="cx"> #endif
</span><span class="cx"> #include <AVFoundationCF/AVCFPlayerLayer.h>
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE) || HAVE(ENCRYPTED_MEDIA_V2)
+#include <AVFoundationCF/AVCFAssetResourceLoader.h>
+#endif
</ins><span class="cx"> #include <AVFoundationCF/AVFoundationCF.h>
</span><span class="cx"> #include <CoreMedia/CoreMedia.h>
</span><span class="cx"> #include <d3d9.h>
</span><span class="cx"> #include <delayimp.h>
</span><span class="cx"> #include <dispatch/dispatch.h>
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+#include <runtime/DataView.h>
+#include <runtime/Uint16Array.h>
+#endif
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/Threading.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><ins>+#include <wtf/text/StringView.h>
</ins><span class="cx">
</span><span class="cx"> // The softlink header files must be included after the AVCF and CoreMedia header files.
</span><span class="cx"> #include "AVFoundationCFSoftLinking.h"
</span><span class="lines">@@ -117,6 +127,9 @@
</span><span class="cx"> static void legibleOutputCallback(void* context, AVCFPlayerItemLegibleOutputRef, CFArrayRef attributedString, CFArrayRef nativeSampleBuffers, CMTime itemTime);
</span><span class="cx"> static void processCue(void* context);
</span><span class="cx"> #endif
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+ static Boolean resourceLoaderShouldWaitForLoadingOfRequestedResource(AVCFAssetResourceLoaderRef, AVCFAssetResourceLoadingRequestRef, void* context);
+#endif
</ins><span class="cx"> static void loadMetadataCompletionCallback(AVCFAssetRef, void*);
</span><span class="cx"> static void loadPlayableCompletionCallback(AVCFAssetRef, void*);
</span><span class="cx"> static void periodicTimeObserverCallback(AVCFPlayerRef, CMTime, void*);
</span><span class="lines">@@ -136,6 +149,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> inline dispatch_queue_t dispatchQueue() const { return m_notificationQueue; }
</span><span class="cx">
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ RetainPtr<AVCFAssetResourceLoadingRequestRef> takeRequestForKeyURI(const String&);
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx"> inline void* callbackContext() const { return reinterpret_cast<void*>(m_objectID); }
</span><span class="cx">
</span><span class="lines">@@ -144,6 +161,10 @@
</span><span class="cx"> static AVFWrapper* avfWrapperForCallbackContext(void*);
</span><span class="cx"> void addToMap();
</span><span class="cx"> void removeFromMap() const;
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+ bool shouldWaitForLoadingOfResource(AVCFAssetResourceLoadingRequestRef avRequest);
+ static void processShouldWaitForLoadingOfResource(void* context);
+#endif
</ins><span class="cx">
</span><span class="cx"> static void disconnectAndDeleteAVFWrapper(void*);
</span><span class="cx">
</span><span class="lines">@@ -162,6 +183,7 @@
</span><span class="cx"> RetainPtr<AVCFPlayerItemLegibleOutputRef> m_legibleOutput;
</span><span class="cx"> RetainPtr<AVCFMediaSelectionGroupRef> m_selectionGroup;
</span><span class="cx"> #endif
</span><ins>+
</ins><span class="cx"> dispatch_queue_t m_notificationQueue;
</span><span class="cx">
</span><span class="cx"> mutable RetainPtr<CACFLayerRef> m_caVideoLayer;
</span><span class="lines">@@ -171,6 +193,10 @@
</span><span class="cx"> COMPtr<IDirect3DDevice9Ex> m_d3dDevice;
</span><span class="cx">
</span><span class="cx"> InbandTextTrackPrivateAVF* m_currentTextTrack;
</span><ins>+
+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ HashMap<String, RetainPtr<AVCFAssetResourceLoadingRequestRef>> m_keyURIToRequestMap;
+#endif
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> uintptr_t AVFWrapper::s_nextAVFWrapperObjectID;
</span><span class="lines">@@ -288,6 +314,24 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+static dispatch_queue_t globalQueue = nullptr;
+
+static void initGlobalLoaderDelegateQueue(void* ctx)
+{
+ globalQueue = dispatch_queue_create("WebCoreAVFLoaderDelegate queue", DISPATCH_QUEUE_SERIAL);
+}
+
+static dispatch_queue_t globalLoaderDelegateQueue()
+{
+ static dispatch_once_t onceToken;
+
+ dispatch_once_f(&onceToken, nullptr, initGlobalLoaderDelegateQueue);
+
+ return globalQueue;
+}
+#endif
+
</ins><span class="cx"> PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationCF::create(MediaPlayer* player)
</span><span class="cx"> {
</span><span class="cx"> return adoptPtr(new MediaPlayerPrivateAVFoundationCF(player));
</span><span class="lines">@@ -310,6 +354,10 @@
</span><span class="cx"> MediaPlayerPrivateAVFoundationCF::~MediaPlayerPrivateAVFoundationCF()
</span><span class="cx"> {
</span><span class="cx"> LOG(Media, "MediaPlayerPrivateAVFoundationCF::~MediaPlayerPrivateAVFoundationCF(%p)", this);
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+ for (auto& pair : m_resourceLoaderMap)
+ pair.value->invalidate();
+#endif
</ins><span class="cx"> cancelLoad();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -842,6 +890,15 @@
</span><span class="cx"> supportedTypes = mimeTypeCache();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
+static bool keySystemIsSupported(const String& keySystem)
+{
+ if (equalIgnoringCase(keySystem, "com.apple.fps") || equalIgnoringCase(keySystem, "com.apple.fps.1_0"))
+ return true;
+ return false;
+}
+#endif
+
</ins><span class="cx"> MediaPlayer::SupportsType MediaPlayerPrivateAVFoundationCF::supportsType(const MediaEngineSupportParameters& parameters)
</span><span class="cx"> {
</span><span class="cx"> // Only return "IsSupported" if there is no codecs parameter for now as there is no way to ask if it supports an
</span><span class="lines">@@ -858,6 +915,21 @@
</span><span class="cx"> return AVFoundationCFLibrary() && CoreMediaLibrary();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+void MediaPlayerPrivateAVFoundationCF::didCancelLoadingRequest(AVCFAssetResourceLoadingRequestRef avRequest)
+{
+ WebCoreAVCFResourceLoader* resourceLoader = m_resourceLoaderMap.get(avRequest);
+
+ if (resourceLoader)
+ resourceLoader->stopLoading();
+}
+
+void MediaPlayerPrivateAVFoundationCF::didStopLoadingRequest(AVCFAssetResourceLoadingRequestRef avRequest)
+{
+ m_resourceLoaderMap.remove(avRequest);
+}
+#endif
+
</ins><span class="cx"> float MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue(float timeValue) const
</span><span class="cx"> {
</span><span class="cx"> if (!metaDataAvailable())
</span><span class="lines">@@ -1005,6 +1077,24 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+RetainPtr<AVCFAssetResourceLoadingRequestRef> MediaPlayerPrivateAVFoundationCF::takeRequestForKeyURI(const String& keyURI)
+{
+ if (!m_avfWrapper)
+ return nullptr;
+
+ return m_avfWrapper->takeRequestForKeyURI(keyURI);
+}
+
+std::unique_ptr<CDMSession> MediaPlayerPrivateAVFoundationCF::createSession(const String& keySystem)
+{
+ if (!keySystemIsSupported(keySystem))
+ return nullptr;
+
+ return std::make_unique<CDMSessionAVFoundationCF>(this);
+}
+#endif
+
</ins><span class="cx"> #if !HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
</span><span class="cx"> void MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks()
</span><span class="cx"> {
</span><span class="lines">@@ -1336,8 +1426,18 @@
</span><span class="cx"> if (inheritURI)
</span><span class="cx"> CFDictionarySetValue(optionsRef.get(), AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey, kCFBooleanTrue);
</span><span class="cx">
</span><del>- AVCFURLAssetRef assetRef = AVCFURLAssetCreateWithURLAndOptions(kCFAllocatorDefault, urlRef.get(), optionsRef.get(), m_notificationQueue);
- m_avAsset = adoptCF(assetRef);
</del><ins>+ m_avAsset = adoptCF(AVCFURLAssetCreateWithURLAndOptions(kCFAllocatorDefault, urlRef.get(), optionsRef.get(), m_notificationQueue));
+
+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+ AVCFAssetResourceLoaderCallbacks loaderCallbacks;
+ loaderCallbacks.version = kAVCFAssetResourceLoader_CallbacksVersion_1;
+ ASSERT(callbackContext());
+ loaderCallbacks.context = callbackContext();
+ loaderCallbacks.resourceLoaderShouldWaitForLoadingOfRequestedResource = AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource;
+
+ RetainPtr<AVCFAssetResourceLoaderRef> resourceLoader = adoptCF(AVCFURLAssetGetResourceLoader(m_avAsset.get()));
+ AVCFAssetResourceLoaderSetCallbacks(resourceLoader.get(), &loaderCallbacks, globalLoaderDelegateQueue());
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AVFWrapper::createPlayer(IDirect3DDevice9* d3dDevice)
</span><span class="lines">@@ -1612,7 +1712,7 @@
</span><span class="cx"> if (!context)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- OwnPtr<LegibleOutputData> legibleOutputData = adoptPtr(reinterpret_cast<LegibleOutputData*>(context));
</del><ins>+ std::unique_ptr<LegibleOutputData> legibleOutputData(reinterpret_cast<LegibleOutputData*>(context));
</ins><span class="cx">
</span><span class="cx"> MutexLocker locker(mapLock());
</span><span class="cx"> AVFWrapper* self = avfWrapperForCallbackContext(legibleOutputData->m_context);
</span><span class="lines">@@ -1641,12 +1741,103 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(legibleOutput == self->m_legibleOutput);
</span><span class="cx">
</span><del>- OwnPtr<LegibleOutputData> legibleOutputData = adoptPtr(new LegibleOutputData(attributedStrings, nativeSampleBuffers, CMTimeGetSeconds(itemTime), context));
</del><ins>+ auto legibleOutputData = std::make_unique<LegibleOutputData>(attributedStrings, nativeSampleBuffers, CMTimeGetSeconds(itemTime), context);
</ins><span class="cx">
</span><del>- dispatch_async_f(dispatch_get_main_queue(), legibleOutputData.leakPtr(), processCue);
</del><ins>+ dispatch_async_f(dispatch_get_main_queue(), legibleOutputData.release(), processCue);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+struct LoadRequestData {
+ RetainPtr<AVCFAssetResourceLoadingRequestRef> m_request;
+ void* m_context;
+
+ LoadRequestData(AVCFAssetResourceLoadingRequestRef request, void* context)
+ : m_request(request), m_context(context)
+ {
+ }
+};
+
+void AVFWrapper::processShouldWaitForLoadingOfResource(void* context)
+{
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
+ ASSERT(context);
+
+ if (!context)
+ return;
+
+ std::unique_ptr<LoadRequestData> loadRequestData(reinterpret_cast<LoadRequestData*>(context));
+
+ MutexLocker locker(mapLock());
+ AVFWrapper* self = avfWrapperForCallbackContext(loadRequestData->m_context);
+ if (!self) {
+ LOG(Media, "AVFWrapper::processShouldWaitForLoadingOfResource invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
+ AVCFAssetResourceLoadingRequestFinishLoadingWithError(loadRequestData->m_request.get(), nullptr);
+ return;
+ }
+
+ if (!self->shouldWaitForLoadingOfResource(loadRequestData->m_request.get()))
+ AVCFAssetResourceLoadingRequestFinishLoadingWithError(loadRequestData->m_request.get(), nullptr);
+}
+
+bool AVFWrapper::shouldWaitForLoadingOfResource(AVCFAssetResourceLoadingRequestRef avRequest)
+{
+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ RetainPtr<CFURLRequestRef> urlRequest = AVCFAssetResourceLoadingRequestGetURLRequest(avRequest);
+ RetainPtr<CFURLRef> requestURL = CFURLRequestGetURL(urlRequest.get());
+ RetainPtr<CFStringRef> schemeRef = adoptCF(CFURLCopyScheme(requestURL.get()));
+ String scheme = schemeRef.get();
+
+ if (scheme == "skd") {
+ RetainPtr<CFURLRef> absoluteURL = adoptCF(CFURLCopyAbsoluteURL(requestURL.get()));
+ RetainPtr<CFStringRef> keyURIRef = CFURLGetString(absoluteURL.get());
+ String keyURI = keyURIRef.get();
+
+ // Create an initData with the following layout:
+ // [4 bytes: keyURI size], [keyURI size bytes: keyURI]
+ unsigned keyURISize = keyURI.length() * sizeof(UChar);
+ RefPtr<ArrayBuffer> initDataBuffer = ArrayBuffer::create(4 + keyURISize, 1);
+ RefPtr<JSC::DataView> initDataView = JSC::DataView::create(initDataBuffer, 0, initDataBuffer->byteLength());
+ initDataView->set<uint32_t>(0, keyURISize, true);
+
+ RefPtr<Uint16Array> keyURIArray = Uint16Array::create(initDataBuffer, 4, keyURI.length());
+ keyURIArray->setRange(reinterpret_cast<const uint16_t*>(StringView(keyURI).upconvertedCharacters().get()), keyURI.length() / sizeof(unsigned char), 0);
+
+ RefPtr<Uint8Array> initData = Uint8Array::create(initDataBuffer, 0, initDataBuffer->byteLength());
+ if (!m_owner->player()->keyNeeded(initData.get()))
+ return false;
+
+ m_keyURIToRequestMap.set(keyURI, avRequest);
+ return true;
+ }
+#endif
+
+ RefPtr<WebCoreAVCFResourceLoader> resourceLoader = WebCoreAVCFResourceLoader::create(m_owner, avRequest);
+ m_owner->m_resourceLoaderMap.add(avRequest, resourceLoader);
+ resourceLoader->startLoading();
+ return true;
+}
+
+Boolean AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource(AVCFAssetResourceLoaderRef resourceLoader, AVCFAssetResourceLoadingRequestRef loadingRequest, void *context)
+{
+ ASSERT(dispatch_get_main_queue() != dispatch_get_current_queue());
+ MutexLocker locker(mapLock());
+ AVFWrapper* self = avfWrapperForCallbackContext(context);
+ if (!self) {
+ LOG(Media, "AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
+ return false;
+ }
+
+ LOG(Media, "AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource(%p)", self);
+
+ auto loadRequestData = std::make_unique<LoadRequestData>(loadingRequest, context);
+
+ dispatch_async_f(dispatch_get_main_queue(), loadRequestData.release(), processShouldWaitForLoadingOfResource);
+
+ return true;
+}
+#endif
+
</ins><span class="cx"> void AVFWrapper::setAsset(AVCFURLAssetRef asset)
</span><span class="cx"> {
</span><span class="cx"> if (asset == avAsset())
</span><span class="lines">@@ -1787,6 +1978,13 @@
</span><span class="cx"> // FIXME: <rdar://problem/14884340>
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+RetainPtr<AVCFAssetResourceLoadingRequestRef> AVFWrapper::takeRequestForKeyURI(const String& keyURI)
+{
+ return m_keyURIToRequestMap.take(keyURI);
+}
+#endif
+
</ins><span class="cx"> void LayerClient::platformCALayerLayoutSublayersOfLayer(PlatformCALayer* wrapperLayer)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_parent);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2013-2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -30,9 +30,14 @@
</span><span class="cx">
</span><span class="cx"> #include "MediaPlayerPrivateAVFoundation.h"
</span><span class="cx">
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE) || HAVE(ENCRYPTED_MEDIA_V2)
+typedef struct OpaqueAVCFAssetResourceLoadingRequest* AVCFAssetResourceLoadingRequestRef;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class AVFWrapper;
</span><ins>+class WebCoreAVCFResourceLoader;
</ins><span class="cx">
</span><span class="cx"> class MediaPlayerPrivateAVFoundationCF : public MediaPlayerPrivateAVFoundation {
</span><span class="cx"> public:
</span><span class="lines">@@ -40,6 +45,16 @@
</span><span class="cx">
</span><span class="cx"> virtual void tracksChanged() override;
</span><span class="cx">
</span><ins>+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+ bool shouldWaitForLoadingOfResource(AVCFAssetResourceLoadingRequestRef);
+ void didCancelLoadingRequest(AVCFAssetResourceLoadingRequestRef);
+ void didStopLoadingRequest(AVCFAssetResourceLoadingRequestRef);
+#endif
+
+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ RetainPtr<AVCFAssetResourceLoadingRequestRef> takeRequestForKeyURI(const String&);
+#endif
+
</ins><span class="cx"> static void registerMediaEngine(MediaEngineRegistrar);
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -102,6 +117,10 @@
</span><span class="cx">
</span><span class="cx"> virtual void contentsNeedsDisplay();
</span><span class="cx">
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ virtual std::unique_ptr<CDMSession> createSession(const String&) override;
+#endif
+
</ins><span class="cx"> virtual String languageOfPrimaryAudioTrack() const override;
</span><span class="cx">
</span><span class="cx"> #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP)
</span><span class="lines">@@ -117,8 +136,14 @@
</span><span class="cx">
</span><span class="cx"> friend class AVFWrapper;
</span><span class="cx"> AVFWrapper* m_avfWrapper;
</span><del>-
</del><ins>+
</ins><span class="cx"> mutable String m_languageOfPrimaryAudioTrack;
</span><ins>+
+#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
+ friend class WebCoreAVCFResourceLoader;
+ HashMap<RetainPtr<AVCFAssetResourceLoadingRequestRef>, RefPtr<WebCoreAVCFResourceLoader>> m_resourceLoaderMap;
+#endif
+
</ins><span class="cx"> bool m_videoFrameHasDrawn;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfWebCoreAVCFResourceLoadercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp (0 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -0,0 +1,151 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 "WebCoreAVCFResourceLoader.h"
+
+#if ENABLE(VIDEO) && USE(AVFOUNDATION) && HAVE(AVFOUNDATION_LOADER_DELEGATE)
+
+#include "CachedRawResource.h"
+#include "CachedResourceLoader.h"
+#include "CachedResourceRequest.h"
+#include "MediaPlayerPrivateAVFoundationCF.h"
+#include "NotImplemented.h"
+#include "ResourceBuffer.h"
+#include "ResourceLoaderOptions.h"
+#include "SharedBuffer.h"
+#include "SoftLinking.h"
+#include <AVFoundationCF/AVFoundationCF.h>
+#include <AVFoundationCF/AVCFAssetResourceLoader.h>
+#include <wtf/text/CString.h>
+
+// The softlink header files must be included after the AVCF and CoreMedia header files.
+#include "AVFoundationCFSoftLinking.h"
+
+namespace WebCore {
+
+PassRefPtr<WebCoreAVCFResourceLoader> WebCoreAVCFResourceLoader::create(MediaPlayerPrivateAVFoundationCF* parent, AVCFAssetResourceLoadingRequestRef avRequest)
+{
+ ASSERT(avRequest);
+ ASSERT(parent);
+ return adoptRef(new WebCoreAVCFResourceLoader(parent, avRequest));
+}
+
+WebCoreAVCFResourceLoader::WebCoreAVCFResourceLoader(MediaPlayerPrivateAVFoundationCF* parent, AVCFAssetResourceLoadingRequestRef avRequest)
+ : m_parent(parent)
+ , m_avRequest(avRequest)
+{
+}
+
+WebCoreAVCFResourceLoader::~WebCoreAVCFResourceLoader()
+{
+ stopLoading();
+}
+
+void WebCoreAVCFResourceLoader::startLoading()
+{
+ if (m_resource || !m_parent)
+ return;
+
+ RetainPtr<CFURLRequestRef> urlRequest = AVCFAssetResourceLoadingRequestGetURLRequest(m_avRequest.get());
+ URL requestURL = CFURLRequestGetURL(urlRequest.get());
+
+ CachedResourceRequest request(ResourceRequest(requestURL), ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType));
+
+ request.mutableResourceRequest().setPriority(ResourceLoadPriorityLow);
+ CachedResourceLoader* loader = m_parent->player()->cachedResourceLoader();
+ m_resource = loader ? loader->requestRawResource(request) : 0;
+ if (m_resource)
+ m_resource->addClient(this);
+ else {
+ LOG_ERROR("Failed to start load for media at url %s", requestURL.string().ascii().data());
+ AVCFAssetResourceLoadingRequestFinishLoadingWithError(m_avRequest.get(), nullptr);
+ }
+}
+
+void WebCoreAVCFResourceLoader::stopLoading()
+{
+ if (!m_resource)
+ return;
+
+ m_resource->removeClient(this);
+ m_resource = 0;
+
+ if (m_parent)
+ m_parent->didStopLoadingRequest(m_avRequest.get());
+}
+
+void WebCoreAVCFResourceLoader::invalidate()
+{
+ m_parent = nullptr;
+ stopLoading();
+}
+
+void WebCoreAVCFResourceLoader::responseReceived(CachedResource* resource, const ResourceResponse& response)
+{
+ ASSERT(resource == m_resource);
+ UNUSED_PARAM(resource);
+
+ int status = response.httpStatusCode();
+ if (status && (status < 200 || status > 299)) {
+ AVCFAssetResourceLoadingRequestFinishLoadingWithError(m_avRequest.get(), nullptr);
+ return;
+ }
+
+ notImplemented();
+}
+
+void WebCoreAVCFResourceLoader::dataReceived(CachedResource* resource, const char*, int)
+{
+ fulfillRequestWithResource(resource);
+}
+
+void WebCoreAVCFResourceLoader::notifyFinished(CachedResource* resource)
+{
+ if (resource->loadFailedOrCanceled()) {
+ // <rdar://problem/13987417> Set the contentType of the contentInformationRequest to an empty
+ // string to trigger AVAsset's playable value to complete loading.
+ // FIXME: if ([m_avRequest.get() contentInformationRequest] && ![[m_avRequest.get() contentInformationRequest] contentType])
+ // FIXME: [[m_avRequest.get() contentInformationRequest] setContentType:@""];
+ notImplemented();
+
+ AVCFAssetResourceLoadingRequestFinishLoadingWithError(m_avRequest.get(), nullptr);
+ } else {
+ fulfillRequestWithResource(resource);
+ // FIXME: [m_avRequest.get() finishLoading];
+ notImplemented();
+ }
+ stopLoading();
+}
+
+void WebCoreAVCFResourceLoader::fulfillRequestWithResource(CachedResource* resource)
+{
+ ASSERT(resource == m_resource);
+ notImplemented();
+}
+
+}
+
+#endif // ENABLE(VIDEO) && USE(AVFOUNDATION)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfWebCoreAVCFResourceLoaderh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h (0 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 WebCoreAVCFResourceLoader_h
+#define WebCoreAVCFResourceLoader_h
+
+#if ENABLE(VIDEO) && USE(AVFOUNDATION) && HAVE(AVFOUNDATION_LOADER_DELEGATE)
+
+#include "CachedRawResourceClient.h"
+#include "CachedResourceHandle.h"
+#include <wtf/Noncopyable.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RetainPtr.h>
+
+typedef struct OpaqueAVCFAssetResourceLoadingRequest* AVCFAssetResourceLoadingRequestRef;
+
+namespace WebCore {
+
+class CachedRawResource;
+class CachedResourceLoader;
+class MediaPlayerPrivateAVFoundationCF;
+
+class WebCoreAVCFResourceLoader : public RefCounted<WebCoreAVCFResourceLoader>, CachedRawResourceClient {
+ WTF_MAKE_NONCOPYABLE(WebCoreAVCFResourceLoader); WTF_MAKE_FAST_ALLOCATED;
+public:
+ static PassRefPtr<WebCoreAVCFResourceLoader> create(MediaPlayerPrivateAVFoundationCF* parent, AVCFAssetResourceLoadingRequestRef);
+ virtual ~WebCoreAVCFResourceLoader();
+
+ void startLoading();
+ void stopLoading();
+ void invalidate();
+
+ CachedRawResource* resource();
+
+private:
+ // CachedResourceClient
+ virtual void responseReceived(CachedResource*, const ResourceResponse&) override;
+ virtual void dataReceived(CachedResource*, const char*, int) override;
+ virtual void notifyFinished(CachedResource*) override;
+
+ void fulfillRequestWithResource(CachedResource*);
+
+ WebCoreAVCFResourceLoader(MediaPlayerPrivateAVFoundationCF* parent, AVCFAssetResourceLoadingRequestRef);
+ MediaPlayerPrivateAVFoundationCF* m_parent;
+ RetainPtr<AVCFAssetResourceLoadingRequestRef> m_avRequest;
+ CachedResourceHandle<CachedRawResource> m_resource;
+};
+
+}
+
+#endif // ENABLE(VIDEO) && USE(AVFOUNDATION)
+
+#endif // WebCoreAVFResourceLoader_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -87,10 +87,6 @@
</span><span class="cx"> void didStopLoadingRequest(AVAssetResourceLoadingRequest *);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
- static bool extractKeyURIKeyIDAndCertificateFromInitData(Uint8Array* initData, String& keyURI, String& keyID, RefPtr<Uint8Array>& certificate);
-#endif
-
</del><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx"> RetainPtr<AVAssetResourceLoadingRequest> takeRequestForKeyURI(const String&);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -1941,58 +1941,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
-bool MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData(Uint8Array* initData, String& keyURI, String& keyID, RefPtr<Uint8Array>& certificate)
-{
- // initData should have the following layout:
- // [4 bytes: keyURI length][N bytes: keyURI][4 bytes: contentID length], [N bytes: contentID], [4 bytes: certificate length][N bytes: certificate]
- if (initData->byteLength() < 4)
- return false;
-
- RefPtr<ArrayBuffer> initDataBuffer = initData->buffer();
-
- // Use a DataView to read uint32 values from the buffer, as Uint32Array requires the reads be aligned on 4-byte boundaries.
- RefPtr<JSC::DataView> initDataView = JSC::DataView::create(initDataBuffer, 0, initDataBuffer->byteLength());
- uint32_t offset = 0;
- bool status = true;
-
- uint32_t keyURILength = initDataView->get<uint32_t>(offset, true, &status);
- offset += 4;
- if (!status || offset + keyURILength > initData->length())
- return false;
-
- RefPtr<Uint16Array> keyURIArray = Uint16Array::create(initDataBuffer, offset, keyURILength);
- if (!keyURIArray)
- return false;
-
- keyURI = String(keyURIArray->data(), keyURILength / sizeof(unsigned short));
- offset += keyURILength;
-
- uint32_t keyIDLength = initDataView->get<uint32_t>(offset, true, &status);
- offset += 4;
- if (!status || offset + keyIDLength > initData->length())
- return false;
-
- RefPtr<Uint16Array> keyIDArray = Uint16Array::create(initDataBuffer, offset, keyIDLength);
- if (!keyIDArray)
- return false;
-
- keyID = String(keyIDArray->data(), keyIDLength / sizeof(unsigned short));
- offset += keyIDLength;
-
- uint32_t certificateLength = initDataView->get<uint32_t>(offset, true, &status);
- offset += 4;
- if (!status || offset + certificateLength > initData->length())
- return false;
-
- certificate = Uint8Array::create(initDataBuffer, offset, certificateLength);
- if (!certificate)
- return false;
-
- return true;
-}
-#endif
-
</del><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA)
</span><span class="cx"> MediaPlayer::MediaKeyException MediaPlayerPrivateAVFoundationObjC::generateKeyRequest(const String& keySystem, const unsigned char* initDataPtr, unsigned initDataLength)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebKit/ChangeLog        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-06-27 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
+ https://bugs.webkit.org/show_bug.cgi?id=134418
+
+ Reviewed by Eric Carlson.
+
+ * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add new
+ export.
+
</ins><span class="cx"> 2014-06-26 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove use of PlatformStrategies for Gamepad API.
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (170561 => 170562)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2014-06-27 23:32:51 UTC (rev 170561)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2014-06-28 00:19:41 UTC (rev 170562)
</span><span class="lines">@@ -490,3 +490,6 @@
</span><span class="cx"> symbolWithPointer(?throwSequenceTypeError@WebCore@@YAXAAVExecState@JSC@@@Z, ?throwSequenceTypeError@WebCore@@YAXAEAVExecState@JSC@@@Z)
</span><span class="cx"> symbolWithPointer(?throwSetterTypeError@WebCore@@YAXAAVExecState@JSC@@PBD1@Z, ?throwSetterTypeError@WebCore@@YAXAEAVExecState@JSC@@PEBD1@Z)
</span><span class="cx"> symbolWithPointer(?throwThisTypeError@WebCore@@YA_JAAVExecState@JSC@@PBD1@Z, ?throwThisTypeError@WebCore@@YA_JAEAVExecState@JSC@@PEBD1@Z)
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ symbolWithPointer(?registerCDMFactory@CDM@WebCore@@SAXP6A?AV?$unique_ptr@VCDMPrivateInterface@WebCore@@U?$default_delete@VCDMPrivateInterface@WebCore@@@std@@@std@@PAV12@@ZP6A_NABVString@WTF@@@ZP6A_N22@Z@Z,)
+#endif
</ins></span></pre>
</div>
</div>
</body>
</html>