+2014-04-22 Alex Christensen <achristensen@webkit.org>
+
+ Begin implementation of video using Media Foundation.
+ https://bugs.webkit.org/show_bug.cgi?id=131830
+
+ Reviewed by Brent Fulgham.
+
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ Added MediaPlayerPrivateMediaFoundation files.
+ * platform/graphics/MediaPlayer.cpp:
+ Include MediaPlayerPrivateMediaFoundation inside new USE(MEDIA_FOUNDATION) flag.
+ * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: Added.
+ * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Added.
+
2014-04-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r167658.
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\platform\HistogramSupport.cpp" />
+ <ClCompile Include="..\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|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)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\platform\KillRingNone.cpp" />
<ClCompile Include="..\platform\network\soup\AuthenticationChallengeSoup.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ClInclude Include="..\platform\graphics\TiledBackingStoreClient.h" />
<ClInclude Include="..\platform\graphics\TrackBasePrivate.h" />
<ClInclude Include="..\platform\graphics\VideoTrackPrivate.h" />
+ <ClInclude Include="..\platform\graphics\win\MediaPlayerPrivateMediaFoundation.h" />
<ClInclude Include="..\platform\graphics\win\SharedGDIObject.h" />
<ClInclude Include="..\platform\HistogramSupport.h" />
<ClInclude Include="..\platform\HostWindow.h" />
<ClCompile Include="..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.cpp">
<Filter>platform\graphics\win</Filter>
</ClCompile>
+ <ClCompile Include="..\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp">
+ <Filter>platform\graphics\win</Filter>
+ </ClCompile>
<ClCompile Include="..\platform\graphics\opentype\OpenTypeMathData.cpp">
<Filter>platform\graphics\win</Filter>
</ClCompile>
<ClInclude Include="..\platform\graphics\avfoundation\MediaPlayerPrivateAVFoundation.h">
<Filter>platform\graphics\avfoundation</Filter>
</ClInclude>
+ <ClCompile Include="..\platform\graphics\win\MediaPlayerPrivateMediaFoundation.h">
+ <Filter>platform\graphics\win</Filter>
+ </ClCompile>
<ClInclude Include="..\platform\graphics\avfoundation\cf\AVFoundationCFSoftLinking.h">
<Filter>platform\graphics\avfoundation\cf</Filter>
</ClInclude>
#define PlatformMediaEngineClassName MediaPlayerPrivateGStreamer
#endif
+#if USE(MEDIA_FOUNDATION)
+#include "MediaPlayerPrivateMediaFoundation.h"
+#define PlatformMediaEngineClassName MediaPlayerPrivateMediaFoundation
+#endif
+
#if PLATFORM(COCOA)
#if PLATFORM(IOS)
#include "MediaPlayerPrivateIOS.h"
--- /dev/null
+/*
+ * Copyright (C) 2014 Alex Christensen <achristensen@webkit.org>
+ * 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. ``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
+ * 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 "MediaPlayerPrivateMediaFoundation.h"
+
+#include "GraphicsContext.h"
+#include "NotImplemented.h"
+
+#if USE(MEDIA_FOUNDATION)
+
+namespace WebCore {
+
+// TODO: Implement video functionality using Media Foundation
+
+MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation(MediaPlayer* player)
+ : m_player(player)
+{
+}
+
+PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaFoundation::create(MediaPlayer* player)
+{
+ return adoptPtr(new MediaPlayerPrivateMediaFoundation(player));
+}
+
+void MediaPlayerPrivateMediaFoundation::registerMediaEngine(MediaEngineRegistrar registrar)
+{
+ if (isAvailable())
+ registrar(create, getSupportedTypes, supportsType, 0, 0, 0, 0);
+}
+
+bool MediaPlayerPrivateMediaFoundation::isAvailable()
+{
+ notImplemented();
+ return true;
+}
+
+void MediaPlayerPrivateMediaFoundation::getSupportedTypes(HashSet<String>& types)
+{
+ notImplemented();
+ types = HashSet<String>();
+}
+
+MediaPlayer::SupportsType MediaPlayerPrivateMediaFoundation::supportsType(const MediaEngineSupportParameters& parameters)
+{
+ notImplemented();
+ return MediaPlayer::IsNotSupported;
+}
+
+void MediaPlayerPrivateMediaFoundation::load(const String&)
+{
+ notImplemented();
+}
+
+void MediaPlayerPrivateMediaFoundation::cancelLoad()
+{
+ notImplemented();
+}
+
+void MediaPlayerPrivateMediaFoundation::play()
+{
+ notImplemented();
+}
+
+void MediaPlayerPrivateMediaFoundation::pause()
+{
+ notImplemented();
+}
+
+IntSize MediaPlayerPrivateMediaFoundation::naturalSize() const
+{
+ notImplemented();
+ return IntSize(0, 0);
+}
+
+bool MediaPlayerPrivateMediaFoundation::hasVideo() const
+{
+ notImplemented();
+ return false;
+}
+
+bool MediaPlayerPrivateMediaFoundation::hasAudio() const
+{
+ notImplemented();
+ return false;
+}
+
+void MediaPlayerPrivateMediaFoundation::setVisible(bool)
+{
+ notImplemented();
+}
+
+bool MediaPlayerPrivateMediaFoundation::seeking() const
+{
+ notImplemented();
+ return false;
+}
+
+bool MediaPlayerPrivateMediaFoundation::paused() const
+{
+ notImplemented();
+ return false;
+}
+
+MediaPlayer::NetworkState MediaPlayerPrivateMediaFoundation::networkState() const
+{
+ notImplemented();
+ return MediaPlayer::Empty;
+}
+
+MediaPlayer::ReadyState MediaPlayerPrivateMediaFoundation::readyState() const
+{
+ notImplemented();
+ return MediaPlayer::HaveNothing;
+}
+
+std::unique_ptr<PlatformTimeRanges> MediaPlayerPrivateMediaFoundation::buffered() const
+{
+ notImplemented();
+ return PlatformTimeRanges::create();
+}
+
+bool MediaPlayerPrivateMediaFoundation::didLoadingProgress() const
+{
+ notImplemented();
+ return false;
+}
+
+void MediaPlayerPrivateMediaFoundation::setSize(const IntSize&)
+{
+ notImplemented();
+}
+
+void MediaPlayerPrivateMediaFoundation::paint(GraphicsContext* context, const IntRect& rect)
+{
+ if (context->paintingDisabled()
+ || !m_player->visible())
+ return;
+
+ // TODO: Paint the contents of the video to the context
+ notImplemented();
+}
+
+}
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2014 Alex Christensen <achristensen@webkit.org>
+ * 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. ``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
+ * 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 "MediaPlayerPrivate.h"
+
+namespace WebCore {
+
+class MediaPlayerPrivateMediaFoundation : public MediaPlayerPrivateInterface {
+public:
+ MediaPlayerPrivateMediaFoundation(MediaPlayer*);
+ static void registerMediaEngine(MediaEngineRegistrar);
+
+ static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
+ static void getSupportedTypes(HashSet<String>& types);
+ static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
+ static bool isAvailable();
+
+ virtual void load(const String& url);
+ virtual void cancelLoad();
+
+ virtual void play();
+ virtual void pause();
+
+ virtual IntSize naturalSize() const;
+
+ virtual bool hasVideo() const;
+ virtual bool hasAudio() const;
+
+ virtual void setVisible(bool);
+
+ virtual bool seeking() const;
+
+ virtual bool paused() const;
+
+ virtual MediaPlayer::NetworkState networkState() const;
+ virtual MediaPlayer::ReadyState readyState() const;
+
+ virtual std::unique_ptr<PlatformTimeRanges> buffered() const;
+
+ virtual bool didLoadingProgress() const;
+
+ virtual void setSize(const IntSize&);
+
+ virtual void paint(GraphicsContext*, const IntRect&);
+
+private:
+
+ MediaPlayer* m_player;
+
+};
+
+}
+2014-04-22 Alex Christensen <achristensen@webkit.org>
+
+ Begin implementation of video using Media Foundation.
+ https://bugs.webkit.org/show_bug.cgi?id=131830
+
+ Reviewed by Brent Fulgham.
+
+ * FullscreenVideoController.cpp:
+ * WebView.cpp:
+ Added new USE(MEDIA_FOUNDATION) flag to prevent using the unsupported fullscreen api.
+
2014-04-09 Alexey Proskuryakov <ap@apple.com>
Eliminate DragSession structure
#include "config.h"
-#if ENABLE(VIDEO) && !USE(GSTREAMER)
+#if ENABLE(VIDEO) && !USE(GSTREAMER) && !USE(MEDIA_FOUNDATION)
#include "FullscreenVideoController.h"
void WebView::enterFullscreenForNode(Node* node)
{
-#if ENABLE(VIDEO) && !USE(GSTREAMER)
+#if ENABLE(VIDEO) && !USE(GSTREAMER) && !USE(MEDIA_FOUNDATION)
if (!isHTMLVideoElement(node) || !node->isElementNode())
return;
void WebView::exitFullscreen()
{
-#if ENABLE(VIDEO) && !USE(GSTREAMER)
+#if ENABLE(VIDEO) && !USE(GSTREAMER) && !USE(MEDIA_FOUNDATION)
if (!m_fullScreenVideoController)
return;