diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp index 7a2f98d7508a3..52da37e3c5807 100644 --- a/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp @@ -969,11 +969,12 @@ void AppendPipeline::abort() } // Drain samples before source buffer state is reset if (m_appendState == AppendState::Sampling) { - GRefPtr appsrcPad = adoptGRef(gst_element_get_static_pad(m_appsrc.get(), "src")); + GST_DEBUG("ARRISEOS-43952"); +/* GRefPtr appsrcPad = adoptGRef(gst_element_get_static_pad(m_appsrc.get(), "src")); if (appsrcPad) { GRefPtr query = adoptGRef(gst_query_new_drain()); gst_pad_peer_query(appsrcPad.get(), query.get()); - } + }*/ drainBusIfNeeded(); } } diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp index 9212cc2c064a3..c5ac8cca918dc 100644 --- a/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp @@ -89,6 +89,15 @@ #define MEDIA_MAX_FRAMERATE 60.0f #endif +#if PLATFORM(EOS) + #define H264_MAX_SIZE 1920.0f +#elif PLATFORM(EOS2008C) + #define H264_MAX_SIZE 3840.0f +#elif PLATFORM(APOLLO) + #define H264_MAX_SIZE 4096.0f +#else + #define H264_MAX_SIZE 7680.0f +#endif static const char* dumpReadyState(WebCore::MediaPlayer::ReadyState readyState) { switch (readyState) { @@ -1077,6 +1086,16 @@ bool MediaPlayerPrivateGStreamerMSE::supportsAllCodecs(const Vector& cod return true; } +bool MediaPlayerPrivateGStreamerMSE::isAnyCodecH264AndExceedSupportedSize(const Vector& codecs, float width, float height) +{ + for (String codec : codecs) { + if(codec.startsWith("avc") && (width > H264_MAX_SIZE || height > H264_MAX_SIZE)) { + return true; + } + } + return false; +} + FloatSize MediaPlayerPrivateGStreamerMSE::naturalSize() const { if (!hasVideo()) @@ -1120,6 +1139,9 @@ MediaPlayer::SupportsType MediaPlayerPrivateGStreamerMSE::supportsType(const Med if (width > MEDIA_MAX_WIDTH || height > MEDIA_MAX_HEIGHT) return result; + if(isAnyCodecH264AndExceedSupportedSize(parameters.type.codecs(), width, height)) + return result; + float framerate = parameters.type.parameter("framerate"_s).toFloat(&ok); if (ok && framerate > MEDIA_MAX_FRAMERATE) return result; diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h b/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h index ba4b3a6991db2..ec2fa882b236b 100644 --- a/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h +++ b/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h @@ -88,6 +88,7 @@ class MediaPlayerPrivateGStreamerMSE : public MediaPlayerPrivateGStreamer { static bool supportsCodec(String codec); static bool supportsAllCodecs(const Vector& codecs); + static bool isAnyCodecH264AndExceedSupportedSize(const Vector& codecs, float width, float height); #if ENABLE(ENCRYPTED_MEDIA) void dispatchDecryptionStructure(GUniquePtr&&) final; diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake index 94917879a6c92..d1070d08bcbdc 100644 --- a/Source/cmake/OptionsWPE.cmake +++ b/Source/cmake/OptionsWPE.cmake @@ -178,6 +178,18 @@ if (ENABLE_CBCS) add_definitions(-DENABLE_CBCS=1) endif() +if (PLATFORM_EOS) + add_definitions(-DWTF_PLATFORM_EOS=1) +endif() + +if (PLATFORM_EOS2008C) + add_definitions(-DWTF_PLATFORM_EOS2008C=1) +endif() + +if (PLATFORM_APOLLO) + add_definitions(-DWTF_PLATFORM_APOLLO=1) +endif() + add_definitions(-DBUILDING_WPE__=1) add_definitions(-DGETTEXT_PACKAGE="WPE") add_definitions(-DJSC_GLIB_API_ENABLED)