From 477c726a7ea1137e116c0eaf489ede409206974b Mon Sep 17 00:00:00 2001 From: emutavchi Date: Wed, 27 Apr 2016 16:53:17 +0300 Subject: [PATCH] Fix video size tests for build with USE_HOLE_PUNCH_GSTREAMER Following tests should succeed: 7. InitialMediaVideoWidth 8. InitialMediaVideoHeight 31. VideoDimension http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/2016.html?enablewebm=off&tests=7,8,31 --- .../gstreamer/MediaPlayerPrivateGStreamerMSE.cpp | 11 +++++++++++ .../gstreamer/MediaPlayerPrivateGStreamerMSE.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerMSE.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerMSE.cpp index 42d165ed65e23..d77f947b6b8fb 100644 --- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerMSE.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerMSE.cpp @@ -275,6 +275,17 @@ void MediaPlayerPrivateGStreamerMSE::load(const String& url, MediaSourcePrivateC load(mediasourceUri); } +FloatSize MediaPlayerPrivateGStreamerMSE::naturalSize() const +{ + if (!hasVideo()) + return FloatSize(); + + if (!m_videoSize.isEmpty()) + return m_videoSize; + + return MediaPlayerPrivateGStreamerBase::naturalSize(); +} + void MediaPlayerPrivateGStreamerMSE::pause() { m_paused = true; diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerMSE.h b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerMSE.h index 5287e21fc172d..9b89c58bf2085 100644 --- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerMSE.h +++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerMSE.h @@ -51,6 +51,8 @@ class MediaPlayerPrivateGStreamerMSE : public MediaPlayerPrivateGStreamer { void load(const String &url) override; void load(const String& url, MediaSourcePrivateClient*) override; + FloatSize naturalSize() const override; + void setDownloadBuffering() override { }; bool isLiveStream() const override { return false; }