Unreviewed GTK build fix for --cmakeargs=-DUSE_GSTREAMER_GL=OFF
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2018 15:46:27 +0000 (15:46 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2018 15:46:27 +0000 (15:46 +0000)
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp

index 316a0e7..50328f1 100644 (file)
@@ -1,3 +1,12 @@
+2018-06-13  Philippe Normand  <pnormand@igalia.com>
+
+        Unreviewed GTK build fix for --cmakeargs=-DUSE_GSTREAMER_GL=OFF
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::load):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
+
 2018-06-12  Philippe Normand  <pnormand@igalia.com>
 
         [GStreamer] Video freezes when GStreamerGL is not installed
index bff7406..ab3b6ed 100644 (file)
@@ -306,7 +306,9 @@ void MediaPlayerPrivateGStreamer::load(MediaStreamPrivate& stream)
 #if GST_CHECK_VERSION(1, 10, 0)
     m_streamPrivate = &stream;
     loadFull(String("mediastream://") + stream.id(), "playbin3");
+#if USE(GSTREAMER_GL)
     ensureGLVideoSinkContext();
+#endif
     m_player->play();
 #else
     // Properly fail so the global MediaPlayer tries to fallback to the next MediaPlayerPrivate.
index 4f8aaa4..7beb1d2 100644 (file)
 #include "WebKitClearKeyDecryptorGStreamer.h"
 #endif
 
+#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
+#include "GStreamerMediaStreamSource.h"
+#endif
+
 #if USE(GSTREAMER_GL)
 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
 #define GST_GL_CAPS_FORMAT "{ BGRx, BGRA }"
 #endif // !GST_CHECK_VERSION(1, 14, 0)
 #endif // USE(LIBEPOXY)
 
-#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
-#include "GStreamerMediaStreamSource.h"
-#endif
-
 #define GST_USE_UNSTABLE_API
 #include <gst/gl/gl.h>
 #undef GST_USE_UNSTABLE_API
@@ -756,12 +756,15 @@ void MediaPlayerPrivateGStreamerBase::pushTextureToCompositor()
 
     std::unique_ptr<GstVideoFrameHolder> frameHolder = std::make_unique<GstVideoFrameHolder>(m_sample.get(), texMapFlagFromOrientation(m_videoSourceOrientation), !m_usingFallbackVideoSink);
 
+#if USE(GSTREAMER_GL)
     GLuint textureID = frameHolder->textureID();
     if (textureID) {
         std::unique_ptr<TextureMapperPlatformLayerBuffer> layerBuffer = std::make_unique<TextureMapperPlatformLayerBuffer>(textureID, frameHolder->size(), frameHolder->flags(), GraphicsContext3D::RGBA);
         layerBuffer->setUnmanagedBufferDataHolder(WTFMove(frameHolder));
         m_platformLayerProxy->pushNextBuffer(WTFMove(layerBuffer));
-    } else {
+    } else
+#endif
+    {
         std::unique_ptr<TextureMapperPlatformLayerBuffer> buffer = m_platformLayerProxy->getAvailableBuffer(frameHolder->size(), GL_DONT_CARE);
         if (UNLIKELY(!buffer)) {
             auto texture = BitmapTextureGL::create(TextureMapperContextAttributes::get());