137 lines
4.8 KiB
Plaintext
137 lines
4.8 KiB
Plaintext
Adapted from:
|
|
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/portal/pipewire.sigs third_party/libwebrtc/modules/portal/pipewire.sigs
|
|
index cab90280ef40..13718b8ce83c 100644
|
|
--- third_party/libwebrtc/modules/portal/pipewire.sigs
|
|
+++ third_party/libwebrtc/modules/portal/pipewire.sigs
|
|
@@ -15,8 +15,8 @@ pw_loop * pw_loop_new(const spa_dict *props);
|
|
|
|
|
|
// pipewire.h
|
|
-void pw_init(int *argc, char **argv[]);
|
|
-void pw_deinit();
|
|
+void pipewire_init(int *argc, char **argv[]);
|
|
+void pipewire_deinit();
|
|
|
|
const char* pw_get_library_version();
|
|
|
|
diff --git third_party/libwebrtc/modules/portal/pipewire_utils.cc third_party/libwebrtc/modules/portal/pipewire_utils.cc
|
|
index 7008696b7d20..758b21e2677c 100644
|
|
--- third_party/libwebrtc/modules/portal/pipewire_utils.cc
|
|
+++ third_party/libwebrtc/modules/portal/pipewire_utils.cc
|
|
@@ -108,7 +108,7 @@ PipeWireThreadLoopLock::~PipeWireThreadLoopLock() {
|
|
|
|
RTC_NO_SANITIZE("cfi-icall")
|
|
PipeWireInitializer::PipeWireInitializer() {
|
|
- pw_init(/*argc=*/nullptr, /*argv=*/nullptr);
|
|
+ pipewire_init(/*argc=*/nullptr, /*argv=*/nullptr);
|
|
}
|
|
|
|
RTC_NO_SANITIZE("cfi-icall")
|
|
@@ -116,7 +116,7 @@ PipeWireInitializer::~PipeWireInitializer() {
|
|
PipeWireVersion pw_client_version =
|
|
PipeWireVersion::Parse(pw_get_library_version());
|
|
if (pw_client_version >= kReentrantDeinitMinVersion) {
|
|
- pw_deinit();
|
|
+ pipewire_deinit();
|
|
}
|
|
}
|
|
|
|
diff --git third_party/pipewire/libpipewire/mozpipewire.cpp third_party/pipewire/libpipewire/mozpipewire.cpp
|
|
index 11f938b1de20..0191e557374d 100644
|
|
--- third_party/pipewire/libpipewire/mozpipewire.cpp
|
|
+++ third_party/pipewire/libpipewire/mozpipewire.cpp
|
|
@@ -28,8 +28,8 @@ 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 (*pw_deinit_fn)();
|
|
+static void (*pipewire_init_fn)(int *argc, char **argv[]);
|
|
+static void (*pipewire_deinit_fn)();
|
|
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,
|
|
@@ -74,8 +74,8 @@ 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(pw_deinit_fn) &&
|
|
+ IS_FUNC_LOADED(pipewire_init_fn) &&
|
|
+ IS_FUNC_LOADED(pipewire_deinit_fn) &&
|
|
IS_FUNC_LOADED(pw_proxy_destroy_fn) &&
|
|
IS_FUNC_LOADED(pw_stream_add_listener_fn) &&
|
|
IS_FUNC_LOADED(pw_stream_connect_fn) &&
|
|
@@ -118,8 +118,8 @@ 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(pw_deinit, pwLib);
|
|
+ GET_FUNC(pipewire_init, pwLib);
|
|
+ GET_FUNC(pipewire_deinit, pwLib);
|
|
GET_FUNC(pw_stream_add_listener, pwLib);
|
|
GET_FUNC(pw_stream_connect, pwLib);
|
|
GET_FUNC(pw_stream_disconnect, pwLib);
|
|
@@ -199,21 +199,21 @@ 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
|
|
-pw_deinit()
|
|
+pipewire_deinit()
|
|
{
|
|
if (!LoadPWLibrary()) {
|
|
return;
|
|
}
|
|
- return pw_deinit_fn();
|
|
+ return pipewire_deinit_fn();
|
|
}
|
|
|
|
void
|
|
diff --git third_party/pipewire/pipewire/log.h third_party/pipewire/pipewire/log.h
|
|
index a95a64fef26d..e3d4ebd51285 100644
|
|
--- third_party/pipewire/pipewire/log.h
|
|
+++ third_party/pipewire/pipewire/log.h
|
|
@@ -31,8 +31,8 @@ extern enum spa_log_level pw_log_level;
|
|
extern struct spa_log_topic * const PW_LOG_TOPIC_DEFAULT;
|
|
|
|
/** Configure a logging module. This is usually done automatically
|
|
- * in pw_init() but you can install a custom logger before calling
|
|
- * pw_init(). */
|
|
+ * in pipewire_init() but you can install a custom logger before calling
|
|
+ * pipewire_init(). */
|
|
void pw_log_set(struct spa_log *log);
|
|
|
|
/** Get the log interface */
|
|
diff --git third_party/pipewire/pipewire/pipewire.h third_party/pipewire/pipewire/pipewire.h
|
|
index 870f2f178e24..2bfd4ba46dae 100644
|
|
--- third_party/pipewire/pipewire/pipewire.h
|
|
+++ third_party/pipewire/pipewire/pipewire.h
|
|
@@ -49,9 +49,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);
|