From 90e0930d820972802d1bb2fb27d7dded304483d6 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 9 Apr 2024 19:54:27 -0400 Subject: Cleanup Signed-off-by: Andrew Opalach --- .gitignore | 2 +- flake.nix | 4 ++-- scripts/cmv_add.sh | 2 +- src/buffer/audio.c | 4 ++-- src/buffer/video.c | 4 ++-- src/codec/ffmpeg/decoder.c | 6 +++++- src/fruits/sink/meson.build | 5 ++--- subprojects/libplacebo.wrap | 2 +- subprojects/packagefiles/ffmpeg/meson.build | 2 +- 9 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 44fe379..2fa2611 100644 --- a/.gitignore +++ b/.gitignore @@ -20,8 +20,8 @@ subprojects/glfw3.wrap subprojects/jansson/ subprojects/jansson.wrap subprojects/libakiyo -subprojects/libalabaster subprojects/libakiyo/ +subprojects/libalabaster subprojects/libalabaster/ subprojects/libass/ subprojects/libcdio-paranoia/ diff --git a/flake.nix b/flake.nix index f22c479..4035457 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ outputs = [ "out" "dev" ]; nativeBuildInputs = [ git - gcc13 + gcc nasm pkg-config autoconf @@ -130,8 +130,8 @@ gdb nasm pkg-config - meson ninja + meson cmake wineWowPackages.staging glslang diff --git a/scripts/cmv_add.sh b/scripts/cmv_add.sh index c48c07f..700b21b 100755 --- a/scripts/cmv_add.sh +++ b/scripts/cmv_add.sh @@ -12,4 +12,4 @@ do fi CMD="$CMD""$EXP\n" done -echo -e "$CMD""X" | socat - UNIX-CONNECT:/tmp/tree_sock +echo -e "$CMD""X" | socat - UNIX-CONNECT:/tmp/camu_sock diff --git a/src/buffer/audio.c b/src/buffer/audio.c index bfefed7..644be42 100644 --- a/src/buffer/audio.c +++ b/src/buffer/audio.c @@ -116,7 +116,7 @@ bool camu_audio_buffer_configure(struct camu_audio_buffer *buf, struct camu_stre #ifdef _DEBUG_ #define BUFFER_OCCUPIED_DEBUG(buf) \ - camu_ff_resample_fmt_bytes_to_sec(&buf->fmt, buf->size - al_ring_buffer_space(&buf->rb)) + camu_ff_resample_fmt_bytes_to_sec(&buf->fmt, al_ring_buffer_occupied(&buf->rb)) #else #define BUFFER_OCCUPIED_DEBUG(buf) 0 #endif @@ -203,7 +203,7 @@ void camu_audio_buffer_unpause(struct camu_audio_buffer *buf) buf->pause = PAUSE_PRE; } -// Not thread-safe, must be called while the buffer is not be read or written to. +// Not thread-safe, must be called while the buffer is not being read from or written to. void camu_audio_buffer_reset(struct camu_audio_buffer *buf) { al_atomic_size_t_store(&buf->continue_mark, 0, AL_ATOMIC_RELAXED); diff --git a/src/buffer/video.c b/src/buffer/video.c index ca8baab..390b181 100644 --- a/src/buffer/video.c +++ b/src/buffer/video.c @@ -77,7 +77,7 @@ static void after_push_internal(struct camu_video_buffer *buf) { s32 count = buf->queue->count(buf->queue); if (!buf->buffered && (buf->single_frame || count >= BUFFER_WATERMARK_BUFFERED)) { - // Preserve order of, flush -> callback -> set flow, for single frames. + // Preserve order of: flush -> callback -> set flow, for single frames. if (buf->single_frame) buf->queue->flush(buf->queue); buf->callback(buf->userdata, CAMU_BUFFER_BUFFERED); buf->buffered = true; @@ -135,7 +135,7 @@ void camu_video_buffer_push(struct camu_video_buffer *buf, struct camu_frame *fr after_push_internal(buf); } -// Not thread-safe, must be called while the buffer is not be read or written to. +// Not thread-safe, must be called while the buffer is not being read from or written to. void camu_video_buffer_reset(struct camu_video_buffer *buf) { buf->queue->reset(buf->queue); diff --git a/src/codec/ffmpeg/decoder.c b/src/codec/ffmpeg/decoder.c index e5236b5..7071bea 100644 --- a/src/codec/ffmpeg/decoder.c +++ b/src/codec/ffmpeg/decoder.c @@ -56,7 +56,11 @@ static bool ff_decoder_init(struct camu_decoder *dec, struct camu_renderer *rend goto err; } - al_log_info("ff_decoder", "Codec: %s (%s) %ldkbps.", codec->name, codec->long_name, codecpar->bit_rate / 1000); + if (codec->long_name) { + al_log_info("ff_decoder", "Codec: %s (%s) %ldkbps.", codec->name, codec->long_name, codecpar->bit_rate / 1000); + } else { + al_log_info("ff_decoder", "Codec: %s %ldkbps.", codec->name, codecpar->bit_rate / 1000); + } av->time_base = stream->av.stream->time_base; av->last_pts = 0; diff --git a/src/fruits/sink/meson.build b/src/fruits/sink/meson.build index 3986d7d..1dd9140 100644 --- a/src/fruits/sink/meson.build +++ b/src/fruits/sink/meson.build @@ -8,9 +8,8 @@ if use_tui sink_deps += [dependency('notcurses')] endif -if meson.is_cross_build() +if is_windows and meson.is_cross_build() sink_args += ['-static', '-static-libgcc', '-static-libstdc++', '-municode', '-mwindows'] endif -executable('sink', sink_src, dependencies: sink_deps, - c_args: sink_args, cpp_args: sink_args, link_args: sink_args) +executable('sink', sink_src, dependencies: sink_deps, link_args: sink_args) diff --git a/subprojects/libplacebo.wrap b/subprojects/libplacebo.wrap index ca8053f..962682a 100644 --- a/subprojects/libplacebo.wrap +++ b/subprojects/libplacebo.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://code.videolan.org/videolan/libplacebo.git -revision = 52314e0e435fbcb731e326815d4091ed0ba27475 +revision = 7b29435072143ee8b7e131947e055d3780ae4e47 clone-recursive = true depth = 1 diff --git a/subprojects/packagefiles/ffmpeg/meson.build b/subprojects/packagefiles/ffmpeg/meson.build index f47d35e..3fb1539 100644 --- a/subprojects/packagefiles/ffmpeg/meson.build +++ b/subprojects/packagefiles/ffmpeg/meson.build @@ -1,4 +1,4 @@ -project('ffmpeg', 'c', version: '6.1.1', meson_version: '>=0.57.0') +project('ffmpeg', 'c', version: '7.0', meson_version: '>=0.57.0') compiler = meson.get_compiler('c') -- cgit v1.2.3-101-g0448