parent
5d00e593f9
commit
8eb272a001
@ -1,2 +1,2 @@
|
||||
SOURCES/webkitgtk-2.40.5.tar.xz
|
||||
SOURCES/webkitgtk-2.46.3.tar.xz
|
||||
SOURCES/webkitgtk-keys.gpg
|
||||
|
@ -1,2 +1,2 @@
|
||||
2f4d06b021115eb4106177f7d5f534f45b5d3b2e SOURCES/webkitgtk-2.40.5.tar.xz
|
||||
cf57cbbadf2a07c6ede1c886f9742b7d352460c0 SOURCES/webkitgtk-keys.gpg
|
||||
110e2c2ac964f207a8f2fecf6e2e61f0ed4bee00 SOURCES/webkitgtk-2.46.3.tar.xz
|
||||
04b10b8a486542c4551269c20b18b5c1c6cb4f94 SOURCES/webkitgtk-keys.gpg
|
||||
|
@ -1,80 +0,0 @@
|
||||
From 00352dd86bfa102b6e4b792120e3ef3498a27d1e Mon Sep 17 00:00:00 2001
|
||||
From: Russell Epstein <repstein@apple.com>
|
||||
Date: Fri, 17 Nov 2023 15:48:32 -0800
|
||||
Subject: [PATCH] Cherry-pick b0a755e34426.
|
||||
https://bugs.webkit.org/show_bug.cgi?id=265067
|
||||
|
||||
Race condition between JSObject::getDirectConcurrently users and Structure::flattenDictionaryStructure
|
||||
https://bugs.webkit.org/show_bug.cgi?id=265067
|
||||
rdar://118548733
|
||||
|
||||
Reviewed by Justin Michaud and Mark Lam.
|
||||
|
||||
Like Array shift/unshift, flattenDictionaryStructure is the other code which can shrink butterfly for named properties (no other code does it).
|
||||
Compiler threads rely on the fact that normally named property storage never shrunk. And we should catch this exceptional case by taking a cellLock
|
||||
in the compiler thread. But flattenDictionaryStructure is not taking cellLock correctly.
|
||||
|
||||
This patch computes afterOutOfLineCapacity first to detect that whether this flattening will shrink the butterfly.
|
||||
And if it is, then we take a cellLock. We do not need to take it if we do not shrink the butterfly.
|
||||
|
||||
* Source/JavaScriptCore/runtime/Structure.cpp:
|
||||
(JSC::Structure::flattenDictionaryStructure):
|
||||
|
||||
Canonical link: https://commits.webkit.org/267815.577@safari-7617-branch
|
||||
|
||||
Canonical link: https://commits.webkit.org/265870.632@safari-7616.2.9.10-branch
|
||||
---
|
||||
Source/JavaScriptCore/runtime/Structure.cpp | 28 +++++++++++++++------
|
||||
1 file changed, 21 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/Source/JavaScriptCore/runtime/Structure.cpp b/Source/JavaScriptCore/runtime/Structure.cpp
|
||||
index 2922e2478794c..9d094e2c8adc8 100644
|
||||
--- a/Source/JavaScriptCore/runtime/Structure.cpp
|
||||
+++ b/Source/JavaScriptCore/runtime/Structure.cpp
|
||||
@@ -913,17 +913,31 @@ Structure* Structure::flattenDictionaryStructure(VM& vm, JSObject* object)
|
||||
checkOffsetConsistency();
|
||||
ASSERT(isDictionary());
|
||||
ASSERT(object->structure() == this);
|
||||
-
|
||||
- GCSafeConcurrentJSLocker locker(m_lock, vm);
|
||||
-
|
||||
- object->setStructureIDDirectly(id().nuke());
|
||||
- WTF::storeStoreFence();
|
||||
|
||||
+ Locker<JSCellLock> cellLocker(NoLockingNecessary);
|
||||
+
|
||||
+ PropertyTable* table = nullptr;
|
||||
size_t beforeOutOfLineCapacity = this->outOfLineCapacity();
|
||||
+ size_t afterOutOfLineCapacity = beforeOutOfLineCapacity;
|
||||
if (isUncacheableDictionary()) {
|
||||
- PropertyTable* table = propertyTableOrNull();
|
||||
+ table = propertyTableOrNull();
|
||||
ASSERT(table);
|
||||
+ PropertyOffset maxOffset = invalidOffset;
|
||||
+ if (unsigned propertyCount = table->size())
|
||||
+ maxOffset = offsetForPropertyNumber(propertyCount - 1, m_inlineCapacity);
|
||||
+ afterOutOfLineCapacity = outOfLineCapacity(maxOffset);
|
||||
+ }
|
||||
|
||||
+ // This is the only case we shrink butterfly in this function. We should take a cell lock to protect against concurrent access to the butterfly.
|
||||
+ if (beforeOutOfLineCapacity != afterOutOfLineCapacity)
|
||||
+ cellLocker = Locker { object->cellLock() };
|
||||
+
|
||||
+ GCSafeConcurrentJSLocker locker(m_lock, vm);
|
||||
+
|
||||
+ object->setStructureIDDirectly(id().nuke());
|
||||
+ WTF::storeStoreFence();
|
||||
+
|
||||
+ if (isUncacheableDictionary()) {
|
||||
size_t propertyCount = table->size();
|
||||
|
||||
// Holds our values compacted by insertion order. This is OK since GC is deferred.
|
||||
@@ -955,7 +969,7 @@ Structure* Structure::flattenDictionaryStructure(VM& vm, JSObject* object)
|
||||
setDictionaryKind(NoneDictionaryKind);
|
||||
setHasBeenFlattenedBefore(true);
|
||||
|
||||
- size_t afterOutOfLineCapacity = this->outOfLineCapacity();
|
||||
+ ASSERT(this->outOfLineCapacity() == afterOutOfLineCapacity);
|
||||
|
||||
if (object->butterfly() && beforeOutOfLineCapacity != afterOutOfLineCapacity) {
|
||||
ASSERT(beforeOutOfLineCapacity > afterOutOfLineCapacity);
|
@ -0,0 +1,22 @@
|
||||
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
|
||||
index 523177737358..9e714851a503 100644
|
||||
--- a/Source/cmake/OptionsGTK.cmake
|
||||
+++ b/Source/cmake/OptionsGTK.cmake
|
||||
@@ -7,7 +7,7 @@ SET_PROJECT_VERSION(2 46 3)
|
||||
|
||||
set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string")
|
||||
|
||||
-find_package(Cairo 1.16.0 REQUIRED)
|
||||
+find_package(Cairo 1.14.0 REQUIRED)
|
||||
find_package(LibGcrypt 1.7.0 REQUIRED)
|
||||
find_package(Libtasn1 REQUIRED)
|
||||
find_package(HarfBuzz 1.4.2 REQUIRED COMPONENTS ICU)
|
||||
@@ -142,7 +142,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PERIODIC_MEMORY_MONITOR PRIVATE ON)
|
||||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_POINTER_LOCK PRIVATE ON)
|
||||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHAREABLE_RESOURCE PRIVATE ON)
|
||||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SPEECH_SYNTHESIS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
|
||||
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VARIATION_FONTS PRIVATE ON)
|
||||
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VARIATION_FONTS PRIVATE OFF)
|
||||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_API_STATISTICS PRIVATE ON)
|
||||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CODECS PRIVATE ON)
|
||||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
|
@ -0,0 +1,26 @@
|
||||
diff --git a/Source/ThirdParty/libsysprof-capture/CMakeLists.txt b/Source/ThirdParty/libsysprof-capture/CMakeLists.txt
|
||||
index 7ea8f0469ad7..13a9e390643a 100644
|
||||
--- a/Source/ThirdParty/libsysprof-capture/CMakeLists.txt
|
||||
+++ b/Source/ThirdParty/libsysprof-capture/CMakeLists.txt
|
||||
@@ -46,6 +46,7 @@ target_link_libraries(SysProfCapture
|
||||
|
||||
WEBKIT_ADD_TARGET_C_FLAGS(SysProfCapture
|
||||
-Wno-implicit-function-declaration
|
||||
+ -Wno-int-conversion
|
||||
-Wno-sign-compare
|
||||
-Wno-unused-parameter
|
||||
)
|
||||
diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake
|
||||
index f5ec0a55919b..cf307eac2775 100644
|
||||
--- a/Source/cmake/WebKitCompilerFlags.cmake
|
||||
+++ b/Source/cmake/WebKitCompilerFlags.cmake
|
||||
@@ -184,8 +184,7 @@ if (COMPILER_IS_GCC_OR_CLANG)
|
||||
-Wno-misleading-indentation
|
||||
-Wno-psabi)
|
||||
|
||||
- # GCC < 12.0 gives false warnings for mismatched-new-delete <https://webkit.org/b/241516>
|
||||
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0.0"))
|
||||
+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-mismatched-new-delete)
|
||||
WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-uninitialized)
|
||||
endif ()
|
@ -0,0 +1,14 @@
|
||||
diff --git a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
|
||||
index a2f3b582dcc5..1faf219c2adb 100644
|
||||
--- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
|
||||
+++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
|
||||
@@ -91,7 +91,8 @@ void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
|
||||
else {
|
||||
static bool once = false;
|
||||
if (!once) {
|
||||
- g_warning("WEBKIT_FORCE_SANDBOX no longer allows disabling the sandbox. Use WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1 instead.");
|
||||
+ if (g_strcmp0(g_get_prgname(), "evolution"))
|
||||
+ g_warning("WEBKIT_FORCE_SANDBOX no longer allows disabling the sandbox. Use WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1 instead.");
|
||||
once = true;
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
diff --git a/Tools/MiniBrowser/gtk/BrowserSettingsDialog.c b/Tools/MiniBrowser/gtk/BrowserSettingsDialog.c
|
||||
index ef000cd2b910..432c97257048 100644
|
||||
--- a/Tools/MiniBrowser/gtk/BrowserSettingsDialog.c
|
||||
+++ b/Tools/MiniBrowser/gtk/BrowserSettingsDialog.c
|
||||
@@ -175,11 +175,12 @@ static void featureTreeViewRenderStatusData(GtkTreeViewColumn *column, GtkCellRe
|
||||
{
|
||||
g_autoptr(WebKitFeature) feature = NULL;
|
||||
gtk_tree_model_get(model, iter, FEATURES_LIST_COLUMN_FEATURE, &feature, -1);
|
||||
- g_autoptr(GEnumClass) enumClass = g_type_class_ref(WEBKIT_TYPE_FEATURE_STATUS);
|
||||
+ GEnumClass *enumClass = g_type_class_ref(WEBKIT_TYPE_FEATURE_STATUS);
|
||||
g_object_set(renderer,
|
||||
"markup", NULL,
|
||||
"text", g_enum_get_value(enumClass, webkit_feature_get_status(feature))->value_nick,
|
||||
NULL);
|
||||
+ g_type_class_unref(enumClass);
|
||||
}
|
||||
|
||||
static void featureTreeViewRenderCategoryData(GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
|
||||
diff --git a/Tools/MiniBrowser/gtk/main.c b/Tools/MiniBrowser/gtk/main.c
|
||||
index 8be643a54151..ae82b41400b5 100644
|
||||
--- a/Tools/MiniBrowser/gtk/main.c
|
||||
+++ b/Tools/MiniBrowser/gtk/main.c
|
||||
@@ -273,7 +273,7 @@ static gboolean parseFeaturesOptionCallback(const gchar *option, const gchar *va
|
||||
"features, prefixes '-' and '!' disable features. Names are case-insensitive. Example:\n"
|
||||
"\n %s --features='!DirPseudo,+WebAnimationsCustomEffects,webgl'\n\n"
|
||||
"Available features (+/- = enabled/disabled by default):\n\n", g_get_prgname());
|
||||
- g_autoptr(GEnumClass) statusEnum = g_type_class_ref(WEBKIT_TYPE_FEATURE_STATUS);
|
||||
+ GEnumClass *statusEnum = g_type_class_ref(WEBKIT_TYPE_FEATURE_STATUS);
|
||||
for (gsize i = 0; i < webkit_feature_list_get_length(featureList); i++) {
|
||||
WebKitFeature *feature = webkit_feature_list_get(featureList, i);
|
||||
g_print(" %c %s (%s)",
|
||||
@@ -284,6 +284,7 @@ static gboolean parseFeaturesOptionCallback(const gchar *option, const gchar *va
|
||||
g_print(": %s", webkit_feature_get_name(feature));
|
||||
g_print("\n");
|
||||
}
|
||||
+ g_type_class_unref(statusEnum);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
diff --git a/glib-dep.patch b/glib-dep.patch
|
||||
new file mode 100644
|
||||
index 0000000..dbc0ab6
|
||||
--- /dev/null
|
||||
+++ b/glib-dep.patch
|
||||
@@ -0,0 +1,13 @@
|
||||
+diff --git a/Source/WTF/wtf/glib/Sandbox.cpp b/Source/WTF/wtf/glib/Sandbox.cpp
|
||||
+index 9b07bb8cb5a9b..a8169511fe851 100644
|
||||
+--- a/Source/WTF/wtf/glib/Sandbox.cpp
|
||||
++++ b/Source/WTF/wtf/glib/Sandbox.cpp
|
||||
+@@ -58,7 +58,7 @@ bool isInsideUnsupportedContainer()
|
||||
+ int waitStatus = 0;
|
||||
+ gboolean spawnSucceeded = g_spawn_sync(nullptr, const_cast<char**>(bwrapArgs), nullptr,
|
||||
+ G_SPAWN_STDERR_TO_DEV_NULL, nullptr, nullptr, nullptr, nullptr, &waitStatus, nullptr);
|
||||
+- supportedContainer = spawnSucceeded && g_spawn_check_wait_status(waitStatus, nullptr);
|
||||
++ supportedContainer = spawnSucceeded && g_spawn_check_exit_status(waitStatus, nullptr);
|
||||
+ if (!supportedContainer)
|
||||
+ WTFLogAlways("Bubblewrap does not work inside of this container, sandboxing will be disabled.");
|
||||
+ }
|
@ -1,57 +0,0 @@
|
||||
diff --git a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
|
||||
index a861b913ccfc..df21a1f67e98 100644
|
||||
--- a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
|
||||
+++ b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
|
||||
@@ -88,7 +88,25 @@ static void webKitGLVideoSinkConstructed(GObject* object)
|
||||
ASSERT(colorconvert);
|
||||
gst_bin_add_many(GST_BIN_CAST(sink), upload, colorconvert, sink->priv->appSink.get(), nullptr);
|
||||
|
||||
- GRefPtr<GstCaps> caps = adoptGRef(gst_caps_from_string("video/x-raw, format = (string) " GST_GL_CAPS_FORMAT));
|
||||
+ // Workaround until we can depend on GStreamer 1.16.2.
|
||||
+ // https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/8d32de090554cf29fe359f83aa46000ba658a693
|
||||
+ // Forcing a color conversion to RGBA here allows glupload to internally use
|
||||
+ // an uploader that adds a VideoMeta, through the TextureUploadMeta caps
|
||||
+ // feature, without needing the patch above. However this specific caps
|
||||
+ // feature is going to be removed from GStreamer so it is considered a
|
||||
+ // short-term workaround. This code path most likely will have a negative
|
||||
+ // performance impact on embedded platforms as well. Downstream embedders
|
||||
+ // are highly encouraged to cherry-pick the patch linked above in their BSP
|
||||
+ // and set the WEBKIT_GST_NO_RGBA_CONVERSION environment variable until
|
||||
+ // GStreamer 1.16.2 is released.
|
||||
+ // See also https://bugs.webkit.org/show_bug.cgi?id=201422
|
||||
+ GRefPtr<GstCaps> caps;
|
||||
+ if (webkitGstCheckVersion(1, 16, 2) || getenv("WEBKIT_GST_NO_RGBA_CONVERSION"))
|
||||
+ caps = adoptGRef(gst_caps_from_string("video/x-raw, format = (string) " GST_GL_CAPS_FORMAT));
|
||||
+ else {
|
||||
+ GST_INFO_OBJECT(sink, "Forcing RGBA as GStreamer is not new enough.");
|
||||
+ caps = adoptGRef(gst_caps_from_string("video/x-raw, format = (string) RGBA"));
|
||||
+ }
|
||||
gst_caps_set_features(caps.get(), 0, gst_caps_features_new(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr));
|
||||
g_object_set(sink->priv->appSink.get(), "caps", caps.get(), nullptr);
|
||||
|
||||
diff --git a/Source/cmake/GStreamerChecks.cmake b/Source/cmake/GStreamerChecks.cmake
|
||||
index ba8423e2795c..df9d3204910d 100644
|
||||
--- a/Source/cmake/GStreamerChecks.cmake
|
||||
+++ b/Source/cmake/GStreamerChecks.cmake
|
||||
@@ -36,7 +36,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
|
||||
list(APPEND GSTREAMER_COMPONENTS webrtc)
|
||||
endif ()
|
||||
|
||||
- find_package(GStreamer 1.16.2 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
|
||||
+ find_package(GStreamer 1.16.0 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
|
||||
|
||||
if (ENABLE_WEB_AUDIO)
|
||||
if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
|
||||
|
||||
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
|
||||
index 0b81e04559f0..4c6ae470e49f 100644
|
||||
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
|
||||
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
|
||||
@@ -479,7 +479,6 @@ bool MediaPlayerPrivateGStreamer::doSeek(const MediaTime& position, float rate)
|
||||
|
||||
auto seekStart = toGstClockTime(startTime);
|
||||
auto seekStop = toGstClockTime(endTime);
|
||||
- GST_DEBUG_OBJECT(pipeline(), "[Seek] Performing actual seek to %" GST_TIMEP_FORMAT " (endTime: %" GST_TIMEP_FORMAT ") at rate %f", &seekStart, &seekStop, rate);
|
||||
return gst_element_seek(m_pipeline.get(), rate, GST_FORMAT_TIME, m_seekFlags, GST_SEEK_TYPE_SET, seekStart, GST_SEEK_TYPE_SET, seekStop);
|
||||
}
|
||||
|
@ -0,0 +1,448 @@
|
||||
diff --git a/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp b/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
|
||||
index 51547b0226c0..2ab2d0c8688c 100644
|
||||
--- a/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
|
||||
+++ b/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
|
||||
@@ -124,7 +124,8 @@ AudioSourceProviderGStreamer::AudioSourceProviderGStreamer(MediaStreamTrackPriva
|
||||
g_signal_connect_swapped(decodebin, "pad-added", G_CALLBACK(+[](AudioSourceProviderGStreamer* provider, GstPad* pad) {
|
||||
auto padCaps = adoptGRef(gst_pad_query_caps(pad, nullptr));
|
||||
bool isAudio = doCapsHaveType(padCaps.get(), "audio");
|
||||
- RELEASE_ASSERT(isAudio);
|
||||
+ if (!isAudio)
|
||||
+ return;
|
||||
|
||||
auto sinkPad = adoptGRef(gst_element_get_static_pad(provider->m_audioSinkBin.get(), "sink"));
|
||||
gst_pad_link(pad, sinkPad.get());
|
||||
diff --git a/Source/WebCore/platform/graphics/gstreamer/DMABufUtilities.h b/Source/WebCore/platform/graphics/gstreamer/DMABufUtilities.h
|
||||
index da16adf3b556..7a78145f6228 100644
|
||||
--- a/Source/WebCore/platform/graphics/gstreamer/DMABufUtilities.h
|
||||
+++ b/Source/WebCore/platform/graphics/gstreamer/DMABufUtilities.h
|
||||
@@ -53,12 +53,6 @@ inline uint32_t dmaBufFourccValue(GstVideoFormat format)
|
||||
return uint32_t(DMABufFormat::FourCC::BGRA8888);
|
||||
case GST_VIDEO_FORMAT_ABGR:
|
||||
return uint32_t(DMABufFormat::FourCC::RGBA8888);
|
||||
- case GST_VIDEO_FORMAT_P010_10LE:
|
||||
- case GST_VIDEO_FORMAT_P010_10BE:
|
||||
- return uint32_t(DMABufFormat::FourCC::P010);
|
||||
- case GST_VIDEO_FORMAT_P016_LE:
|
||||
- case GST_VIDEO_FORMAT_P016_BE:
|
||||
- return uint32_t(DMABufFormat::FourCC::P016);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
diff --git a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
|
||||
index f8840e3e31e0..ce209d21fb69 100644
|
||||
--- a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
|
||||
+++ b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
|
||||
@@ -88,7 +88,19 @@ static void webKitGLVideoSinkConstructed(GObject* object)
|
||||
ASSERT(colorconvert);
|
||||
gst_bin_add_many(GST_BIN_CAST(sink), upload, colorconvert, sink->priv->appSink.get(), nullptr);
|
||||
|
||||
- GRefPtr<GstCaps> caps = adoptGRef(gst_caps_from_string("video/x-raw, format = (string) " GST_GL_CAPS_FORMAT));
|
||||
+ // Workaround until we can depend on GStreamer 1.16.2.
|
||||
+ // https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/8d32de090554cf29fe359f83aa46000ba658a693
|
||||
+ // Forcing a color conversion to RGBA here allows glupload to internally use
|
||||
+ // an uploader that adds a VideoMeta, through the TextureUploadMeta caps
|
||||
+ // feature, without needing the patch above. However this specific caps
|
||||
+ // feature is going to be removed from GStreamer so it is considered a
|
||||
+ // short-term workaround. This code path most likely will have a negative
|
||||
+ // performance impact on embedded platforms as well. Downstream embedders
|
||||
+ // are highly encouraged to cherry-pick the patch linked above in their BSP
|
||||
+ // and set the WEBKIT_GST_NO_RGBA_CONVERSION environment variable until
|
||||
+ // GStreamer 1.16.2 is released.
|
||||
+ // See also https://bugs.webkit.org/show_bug.cgi?id=201422
|
||||
+ GRefPtr<GstCaps> caps = adoptGRef(gst_caps_from_string("video/x-raw, format = (string) RGBA"));
|
||||
gst_caps_set_features(caps.get(), 0, gst_caps_features_new(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr));
|
||||
g_object_set(sink->priv->appSink.get(), "caps", caps.get(), nullptr);
|
||||
|
||||
@@ -186,12 +198,8 @@ static void webKitGLVideoSinkGetProperty(GObject* object, guint propertyId, GVal
|
||||
WebKitGLVideoSink* sink = WEBKIT_GL_VIDEO_SINK(object);
|
||||
|
||||
switch (propertyId) {
|
||||
- case PROP_STATS: {
|
||||
- GUniqueOutPtr<GstStructure> stats;
|
||||
- g_object_get(sink->priv->appSink.get(), "stats", &stats.outPtr(), nullptr);
|
||||
- gst_value_set_structure(value, stats.get());
|
||||
+ case PROP_STATS:
|
||||
break;
|
||||
- }
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, paramSpec);
|
||||
RELEASE_ASSERT_NOT_REACHED();
|
||||
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp
|
||||
index 8b30e0f14b6a..2d587f68a3b2 100644
|
||||
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp
|
||||
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp
|
||||
@@ -32,7 +32,7 @@ GST_DEBUG_CATEGORY_STATIC(webkit_media_gst_audio_mixer_debug);
|
||||
|
||||
bool GStreamerAudioMixer::isAvailable()
|
||||
{
|
||||
- return isGStreamerPluginAvailable("inter") && isGStreamerPluginAvailable("audiomixer");
|
||||
+ return false;
|
||||
}
|
||||
|
||||
GStreamerAudioMixer& GStreamerAudioMixer::singleton()
|
||||
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
|
||||
index a7392908eabd..4171e640de22 100644
|
||||
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
|
||||
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
|
||||
@@ -117,6 +117,24 @@ GstPad* webkitGstGhostPadFromStaticTemplate(GstStaticPadTemplate* staticPadTempl
|
||||
return pad;
|
||||
}
|
||||
|
||||
+#if !GST_CHECK_VERSION(1, 18, 0)
|
||||
+void webkitGstVideoFormatInfoComponent(const GstVideoFormatInfo* info, guint plane, gint components[GST_VIDEO_MAX_COMPONENTS])
|
||||
+{
|
||||
+ guint c, i = 0;
|
||||
+
|
||||
+ /* Reverse mapping of info->plane. */
|
||||
+ for (c = 0; c < GST_VIDEO_FORMAT_INFO_N_COMPONENTS(info); c++) {
|
||||
+ if (GST_VIDEO_FORMAT_INFO_PLANE(info, c) == plane) {
|
||||
+ components[i] = c;
|
||||
+ i++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (c = i; c < GST_VIDEO_MAX_COMPONENTS; c++)
|
||||
+ components[c] = -1;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#if ENABLE(VIDEO)
|
||||
bool getVideoSizeAndFormatFromCaps(const GstCaps* caps, WebCore::IntSize& size, GstVideoFormat& format, int& pixelAspectRatioNumerator, int& pixelAspectRatioDenominator, int& stride)
|
||||
{
|
||||
@@ -566,31 +584,6 @@ void deinitializeGStreamer()
|
||||
teardownVideoEncoderSingleton();
|
||||
teardownGStreamerImageDecoders();
|
||||
#endif
|
||||
-
|
||||
- bool isLeaksTracerActive = false;
|
||||
- auto activeTracers = gst_tracing_get_active_tracers();
|
||||
- while (activeTracers) {
|
||||
- auto tracer = adoptGRef(GST_TRACER_CAST(activeTracers->data));
|
||||
- if (!isLeaksTracerActive && !g_strcmp0(G_OBJECT_TYPE_NAME(G_OBJECT(tracer.get())), "GstLeaksTracer"))
|
||||
- isLeaksTracerActive = true;
|
||||
- activeTracers = g_list_delete_link(activeTracers, activeTracers);
|
||||
- }
|
||||
-
|
||||
- if (!isLeaksTracerActive)
|
||||
- return;
|
||||
-
|
||||
- // Make sure there is no active pipeline left. Those might trigger deadlocks during gst_deinit().
|
||||
- {
|
||||
- Locker locker { s_activePipelinesMapLock };
|
||||
- for (auto& pipeline : activePipelinesMap().values()) {
|
||||
- GST_DEBUG("Pipeline %" GST_PTR_FORMAT " was left running. Forcing clean-up.", pipeline.get());
|
||||
- disconnectSimpleBusMessageCallback(pipeline.get());
|
||||
- gst_element_set_state(pipeline.get(), GST_STATE_NULL);
|
||||
- }
|
||||
- activePipelinesMap().clear();
|
||||
- }
|
||||
-
|
||||
- gst_deinit();
|
||||
}
|
||||
|
||||
unsigned getGstPlayFlag(const char* nick)
|
||||
@@ -1239,6 +1232,36 @@ String gstStructureToJSONString(const GstStructure* structure)
|
||||
return value->toJSONString();
|
||||
}
|
||||
|
||||
+#if !GST_CHECK_VERSION(1, 18, 0)
|
||||
+GstClockTime webkitGstElementGetCurrentRunningTime(GstElement* element)
|
||||
+{
|
||||
+ g_return_val_if_fail(GST_IS_ELEMENT(element), GST_CLOCK_TIME_NONE);
|
||||
+
|
||||
+ auto baseTime = gst_element_get_base_time(element);
|
||||
+ if (!GST_CLOCK_TIME_IS_VALID(baseTime)) {
|
||||
+ GST_DEBUG_OBJECT(element, "Could not determine base time");
|
||||
+ return GST_CLOCK_TIME_NONE;
|
||||
+ }
|
||||
+
|
||||
+ auto clock = adoptGRef(gst_element_get_clock(element));
|
||||
+ if (!clock) {
|
||||
+ GST_DEBUG_OBJECT(element, "Element has no clock");
|
||||
+ return GST_CLOCK_TIME_NONE;
|
||||
+ }
|
||||
+
|
||||
+ auto clockTime = gst_clock_get_time(clock.get());
|
||||
+ if (!GST_CLOCK_TIME_IS_VALID(clockTime))
|
||||
+ return GST_CLOCK_TIME_NONE;
|
||||
+
|
||||
+ if (clockTime < baseTime) {
|
||||
+ GST_DEBUG_OBJECT(element, "Got negative current running time");
|
||||
+ return GST_CLOCK_TIME_NONE;
|
||||
+ }
|
||||
+
|
||||
+ return clockTime - baseTime;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
GstClockTime webkitGstInitTime()
|
||||
{
|
||||
return s_webkitGstInitTime;
|
||||
@@ -1296,6 +1319,7 @@ PlatformVideoColorSpace videoColorSpaceFromInfo(const GstVideoInfo& info)
|
||||
case GST_VIDEO_TRANSFER_BT709:
|
||||
colorSpace.transfer = PlatformVideoTransferCharacteristics::Bt709;
|
||||
break;
|
||||
+#if GST_CHECK_VERSION(1, 18, 0)
|
||||
case GST_VIDEO_TRANSFER_BT601:
|
||||
colorSpace.transfer = PlatformVideoTransferCharacteristics::Smpte170m;
|
||||
break;
|
||||
@@ -1308,6 +1332,7 @@ PlatformVideoColorSpace videoColorSpaceFromInfo(const GstVideoInfo& info)
|
||||
case GST_VIDEO_TRANSFER_BT2020_10:
|
||||
colorSpace.transfer = PlatformVideoTransferCharacteristics::Bt2020_10bit;
|
||||
break;
|
||||
+#endif
|
||||
case GST_VIDEO_TRANSFER_BT2020_12:
|
||||
colorSpace.transfer = PlatformVideoTransferCharacteristics::Bt2020_12bit;
|
||||
break;
|
||||
@@ -1426,6 +1451,7 @@ void fillVideoInfoColorimetryFromColorSpace(GstVideoInfo* info, const PlatformVi
|
||||
case PlatformVideoTransferCharacteristics::Bt709:
|
||||
GST_VIDEO_INFO_COLORIMETRY(info).transfer = GST_VIDEO_TRANSFER_BT709;
|
||||
break;
|
||||
+#if GST_CHECK_VERSION(1, 18, 0)
|
||||
case PlatformVideoTransferCharacteristics::Smpte170m:
|
||||
GST_VIDEO_INFO_COLORIMETRY(info).transfer = GST_VIDEO_TRANSFER_BT601;
|
||||
break;
|
||||
@@ -1438,6 +1464,7 @@ void fillVideoInfoColorimetryFromColorSpace(GstVideoInfo* info, const PlatformVi
|
||||
case PlatformVideoTransferCharacteristics::Bt2020_10bit:
|
||||
GST_VIDEO_INFO_COLORIMETRY(info).transfer = GST_VIDEO_TRANSFER_BT2020_10;
|
||||
break;
|
||||
+#endif
|
||||
case PlatformVideoTransferCharacteristics::Bt2020_12bit:
|
||||
GST_VIDEO_INFO_COLORIMETRY(info).transfer = GST_VIDEO_TRANSFER_BT2020_12;
|
||||
break;
|
||||
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
|
||||
index f9f42a940a58..766ebaf45b38 100644
|
||||
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
|
||||
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
|
||||
@@ -57,6 +57,15 @@ inline bool webkitGstCheckVersion(guint major, guint minor, guint micro)
|
||||
return true;
|
||||
}
|
||||
|
||||
+#if !GST_CHECK_VERSION(1, 18, 0)
|
||||
+// gst_video_format_info_component() is GStreamer 1.18 API, so for older versions we use a local
|
||||
+// vendored copy of the function.
|
||||
+#define GST_VIDEO_MAX_COMPONENTS 4
|
||||
+void webkitGstVideoFormatInfoComponent(const GstVideoFormatInfo*, guint, gint components[GST_VIDEO_MAX_COMPONENTS]);
|
||||
+#endif
|
||||
+
|
||||
+#define gst_video_format_info_component webkitGstVideoFormatInfoComponent
|
||||
+
|
||||
#define GST_VIDEO_CAPS_TYPE_PREFIX "video/"
|
||||
#define GST_AUDIO_CAPS_TYPE_PREFIX "audio/"
|
||||
#define GST_TEXT_CAPS_TYPE_PREFIX "text/"
|
||||
@@ -287,6 +296,13 @@ Vector<T> gstStructureGetArray(const GstStructure*, ASCIILiteral key);
|
||||
|
||||
String gstStructureToJSONString(const GstStructure*);
|
||||
|
||||
+#if !GST_CHECK_VERSION(1, 18, 0)
|
||||
+// gst_element_get_current_running_time() is GStreamer 1.18 API, so for older versions we use a local
|
||||
+// vendored copy of the function.
|
||||
+GstClockTime webkitGstElementGetCurrentRunningTime(GstElement*);
|
||||
+#define gst_element_get_current_running_time webkitGstElementGetCurrentRunningTime
|
||||
+#endif
|
||||
+
|
||||
GstClockTime webkitGstInitTime();
|
||||
|
||||
PlatformVideoColorSpace videoColorSpaceFromCaps(const GstCaps*);
|
||||
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
|
||||
index 9b30c5cfac68..012241d680e3 100644
|
||||
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
|
||||
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
|
||||
@@ -604,7 +604,6 @@ bool MediaPlayerPrivateGStreamer::doSeek(const SeekTarget& target, float rate)
|
||||
|
||||
auto seekStart = toGstClockTime(startTime);
|
||||
auto seekStop = toGstClockTime(endTime);
|
||||
- GST_DEBUG_OBJECT(pipeline(), "[Seek] Performing actual seek to %" GST_TIMEP_FORMAT " (endTime: %" GST_TIMEP_FORMAT ") at rate %f", &seekStart, &seekStop, rate);
|
||||
return gst_element_seek(m_pipeline.get(), rate, GST_FORMAT_TIME, m_seekFlags, GST_SEEK_TYPE_SET, seekStart, GST_SEEK_TYPE_SET, seekStop);
|
||||
}
|
||||
|
||||
@@ -4369,7 +4368,27 @@ GstElement* MediaPlayerPrivateGStreamer::createVideoSink()
|
||||
g_signal_connect_swapped(m_videoSink.get(), "repaint-cancelled", G_CALLBACK(repaintCancelledCallback), this);
|
||||
}
|
||||
|
||||
- return m_videoSink.get();
|
||||
+ GstElement* videoSink = nullptr;
|
||||
+ m_fpsSink = makeGStreamerElement("fpsdisplaysink", "sink");
|
||||
+ if (m_fpsSink) {
|
||||
+ g_object_set(m_fpsSink.get(), "silent", TRUE , nullptr);
|
||||
+
|
||||
+ // Turn off text overlay unless tracing is enabled.
|
||||
+ if (gst_debug_category_get_threshold(webkit_media_player_debug) < GST_LEVEL_TRACE)
|
||||
+ g_object_set(m_fpsSink.get(), "text-overlay", FALSE , nullptr);
|
||||
+
|
||||
+ if (gstObjectHasProperty(m_fpsSink.get(), "video-sink")) {
|
||||
+ g_object_set(m_fpsSink.get(), "video-sink", m_videoSink.get(), nullptr);
|
||||
+ videoSink = m_fpsSink.get();
|
||||
+ } else
|
||||
+ m_fpsSink = nullptr;
|
||||
+ }
|
||||
+
|
||||
+ if (!m_fpsSink)
|
||||
+ videoSink = m_videoSink.get();
|
||||
+
|
||||
+ ASSERT(videoSink);
|
||||
+ return videoSink;
|
||||
}
|
||||
|
||||
void MediaPlayerPrivateGStreamer::setStreamVolumeElement(GstStreamVolume* volume)
|
||||
@@ -4399,25 +4418,18 @@ void MediaPlayerPrivateGStreamer::setStreamVolumeElement(GstStreamVolume* volume
|
||||
|
||||
bool MediaPlayerPrivateGStreamer::updateVideoSinkStatistics()
|
||||
{
|
||||
- if (!m_videoSink)
|
||||
- return false;
|
||||
-
|
||||
- GUniqueOutPtr<GstStructure> stats;
|
||||
- g_object_get(m_videoSink.get(), "stats", &stats.outPtr(), nullptr);
|
||||
- if (!stats)
|
||||
+ if (!m_videoSink || !m_fpsSink)
|
||||
return false;
|
||||
|
||||
- auto totalVideoFrames = gstStructureGet<uint64_t>(stats.get(), "rendered"_s);
|
||||
- auto droppedVideoFrames = gstStructureGet<uint64_t>(stats.get(), "dropped"_s);
|
||||
-
|
||||
- if (!totalVideoFrames || !droppedVideoFrames)
|
||||
- return false;
|
||||
+ unsigned totalVideoFrames = 0;
|
||||
+ unsigned droppedVideoFrames = 0;
|
||||
+ g_object_get(m_fpsSink.get(), "frames-rendered", &totalVideoFrames, "frames-dropped", &droppedVideoFrames, nullptr);
|
||||
|
||||
// Caching is required so that metrics queries performed after EOS still return valid values.
|
||||
- if (*totalVideoFrames)
|
||||
- m_totalVideoFrames = *totalVideoFrames;
|
||||
- if (*droppedVideoFrames)
|
||||
- m_droppedVideoFrames = *droppedVideoFrames;
|
||||
+ if (totalVideoFrames)
|
||||
+ m_totalVideoFrames = totalVideoFrames;
|
||||
+ if (droppedVideoFrames)
|
||||
+ m_droppedVideoFrames = droppedVideoFrames;
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
|
||||
index 687bb4648aef..53f1f7ab3dc9 100644
|
||||
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
|
||||
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
|
||||
@@ -637,6 +637,7 @@ private:
|
||||
uint64_t m_networkReadPosition { 0 };
|
||||
mutable uint64_t m_readPositionAtLastDidLoadingProgress { 0 };
|
||||
|
||||
+ GRefPtr<GstElement> m_fpsSink { nullptr };
|
||||
uint64_t m_totalVideoFrames { 0 };
|
||||
uint64_t m_droppedVideoFrames { 0 };
|
||||
uint64_t m_decodedVideoFrames { 0 };
|
||||
diff --git a/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp b/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp
|
||||
index c701a84d2316..ec4c4b24347c 100644
|
||||
--- a/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp
|
||||
+++ b/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp
|
||||
@@ -256,7 +256,7 @@ static std::pair<GRefPtr<GstCaps>, GRefPtr<GstCaps>> vpxCapsFromCodecString(cons
|
||||
else if (transfer == VPConfigurationTransferCharacteristics::BT_470_7_BG)
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_GAMMA28;
|
||||
else if (transfer == VPConfigurationTransferCharacteristics::BT_601_7)
|
||||
- GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_BT601;
|
||||
+ GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
else if (transfer == VPConfigurationTransferCharacteristics::SMPTE_ST_240)
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_SMPTE240M;
|
||||
else if (transfer == VPConfigurationTransferCharacteristics::Linear)
|
||||
@@ -271,16 +271,16 @@ static std::pair<GRefPtr<GstCaps>, GRefPtr<GstCaps>> vpxCapsFromCodecString(cons
|
||||
GST_WARNING("VPConfigurationTransferCharacteristics::IEC_61966_2_1 not supported");
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
} else if (transfer == VPConfigurationTransferCharacteristics::BT_2020_10bit)
|
||||
- GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_BT2020_10;
|
||||
+ GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
else if (transfer == VPConfigurationTransferCharacteristics::BT_2020_12bit)
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_BT2020_12;
|
||||
else if (transfer == VPConfigurationTransferCharacteristics::SMPTE_ST_2084)
|
||||
- GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_SMPTE2084;
|
||||
+ GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
else if (transfer == VPConfigurationTransferCharacteristics::SMPTE_ST_428_1) {
|
||||
GST_WARNING("VPConfigurationTransferCharacteristics::SMPTE_ST_428_1 not supported");
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
} else if (transfer == VPConfigurationTransferCharacteristics::BT_2100_HLG)
|
||||
- GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_ARIB_STD_B67;
|
||||
+ GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
|
||||
auto matrix = parameters->matrixCoefficients;
|
||||
if (matrix == VPConfigurationMatrixCoefficients::Identity)
|
||||
@@ -421,7 +421,7 @@ static std::pair<GRefPtr<GstCaps>, GRefPtr<GstCaps>> av1CapsFromCodecString(cons
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_GAMMA28;
|
||||
break;
|
||||
case AV1ConfigurationTransferCharacteristics::BT_601_7:
|
||||
- GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_BT601;
|
||||
+ GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
break;
|
||||
case AV1ConfigurationTransferCharacteristics::SMPTE_ST_240:
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_SMPTE240M;
|
||||
@@ -445,20 +445,20 @@ static std::pair<GRefPtr<GstCaps>, GRefPtr<GstCaps>> av1CapsFromCodecString(cons
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
break;
|
||||
case AV1ConfigurationTransferCharacteristics::BT_2020_10bit:
|
||||
- GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_BT2020_10;
|
||||
+ GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
break;
|
||||
case AV1ConfigurationTransferCharacteristics::BT_2020_12bit:
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_BT2020_12;
|
||||
break;
|
||||
case AV1ConfigurationTransferCharacteristics::SMPTE_ST_2084:
|
||||
- GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_SMPTE2084;
|
||||
+ GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
break;
|
||||
case AV1ConfigurationTransferCharacteristics::SMPTE_ST_428_1:
|
||||
GST_WARNING("AV1ConfigurationTransferCharacteristics::SMPTE_ST_428_1 not supported");
|
||||
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
break;
|
||||
case AV1ConfigurationTransferCharacteristics::BT_2100_HLG:
|
||||
- GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_ARIB_STD_B67;
|
||||
+ GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
||||
break;
|
||||
};
|
||||
|
||||
diff --git a/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp b/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
|
||||
index 655115564aa2..82204d5ff6d4 100644
|
||||
--- a/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
|
||||
+++ b/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
|
||||
@@ -754,7 +754,9 @@ static void webkit_video_encoder_class_init(WebKitVideoEncoderClass* klass)
|
||||
gst_util_set_object_arg(G_OBJECT(encoder), "end-usage", "cq");
|
||||
break;
|
||||
};
|
||||
- }, [](GstElement* encoder, const WebKitVideoEncoderBitRateAllocation& bitRateAllocation) {
|
||||
+ }
|
||||
+#if 0
|
||||
+ , [](GstElement* encoder, const WebKitVideoEncoderBitRateAllocation& bitRateAllocation) {
|
||||
// Allow usage of deprecated GValueArray API.
|
||||
ALLOW_DEPRECATED_DECLARATIONS_BEGIN;
|
||||
GUniquePtr<GValueArray> bitrates(g_value_array_new(3));
|
||||
@@ -887,7 +889,9 @@ static void webkit_video_encoder_class_init(WebKitVideoEncoderClass* klass)
|
||||
}
|
||||
|
||||
ALLOW_DEPRECATED_DECLARATIONS_END;
|
||||
- });
|
||||
+ }
|
||||
+#endif
|
||||
+ );
|
||||
|
||||
Encoders::registerEncoder(Vp9, "vp9enc"_s, nullptr, "video/x-vp9"_s, nullptr,
|
||||
[&](WebKitVideoEncoder* self) {
|
||||
diff --git a/Source/cmake/GStreamerChecks.cmake b/Source/cmake/GStreamerChecks.cmake
|
||||
index 63f183fa6e30..f26a924e9d02 100644
|
||||
--- a/Source/cmake/GStreamerChecks.cmake
|
||||
+++ b/Source/cmake/GStreamerChecks.cmake
|
||||
@@ -1,7 +1,7 @@
|
||||
if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
|
||||
SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
|
||||
if (USE_GSTREAMER_FULL)
|
||||
- find_package(GStreamer 1.18.4 REQUIRED COMPONENTS full)
|
||||
+ find_package(GStreamer 1.16.1 REQUIRED COMPONENTS full)
|
||||
if (NOT PC_GSTREAMER_FULL_FOUND)
|
||||
message(FATAL_ERROR "GStreamer static library libgstreamer-full-1.0 not found")
|
||||
else ()
|
||||
@@ -25,7 +25,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
|
||||
list(APPEND GSTREAMER_COMPONENTS webrtc)
|
||||
endif ()
|
||||
|
||||
- find_package(GStreamer 1.18.4 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
|
||||
+ find_package(GStreamer 1.16.1 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
|
||||
|
||||
if (ENABLE_WEB_AUDIO)
|
||||
if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
|
@ -0,0 +1,26 @@
|
||||
diff --git a/Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp b/Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp
|
||||
index 8bc21b21976c..68654f602c92 100644
|
||||
--- a/Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp
|
||||
+++ b/Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp
|
||||
@@ -101,9 +101,10 @@ static HbUniquePtr<hb_face_t> createHarfBuzzFace(SkTypeface& typeface)
|
||||
HbUniquePtr<hb_blob_t> blob(hb_blob_create(reinterpret_cast<const char*>(memory), size, HB_MEMORY_MODE_READONLY, stream.release(), [](void* data) {
|
||||
delete reinterpret_cast<SkStreamAsset*>(data);
|
||||
}));
|
||||
- auto faceCount = hb_face_count(blob.get());
|
||||
- if (faceCount && static_cast<unsigned>(index) < faceCount)
|
||||
- return HbUniquePtr<hb_face_t>(hb_face_create(blob.get(), index));
|
||||
+ HbUniquePtr<hb_face_t> result(hb_face_create(blob.get(), index));
|
||||
+ HbUniquePtr<hb_face_t> empty(hb_face_get_empty());
|
||||
+ if (result.get() != empty.get())
|
||||
+ return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,6 +127,7 @@ SkiaHarfBuzzFont::SkiaHarfBuzzFont(SkTypeface& typeface)
|
||||
{
|
||||
auto hbFace = createHarfBuzzFace(typeface);
|
||||
HbUniquePtr<hb_font_t> hbFont(hb_font_create(hbFace.get()));
|
||||
+ hb_ot_font_set_funcs(hbFont.get());
|
||||
|
||||
if (int axisCount = typeface.getVariationDesignPosition(nullptr, 0)) {
|
||||
Vector<SkFontArguments::VariationPosition::Coordinate> axisValues(axisCount);
|
@ -0,0 +1,13 @@
|
||||
diff --git a/Source/ThirdParty/ANGLE/src/common/mathutil.h b/Source/ThirdParty/ANGLE/src/common/mathutil.h
|
||||
index 8f4579dc5611..4d981d4427bc 100644
|
||||
--- a/Source/ThirdParty/ANGLE/src/common/mathutil.h
|
||||
+++ b/Source/ThirdParty/ANGLE/src/common/mathutil.h
|
||||
@@ -550,7 +550,7 @@ inline R roundToNearest(T input)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value);
|
||||
static_assert(std::numeric_limits<R>::is_integer);
|
||||
-#if defined(__aarch64__) || defined(_M_ARM64)
|
||||
+#if defined(__aarch64__) || defined(_M_ARM64) || defined(__s390x__)
|
||||
// On armv8, this expression is compiled to a dedicated round-to-nearest instruction
|
||||
return static_cast<R>(std::round(input));
|
||||
#else
|
@ -1,6 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iF0EABEDAB0WIQTX/PYc+aLeqzHYG9Pz0yLQ7EWCwwUCZMjRYQAKCRDz0yLQ7EWC
|
||||
wwPPAJ0XUmEmSr4IFQWpbDfPOR9keXY+lwCfVLyOFL8T55psriGN4vkxVZqq+EM=
|
||||
=nGCs
|
||||
-----END PGP SIGNATURE-----
|
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEAToBJ6ycZbNP+mJSbBAJtpOXU5MFAmciLBQACgkQbBAJtpOX
|
||||
U5MFsBAAqwUuPEkirbQXxESAu8nJKUG3RVa4y3c1NaTRETW19cy/32KeiBlxbWW5
|
||||
UKF2gKlu5B+mJn9f0hebYBUkqr6HdWO1JnBz3XNXZ7dNObTWlN9g4T6tlqsxAdsk
|
||||
B04ddWFQKYQJ4pMLjlxVFkFXQ0vh9UywBwUyGXrqg9yo2OcSGpsqdujyZfdlWrHc
|
||||
0kDLow9SYM5XhkzFoQxKlYsVg1vhzpTxDuv39JqVTGHlX8pEplpCsrMwpVQ+89aP
|
||||
zv64u/xnPAEsN4wGeB0QyH6H0llukTmrgWUfoRqeDLHMGAeuHe1yONGyK5fWA1u+
|
||||
ABTsjVnh5nOQxUZaNc3dpMdUcrp+kVhjKDwMOhKNbfVoLWxchmU5VvrCoytRAX8i
|
||||
4js2xOgnMk26cNB4dZsMg9cYH4Zr+nkfkjGljGXRSvexF8iBUc2Dv0scrtDh3ArI
|
||||
aWk4eMyO5nRPIFWE6j5d+sAm1TF1hGMW33beYOTy5Iqm2l2inRoaxGdAz2ZFjF5S
|
||||
xcjG7tT3+pG8WXPhJ0Tl41mPJKg79tY3F0uzSedtJ+J3q4uRKORFOdChtDbqHHT7
|
||||
mI0jT6rrGckXlncufvg19RiCnmP8vmZEyeuTZja6vBsV3pA7Uc/IWcWEXi9ip/om
|
||||
grjX+68/ypghS571sFxrjQaNdqrO0fwMrJBZxhgelJKnykvoj2Y=
|
||||
=wug0
|
||||
-----END PGP SIGNATURE-----
|
@ -0,0 +1,25 @@
|
||||
diff --git a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp
|
||||
index 1a0cd1de5078..8c4e0e378f11 100644
|
||||
--- a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp
|
||||
+++ b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp
|
||||
@@ -246,7 +246,7 @@ void WebSocketTask::sendString(std::span<const uint8_t> utf8, CompletionHandler<
|
||||
GRefPtr<GBytes> bytes = adoptGRef(g_bytes_new_static(utf8.data(), utf8.size()));
|
||||
soup_websocket_connection_send_message(m_connection.get(), SOUP_WEBSOCKET_DATA_TEXT, bytes.get());
|
||||
#else
|
||||
- soup_websocket_connection_send_text(m_connection.get(), CString(reinterpret_cast<const char*>(utf8.data()), utf8.size()).data());
|
||||
+ soup_websocket_connection_send_text(m_connection.get(), CString(utf8).data());
|
||||
#endif
|
||||
}
|
||||
callback();
|
||||
diff --git a/Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp b/Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp
|
||||
index 89382a72d9c1..60f5fdedf0e0 100644
|
||||
--- a/Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp
|
||||
+++ b/Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp
|
||||
@@ -156,7 +156,7 @@ void RemoteInspectorHTTPServer::sendMessageToFrontend(uint64_t connectionID, uin
|
||||
GRefPtr<GBytes> bytes = adoptGRef(g_bytes_new_static(utf8.data(), utf8.length()));
|
||||
soup_websocket_connection_send_message(webSocketConnection, SOUP_WEBSOCKET_DATA_TEXT, bytes.get());
|
||||
#else
|
||||
- soup_websocket_connection_send_text(webSocketConnection, CString(reinterpret_cast<const char*>(utf8.data()), utf8.length()).data());
|
||||
+ soup_websocket_connection_send_text(webSocketConnection, CString(utf8).data());
|
||||
#endif
|
||||
}
|
Loading…
Reference in new issue