[vlc-commits] [Git][videolan/vlc][master] pulse: revert "pulse: fail if the server is Pipewire"
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Dec 12 12:59:57 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
eadb563c by Ayush Dey at 2024-12-12T12:11:30+00:00
pulse: revert "pulse: fail if the server is Pipewire"
This reverts commit 78563bdb8ae6ca6f2f002192ae450c26823521a5.
- - - - -
1 changed file:
- modules/services_discovery/pulse.c
Changes:
=====================================
modules/services_discovery/pulse.c
=====================================
@@ -36,8 +36,6 @@
static int Open (vlc_object_t *);
static void Close (vlc_object_t *);
-#include <vlc_modules.h>
-
VLC_SD_PROBE_HELPER("pulse", N_("Audio capture"), SD_CAT_DEVICES);
vlc_module_begin ()
@@ -57,29 +55,12 @@ typedef struct
void *root_card;
pa_context *context;
pa_threaded_mainloop *mainloop;
- bool is_pipewire;
} services_discovery_sys_t;
static void SourceCallback(pa_context *, const pa_source_info *, int, void *);
static void ContextCallback(pa_context *, pa_subscription_event_type_t,
uint32_t, void *);
-static void server_info_cb(pa_context *ctx, const pa_server_info *info,
- void *userdata)
-{
- services_discovery_t *sd = userdata;
-
- msg_Dbg(sd, "server %s version %s on %s@%s", info->server_name,
- info->server_version, info->user_name, info->host_name);
-
- services_discovery_sys_t *sys = sd->p_sys;
-
- sys->is_pipewire = strcasestr(info->server_name, "pipewire") != NULL;
- pa_threaded_mainloop_signal(sys->mainloop, 0);
-
- (void) ctx;
-}
-
static int Open (vlc_object_t *obj)
{
services_discovery_t *sd = (services_discovery_t *)obj;
@@ -102,27 +83,10 @@ static int Open (vlc_object_t *obj)
sys->context = ctx;
sys->root = NULL;
sys->root_card = NULL;
- sys->is_pipewire = false;
-
- pa_threaded_mainloop_lock(sys->mainloop);
- op = pa_context_get_server_info(sys->context, server_info_cb, sd);
- if (likely(op != NULL))
- {
- while (pa_operation_get_state(op) == PA_OPERATION_RUNNING)
- pa_threaded_mainloop_wait(sys->mainloop);
- if (sys->is_pipewire && module_exists("pipewirelist"))
- {
- msg_Dbg(sd, "refusing to use PipeWire");
- pa_threaded_mainloop_unlock(sys->mainloop);
- vlc_pa_disconnect(obj, sys->context, sys->mainloop);
- free(sys);
- return -ENOTSUP;
- }
- pa_operation_unref(op);
- }
/* Subscribe for source events */
const pa_subscription_mask_t mask = PA_SUBSCRIPTION_MASK_SOURCE;
+ pa_threaded_mainloop_lock (sys->mainloop);
pa_context_set_subscribe_callback (ctx, ContextCallback, sd);
op = pa_context_subscribe (ctx, mask, NULL, NULL);
if (likely(op != NULL))
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/eadb563ce121941b50e6e4eaad7be086a7e746aa
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/eadb563ce121941b50e6e4eaad7be086a7e746aa
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list