Hot Diggity Daffodil!

main
Jay Moore 5 days ago
parent a272f236bc
commit 043d5b166d

@ -1,7 +1,7 @@
project(
'mpd',
'mpd-dbcreate',
['c', 'cpp'],
version: '0.25',
version: '0.1',
meson_version: '>= 1.2',
default_options: [
'c_std=c11',
@ -237,13 +237,11 @@ add_project_arguments(c_compiler.get_supported_arguments(test_cflags), language:
add_project_link_arguments(compiler.get_supported_link_arguments(test_ldflags), language: 'cpp')
is_linux = host_machine.system() == 'linux'
is_android = get_option('android_ndk') != ''
is_android = false # Android support removed
is_darwin = host_machine.system() == 'darwin'
is_windows = host_machine.system() == 'windows'
if is_android
common_cppflags += '-DANDROID'
endif
# Android support removed
if is_windows
common_cppflags += [
@ -275,13 +273,7 @@ if is_windows
subdir('win32')
endif
if is_android
# With ndk27 libcpp doesn't seem to have a rune table defined for the
# localization module, tell it to use the one it ships with
common_cppflags += ['-D_LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE']
subdir('android')
endif
# Android support removed from mpd-dbcreate
add_global_arguments(common_global_cppflags, language: 'c')
add_global_arguments(common_global_cppflags, language: 'cpp')
@ -289,8 +281,9 @@ add_global_arguments(common_global_cppflags, language: 'cpp')
add_project_arguments(common_cppflags, language: 'c')
add_project_arguments(common_cppflags, language: 'cpp')
enable_daemon = not is_windows and not is_android and get_option('daemon')
conf.set('ENABLE_DAEMON', enable_daemon)
# mpd-dbcreate is not a daemon - it's a standalone utility
enable_daemon = false
conf.set('ENABLE_DAEMON', false)
conf.set('HAVE_GETPWNAM_R', compiler.has_function('getpwnam_r'))
conf.set('HAVE_INITGROUPS', compiler.has_function('initgroups'))
@ -457,19 +450,11 @@ if is_windows
]
endif
if not is_android
sources += [
'src/CommandLine.cxx',
'src/unix/SignalHandlers.cxx',
]
else
sources += [
'src/android/Context.cxx',
'src/android/AudioManager.cxx',
'src/android/Environment.cxx',
'src/android/LogListener.cxx',
]
endif
# Android support removed - always use non-Android sources
sources += [
'src/CommandLine.cxx',
'src/unix/SignalHandlers.cxx',
]
if enable_daemon
sources += 'src/unix/Daemon.cxx'
@ -509,7 +494,8 @@ subdir('src/lib/dbus')
subdir('src/lib/smbclient')
subdir('src/lib/zlib')
subdir('src/lib/alsa')
# subdir('src/lib/alsa') # Disabled - not needed for database creation
alsa_dep = declare_dependency() # Empty dependency for compatibility
subdir('src/lib/chromaprint')
subdir('src/lib/curl')
subdir('src/lib/expat')
@ -517,13 +503,17 @@ subdir('src/lib/ffmpeg')
subdir('src/lib/gcrypt')
subdir('src/lib/nfs')
subdir('src/lib/nlohmann_json')
subdir('src/lib/oss')
# subdir('src/lib/oss') # Disabled - not needed for database creation
enable_oss = false # Disabled for database creation
subdir('src/lib/pcre')
subdir('src/lib/pipewire')
subdir('src/lib/pulse')
subdir('src/lib/sndio')
# subdir('src/lib/pipewire') # Disabled - not needed for database creation
pipewire_dep = declare_dependency() # Empty dependency for compatibility
# subdir('src/lib/pulse') # Disabled - not needed for database creation
pulse_dep = declare_dependency() # Empty dependency for compatibility
# subdir('src/lib/sndio') # Disabled - not needed for database creation
libsndio_dep = declare_dependency() # Empty dependency for compatibility
subdir('src/lib/sqlite')
subdir('src/lib/systemd')
subdir('src/lib/systemd') # Provides empty systemd_dep for compatibility
subdir('src/lib/upnp')
subdir('src/lib/crypto')
@ -613,27 +603,10 @@ endif
link_args = []
more_deps = []
if is_android
subdir('src/java')
target_type = 'shared_library'
target_name = 'mpd'
link_args += [
'-Wl,--no-undefined,-shared,-Bsymbolic',
'-llog',
'-lz',
]
more_deps += [
declare_dependency(sources: [bridge_header]),
java_dep,
]
android_abi = get_option('android_abi')
install_dir = meson.current_source_dir() / 'android/app/src/main/jniLibs' / android_abi
else
target_type = 'executable'
target_name = 'mpd'
install_dir = get_option('bindir')
endif
# Android support removed - always use executable type
target_type = 'executable'
target_name = 'mpd'
install_dir = get_option('bindir')
if enable_sacdiso
more_deps += [
@ -647,9 +620,9 @@ if enable_dvdaiso
]
endif
# MPD build target removed - this project only builds mpd-dbcreate
# The mpd-dbcreate utility is a specialized database creator that
# The mpd-dbcreator utility is a specialized database creator that
# uses MPD's codebase but with modified behavior for filtering
# multichannel content. It's just hacked mpd.'
configure_file(output: 'config.h', configuration: conf)
@ -668,7 +641,6 @@ db_creator_sources = [
source_index = 0
foreach src : sources
if source_index == 0
# Skip version_cxx (first element)
source_index += 1
else
# For all other elements, only check against Main.cxx
@ -702,7 +674,7 @@ mpd_dbcreate = executable(
db_glue_dep,
storage_glue_dep,
song_dep,
systemd_dep,
# so log systemd!
sqlite_dep,
chromaprint_dep,
neighbor_glue_dep,
@ -717,21 +689,18 @@ mpd_dbcreate = executable(
install_dir: get_option('bindir')
)
if systemd_dep.found()
subdir('systemd')
endif
# dropped systemd like a bad habbit because we quit daemon life
if not is_android
install_data(
'mpd.svg',
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'),
)
# Android deleted because why would you run this on a phone?
install_data(
'mpd.svg',
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'),
)
install_data(
'AUTHORS', 'COPYING', 'NEWS', 'README.md',
install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
)
endif
install_data(
'AUTHORS', 'COPYING', 'NEWS', 'README.md',
install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
)
subdir('doc')

@ -7,11 +7,7 @@ option('syslog', type: 'feature', description: 'syslog support')
option('inotify', type: 'boolean', value: true, description: 'inotify support (for automatic database update)')
option('io_uring', type: 'feature', description: 'Linux io_uring support using liburing')
option('daemon', type: 'boolean', value: true, description: 'enable daemonization')
option('systemd', type: 'feature', description: 'systemd support')
option('systemd_system_unit_dir', type: 'string', description: 'systemd system service directory')
option('systemd_user_unit_dir', type: 'string', description: 'systemd user service directory')
# Daemon and systemd options removed - mpd-dbcreate is a standalone utility, not a daemon
#
# Options for developers
@ -21,21 +17,7 @@ option('test', type: 'boolean', value: false, description: 'Build the unit tests
option('fuzzer', type: 'boolean', value: false, description: 'Build fuzzers')
option('libfuzzer', type: 'boolean', value: true, description: 'Enable libFuzzer support for the fuzzers')
#
# Android
#
option('android_sdk', type: 'string', description: 'The path where Android SDK is installed')
option('android_ndk', type: 'string', description: 'The path where Android NDK is installed')
option('android_abi', type: 'string', value: 'armeabi-v7a', description: 'The Android ABI to be built')
option('android_strip', type: 'string', value: 'strip', description: 'The "strip" tool from the NDK')
option('android_debug_keystore', type: 'string', description: 'The keystore file used to sign debug APK files')
option('android_keystore', type: 'string', description: 'The keystore file used to sign APK files')
option('android_keyalias', type: 'string', description: 'The key alias used to sign APK files')
option('android_keypass', type: 'string', description: 'The password of the keystore used to sign APK files')
# Android support removed from mpd-dbcreate
#
# System call support
@ -163,28 +145,28 @@ option('wave_encoder', type: 'boolean', value: true, description: 'PCM wave enco
# Filter plugins
#
option('libsamplerate', type: 'feature', description: 'libsamplerate resampler')
option('soxr', type: 'feature', description: 'libsoxr resampler')
option('libsamplerate', type: 'feature', value: 'disabled', description: 'libsamplerate resampler')
option('soxr', type: 'feature', value: 'disabled', description: 'libsoxr resampler')
#
# Output plugins
#
option('alsa', type: 'feature', description: 'ALSA support')
option('ao', type: 'feature', description: 'libao output plugin')
option('fifo', type: 'boolean', value: true, description: 'FIFO output plugin')
option('httpd', type: 'boolean', value: true, description: 'HTTP streaming output plugin')
option('jack', type: 'feature', description: 'JACK output plugin')
option('openal', type: 'feature', description: 'OpenAL output plugin')
option('oss', type: 'feature', description: 'Open Sound System support')
option('pipe', type: 'boolean', value: true, description: 'Pipe output plugin')
option('pipewire', type: 'feature', description: 'PipeWire support')
option('pulse', type: 'feature', description: 'PulseAudio support')
option('recorder', type: 'boolean', value: true, description: 'Recorder output plugin')
option('shout', type: 'feature', description: 'Shoutcast streaming support using libshout')
option('snapcast', type: 'boolean', value: true, description: 'Snapcast output plugin')
option('sndio', type: 'feature', description: 'sndio output plugin')
option('solaris_output', type: 'feature', description: 'Solaris /dev/audio support')
option('alsa', type: 'feature', value: 'disabled', description: 'ALSA support')
option('ao', type: 'feature', value: 'disabled', description: 'libao output plugin')
option('fifo', type: 'boolean', value: false, description: 'FIFO output plugin')
option('httpd', type: 'boolean', value: false, description: 'HTTP streaming output plugin')
option('jack', type: 'feature', value: 'disabled', description: 'JACK output plugin')
option('openal', type: 'feature', value: 'disabled', description: 'OpenAL output plugin')
option('oss', type: 'feature', value: 'disabled', description: 'Open Sound System support')
option('pipe', type: 'boolean', value: false, description: 'Pipe output plugin')
option('pipewire', type: 'feature', value: 'disabled', description: 'PipeWire support')
option('pulse', type: 'feature', value: 'disabled', description: 'PulseAudio support')
option('recorder', type: 'boolean', value: false, description: 'Recorder output plugin')
option('shout', type: 'feature', value: 'disabled', description: 'Shoutcast streaming support using libshout')
option('snapcast', type: 'boolean', value: false, description: 'Snapcast output plugin')
option('sndio', type: 'feature', value: 'disabled', description: 'sndio output plugin')
option('solaris_output', type: 'feature', value: 'disabled', description: 'Solaris /dev/audio support')
#
# Misc libraries

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
// Standalone database creation utility
// mpd-dbcreate "Hot diggity daffodil!"
// Jay Moore - dewdude@pickmy.org
#include "config.h"
#include "Instance.hxx"
@ -71,7 +72,7 @@ private:
// Show progress every 10 seconds (100 checks)
if (verbose && ++progress_counter >= 100) {
progress_counter = 0;
std::cout << "." << std::flush;
std::cerr << "." << std::flush;
}
}
}
@ -81,6 +82,7 @@ static ChannelMode channel_mode = ChannelMode::ALL;
static std::string music_directory;
static AllocatedPath database_path = nullptr;
static bool verbose = false;
static bool update_mode = false;
// Global instance pointer required by other MPD components
// This must be defined here as we're not linking with Main.cxx
@ -91,11 +93,12 @@ extern "C" __attribute__((visibility("default"))) ChannelMode GetChannelMode() n
}
static void PrintUsage() {
std::cout << "MPD Database Creator\n"
<< "Usage: mpd-dbcreate [options]\n\n"
std::cout << "mpd-dbcreate | Jay's MPD DB Creator - Hot Diggity Daffodil!\n"
<< "Usage: mpd-dbcreate --music-dir /path/to/scan --database /path/to/mpd.db [options]\n\n"
<< "Options:\n"
<< " --music-dir <path> Music directory\n"
<< " --database <path> Database file\n"
<< " --update Update existing database (incremental scan)\n"
<< " --stereo Stereo only\n"
<< " --multichannel Multichannel only\n"
<< " --all All (default)\n"
@ -109,6 +112,8 @@ static void ParseArgs(int argc, char *argv[]) {
if (arg == "--help") {
PrintUsage();
exit(0);
} else if (arg == "--update") {
update_mode = true;
} else if (arg == "--stereo") {
channel_mode = ChannelMode::STEREO;
} else if (arg == "--multichannel") {
@ -140,9 +145,10 @@ int main(int argc, char *argv[]) {
// Initialize
const ScopeIcuInit icu_init;
log_early_init(verbose);
// Note: setup_log_output() redirects stderr to /dev/null or log file
// Comment out if you need to see stderr output for debugging
setup_log_output();
// Steal logging back from systemd for verbose
if (!verbose) {
setup_log_output();
}
// Config
ConfigData config;
@ -201,18 +207,19 @@ int main(int argc, char *argv[]) {
}
if (verbose) {
std::cout << "Music directory: " << music_directory << "\n";
std::cout << "Database path: " << database_path.ToUTF8() << "\n";
std::cout << "Channel Mode: ";
std::cerr << "Music directory: " << music_directory << "\n";
std::cerr << "Database path: " << database_path.ToUTF8() << "\n";
std::cerr << "Mode: " << (update_mode ? "UPDATE (incremental)" : "CREATE (full scan)") << "\n";
std::cerr << "Channel Mode: ";
if (channel_mode == ChannelMode::STEREO) {
std::cout << "STEREO (filtering out multichannel)\n";
std::cerr << "STEREO (filtering out multichannel)\n";
} else if (channel_mode == ChannelMode::MULTICHANNEL) {
std::cout << "MULTICHANNEL (filtering out stereo)\n";
std::cerr << "MULTICHANNEL (filtering out stereo)\n";
} else {
std::cout << "ALL (no filtering)\n";
std::cerr << "ALL (no filtering)\n";
}
std::cout << "Scanning";
std::cout.flush();
std::cerr << (update_mode ? "Updating" : "Scanning");
std::cerr.flush();
}
// Create update service
@ -222,8 +229,9 @@ int main(int argc, char *argv[]) {
*composite,
instance);
// Start scan
instance.update->Enqueue("", true);
// Start scan - use 'false' for discard parameter when in update mode
// to perform incremental update, 'true' for full rescan
instance.update->Enqueue("", !update_mode);
// Create update checker to monitor completion
UpdateChecker checker(instance, verbose);
@ -234,7 +242,7 @@ int main(int argc, char *argv[]) {
instance.event_loop.Run();
if (verbose)
std::cout << "\n";
std::cerr << "\n";
// Save
simple_db->Save();
@ -256,11 +264,11 @@ int main(int argc, char *argv[]) {
instance.io_thread.Stop();
if (verbose)
std::cout << "Done!\n";
std::cerr << "Done!\n";
return 0;
} catch (const std::exception &e) {
std::cerr << "Error: " << e.what() << "\n";
return 1;
}
}
}

@ -6,9 +6,10 @@ if uring_dep.found()
input_plugins_sources += 'UringInputPlugin.cxx'
endif
if alsa_dep.found()
input_plugins_sources += 'AlsaInputPlugin.cxx'
endif
# ALSA input disabled for mpd-dbcreate
# if alsa_dep.found()
# input_plugins_sources += 'AlsaInputPlugin.cxx'
# endif
libcdio_paranoia_dep = dependency('libcdio_paranoia', version: '>= 10.2+0.93+1', required: get_option('cdio_paranoia'))
input_features.set('ENABLE_CDIO_PARANOIA', libcdio_paranoia_dep.found())

@ -1,8 +1,7 @@
uring_features = configuration_data()
if host_machine.system() != 'linux' or is_android
# io_uring is a Linux-only feature; on Android, we also disable it
# because it's forbidden by a seccomp filter
if host_machine.system() != 'linux'
# io_uring is a Linux-only feature
uring_dep = dependency('', required: false)
uring_features.set('HAVE_URING', false)
configure_file(output: 'Features.h', configuration: uring_features)

@ -1,23 +1,4 @@
if not is_linux or is_android
systemd_dep = dependency('', required: false)
subdir_done()
endif
systemd_dep = dependency('libsystemd', required: get_option('systemd'))
conf.set('ENABLE_SYSTEMD_DAEMON', systemd_dep.found())
if not systemd_dep.found()
subdir_done()
endif
systemd = static_library(
'systemd',
'Watchdog.cxx',
include_directories: inc,
dependencies: [
systemd_dep,
],
)
systemd_dep = declare_dependency(
link_with: systemd,
)
# Provide empty systemd_dep for build compatibility
# mpd-dbcreate doesn't need systemd as it's not a daemon
systemd_dep = dependency('', required: false)
conf.set('ENABLE_SYSTEMD_DAEMON', false)

@ -37,9 +37,7 @@ if is_windows
]
endif
if is_android
mixer_plugins_sources += 'AndroidMixerPlugin.cxx'
endif
# Android support removed
mixer_plugins = static_library(
'mixer_plugins',

@ -5,91 +5,13 @@
#include "Registry.hxx"
#include "OutputPlugin.hxx"
#include "output/Features.h"
#include "plugins/AlsaOutputPlugin.hxx"
#include "plugins/AoOutputPlugin.hxx"
#include "plugins/FifoOutputPlugin.hxx"
#include "plugins/SndioOutputPlugin.hxx"
#include "plugins/snapcast/SnapcastOutputPlugin.hxx"
#include "plugins/httpd/HttpdOutputPlugin.hxx"
#include "plugins/JackOutputPlugin.hxx"
#include "plugins/NullOutputPlugin.hxx"
#include "plugins/OpenALOutputPlugin.hxx"
#include "plugins/OssOutputPlugin.hxx"
#include "plugins/OSXOutputPlugin.hxx"
#include "plugins/PipeOutputPlugin.hxx"
#include "plugins/PipeWireOutputPlugin.hxx"
#include "plugins/PulseOutputPlugin.hxx"
#include "plugins/RecorderOutputPlugin.hxx"
#include "plugins/ShoutOutputPlugin.hxx"
#include "plugins/sles/SlesOutputPlugin.hxx"
#include "plugins/SolarisOutputPlugin.hxx"
#ifdef ENABLE_WINMM_OUTPUT
#include "plugins/WinmmOutputPlugin.hxx"
#endif
#ifdef ENABLE_WASAPI_OUTPUT
#include "plugins/wasapi/WasapiOutputPlugin.hxx"
#endif
#include "util/StringAPI.hxx"
// Only include the NullOutputPlugin for mpd-dbcreate
// since we don't need actual audio output for database creation
constinit const AudioOutputPlugin *const audio_output_plugins[] = {
#ifdef HAVE_SHOUT
&shout_output_plugin,
#endif
&null_output_plugin,
#ifdef ANDROID
&sles_output_plugin,
#endif
#ifdef HAVE_FIFO
&fifo_output_plugin,
#endif
#ifdef ENABLE_SNDIO
&sndio_output_plugin,
#endif
#ifdef ENABLE_PIPE_OUTPUT
&pipe_output_plugin,
#endif
#ifdef ENABLE_ALSA
&alsa_output_plugin,
#endif
#ifdef ENABLE_AO
&ao_output_plugin,
#endif
#ifdef HAVE_OSS
&oss_output_plugin,
#endif
#ifdef HAVE_OPENAL
&openal_output_plugin,
#endif
#ifdef HAVE_OSX
&osx_output_plugin,
#endif
#ifdef ENABLE_SOLARIS_OUTPUT
&solaris_output_plugin,
#endif
#ifdef ENABLE_PIPEWIRE
&pipewire_output_plugin,
#endif
#ifdef ENABLE_PULSE
&pulse_output_plugin,
#endif
#ifdef ENABLE_JACK
&jack_output_plugin,
#endif
#ifdef ENABLE_HTTPD_OUTPUT
&httpd_output_plugin,
#endif
#ifdef ENABLE_SNAPCAST_OUTPUT
&snapcast_output_plugin,
#endif
#ifdef ENABLE_RECORDER_OUTPUT
&recorder_output_plugin,
#endif
#ifdef ENABLE_WINMM_OUTPUT
&winmm_output_plugin,
#endif
#ifdef ENABLE_WASAPI_OUTPUT
&wasapi_output_plugin,
#endif
nullptr
};

@ -12,173 +12,36 @@ output_plugins_deps = [
need_encoder = false
need_wave_encoder = false
if alsa_dep.found()
output_plugins_sources += 'AlsaOutputPlugin.cxx'
output_plugins_deps += event_dep
endif
libao_dep = dependency('ao', required: get_option('ao'))
output_features.set('ENABLE_AO', libao_dep.found())
if libao_dep.found()
output_plugins_sources += 'AoOutputPlugin.cxx'
endif
enable_fifo_output = get_option('fifo') and not is_windows
output_features.set('HAVE_FIFO', enable_fifo_output)
if enable_fifo_output
output_plugins_sources += 'FifoOutputPlugin.cxx'
endif
output_features.set('ENABLE_HTTPD_OUTPUT', get_option('httpd'))
if get_option('httpd')
output_plugins_sources += [
'httpd/IcyMetaDataServer.cxx',
'httpd/HttpdClient.cxx',
'httpd/HttpdOutputPlugin.cxx',
]
output_plugins_deps += [ event_dep, net_dep ]
need_encoder = true
endif
libjack_dep = dependency('jack', version: '>= 0.100', required: get_option('jack'))
output_features.set('ENABLE_JACK', libjack_dep.found())
if libjack_dep.found()
output_plugins_sources += 'JackOutputPlugin.cxx'
output_features.set('HAVE_JACK_SET_INFO_FUNCTION', compiler.has_header_symbol('jack/jack.h', 'jack_set_info_function'))
endif
# All output plugins disabled for mpd-dbcreate - only NullOutputPlugin needed
# Set all feature flags to false
output_features.set('ENABLE_AO', false)
output_features.set('HAVE_FIFO', false)
output_features.set('ENABLE_HTTPD_OUTPUT', false)
output_features.set('ENABLE_JACK', false)
output_features.set('HAVE_OPENAL', false)
output_features.set('HAVE_OSX', false)
output_features.set('ENABLE_PIPE_OUTPUT', false)
output_features.set('ENABLE_RECORDER_OUTPUT', false)
output_features.set('HAVE_SHOUT', false)
output_features.set('ENABLE_SNAPCAST_OUTPUT', false)
output_features.set('ENABLE_SOLARIS_OUTPUT', false)
output_features.set('ENABLE_WINMM_OUTPUT', false)
output_features.set('ENABLE_WASAPI_OUTPUT', false)
# Define empty dependencies to avoid build errors
libao_dep = dependency('', required: false)
libjack_dep = dependency('', required: false)
openal_dep = dependency('', required: false)
if not get_option('openal').disabled()
if is_darwin
if compiler.has_header('OpenAL/al.h')
openal_dep = declare_dependency(link_args: ['-framework', 'OpenAL'])
endif
else
openal_dep = dependency('openal', required: false)
endif
if openal_dep.found()
output_plugins_sources += 'OpenALOutputPlugin.cxx'
elif get_option('openal').enabled()
error('OpenAL not available')
endif
endif
output_features.set('HAVE_OPENAL', openal_dep.found())
if enable_oss
output_plugins_sources += 'OssOutputPlugin.cxx'
endif
if is_darwin
output_plugins_sources += [
'OSXOutputPlugin.cxx',
]
endif
output_features.set('HAVE_OSX', is_darwin)
enable_pipe_output = get_option('pipe') and not is_windows
output_features.set('ENABLE_PIPE_OUTPUT', enable_pipe_output)
if enable_pipe_output
output_plugins_sources += 'PipeOutputPlugin.cxx'
endif
if pipewire_dep.found()
output_plugins_sources += 'PipeWireOutputPlugin.cxx'
endif
if pulse_dep.found()
output_plugins_sources += 'PulseOutputPlugin.cxx'
endif
output_features.set('ENABLE_RECORDER_OUTPUT', get_option('recorder'))
if get_option('recorder')
output_plugins_sources += 'RecorderOutputPlugin.cxx'
need_encoder = true
endif
libshout_dep = dependency('shout', version: '>= 2.4.0', required: get_option('shout'))
output_features.set('HAVE_SHOUT', libshout_dep.found())
if libshout_dep.found()
output_plugins_sources += 'ShoutOutputPlugin.cxx'
need_encoder = true
endif
if is_android
sles_dep = c_compiler.find_library('OpenSLES')
output_plugins_sources += 'sles/SlesOutputPlugin.cxx'
else
sles_dep = dependency('', required: false)
endif
if libsndio_dep.found()
output_plugins_sources += 'SndioOutputPlugin.cxx'
endif
output_features.set('ENABLE_SNAPCAST_OUTPUT', get_option('snapcast'))
if get_option('snapcast')
output_plugins_sources += [
'snapcast/SnapcastOutputPlugin.cxx',
'snapcast/Client.cxx',
]
output_plugins_deps += [ event_dep, net_dep, nlohmann_json_dep, zeroconf_dep ]
output_features.set('HAVE_NLOHMANN_JSON', nlohmann_json_dep.found())
need_wave_encoder = true
endif
enable_solaris_output = get_option('solaris_output')
if enable_solaris_output.auto()
enable_solaris_output = host_machine.system() == 'sunos' or host_machine.system() == 'solaris'
else
enable_solaris_output = enable_solaris_output.enabled()
endif
output_features.set('ENABLE_SOLARIS_OUTPUT', enable_solaris_output)
if enable_solaris_output
output_plugins_sources += 'SolarisOutputPlugin.cxx'
endif
output_features.set('ENABLE_WINMM_OUTPUT', is_windows)
if is_windows
output_plugins_sources += 'WinmmOutputPlugin.cxx'
winmm_dep = c_compiler.find_library('winmm')
else
winmm_dep = dependency('', required: false)
endif
output_features.set('ENABLE_WASAPI_OUTPUT', is_windows)
if is_windows
output_plugins_sources += [
'wasapi/WasapiOutputPlugin.cxx',
]
wasapi_dep = [
c_compiler.find_library('ksuser', required: true),
c_compiler.find_library('ole32', required: true),
win32_dep,
]
else
wasapi_dep = dependency('', required: false)
endif
libshout_dep = dependency('', required: false)
sles_dep = dependency('', required: false)
winmm_dep = dependency('', required: false)
wasapi_dep = dependency('', required: false)
output_plugins = static_library(
'output_plugins',
output_plugins_sources,
include_directories: inc,
dependencies: [
alsa_dep,
apple_dep,
libao_dep,
libjack_dep,
pipewire_dep,
pulse_dep,
libshout_dep,
libsndio_dep,
openal_dep,
sles_dep,
winmm_dep,
wasapi_dep,
output_plugins_deps,
],
dependencies: output_plugins_deps,
)
output_plugins_dep = declare_dependency(

@ -25,6 +25,12 @@ CreateConfiguredStorageUri(EventLoop &event_loop, const char *uri)
static AllocatedPath
GetConfiguredMusicDirectory(const ConfigData &config)
{
// Don't try to parse URIs as filesystem paths
auto uri = config.GetString(ConfigOption::MUSIC_DIR);
if (uri != nullptr && uri_has_scheme(uri))
// This is a URI, not a local path
return nullptr;
AllocatedPath path = config.GetPath(ConfigOption::MUSIC_DIR);
if (path.IsNull())
path = GetUserMusicDir();
@ -47,6 +53,7 @@ CreateConfiguredStorageLocal(const ConfigData &config)
std::unique_ptr<Storage>
CreateConfiguredStorage(const ConfigData &config, EventLoop &event_loop)
{
// Check if it's a URI first before trying to parse as a path
auto uri = config.GetString(ConfigOption::MUSIC_DIR);
if (uri != nullptr && uri_has_scheme(uri))
return CreateConfiguredStorageUri(event_loop, uri);

@ -5,7 +5,7 @@ avahi_dep = dependency('', required: false)
if zeroconf_option == 'auto'
if is_darwin
zeroconf_option = 'bonjour'
elif is_android or is_windows
elif is_windows
zeroconf_option = 'disabled'
elif dbus_dep.found()
zeroconf_option = 'avahi'

Loading…
Cancel
Save