Title: [289800] trunk/Source/WebCore
- Revision
- 289800
- Author
- [email protected]
- Date
- 2022-02-15 04:01:59 -0800 (Tue, 15 Feb 2022)
Log Message
[GStreamer][MSE] Let MSE set natural video size when using holepunch
https://bugs.webkit.org/show_bug.cgi?id=236453
Reviewed by Xabier Rodriguez-Calvar.
Currently the holepunch implementation completely overrides the video size to a hardcoded
value. It would be desirable to let the m_videoSize value set by
MediaPlayerPrivateGStreamerMSE::setInitialVideoSize() take precedence over the hardcoded value.
This is a fix for media element events test case from YTS:
https://ytlr-cert.appspot.com/2021/main.html?tests=18
This patch is authored by Eugene Mutavchi <[email protected]>
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/775
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::naturalSize const): Return m_videoSize when set.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (289799 => 289800)
--- trunk/Source/WebCore/ChangeLog 2022-02-15 09:37:07 UTC (rev 289799)
+++ trunk/Source/WebCore/ChangeLog 2022-02-15 12:01:59 UTC (rev 289800)
@@ -1,3 +1,24 @@
+2022-02-15 Enrique Ocaña González <[email protected]>
+
+ [GStreamer][MSE] Let MSE set natural video size when using holepunch
+ https://bugs.webkit.org/show_bug.cgi?id=236453
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Currently the holepunch implementation completely overrides the video size to a hardcoded
+ value. It would be desirable to let the m_videoSize value set by
+ MediaPlayerPrivateGStreamerMSE::setInitialVideoSize() take precedence over the hardcoded value.
+
+ This is a fix for media element events test case from YTS:
+
+ https://ytlr-cert.appspot.com/2021/main.html?tests=18
+
+ This patch is authored by Eugene Mutavchi <[email protected]>
+ See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/775
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::naturalSize const): Return m_videoSize when set.
+
2022-02-15 Adrian Perez de Castro <[email protected]>
[GTK][WPE] Inclusion of OpenGLShims.h should not depend on USE(GLX)
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (289799 => 289800)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2022-02-15 09:37:07 UTC (rev 289799)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2022-02-15 12:01:59 UTC (rev 289800)
@@ -1555,13 +1555,6 @@
// Returns the size of the video.
FloatSize MediaPlayerPrivateGStreamer::naturalSize() const
{
-#if USE(GSTREAMER_HOLEPUNCH)
- // When using the holepuch we may not be able to get the video frames size, so we can't use
- // it. But we need to report some non empty naturalSize for the player's GraphicsLayer
- // to be properly created.
- return s_holePunchDefaultFrameSize;
-#endif
-
#if ENABLE(MEDIA_STREAM)
if (!m_isLegacyPlaybin && !m_wantedVideoStreamId.isEmpty()) {
RefPtr<VideoTrackPrivateGStreamer> videoTrack = m_videoTracks.get(m_wantedVideoStreamId);
@@ -1579,6 +1572,16 @@
if (!hasVideo())
return FloatSize();
+ if (!m_videoSize.isEmpty())
+ return m_videoSize;
+
+#if USE(GSTREAMER_HOLEPUNCH)
+ // When using the holepuch we may not be able to get the video frames size, so we can't use
+ // it. But we need to report some non empty naturalSize for the player's GraphicsLayer
+ // to be properly created.
+ return s_holePunchDefaultFrameSize;
+#endif
+
return m_videoSize;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes