[staging-next] chromium: fix build with Pipewire 1.4 (#388387)

This commit is contained in:
K900
2025-03-09 14:02:28 +03:00
committed by GitHub
2 changed files with 23 additions and 0 deletions
@@ -445,6 +445,9 @@ let
./patches/cross-compile.patch
# Optional patch to use SOURCE_DATE_EPOCH in compute_build_timestamp.py (should be upstreamed):
./patches/no-build-timestamps.patch
# Fix build with Pipewire 1.4
# Submitted upstream: https://webrtc-review.googlesource.com/c/src/+/380500
./patches/webrtc-pipewire-1.4.patch
]
++ lib.optionals (packageName == "chromium") [
# This patch is limited to chromium and ungoogled-chromium because electron-source sets
@@ -0,0 +1,20 @@
--- a/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
+++ b/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
@@ -87,7 +87,7 @@ PipeWireNode::PipeWireNode(PipeWireSession* session,
.param = OnNodeParam,
};
- pw_node_add_listener(proxy_, &node_listener_, &node_events, this);
+ pw_node_add_listener(reinterpret_cast<pw_node*>(proxy_), &node_listener_, &node_events, this);
}
// static
@@ -119,7 +119,7 @@ void PipeWireNode::OnNodeInfo(void* data, const pw_node_info* info) {
uint32_t id = info->params[i].id;
if (id == SPA_PARAM_EnumFormat &&
info->params[i].flags & SPA_PARAM_INFO_READ) {
- pw_node_enum_params(that->proxy_, 0, id, 0, UINT32_MAX, nullptr);
+ pw_node_enum_params(reinterpret_cast<pw_node*>(that->proxy_), 0, id, 0, UINT32_MAX, nullptr);
break;
}
}