From: Jan Grulich Date: Mon, 24 Mar 2025 10:37:00 +0000 Subject: Bug 1953080 - WebRTC backport: Fix build with Pipewire 1.4 r=pehrsons,webrtc-reviewers Pipewire 1.4 changed some functions from taking void* to taking the actual type they expect, which makes some code that built with 1.2 no longer build with 1.4. For older versions, this is effectively a no-op. This is a simple backport of an WebRTC upstream change. Upstream commit: 0a9787897f3d36055130b0532967d31c31e8408f Differential Revision: https://phabricator.services.mozilla.com/D241023 Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/4662f430e6c0e6312ac7a0a8b7d06844d88515b7 --- AUTHORS | 1 + modules/video_capture/linux/pipewire_session.cc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 5698ada0fe..4fb9455791 100644 --- a/AUTHORS +++ b/AUTHORS @@ -63,6 +63,7 @@ Hans Knoechel Helmut Januschka Hugues Ekra Hyungjoo Na +Ilya Katsnelson Jake Hilton James H. Brown Jan Grulich diff --git a/modules/video_capture/linux/pipewire_session.cc b/modules/video_capture/linux/pipewire_session.cc index b58ea755c6..6e7e407358 100644 --- a/modules/video_capture/linux/pipewire_session.cc +++ b/modules/video_capture/linux/pipewire_session.cc @@ -88,7 +88,7 @@ PipeWireNode::PipeWireNode(PipeWireSession* session, .param = OnNodeParam, }; - pw_node_add_listener(proxy_, &node_listener_, &node_events, this); + pw_node_add_listener(reinterpret_cast(proxy_), &node_listener_, &node_events, this); } // static @@ -120,7 +120,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(that->proxy_), 0, id, 0, UINT32_MAX, nullptr); break; } }