diff options
| author | 2025-05-08 12:48:07 -0400 | |
|---|---|---|
| committer | 2025-05-08 12:48:07 -0400 | |
| commit | 5c059c0167f468ed4c98592b55a312143bd94b22 (patch) | |
| tree | 3f0e1ac455c47f95346766613bb250a7af100f68 | |
| parent | 8404c1bad9d4ac448b4b051f29446ca2f24c4ef8 (diff) | |
| download | camu-5c059c0167f468ed4c98592b55a312143bd94b22.tar.gz camu-5c059c0167f468ed4c98592b55a312143bd94b22.tar.bz2 camu-5c059c0167f468ed4c98592b55a312143bd94b22.zip | |
Cleanup build
Signed-off-by: Andrew Opalach <andrew@akon.city>
| -rw-r--r-- | flake.nix | 3 | ||||
| -rw-r--r-- | meson.build | 10 | ||||
| -rw-r--r-- | meson_options.txt | 12 | ||||
| -rw-r--r-- | src/cache/meson.build | 32 | ||||
| -rw-r--r-- | src/codec/ffmpeg/decoder.c | 11 | ||||
| -rw-r--r-- | src/codec/ffmpeg/demuxer.c | 2 | ||||
| -rw-r--r-- | src/fruits/cmv/cmv.c | 2 | ||||
| -rw-r--r-- | src/liana/process.c | 4 | ||||
| -rw-r--r-- | src/libsink/sink.c | 2 | ||||
| -rw-r--r-- | src/render/meson.build | 95 | ||||
| -rw-r--r-- | src/render/queue_libplacebo.c | 33 | ||||
| -rw-r--r-- | src/render/queue_libplacebo.h | 6 | ||||
| -rw-r--r-- | src/render/renderer_libplacebo.c | 11 | ||||
| -rw-r--r-- | src/render/renderer_libplacebo.h | 4 | ||||
| -rw-r--r-- | src/util/meson.build | 19 | ||||
| -rw-r--r-- | subprojects/libnaunet.wrap | 2 | ||||
| -rw-r--r-- | subprojects/packagefiles/ffmpeg/meson.build | 32 | ||||
| -rw-r--r-- | subprojects/stela.wrap | 2 |
18 files changed, 170 insertions, 112 deletions
@@ -96,6 +96,7 @@ automake autogen libtool + gnumake ninja meson cmake @@ -161,6 +162,8 @@ export PATH=${pkgs.lib.makeBinPath shell.nativeBuildInputs}:$PATH export PKG_CONFIG_PATH=${pkgs.lib.makeSearchPathOutput "dev" "lib/pkgconfig" shell.buildInputs}:$PKG_CONFIG_PATH export PKG_CONFIG_PATH=${pkgs.lib.makeSearchPathOutput "dev" "share/pkgconfig" shell.buildInputs}:$PKG_CONFIG_PATH + export PKG_CONFIG_PATH=${pkgs.lib.makeSearchPathOutput "dev" "lib/pkgconfig" shell.nativeBuildInputs}:$PKG_CONFIG_PATH + export PKG_CONFIG_PATH=${pkgs.lib.makeSearchPathOutput "dev" "share/pkgconfig" shell.nativeBuildInputs}:$PKG_CONFIG_PATH ${shell.shellHook} ''; }); diff --git a/meson.build b/meson.build index 16a6619..947fd9a 100644 --- a/meson.build +++ b/meson.build @@ -27,22 +27,22 @@ no_video = meson.is_subproject() #if not no_video stela_opts = ['poll=inline', 'event-buffer=false', 'pause=true'] if is_linux - stela_opts += get_option('sink-use-vulkan') ? 'window=glfw' : 'window=wayland' + stela_opts += get_option('renderer-api') == 'vulkan' ? 'window=glfw' : 'window=wayland' elif is_android stela_opts += 'window=glfm' - elif is_windows + elif is_windows and get_option('renderer-api') == 'dx11' stela_opts += 'window=win32' else stela_opts += 'window=glfw' endif - if get_option('sink-use-vulkan') + if get_option('renderer-api') == 'vulkan' stela_opts += 'api=vulkan' - elif get_option('sink-use-dx11') + elif get_option('renderer-api') == 'dx11' stela_opts += 'api=dx11' else stela_opts += get_option('renderer') == 'tiger' ? 'api=gles' : 'api=gl' endif - if get_option('sink-for-rpi') + if get_option('renderer-api') == 'gl-rpi' stela_opts += 'egl-brcm=true' endif stela = subproject('stela', default_options: stela_opts).get_variable('stela') diff --git a/meson_options.txt b/meson_options.txt index 83d4a18..a9053ce 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,11 +1,13 @@ -option('sink', type: 'feature', value: 'enabled') -option('sink-only', type: 'boolean', value: false) -option('sink-use-vulkan', type: 'boolean', value: false) -option('sink-use-dx11', type: 'boolean', value: false) -option('sink-for-rpi', type: 'boolean', value: false) option('codecs', type: 'array', choices: ['ffmpeg', 'stb_image', 'spng', 'wuffs'], value: ['ffmpeg']) +option('codec-hwaccel', type: 'feature', value: 'disabled') option('renderer', type: 'combo', choices: ['libplacebo', 'tiger'], value: 'libplacebo') +option('renderer-api', type: 'combo', choices: ['vulkan', 'dx11', 'gl', 'gl-rpi'], value: 'gl') +option('subtitles', type: 'feature', value: 'enabled') + option('portal', type: 'feature', value: 'disabled') option('server', type: 'feature', value: 'enabled') +option('sink', type: 'feature', value: 'enabled') +option('sink-only', type: 'boolean', value: false) option('client', type: 'feature', value: 'disabled') + option('tests', type: 'boolean', value: false) diff --git a/src/cache/meson.build b/src/cache/meson.build index 9c9af7b..1a198eb 100644 --- a/src/cache/meson.build +++ b/src/cache/meson.build @@ -19,23 +19,27 @@ if naunet_has_curl endif cache_have_cdio = false -libcdio_paranoia = dependency('libcdio_paranoia', required: false, allow_fallback: true) -libcdio_cdda = dependency('libcdio_cdda', required: false, allow_fallback: true) -if libcdio_paranoia.found() and libcdio_cdda.found() - cache_src += ['handlers/cdio.c'] - cache_deps += [libcdio_paranoia, libcdio_cdda] - cache_args += ['-DCACHE_HAVE_CDIO'] - cache_have_cdio = true +if is_linux + libcdio_paranoia = dependency('libcdio_paranoia', required: false, allow_fallback: true) + libcdio_cdda = dependency('libcdio_cdda', required: false, allow_fallback: true) + if libcdio_paranoia.found() and libcdio_cdda.found() + cache_src += ['handlers/cdio.c'] + cache_deps += [libcdio_paranoia, libcdio_cdda] + cache_args += ['-DCACHE_HAVE_CDIO'] + cache_have_cdio = true + endif endif cache_have_libdvd = false -libdvdcss = dependency('libdvdcss', required: false, allow_fallback: true) -libdvdread = dependency('dvdread', required: false, allow_fallback: true) -libdvdnav = dependency('dvdnav', required: false, allow_fallback: true) -if libdvdcss.found() and libdvdread.found() and libdvdnav.found() - cache_deps += [libdvdcss, libdvdread, libdvdnav] - cache_args += ['-DCACHE_HAVE_LIBDVD'] - cache_have_libdvd = true +if is_linux + libdvdcss = dependency('libdvdcss', required: false, allow_fallback: true) + libdvdread = dependency('dvdread', required: false, allow_fallback: true) + libdvdnav = dependency('dvdnav', required: false, allow_fallback: true) + if libdvdcss.found() and libdvdread.found() and libdvdnav.found() + cache_deps += [libdvdcss, libdvdread, libdvdnav] + cache_args += ['-DCACHE_HAVE_LIBDVD'] + cache_have_libdvd = true + endif endif cache = declare_dependency(sources: cache_src, dependencies: cache_deps, compile_args: cache_args) diff --git a/src/codec/ffmpeg/decoder.c b/src/codec/ffmpeg/decoder.c index 7401698..c22d1c1 100644 --- a/src/codec/ffmpeg/decoder.c +++ b/src/codec/ffmpeg/decoder.c @@ -256,14 +256,15 @@ static bool ff_decoder_init(struct camu_decoder *dec, struct camu_renderer *rend s32 cpus = 0; if (av->codec_context->codec_type == AVMEDIA_TYPE_VIDEO) { cpus = av_cpu_count(); - cpus = MIN(4, MAX(1, cpus / 2)); + cpus = MIN(6, MAX(1, cpus / 2)); } if (cpus > 0) { av->codec_context->thread_count = cpus; - // FF_THREAD_FRAME, FF_THREAD_SLICE or both. - // Slice seems to work better based on videos that get completely choked - // in frame-only or both (4k60 HEVC, FFmpeg 7.1.1, AMD 3900x). - av->codec_context->thread_type = FF_THREAD_SLICE; + // FF_THREAD_FRAME or FF_THREAD_SLICE. + // Both modes can get choked on certain videos, sometimes SLICE can squeeze + // out a little more performance but a higher thread_count with FRAME seems + // like the safest default. + av->codec_context->thread_type = FF_THREAD_FRAME; log_info("Using %i threads for decoder.", cpus); } } diff --git a/src/codec/ffmpeg/demuxer.c b/src/codec/ffmpeg/demuxer.c index 4cf52dd..b539577 100644 --- a/src/codec/ffmpeg/demuxer.c +++ b/src/codec/ffmpeg/demuxer.c @@ -57,7 +57,7 @@ static bool ff_demuxer_init(struct camu_demuxer *demux, struct cch_handle *handl // FFmpeg says the avio protocol configures "buffers and access patterns". // I think we already do enough buffering but, better access patterns for // network streams sounds like something we want. - s32 ret = avformat_open_input(&av->format_context, "file:", NULL, &opts); + s32 ret = avformat_open_input(&av->format_context, "cache:", NULL, &opts); if (ret < 0) { log_error("Failed to open input (%s).", av_err2str(ret)); av_dict_free(&opts); diff --git a/src/fruits/cmv/cmv.c b/src/fruits/cmv/cmv.c index 1b9c8c1..c5bb22a 100644 --- a/src/fruits/cmv/cmv.c +++ b/src/fruits/cmv/cmv.c @@ -129,7 +129,7 @@ s32 window_system_main(u32 argc, str *argv, void *extra) bool local = argc > 1; #else if (argc > 1) { - warn("Got arguments in a sink-only configuration."); + log_warn("Got arguments in a sink-only configuration."); } #endif diff --git a/src/liana/process.c b/src/liana/process.c index 0a9f030..c2e4ce4 100644 --- a/src/liana/process.c +++ b/src/liana/process.c @@ -49,14 +49,14 @@ bool lia_prepare_visual_data(struct cch_handle *handle, struct lia_visual_data * goto out; } - struct camu_codec_stream *stream; + struct camu_codec_stream *stream = NULL; al_array_foreach_ptr(demux->streams, i, stream) { if (stream->type == CAMU_STREAM_AUDIO) { demux->subscribed = 1 << stream->index; break; } } - if (demux->subscribed == 0) goto out; + if (!stream || demux->subscribed == 0) goto out; struct camu_resampler_format fmt; AVCodecParameters *codecpar = stream->av.stream->codecpar; diff --git a/src/libsink/sink.c b/src/libsink/sink.c index 392f6b9..07bb604 100644 --- a/src/libsink/sink.c +++ b/src/libsink/sink.c @@ -1003,7 +1003,7 @@ static void client_callback(void *userdata, u8 op, struct camu_codec_stream *str break; case CAMU_STREAM_SUBTITLE: if (!camu_video_buffer_configure_subtitles(&entry->video.buf, stream)) { - log_warn("Video buffer failed to configure subtitles."); + log_warn("Video buffer couldn't configure subtitles."); } break; case CAMU_STREAM_ATTACHMENT: { diff --git a/src/render/meson.build b/src/render/meson.build index 1dd2dce..98b86ec 100644 --- a/src/render/meson.build +++ b/src/render/meson.build @@ -21,7 +21,7 @@ elif get_option('renderer') == 'libplacebo' 'libdovi=disabled' ] - if get_option('sink-use-vulkan') or get_option('sink-use-dx11') + if get_option('renderer-api') == 'vulkan' or get_option('renderer-api') == 'dx11' shaderc = dependency('shaderc', required: false, allow_fallback: false) if shaderc.found() render_deps += [shaderc] @@ -74,9 +74,9 @@ elif get_option('renderer') == 'libplacebo' #endif endif - if get_option('sink-use-vulkan') + if get_option('renderer-api') == 'vulkan' libplacebo_opts += ['shaderc=enabled', 'vulkan=enabled', 'd3d11=disabled', 'opengl=disabled'] - elif get_option('sink-use-dx11') + elif get_option('renderer-api') == 'dx11' spirv_cross_opts = cmake.subproject_options() reltype = is_minsize ? 'MinSizeRel' : 'Release' spirv_cross_opts.add_cmake_defines({ 'CMAKE_BUILD_TYPE': is_debug ? 'Debug' : reltype }) @@ -106,53 +106,56 @@ elif get_option('renderer') == 'libplacebo' render_args += ['-DCAMU_RENDERER_LIBPLACEBO'] endif -libass = dependency('libass', required: false, allow_fallback: false) -if not libass.found() - libass_opts = [] - if not is_windows - libass_opts += ['fontconfig=enabled'] - # libass(e46aede):meson.build:126 - fontconfig = dependency('fontconfig', - version: '>=2.10.92', +if get_option('subtitles').enabled() + libass = dependency('libass', required: false, allow_fallback: false) + if not libass.found() + libass_opts = [] + if not is_windows + libass_opts += ['fontconfig=enabled'] + # libass(e46aede):meson.build:126 + fontconfig = dependency('fontconfig', + version: '>=2.10.92', + default_options: [ + 'doc=disabled', + 'nls=disabled', + 'tests=disabled', + 'tools=disabled', + 'cache-build=disabled' + ]) + endif + # libass(e46aede):meson.build:84 + # fontconfig(72b9a48):meson.build:28 + freetype = dependency('freetype2', + version: '>=9.17.3', + default_options: [ + 'harfbuzz=disabled' + ]) + # libass(e46aede):meson.build:90 + fribidi = dependency('fribidi', + version: '>=0.19.1', + default_options: [ + 'docs=false', + 'tests=false', + 'bin=false' + ]) + # freetype2(42608f7):meson.build:346 + harfbuz = dependency('harfbuzz', + version: '>=2.0.0', default_options: [ - 'doc=disabled', - 'nls=disabled', + 'freetype=disabled', 'tests=disabled', - 'tools=disabled', - 'cache-build=disabled' + 'introspection=disabled', + 'docs=disabled', + 'utilities=disabled', + 'glib=disabled', + 'gobject=disabled', + 'cairo=disabled', + 'chafa=disabled' ]) + libass = dependency('libass', default_options: libass_opts) endif - # libass(e46aede):meson.build:84 - # fontconfig(72b9a48):meson.build:28 - freetype = dependency('freetype2', - version: '>=9.17.3', - default_options: [ - 'harfbuzz=disabled' - ]) - # libass(e46aede):meson.build:90 - fribidi = dependency('fribidi', - version: '>=0.19.1', - default_options: [ - 'docs=false', - 'tests=false', - 'bin=false' - ]) - # freetype2(42608f7):meson.build:346 - harfbuz = dependency('harfbuzz', - version: '>=2.0.0', - default_options: [ - 'freetype=disabled', - 'tests=disabled', - 'introspection=disabled', - 'docs=disabled', - 'utilities=disabled', - 'glib=disabled', - 'gobject=disabled', - 'cairo=disabled', - 'chafa=disabled' - ]) - libass = dependency('libass', default_options: libass_opts) + render_deps += [libass] + render_args += ['-DCAMU_HAVE_SUBTITLES'] endif -render_deps += [libass] render = declare_dependency(sources: render_src, dependencies: render_deps, compile_args: render_args) diff --git a/src/render/queue_libplacebo.c b/src/render/queue_libplacebo.c index dd62975..8e17eb7 100644 --- a/src/render/queue_libplacebo.c +++ b/src/render/queue_libplacebo.c @@ -11,10 +11,11 @@ #include "queue_libplacebo.h" -static bool queue_lp_configure_subtitiles(struct camu_frame_queue *queue, u32 width, u32 height, +static bool queue_lp_configure_subtitles(struct camu_frame_queue *queue, u32 width, u32 height, struct camu_codec_stream *stream) { struct camu_frame_queue_lp *lq = (struct camu_frame_queue_lp *)queue; +#ifdef CAMU_HAVE_SUBTITLES if (!lq->ass) return false; lq->ass_renderer = ass_renderer_init(lq->ass); if (!lq->ass_renderer) { @@ -33,8 +34,15 @@ static bool queue_lp_configure_subtitiles(struct camu_frame_queue *queue, u32 wi ass_process_codec_private(lq->ass_track, (const char *)codecpar->extradata, codecpar->extradata_size); nn_mutex_init(&lq->subtitle_lock); - lq->have_subtitles = true; + lq->has_subtitles = true; return true; +#else + (void)lq; + (void)width; + (void)height; + (void)stream; + return false; +#endif } static bool map_frame(pl_gpu gpu, pl_tex *tex, const struct pl_source_frame *src, @@ -129,6 +137,7 @@ static void queue_lp_push(struct camu_frame_queue *queue, struct camu_codec_fram } #ifdef CAMU_HAVE_FFMPEG +#ifdef CAMU_HAVE_SUBTITLES static struct camu_overlay_lp *create_subtitle_overlay(pl_gpu gpu, ASS_Image *ass_frame) { struct camu_overlay_lp *overlay = al_alloc_object(struct camu_overlay_lp); @@ -202,6 +211,7 @@ static struct camu_overlay_lp *create_subtitle_overlay(pl_gpu gpu, ASS_Image *as return overlay; } +#endif static bool map_av_frame(pl_gpu gpu, pl_tex *tex, const struct pl_source_frame *src, struct pl_frame *out_frame) @@ -247,7 +257,8 @@ static bool map_av_frame(pl_gpu gpu, pl_tex *tex, const struct pl_source_frame * ((struct pl_source_frame *)src)->frame_data = NULL; - if (ok && lq->have_subtitles) { +#ifdef CAMU_HAVE_SUBTITLES + if (ok && lq->has_subtitles) { s64 now = av_rescale_q(frame->best_effort_timestamp, stream->time_base, (AVRational){ 1, 1000 }); nn_mutex_lock(&lq->subtitle_lock); s32 change; // 1 = different position, 2 = different content. @@ -267,6 +278,7 @@ static bool map_av_frame(pl_gpu gpu, pl_tex *tex, const struct pl_source_frame * } nn_mutex_unlock(&lq->subtitle_lock); } +#endif av_frame_free(&frame); @@ -329,10 +341,15 @@ static void queue_lp_push_subtitle(struct camu_frame_queue *queue, struct camu_c { struct camu_frame_queue_lp *lq = (struct camu_frame_queue_lp *)queue; AVPacket *pkt = packet->av.pkt; +#ifdef CAMU_HAVE_SUBTITLES nn_mutex_lock(&lq->subtitle_lock); al_assert(lq->ass_track && lq->ass_renderer); ass_process_chunk(lq->ass_track, (const char *)pkt->data, pkt->size, pkt->pts, pkt->duration); nn_mutex_unlock(&lq->subtitle_lock); +#else + (void)lq; + (void)pkt; +#endif } static void queue_lp_flush(struct camu_frame_queue *queue) @@ -376,11 +393,13 @@ static void queue_lp_reset(struct camu_frame_queue *queue) static void queue_lp_free(struct camu_frame_queue **queue) { struct camu_frame_queue_lp *lq = (struct camu_frame_queue_lp *)*queue; - if (lq->have_subtitles) { +#ifdef CAMU_HAVE_SUBTITLES + if (lq->has_subtitles) { ass_free_track(lq->ass_track); ass_renderer_done(lq->ass_renderer); nn_mutex_destroy(&lq->subtitle_lock); } +#endif if (lq->copy_frame_fallback) { av_frame_free(&lq->swframe); } @@ -393,8 +412,10 @@ struct camu_frame_queue *camu_frame_queue_lp_create(void) { struct camu_frame_queue_lp *lq = al_alloc_object(struct camu_frame_queue_lp); al_array_init(lq->overlays); - lq->have_subtitles = false; - lq->q.configure_subtitles = queue_lp_configure_subtitiles; +#ifdef CAMU_HAVE_SUBTITLES + lq->has_subtitles = false; +#endif + lq->q.configure_subtitles = queue_lp_configure_subtitles; lq->q.push = queue_lp_push; #ifdef CAMU_HAVE_FFMPEG lq->q.push_av_frame = queue_lp_push_av_frame; diff --git a/src/render/queue_libplacebo.h b/src/render/queue_libplacebo.h index 67d2479..eeb562f 100644 --- a/src/render/queue_libplacebo.h +++ b/src/render/queue_libplacebo.h @@ -2,7 +2,9 @@ #include <libplacebo/utils/frame_queue.h> #include <libplacebo/utils/upload.h> +#ifdef CAMU_HAVE_SUBTITLES #include <ass/ass.h> +#endif #include "../buffer/frame_queue.h" @@ -21,11 +23,13 @@ struct camu_frame_queue_lp { bool copy_frame_fallback; AVFrame *swframe; array(struct camu_overlay_lp *) overlays; +#ifdef CAMU_HAVE_SUBTITLES ASS_Library *ass; ASS_Renderer *ass_renderer; ASS_Track *ass_track; struct nn_mutex subtitle_lock; - bool have_subtitles; + bool has_subtitles; +#endif }; struct camu_frame_queue *camu_frame_queue_lp_create(void); diff --git a/src/render/renderer_libplacebo.c b/src/render/renderer_libplacebo.c index 71b156a..8f816b4 100644 --- a/src/render/renderer_libplacebo.c +++ b/src/render/renderer_libplacebo.c @@ -232,7 +232,9 @@ static bool renderer_lp_create_renderer(struct camu_renderer *renderer, u32 *wid lr->r.opaque = &lr->gpu; #endif +#ifdef CAMU_HAVE_SUBTITLES lr->ass = ass_library_init(); +#endif lr->last_render_tick = nn_get_tick(); @@ -253,17 +255,24 @@ static struct camu_frame_queue *renderer_lp_create_queue(struct camu_renderer *r lq->params.radius = pl_frame_mix_radius(&lr->params); lq->params.timeout = 0; lq->copy_frame_fallback = false; +#ifdef CAMU_HAVE_SUBTITLES lq->ass = lr->ass; +#endif return queue; } static void renderer_lp_add_font(struct camu_renderer *renderer, struct camu_codec_stream *attachment) { struct camu_renderer_lp *lr = (struct camu_renderer_lp *)renderer; +#ifdef CAMU_HAVE_SUBTITLES AVStream *stream = attachment->av.stream; AVDictionaryEntry *entry = av_dict_get(stream->metadata, "filename", NULL, 0); AVCodecParameters *codecpar = stream->codecpar; ass_add_font(lr->ass, entry->value, (const char *)codecpar->extradata, codecpar->extradata_size); +#else + (void)lr; + (void)attachment; +#endif } static u32 renderer_lp_get_latency(struct camu_renderer *renderer) @@ -389,7 +398,9 @@ void renderer_lp_free(struct camu_renderer **renderer) if (lr->gl) pl_opengl_destroy(&lr->gl); #endif if (lr->logger) pl_log_destroy(&lr->logger); +#ifdef CAMU_HAVE_SUBTITLES if (lr->ass) ass_library_done(lr->ass); +#endif al_free(lr); *renderer = NULL; } diff --git a/src/render/renderer_libplacebo.h b/src/render/renderer_libplacebo.h index 8a284d5..7b1cfa2 100644 --- a/src/render/renderer_libplacebo.h +++ b/src/render/renderer_libplacebo.h @@ -4,7 +4,9 @@ #include <libplacebo/renderer.h> #include <libplacebo/shaders/lut.h> #include <libplacebo/colorspace.h> +#ifdef CAMU_HAVE_SUBTITLES #include <ass/ass.h> +#endif #include "renderer.h" @@ -35,7 +37,9 @@ struct camu_renderer_lp { pl_renderer renderer; f64 last_render_tick; struct pl_render_params params; +#ifdef CAMU_HAVE_SUBTITLES ASS_Library *ass; +#endif }; struct camu_renderer *camu_renderer_lp_create(void); diff --git a/src/util/meson.build b/src/util/meson.build index a83a66a..c2c3c3d 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -1,11 +1,14 @@ util_src = ['color_palette.c'] -blake3 = dependency('libblake3', required: false, allow_fallback: false) -if not blake3.found() - blake3_opts = cmake.subproject_options() - reltype = is_minsize ? 'MinSizeRel' : 'Release' - blake3_opts.add_cmake_defines({ 'CMAKE_BUILD_TYPE': is_debug ? 'Debug' : reltype }) - blake3_opts.add_cmake_defines({ 'CMAKE_POSITION_INDEPENDENT_CODE': true }) - blake3 = cmake.subproject('BLAKE3', options: blake3_opts).dependency('blake3') +util_deps = [] +if get_option('portal').enabled() + blake3 = dependency('libblake3', required: false, allow_fallback: false) + if not blake3.found() + blake3_opts = cmake.subproject_options() + reltype = is_minsize ? 'MinSizeRel' : 'Release' + blake3_opts.add_cmake_defines({ 'CMAKE_BUILD_TYPE': is_debug ? 'Debug' : reltype }) + blake3_opts.add_cmake_defines({ 'CMAKE_POSITION_INDEPENDENT_CODE': true }) + blake3 = cmake.subproject('BLAKE3', options: blake3_opts).dependency('blake3') + endif + util_deps += [blake3] endif -util_deps = [blake3] util = declare_dependency(sources: util_src, dependencies: util_deps) diff --git a/subprojects/libnaunet.wrap b/subprojects/libnaunet.wrap index 4700180..c6bd17a 100644 --- a/subprojects/libnaunet.wrap +++ b/subprojects/libnaunet.wrap @@ -1,4 +1,4 @@ [wrap-git] url = https://git.akon.city/libnaunet -revision = 23ec05f871f53b724dc6eb5e1c62d0245109c69d +revision = ef86574ec5d859727695da65f683f0774a3b4460 depth = 1 diff --git a/subprojects/packagefiles/ffmpeg/meson.build b/subprojects/packagefiles/ffmpeg/meson.build index 71b539b..0ecae9e 100644 --- a/subprojects/packagefiles/ffmpeg/meson.build +++ b/subprojects/packagefiles/ffmpeg/meson.build @@ -74,27 +74,29 @@ parsers += ',png' bsfs = 'extract_extradata,mp3_header_decompress' hwaccels = '' -if get_option('sink-use-vulkan') - extra_options += ['--enable-vulkan'] - hwaccels += 'h264_vulkan,hevc_vulkan,av1_vulkan' -elif is_windows - extra_options += ['--enable-d3d11va'] - hwaccels += 'h264_d3d11va,hevc_d3d11va,av1_d3d11va,vp9_d3d11va' - hwaccels += ',h264_d3d11va2,hevc_d3d11va2,av1_d3d11va2,vp9_d3d11va2' - #extra_options += ['--enable-dxva2'] - #hwaccels += ',h264_dxva2,hevc_dxva2,av1_dxva2,vp9_dxva2' -elif is_android - extra_options += ['--enable-jni', '--enable-mediacodec'] - decoders += ',h264_mediacodec,hevc_mediacodec,av1_mediacodec,vp9_mediacodec' -elif is_linux - extra_options += ['--enable-vaapi'] +if get_option('codec-hwaccel').enabled() + if get_option('renderer-api') == 'vulkan' + extra_options += ['--enable-vulkan'] + hwaccels += 'h264_vulkan,hevc_vulkan,av1_vulkan' + elif is_windows + extra_options += ['--enable-d3d11va'] + hwaccels += 'h264_d3d11va,hevc_d3d11va,av1_d3d11va,vp9_d3d11va' + hwaccels += ',h264_d3d11va2,hevc_d3d11va2,av1_d3d11va2,vp9_d3d11va2' + #extra_options += ['--enable-dxva2'] + #hwaccels += ',h264_dxva2,hevc_dxva2,av1_dxva2,vp9_dxva2' + elif is_android + extra_options += ['--enable-jni', '--enable-mediacodec'] + decoders += ',h264_mediacodec,hevc_mediacodec,av1_mediacodec,vp9_mediacodec' + elif is_linux + extra_options += ['--enable-vaapi'] + endif endif if hwaccels != '' extra_options += ['--enable-hwaccel=' + hwaccels] endif -protocols = 'file,cache' +protocols = 'cache' if is_linux or is_mingw extra_options += ['--enable-libsoxr'] diff --git a/subprojects/stela.wrap b/subprojects/stela.wrap index 62748d5..c8a8139 100644 --- a/subprojects/stela.wrap +++ b/subprojects/stela.wrap @@ -1,4 +1,4 @@ [wrap-git] url = https://git.akon.city/stela -revision = e2304d573cbfa5fe3076b0f702e384bcf7229695 +revision = 7d4434ea4ceb1fa5c75f372a73ac6dfe5cb05b1d depth = 1 |