Title: [204719] releases/WebKitGTK/webkit-2.12/Source/WebCore
Revision
204719
Author
carlo...@webkit.org
Date
2016-08-22 09:05:17 -0700 (Mon, 22 Aug 2016)

Log Message

Merge r202482 - [GStreamer] top/bottom black bars added needlessly in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=158980

Patch by Philippe Normand <ph...@igalia.com> on 2016-06-27
Reviewed by Carlos Garcia Campos.

The natural video size calculation depends on the validity of the
current sample, so whenever the first sample reached the sink it's a
good idea to reflect this on the player which will update its natural
size accordingly.

Fixes an issue where black borders were added on top and bottom of
fullscreen video.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (204718 => 204719)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-08-22 16:01:15 UTC (rev 204718)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-08-22 16:05:17 UTC (rev 204719)
@@ -1,3 +1,21 @@
+2016-06-27  Philippe Normand  <ph...@igalia.com>
+
+        [GStreamer] top/bottom black bars added needlessly in fullscreen
+        https://bugs.webkit.org/show_bug.cgi?id=158980
+
+        Reviewed by Carlos Garcia Campos.
+
+        The natural video size calculation depends on the validity of the
+        current sample, so whenever the first sample reached the sink it's a
+        good idea to reflect this on the player which will update its natural
+        size accordingly.
+
+        Fixes an issue where black borders were added on top and bottom of
+        fullscreen video.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
+
 2016-06-28  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [GStreamer] Adaptive streaming issues

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (204718 => 204719)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp	2016-08-22 16:01:15 UTC (rev 204718)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp	2016-08-22 16:05:17 UTC (rev 204719)
@@ -537,11 +537,18 @@
 
 void MediaPlayerPrivateGStreamerBase::triggerRepaint(GstSample* sample)
 {
+    bool triggerResize;
     {
         WTF::GMutexLocker<GMutex> lock(m_sampleMutex);
+        triggerResize = !m_sample;
         m_sample = sample;
     }
 
+    if (triggerResize) {
+        LOG_MEDIA_MESSAGE("First sample reached the sink, triggering video dimensions update");
+        m_player->sizeChanged();
+    }
+
 #if USE(COORDINATED_GRAPHICS_THREADED)
 #if USE(GSTREAMER_GL)
     pushTextureToCompositor();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to