-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Igalia:main' into fix/commercial-license
- Loading branch information
Showing
6 changed files
with
1,311 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 132 additions & 0 deletions
132
...owser/webkitgtk/webkitgtk/0001-Build-fixes-for-gbm-disabled-and-release-logs-disabl.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
From bfb9d664b19813a407d5a0eaf477c28cdf96d850 Mon Sep 17 00:00:00 2001 | ||
From: Philippe Normand <[email protected]> | ||
Date: Wed, 27 Nov 2024 07:20:41 -0800 | ||
Subject: [PATCH] Build fixes for gbm disabled and release logs disabled | ||
https://bugs.webkit.org/show_bug.cgi?id=283750 | ||
|
||
Reviewed by Michael Catanzaro. | ||
|
||
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp: | ||
(WebCore::PeerConnectionBackend::PeerConnectionBackend): | ||
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.h: | ||
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp: | ||
(WebCore::GStreamerMediaEndpoint::startRTCLogs): | ||
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp: | ||
* Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h: | ||
* Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp: | ||
(WKWPE::ViewPlatform::ViewPlatform): | ||
|
||
Canonical link: https://commits.webkit.org/287124@main | ||
|
||
Upstream-Status: Backport [https://commits.webkit.org/287124@main] | ||
--- | ||
.../WebCore/Modules/mediastream/PeerConnectionBackend.cpp | 4 ++++ | ||
.../WebCore/Modules/mediastream/PeerConnectionBackend.h | 2 +- | ||
.../mediastream/gstreamer/GStreamerMediaEndpoint.cpp | 2 ++ | ||
.../platform/graphics/gstreamer/GStreamerCommon.cpp | 8 ++++---- | ||
.../graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h | 3 ++- | ||
5 files changed, 13 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp | ||
index d6bb7ef7..d9c85af5 100644 | ||
--- a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp | ||
+++ b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp | ||
@@ -165,6 +165,10 @@ PeerConnectionBackend::PeerConnectionBackend(RTCPeerConnection& peerConnection) | ||
m_shouldFilterICECandidates = page->webRTCProvider().isSupportingMDNS(); | ||
#endif | ||
|
||
+#if RELEASE_LOG_DISABLED | ||
+ m_logIdentifierString = makeString(hex(reinterpret_cast<uintptr_t>(this))); | ||
+#endif | ||
+ | ||
#if !RELEASE_LOG_DISABLED && (PLATFORM(WPE) || PLATFORM(GTK)) | ||
m_jsonFilePath = String::fromUTF8(getenv("WEBKIT_WEBRTC_JSON_EVENTS_FILE")); | ||
if (!m_jsonFilePath.isEmpty()) | ||
diff --git a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h | ||
index e0615025..cd7912df 100644 | ||
--- a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h | ||
+++ b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h | ||
@@ -281,8 +281,8 @@ private: | ||
#if !RELEASE_LOG_DISABLED | ||
Ref<const Logger> m_logger; | ||
const void* m_logIdentifier; | ||
- String m_logIdentifierString; | ||
#endif | ||
+ String m_logIdentifierString; | ||
bool m_finishedGatheringCandidates { false }; | ||
bool m_isProcessingLocalDescriptionAnswer { false }; | ||
|
||
diff --git a/Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp b/Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp | ||
index deb6281f..e678b04e 100644 | ||
--- a/Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp | ||
+++ b/Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp | ||
@@ -2228,7 +2228,9 @@ std::optional<bool> GStreamerMediaEndpoint::canTrickleIceCandidates() const | ||
void GStreamerMediaEndpoint::startRTCLogs() | ||
{ | ||
m_isGatheringRTCLogs = true; | ||
+#if !RELEASE_LOG_DISABLED | ||
startLoggingStats(); | ||
+#endif | ||
} | ||
|
||
void GStreamerMediaEndpoint::stopRTCLogs() | ||
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp | ||
index 812a1f6a..1d83f3b2 100644 | ||
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp | ||
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp | ||
@@ -1726,7 +1726,7 @@ void gstStructureFilterAndMapInPlace(GstStructure* structure, Function<bool(GstI | ||
#endif | ||
} | ||
|
||
-#if !GST_CHECK_VERSION(1, 24, 0) | ||
+#if USE(GBM) && !GST_CHECK_VERSION(1, 24, 0) | ||
static GstVideoFormat drmFourccToGstVideoFormat(uint32_t fourcc) | ||
{ | ||
switch (fourcc) { | ||
@@ -1761,7 +1761,7 @@ static GstVideoFormat drmFourccToGstVideoFormat(uint32_t fourcc) | ||
RELEASE_ASSERT_NOT_REACHED(); | ||
return GST_VIDEO_FORMAT_UNKNOWN; | ||
} | ||
-#endif // !GST_CHECK_VERSION(1, 24, 0) | ||
+#endif // USE(GBM) && !GST_CHECK_VERSION(1, 24, 0) | ||
|
||
#if USE(GBM) | ||
GRefPtr<GstCaps> buildDMABufCaps() | ||
@@ -1805,7 +1805,7 @@ GRefPtr<GstCaps> buildDMABufCaps() | ||
gst_value_list_append_and_take_value(&supportedFormats, &value); | ||
} | ||
} | ||
-#else | ||
+#elif USE(GBM) | ||
GValue value = G_VALUE_INIT; | ||
g_value_init(&value, G_TYPE_STRING); | ||
g_value_set_string(&value, gst_video_format_to_string(drmFourccToGstVideoFormat(format.fourcc))); | ||
@@ -1815,7 +1815,7 @@ GRefPtr<GstCaps> buildDMABufCaps() | ||
|
||
#if GST_CHECK_VERSION(1, 24, 0) | ||
gst_caps_set_value(caps.get(), "drm-format", &supportedFormats); | ||
-#else | ||
+#elif USE(GBM) | ||
gst_caps_set_value(caps.get(), "format", &supportedFormats); | ||
#endif | ||
g_value_unset(&supportedFormats); | ||
diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h | ||
index 701a300d..5264b32a 100644 | ||
--- a/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h | ||
+++ b/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h | ||
@@ -93,13 +93,14 @@ private: | ||
#if !RELEASE_LOG_DISABLED | ||
Ref<const Logger> m_logger; | ||
const void* m_logIdentifier; | ||
+#endif | ||
+ | ||
uint64_t m_nextSourceBufferID { 0 }; | ||
|
||
// Stores known track IDs, so we can work around ID collisions between multiple source buffers. | ||
// The registry is placed here to enforce ID uniqueness specifically by player, not by process, | ||
// since its not an issue if multiple players use the same ID, and we want to preserve IDs as much as possible. | ||
HashSet<TrackID, WTF::IntHash<TrackID>, WTF::UnsignedWithZeroKeyHashTraits<TrackID>> m_trackIdRegistry; | ||
-#endif | ||
}; | ||
|
||
} // namespace WebCore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
150 changes: 150 additions & 0 deletions
150
...owser/wpewebkit/wpewebkit/0006-WPE-GTK-Build-fixes-for-gbm-disabled-and-release-log.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
From 6802852a0e5caaa1f8bac5813e18309e169d7751 Mon Sep 17 00:00:00 2001 | ||
From: Philippe Normand <[email protected]> | ||
Date: Wed, 27 Nov 2024 07:20:41 -0800 | ||
Subject: [PATCH] [WPE][GTK] Build fixes for gbm disabled and release logs | ||
disabled https://bugs.webkit.org/show_bug.cgi?id=283750 | ||
|
||
Reviewed by Michael Catanzaro. | ||
|
||
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp: | ||
(WebCore::PeerConnectionBackend::PeerConnectionBackend): | ||
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.h: | ||
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp: | ||
(WebCore::GStreamerMediaEndpoint::startRTCLogs): | ||
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp: | ||
* Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h: | ||
* Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp: | ||
(WKWPE::ViewPlatform::ViewPlatform): | ||
|
||
Canonical link: https://commits.webkit.org/287124@main | ||
|
||
Upstream-Status: Backport [https://commits.webkit.org/287124@main] | ||
--- | ||
.../WebCore/Modules/mediastream/PeerConnectionBackend.cpp | 4 ++++ | ||
.../WebCore/Modules/mediastream/PeerConnectionBackend.h | 2 +- | ||
.../mediastream/gstreamer/GStreamerMediaEndpoint.cpp | 2 ++ | ||
.../platform/graphics/gstreamer/GStreamerCommon.cpp | 8 ++++---- | ||
.../graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h | 3 ++- | ||
Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp | 2 ++ | ||
6 files changed, 15 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp | ||
index d6bb7ef7..d9c85af5 100644 | ||
--- a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp | ||
+++ b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp | ||
@@ -165,6 +165,10 @@ PeerConnectionBackend::PeerConnectionBackend(RTCPeerConnection& peerConnection) | ||
m_shouldFilterICECandidates = page->webRTCProvider().isSupportingMDNS(); | ||
#endif | ||
|
||
+#if RELEASE_LOG_DISABLED | ||
+ m_logIdentifierString = makeString(hex(reinterpret_cast<uintptr_t>(this))); | ||
+#endif | ||
+ | ||
#if !RELEASE_LOG_DISABLED && (PLATFORM(WPE) || PLATFORM(GTK)) | ||
m_jsonFilePath = String::fromUTF8(getenv("WEBKIT_WEBRTC_JSON_EVENTS_FILE")); | ||
if (!m_jsonFilePath.isEmpty()) | ||
diff --git a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h | ||
index e0615025..cd7912df 100644 | ||
--- a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h | ||
+++ b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h | ||
@@ -281,8 +281,8 @@ private: | ||
#if !RELEASE_LOG_DISABLED | ||
Ref<const Logger> m_logger; | ||
const void* m_logIdentifier; | ||
- String m_logIdentifierString; | ||
#endif | ||
+ String m_logIdentifierString; | ||
bool m_finishedGatheringCandidates { false }; | ||
bool m_isProcessingLocalDescriptionAnswer { false }; | ||
|
||
diff --git a/Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp b/Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp | ||
index deb6281f..e678b04e 100644 | ||
--- a/Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp | ||
+++ b/Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp | ||
@@ -2228,7 +2228,9 @@ std::optional<bool> GStreamerMediaEndpoint::canTrickleIceCandidates() const | ||
void GStreamerMediaEndpoint::startRTCLogs() | ||
{ | ||
m_isGatheringRTCLogs = true; | ||
+#if !RELEASE_LOG_DISABLED | ||
startLoggingStats(); | ||
+#endif | ||
} | ||
|
||
void GStreamerMediaEndpoint::stopRTCLogs() | ||
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp | ||
index 812a1f6a..1d83f3b2 100644 | ||
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp | ||
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp | ||
@@ -1726,7 +1726,7 @@ void gstStructureFilterAndMapInPlace(GstStructure* structure, Function<bool(GstI | ||
#endif | ||
} | ||
|
||
-#if !GST_CHECK_VERSION(1, 24, 0) | ||
+#if USE(GBM) && !GST_CHECK_VERSION(1, 24, 0) | ||
static GstVideoFormat drmFourccToGstVideoFormat(uint32_t fourcc) | ||
{ | ||
switch (fourcc) { | ||
@@ -1761,7 +1761,7 @@ static GstVideoFormat drmFourccToGstVideoFormat(uint32_t fourcc) | ||
RELEASE_ASSERT_NOT_REACHED(); | ||
return GST_VIDEO_FORMAT_UNKNOWN; | ||
} | ||
-#endif // !GST_CHECK_VERSION(1, 24, 0) | ||
+#endif // USE(GBM) && !GST_CHECK_VERSION(1, 24, 0) | ||
|
||
#if USE(GBM) | ||
GRefPtr<GstCaps> buildDMABufCaps() | ||
@@ -1805,7 +1805,7 @@ GRefPtr<GstCaps> buildDMABufCaps() | ||
gst_value_list_append_and_take_value(&supportedFormats, &value); | ||
} | ||
} | ||
-#else | ||
+#elif USE(GBM) | ||
GValue value = G_VALUE_INIT; | ||
g_value_init(&value, G_TYPE_STRING); | ||
g_value_set_string(&value, gst_video_format_to_string(drmFourccToGstVideoFormat(format.fourcc))); | ||
@@ -1815,7 +1815,7 @@ GRefPtr<GstCaps> buildDMABufCaps() | ||
|
||
#if GST_CHECK_VERSION(1, 24, 0) | ||
gst_caps_set_value(caps.get(), "drm-format", &supportedFormats); | ||
-#else | ||
+#elif USE(GBM) | ||
gst_caps_set_value(caps.get(), "format", &supportedFormats); | ||
#endif | ||
g_value_unset(&supportedFormats); | ||
diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h | ||
index 701a300d..5264b32a 100644 | ||
--- a/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h | ||
+++ b/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h | ||
@@ -93,13 +93,14 @@ private: | ||
#if !RELEASE_LOG_DISABLED | ||
Ref<const Logger> m_logger; | ||
const void* m_logIdentifier; | ||
+#endif | ||
+ | ||
uint64_t m_nextSourceBufferID { 0 }; | ||
|
||
// Stores known track IDs, so we can work around ID collisions between multiple source buffers. | ||
// The registry is placed here to enforce ID uniqueness specifically by player, not by process, | ||
// since its not an issue if multiple players use the same ID, and we want to preserve IDs as much as possible. | ||
HashSet<TrackID, WTF::IntHash<TrackID>, WTF::UnsignedWithZeroKeyHashTraits<TrackID>> m_trackIdRegistry; | ||
-#endif | ||
}; | ||
|
||
} // namespace WebCore | ||
diff --git a/Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp b/Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp | ||
index 7ecf6015..b516f4b8 100644 | ||
--- a/Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp | ||
+++ b/Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp | ||
@@ -118,10 +118,12 @@ ViewPlatform::ViewPlatform(WPEDisplay* display, const API::PageConfiguration& co | ||
auto& webView = *reinterpret_cast<ViewPlatform*>(userData); | ||
webView.toplevelStateChanged(previousState, wpe_view_get_toplevel_state(view)); | ||
}), this); | ||
+#if USE(GBM) | ||
g_signal_connect(m_wpeView.get(), "preferred-dma-buf-formats-changed", G_CALLBACK(+[](WPEView*, gpointer userData) { | ||
auto& webView = *reinterpret_cast<ViewPlatform*>(userData); | ||
webView.page().preferredBufferFormatsDidChange(); | ||
}), this); | ||
+#endif | ||
|
||
createWebPage(configuration); | ||
m_pageProxy->setIntrinsicDeviceScaleFactor(wpe_view_get_scale(m_wpeView.get())); |
Oops, something went wrong.