Chase ABI from multimedia/pipewire/files/patch-src_pipewire_pipewire_init Ref: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819 diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc index 1872a8684132..7e519f9e9cbb 100644 --- third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc @@ -417,7 +417,7 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( pw_stream_node_id_ = stream_node_id; - pw_init(/*argc=*/nullptr, /*argc=*/nullptr); + pipewire_init(/*argc=*/nullptr, /*argc=*/nullptr); pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr); diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc index ffba13775363..da6a828a21ee 100644 --- third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc +++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc @@ -36,7 +36,7 @@ TestScreenCastStreamProvider::TestScreenCastStreamProvider(Observer* observer, return; } - pw_init(/*argc=*/nullptr, /*argc=*/nullptr); + pipewire_init(/*argc=*/nullptr, /*argc=*/nullptr); pw_main_loop_ = pw_thread_loop_new("pipewire-test-main-loop", nullptr); diff --git third_party/libwebrtc/modules/portal/pipewire.sigs third_party/libwebrtc/modules/portal/pipewire.sigs index c3abf05b386f..a994c218f5a5 100644 --- third_party/libwebrtc/modules/portal/pipewire.sigs +++ third_party/libwebrtc/modules/portal/pipewire.sigs @@ -15,7 +15,7 @@ pw_loop * pw_loop_new(const spa_dict *props); // pipewire.h -void pw_init(int *argc, char **argv[]); +void pipewire_init(int *argc, char **argv[]); const char* pw_get_library_version(); // properties.h diff --git third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc index f2680b28162c..03476a5fffd0 100644 --- third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +++ third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc @@ -252,7 +252,7 @@ void PipeWireSession::InitPipeWire(int fd) { } bool PipeWireSession::StartPipeWire(int fd) { - pw_init(/*argc=*/nullptr, /*argv=*/nullptr); + pipewire_init(/*argc=*/nullptr, /*argv=*/nullptr); pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr); diff --git third_party/pipewire/libpipewire/mozpipewire.cpp third_party/pipewire/libpipewire/mozpipewire.cpp index b8068296745e..7e8be3dc764f 100644 --- third_party/pipewire/libpipewire/mozpipewire.cpp +++ third_party/pipewire/libpipewire/mozpipewire.cpp @@ -58,7 +58,7 @@ struct pw_context * (*pw_context_new_fn)(struct pw_loop *main_loop, struct pw_properties *props, size_t user_data_size); static int (*pw_core_disconnect_fn)(struct pw_core *core); -static void (*pw_init_fn)(int *argc, char **argv[]); +static void (*pipewire_init_fn)(int *argc, char **argv[]); static void (*pw_proxy_destroy_fn)(struct pw_proxy *proxy); static void (*pw_stream_add_listener_fn)(struct pw_stream *stream, struct spa_hook *listener, @@ -103,7 +103,7 @@ bool IsPwLibraryLoaded() { IS_FUNC_LOADED(pw_context_destroy_fn) && IS_FUNC_LOADED(pw_context_new_fn) && IS_FUNC_LOADED(pw_core_disconnect_fn) && - IS_FUNC_LOADED(pw_init_fn) && + IS_FUNC_LOADED(pipewire_init_fn) && IS_FUNC_LOADED(pw_proxy_destroy_fn) && IS_FUNC_LOADED(pw_stream_add_listener_fn) && IS_FUNC_LOADED(pw_stream_connect_fn) && @@ -146,7 +146,7 @@ bool LoadPWLibrary() { GET_FUNC(pw_context_destroy, pwLib); GET_FUNC(pw_context_new, pwLib); GET_FUNC(pw_core_disconnect, pwLib); - GET_FUNC(pw_init, pwLib); + GET_FUNC(pipewire_init, pwLib); GET_FUNC(pw_stream_add_listener, pwLib); GET_FUNC(pw_stream_connect, pwLib); GET_FUNC(pw_stream_disconnect, pwLib); @@ -226,12 +226,12 @@ pw_core_disconnect(struct pw_core *core) } void -pw_init(int *argc, char **argv[]) +pipewire_init(int *argc, char **argv[]) { if (!LoadPWLibrary()) { return; } - return pw_init_fn(argc, argv); + return pipewire_init_fn(argc, argv); } void diff --git third_party/pipewire/pipewire/pipewire.h third_party/pipewire/pipewire/pipewire.h index b932103f46e6..2c88e28421ec 100644 --- third_party/pipewire/pipewire/pipewire.h +++ third_party/pipewire/pipewire/pipewire.h @@ -69,9 +69,9 @@ extern "C" { * \{ */ void -pw_init(int *argc, char **argv[]); +pipewire_init(int *argc, char **argv[]); -void pw_deinit(void); +void pipewire_deinit(void); bool pw_debug_is_category_enabled(const char *name);