Skip to content

Commit

Permalink
Buildfix for Debian 12
Browse files Browse the repository at this point in the history
  • Loading branch information
viachaslavic committed Feb 5, 2025
1 parent 9982007 commit c03e188
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
7 changes: 5 additions & 2 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,11 @@ endif

ifeq ($(HAVE_PIPEWIRE), 1)
OBJ += audio/drivers/pipewire.o \
audio/common/pipewire.o \
camera/drivers/pipewire.o
audio/common/pipewire.o

ifeq ($(HAVE_PIPEWIRE_CAMERA), 1)
OBJ += camera/drivers/pipewire.o
endif

ifeq ($(HAVE_MICROPHONE), 1)
OBJ += audio/drivers_microphone/pipewire.o
Expand Down
7 changes: 5 additions & 2 deletions audio/common/pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,11 @@ void pipewire_core_deinit(pipewire_core_t *pw)
pw_core_disconnect(pw->core);
}

spa_clear_ptr(pw->ctx, pw_context_destroy);
spa_clear_ptr(pw->thread_loop, pw_thread_loop_destroy);
if (pw->ctx)
pw_context_destroy(pw->ctx);

if (pw->thread_loop)
pw_thread_loop_destroy(pw->thread_loop);

if (pw->devicelist)
string_list_free(pw->devicelist);
Expand Down
2 changes: 1 addition & 1 deletion camera/camera_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const camera_driver_t *camera_drivers[] = {
#ifdef HAVE_V4L2
&camera_v4l2,
#endif
#ifdef HAVE_PIPEWIRE
#ifdef HAVE_PIPEWIRE_CAMERA
&camera_pipewire,
#endif
#ifdef EMSCRIPTEN
Expand Down
2 changes: 2 additions & 0 deletions qb/config.libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ check_val '' PIPEWIRE -lpipewire-0.3 '' libpipewire-0.3 '' '' false
check_val '' SDL -lSDL SDL sdl 1.2.10 '' false
check_val '' SDL2 -lSDL2 SDL2 sdl2 2.0.0 '' false

check_val '' PIPEWIRE_CAMERA -lpipewire-0.3 '' libpipewire-0.3 0.3.80 '' false

if [ "$HAVE_SDL2" = 'yes' ] && [ "$HAVE_SDL" = 'yes' ]; then
die : 'Notice: SDL drivers will be replaced by SDL2 ones.'
HAVE_SDL=no
Expand Down
1 change: 1 addition & 0 deletions qb/config.params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ HAVE_JACK=auto # JACK support
HAVE_COREAUDIO=auto # CoreAudio support
HAVE_COREAUDIO3=no # CoreAudio3 support
HAVE_PIPEWIRE=auto # PipeWire support
HAVE_PIPEWIRE_CAMERA=auto # PipeWire camera support
HAVE_PULSE=auto # PulseAudio support
C89_PULSE=no
HAVE_FREETYPE=auto # FreeType support
Expand Down

0 comments on commit c03e188

Please sign in to comment.