From 87703222467173804ef3907a3d442fe010f23e95 Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 22 Dec 2025 17:09:46 -0500 Subject: [PATCH 001/110] ffmpeg6: remove package --- common/shlibs | 8 - srcpkgs/ffmpeg6-devel | 1 - ...decode-multiple-slice-params-buffers.patch | 159 ------------- ...the-same-slice-buffer-multiple-times.patch | 89 ------- .../patches/intel-media-driver-32bit.patch | 15 -- srcpkgs/ffmpeg6/patches/qt6-webengine.patch | 36 --- srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch | 16 -- srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch | 27 --- srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch | 17 -- srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch | 101 -------- srcpkgs/ffmpeg6/template | 217 ------------------ srcpkgs/ffplay6 | 1 - srcpkgs/libavcodec6 | 1 - srcpkgs/libavdevice6 | 1 - srcpkgs/libavfilter6 | 1 - srcpkgs/libavformat6 | 1 - srcpkgs/libavresample6 | 1 - srcpkgs/libavutil6 | 1 - srcpkgs/libpostproc6 | 1 - srcpkgs/libswresample6 | 1 - srcpkgs/libswscale6 | 1 - srcpkgs/removed-packages/template | 12 + 22 files changed, 12 insertions(+), 696 deletions(-) delete mode 120000 srcpkgs/ffmpeg6-devel delete mode 100644 srcpkgs/ffmpeg6/patches/00001-vaapi_decode-multiple-slice-params-buffers.patch delete mode 100644 srcpkgs/ffmpeg6/patches/00002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch delete mode 100644 srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch delete mode 100644 srcpkgs/ffmpeg6/patches/qt6-webengine.patch delete mode 100644 srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch delete mode 100644 srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch delete mode 100644 srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch delete mode 100644 srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch delete mode 100644 srcpkgs/ffmpeg6/template delete mode 120000 srcpkgs/ffplay6 delete mode 120000 srcpkgs/libavcodec6 delete mode 120000 srcpkgs/libavdevice6 delete mode 120000 srcpkgs/libavfilter6 delete mode 120000 srcpkgs/libavformat6 delete mode 120000 srcpkgs/libavresample6 delete mode 120000 srcpkgs/libavutil6 delete mode 120000 srcpkgs/libpostproc6 delete mode 120000 srcpkgs/libswresample6 delete mode 120000 srcpkgs/libswscale6 diff --git a/common/shlibs b/common/shlibs index eff504f95e145f..a04a1a95ec8ea4 100644 --- a/common/shlibs +++ b/common/shlibs @@ -399,14 +399,6 @@ libid3tag.so.0 libid3tag-0.16.4_1 libgif.so.7 giflib-5.1.0_1 libImlib2.so.1 imlib2-1.4.2_1 libmp3lame.so.0 lame-3.98.2_1 -libavdevice.so.60 libavdevice6-6.0_1 -libavformat.so.60 libavformat6-6.0_1 -libswscale.so.7 libswscale6-6.0_1 -libswresample.so.4 libswresample6-6.0_1 -libpostproc.so.57 libpostproc6-6.0_1 -libavcodec.so.60 libavcodec6-6.0_1 -libavutil.so.58 libavutil6-6.0_1 -libavfilter.so.9 libavfilter6-6.0_1 libdispatch.so libdispatch-5.10.1_1 libBlocksRuntime.so libdispatch-5.10.1_1 libavdevice.so.58 libavdevice-4.0_1 diff --git a/srcpkgs/ffmpeg6-devel b/srcpkgs/ffmpeg6-devel deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/ffmpeg6-devel +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/ffmpeg6/patches/00001-vaapi_decode-multiple-slice-params-buffers.patch b/srcpkgs/ffmpeg6/patches/00001-vaapi_decode-multiple-slice-params-buffers.patch deleted file mode 100644 index 2350577fd6ec58..00000000000000 --- a/srcpkgs/ffmpeg6/patches/00001-vaapi_decode-multiple-slice-params-buffers.patch +++ /dev/null @@ -1,159 +0,0 @@ -diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c -index d0339b2..6f33f03 100644 ---- a/libavcodec/vaapi_av1.c -+++ b/libavcodec/vaapi_av1.c -@@ -421,7 +421,7 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - .tg_end = s->tg_end, - }; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, - sizeof(VASliceParameterBufferAV1), - buffer, - size); -diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c -index 134f10e..c6d90ac 100644 ---- a/libavcodec/vaapi_decode.c -+++ b/libavcodec/vaapi_decode.c -@@ -61,6 +61,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, - int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - VAAPIDecodePicture *pic, - const void *params_data, -+ int nb_params, - size_t params_size, - const void *slice_data, - size_t slice_size) -@@ -89,7 +90,7 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - - vas = vaCreateBuffer(ctx->hwctx->display, ctx->va_context, - VASliceParameterBufferType, -- params_size, 1, (void*)params_data, -+ params_size, nb_params, (void*)params_data, - &pic->slice_buffers[index]); - if (vas != VA_STATUS_SUCCESS) { - av_log(avctx, AV_LOG_ERROR, "Failed to create slice " -diff --git a/libavcodec/vaapi_decode.h b/libavcodec/vaapi_decode.h -index 6beda14..22c8c54 100644 ---- a/libavcodec/vaapi_decode.h -+++ b/libavcodec/vaapi_decode.h -@@ -73,6 +73,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, - int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - VAAPIDecodePicture *pic, - const void *params_data, -+ int nb_params, - size_t params_size, - const void *slice_data, - size_t slice_size); -diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c -index 9332aa6..0536ee8 100644 ---- a/libavcodec/vaapi_h264.c -+++ b/libavcodec/vaapi_h264.c -@@ -375,7 +375,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx, - slice_param.chroma_offset_l1); - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err) { - ff_vaapi_decode_cancel(avctx, pic); -diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c -index 20fb36a..6f022a7 100644 ---- a/libavcodec/vaapi_hevc.c -+++ b/libavcodec/vaapi_hevc.c -@@ -305,7 +305,7 @@ static int vaapi_hevc_end_frame(AVCodecContext *avctx) - if (pic->last_size) { - last_slice_param->LongSliceFlags.fields.LastSliceOfPic = 1; - ret = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, -- &pic->last_slice_param, slice_param_size, -+ &pic->last_slice_param, 1, slice_param_size, - pic->last_buffer, pic->last_size); - if (ret < 0) - goto fail; -@@ -423,7 +423,7 @@ static int vaapi_hevc_decode_slice(AVCodecContext *avctx, - - if (!sh->first_slice_in_pic_flag) { - err = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, -- &pic->last_slice_param, slice_param_size, -+ &pic->last_slice_param, 1, slice_param_size, - pic->last_buffer, pic->last_size); - pic->last_buffer = NULL; - pic->last_size = 0; -diff --git a/libavcodec/vaapi_mjpeg.c b/libavcodec/vaapi_mjpeg.c -index 8158211..3ee1663 100644 ---- a/libavcodec/vaapi_mjpeg.c -+++ b/libavcodec/vaapi_mjpeg.c -@@ -131,7 +131,7 @@ static int vaapi_mjpeg_decode_slice(AVCodecContext *avctx, - sp.components[i].ac_table_selector = s->ac_index[i]; - } - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), buffer, size); -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), buffer, size); - if (err) - goto fail; - -diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c -index 5e2b889..8b37239 100644 ---- a/libavcodec/vaapi_mpeg2.c -+++ b/libavcodec/vaapi_mpeg2.c -@@ -162,7 +162,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); -diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c -index 4e74e03..d2e1d15 100644 ---- a/libavcodec/vaapi_mpeg4.c -+++ b/libavcodec/vaapi_mpeg4.c -@@ -169,7 +169,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); -diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c -index fb2132e..a4933c9 100644 ---- a/libavcodec/vaapi_vc1.c -+++ b/libavcodec/vaapi_vc1.c -@@ -490,7 +490,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); -diff --git a/libavcodec/vaapi_vp8.c b/libavcodec/vaapi_vp8.c -index 5b18bf8..3c16e6d 100644 ---- a/libavcodec/vaapi_vp8.c -+++ b/libavcodec/vaapi_vp8.c -@@ -209,7 +209,7 @@ static int vaapi_vp8_decode_slice(AVCodecContext *avctx, - for (i = 0; i < 8; i++) - sp.partition_size[i+1] = s->coeff_partition_size[i]; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), data, data_size); -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), data, data_size); - if (err) - goto fail; - -diff --git a/libavcodec/vaapi_vp9.c b/libavcodec/vaapi_vp9.c -index 776382f..237f6c5 100644 ---- a/libavcodec/vaapi_vp9.c -+++ b/libavcodec/vaapi_vp9.c -@@ -158,7 +158,7 @@ static int vaapi_vp9_decode_slice(AVCodecContext *avctx, - } - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err) { - ff_vaapi_decode_cancel(avctx, pic); diff --git a/srcpkgs/ffmpeg6/patches/00002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch b/srcpkgs/ffmpeg6/patches/00002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch deleted file mode 100644 index aae66d8921dfe3..00000000000000 --- a/srcpkgs/ffmpeg6/patches/00002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c -index d0339b2..c4b55cb 100644 ---- a/libavcodec/vaapi_av1.c -+++ b/libavcodec/vaapi_av1.c -@@ -19,6 +19,7 @@ - */ - - #include "libavutil/frame.h" -+#include "libavutil/mem.h" - #include "hwaccel_internal.h" - #include "vaapi_decode.h" - #include "internal.h" -@@ -43,6 +44,9 @@ typedef struct VAAPIAV1DecContext { - */ - VAAPIAV1FrameRef ref_tab[AV1_NUM_REF_FRAMES]; - AVFrame *tmp_frame; -+ -+ int nb_slice_params; -+ VASliceParameterBufferAV1 *slice_params; - } VAAPIAV1DecContext; - - static VASurfaceID vaapi_av1_surface_id(AV1Frame *vf) -@@ -109,6 +113,8 @@ static int vaapi_av1_decode_uninit(AVCodecContext *avctx) - av_frame_free(&ctx->ref_tab[i].frame); - } - -+ av_freep(&ctx->slice_params); -+ - return ff_vaapi_decode_uninit(avctx); - } - -@@ -405,13 +411,24 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - { - const AV1DecContext *s = avctx->priv_data; - VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private; -- VASliceParameterBufferAV1 slice_param; -- int err = 0; -+ VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; -+ int err, nb_params; -+ -+ nb_params = s->tg_end - s->tg_start + 1; -+ if (ctx->nb_slice_params < nb_params) { -+ ctx->slice_params = av_realloc_array(ctx->slice_params, -+ nb_params, -+ sizeof(*ctx->slice_params)); -+ if (!ctx->slice_params) { -+ ctx->nb_slice_params = 0; -+ err = AVERROR(ENOMEM); -+ goto fail; -+ } -+ ctx->nb_slice_params = nb_params; -+ } - - for (int i = s->tg_start; i <= s->tg_end; i++) { -- memset(&slice_param, 0, sizeof(VASliceParameterBufferAV1)); -- -- slice_param = (VASliceParameterBufferAV1) { -+ ctx->slice_params[i - s->tg_start] = (VASliceParameterBufferAV1) { - .slice_data_size = s->tile_group_info[i].tile_size, - .slice_data_offset = s->tile_group_info[i].tile_offset, - .slice_data_flag = VA_SLICE_DATA_FLAG_ALL, -@@ -421,17 +438,19 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - .tg_end = s->tg_end, - }; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, -- sizeof(VASliceParameterBufferAV1), -- buffer, -- size); -- if (err) { -- ff_vaapi_decode_cancel(avctx, pic); -- return err; -- } - } -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, ctx->slice_params, nb_params, -+ sizeof(VASliceParameterBufferAV1), -+ buffer, -+ size); -+ if (err) -+ goto fail; - - return 0; -+ -+fail: -+ ff_vaapi_decode_cancel(avctx, pic); -+ return err; - } - - const AVHWAccel ff_av1_vaapi_hwaccel = { diff --git a/srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch b/srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch deleted file mode 100644 index 8e40e554f6a225..00000000000000 --- a/srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix type to be consistent with intel-media-driver - -diff -rup libavutil/hwcontext_vaapi.c.orig libavutil/hwcontext_vaapi.c ---- a/libavutil/hwcontext_vaapi.c -+++ b/libavutil/hwcontext_vaapi.c -@@ -1203,7 +1203,7 @@ static int vaapi_map_from_drm(AVHWFrames - - if (!use_prime2 || vas != VA_STATUS_SUCCESS) { - int k; -- unsigned long buffer_handle; -+ uintptr_t buffer_handle; - VASurfaceAttribExternalBuffers buffer_desc; - VASurfaceAttrib buffer_attrs[2] = { - { - diff --git a/srcpkgs/ffmpeg6/patches/qt6-webengine.patch b/srcpkgs/ffmpeg6/patches/qt6-webengine.patch deleted file mode 100644 index c0b397ba849438..00000000000000 --- a/srcpkgs/ffmpeg6/patches/qt6-webengine.patch +++ /dev/null @@ -1,36 +0,0 @@ -https://aur.archlinux.org/cgit/aur.git/tree/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch?h=ffmpeg-intel-full-git -diff --git a/libavformat/avformat.h b/libavformat/avformat.h -index cd7b0d941c..b4a6dce885 100644 ---- a/libavformat/avformat.h -+++ b/libavformat/avformat.h -@@ -1025,6 +1025,10 @@ - - #define AV_PROGRAM_RUNNING 1 - -+// Chromium: We use the internal field first_dts vvv -+int64_t av_stream_get_first_dts(const AVStream *st); -+// Chromium: We use the internal field first_dts ^^^ -+ - /** - * New fields can be added to the end with minor version bumps. - * Removal, reordering and changes to existing fields require a major - -diff --git a/libavformat/utils.c b/libavformat/utils.c -index de7580c32d..0ef0fe530e 100644 ---- a/libavformat/utils.c -+++ b/libavformat/utils.c -@@ -152,6 +152,13 @@ - return AV_CODEC_ID_NONE; - } - -+// Chromium: We use the internal field first_dts vvv -+int64_t av_stream_get_first_dts(const AVStream *st) -+{ -+ return cffstream(st)->first_dts; -+} -+// Chromium: We use the internal field first_dts ^^^ -+ - enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags) - { - if (bps <= 0 || bps > 64) - diff --git a/srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch b/srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch deleted file mode 100644 index 6ada631ab692bb..00000000000000 --- a/srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c -index 79b28eb4df546..43fe531fde74d 100644 ---- a/libavcodec/libsvtav1.c -+++ b/libavcodec/libsvtav1.c -@@ -435,7 +435,11 @@ static av_cold int eb_enc_init(AVCodecContext *avctx) - - svt_enc->eos_flag = EOS_NOT_REACHED; - -+#if SVT_AV1_CHECK_VERSION(3, 0, 0) -+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params); -+#else - svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params); -+#endif - if (svt_ret != EB_ErrorNone) { - return svt_print_error(avctx, svt_ret, "Error initializing encoder handle"); - } diff --git a/srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch b/srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch deleted file mode 100644 index efa0e33f3aa604..00000000000000 --- a/srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a5d4c398b411a00ac09d8fe3b66117222323844c Mon Sep 17 00:00:00 2001 -From: Christopher Degawa -Date: Wed, 21 Jan 2026 00:12:59 -0600 -Subject: [PATCH] avcodec/libsvtav1: rename aq_mode for v4.0.0 - -Signed-off-by: Christopher Degawa -Signed-off-by: James Almer ---- - libavcodec/libsvtav1.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c -index 7047b72422fb3..90c61b98a1bf3 100644 ---- a/libavcodec/libsvtav1.c -+++ b/libavcodec/libsvtav1.c -@@ -237,7 +237,11 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, - } else if (svt_enc->qp > 0) { - param->qp = svt_enc->qp; - param->rate_control_mode = 0; -+#if SVT_AV1_CHECK_VERSION(4, 0, 0) -+ param->aq_mode = 0; -+#else - param->enable_adaptive_quantization = 0; -+#endif - } - - desc = av_pix_fmt_desc_get(avctx->pix_fmt); diff --git a/srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch b/srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch deleted file mode 100644 index e4c9b1eb6c8f5b..00000000000000 --- a/srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch +++ /dev/null @@ -1,17 +0,0 @@ -libv4l2.h uses #ifdef, not #if - -diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c -index 42d4b97c8f701..0ae68723382f4 100644 ---- a/libavdevice/v4l2.c -+++ b/libavdevice/v4l2.c -@@ -47,6 +47,10 @@ - #include "v4l2-common.h" - #include - -+#if ! HAVE_POSIX_IOCTL -+#undef HAVE_POSIX_IOCTL -+#endif -+ - #if CONFIG_LIBV4L2 - #include - #endif diff --git a/srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch b/srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch deleted file mode 100644 index c968e47329c086..00000000000000 --- a/srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 2f24f10d9cf34ddce274496c4daa73f732d370c1 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Wed, 20 Dec 2023 12:32:43 +0000 -Subject: [PATCH] libavcodec: fix -Wint-conversion in vulkan -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -FIx warnings (soon to be errors in GCC 14, already so in Clang 15): -``` -src/libavcodec/vulkan_av1.c: In function ‘vk_av1_create_params’: -src/libavcodec/vulkan_av1.c:183:43: error: initialization of ‘long long unsigned int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] - 183 | .videoSessionParametersTemplate = NULL, - | ^~~~ -src/libavcodec/vulkan_av1.c:183:43: note: (near initialization for ‘(anonymous).videoSessionParametersTemplate’) -``` - -Use Vulkan's VK_NULL_HANDLE instead of bare NULL. - -Fix Trac ticket #10724. - -Was reported downstream in Gentoo at https://bugs.gentoo.org/919067. - -Signed-off-by: Sam James ---- - libavcodec/vulkan_av1.c | 2 +- - libavcodec/vulkan_decode.c | 6 +++--- - libavcodec/vulkan_h264.c | 2 +- - libavcodec/vulkan_hevc.c | 2 +- - libavcodec/vulkan_video.c | 2 +- - 5 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c -index 4998bf7ebc55f..9730e4b08dd40 100644 ---- a/libavcodec/vulkan_av1.c -+++ b/libavcodec/vulkan_av1.c -@@ -180,7 +180,7 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf) - .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - .pNext = &av1_params, - .videoSession = ctx->common.session, -- .videoSessionParametersTemplate = NULL, -+ .videoSessionParametersTemplate = VK_NULL_HANDLE, - }; - - err = ff_vk_decode_create_params(buf, avctx, ctx, &session_params_create); -diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c -index a89d84fcaa972..fdbcbb450a1e0 100644 ---- a/libavcodec/vulkan_decode.c -+++ b/libavcodec/vulkan_decode.c -@@ -188,9 +188,9 @@ int ff_vk_decode_prepare_frame(FFVulkanDecodeContext *dec, AVFrame *pic, - return 0; - - vkpic->dpb_frame = NULL; -- vkpic->img_view_ref = NULL; -- vkpic->img_view_out = NULL; -- vkpic->img_view_dest = NULL; -+ vkpic->img_view_ref = VK_NULL_HANDLE; -+ vkpic->img_view_out = VK_NULL_HANDLE; -+ vkpic->img_view_dest = VK_NULL_HANDLE; - - vkpic->destroy_image_view = vk->DestroyImageView; - vkpic->wait_semaphores = vk->WaitSemaphores; -diff --git a/libavcodec/vulkan_h264.c b/libavcodec/vulkan_h264.c -index e727aafb162d3..39c123ddca57e 100644 ---- a/libavcodec/vulkan_h264.c -+++ b/libavcodec/vulkan_h264.c -@@ -315,7 +315,7 @@ static int vk_h264_create_params(AVCodecContext *avctx, AVBufferRef **buf) - .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - .pNext = &h264_params, - .videoSession = ctx->common.session, -- .videoSessionParametersTemplate = NULL, -+ .videoSessionParametersTemplate = VK_NULL_HANDLE, - }; - - /* SPS list */ -diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c -index 99fdcf3b45839..033172cbd6958 100644 ---- a/libavcodec/vulkan_hevc.c -+++ b/libavcodec/vulkan_hevc.c -@@ -653,7 +653,7 @@ static int vk_hevc_create_params(AVCodecContext *avctx, AVBufferRef **buf) - .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - .pNext = &h265_params, - .videoSession = ctx->common.session, -- .videoSessionParametersTemplate = NULL, -+ .videoSessionParametersTemplate = VK_NULL_HANDLE, - }; - - HEVCHeaderSet *hdr; -diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c -index 5fa8292b28eaf..fb20315db4bbf 100644 ---- a/libavcodec/vulkan_video.c -+++ b/libavcodec/vulkan_video.c -@@ -287,7 +287,7 @@ av_cold void ff_vk_video_common_uninit(FFVulkanContext *s, - if (common->session) { - vk->DestroyVideoSessionKHR(s->hwctx->act_dev, common->session, - s->hwctx->alloc); -- common->session = NULL; -+ common->session = VK_NULL_HANDLE; - } - - if (common->nb_mem && common->mem) diff --git a/srcpkgs/ffmpeg6/template b/srcpkgs/ffmpeg6/template deleted file mode 100644 index 36fb029efb67cc..00000000000000 --- a/srcpkgs/ffmpeg6/template +++ /dev/null @@ -1,217 +0,0 @@ -# Template file for 'ffmpeg6' -# audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname! -pkgname=ffmpeg6 -version=6.1.6 -revision=1 -hostmakedepends="pkg-config perl" -makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel - libXext-devel libXvMC-devel libxcb-devel lame-devel libtheora-devel - libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel libsoxr-devel - libcdio-paranoia-devel librtmp-devel libopenmpt-devel gnutls-devel - speex-devel celt-devel harfbuzz-devel libass-devel opus-devel ocl-icd-devel - libbs2b-devel libvidstab-devel vmaf-devel libbluray-devel pulseaudio-devel - x265-devel v4l-utils-devel libvpx-devel libaom-devel libdav1d-devel - libwebp-devel libdrm-devel srt-devel librist-devel vulkan-loader-devel - zimg-devel libmysofa-devel libsvt-av1-devel libjxl-devel - $(vopt_if vdpau libvdpau-devel) $(vopt_if fdk_aac fdk-aac-devel) - $(vopt_if libvpl libvpl-devel) $(vopt_if nvcodec nv-codec-headers) - $(vopt_if vaapi libva-devel)" -depends="ffplay6>=${version}_${revision}" -short_desc="Decoding, encoding and streaming software" -maintainer="Orphaned " -license="GPL-3.0-or-later" -homepage="https://www.ffmpeg.org" -changelog="https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog" -distfiles="https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz" -checksum=d4fcb164028dd3beee5d92c0ac72e46aac6973c75ea12dc14de07bf8f407370a - -build_options="vaapi vdpau fdk_aac nvcodec libvpl" -desc_option_sofa="Enable support for AES SOFA" - -case "$XBPS_TARGET_MACHINE" in - i686*) - build_options_default+=" vaapi vdpau nvcodec" - hostmakedepends+=" nasm" - ;; - x86_64*) - hostmakedepends+=" nasm" - build_options_default+=" vaapi vdpau nvcodec libvpl" - ;; - ppc64*) build_options_default+=" vaapi vdpau";; - mips*) CFLAGS="-mnan=legacy";; -esac - -_apply_patch() { - local args="$1" pname="$(basename $2)" - - if [ ! -f ".${pname}_done" ]; then - patch -N $args -i $2 - touch .${pname}_done - fi -} - -post_patch() { - case "$XBPS_TARGET_MACHINE" in - ppc64le*) ;; - ppc*) _apply_patch -p1 ${FILESDIR}/altivec.patch ;; - esac -} - -do_configure() { - # Fix gcc on x86_64-musl only - if [ "$XBPS_TARGET_MACHINE" = "x86_64-musl" ]; then - vsed -i configure -e "s;_cflags_speed='-O3';_cflags_speed='-O2';" - fi - - if [ "$CROSS_BUILD" ]; then - case "$XBPS_TARGET_MACHINE" in - arm*) _arch="arm";; - aarch64*) _arch="aarch64";; - mips*) _arch="mips";; - ppc64*) _arch="ppc64";; - ppc*) _arch="ppc";; - *) _arch="${XBPS_TARGET_MACHINE%%-musl}";; - esac - - _args+=" --enable-cross-compile - --sysroot=$XBPS_CROSS_BASE - --cross-prefix=${XBPS_CROSS_TRIPLET}- - --target-os=linux --arch=${_arch}" - fi - - case "$XBPS_TARGET_MACHINE" in - ppc|ppc-musl) _args+=" --disable-altivec";; - esac - - ./configure --prefix=/usr --disable-debug --enable-gpl --enable-gnutls \ - --disable-stripping \ - --enable-libcdio --enable-version3 --enable-runtime-cpudetect \ - --enable-libmp3lame --enable-libvorbis --enable-libxvid \ - --enable-libx264 --enable-libvpx --enable-libtheora \ - --enable-shared --enable-static --enable-libxcb \ - --enable-libpulse --enable-libfreetype --enable-libopenmpt \ - --enable-libspeex --enable-libcelt --enable-libass \ - --enable-libopus --enable-librtmp --enable-libjack \ - --disable-libopencore_amrnb --disable-libopencore_amrwb \ - --disable-libopenjpeg --enable-libbluray --enable-libsoxr \ - --enable-postproc --enable-opencl --enable-libvmaf ${_args} \ - --enable-libx265 --enable-libv4l2 --enable-libaom \ - --enable-libbs2b --enable-libvidstab --enable-libdav1d \ - --enable-libsrt --enable-librist --enable-libwebp \ - --enable-vulkan --enable-libdrm --enable-libsvtav1 \ - --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig \ - --enable-libjxl \ - $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ - $(vopt_enable vaapi) $(vopt_enable vdpau) \ - $(vopt_enable zimg libzimg) \ - $(vopt_enable sofa libmysofa) \ - $(vopt_enable libvpl libvpl) \ - $(vopt_enable nvcodec nvenc) \ - $(vopt_enable nvcodec nvdec) -} - -do_build() { - make ${makejobs} - make doc/ff{mpeg,play}.1 -} - -do_install() { - make DESTDIR=${DESTDIR} install install-man -} - -libavcodec6_package() { - short_desc="FFmpeg codec library" - pkg_install() { - vmove "usr/lib/libavcodec.so.*" - } -} - -libavdevice6_package() { - short_desc="FFmpeg device handling library" - pkg_install() { - vmove "usr/lib/libavdevice.so.*" - } -} - -libavresample6_package() { - short_desc="Package deprecated, removal needed" - metapackage=yes -} - -libavformat6_package() { - short_desc="FFmpeg file format library" - pkg_install() { - vmove "usr/lib/libavformat.so.*" - } -} - -libavutil6_package() { - short_desc="FFmpeg utility library" - pkg_install() { - vmove "usr/lib/libavutil.so.*" - } -} - -libavfilter6_package() { - short_desc="FFmpeg audio/video filter library" - pkg_install() { - vmove "usr/lib/libavfilter.so.*" - } -} - -libpostproc6_package() { - short_desc="FFmpeg video postprocessing library" - pkg_install() { - vmove "usr/lib/libpostproc.so.*" - } -} - -libswscale6_package() { - short_desc="FFmpeg video scaling library" - pkg_install() { - vmove "usr/lib/libswscale.so.*" - } -} - -libswresample6_package() { - short_desc="FFmpeg video resampling library" - pkg_install() { - vmove "usr/lib/libswresample.so.*" - } -} - -ffmpeg6-devel_package() { - depends=" - libavcodec6>=${version}_${revision} - libavdevice6>=${version}_${revision} - libavformat6>=${version}_${revision} - libavutil6>=${version}_${revision} - libavfilter6>=${version}_${revision} - libpostproc6>=${version}_${revision} - libswscale6>=${version}_${revision} - libswresample6>=${version}_${revision}" - short_desc+=" - development files" - conflicts="ffmpeg-devel" - replaces="ffmpeg-devel>=0" - case "$XBPS_TARGET_MACHINE" in - i686*) - # /usr/bin/strip: error: the input file '/destdir//ffmpeg-devel-4.4.4/usr/lib/libavfilter.a(vf_atadenoise.o)' has no sections - nostrip_files="/usr/lib/libavfilter.a";; - esac - pkg_install() { - vmove usr/include - vmove usr/lib/pkgconfig - vmove "usr/lib/*.a" - vmove "usr/lib/*.so" - vmove usr/share/ffmpeg/examples - vmove usr/share/man/man3 - } -} - -ffplay6_package() { - short_desc="Simple video player using FFmpeg and SDL2" - pkg_install() { - vmove usr/bin/ffplay - vmove "usr/share/man/man1/ffplay*" - } -} diff --git a/srcpkgs/ffplay6 b/srcpkgs/ffplay6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/ffplay6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavcodec6 b/srcpkgs/libavcodec6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavcodec6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavdevice6 b/srcpkgs/libavdevice6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavdevice6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavfilter6 b/srcpkgs/libavfilter6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavfilter6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavformat6 b/srcpkgs/libavformat6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavformat6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavresample6 b/srcpkgs/libavresample6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavresample6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavutil6 b/srcpkgs/libavutil6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavutil6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libpostproc6 b/srcpkgs/libpostproc6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libpostproc6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libswresample6 b/srcpkgs/libswresample6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libswresample6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libswscale6 b/srcpkgs/libswscale6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libswscale6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template index 384805132ed981..c8da0b34520f65 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -158,6 +158,9 @@ replaces=" epstopdf<=2.27_3 escrotum<=0.2.1_2 fah<=7.6.13_1 + ffmpeg6<=6.1.3_4 + ffmpeg6-devel<=6.1.3_4 + ffplay6<=6.1.3_4 fingerprint-gui<=1.09_3 flang17-devel<=17.0.6_5 flang17<=17.0.6_5 @@ -419,6 +422,12 @@ replaces=" libapp<=20140527_2 libasr-devel<=1.0.4_1 libasr<=1.0.4_1 + libavcodec6<=6.1.3_4 + libavdevice6<=6.1.3_4 + libavfilter6<=6.1.3_4 + libavformat6<=6.1.3_4 + libavresample6<=6.1.3_4 + libavutil6<=6.1.3_4 libbitcoin-blockchain-devel<=3.6.0_10 libbitcoin-blockchain<=3.6.0_10 libbitcoin-client-devel<=3.6.0_10 @@ -510,6 +519,7 @@ replaces=" libpoppler89<=0.80.0_1 libportal-qt5-devel<=0.9.1_2 libportal-qt5<=0.9.1_2 + libpostproc6<=6.1.3_4 libproxy-python3<=0.4.18_4 libproxy-python<=0.4.18_1 libpurple-hangouts<=20190606_1 @@ -531,6 +541,8 @@ replaces=" libspa-ffmpeg<=0.3.32_1 libspotify-devel<=12.1.51_2 libspotify<=12.1.51_2 + libswresample6<=6.1.3_4 + libswscale6<=6.1.3_4 libtaginfo-devel<=0.2.1_2 libtaginfo<=0.2.1_2 libtorrent-rasterbar-python<=1.2.2_1 From f55c4ca278993f8ca2dff8dc3ee765f7c15d417e Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 22 Dec 2025 17:12:43 -0500 Subject: [PATCH 002/110] New package: ffmpeg4-4.4.6 --- common/shlibs | 18 +- srcpkgs/ffmpeg4-devel | 1 + srcpkgs/ffmpeg4/files/altivec.patch | 60 +++++ .../patches/intel-media-driver-32bit.patch | 15 ++ srcpkgs/ffmpeg4/patches/svt-av1-3.0.patch | 16 ++ srcpkgs/ffmpeg4/patches/v4l2-fix-glibc.patch | 17 ++ srcpkgs/ffmpeg4/patches/vulkan-gcc14.patch | 13 + srcpkgs/ffmpeg4/template | 239 ++++++++++++++++++ srcpkgs/ffplay4 | 1 + srcpkgs/libavcodec4 | 1 + srcpkgs/libavdevice4 | 1 + srcpkgs/libavfilter4 | 1 + srcpkgs/libavformat4 | 1 + srcpkgs/libavresample4 | 1 + srcpkgs/libavutil4 | 1 + srcpkgs/libpostproc4 | 1 + srcpkgs/libswresample4 | 1 + srcpkgs/libswscale4 | 1 + 18 files changed, 380 insertions(+), 9 deletions(-) create mode 120000 srcpkgs/ffmpeg4-devel create mode 100644 srcpkgs/ffmpeg4/files/altivec.patch create mode 100644 srcpkgs/ffmpeg4/patches/intel-media-driver-32bit.patch create mode 100644 srcpkgs/ffmpeg4/patches/svt-av1-3.0.patch create mode 100644 srcpkgs/ffmpeg4/patches/v4l2-fix-glibc.patch create mode 100644 srcpkgs/ffmpeg4/patches/vulkan-gcc14.patch create mode 100644 srcpkgs/ffmpeg4/template create mode 120000 srcpkgs/ffplay4 create mode 120000 srcpkgs/libavcodec4 create mode 120000 srcpkgs/libavdevice4 create mode 120000 srcpkgs/libavfilter4 create mode 120000 srcpkgs/libavformat4 create mode 120000 srcpkgs/libavresample4 create mode 120000 srcpkgs/libavutil4 create mode 120000 srcpkgs/libpostproc4 create mode 120000 srcpkgs/libswresample4 create mode 120000 srcpkgs/libswscale4 diff --git a/common/shlibs b/common/shlibs index a04a1a95ec8ea4..c3c6404bb9d842 100644 --- a/common/shlibs +++ b/common/shlibs @@ -401,15 +401,15 @@ libImlib2.so.1 imlib2-1.4.2_1 libmp3lame.so.0 lame-3.98.2_1 libdispatch.so libdispatch-5.10.1_1 libBlocksRuntime.so libdispatch-5.10.1_1 -libavdevice.so.58 libavdevice-4.0_1 -libavformat.so.58 libavformat-4.0_1 -libswscale.so.5 libswscale-4.0_1 -libswresample.so.3 libswresample-4.0_1 -libavresample.so.4 libavresample-4.0_1 -libpostproc.so.55 libpostproc-4.0_1 -libavcodec.so.58 libavcodec-4.0_1 -libavutil.so.56 libavutil-4.0_1 -libavfilter.so.7 libavfilter-4.0_1 +libavdevice.so.58 libavdevice4-4.4.6_1 +libavformat.so.58 libavformat4-4.4.6_1 +libswscale.so.5 libswscale4-4.4.6_1 +libswresample.so.3 libswresample4-4.4.6_1 +libavresample.so.4 libavresample4-4.4.6_1 +libpostproc.so.55 libpostproc4-4.4.6_1 +libavcodec.so.58 libavcodec4-4.4.6_1 +libavutil.so.56 libavutil4-4.4.6_1 +libavfilter.so.7 libavfilter4-4.4.6_1 libSDL-1.2.so.0 sdl12-compat-1.2.68_1 libSDL_image-1.2.so.0 SDL_image-1.2.10_1 libx264.so.165 x264-20250402.165_1 diff --git a/srcpkgs/ffmpeg4-devel b/srcpkgs/ffmpeg4-devel new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/ffmpeg4-devel @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/ffmpeg4/files/altivec.patch b/srcpkgs/ffmpeg4/files/altivec.patch new file mode 100644 index 00000000000000..9c57200463320e --- /dev/null +++ b/srcpkgs/ffmpeg4/files/altivec.patch @@ -0,0 +1,60 @@ +revert some altivec specific change on all ppc* except ppc64le* + +q66: "We should also throw in a revert of FFmpeg/FFmpeg@3a557c5 but only +conditionally, for ppc* but not ppc64le* (the new code is valid for +POWER8 VSX which LE targets as a baseline but not BE)" + + +This reverts commit 3a557c5d88b7b15b5954ba2743febb055549b536. +--- + libswscale/ppc/yuv2rgb_altivec.c | 24 ++++++++++++++++++++---- + 1 file changed, 20 insertions(+), 4 deletions(-) + +diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c +index 536545293d..c1e2852adb 100644 +--- a/libswscale/ppc/yuv2rgb_altivec.c ++++ b/libswscale/ppc/yuv2rgb_altivec.c +@@ -305,6 +305,9 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ + vector signed short R1, G1, B1; \ + vector unsigned char R, G, B; \ + \ ++ const vector unsigned char *y1ivP, *y2ivP, *uivP, *vivP; \ ++ vector unsigned char align_perm; \ ++ \ + vector signed short lCY = c->CY; \ + vector signed short lOY = c->OY; \ + vector signed short lCRV = c->CRV; \ +@@ -335,13 +338,26 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ + vec_dstst(oute, (0x02000002 | (((w * 3 + 32) / 32) << 16)), 1); \ + \ + for (j = 0; j < w / 16; j++) { \ +- y0 = vec_xl(0, y1i); \ ++ y1ivP = (const vector unsigned char *) y1i; \ ++ y2ivP = (const vector unsigned char *) y2i; \ ++ uivP = (const vector unsigned char *) ui; \ ++ vivP = (const vector unsigned char *) vi; \ ++ \ ++ align_perm = vec_lvsl(0, y1i); \ ++ y0 = (vector unsigned char) \ ++ vec_perm(y1ivP[0], y1ivP[1], align_perm); \ + \ +- y1 = vec_xl(0, y2i); \ ++ align_perm = vec_lvsl(0, y2i); \ ++ y1 = (vector unsigned char) \ ++ vec_perm(y2ivP[0], y2ivP[1], align_perm); \ + \ +- u = (vector signed char) vec_xl(0, ui); \ ++ align_perm = vec_lvsl(0, ui); \ ++ u = (vector signed char) \ ++ vec_perm(uivP[0], uivP[1], align_perm); \ + \ +- v = (vector signed char) vec_xl(0, vi); \ ++ align_perm = vec_lvsl(0, vi); \ ++ v = (vector signed char) \ ++ vec_perm(vivP[0], vivP[1], align_perm); \ + \ + u = (vector signed char) \ + vec_sub(u, \ +-- +2.27.0 + diff --git a/srcpkgs/ffmpeg4/patches/intel-media-driver-32bit.patch b/srcpkgs/ffmpeg4/patches/intel-media-driver-32bit.patch new file mode 100644 index 00000000000000..567169f0e4afae --- /dev/null +++ b/srcpkgs/ffmpeg4/patches/intel-media-driver-32bit.patch @@ -0,0 +1,15 @@ +Fix type to be consistent with intel-media-driver + +diff -rup libavutil/hwcontext_vaapi.c.orig libavutil/hwcontext_vaapi.c +--- a/libavutil/hwcontext_vaapi.c ++++ b/libavutil/hwcontext_vaapi.c +@@ -1032,7 +1032,7 @@ static int vaapi_map_from_drm(AVHWFrames + uint32_t va_fourcc; + int err, i, j, k; + +- unsigned long buffer_handle; ++ uintptr_t buffer_handle; + VASurfaceAttribExternalBuffers buffer_desc; + VASurfaceAttrib attrs[2] = { + { + diff --git a/srcpkgs/ffmpeg4/patches/svt-av1-3.0.patch b/srcpkgs/ffmpeg4/patches/svt-av1-3.0.patch new file mode 100644 index 00000000000000..6ada631ab692bb --- /dev/null +++ b/srcpkgs/ffmpeg4/patches/svt-av1-3.0.patch @@ -0,0 +1,16 @@ +diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c +index 79b28eb4df546..43fe531fde74d 100644 +--- a/libavcodec/libsvtav1.c ++++ b/libavcodec/libsvtav1.c +@@ -435,7 +435,11 @@ static av_cold int eb_enc_init(AVCodecContext *avctx) + + svt_enc->eos_flag = EOS_NOT_REACHED; + ++#if SVT_AV1_CHECK_VERSION(3, 0, 0) ++ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params); ++#else + svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params); ++#endif + if (svt_ret != EB_ErrorNone) { + return svt_print_error(avctx, svt_ret, "Error initializing encoder handle"); + } diff --git a/srcpkgs/ffmpeg4/patches/v4l2-fix-glibc.patch b/srcpkgs/ffmpeg4/patches/v4l2-fix-glibc.patch new file mode 100644 index 00000000000000..e4c9b1eb6c8f5b --- /dev/null +++ b/srcpkgs/ffmpeg4/patches/v4l2-fix-glibc.patch @@ -0,0 +1,17 @@ +libv4l2.h uses #ifdef, not #if + +diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c +index 42d4b97c8f701..0ae68723382f4 100644 +--- a/libavdevice/v4l2.c ++++ b/libavdevice/v4l2.c +@@ -47,6 +47,10 @@ + #include "v4l2-common.h" + #include + ++#if ! HAVE_POSIX_IOCTL ++#undef HAVE_POSIX_IOCTL ++#endif ++ + #if CONFIG_LIBV4L2 + #include + #endif diff --git a/srcpkgs/ffmpeg4/patches/vulkan-gcc14.patch b/srcpkgs/ffmpeg4/patches/vulkan-gcc14.patch new file mode 100644 index 00000000000000..d8da6251db05f7 --- /dev/null +++ b/srcpkgs/ffmpeg4/patches/vulkan-gcc14.patch @@ -0,0 +1,13 @@ +diff -rup libavutil/hwcontext_vulkan.c.orig libavutil/hwcontext_vulkan.c +--- a/libavutil/hwcontext_vulkan.c ++++ b/libavutil/hwcontext_vulkan.c +@@ -862,7 +862,7 @@ static void free_exec_ctx(AVHWFramesCont + + av_freep(&cmd->queues); + av_freep(&cmd->bufs); +- cmd->pool = NULL; ++ cmd->pool = VK_NULL_HANDLE; + } + + static VkCommandBuffer get_buf_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd) + diff --git a/srcpkgs/ffmpeg4/template b/srcpkgs/ffmpeg4/template new file mode 100644 index 00000000000000..d3df92e3c04f61 --- /dev/null +++ b/srcpkgs/ffmpeg4/template @@ -0,0 +1,239 @@ +# Template file for 'ffmpeg4' +# audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname! +pkgname=ffmpeg4 +version=4.4.6 +revision=5 +metapackage=yes +hostmakedepends="pkg-config perl" +makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel + libXext-devel libXvMC-devel libxcb-devel lame-devel libtheora-devel + libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel + libcdio-paranoia-devel librtmp-devel libmodplug-devel gnutls-devel + speex-devel celt-devel harfbuzz-devel libass-devel opus-devel ocl-icd-devel + libbs2b-devel libvidstab-devel libbluray-devel + $(vopt_if pulseaudio pulseaudio-devel) + $(vopt_if vaapi libva-devel) $(vopt_if vdpau libvdpau-devel) + $(vopt_if x265 x265-devel) $(vopt_if v4l2 v4l-utils-devel) + $(vopt_if fdk_aac fdk-aac-devel) $(vopt_if vpx libvpx-devel) + $(vopt_if aom libaom-devel) $(vopt_if sndio sndio-devel) + $(vopt_if dav1d libdav1d-devel) $(vopt_if zimg zimg-devel) + $(vopt_if webp libwebp-devel) $(vopt_if sofa libmysofa-devel) + $(vopt_if drm libdrm-devel) libsvt-av1-devel + $(vopt_if srt srt-devel) $(vopt_if rist librist-devel) + $(vopt_if vulkan 'vulkan-loader-devel') + $(vopt_if nvenc nv-codec-headers12.0) $(vopt_if nvdec nv-codec-headers12.0)" +# ffmpeg provides ffmpeg, ffprobe, ffplay, etc +depends="ffmpeg" +short_desc="Decoding, encoding and streaming software (transitional dummy package)" +maintainer="zlice " +license="GPL-3.0-or-later" +homepage="https://www.ffmpeg.org" +changelog="https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog" +distfiles="https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz" +checksum=2290461f467c08ab801731ed412d8e724a5511d6c33173654bd9c1d2e25d0617 + +build_options="x265 v4l2 vaapi vdpau vpx fdk_aac aom nvenc sndio pulseaudio + dav1d zimg webp sofa vulkan drm srt rist nvdec" +build_options_default="x265 v4l2 vpx aom sndio pulseaudio dav1d webp vulkan drm srt rist" + +desc_option_srt="Enable support for SRT (Secure, Reliable, Transport)" +desc_option_rist="Enable support for RIST (Reliable Internet Stream Transport)" +desc_option_sofa="Enable support for AES SOFA" +desc_option_webp="Enable support for WebP" + +case "$XBPS_TARGET_MACHINE" in + i686*|x86_64*) + hostmakedepends+=" nasm" + build_options_default+=" vaapi vdpau nvenc nvdec" + ;; + ppc64*) build_options_default+=" vaapi vdpau";; + mips*) CFLAGS="-mnan=legacy";; +esac + +_apply_patch() { + local args="$1" pname="$(basename $2)" + + if [ ! -f ".${pname}_done" ]; then + patch -N $args -i $2 + touch .${pname}_done + fi +} + +post_patch() { + case "$XBPS_TARGET_MACHINE" in + ppc64le*) ;; + ppc*) _apply_patch -p1 ${FILESDIR}/altivec.patch ;; + esac +} + +do_configure() { + # Fix gcc on x86_64-musl only + if [ "$XBPS_TARGET_MACHINE" = "x86_64-musl" ]; then + vsed -i configure -e "s;_cflags_speed='-O3';_cflags_speed='-O2';" + fi + + if [ "$CROSS_BUILD" ]; then + case "$XBPS_TARGET_MACHINE" in + arm*) _arch="arm";; + aarch64*) _arch="aarch64";; + mips*) _arch="mips";; + ppc64*) _arch="ppc64";; + ppc*) _arch="ppc";; + *) _arch="${XBPS_TARGET_MACHINE%%-musl}";; + esac + + _args+=" --enable-cross-compile + --sysroot=$XBPS_CROSS_BASE + --cross-prefix=${XBPS_CROSS_TRIPLET}- + --target-os=linux --arch=${_arch}" + fi + + case "$XBPS_TARGET_MACHINE" in + ppc|ppc-musl) _args+=" --disable-altivec";; + esac + + if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then + _args+=" --extra-libs=-latomic" + fi + + ./configure --prefix=/usr --disable-debug --enable-gpl --enable-gnutls \ + --disable-stripping \ + --enable-libcdio --enable-version3 --enable-runtime-cpudetect \ + --enable-libmp3lame --enable-libvorbis --enable-libxvid \ + --enable-libx264 $(vopt_enable vpx libvpx) --enable-libtheora \ + --enable-shared --enable-static --enable-libxcb \ + $(vopt_enable pulseaudio libpulse) --enable-libfreetype --enable-libmodplug \ + --enable-libspeex --enable-libcelt --enable-libass \ + --enable-libopus --enable-librtmp --enable-libjack \ + $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ + --disable-libopencore_amrnb --disable-libopencore_amrwb \ + --disable-libopenjpeg --enable-libbluray --enable-libsvtav1 \ + --enable-postproc --enable-opencl --disable-libvmaf ${_args} \ + $(vopt_enable x265 libx265) \ + $(vopt_enable v4l2 libv4l2) \ + $(vopt_enable aom libaom) $(vopt_enable vaapi) $(vopt_enable vdpau) \ + --enable-libbs2b --enable-avresample --enable-libvidstab \ + $(vopt_enable dav1d libdav1d) \ + $(vopt_enable zimg libzimg) \ + $(vopt_enable webp libwebp) \ + $(vopt_enable sofa libmysofa) \ + $(vopt_enable vulkan) \ + $(vopt_enable drm libdrm) \ + $(vopt_enable srt libsrt) \ + $(vopt_enable rist librist) \ + $(vopt_if nvenc '--enable-nvenc') \ + $(vopt_if nvdec '--enable-nvdec') +} + +do_build() { + make ${makejobs} +} + +# transitional dummy package for ffmpeg +# binaries conflict with main ffmpeg +do_install() { + make DESTDIR=${DESTDIR} install + rm -rf ${DESTDIR}/usr/bin + rm -rf ${DESTDIR}/usr/share/man/man1 + rm -rf ${DESTDIR}/usr/share/ffmpeg/ffprobe.xsd + rm -rf ${DESTDIR}/usr/share/ffmpeg/libvpx*ffpreset +} + +libavcodec4_package() { + short_desc="FFmpeg codec library" + pkg_install() { + vmove "usr/lib/libavcodec.so.*" + } +} + +libavdevice4_package() { + short_desc="FFmpeg device handling library" + pkg_install() { + vmove "usr/lib/libavdevice.so.*" + } +} + +libavresample4_package() { + short_desc="FFmpeg audio resampling library" + pkg_install() { + vmove "usr/lib/libavresample.so.*" + } +} + +libavformat4_package() { + short_desc="FFmpeg file format library" + pkg_install() { + vmove "usr/lib/libavformat.so.*" + } +} + +libavutil4_package() { + short_desc="FFmpeg utility library" + pkg_install() { + vmove "usr/lib/libavutil.so.*" + } +} + +libavfilter4_package() { + short_desc="FFmpeg audio/video filter library" + pkg_install() { + vmove "usr/lib/libavfilter.so.*" + } +} + +libpostproc4_package() { + short_desc="FFmpeg video postprocessing library" + pkg_install() { + vmove "usr/lib/libpostproc.so.*" + } +} + +libswscale4_package() { + short_desc="FFmpeg video scaling library" + pkg_install() { + vmove "usr/lib/libswscale.so.*" + } +} + +libswresample4_package() { + short_desc="FFmpeg video resampling library" + pkg_install() { + vmove "usr/lib/libswresample.so.*" + } +} + +ffmpeg4-devel_package() { + depends=" + libavcodec4>=${version}_${revision} + libavdevice4>=${version}_${revision} + libavformat4>=${version}_${revision} + libavutil4>=${version}_${revision} + libavfilter4>=${version}_${revision} + libpostproc4>=${version}_${revision} + libswscale4>=${version}_${revision} + libswresample4>=${version}_${revision} + libavresample4>=${version}_${revision}" + short_desc="Decoding, encoding and streaming software - development files" + conflicts="ffmpeg-devel" + replaces="ffmpeg-devel>=0" + case "$XBPS_TARGET_MACHINE" in + i686*) + # /usr/bin/strip: error: the input file '/destdir//ffmpeg-devel-4.4.4/usr/lib/libavfilter.a(vf_atadenoise.o)' has no sections + nostrip_files="/usr/lib/libavfilter.a";; + esac + + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove usr/share/ffmpeg/examples + vmove usr/share/man/man3 + } +} + +ffplay4_package() { + short_desc="Simple video player using FFmpeg and SDL2 (transitional dummy package)" + metapackage=yes + depends="ffplay" +} diff --git a/srcpkgs/ffplay4 b/srcpkgs/ffplay4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/ffplay4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/libavcodec4 b/srcpkgs/libavcodec4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/libavcodec4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/libavdevice4 b/srcpkgs/libavdevice4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/libavdevice4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/libavfilter4 b/srcpkgs/libavfilter4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/libavfilter4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/libavformat4 b/srcpkgs/libavformat4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/libavformat4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/libavresample4 b/srcpkgs/libavresample4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/libavresample4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/libavutil4 b/srcpkgs/libavutil4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/libavutil4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/libpostproc4 b/srcpkgs/libpostproc4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/libpostproc4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/libswresample4 b/srcpkgs/libswresample4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/libswresample4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file diff --git a/srcpkgs/libswscale4 b/srcpkgs/libswscale4 new file mode 120000 index 00000000000000..887f354e7c6be3 --- /dev/null +++ b/srcpkgs/libswscale4 @@ -0,0 +1 @@ +ffmpeg4 \ No newline at end of file From 20090a7acce57686183f5a98c6682a68af23d405 Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 22 Dec 2025 17:15:35 -0500 Subject: [PATCH 003/110] ffmpeg: update to 8.1 --- common/shlibs | 7 + srcpkgs/ffmpeg/files/altivec.patch | 60 --------- ...av_stream_get_first_dts-for-chromium.patch | 46 +++++++ .../patches/intel-media-driver-32bit.patch | 15 --- srcpkgs/ffmpeg/patches/posix-ioctl.patch | 30 +++++ srcpkgs/ffmpeg/patches/svt-av1-3.0.patch | 16 --- srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch | 17 --- srcpkgs/ffmpeg/patches/vulkan-gcc14.patch | 13 -- srcpkgs/ffmpeg/template | 127 +++++++----------- srcpkgs/libpostproc | 1 - srcpkgs/removed-packages/template | 1 + 11 files changed, 132 insertions(+), 201 deletions(-) delete mode 100644 srcpkgs/ffmpeg/files/altivec.patch create mode 100644 srcpkgs/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch delete mode 100644 srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch create mode 100644 srcpkgs/ffmpeg/patches/posix-ioctl.patch delete mode 100644 srcpkgs/ffmpeg/patches/svt-av1-3.0.patch delete mode 100644 srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch delete mode 100644 srcpkgs/ffmpeg/patches/vulkan-gcc14.patch delete mode 120000 srcpkgs/libpostproc diff --git a/common/shlibs b/common/shlibs index c3c6404bb9d842..7f21ebfab2954a 100644 --- a/common/shlibs +++ b/common/shlibs @@ -410,6 +410,13 @@ libpostproc.so.55 libpostproc4-4.4.6_1 libavcodec.so.58 libavcodec4-4.4.6_1 libavutil.so.56 libavutil4-4.4.6_1 libavfilter.so.7 libavfilter4-4.4.6_1 +libavdevice.so.62 libavdevice-8.0.1_1 +libavformat.so.62 libavformat-8.0.1_1 +libswscale.so.9 libswscale-8.0.1_1 +libswresample.so.6 libswresample-8.0.1_1 +libavcodec.so.62 libavcodec-8.0.1_1 +libavutil.so.60 libavutil-8.0.1_1 +libavfilter.so.11 libavfilter-8.0.1_1 libSDL-1.2.so.0 sdl12-compat-1.2.68_1 libSDL_image-1.2.so.0 SDL_image-1.2.10_1 libx264.so.165 x264-20250402.165_1 diff --git a/srcpkgs/ffmpeg/files/altivec.patch b/srcpkgs/ffmpeg/files/altivec.patch deleted file mode 100644 index 9c57200463320e..00000000000000 --- a/srcpkgs/ffmpeg/files/altivec.patch +++ /dev/null @@ -1,60 +0,0 @@ -revert some altivec specific change on all ppc* except ppc64le* - -q66: "We should also throw in a revert of FFmpeg/FFmpeg@3a557c5 but only -conditionally, for ppc* but not ppc64le* (the new code is valid for -POWER8 VSX which LE targets as a baseline but not BE)" - - -This reverts commit 3a557c5d88b7b15b5954ba2743febb055549b536. ---- - libswscale/ppc/yuv2rgb_altivec.c | 24 ++++++++++++++++++++---- - 1 file changed, 20 insertions(+), 4 deletions(-) - -diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c -index 536545293d..c1e2852adb 100644 ---- a/libswscale/ppc/yuv2rgb_altivec.c -+++ b/libswscale/ppc/yuv2rgb_altivec.c -@@ -305,6 +305,9 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ - vector signed short R1, G1, B1; \ - vector unsigned char R, G, B; \ - \ -+ const vector unsigned char *y1ivP, *y2ivP, *uivP, *vivP; \ -+ vector unsigned char align_perm; \ -+ \ - vector signed short lCY = c->CY; \ - vector signed short lOY = c->OY; \ - vector signed short lCRV = c->CRV; \ -@@ -335,13 +338,26 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ - vec_dstst(oute, (0x02000002 | (((w * 3 + 32) / 32) << 16)), 1); \ - \ - for (j = 0; j < w / 16; j++) { \ -- y0 = vec_xl(0, y1i); \ -+ y1ivP = (const vector unsigned char *) y1i; \ -+ y2ivP = (const vector unsigned char *) y2i; \ -+ uivP = (const vector unsigned char *) ui; \ -+ vivP = (const vector unsigned char *) vi; \ -+ \ -+ align_perm = vec_lvsl(0, y1i); \ -+ y0 = (vector unsigned char) \ -+ vec_perm(y1ivP[0], y1ivP[1], align_perm); \ - \ -- y1 = vec_xl(0, y2i); \ -+ align_perm = vec_lvsl(0, y2i); \ -+ y1 = (vector unsigned char) \ -+ vec_perm(y2ivP[0], y2ivP[1], align_perm); \ - \ -- u = (vector signed char) vec_xl(0, ui); \ -+ align_perm = vec_lvsl(0, ui); \ -+ u = (vector signed char) \ -+ vec_perm(uivP[0], uivP[1], align_perm); \ - \ -- v = (vector signed char) vec_xl(0, vi); \ -+ align_perm = vec_lvsl(0, vi); \ -+ v = (vector signed char) \ -+ vec_perm(vivP[0], vivP[1], align_perm); \ - \ - u = (vector signed char) \ - vec_sub(u, \ --- -2.27.0 - diff --git a/srcpkgs/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch b/srcpkgs/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch new file mode 100644 index 00000000000000..351ebb24157652 --- /dev/null +++ b/srcpkgs/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch @@ -0,0 +1,46 @@ +Patch-Source: https://github.com/archlinux/svntogit-packages/blob/afdf00ac125851675c1599ab46545f6c58cfb655/trunk/add-av_stream_get_first_dts-for-chromium.patch +From 95aab0fd83619408995720ce53d7a74790580220 Mon Sep 17 00:00:00 2001 +From: "liberato@chromium.org" +Date: Wed, 7 Jul 2021 19:01:22 -0700 +Subject: [PATCH] Add av_stream_get_first_dts for Chromium + +[foutrelis: adjust for new FFStream struct replacing AVStreamInternal] +--- + libavformat/avformat.h | 4 ++++ + libavformat/utils.c | 7 +++++++ + 2 files changed, 11 insertions(+) + +diff --git a/libavformat/avformat.h b/libavformat/avformat.h +index 56c1c80..75221d9 100644 +--- a/libavformat/avformat.h ++++ b/libavformat/avformat.h +@@ -1202,6 +1202,10 @@ typedef struct AVStreamGroup { + + struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st); ++// Chromium: We use the internal field first_dts ^^^ ++ + #define AV_PROGRAM_RUNNING 1 + + /** +diff --git a/libavformat/demux_utils.c b/libavformat/demux_utils.c +index 86f5512..8b535a8 100644 +--- a/libavformat/demux_utils.c ++++ b/libavformat/demux_utils.c +@@ -29,6 +29,13 @@ + #include "demux.h" + #include "internal.h" + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st) ++{ ++ return cffstream(st)->first_dts; ++} ++// Chromium: We use the internal field first_dts ^^^ ++ + struct AVCodecParserContext *av_stream_get_parser(const AVStream *st) + { + return cffstream(st)->parser; + diff --git a/srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch b/srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch deleted file mode 100644 index 567169f0e4afae..00000000000000 --- a/srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix type to be consistent with intel-media-driver - -diff -rup libavutil/hwcontext_vaapi.c.orig libavutil/hwcontext_vaapi.c ---- a/libavutil/hwcontext_vaapi.c -+++ b/libavutil/hwcontext_vaapi.c -@@ -1032,7 +1032,7 @@ static int vaapi_map_from_drm(AVHWFrames - uint32_t va_fourcc; - int err, i, j, k; - -- unsigned long buffer_handle; -+ uintptr_t buffer_handle; - VASurfaceAttribExternalBuffers buffer_desc; - VASurfaceAttrib attrs[2] = { - { - diff --git a/srcpkgs/ffmpeg/patches/posix-ioctl.patch b/srcpkgs/ffmpeg/patches/posix-ioctl.patch new file mode 100644 index 00000000000000..1ce4076fcfdb03 --- /dev/null +++ b/srcpkgs/ffmpeg/patches/posix-ioctl.patch @@ -0,0 +1,30 @@ +commit 6408745f54ada32bad44227e6b4173e46641afaa +Author: q66 +Date: Tue Nov 11 18:12:01 2025 +0100 + fix posix ioctl on musl + + The libv4l2 is built with posix ioctl but to make it known to + the header the macro needs to be defined which is unfortunate. + + ffmpeg had it work for a while but then it broke when this + commit was introduced: + + https://github.com/FFmpeg/FFmpeg/commit/5fea5e3e11d6ff425db48f44489916399822aece + + due to the macro previously being accidentally defined + +zlice - original was LIBV4L_HAVE_POSIX_IOCTL - which is not in libv4l2.h +diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c +index c38ecbb..3457b43 100644 +--- a/libavdevice/v4l2.c ++++ b/libavdevice/v4l2.c +@@ -49,6 +49,9 @@ + #include + + #if CONFIG_LIBV4L2 ++#if HAVE_IOCTL_POSIX ++#define HAVE_POSIX_IOCTL ++#endif + #include + #endif + diff --git a/srcpkgs/ffmpeg/patches/svt-av1-3.0.patch b/srcpkgs/ffmpeg/patches/svt-av1-3.0.patch deleted file mode 100644 index 6ada631ab692bb..00000000000000 --- a/srcpkgs/ffmpeg/patches/svt-av1-3.0.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c -index 79b28eb4df546..43fe531fde74d 100644 ---- a/libavcodec/libsvtav1.c -+++ b/libavcodec/libsvtav1.c -@@ -435,7 +435,11 @@ static av_cold int eb_enc_init(AVCodecContext *avctx) - - svt_enc->eos_flag = EOS_NOT_REACHED; - -+#if SVT_AV1_CHECK_VERSION(3, 0, 0) -+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params); -+#else - svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params); -+#endif - if (svt_ret != EB_ErrorNone) { - return svt_print_error(avctx, svt_ret, "Error initializing encoder handle"); - } diff --git a/srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch b/srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch deleted file mode 100644 index e4c9b1eb6c8f5b..00000000000000 --- a/srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch +++ /dev/null @@ -1,17 +0,0 @@ -libv4l2.h uses #ifdef, not #if - -diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c -index 42d4b97c8f701..0ae68723382f4 100644 ---- a/libavdevice/v4l2.c -+++ b/libavdevice/v4l2.c -@@ -47,6 +47,10 @@ - #include "v4l2-common.h" - #include - -+#if ! HAVE_POSIX_IOCTL -+#undef HAVE_POSIX_IOCTL -+#endif -+ - #if CONFIG_LIBV4L2 - #include - #endif diff --git a/srcpkgs/ffmpeg/patches/vulkan-gcc14.patch b/srcpkgs/ffmpeg/patches/vulkan-gcc14.patch deleted file mode 100644 index d8da6251db05f7..00000000000000 --- a/srcpkgs/ffmpeg/patches/vulkan-gcc14.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -rup libavutil/hwcontext_vulkan.c.orig libavutil/hwcontext_vulkan.c ---- a/libavutil/hwcontext_vulkan.c -+++ b/libavutil/hwcontext_vulkan.c -@@ -862,7 +862,7 @@ static void free_exec_ctx(AVHWFramesCont - - av_freep(&cmd->queues); - av_freep(&cmd->bufs); -- cmd->pool = NULL; -+ cmd->pool = VK_NULL_HANDLE; - } - - static VkCommandBuffer get_buf_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd) - diff --git a/srcpkgs/ffmpeg/template b/srcpkgs/ffmpeg/template index b500d962b3610e..c7c3ad7df15e9c 100644 --- a/srcpkgs/ffmpeg/template +++ b/srcpkgs/ffmpeg/template @@ -1,50 +1,40 @@ # Template file for 'ffmpeg' # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname! pkgname=ffmpeg -version=4.4.6 -revision=5 -metapackage=yes +version=8.1 +revision=1 hostmakedepends="pkg-config perl" makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel libXext-devel libXvMC-devel libxcb-devel lame-devel libtheora-devel - libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel - libcdio-paranoia-devel librtmp-devel libmodplug-devel gnutls-devel + libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel libsoxr-devel + libcdio-paranoia-devel librtmp-devel libopenmpt-devel gnutls-devel speex-devel celt-devel harfbuzz-devel libass-devel opus-devel ocl-icd-devel - libbs2b-devel libvidstab-devel libbluray-devel - $(vopt_if pulseaudio pulseaudio-devel) - $(vopt_if vaapi libva-devel) $(vopt_if vdpau libvdpau-devel) - $(vopt_if x265 x265-devel) $(vopt_if v4l2 v4l-utils-devel) - $(vopt_if fdk_aac fdk-aac-devel) $(vopt_if vpx libvpx-devel) - $(vopt_if aom libaom-devel) $(vopt_if sndio sndio-devel) - $(vopt_if dav1d libdav1d-devel) $(vopt_if zimg zimg-devel) - $(vopt_if webp libwebp-devel) $(vopt_if sofa libmysofa-devel) - $(vopt_if drm libdrm-devel) libsvt-av1-devel - $(vopt_if srt srt-devel) $(vopt_if rist librist-devel) - $(vopt_if vulkan 'vulkan-loader-devel') - $(vopt_if nvenc nv-codec-headers12.0) $(vopt_if nvdec nv-codec-headers12.0)" -# ffmpeg6 provides ffmpeg, ffprobe, ffplay, etc -depends="ffmpeg6" -short_desc="Decoding, encoding and streaming software (transitional dummy package)" + libbs2b-devel libvidstab-devel vmaf-devel libbluray-devel pulseaudio-devel + x265-devel v4l-utils-devel libvpx-devel libaom-devel libdav1d-devel libjxl-devel + libwebp-devel libdrm-devel srt-devel librist-devel vulkan-loader-devel + zimg-devel libmysofa-devel libsvt-av1-devel $(vopt_if vaapi libva-devel) + $(vopt_if vdpau libvdpau-devel) $(vopt_if fdk_aac fdk-aac-devel) + $(vopt_if libvpl libvpl-devel) $(vopt_if nvcodec nv-codec-headers)" +depends="ffplay>=${version}_${revision}" +short_desc="Decoding, encoding and streaming software" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://www.ffmpeg.org" changelog="https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog" distfiles="https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz" -checksum=2290461f467c08ab801731ed412d8e724a5511d6c33173654bd9c1d2e25d0617 +checksum=b072aed6871998cce9b36e7774033105ca29e33632be5b6347f3206898e0756a -build_options="x265 v4l2 vaapi vdpau vpx fdk_aac aom nvenc sndio pulseaudio - dav1d zimg webp sofa vulkan drm srt rist nvdec" -build_options_default="x265 v4l2 vpx aom sndio pulseaudio dav1d webp vulkan drm srt rist" - -desc_option_srt="Enable support for SRT (Secure, Reliable, Transport)" -desc_option_rist="Enable support for RIST (Reliable Internet Stream Transport)" +build_options="vaapi vdpau fdk_aac nvcodec libvpl" desc_option_sofa="Enable support for AES SOFA" -desc_option_webp="Enable support for WebP" case "$XBPS_TARGET_MACHINE" in - i686*|x86_64*) + i686*) + build_options_default+=" vaapi vdpau nvcodec" + hostmakedepends+=" nasm" + ;; + x86_64*) hostmakedepends+=" nasm" - build_options_default+=" vaapi vdpau nvenc nvdec" + build_options_default+=" vaapi vdpau nvcodec libvpl" ;; ppc64*) build_options_default+=" vaapi vdpau";; mips*) CFLAGS="-mnan=legacy";; @@ -92,51 +82,40 @@ do_configure() { ppc|ppc-musl) _args+=" --disable-altivec";; esac - if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then - _args+=" --extra-libs=-latomic" - fi - ./configure --prefix=/usr --disable-debug --enable-gpl --enable-gnutls \ --disable-stripping \ --enable-libcdio --enable-version3 --enable-runtime-cpudetect \ --enable-libmp3lame --enable-libvorbis --enable-libxvid \ - --enable-libx264 $(vopt_enable vpx libvpx) --enable-libtheora \ + --enable-libx264 --enable-libvpx --enable-libtheora \ --enable-shared --enable-static --enable-libxcb \ - $(vopt_enable pulseaudio libpulse) --enable-libfreetype --enable-libmodplug \ + --enable-libpulse --enable-libfreetype --enable-libopenmpt \ --enable-libspeex --enable-libcelt --enable-libass \ --enable-libopus --enable-librtmp --enable-libjack \ - $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ --disable-libopencore_amrnb --disable-libopencore_amrwb \ - --disable-libopenjpeg --enable-libbluray --enable-libsvtav1 \ - --enable-postproc --enable-opencl --disable-libvmaf ${_args} \ - $(vopt_enable x265 libx265) \ - $(vopt_enable v4l2 libv4l2) \ - $(vopt_enable aom libaom) $(vopt_enable vaapi) $(vopt_enable vdpau) \ - --enable-libbs2b --enable-avresample --enable-libvidstab \ - $(vopt_enable dav1d libdav1d) \ + --disable-libopenjpeg --enable-libbluray --enable-libsoxr \ + --enable-opencl --enable-libvmaf ${_args} \ + --enable-libx265 --enable-libv4l2 --enable-libaom \ + --enable-libbs2b --enable-libvidstab --enable-libdav1d \ + --enable-libsrt --enable-librist --enable-libwebp \ + --enable-vulkan --enable-libdrm --enable-libsvtav1 \ + --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig \ + --enable-libjxl \ + $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ + $(vopt_enable vaapi) $(vopt_enable vdpau) \ $(vopt_enable zimg libzimg) \ - $(vopt_enable webp libwebp) \ $(vopt_enable sofa libmysofa) \ - $(vopt_enable vulkan) \ - $(vopt_enable drm libdrm) \ - $(vopt_enable srt libsrt) \ - $(vopt_enable rist librist) \ - $(vopt_if nvenc '--enable-nvenc') \ - $(vopt_if nvdec '--enable-nvdec') + $(vopt_enable libvpl libvpl) \ + $(vopt_enable nvcodec nvenc) \ + $(vopt_enable nvcodec nvdec) } do_build() { make ${makejobs} + make doc/ff{mpeg,play}.1 } -# transitional dummy package for ffmpeg6 -# binaries conflict with 6 do_install() { - make DESTDIR=${DESTDIR} install - rm -rf ${DESTDIR}/usr/bin - rm -rf ${DESTDIR}/usr/share/man/man1 - rm -rf ${DESTDIR}/usr/share/ffmpeg/ffprobe.xsd - rm -rf ${DESTDIR}/usr/share/ffmpeg/libvpx*ffpreset + make DESTDIR=${DESTDIR} install install-man } libavcodec_package() { @@ -154,10 +133,8 @@ libavdevice_package() { } libavresample_package() { - short_desc="FFmpeg audio resampling library" - pkg_install() { - vmove "usr/lib/libavresample.so.*" - } + short_desc="Package deprecated, removal needed" + metapackage=yes } libavformat_package() { @@ -181,13 +158,6 @@ libavfilter_package() { } } -libpostproc_package() { - short_desc="FFmpeg video postprocessing library" - pkg_install() { - vmove "usr/lib/libpostproc.so.*" - } -} - libswscale_package() { short_desc="FFmpeg video scaling library" pkg_install() { @@ -209,19 +179,16 @@ ffmpeg-devel_package() { libavformat>=${version}_${revision} libavutil>=${version}_${revision} libavfilter>=${version}_${revision} - libpostproc>=${version}_${revision} libswscale>=${version}_${revision} - libswresample>=${version}_${revision} - libavresample>=${version}_${revision}" - short_desc="Decoding, encoding and streaming software - development files" - conflicts="ffmpeg6-devel" - replaces="ffmpeg6-devel>=0" + libswresample>=${version}_${revision}" + short_desc+=" - development files" + conflicts="ffmpeg-devel" + replaces="ffmpeg-devel>=0" case "$XBPS_TARGET_MACHINE" in i686*) # /usr/bin/strip: error: the input file '/destdir//ffmpeg-devel-4.4.4/usr/lib/libavfilter.a(vf_atadenoise.o)' has no sections nostrip_files="/usr/lib/libavfilter.a";; esac - pkg_install() { vmove usr/include vmove usr/lib/pkgconfig @@ -233,7 +200,9 @@ ffmpeg-devel_package() { } ffplay_package() { - short_desc="Simple video player using FFmpeg and SDL2 (transitional dummy package)" - metapackage=yes - depends="ffplay6" + short_desc="Simple video player using FFmpeg and SDL2" + pkg_install() { + vmove usr/bin/ffplay + vmove "usr/share/man/man1/ffplay*" + } } diff --git a/srcpkgs/libpostproc b/srcpkgs/libpostproc deleted file mode 120000 index a9f1eea092d5e9..00000000000000 --- a/srcpkgs/libpostproc +++ /dev/null @@ -1 +0,0 @@ -ffmpeg \ No newline at end of file diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template index c8da0b34520f65..e05313593c9e61 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -519,6 +519,7 @@ replaces=" libpoppler89<=0.80.0_1 libportal-qt5-devel<=0.9.1_2 libportal-qt5<=0.9.1_2 + libpostproc<=4.4.6_3 libpostproc6<=6.1.3_4 libproxy-python3<=0.4.18_4 libproxy-python<=0.4.18_1 From 36d0008cdcfecf3a1901494088d382f96d9b3026 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 004/110] libopenal: revbump for ffmpeg8 --- srcpkgs/libopenal/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/libopenal/template b/srcpkgs/libopenal/template index eae9f3551b9b2a..44392c1260bf00 100644 --- a/srcpkgs/libopenal/template +++ b/srcpkgs/libopenal/template @@ -1,11 +1,11 @@ # Template file for 'libopenal' pkgname=libopenal version=1.24.3 -revision=1 +revision=2 build_style=cmake configure_args="-DALSOFT_EXAMPLES=OFF" hostmakedepends="pkg-config" -makedepends="zlib-devel alsa-lib-devel pulseaudio-devel SDL2-devel ffmpeg6-devel +makedepends="zlib-devel alsa-lib-devel pulseaudio-devel SDL2-devel ffmpeg-devel jack-devel $(vopt_if sndio sndio-devel)" short_desc="Cross-platform 3D audio library" maintainer="Orphaned " From 2e7a1354ed80a6be498f97bd773fb57ee5bbf4d4 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 005/110] mlt7: revbump for ffmpeg8 --- srcpkgs/mlt7/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mlt7/template b/srcpkgs/mlt7/template index 531f58cdbbc48a..a008f64d7e0ea6 100644 --- a/srcpkgs/mlt7/template +++ b/srcpkgs/mlt7/template @@ -1,12 +1,12 @@ # Template file for 'mlt7' pkgname=mlt7 version=7.36.1 -revision=1 +revision=2 build_style=cmake configure_args="-DSWIG_PYTHON=ON -DMOD_QT6=ON" hostmakedepends="doxygen pkg-config ladspa-sdk swig python3 which qt5-host-tools qt5-qmake qt6-base qt6-tools" -makedepends="alsa-lib-devel ffmpeg6-devel gtk+-devel jack-devel ladspa-sdk +makedepends="alsa-lib-devel ffmpeg-devel gtk+-devel jack-devel ladspa-sdk libexif-devel libsamplerate-devel libxml2-devel sox-devel SDL2_image-devel fftw-devel frei0r-plugins python3-devel pulseaudio-devel movit-devel libvidstab-devel qt5-svg-devel qt6-svg-devel qt6-qt5compat-devel From 315b1f50e8e955de5cab4951261f1bdff840be94 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:43 -0500 Subject: [PATCH 006/110] Aegisub: revbump for ffmpeg8 --- srcpkgs/Aegisub/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/Aegisub/template b/srcpkgs/Aegisub/template index e151493def4b7f..a0f7f70f5da91f 100644 --- a/srcpkgs/Aegisub/template +++ b/srcpkgs/Aegisub/template @@ -1,14 +1,14 @@ # Template file for 'Aegisub' pkgname=Aegisub version=3.4.2 -revision=5 +revision=6 build_style=meson configure_args="-Dsystem_luajit=true" hostmakedepends="pkg-config gettext meson ninja LuaJIT" makedepends="libass-devel zlib-devel icu-devel boost-devel-minimal libboost_locale libboost_thread - wxWidgets-gtk3-devel MesaLib-devel LuaJIT-devel fontconfig-devel ffmpeg6 - ffmpeg6-devel libffms2-devel fftw-devel hunspell-devel uchardet-devel gtest-devel + wxWidgets-gtk3-devel MesaLib-devel LuaJIT-devel fontconfig-devel ffmpeg + ffmpeg-devel libffms2-devel fftw-devel hunspell-devel uchardet-devel gtest-devel pulseaudio-devel alsa-lib-devel libopenal-devel portaudio-devel libcurl-devel" short_desc="Cross-platform advanced subtitle editor" maintainer="Komeil Parseh " From f38da35b02a633cdba4cdd9aee3e228c8af1be1b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:43 -0500 Subject: [PATCH 007/110] QMPlay2: revbump for ffmpeg8 --- srcpkgs/QMPlay2/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/QMPlay2/template b/srcpkgs/QMPlay2/template index 5ec1893c0bb384..2f13651fc22628 100644 --- a/srcpkgs/QMPlay2/template +++ b/srcpkgs/QMPlay2/template @@ -1,10 +1,10 @@ # Template file for 'QMPlay2' pkgname=QMPlay2 version=25.09.11 -revision=1 +revision=2 build_style=cmake hostmakedepends="pkg-config qt5-qmake qt5-host-tools" -makedepends="alsa-lib-devel ffmpeg6-devel libass-devel libcdio-devel libgme-devel +makedepends="alsa-lib-devel ffmpeg-devel libass-devel libcdio-devel libgme-devel libsidplayfp-devel libva-glx-devel libXv-devel pulseaudio-devel qt5-svg-devel qt5-tools-devel qt5-x11extras-devel taglib-devel libcdio-paranoia-devel qt5-declarative-devel" From a6b56f6f0e5bd062e5293171d9151e430a543564 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:43 -0500 Subject: [PATCH 008/110] alsa-plugins: revbump for ffmpeg8 --- srcpkgs/alsa-plugins/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/alsa-plugins/template b/srcpkgs/alsa-plugins/template index 97b780f1a15d6f..f8a58f47fb8db1 100644 --- a/srcpkgs/alsa-plugins/template +++ b/srcpkgs/alsa-plugins/template @@ -1,11 +1,11 @@ # Template file for 'alsa-plugins' pkgname=alsa-plugins version=1.2.12 -revision=2 +revision=3 build_style=gnu-configure configure_args="--disable-maemo-plugin" hostmakedepends="pkg-config" -makedepends="ffmpeg6-devel jack-devel libsamplerate-devel pulseaudio-devel" +makedepends="ffmpeg-devel jack-devel libsamplerate-devel pulseaudio-devel" short_desc="Advanced Linux Sound Architecture (ALSA) extra plugins" maintainer="Orphaned " license="GPL-2.0-or-later, LGPL-2.1-or-later" From d16cdb8587dcf25879db8d8a944f7a587a571ee4 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 009/110] attract: revbump for ffmpeg8 --- srcpkgs/attract/patches/ffmpeg8.patch | 84 +++++++++++++++++++++++++++ srcpkgs/attract/template | 4 +- 2 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/attract/patches/ffmpeg8.patch diff --git a/srcpkgs/attract/patches/ffmpeg8.patch b/srcpkgs/attract/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..2b32346d0fd5c3 --- /dev/null +++ b/srcpkgs/attract/patches/ffmpeg8.patch @@ -0,0 +1,84 @@ +--- a/src/media.cpp ++++ b/src/media.cpp +@@ -61,6 +61,9 @@ + #define FORMAT_CTX_URL m_imp->m_format_ctx->filename + #endif + ++#define HAVE_CH_LAYOUT (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 28, 100)) ++#define HAVE_DURATION (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(58, 2, 100)) ++ + void try_hw_accel( AVCodecContext *&codec_ctx, FeAVCodec *&dec ); + + std::string g_decoder; +@@ -323,7 +326,7 @@ + { + int data_size = av_samples_get_buffer_size( + NULL, +- codec_ctx->channels, ++ codec_ctx->ch_layout.nb_channels, + frame->nb_samples, + codec_ctx->sample_fmt, 1); + +@@ -349,17 +352,16 @@ + return false; + } + +- int64_t channel_layout = frame->channel_layout; +- if ( !channel_layout ) +- { +- channel_layout = av_get_default_channel_layout( +- codec_ctx->channels ); +- } ++ AVChannelLayout layout; ++ av_channel_layout_copy(&layout, &frame->ch_layout); ++ if (!av_channel_layout_check(&layout) ) { ++ av_channel_layout_default(&layout, codec_ctx->ch_layout.nb_channels); ++ } ++ av_opt_set_chlayout(resample_ctx, "in_chlayout", &layout, 0); ++ av_opt_set_chlayout(resample_ctx, "out_chlayout", &layout, 0); + +- av_opt_set_int( resample_ctx, "in_channel_layout", channel_layout, 0 ); + av_opt_set_int( resample_ctx, "in_sample_fmt", frame->format, 0 ); + av_opt_set_int( resample_ctx, "in_sample_rate", frame->sample_rate, 0 ); +- av_opt_set_int( resample_ctx, "out_channel_layout", channel_layout, 0 ); + av_opt_set_int( resample_ctx, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0 ); + av_opt_set_int( resample_ctx, "out_sample_rate", frame->sample_rate, 0 ); + +@@ -384,7 +386,7 @@ + int out_linesize; + av_samples_get_buffer_size( + &out_linesize, +- codec_ctx->channels, ++ codec_ctx->ch_layout.nb_channels, + frame->nb_samples, + AV_SAMPLE_FMT_S16, 0 ); + +@@ -402,8 +404,8 @@ + FeLog() << "Error performing audio conversion." << std::endl; + return false; + } +- offset += out_samples * codec_ctx->channels; +- data.sampleCount += out_samples * codec_ctx->channels; ++ offset += out_samples * codec_ctx->ch_layout.nb_channels; ++ data.sampleCount += out_samples * codec_ctx->ch_layout.nb_channels; + data.samples = audio_buff; + } + } +@@ -760,7 +762,7 @@ + + // Track pts and duration if we need to correct next frame + prev_pts = raw_frame->pts; +- prev_duration = raw_frame->pkt_duration; ++ prev_duration = raw_frame->duration; + #endif + + detached_frame = raw_frame; +@@ -1066,7 +1068,7 @@ + + codec_ctx->sample_rate ); + + sf::SoundStream::initialize( +- codec_ctx->channels, ++ codec_ctx->ch_layout.nb_channels, + codec_ctx->sample_rate ); + + sf::SoundStream::setLoop( false ); diff --git a/srcpkgs/attract/template b/srcpkgs/attract/template index f6cda941c297cf..92a85c2cd663d4 100644 --- a/srcpkgs/attract/template +++ b/srcpkgs/attract/template @@ -1,12 +1,12 @@ # Template file for 'attract' pkgname=attract version=2.7.0 -revision=3 +revision=4 build_style=gnu-makefile make_build_args="VERBOSE=1" make_use_env=yes hostmakedepends="pkg-config" -makedepends="SFML-devel ffmpeg6-devel fontconfig-devel glu-devel libarchive-devel +makedepends="SFML-devel ffmpeg-devel fontconfig-devel glu-devel libarchive-devel libcurl-devel libjpeg-turbo-devel libXinerama-devel libXrandr-devel" short_desc="Attract-Mode is a graphical frontend for emulators" maintainer="Pedro Narciso García Revington " From 8dcd35103d9a0c741b318d812b48c83cb05c27a4 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 010/110] audacious-plugins: revbump for ffmpeg8 --- srcpkgs/audacious-plugins/template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srcpkgs/audacious-plugins/template b/srcpkgs/audacious-plugins/template index 04799588e35056..f396fd33a8932a 100644 --- a/srcpkgs/audacious-plugins/template +++ b/srcpkgs/audacious-plugins/template @@ -3,11 +3,12 @@ pkgname=audacious-plugins version=4.6.1 revision=1 +revision=2 build_style=meson configure_args="$(vopt_bool gtk) $(vopt_bool qt)" hostmakedepends="gettext pkg-config glib-devel $(vopt_if qt qt6-tools)" makedepends="audacious-base-devel alsa-lib-devel pulseaudio-devel jack-devel - lame-devel libvorbis-devel libflac-devel mpg123-devel faad2-devel ffmpeg6-devel + lame-devel libvorbis-devel libflac-devel mpg123-devel faad2-devel ffmpeg-devel libmodplug-devel fluidsynth-devel libcdio-paranoia-devel wavpack-devel libnotify-devel libcurl-devel libmtp-devel neon-devel libmms-devel libxml2-devel opus-devel opusfile-devel libbs2b-devel libsoxr-devel libsidplayfp-devel libcue-devel libopenmpt-devel pipewire-devel From da7a0e1386ab60806f9c2801a3d6220e10b142e3 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 011/110] audacity: revbump for ffmpeg8 --- srcpkgs/audacity/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template index d18a276eb85216..2d4a11bd7a91fe 100644 --- a/srcpkgs/audacity/template +++ b/srcpkgs/audacity/template @@ -1,7 +1,7 @@ # Template file for 'audacity' pkgname=audacity version=3.7.8 -revision=1 +revision=2 build_style=cmake build_helper="cmake-wxWidgets-gtk3 qemu" configure_args="-Daudacity_use_ffmpeg=loaded -Daudacity_lib_preference=system @@ -12,7 +12,7 @@ configure_args="-Daudacity_use_ffmpeg=loaded -Daudacity_lib_preference=system -Daudacity_has_updates_check=OFF -DAUDACITY_BUILD_LEVEL=2" hostmakedepends="pkg-config gettext python3" makedepends="wxWidgets-gtk3-devel gtk+3-devel expat-devel lame-devel - libsoxr-devel portaudio-devel sqlite-devel ffmpeg6-devel + libsoxr-devel portaudio-devel sqlite-devel ffmpeg-devel libid3tag-devel libmad-devel vamp-plugin-sdk-devel libogg-devel libvorbis-devel libflac-devel lilv-devel lv2 serd-devel sord-devel sratom-devel suil-devel portmidi-devel soundtouch-devel twolame-devel From e5b571c24357e14c80ae284c95b7af6efb613e85 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 012/110] avidemux: revbump for ffmpeg8 --- srcpkgs/avidemux/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/avidemux/template b/srcpkgs/avidemux/template index 3e2c7816c91c95..e78d4347a4d87e 100644 --- a/srcpkgs/avidemux/template +++ b/srcpkgs/avidemux/template @@ -1,14 +1,14 @@ # Template file for 'avidemux' pkgname=avidemux version=2.8.1 -revision=5 +revision=6 # Can't be compiled for aarch64, arm* or mips* archs="x86_64* i686*" hostmakedepends="cmake-bootstrap pkg-config qt5-host-tools qt5-devel tar yasm" makedepends="alsa-lib-devel faac-devel faad2-devel gettext-devel jack-devel glu-devel lame-devel libass-devel libdca-devel libvorbis-devel libXv-devel vapoursynth-devel libmp4v2-devel sqlite-devel libva-devel libvdpau-devel - qt5-multimedia-devel qt5-script-devel qt5-tools-devel ffmpeg6-devel + qt5-multimedia-devel qt5-script-devel qt5-tools-devel ffmpeg-devel liba52-devel libmad-devel x264-devel x265-devel xvidcore-devel" short_desc="Video editing and processing application" maintainer="Orphaned " From 84315472ac172e035b899689b273b9be6511a6a5 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 013/110] baresip: revbump for ffmpeg8 --- srcpkgs/baresip/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/baresip/template b/srcpkgs/baresip/template index e824b2ef69b4dd..34cbfbe1e49294 100644 --- a/srcpkgs/baresip/template +++ b/srcpkgs/baresip/template @@ -1,13 +1,13 @@ # Template file for 'baresip' pkgname=baresip version=3.20.0 -revision=3 +revision=4 build_style=cmake hostmakedepends="pkg-config glib-devel" makedepends="libgsm-devel libpng-devel openssl-devel libsndfile-devel opus-devel re-devel spandsp-devel speex-devel speexdsp-devel tiff-devel twolame-devel cairo-devel gst-plugins-base1-devel jack-devel - gstreamer1-devel gtk+3-devel mpg123-devel SDL2-devel ffmpeg6-devel libvpx-devel + gstreamer1-devel gtk+3-devel mpg123-devel SDL2-devel ffmpeg-devel libvpx-devel libX11-devel v4l-utils-devel x265-devel libXext-devel webrtc-audio-processing-devel fdk-aac-devel libmosquitto-devel codec2-devel" # sndio-devel Currently not hooked up in their cmake build system From e520941a93dde6374be4915d25cf3acb6aebae29 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 014/110] calibre: revbump for ffmpeg8 --- srcpkgs/calibre/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template index 7943c3f8003db3..ba3f4814759bc3 100644 --- a/srcpkgs/calibre/template +++ b/srcpkgs/calibre/template @@ -1,7 +1,7 @@ # Template file for 'calibre' pkgname=calibre version=9.10.0 -revision=1 +revision=2 build_helper=python3 pycompile_dirs="/usr/lib/calibre/" hostmakedepends="pkg-config cmake python3-BeautifulSoup4 python3-Pillow @@ -17,7 +17,7 @@ makedepends="libinput-devel libmagick-devel libmtp-devel libstemmer-devel python3-pyqt6-gui python3-pyqt6-svg python3-pyqt6-widgets python3-pyqt6-network python3-pyqt6-printsupport python3-pyqt6-webengine python3-pyqt6-webchannel qt6-base-private-devel python3-pyqt6-bindings python3-pyqt6-webengine-devel - ffmpeg6-devel python3-tzlocal" + ffmpeg-devel python3-tzlocal" depends="desktop-file-utils optipng poppler python3-BeautifulSoup4 qt6-imageformats python3-Pygments python3-pycryptodome python3-xxhash python3-Markdown python3-Pillow python3-zeroconf python3-Pygments python3-apsw From 2087c002d80c77f034f1fef266797a5c6eccf44f Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 4 Jan 2026 15:41:25 -0500 Subject: [PATCH 015/110] gpac: revbump for ffmpeg8 --- srcpkgs/gpac/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gpac/template b/srcpkgs/gpac/template index 0ffa0066dfaed5..dd81e46a62623f 100644 --- a/srcpkgs/gpac/template +++ b/srcpkgs/gpac/template @@ -1,11 +1,11 @@ # Template file for 'gpac' pkgname=gpac version=26.02.0 -revision=1 +revision=2 build_style=configure configure_args="--prefix=/usr --enable-pic" hostmakedepends="pkg-config" -makedepends="alsa-lib-devel faad2-devel ffmpeg6-devel freetype-devel jack-devel +makedepends="alsa-lib-devel faad2-devel ffmpeg-devel freetype-devel jack-devel libcaca-devel libjpeg-turbo-devel liblzma-devel libmad-devel libopenjpeg2-devel libpng-devel libtheora-devel libvorbis-devel libXv-devel nghttp2-devel openssl-devel pulseaudio-devel SDL2-devel zlib-devel" From 8fa09d6f5a67e8f8d6ee31e5aa901638cd360361 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 016/110] ccextractor: revbump for ffmpeg8 --- srcpkgs/ccextractor/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/ccextractor/template b/srcpkgs/ccextractor/template index bea85b0a0b0c39..d8d7378ccd02a3 100644 --- a/srcpkgs/ccextractor/template +++ b/srcpkgs/ccextractor/template @@ -1,13 +1,13 @@ # Template file for 'ccextractor' pkgname=ccextractor version=0.96.6 -revision=2 +revision=3 build_wrksrc="linux" build_style=gnu-configure build_helper=rust configure_args="--enable-ocr --enable-hardsubx" hostmakedepends="automake cargo clang pkg-config tesseract-ocr-devel" -makedepends="ffmpeg6-devel freetype-devel leptonica-devel libgpac-devel +makedepends="ffmpeg-devel freetype-devel leptonica-devel libgpac-devel libpng-devel libutf8proc-devel rust-std tesseract-ocr-devel zlib-devel" short_desc="Extract subtitles from video streams" maintainer="newbluemoon " From a5c870d5867524e8aa539012f4baaf37d7228ae7 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 017/110] cmus: revbump for ffmpeg8 --- srcpkgs/cmus/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/cmus/template b/srcpkgs/cmus/template index 8219d929c136ac..761bc7102d1f57 100644 --- a/srcpkgs/cmus/template +++ b/srcpkgs/cmus/template @@ -1,14 +1,14 @@ # Template file for 'cmus' pkgname=cmus version=2.12.0 -revision=2 +revision=3 build_style=configure configure_args="prefix=/usr LD=$CC" hostmakedepends="pkg-config" makedepends="ncurses-devel faad2-devel libcdio-devel libcdio-paranoia-devel libcddb-devel libdiscid-devel libflac-devel libao-devel libmad-devel libmodplug-devel libmp4v2-devel libmpcdec-devel pulseaudio-devel - opusfile-devel wavpack-devel alsa-lib-devel libvorbis-devel ffmpeg6-devel + opusfile-devel wavpack-devel alsa-lib-devel libvorbis-devel ffmpeg-devel sndio-devel jack-devel $(vopt_if elogind elogind-devel)" short_desc="Small, fast and powerful console music player" maintainer="Orphaned " From 5a528a5bb7e66b9ac033d8aece2b5e9fc446f475 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 018/110] cyanrip: revbump for ffmpeg8 --- srcpkgs/cyanrip/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/cyanrip/template b/srcpkgs/cyanrip/template index 62f54cea3a5f78..728e20fe43efc4 100644 --- a/srcpkgs/cyanrip/template +++ b/srcpkgs/cyanrip/template @@ -1,10 +1,10 @@ # Template file for 'cyanrip' pkgname=cyanrip version=0.9.3.1 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config" -makedepends="ffmpeg6-devel libcdio-devel libcdio-paranoia-devel libcurl-devel libmusicbrainz5-devel" +makedepends="ffmpeg-devel libcdio-devel libcdio-paranoia-devel libcurl-devel libmusicbrainz5-devel" short_desc="Bule-ish CD ripper" maintainer="Duncaen " license="LGPL-2.1-or-later" From fdca4697964ae325b7ee9b12b97e793bb0567d4d Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 019/110] dragon-player: revbump for ffmpeg8 --- srcpkgs/dragon-player/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dragon-player/template b/srcpkgs/dragon-player/template index 024e7bf6751955..f43437c7521908 100644 --- a/srcpkgs/dragon-player/template +++ b/srcpkgs/dragon-player/template @@ -1,7 +1,7 @@ # Template file for 'dragon-player' pkgname=dragon-player version=26.04.1 -revision=1 +revision=2 build_style=cmake configure_args="-DBUILD_TESTING=OFF -DKF6_HOST_TOOLING=/usr/lib/cmake -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins @@ -11,7 +11,7 @@ hostmakedepends="extra-cmake-modules pkg-config qt6-base qt6-tools qt6-declarative-host-tools" makedepends="kf6-kio-devel kf6-kparts-devel kf6-kirigami-devel kf6-kdoctools-devel kf6-kcoreaddons-devel qt6-multimedia-devel - kf6-kcrash-devel ffmpeg6-devel" + kf6-kcrash-devel ffmpeg-devel" depends="hicolor-icon-theme kf6-kirigami" short_desc="Multimedia player where the focus is on simplicity" maintainer="John " From 154fa469a0c40088e71ff1d4019b12393d6d886b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 020/110] ffmpegthumbs: revbump for ffmpeg8 --- srcpkgs/ffmpegthumbs/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/ffmpegthumbs/template b/srcpkgs/ffmpegthumbs/template index 82697e7e9853ba..129456ba9d50cf 100644 --- a/srcpkgs/ffmpegthumbs/template +++ b/srcpkgs/ffmpegthumbs/template @@ -1,14 +1,14 @@ # Template file for 'ffmpegthumbs' pkgname=ffmpegthumbs version=26.04.1 -revision=1 +revision=2 build_style=cmake configure_args="-DQT_MAJOR_VERSION=6 -DKF6_HOST_TOOLING=/usr/lib/cmake -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins" hostmakedepends="extra-cmake-modules pkg-config gettext qt6-base kf6-kconfig" makedepends="qt6-base-devel kf6-kconfig-devel kf6-kio-devel kf6-ki18n-devel - ffmpeg6-devel taglib-devel" + ffmpeg-devel taglib-devel" short_desc="FFmpeg-based thumbnail creator for video files" maintainer="Michael Straube " license="GPL-2.0-or-later" From 85834c7da16f5696424d8aec5a0d2361e272ab7d Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 021/110] gerbera: revbump for ffmpeg8 --- srcpkgs/gerbera/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gerbera/template b/srcpkgs/gerbera/template index 3b7bc65599cff1..9522f0aa1e37ad 100644 --- a/srcpkgs/gerbera/template +++ b/srcpkgs/gerbera/template @@ -1,11 +1,11 @@ # Template file for 'gerbera' pkgname=gerbera version=2.5.0 -revision=3 +revision=4 build_style=cmake configure_args="-DWITH_SYSTEMD=OFF -DWITH_AVCODEC=ON -DWITH_NPUPNP=ON" hostmakedepends="pkg-config" -makedepends="duktape-devel expat-devel ffmpeg6-devel file-devel libcurl-devel +makedepends="duktape-devel expat-devel ffmpeg-devel file-devel libcurl-devel libexif-devel libnpupnp-devel libuuid-devel sqlite-devel taglib-devel fmt-devel spdlog pugixml-devel libebml-devel libmatroska-devel exiv2-devel" short_desc="UPnP Media Server based on MediaTomb" From 6ec2699c49ad86e3203436f11c2a1d1a9c8bc2c2 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 022/110] gifski: revbump for ffmpeg8 --- srcpkgs/gifski/patches/ffmpeg8.patch | 17 +++++++++ srcpkgs/gifski/patches/fix-cross-build.patch | 40 -------------------- srcpkgs/gifski/template | 10 ++--- 3 files changed, 22 insertions(+), 45 deletions(-) create mode 100644 srcpkgs/gifski/patches/ffmpeg8.patch delete mode 100644 srcpkgs/gifski/patches/fix-cross-build.patch diff --git a/srcpkgs/gifski/patches/ffmpeg8.patch b/srcpkgs/gifski/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..313aeb4f6d773e --- /dev/null +++ b/srcpkgs/gifski/patches/ffmpeg8.patch @@ -0,0 +1,17 @@ +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -45,7 +45,7 @@ + + [dependencies.ffmpeg] + package = "ffmpeg-next" +-version = "6" ++version = "8.1" + optional = true + default-features = false + features = ["codec", "format", "filter", "software-resampling", "software-scaling"] +@@ -100,4 +100,4 @@ + + [patch.crates-io] + # ffmpeg-sys-next does not support cross-compilation, which I use to produce binaries https://github.com/zmwangx/rust-ffmpeg-sys/pull/30 +-ffmpeg-sys-next = { rev = "fd5784d645df2ebe022a204ac36582074da1edf7", git = "https://github.com/kornelski/rust-ffmpeg-sys-1"} ++ffmpeg-sys-next = { rev = "6ab3d0d81e50c2c4039824b21829c4300cea24d7", git = "https://github.com/zmwangx/rust-ffmpeg-sys"} diff --git a/srcpkgs/gifski/patches/fix-cross-build.patch b/srcpkgs/gifski/patches/fix-cross-build.patch deleted file mode 100644 index de7fd8ccd1b82e..00000000000000 --- a/srcpkgs/gifski/patches/fix-cross-build.patch +++ /dev/null @@ -1,40 +0,0 @@ -Instead of using the host compiler to build and run -the "check" binary on the host, use the target compiler -and run it through qemu. ---- a/vendor/ffmpeg-sys-next-6.1.0/build.rs -+++ b/vendor/ffmpeg-sys-next-6.1.0/build.rs -@@ -500,7 +500,7 @@ - - let executable = out_dir.join(if cfg!(windows) { "check.exe" } else { "check" }); - let mut compiler = cc::Build::new() -- .target(&env::var("HOST").unwrap()) // don't cross-compile this -+ .target(&env::var("TARGET").unwrap()) // don't cross-compile this - .get_compiler() - .to_command(); - -@@ -520,10 +520,21 @@ - panic!("Compile failed"); - } - -- let check_output = Command::new(out_dir.join(&executable)) -- .current_dir(&out_dir) -- .output() -- .expect("Check failed"); -+ let check_output = match env::var("XBPS_TARGET_QEMU_MACHINE") { -+ Ok(qemu_machine) => { -+ Command::new(format!("qemu-{}", qemu_machine)) -+ .args([out_dir.join(&executable)]) -+ .current_dir(&out_dir) -+ .output() -+ .expect("Check failed") -+ } -+ _ => { -+ Command::new(out_dir.join(&executable)) -+ .current_dir(&out_dir) -+ .output() -+ .expect("Check failed") -+ } -+ }; - if !check_output.status.success() { - panic!( - "{} failed: {}\n{}", diff --git a/srcpkgs/gifski/template b/srcpkgs/gifski/template index 70e26fb4133c45..8ebc05c128287b 100644 --- a/srcpkgs/gifski/template +++ b/srcpkgs/gifski/template @@ -1,12 +1,12 @@ # Template file for 'gifski' pkgname=gifski version=1.34.0 -revision=2 +revision=3 build_helper="qemu" build_style=cargo configure_args="$(vopt_if ffmpeg --features=video)" hostmakedepends="pkg-config $(vopt_if ffmpeg clang21-devel)" -makedepends="$(vopt_if ffmpeg ffmpeg6-devel)" +makedepends="$(vopt_if ffmpeg ffmpeg-devel)" short_desc="Highest-quality GIF encoder based on pngquant" maintainer="Orphaned " license="AGPL-3.0-only" @@ -22,10 +22,10 @@ build_options_default="ffmpeg" _clear_vendor_checksums() { sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json } -post_extract() { +post_patch() { mkdir -p .cargo - cargo vendor --locked --versioned-dirs >.cargo/config.toml - _clear_vendor_checksums ffmpeg-sys-next-6.1.0 + cargo vendor --versioned-dirs >.cargo/config.toml + _clear_vendor_checksums ffmpeg-sys-next-8.1.0 } _setup_env() { From 25a328028c20a984fb7817c85b9aef02708c5bb4 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 023/110] goldendict-ng: revbump for ffmpeg8 --- srcpkgs/goldendict-ng/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/goldendict-ng/template b/srcpkgs/goldendict-ng/template index d0a55e028dd5af..4081410bf601a3 100644 --- a/srcpkgs/goldendict-ng/template +++ b/srcpkgs/goldendict-ng/template @@ -1,11 +1,11 @@ # Template file for 'goldendict-ng' pkgname=goldendict-ng version=26.6.0 -revision=1 +revision=2 build_style=cmake configure_args="-DUSE_ALTERNATIVE_NAME=ON -DWITH_TTS=OFF" hostmakedepends="pkg-config qt6-declarative-host-tools qt6-tools" -makedepends="ffmpeg6-devel fmt-devel hunspell-devel libeb-devel libvorbis-devel +makedepends="ffmpeg-devel fmt-devel hunspell-devel libeb-devel libvorbis-devel libzim-devel opencc-devel qt6-base-devel qt6-declarative-devel qt6-multimedia-devel qt6-qt5compat-devel qt6-svg-devel qt6-webengine-devel xapian-core-devel tomlplusplus-devel" From 3210ae6c22a0e26ae1a05453863bd6a6dcd28472 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 024/110] goldendict: revbump for ffmpeg8 --- srcpkgs/goldendict/patches/ffmpeg8.patch | 13 +++++++++++++ srcpkgs/goldendict/template | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/goldendict/patches/ffmpeg8.patch diff --git a/srcpkgs/goldendict/patches/ffmpeg8.patch b/srcpkgs/goldendict/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..91bfb59df7beca --- /dev/null +++ b/srcpkgs/goldendict/patches/ffmpeg8.patch @@ -0,0 +1,13 @@ +--- a/ffmpegaudio.cc ++++ b/ffmpegaudio.cc +@@ -350,8 +350,9 @@ + if ( audioStream_ && codecContext_ && codec_ ) + { + audioStream_->discard = AVDISCARD_ALL; ++#if LIBAVCODEC_VERSION_MAJOR < 62 + avcodec_close( codecContext_ ); +-#if LIBAVCODEC_VERSION_MAJOR > 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR >= 33 ) ++#elif LIBAVCODEC_VERSION_MAJOR > 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR >= 33 ) + avcodec_free_context( &codecContext_ ); + #endif + } diff --git a/srcpkgs/goldendict/template b/srcpkgs/goldendict/template index 41a36ea1ec2193..7c3ff1235c819f 100644 --- a/srcpkgs/goldendict/template +++ b/srcpkgs/goldendict/template @@ -1,14 +1,14 @@ # Template file for 'goldendict' pkgname=goldendict version=1.5.1 -revision=2 +revision=3 build_style=qmake configure_args="CONFIG+=zim_support goldendict.pro" hostmakedepends="qt5-qmake pkg-config qt5-host-tools" makedepends="tiff-devel qt5-devel libvorbis-devel zlib-devel libXtst-devel hunspell-devel qt5-tools-devel qt5-declarative-devel qt5-webkit-devel lzo-devel bzip2-devel libao-devel qt5-svg-devel - libeb-devel qt5-x11extras-devel ffmpeg6-devel liblzma-devel + libeb-devel qt5-x11extras-devel ffmpeg-devel liblzma-devel qt5-multimedia-devel" short_desc="Feature-rich dictionary lookup program" maintainer="John " From 7043868a1e233db17a640ee7798dae2ce44ee7c2 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 025/110] gst-libav: revbump for ffmpeg8 --- srcpkgs/gst-libav/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gst-libav/template b/srcpkgs/gst-libav/template index b05d4e178c67bc..1a79fc750a5f6c 100644 --- a/srcpkgs/gst-libav/template +++ b/srcpkgs/gst-libav/template @@ -1,10 +1,10 @@ # Template file for 'gst-libav' pkgname=gst-libav version=1.28.2 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config yasm" -makedepends="orc-devel gst-plugins-base1-devel ffmpeg6-devel" +makedepends="orc-devel gst-plugins-base1-devel ffmpeg-devel" depends="orc>=0.4.18 gst-plugins-base1>=${version}" short_desc="GStreamer libav plugin (1.x)" maintainer="Orphaned " From fae21889df4117ab80682fcddcd2259792bb8bb6 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 026/110] gst-plugins-bad1: revbump for ffmpeg8 --- srcpkgs/gst-plugins-bad1/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gst-plugins-bad1/template b/srcpkgs/gst-plugins-bad1/template index db4d9caa15812b..e2e56177e3d271 100644 --- a/srcpkgs/gst-plugins-bad1/template +++ b/srcpkgs/gst-plugins-bad1/template @@ -1,7 +1,7 @@ # Template file for 'gst-plugins-bad1' pkgname=gst-plugins-bad1 version=1.28.2 -revision=1 +revision=2 build_helper="gir" build_style=meson configure_args="-Dpackage-origin=https://voidlinux.org -Ddoc=disabled @@ -26,7 +26,7 @@ makedepends="alsa-lib-devel celt-devel openssl-devel exempi-devel libgudev-devel libusb-devel libaom-devel libbs2b-devel chromaprint-devel fdk-aac-devel flite-devel fluidsynth-devel liblrdf-devel ladspa-sdk lilv-devel lv2 libopenjpeg2-devel sbc-devel spandsp-devel vulkan-loader-devel - webrtc-audio-processing-devel libzbar-devel ffmpeg6-devel nv-codec-headers + webrtc-audio-processing-devel libzbar-devel ffmpeg-devel nv-codec-headers srt-devel libva-devel openh264-devel $(vopt_if libvpl libvpl-devel) $(vopt_if gme libgme-devel)" depends="gst-plugins-base1>=${version}" From f60040c547d7eb3f02f3a40d18cc238ca9bdce8c Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 027/110] gst-rtsp-server: revbump for ffmpeg8 --- srcpkgs/gst-rtsp-server/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gst-rtsp-server/template b/srcpkgs/gst-rtsp-server/template index 62ad466f1ba417..540fb545dc143f 100644 --- a/srcpkgs/gst-rtsp-server/template +++ b/srcpkgs/gst-rtsp-server/template @@ -1,12 +1,12 @@ # Template file for 'gst-rtsp-server' pkgname=gst-rtsp-server version=1.28.2 -revision=1 +revision=2 build_style=meson build_helper=gir configure_args="-Dintrospection=enabled" hostmakedepends="pkg-config python3" -makedepends="glib-devel gst-plugins-bad1-devel gst-plugins-good1 ffmpeg6-devel +makedepends="glib-devel gst-plugins-bad1-devel gst-plugins-good1 ffmpeg-devel python3-gobject-devel" short_desc="GStreamer multimedia graph framework - rtsp server" maintainer="1is7ac3 " From 04587d4df0338195ea887f5797ebd6e05c937924 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 028/110] k3b: revbump for ffmpeg8 --- srcpkgs/k3b/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/k3b/template b/srcpkgs/k3b/template index d34033989ddc1e..9b38a37a02fd17 100644 --- a/srcpkgs/k3b/template +++ b/srcpkgs/k3b/template @@ -1,7 +1,7 @@ # Template file for 'k3b' pkgname=k3b version=26.04.1 -revision=1 +revision=2 build_style=cmake configure_args="-DBUILD_TESTING=OFF -DKF6_HOST_TOOLING=/usr/lib/cmake -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins -DQT_MAJOR_VERSION=6 @@ -15,7 +15,7 @@ makedepends="kf6-kcmutils-devel kf6-kfilemetadata-devel kf6-knewstuff-devel kf6-karchive-devel kf6-kconfig-devel kf6-kcoreaddons-devel kf6-ki18n-devel kf6-kiconthemes-devel kf6-kjobwidgets-devel kf6-knotifications-devel kf6-kwidgetsaddons-devel kf6-kxmlgui-devel taglib-devel - ffmpeg6-devel libflac-devel libsndfile-devel lame-devel + ffmpeg-devel libflac-devel libsndfile-devel lame-devel libmusicbrainz5-devel libsamplerate-devel kf6-kauth-devel" depends="cdrdao cdrtools dvd+rw-tools" short_desc="CD/DVD Kreator for Linux" From 0f3a11479da2e07dd347a70c53d60714901b6972 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 029/110] kew: revbump for ffmpeg8 --- srcpkgs/kew/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/kew/template b/srcpkgs/kew/template index c6317a6d65c919..82d32863f5152c 100644 --- a/srcpkgs/kew/template +++ b/srcpkgs/kew/template @@ -1,11 +1,11 @@ # Template file for 'kew' pkgname=kew version=3.7.3 -revision=1 +revision=2 build_style=gnu-makefile make_use_env=yes hostmakedepends="pkg-config" -makedepends="faad2-devel libnotify-devel taglib-devel chafa-devel ffmpeg6-devel fftw-devel +makedepends="faad2-devel libnotify-devel taglib-devel chafa-devel ffmpeg-devel fftw-devel freeimage-devel libglib-devel libogg-devel libvorbis-devel opus-devel opusfile-devel libcurl-devel" short_desc="Command-line music player" From 22053587bd354f58c4196106e2eec1199f4cf6c7 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 030/110] kf6-kfilemetadata: revbump for ffmpeg8 --- srcpkgs/kf6-kfilemetadata/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/kf6-kfilemetadata/template b/srcpkgs/kf6-kfilemetadata/template index 08fd47f551f850..c9a85332174e7c 100644 --- a/srcpkgs/kf6-kfilemetadata/template +++ b/srcpkgs/kf6-kfilemetadata/template @@ -1,14 +1,14 @@ # Template file for 'kf6-kfilemetadata' pkgname=kf6-kfilemetadata version=6.25.0 -revision=1 +revision=2 build_style=cmake configure_args="-DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins" hostmakedepends="extra-cmake-modules qt6-tools qt6-base gettext pkg-config kf6-kconfig" makedepends="qt6-base-devel kf6-kcodecs-devel kf6-ki18n-devel kf6-karchive-devel kf6-kcoreaddons-devel kf6-kconfig-devel attr-devel taglib-devel libqmobipocket6-devel - exiv2-devel ffmpeg6-devel ebook-tools-devel poppler-qt6-devel" + exiv2-devel ffmpeg-devel ebook-tools-devel poppler-qt6-devel" short_desc="Library for extracting file metadata" maintainer="John " license="LGPL-2.1-or-later" From 64fe3f8bdddfc9f3730c8d4c82c06c3417bf52e5 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 031/110] kodi: revbump for ffmpeg8 --- .../kodi/patches/cross-internal-ffmpeg.patch | 15 +++++++++ srcpkgs/kodi/template | 33 +++++++++++++------ 2 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 srcpkgs/kodi/patches/cross-internal-ffmpeg.patch diff --git a/srcpkgs/kodi/patches/cross-internal-ffmpeg.patch b/srcpkgs/kodi/patches/cross-internal-ffmpeg.patch new file mode 100644 index 00000000000000..28094b5d96b761 --- /dev/null +++ b/srcpkgs/kodi/patches/cross-internal-ffmpeg.patch @@ -0,0 +1,15 @@ +--- a/tools/depends/target/ffmpeg/CMakeLists.txt ++++ b/tools/depends/target/ffmpeg/CMakeLists.txt +@@ -12,10 +12,11 @@ + ) + endif() + +-if(CROSSCOMPILING) ++if(CMAKE_CROSSCOMPILING) + set(pkgconf "PKG_CONFIG_LIBDIR=${DEPENDS_PATH}/lib/pkgconfig") + list(APPEND ffmpeg_conf --pkg-config=${PKG_CONFIG_EXECUTABLE} + --pkg-config-flags=--static ++ --pkg-config-flags=--libs-only-l + --enable-cross-compile + --enable-pic + --ar=${CMAKE_AR} diff --git a/srcpkgs/kodi/template b/srcpkgs/kodi/template index 422ba2bc5b8230..37e01b08f2247c 100644 --- a/srcpkgs/kodi/template +++ b/srcpkgs/kodi/template @@ -1,31 +1,33 @@ # Template file for 'kodi' pkgname=kodi version=21.2 -revision=5 +revision=6 _codename="Omega" _crossguid_ver="ca1bf4b810e2d188d04cb6286f957008ee1b7681" _dvdcss_ver="1.4.3-Next-Nexus-Alpha2-2" _dvdread_ver="6.1.3-Next-Nexus-Alpha2-2" _dvdnav_ver="6.1.1-Next-Nexus-Alpha2-2" _udfread_ver="1.1.2" +_ffmpeg_ver="6.0.1" _groovy=4.0.16 _common_lang=3.14.0 _common_text=1.11.0 build_style=cmake # XXX: some vendored libraries aren't found if CMAKE_BUILD_TYPE=None # because there is special handling for =Release -configure_args="-DWITH_FFMPEG=/usr -DENABLE_LDGOLD=OFF -DAPP_RENDER_SYSTEM=gl -DCMAKE_BUILD_TYPE=Release +configure_args="-DENABLE_LDGOLD=OFF -DAPP_RENDER_SYSTEM=gl -DCMAKE_BUILD_TYPE=Release -DENABLE_LDGOLD=OFF -DENABLE_AIRTUNES=ON -DENABLE_AVAHI=ON -DENABLE_BLURAY=ON -DENABLE_CEC=ON -DENABLE_DBUS=ON -DENABLE_DVDCSS=ON -DENABLE_EGL=ON -DENABLE_EVENTCLIENTS=ON -DENABLE_MICROHTTPD=ON -DENABLE_MYSQLCLIENT=ON -DENABLE_NFS=ON -DENABLE_OPTICAL=ON -DENABLE_SMBCLIENT=ON -DENABLE_UDEV=ON -DENABLE_UPNP=ON -DENABLE_VAAPI=ON -DENABLE_VDPAU=ON -DENABLE_XSLT=ON -DENABLE_LIRCCLIENT=OFF -DENABLE_INTERNAL_RapidJSON=OFF -DENABLE_INTERNAL_CROSSGUID=ON -DENABLE_INTERNAL_FSTRCMP=OFF - -DENABLE_INTERNAL_FLATBUFFERS=OFF -DENABLE_INTERNAL_UDFREAD=ON + -DENABLE_INTERNAL_FLATBUFFERS=OFF -DENABLE_INTERNAL_UDFREAD=ON -DENABLE_INTERNAL_FFMPEG=ON -DCROSSGUID_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/crossguid-${_crossguid_ver}.tar.gz -Dlibdvdcss_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdcss-${_dvdcss_ver}.tar.gz -Dlibdvdnav_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdnav-${_dvdnav_ver}.tar.gz -Dlibdvdread_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdread-${_dvdread_ver}.tar.gz - -DUDFREAD_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libudfread-${_udfread_ver}.tar.gz" + -DUDFREAD_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libudfread-${_udfread_ver}.tar.gz + -DFFMPEG_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/ffmpeg-${_ffmpeg_ver}.tar.gz" make_build_target="all" hostmakedepends="automake libtool pkg-config gperf gettext zip nasm yasm python3-devel python3-packaging-bootstrap @@ -40,7 +42,7 @@ makedepends="eudev-libudev-devel pcre-devel expat-devel libpng-devel libjpeg-tur enca-devel boost-headers libcurl-devel libva-devel libvdpau-devel libass-devel libbluetooth-devel yajl-devel libplist-devel librtmp-devel libdisplay-info-devel tinyxml-devel tinyxml2-devel taglib-devel libcap-devel lame-devel libbluray-devel - libnfs-devel ffmpeg6-devel giflib-devel libxslt-devel gnutls-devel libssh-devel + libnfs-devel giflib-devel libxslt-devel gnutls-devel libssh-devel libmicrohttpd-devel libcec-devel dcadec-devel flatbuffers-devel fmt-devel lcms2-devel libfstrcmp-devel rapidjson libcdio-paranoia spdlog libwaylandpp-devel libinput-devel libdav1d-devel gtest-devel python3-devel" @@ -58,9 +60,10 @@ distfiles="https://github.com/xbmc/xbmc/archive/${version}-${_codename}.tar.gz https://github.com/xbmc/libdvdread/archive/${_dvdread_ver}.tar.gz>libdvdread-${_dvdread_ver}.tar.gz https://github.com/xbmc/libdvdnav/archive/${_dvdnav_ver}.tar.gz>libdvdnav-${_dvdnav_ver}.tar.gz https://mirrors.kodi.tv/build-deps/sources/libudfread-${_udfread_ver}.tar.gz - http://mirrors.kodi.tv/build-deps/sources/commons-lang3-${_common_lang}-bin.tar.gz - http://mirrors.kodi.tv/build-deps/sources/commons-text-${_common_text}-bin.tar.gz - http://mirrors.kodi.tv/build-deps/sources/apache-groovy-binary-${_groovy}.zip" + https://mirrors.kodi.tv/build-deps/sources/commons-lang3-${_common_lang}-bin.tar.gz + https://mirrors.kodi.tv/build-deps/sources/commons-text-${_common_text}-bin.tar.gz + https://mirrors.kodi.tv/build-deps/sources/apache-groovy-binary-${_groovy}.zip + https://mirrors.kodi.tv/build-deps/sources/ffmpeg-${_ffmpeg_ver}.tar.gz" checksum="da3a5df663684664b9383b65f1c06568222629d935084a59e4e641fcdcb6c383 6be27e0b3a4907f0cd3cfadec255ee1b925569e1bd06e67a4d2f4267299b69c4 f38c4a4e7a4f4da6d8e83b8852489aa3bb6588a915dc41f5ee89d9aad305a06e @@ -69,7 +72,8 @@ checksum="da3a5df663684664b9383b65f1c06568222629d935084a59e4e641fcdcb6c383 2bf16726ac98d093156195bb049a663e07d3323e079c26912546f4e05c77bac5 317c3e3fcd5fcca3781a7996ff1e0c50c13244ee961e94e5f6f6d84b84733b16 4169cb90571fb28fad4c5eea7c1c994c18f1995452f73e8ea7a86087c0e3822e - b8c3bec88a3f5a62235d9429a97e371032bf7216f3e28724823a9169dd10befc" + b8c3bec88a3f5a62235d9429a97e371032bf7216f3e28724823a9169dd10befc + 375fd8abab657d18578554927d23abfc9cb3b6794bd9839330230cf5f9fcea26" skip_extraction="crossguid-${_crossguid_ver}.tar.gz libdvdcss-${_dvdcss_ver}.tar.gz libdvdread-${_dvdread_ver}.tar.gz @@ -77,7 +81,8 @@ skip_extraction="crossguid-${_crossguid_ver}.tar.gz libudfread-${_udfread_ver}.tar.gz commons-lang3-${_common_lang}-bin.tar.gz commons-text-${_common_text}-bin.tar.gz - apache-groovy-binary-${_groovy}.zip" + apache-groovy-binary-${_groovy}.zip + ffmpeg-${_ffmpeg_ver}.tar.gz" lib32disabled=yes python_version=3 LDFLAGS="-Wl,-z,stack-size=1048576" @@ -120,6 +125,7 @@ fi pre_configure() { if [ "$CROSS_BUILD" ]; then +# vsed -i "2i include(/builddir/kodi-21.2/build/cross_${XBPS_CROSS_TRIPLET}.cmake)" CMakeLists.txt find -type f | \ grep "configure\.ac\|Makefile\|cmake\|config\.site" | \ xargs sed -i -e "s;-isystem;-I;g" @@ -160,6 +166,13 @@ pre_configure() { configure_args+=" -Dapache-commons-text_SOURCE_DIR=$wrksrc/xbps/common-text" } +# static internal ffmpeg is put in cmake build/build/lib dir +post_configure() { + if [ "$CROSS_BUILD" ]; then + vsed -i "s|lib -Wl,--export-dyn|lib -L/builddir/kodi-${version}/build/build/lib -Wl,--export-dyn|" build/build.ninja + fi +} + do_check() { ./build/kodi-test --gtest_filter="${_gtest_filter}" } From 6cff13b9f7607a897d0d12a3a19d898ea4743760 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 032/110] kpipewire: revbump for ffmpeg8 --- srcpkgs/kpipewire/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/kpipewire/template b/srcpkgs/kpipewire/template index e48131c91397ae..6f7aadea6216a0 100644 --- a/srcpkgs/kpipewire/template +++ b/srcpkgs/kpipewire/template @@ -1,12 +1,12 @@ # Template file for 'kpipewire' pkgname=kpipewire version=6.6.3 -revision=1 +revision=2 build_style=cmake configure_args="-DKDE_INSTALL_QMLDIR=lib/qt6/qml" hostmakedepends="extra-cmake-modules gettext qt6-base qt6-tools pkg-config pipewire wayland-devel qt6-declarative-host-tools" -makedepends="ffmpeg6-devel kf6-kcoreaddons-devel kf6-kwayland-devel +makedepends="ffmpeg-devel kf6-kcoreaddons-devel kf6-kwayland-devel kf6-ki18n-devel libva-devel libepoxy-devel pipewire-devel plasma-wayland-protocols wayland-devel qt6-declarative-devel qt6-base-private-devel" From c90089cea8048e687bf713f5ecfbe5b58002d253 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 033/110] lms: revbump for ffmpeg8 --- srcpkgs/lms/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/lms/template b/srcpkgs/lms/template index ac652d9af0f02f..7703f401936efe 100644 --- a/srcpkgs/lms/template +++ b/srcpkgs/lms/template @@ -1,11 +1,11 @@ # Template file for 'lms' pkgname=lms version=3.76.0 -revision=2 +revision=3 build_style=cmake configure_args="-DLMS_IMAGE_BACKEND=graphicsmagick" hostmakedepends="pkg-config" -makedepends="wt-devel ffmpeg6-devel boost-devel-minimal +makedepends="wt-devel ffmpeg-devel boost-devel-minimal libconfig++-devel taglib-devel pugixml-devel pam-devel libgraphicsmagick-devel gtest-devel libarchive-devel xxHash-devel" conf_files="/etc/lms.conf /etc/pam.d/lms" From 957dc1df042036aa62b1edfcd3fac2732e0f9b79 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 034/110] localsearch: revbump for ffmpeg8 --- srcpkgs/localsearch/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/localsearch/template b/srcpkgs/localsearch/template index 7e2db1cb0f6a9d..7a958cc538ccf6 100644 --- a/srcpkgs/localsearch/template +++ b/srcpkgs/localsearch/template @@ -1,7 +1,7 @@ # Template file for 'localsearch' pkgname=localsearch version=3.11.0 -revision=1 +revision=2 build_style=meson build_helper=qemu configure_args="-Dextract=true -Dcue=enabled -Dexif=enabled -Dlibav=enabled @@ -12,7 +12,7 @@ configure_args="-Dextract=true -Dcue=enabled -Dexif=enabled -Dlibav=enabled -Dsystemd_user_services=false $(vopt_feature landlock)" hostmakedepends="pkg-config glib-devel gettext asciidoc python3-dbusmock" -makedepends="tinysparql-devel ffmpeg6-devel dbus-devel exempi-devel +makedepends="tinysparql-devel ffmpeg-devel dbus-devel exempi-devel libglib-devel libgexiv2-devel gstreamer1-devel icu-devel libcue-devel libexif-devel libgsf-devel libgxps-devel libiptcdata-devel libjpeg-turbo-devel libosinfo-devel libpng-devel libseccomp-devel tiff-devel libxml2-devel From 9ccba69945c30e0a6d45061b10f554e5899bff0d Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 035/110] minidlna: revbump for ffmpeg8 --- srcpkgs/minidlna/patches/ffmpeg8.patch | 11 +++++++++++ srcpkgs/minidlna/template | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/minidlna/patches/ffmpeg8.patch diff --git a/srcpkgs/minidlna/patches/ffmpeg8.patch b/srcpkgs/minidlna/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..5cf27e08a40488 --- /dev/null +++ b/srcpkgs/minidlna/patches/ffmpeg8.patch @@ -0,0 +1,11 @@ +--- a/libav.h ++++ b/libav.h +@@ -174,7 +174,7 @@ + #define lav_codec_tag(s) s->codecpar->codec_tag + #define lav_sample_rate(s) s->codecpar->sample_rate + #define lav_bit_rate(s) s->codecpar->bit_rate +-#define lav_channels(s) s->codecpar->channels ++#define lav_channels(s) s->codecpar->ch_layout.nb_channels + #define lav_width(s) s->codecpar->width + #define lav_height(s) s->codecpar->height + #define lav_profile(s) s->codecpar->profile diff --git a/srcpkgs/minidlna/template b/srcpkgs/minidlna/template index cffc4138f2e15a..c518a5c57ec986 100644 --- a/srcpkgs/minidlna/template +++ b/srcpkgs/minidlna/template @@ -1,7 +1,7 @@ # Template file for 'minidlna' pkgname=minidlna version=1.3.3 -revision=4 +revision=5 build_style=gnu-configure configure_args=" --sbindir=/usr/bin @@ -12,7 +12,7 @@ make_dirs=" /var/lib/minidlna 0750 minidlna minidlna /var/log/minidlna 0750 minidlna minidlna" hostmakedepends="pkg-config gettext" -makedepends="ffmpeg6-devel libjpeg-turbo-devel sqlite-devel libexif-devel +makedepends="ffmpeg-devel libjpeg-turbo-devel sqlite-devel libexif-devel libid3tag-devel libvorbis-devel libflac-devel" short_desc="DLNA/UPnP-AV compliant media server" maintainer="Duncaen " From 3db9174daae7129282660bf7bfcd76c35667f2c1 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 036/110] mixxx: revbump for ffmpeg8 --- srcpkgs/mixxx/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mixxx/template b/srcpkgs/mixxx/template index 343e10b4b836c8..a47fb6e251f77e 100644 --- a/srcpkgs/mixxx/template +++ b/srcpkgs/mixxx/template @@ -1,12 +1,12 @@ # Template file for 'mixxx' pkgname=mixxx version=2.5.4 -revision=1 +revision=2 build_style=cmake configure_args="-DCMAKE_BUILD_TYPE=Release -DENGINEPRIME=OFF" hostmakedepends="extra-cmake-modules pkg-config protobuf qt6-tools qt6-base qt6-declarative-host-tools qt6-shadertools mold" -makedepends="benchmark-devel chromaprint-devel faad2-devel ffmpeg6-devel +makedepends="benchmark-devel chromaprint-devel faad2-devel ffmpeg-devel glib-devel glu-devel gperftools-devel gtest-devel lame-devel libid3tag-devel libsndfile-devel libmad-devel libmodplug-devel libusb-devel opusfile-devel libflac-devel libogg-devel libvorbis-devel lilv-devel lv2 libmp4v2-devel From 82fe93a328ebafca9718a08e621f8aa2862d7da9 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 037/110] motion: revbump for ffmpeg8 --- srcpkgs/motion/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/motion/template b/srcpkgs/motion/template index 76c91b79a083ba..e786e3fee6bdc3 100644 --- a/srcpkgs/motion/template +++ b/srcpkgs/motion/template @@ -1,10 +1,10 @@ # Template file for 'motion' pkgname=motion version=4.7.1 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="automake pkg-config gettext-devel tar" -makedepends="ffmpeg6-devel libmicrohttpd-devel v4l-utils-devel gettext-devel" +makedepends="ffmpeg-devel libmicrohttpd-devel v4l-utils-devel gettext-devel" short_desc="Software motion detector" maintainer="Andrea Brancaleoni " license="GPL-2.0-or-later" From 6e8e6ef264b905ea9f5b0392299069a8553a938f Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 038/110] mpd: revbump for ffmpeg8 --- srcpkgs/mpd/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mpd/template b/srcpkgs/mpd/template index c7fa46017b231d..e797c328ad69ce 100644 --- a/srcpkgs/mpd/template +++ b/srcpkgs/mpd/template @@ -1,7 +1,7 @@ # Template file for 'mpd' pkgname=mpd version=0.24.12 -revision=1 +revision=2 build_style=meson configure_args="-Dopus=enabled -Dmikmod=enabled -Dneighbor=true -Dpipe=true -Dtwolame=enabled -Dbzip2=enabled @@ -18,7 +18,7 @@ configure_args="-Dopus=enabled -Dmikmod=enabled -Dneighbor=true $(vopt_feature openmpt openmpt) $(vopt_feature pipewire pipewire)" conf_files="/etc/mpd.conf" hostmakedepends="pkg-config python3-Sphinx" -makedepends="avahi-glib-libs-devel faad2-devel ffmpeg6-devel +makedepends="avahi-glib-libs-devel faad2-devel ffmpeg-devel libcurl-devel libid3tag-devel libmad-devel libmikmod-devel libmms-devel libmodplug-devel libmpdclient-devel libnfs-devel libsamplerate-devel libnpupnp-devel mpg123-devel opus-devel pcre2-devel icu-devel From 1293650eb2315859529f23b6ff6a85f161b05a33 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 039/110] musikcube: revbump for ffmpeg8 --- srcpkgs/musikcube/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/musikcube/template b/srcpkgs/musikcube/template index aadaae413e7656..1a4288c9627a90 100644 --- a/srcpkgs/musikcube/template +++ b/srcpkgs/musikcube/template @@ -1,12 +1,12 @@ # Template file for 'musikcube' pkgname=musikcube version=3.0.5 -revision=1 +revision=2 build_style=cmake make_cmd=make configure_args="-DNO_NCURSESW=1" hostmakedepends="pkg-config" -makedepends="libgme-devel libogg-devel libmicrohttpd-devel ffmpeg6-devel +makedepends="libgme-devel libogg-devel libmicrohttpd-devel ffmpeg-devel openssl-devel pulseaudio-devel lame-devel zlib-devel alsa-lib-devel libvorbis-devel libcurl-devel ncurses-devel libev-devel taglib-devel sndio-devel pipewire-devel ncurses-libtinfo-devel libopenmpt-devel From d47e3b91bdca4e72dccce309773449fcc4df6366 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 040/110] openmw: revbump for ffmpeg8 --- srcpkgs/openmw/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/openmw/template b/srcpkgs/openmw/template index 7166246925bf9b..71910d28d99e5f 100644 --- a/srcpkgs/openmw/template +++ b/srcpkgs/openmw/template @@ -1,7 +1,7 @@ # Template file for 'openmw' pkgname=openmw version=0.50.0 -revision=3 +revision=4 build_style=cmake _recast_commit=c393777d26d2ff6519ac23612abf8af42678c9dd _bullet_tag=3.25 @@ -11,7 +11,7 @@ configure_args="-DOPENMW_USE_SYSTEM_BULLET=OFF -DOPENMW_USE_SYSTEM_MYGUI=ON -DOPENMW_LTO_BUILD=ON -DFETCHCONTENT_FULLY_DISCONNECTED=On" hostmakedepends="pkg-config qt6-base qt6-tools" makedepends="SDL2-devel boost-devel-minimal libboost_filesystem - libboost_iostreams libboost_program_options ffmpeg6-devel libXt-devel + libboost_iostreams libboost_program_options ffmpeg-devel libXt-devel libmygui-devel libopenal-devel libunshield-devel osg-devel qt6-svg-devel liblz4-devel yaml-cpp-devel LuaJIT-devel" short_desc="Open Implementation of Morrowind's Engine" From e007e80137991e4ed2f6c9968fc807dbffa701f9 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 041/110] openshot: revbump for ffmpeg8 --- srcpkgs/openshot/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/openshot/template b/srcpkgs/openshot/template index 56f188f569c199..07297a1fad825a 100644 --- a/srcpkgs/openshot/template +++ b/srcpkgs/openshot/template @@ -1,10 +1,10 @@ # Template file for 'openshot' pkgname=openshot version=3.3.0 -revision=1 +revision=2 build_style=python3-module hostmakedepends="python3 python3-setuptools" -makedepends="ffmpeg6-devel python3-PyQt5" +makedepends="ffmpeg-devel python3-PyQt5" depends="ImageMagick libopenshot python3-PyQt5-svg python3-PyQt5-webkit python3-httplib2 python3-pyzmq python3-requests" short_desc="Open-source, non-linear video editor for Linux" From 4c0cd6ae800c16855d12ccdc8888b294279f0a87 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 042/110] pianobar: revbump for ffmpeg8 --- srcpkgs/pianobar/patches/ffmpeg8.patch | 38 ++++++++++++++++++++++++++ srcpkgs/pianobar/template | 4 +-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/pianobar/patches/ffmpeg8.patch diff --git a/srcpkgs/pianobar/patches/ffmpeg8.patch b/srcpkgs/pianobar/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..0e1fd066f253fb --- /dev/null +++ b/srcpkgs/pianobar/patches/ffmpeg8.patch @@ -0,0 +1,38 @@ +--- a/src/player.c ++++ b/src/player.c +@@ -286,7 +286,7 @@ + "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64, + time_base.num, time_base.den, cp->sample_rate, + av_get_sample_fmt_name (player->cctx->sample_fmt), +- cp->channel_layout); ++ cp->ch_layout); + if ((ret = avfilter_graph_create_filter (&player->fabuf, + avfilter_get_by_name ("abuffer"), "source", strbuf, NULL, + player->fgraph)) < 0) { +@@ -340,7 +340,7 @@ + memset (&aoFmt, 0, sizeof (aoFmt)); + aoFmt.bits = av_get_bytes_per_sample (avformat) * 8; + assert (aoFmt.bits > 0); +- aoFmt.channels = cp->channels; ++ aoFmt.channels = cp->ch_layout.nb_channels; + aoFmt.rate = getSampleRate (player); + aoFmt.byte_format = AO_FMT_NATIVE; + +@@ -508,7 +508,6 @@ + player->fgraph = NULL; + } + if (player->cctx != NULL) { +- avcodec_close (player->cctx); + player->cctx = NULL; + } + if (player->fctx != NULL) { +@@ -583,8 +582,7 @@ + } + pthread_mutex_unlock (&player->aoplayLock); + +- const int numChannels = av_get_channel_layout_nb_channels ( +- filteredFrame->channel_layout); ++ const int numChannels = filteredFrame->ch_layout.nb_channels; + const int bps = av_get_bytes_per_sample (filteredFrame->format); + ao_play (player->aoDev, (char *) filteredFrame->data[0], + filteredFrame->nb_samples * numChannels * bps); diff --git a/srcpkgs/pianobar/template b/srcpkgs/pianobar/template index 25ef1ab4c34af6..142d299f460707 100644 --- a/srcpkgs/pianobar/template +++ b/srcpkgs/pianobar/template @@ -1,11 +1,11 @@ # Template file for 'pianobar' pkgname=pianobar version=2022.04.01 -revision=2 +revision=3 build_style=gnu-makefile make_build_args="V=1" hostmakedepends="pkg-config" -makedepends="faad2-devel ffmpeg6-devel gnutls-devel json-c-devel libao-devel +makedepends="faad2-devel ffmpeg-devel gnutls-devel json-c-devel libao-devel libcurl-devel libgcrypt-devel" short_desc="Free/open-source, console-based client for Pandora radio" maintainer="Orphaned " From 296a4701c189c18de0dba4634aede03cec9bc0ae Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 043/110] pqiv: revbump for ffmpeg8 --- srcpkgs/pqiv/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/pqiv/template b/srcpkgs/pqiv/template index f7cc21aa23718d..1ed231874b28b7 100644 --- a/srcpkgs/pqiv/template +++ b/srcpkgs/pqiv/template @@ -1,10 +1,10 @@ # Template file for 'pqiv' pkgname=pqiv version=2.13.3 -revision=1 +revision=2 build_style=gnu-makefile hostmakedepends="pkg-config" -makedepends="glib-devel gtk+3-devel $(vopt_if ffmpeg ffmpeg6-devel) +makedepends="glib-devel gtk+3-devel $(vopt_if ffmpeg ffmpeg-devel) $(vopt_if archive libarchive-devel) $(vopt_if ps libspectre-devel) $(vopt_if webp libwebp-devel) $(vopt_if pdf poppler-glib-devel)" short_desc="Powerful quick image viewer" From 730c1aa9697d8e68e7fac923101c23a16ef1c25a Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 044/110] qmmp: revbump for ffmpeg8 --- srcpkgs/qmmp/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qmmp/template b/srcpkgs/qmmp/template index b88f03c0af6c67..784dadff089ee8 100644 --- a/srcpkgs/qmmp/template +++ b/srcpkgs/qmmp/template @@ -1,11 +1,11 @@ # Template file for 'qmmp' pkgname=qmmp version=2.3.2 -revision=1 +revision=2 build_style=cmake configure_args="-DUSE_HAL:BOOL=FALSE -DQMMP_DEFAULT_UI:STRING=simple" hostmakedepends="pkg-config qt6-base qt6-tools" -makedepends="enca-devel faad2-devel ffmpeg6-devel jack-devel libarchive-devel +makedepends="enca-devel faad2-devel ffmpeg-devel jack-devel libarchive-devel libbs2b-devel libcdio-paranoia-devel libcurl-devel libgme-devel libmad-devel libmms-devel libmodplug-devel libmpcdec-devel libsamplerate-devel libshout-devel libsidplayfp-devel libsoxr-devel libwildmidi-devel opusfile-devel pipewire-devel From 486c121221cea0bd57a6c8b5500812db6bbb8590 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 045/110] qtox: revbump for ffmpeg8 --- srcpkgs/qtox/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qtox/template b/srcpkgs/qtox/template index 13841fc1a3cb55..dfc34e70866609 100644 --- a/srcpkgs/qtox/template +++ b/srcpkgs/qtox/template @@ -1,12 +1,12 @@ # Template file for 'qtox' pkgname=qtox version=1.18.5 -revision=1 +revision=2 build_style=cmake configure_args="-DUPDATE_CHECK=OFF -DGIT_VERSION=${version} -DGIT_DESCRIBE_EXACT=${version} -DGIT_DESCRIBE=${version}" hostmakedepends="pkg-config qt6-base qt6-tools" -makedepends="ffmpeg6-devel libexif-devel libopenal-devel libsodium-devel +makedepends="ffmpeg-devel libexif-devel libopenal-devel libsodium-devel libvpx-devel opus-devel qrencode-devel libtomcrypt-devel qt6-base-devel qt6-tools-devel qt6-svg-devel kf6-sonnet-devel sqlcipher-devel toxcore-devel v4l-utils-devel libXScrnSaver-devel" From 129702ea17b30998ace82f12c44766881975bdc7 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 046/110] retroarch: revbump for ffmpeg8 --- srcpkgs/retroarch/patches/ffmpeg8.patch | 46 +++++++++++++++++++++++++ srcpkgs/retroarch/template | 4 +-- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/retroarch/patches/ffmpeg8.patch diff --git a/srcpkgs/retroarch/patches/ffmpeg8.patch b/srcpkgs/retroarch/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..5554355f03d4ad --- /dev/null +++ b/srcpkgs/retroarch/patches/ffmpeg8.patch @@ -0,0 +1,46 @@ +--- a/record/drivers/record_ffmpeg.c ++++ b/record/drivers/record_ffmpeg.c +@@ -372,7 +372,7 @@ + if (!audio->buffer) + return false; + +- audio->outbuf_size = AV_INPUT_BUFFER_MIN_SIZE; ++ audio->outbuf_size = AV_INPUT_BUFFER_PADDING_SIZE; + audio->outbuf = (uint8_t*)av_malloc(audio->outbuf_size); + + if (!audio->outbuf) +@@ -949,7 +949,6 @@ + + if (handle->audio.codec) + { +- avcodec_close(handle->audio.codec); + av_free(handle->audio.codec); + } + +@@ -957,7 +956,6 @@ + + if (handle->video.codec) + { +- avcodec_close(handle->video.codec); + av_free(handle->video.codec); + } + +--- a/cores/libretro-ffmpeg/ffmpeg_core.c ++++ b/cores/libretro-ffmpeg/ffmpeg_core.c +@@ -2088,17 +2088,12 @@ + + for (i = 0; i < MAX_STREAMS; i++) + { +- if (sctx[i]) +- avcodec_close(sctx[i]); +- if (actx[i]) +- avcodec_close(actx[i]); + sctx[i] = NULL; + actx[i] = NULL; + } + + if (vctx) + { +- avcodec_close(vctx); + vctx = NULL; + } diff --git a/srcpkgs/retroarch/template b/srcpkgs/retroarch/template index f563ac602eea49..79d1719629191c 100644 --- a/srcpkgs/retroarch/template +++ b/srcpkgs/retroarch/template @@ -1,7 +1,7 @@ # Template file for 'retroarch' pkgname=retroarch version=1.21.0 -revision=1 +revision=2 build_style=configure configure_args="--prefix=/usr --sysconfdir=/etc --enable-networking --enable-udev --disable-builtinflac --enable-systemmbedtls @@ -12,7 +12,7 @@ configure_args="--prefix=/usr --sysconfdir=/etc --enable-networking conf_files="/etc/retroarch.cfg" hostmakedepends="pkg-config" makedepends="alsa-lib-devel eudev-libudev-devel freetype-devel libusb-devel libxkbcommon-devel - mbedtls-devel zlib-devel $(vopt_if ffmpeg ffmpeg6-devel) $(vopt_if flac libflac-devel) + mbedtls-devel zlib-devel $(vopt_if ffmpeg ffmpeg-devel) $(vopt_if flac libflac-devel) $(vopt_if jack jack-devel) $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if qt5 qt5-devel) $(vopt_if sdl2 SDL2-devel) $(vopt_if vulkan vulkan-loader-devel) $(vopt_if x11 'libXext-devel libXinerama-devel libXxf86vm-devel')" From 1492c79374c2fc80a1b5365fce1331c63952d4f2 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 047/110] retroshare: revbump for ffmpeg8 --- srcpkgs/retroshare/template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srcpkgs/retroshare/template b/srcpkgs/retroshare/template index 4b834864c4143a..eeeac550eb5caa 100644 --- a/srcpkgs/retroshare/template +++ b/srcpkgs/retroshare/template @@ -1,13 +1,13 @@ # Template file for 'retroshare' pkgname=retroshare version=0.6.6 -revision=5 +revision=6 build_style=qmake #XXX broadcast feature requires an ancient udp-discovery-cpp which either needs # to be fetched+patched (FTBFS) here or packaged :/ configure_args="RS_UPNP_LIB=miniupnpc CONFIG+=no_rs_broadcast_discovery" hostmakedepends="pkg-config qt5-qmake qt5-host-tools" -makedepends="ffmpeg6-devel libsecret-devel libmicrohttpd-devel +makedepends="ffmpeg-devel libsecret-devel libmicrohttpd-devel libopencv-devel libssh-devel miniupnpc-devel libXScrnSaver-devel libxslt-devel pulseaudio-devel qt5-multimedia-devel qt5-tools-devel qt5-x11extras-devel speex-devel sqlcipher-devel sqlite-devel rapidjson" @@ -20,6 +20,10 @@ checksum=c545b9249ac7dbfef72a2d636bc0f8b729c7ce05f21a54dd9284b2a387592d4a export CXXFLAGS="-std=c++14" +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + CXXFLAGS+=" -D_LARGEFILE64_SOURCE" +fi + post_install() { for l in COPYING LICENSES/*; do vlicense "$l" From 6b0d3e68aa439864da89a3fc1a550f78f36d7e38 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 048/110] rsgain: revbump for ffmpeg8 --- srcpkgs/rsgain/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/rsgain/template b/srcpkgs/rsgain/template index e78dab9bb79ca6..ac3251dec61f30 100644 --- a/srcpkgs/rsgain/template +++ b/srcpkgs/rsgain/template @@ -1,10 +1,10 @@ # Template file for 'rsgain' pkgname=rsgain version=3.7 -revision=1 +revision=2 build_style=cmake hostmakedepends="pkg-config" -makedepends="ffmpeg6-devel taglib-devel libebur128-devel inih-devel fmt-devel" +makedepends="ffmpeg-devel taglib-devel libebur128-devel inih-devel fmt-devel" short_desc="Simple, but powerful ReplayGain 2.0 tagging utility" maintainer="lemmi " license="BSD-2-Clause" From ea12c260ad16c5d63f97bc68711edd07b4b030f5 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 049/110] scrcpy: revbump for ffmpeg8 --- srcpkgs/scrcpy/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/scrcpy/template b/srcpkgs/scrcpy/template index f20bc49e48aa30..2704672d5084a5 100644 --- a/srcpkgs/scrcpy/template +++ b/srcpkgs/scrcpy/template @@ -1,12 +1,12 @@ # Template file for 'scrcpy' pkgname=scrcpy version=4.0 -revision=1 +revision=2 build_style=meson configure_args="-Dcompile_server=false -Dprebuilt_server=/usr/share/scrcpy/scrcpy-server-v${version}" hostmakedepends="pkg-config" -makedepends="SDL3-devel ffmpeg6-devel" +makedepends="SDL3-devel ffmpeg-devel" depends="android-tools" short_desc="Display and control your Android device" maintainer="SolitudeSF " From de68064e7252d9258c1f45214e96ca656d31ad29 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 050/110] siril: revbump for ffmpeg8 --- srcpkgs/siril/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/siril/template b/srcpkgs/siril/template index 0123c7ef09b0d6..138856d3811dbd 100644 --- a/srcpkgs/siril/template +++ b/srcpkgs/siril/template @@ -1,13 +1,13 @@ # Template file for 'siril' pkgname=siril version=1.2.6 -revision=2 +revision=3 build_style=meson meson_builddir=mbuild hostmakedepends="pkg-config cmake" makedepends="fftw-devel libconfig-devel libopencv-devel libffms2-devel gsl-devel libraw-devel tiff-devel libpng-devel libcurl-devel exiv2-devel - ffmpeg6-devel gtk+3-devel cfitsio-devel gsl-devel libgomp-devel libheif-devel" + ffmpeg-devel gtk+3-devel cfitsio-devel gsl-devel libgomp-devel libheif-devel" depends="gnuplot" short_desc="Free astronomical image processing software" maintainer="Orphaned " From 385ed17e5ee8068f86e09a35b767e1aa4ee2fd81 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 051/110] spek-x: update to 0.9.4 --- srcpkgs/spek-x/patches/musl.patch | 7 ------- srcpkgs/spek-x/template | 10 +++++----- 2 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 srcpkgs/spek-x/patches/musl.patch diff --git a/srcpkgs/spek-x/patches/musl.patch b/srcpkgs/spek-x/patches/musl.patch deleted file mode 100644 index 662f45936febc6..00000000000000 --- a/srcpkgs/spek-x/patches/musl.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- a/tests/perf.cc 2024-03-09 17:13:49.086603418 -0500 -+++ b/tests/perf.cc 2024-03-09 17:13:59.453603753 -0500 -@@ -1,3 +1,4 @@ -+#include - #include - #include - #include diff --git a/srcpkgs/spek-x/template b/srcpkgs/spek-x/template index c100b53da5b4b1..283c3edf8a3c44 100644 --- a/srcpkgs/spek-x/template +++ b/srcpkgs/spek-x/template @@ -1,18 +1,18 @@ # Template file for 'spek-x' pkgname=spek-x -version=0.9.3 -revision=1 +version=0.9.4 +revision=2 build_style=gnu-configure hostmakedepends="automake gettext-devel intltool libtool pkg-config wxWidgets-common wxWidgets-gtk3-devel" -makedepends="ffmpeg6-devel wxWidgets-gtk3-devel" -depends="ffmpeg6" +makedepends="ffmpeg-devel wxWidgets-gtk3-devel" +depends="ffmpeg" short_desc="Acoustic spectrum analyser" maintainer="zlice " license="GPL-3.0-or-later" homepage="https://github.com/MikeWang000000/spek-x" distfiles="https://github.com/MikeWang000000/spek-x/archive/v${version}.tar.gz" -checksum="7f4b109903333cdd310ab2b9176f0dc49a565891376e281a233d342cedf90ef7" +checksum=95aa26969d731b8cf46c3ee010f153e9f3a1d40b092c8eba0ace82f5d0577674 CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" From c0825058940783d48b8cfa92659376be63fc21c4 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 052/110] ssr: update for ffmpeg8 no version release for a while. latest git works with ffmpeg8. --- .../0001-Fix-build-with-ffmpeg-5.0.patch | 241 ------------------ srcpkgs/ssr/template | 11 +- 2 files changed, 6 insertions(+), 246 deletions(-) delete mode 100644 srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch diff --git a/srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch b/srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch deleted file mode 100644 index 4c069b5a9fc464..00000000000000 --- a/srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch +++ /dev/null @@ -1,241 +0,0 @@ -From f4cbde38021d9330dc73d2e3dfa8a70da3ff5721 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= -Date: Sun, 16 Jan 2022 02:40:04 +0100 -Subject: [PATCH] Fix build with ffmpeg 5.0 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Adapt to ffmpeg 5.0 requiring more const-ness for AVCodec. - -Signed-off-by: Bernhard Rosenkränzer ---- - src/AV/Output/AudioEncoder.cpp | 6 +++--- - src/AV/Output/AudioEncoder.h | 4 ++-- - src/AV/Output/BaseEncoder.cpp | 4 ++-- - src/AV/Output/BaseEncoder.h | 4 ++-- - src/AV/Output/Muxer.cpp | 12 ++++++------ - src/AV/Output/Muxer.h | 4 ++-- - src/AV/Output/VideoEncoder.cpp | 6 +++--- - src/AV/Output/VideoEncoder.h | 4 ++-- - 8 files changed, 22 insertions(+), 22 deletions(-) - -diff --git a/src/AV/Output/AudioEncoder.cpp b/src/AV/Output/AudioEncoder.cpp -index 34d015c..cefc2e0 100644 ---- a/src/AV/Output/AudioEncoder.cpp -+++ b/src/AV/Output/AudioEncoder.cpp -@@ -34,7 +34,7 @@ const std::vector AudioEncoder::SUPPORTED_SAMPLE - - const unsigned int AudioEncoder::DEFAULT_FRAME_SAMPLES = 1024; - --AudioEncoder::AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext *codec_context, AVCodec* codec, AVDictionary** options) -+AudioEncoder::AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext *codec_context, const AVCodec* codec, AVDictionary** options) - : BaseEncoder(muxer, stream, codec_context, codec, options) { - - #if !SSR_USE_AVCODEC_ENCODE_AUDIO2 -@@ -77,7 +77,7 @@ unsigned int AudioEncoder::GetSampleRate() { - } - - bool AudioEncoder::AVCodecIsSupported(const QString& codec_name) { -- AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); -+ const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); - if(codec == NULL) - return false; - if(!av_codec_is_encoder(codec)) -@@ -93,7 +93,7 @@ bool AudioEncoder::AVCodecIsSupported(const QString& codec_name) { - return false; - } - --void AudioEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, -+void AudioEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int channels, unsigned int sample_rate) { - - if(channels == 0) { -diff --git a/src/AV/Output/AudioEncoder.h b/src/AV/Output/AudioEncoder.h -index c93278c..ae9c82e 100644 ---- a/src/AV/Output/AudioEncoder.h -+++ b/src/AV/Output/AudioEncoder.h -@@ -40,7 +40,7 @@ private: - #endif - - public: -- AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options); -+ AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options); - ~AudioEncoder(); - - // Returns the required frame size, i.e. the number of samples (for each channel). -@@ -57,7 +57,7 @@ public: - - public: - static bool AVCodecIsSupported(const QString& codec_name); -- static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, -+ static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int channels, unsigned int sample_rate); - - private: -diff --git a/src/AV/Output/BaseEncoder.cpp b/src/AV/Output/BaseEncoder.cpp -index 7c01ef3..4780aaf 100644 ---- a/src/AV/Output/BaseEncoder.cpp -+++ b/src/AV/Output/BaseEncoder.cpp -@@ -42,7 +42,7 @@ double ParseCodecOptionDouble(const QString& key, const QString& value, double m - return clamp(value_double, min, max) * multiply; - } - --BaseEncoder::BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options) { -+BaseEncoder::BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options) { - - m_muxer = muxer; - m_stream = stream; -@@ -157,7 +157,7 @@ void BaseEncoder::IncrementPacketCounter() { - ++lock->m_total_packets; - } - --void BaseEncoder::Init(AVCodec* codec, AVDictionary** options) { -+void BaseEncoder::Init(const AVCodec* codec, AVDictionary** options) { - - // open codec - if(avcodec_open2(m_codec_context, codec, options) < 0) { -diff --git a/src/AV/Output/BaseEncoder.h b/src/AV/Output/BaseEncoder.h -index 3d92f29..7f02bbd 100644 ---- a/src/AV/Output/BaseEncoder.h -+++ b/src/AV/Output/BaseEncoder.h -@@ -51,7 +51,7 @@ private: - std::atomic m_should_stop, m_should_finish, m_is_done, m_error_occurred; - - protected: -- BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options); -+ BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options); - - public: - virtual ~BaseEncoder(); // encoders will be deleted by Muxer, don't delete them yourself! -@@ -117,7 +117,7 @@ protected: - void IncrementPacketCounter(); - - private: -- void Init(AVCodec* codec, AVDictionary** options); -+ void Init(const AVCodec* codec, AVDictionary** options); - void Free(); - - void EncoderThread(); -diff --git a/src/AV/Output/Muxer.cpp b/src/AV/Output/Muxer.cpp -index ad58380..14650b0 100644 ---- a/src/AV/Output/Muxer.cpp -+++ b/src/AV/Output/Muxer.cpp -@@ -87,7 +87,7 @@ Muxer::~Muxer() { - - VideoEncoder* Muxer::AddVideoEncoder(const QString& codec_name, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int width, unsigned int height, unsigned int frame_rate) { -- AVCodec *codec = FindCodec(codec_name); -+ const AVCodec *codec = FindCodec(codec_name); - AVCodecContext *codec_context = NULL; - AVStream *stream = AddStream(codec, &codec_context); - VideoEncoder *encoder; -@@ -111,7 +111,7 @@ VideoEncoder* Muxer::AddVideoEncoder(const QString& codec_name, const std::vecto - - AudioEncoder* Muxer::AddAudioEncoder(const QString& codec_name, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int channels, unsigned int sample_rate) { -- AVCodec *codec = FindCodec(codec_name); -+ const AVCodec *codec = FindCodec(codec_name); - AVCodecContext *codec_context = NULL; - AVStream *stream = AddStream(codec, &codec_context); - AudioEncoder *encoder; -@@ -194,7 +194,7 @@ unsigned int Muxer::GetQueuedPacketCount(unsigned int stream_index) { - void Muxer::Init() { - - // get the format we want (this is just a pointer, we don't have to free this) -- AVOutputFormat *format = av_guess_format(m_container_name.toUtf8().constData(), NULL, NULL); -+ const AVOutputFormat *format = av_guess_format(m_container_name.toUtf8().constData(), NULL, NULL); - if(format == NULL) { - Logger::LogError("[Muxer::Init] " + Logger::tr("Error: Can't find chosen output format!")); - throw LibavException(); -@@ -261,8 +261,8 @@ void Muxer::Free() { - } - } - --AVCodec* Muxer::FindCodec(const QString& codec_name) { -- AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); -+const AVCodec* Muxer::FindCodec(const QString& codec_name) { -+ const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); - if(codec == NULL) { - Logger::LogError("[Muxer::FindCodec] " + Logger::tr("Error: Can't find codec!")); - throw LibavException(); -@@ -270,7 +270,7 @@ AVCodec* Muxer::FindCodec(const QString& codec_name) { - return codec; - } - --AVStream* Muxer::AddStream(AVCodec* codec, AVCodecContext** codec_context) { -+AVStream* Muxer::AddStream(const AVCodec* codec, AVCodecContext** codec_context) { - assert(!m_started); - assert(m_format_context->nb_streams < MUXER_MAX_STREAMS); - -diff --git a/src/AV/Output/Muxer.h b/src/AV/Output/Muxer.h -index d72347d..b104bcb 100644 ---- a/src/AV/Output/Muxer.h -+++ b/src/AV/Output/Muxer.h -@@ -114,8 +114,8 @@ private: - void Init(); - void Free(); - -- AVCodec* FindCodec(const QString& codec_name); -- AVStream* AddStream(AVCodec* codec, AVCodecContext** codec_context); -+ const AVCodec* FindCodec(const QString& codec_name); -+ AVStream* AddStream(const AVCodec* codec, AVCodecContext** codec_context); - - void MuxerThread(); - -diff --git a/src/AV/Output/VideoEncoder.cpp b/src/AV/Output/VideoEncoder.cpp -index 8087e8e..fc8b5d1 100644 ---- a/src/AV/Output/VideoEncoder.cpp -+++ b/src/AV/Output/VideoEncoder.cpp -@@ -34,7 +34,7 @@ const std::vector VideoEncoder::SUPPORTED_PIXEL_F - {"rgb", AV_PIX_FMT_RGB24, false}, - }; - --VideoEncoder::VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options) -+VideoEncoder::VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options) - : BaseEncoder(muxer, stream, codec_context, codec, options) { - - #if !SSR_USE_AVCODEC_ENCODE_VIDEO2 -@@ -95,7 +95,7 @@ unsigned int VideoEncoder::GetFrameRate() { - } - - bool VideoEncoder::AVCodecIsSupported(const QString& codec_name) { -- AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); -+ const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); - if(codec == NULL) - return false; - if(!av_codec_is_encoder(codec)) -@@ -111,7 +111,7 @@ bool VideoEncoder::AVCodecIsSupported(const QString& codec_name) { - return false; - } - --void VideoEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, -+void VideoEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int width, unsigned int height, unsigned int frame_rate) { - - if(width == 0 || height == 0) { -diff --git a/src/AV/Output/VideoEncoder.h b/src/AV/Output/VideoEncoder.h -index cb7ca27..68d872e 100644 ---- a/src/AV/Output/VideoEncoder.h -+++ b/src/AV/Output/VideoEncoder.h -@@ -40,7 +40,7 @@ private: - #endif - - public: -- VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options); -+ VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options); - ~VideoEncoder(); - - // Returns the required pixel format. -@@ -55,7 +55,7 @@ public: - - public: - static bool AVCodecIsSupported(const QString& codec_name); -- static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, -+ static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int width, unsigned int height, unsigned int frame_rate); - - private: --- -2.43.0 - diff --git a/srcpkgs/ssr/template b/srcpkgs/ssr/template index 5d5c0a98d65f58..c60c1d2dba3fb0 100644 --- a/srcpkgs/ssr/template +++ b/srcpkgs/ssr/template @@ -1,19 +1,20 @@ # Template file for 'ssr' pkgname=ssr version=0.4.4 -revision=3 +revision=4 +_commit=d790385b49de937976165d6feb39414c75ad6a3d build_style=cmake configure_args="-DWITH_QT5=ON" hostmakedepends="pkg-config" -makedepends="alsa-lib-devel ffmpeg6-devel glu-devel jack-devel pulseaudio-devel - qt5-tools-devel qt5-x11extras-devel libXinerama-devel v4l-utils-devel" +makedepends="alsa-lib-devel ffmpeg-devel glu-devel jack-devel pulseaudio-devel + qt5-tools-devel qt5-x11extras-devel libXinerama-devel v4l-utils-devel pipewire-devel" depends="desktop-file-utils hicolor-icon-theme" short_desc="Simple Screen Recorder for programs and games" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="http://www.maartenbaert.be/simplescreenrecorder/" -distfiles="https://github.com/MaartenBaert/ssr/archive/${version}.tar.gz" -checksum=69fccf8df6e7285d4df5033eed8748f4eae13b407488906dcf4810a277d557b8 +distfiles="https://github.com/MaartenBaert/ssr/archive/${_commit}.tar.gz" +checksum=30fe34264de003280d68e00e96a384653f137e7fc0f17571c21f5eb84abba324 if [ -n "$CROSS_BUILD" ]; then hostmakedepends+=" qt5-host-tools qt5-qmake" From a1cc79a85e577d29c7ea779875f73d90c3093faf Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 053/110] sumo: revbump for ffmpeg8 --- srcpkgs/sumo/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template index a7797e868aa7ac..b92a67f7b940ad 100644 --- a/srcpkgs/sumo/template +++ b/srcpkgs/sumo/template @@ -1,10 +1,10 @@ # Template file for 'sumo' pkgname=sumo version=1.12.0 -revision=10 +revision=11 build_style=cmake hostmakedepends="libgdal-tools pkg-config swig python3-setuptools" -makedepends="python3-devel ffmpeg6-devel fox-devel gl2ps-devel libgdal-devel +makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel" short_desc="SUMO (Simulation of Urban MObility) and included applications" maintainer="Warrior Graph " From 330778118f8dc0bc46b8492305fec8033035c1a1 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 054/110] telegram-desktop: revbump for ffmpeg8 --- srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch | 8 ++++++++ srcpkgs/telegram-desktop/template | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch diff --git a/srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch b/srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch new file mode 100644 index 00000000000000..5dedac67190ed3 --- /dev/null +++ b/srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch @@ -0,0 +1,8 @@ +--- a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp ++++ b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp +@@ -219,4 +219,4 @@ + } + } + +-} // namespace base::Platform ++} diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template index 2a43d73197850c..23e99751b1e99b 100644 --- a/srcpkgs/telegram-desktop/template +++ b/srcpkgs/telegram-desktop/template @@ -1,7 +1,7 @@ # Template file for 'telegram-desktop' pkgname=telegram-desktop version=6.8.2 -revision=1 +revision=2 build_style=cmake build_helper="qemu gir" configure_args="-DTDESKTOP_API_ID=209235 @@ -13,7 +13,7 @@ configure_args="-DTDESKTOP_API_ID=209235 hostmakedepends="pkg-config qt6-base python3 extra-cmake-modules qt6-declarative-host-tools wayland-devel protobuf glib-devel kf6-kcoreaddons" makedepends="alsa-lib-devel boost-devel-minimal libboost_regex - fmt-devel ffmpeg6-devel libglib-devel + fmt-devel ffmpeg-devel libglib-devel gobject-introspection libdbusmenu-glib-devel libopenal-devel minizip-devel opus-devel xxHash-devel pulseaudio-devel range-v3 qt6-svg-devel libva-devel rapidjson liblz4-devel liblzma-devel From 25e25c382d4b9f47a68882a2b9a858c2ea7dc6c7 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 055/110] tg_owt: revbump for ffmpeg8 --- srcpkgs/tg_owt/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template index 56e2675640edaf..f7fe743b06d343 100644 --- a/srcpkgs/tg_owt/template +++ b/srcpkgs/tg_owt/template @@ -1,7 +1,7 @@ # Template file for 'tg_owt' pkgname=tg_owt version=0.0.0.20260606 -revision=1 +revision=2 _commit=26068e29bfa8d74a9dc9c8f7f94172fafbc262b8 _libyuv_commit=04821d1e7d60845525e8db55c7bcd41ef5be9406 _crc32c_commit=21fc8ef30415a635e7351ffa0e5d5367943d4a94 @@ -9,7 +9,7 @@ build_style=cmake configure_args="-DBUILD_SHARED_LIBS=OFF -DTG_OWT_ARCH_ARMV7_USE_NEON=OFF" hostmakedepends="pkg-config yasm protobuf python3" makedepends="alsa-lib-devel pulseaudio-devel openssl-devel opus-devel - pipewire-devel ffmpeg6-devel libjpeg-turbo-devel protobuf-devel + pipewire-devel ffmpeg-devel libjpeg-turbo-devel protobuf-devel libevent-devel libXcomposite-devel libXrandr-devel libXdamage-devel libepoxy-devel libdrm-devel libXrender-devel libglib-devel libgbm-devel libvpx-devel openh264-devel abseil-cpp-devel libsrtp-devel" From 1eeb79375f2190b70d01ae9d1091bca21c8d14b6 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 056/110] tigervnc: revbump for ffmpeg8 --- srcpkgs/tigervnc/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/tigervnc/template b/srcpkgs/tigervnc/template index 97429df9b6fcf0..6e7bb58c237e3c 100644 --- a/srcpkgs/tigervnc/template +++ b/srcpkgs/tigervnc/template @@ -1,7 +1,7 @@ # Template file for 'tigervnc' pkgname=tigervnc version=1.16.2 -revision=1 +revision=2 _xorg_version=21.1.16 _xorg_dist="xorg-server-${_xorg_version}.tar.gz" build_style=cmake @@ -11,7 +11,7 @@ hostmakedepends="automake gettext xorg-util-macros font-util pkg-config makedepends="fltk-devel zlib-devel libXtst-devel libjpeg-turbo-devel pixman-devel xorgproto libxkbfile-devel libXrandr-devel libXfont2-devel gnutls-devel libdrm-devel libxshmfence-devel pam-devel xkbcomp libxcvt-devel - nettle-devel ffmpeg6-devel" + nettle-devel ffmpeg-devel" depends="perl xauth xkeyboard-config" short_desc="High performance, multi-platform VNC client and server" maintainer="Orphaned " From 50e80dead12f6bde14b312666b9a7334f9f68bea Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 057/110] unpaper: revbump for ffmpeg8 --- srcpkgs/unpaper/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/unpaper/template b/srcpkgs/unpaper/template index 94450c3fdab424..ce665a2aeffeed 100644 --- a/srcpkgs/unpaper/template +++ b/srcpkgs/unpaper/template @@ -1,10 +1,10 @@ # Template file for 'unpaper' pkgname=unpaper version=7.0.0 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config libxslt python3-Sphinx" -makedepends="ffmpeg6-devel" +makedepends="ffmpeg-devel" short_desc="Post-processing tool for scanned sheets of paper" maintainer="Orphaned " license="GPL-2.0-or-later" From 26313b454687473b2e6ac444f5ede46df06d6819 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 058/110] waypipe: revbump for ffmpeg8 --- srcpkgs/waypipe/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/waypipe/template b/srcpkgs/waypipe/template index 5051d0577f9f3e..a85b30c916d2e0 100644 --- a/srcpkgs/waypipe/template +++ b/srcpkgs/waypipe/template @@ -1,13 +1,13 @@ # Template file for 'waypipe' pkgname=waypipe version=0.10.6 -revision=2 +revision=3 build_style=meson # lto is off because it causes linking errors in armv6l and armv7l (due to NEON) configure_args="-Dwerror=false -Db_lto=false -Dbuild_c=true -Dbuild_rs=false" hostmakedepends="wayland-devel scdoc pkg-config" makedepends="liblz4-devel libzstd-devel libva-devel - MesaLib-devel libdrm-devel ffmpeg6-devel" + MesaLib-devel libdrm-devel ffmpeg-devel" depends="openssh" short_desc="Proxy for Wayland clients" maintainer="Érico Nogueira " From 963284ff6d43821e5afa95666d7984d38ab0abdd Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 059/110] wf-recorder: revbump for ffmpeg8 --- srcpkgs/wf-recorder/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/wf-recorder/template b/srcpkgs/wf-recorder/template index 9ae0b1cf9e3448..c7a36e4bc012e5 100644 --- a/srcpkgs/wf-recorder/template +++ b/srcpkgs/wf-recorder/template @@ -1,11 +1,11 @@ # Template file for 'wf-recorder' pkgname=wf-recorder version=0.6.0 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config scdoc wayland-devel" makedepends="wayland-protocols wayland-devel libgbm-devel libdrm-devel - ffmpeg6-devel x264-devel pulseaudio-devel pipewire-devel" + ffmpeg-devel x264-devel pulseaudio-devel pipewire-devel" short_desc="Screen recorder for wlroots-based compositors" maintainer="Jony " license="MIT" From 86d98aae965868eb64f87500d8d07dc288e5183a Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 060/110] xine-lib: revbump for ffmpeg8 --- srcpkgs/xine-lib/patches/ffmpeg7-1.patch | 182 +++++++++ srcpkgs/xine-lib/patches/ffmpeg7-2.patch | 60 +++ srcpkgs/xine-lib/patches/ffmpeg7-3.patch | 161 ++++++++ srcpkgs/xine-lib/patches/ffmpeg7-4.patch | 447 +++++++++++++++++++++++ srcpkgs/xine-lib/patches/ffmpeg7-5.patch | 318 ++++++++++++++++ srcpkgs/xine-lib/patches/ffmpeg8-1.patch | 114 ++++++ srcpkgs/xine-lib/template | 4 +- 7 files changed, 1284 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-1.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-2.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-3.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-4.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-5.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg8-1.patch diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-1.patch b/srcpkgs/xine-lib/patches/ffmpeg7-1.patch new file mode 100644 index 00000000000000..1599d432b8a51e --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-1.patch @@ -0,0 +1,182 @@ +# HG changeset patch +# User Torsten Jager +# Date 1674929040 -3600 +# Sat Jan 28 19:04:00 2023 +0100 +# Node ID 771f4ae27e582123ff3500444718fc8f96186d74 +# Parent 250f1c09f4244c3e7ca7d414410c57bd387792c3 +ffmpeg compatibility update. + +diff -r 250f1c09f424 -r 771f4ae27e58 src/combined/ffmpeg/demux_avformat.c +--- a/src/combined/ffmpeg/demux_avformat.c Wed Jan 25 17:03:55 2023 +0100 ++++ b/src/combined/ffmpeg/demux_avformat.c Sat Jan 28 19:04:00 2023 +0100 +@@ -423,8 +423,13 @@ + } + + #ifdef XFF_CODECPAR ++# if XFF_AUDIO_CHANNEL_LAYOUT < 2 + if (st->codecpar && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && + st->codecpar->sample_rate != 0 && st->codecpar->channels != 0) ++# else ++ if (st->codecpar && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && ++ st->codecpar->sample_rate != 0 && st->codecpar->ch_layout.nb_channels != 0) ++# endif + #else + if (st->codec && st->codec->codec_type == AVMEDIA_TYPE_AUDIO && + st->codec->sample_rate != 0 && st->codec->channels != 0) +@@ -501,7 +506,11 @@ + buf->size = extradata_size + sizeof(xine_waveformatex); + buf->decoder_info[1] = ctx->sample_rate; + buf->decoder_info[2] = ctx->bits_per_coded_sample; ++#if XFF_AUDIO_CHANNEL_LAYOUT < 2 + buf->decoder_info[3] = ctx->channels; ++#else ++ buf->decoder_info[3] = ctx->ch_layout.nb_channels; ++#endif + buf->decoder_flags = BUF_FLAG_HEADER | BUF_FLAG_STDHEADER | BUF_FLAG_FRAME_END; + + this->stream->audio_fifo->put (this->stream->audio_fifo, buf); +diff -r 250f1c09f424 -r 771f4ae27e58 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Wed Jan 25 17:03:55 2023 +0100 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Sat Jan 28 19:04:00 2023 +0100 +@@ -303,7 +303,11 @@ + + this->context->bits_per_sample = this->ff_bits; + this->context->sample_rate = this->ff_sample_rate; ++#if XFF_AUDIO_CHANNEL_LAYOUT < 2 + this->context->channels = this->ff_channels; ++#else ++ this->context->ch_layout.nb_channels = this->ff_channels; ++#endif + this->context->codec_id = this->codec->id; + this->context->codec_type = this->codec->type; + this->context->codec_tag = _x_stream_info_get(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC); +@@ -527,16 +531,75 @@ + this->ao_mode = 0; + } + ++static unsigned int ff_list_channels (uint8_t *list, uint64_t map) { ++ unsigned int n, bit; ++ ++ for (n = bit = 0; map; map >>= 1, bit++) { ++ uint32_t b = map & 1; ++ ++ list[n] = bit; ++ n += b; ++ } ++ return n; ++} ++ + static void ff_map_channels (ff_audio_decoder_t *this) { + uint64_t ff_map; ++ uint8_t ff_list[64]; ++ unsigned int ff_num; ++ const char *type = "native"; + int caps = this->stream->audio_out->get_capabilities (this->stream->audio_out); + ++#if XFF_AUDIO_CHANNEL_LAYOUT < 2 ++ + /* safety kludge for very old libavcodec */ +-#ifdef AV_CH_FRONT_LEFT ++# ifdef AV_CH_FRONT_LEFT + ff_map = this->context->channel_layout; + if (!ff_map) /* wma2 bug */ ++# endif ++ ff_map = ((uint64_t)1 << this->context->channels) - 1; ++ ff_num = ff_list_channels (ff_list, ff_map); ++ ++#else /* XFF_AUDIO_CHANNEL_LAYOUT == 2 */ ++ ++ ff_num = this->context->ch_layout.nb_channels; ++ if (ff_num > (int)(sizeof (ff_list) / sizeof (ff_list[0]))) ++ ff_num = sizeof (ff_list) / sizeof (ff_list[0]); ++ switch (this->context->ch_layout.order) { ++ const AVChannelCustom *cmap; ++ unsigned int i; ++ ++ case AV_CHANNEL_ORDER_UNSPEC: ++ type = "unknown"; ++ goto _fallback; ++ ++ case AV_CHANNEL_ORDER_NATIVE: ++ ff_map = this->context->ch_layout.u.mask; ++ if (!ff_map) /* wma2 bug */ ++ ff_map = ((uint64_t)1 << ff_num) - 1; ++ ff_num = ff_list_channels (ff_list, ff_map); ++ break; ++ ++ case AV_CHANNEL_ORDER_CUSTOM: ++ type = "custom"; ++ if (!(cmap = this->context->ch_layout.u.map)) ++ goto _fallback; ++ ff_map = 0; ++ for (i = 0; i < ff_num; i++) { ++ ff_list[i] = cmap[i].id; ++ ff_map |= (uint64_t)1 << ff_list[i]; ++ } ++ break; ++ ++ default: ++ type = "unsupported"; ++ /* fall through */ ++ _fallback: ++ ff_map = ((uint64_t)1 << ff_num) - 1; ++ ff_num = ff_list_channels (ff_list, ff_map); ++ } ++ + #endif +- ff_map = ((uint64_t)1 << this->context->channels) - 1; + + if ((caps != this->ao_caps) || (ff_map != this->ff_map)) { + unsigned int i, j; +@@ -562,7 +625,7 @@ + + this->ao_caps = caps; + this->ff_map = ff_map; +- this->ff_channels = this->context->channels; ++ this->ff_channels = ff_num; + + /* silence out */ + for (i = 0; i < MAX_CHANNELS; i++) +@@ -576,20 +639,23 @@ + this->left[0] = this->right[0] = 0; + tries = wishlist + 0 * num_modes; + } else if (this->ff_channels == 2) { /* stereo */ ++ /* FIXME: libxine does not yet support audio selection _after_ decoding. ++ * For now, treat the most common "dual mono" case as stereo. */ + name_map[0] = 0; + name_map[1] = 1; + this->left[0] = 0; + this->right[0] = 1; + tries = wishlist + 1 * num_modes; + } else { +- for (i = j = 0; i < sizeof (base_map) / sizeof (base_map[0]); i++) { +- if ((ff_map >> i) & 1) { +- int8_t target = base_map[i]; +- if ((target >= 0) && (this->map[target] < 0)) +- this->map[target] = j; +- name_map[j] = i; /* for debug output below */ +- j++; +- } ++ for (i = 0; i < ff_num; i++) { ++ int8_t target; ++ uint32_t num = ff_list[i]; ++ if (num >= sizeof (base_map) / sizeof (base_map[0])) ++ continue; ++ target = base_map[num]; ++ if ((target >= 0) && (this->map[target] < 0)) ++ this->map[target] = i; ++ name_map[i] = num; /* for debug output below */ + } + this->left[0] = this->map[0] < 0 ? 0 : this->map[0]; + this->map[0] = -1; +@@ -641,8 +707,8 @@ + "rear center", + "side left", "side right" + }; +- int8_t buf[200]; +- int p = sprintf (buf, "ff_audio_dec: channel layout: "); ++ int8_t buf[256]; ++ int p = sprintf (buf, "ff_audio_dec: %s channel layout: ", type); + int8_t *indx = this->left; + for (i = 0; i < 2; i++) { + buf[p++] = '['; diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-2.patch b/srcpkgs/xine-lib/patches/ffmpeg7-2.patch new file mode 100644 index 00000000000000..63bd2f80091929 --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-2.patch @@ -0,0 +1,60 @@ +# HG changeset patch +# User Torsten Jager +# Date 1675683900 -3600 +# Mon Feb 06 12:45:00 2023 +0100 +# Node ID 0a786d63bbdb2d780a9231f6772e84e743c72014 +# Parent b0a36ed8ec8f3f2de545502b93ec846561168b64 +Try to silence some cast align warnings 4. + +diff -r b0a36ed8ec8f -r 0a786d63bbdb src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Mon Feb 06 12:44:55 2023 +0100 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Mon Feb 06 12:45:00 2023 +0100 +@@ -1398,7 +1398,7 @@ + #if defined(AV_PIX_FMT_YUV420P9) || defined(AV_PIX_FMT_YUV420P10) + static void ff_get_deep_color (uint8_t *src, int sstride, uint8_t *dest, int dstride, + int width, int height, uint8_t *tab) { +- uint16_t *p = (uint16_t *) src; ++ uint16_t *p = (uint16_t *)ASSUME_ALIGNED_2 (src, 2); + uint8_t *q = dest; + int spad = sstride / 2 - width; + int dpad = dstride - width; +@@ -1804,22 +1804,24 @@ + #ifdef XFF_AVCODEC_SUB_ID + this->context->sub_id = _X_BE_32(&this->buf[30]); + #endif +- this->context->extradata_size = this->size - 26; +- if (this->context->extradata_size < 8) { +- this->context->extradata_size= 8; +- this->context->extradata = calloc(1, this->context->extradata_size + +- AV_INPUT_BUFFER_PADDING_SIZE); +- ((uint32_t *)this->context->extradata)[0] = 0; +- if (codec_type == BUF_VIDEO_RV10) +- ((uint32_t *)this->context->extradata)[1] = 0x10000000; +- else +- ((uint32_t *)this->context->extradata)[1] = 0x10003001; ++ if (this->size < 8 + 26) { ++ uint32_t *b = calloc (1, 8 + AV_INPUT_BUFFER_PADDING_SIZE); ++ if (b) { ++ this->context->extradata_size = 8; ++ this->context->extradata = (uint8_t *)b; ++ b[0] = 0; ++ if (codec_type == BUF_VIDEO_RV10) ++ b[1] = 0x10000000; ++ else ++ b[1] = 0x10003001; ++ } + } else { +- this->context->extradata = malloc(this->context->extradata_size + +- AV_INPUT_BUFFER_PADDING_SIZE); +- memcpy(this->context->extradata, this->buf + 26, +- this->context->extradata_size); +- memset(this->context->extradata + this->context->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE); ++ this->context->extradata = malloc (this->size - 26 + AV_INPUT_BUFFER_PADDING_SIZE); ++ if (this->context->extradata) { ++ this->context->extradata_size = this->size - 26; ++ memcpy (this->context->extradata, this->buf + 26, this->context->extradata_size); ++ memset (this->context->extradata + this->context->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE); ++ } + } + + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-3.patch b/srcpkgs/xine-lib/patches/ffmpeg7-3.patch new file mode 100644 index 00000000000000..36b07bb7e0a0f6 --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-3.patch @@ -0,0 +1,161 @@ +# HG changeset patch +# User Torsten Jager +# Date 1675683905 -3600 +# Mon Feb 06 12:45:05 2023 +0100 +# Node ID 6f1000084f6084f49c95c202d12593e49916f58b +# Parent 0a786d63bbdb2d780a9231f6772e84e743c72014 +Try to silence some cast align warnings 5. + +diff -r 0a786d63bbdb -r 6f1000084f60 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Mon Feb 06 12:45:00 2023 +0100 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Mon Feb 06 12:45:05 2023 +0100 +@@ -796,7 +796,7 @@ + #define CLIP_16(v) ((v + 0x8000) & ~0xffff ? (v >> 31) ^ 0x7fff : v) + + static int ff_audio_decode (ff_audio_decoder_t *this) { +- int16_t *decode_buffer = (int16_t *)this->send.buf; ++ int16_t *decode_buffer = (int16_t *)ASSUME_ALIGNED_2 (this->send.buf, 2); + int consumed, got_frame = 0; + #if XFF_AUDIO >= 4 + float gain = this->class->gain; +@@ -871,13 +871,13 @@ + const stype *p1, *p2, *p3, *p4;\ + int i, sstep;\ + int8_t *x = idx;\ +- int16_t *dptr = (int16_t *)decode_buffer + dindx;\ ++ int16_t *dptr = decode_buffer + dindx;\ + if (planar) {\ +- p1 = (stype *)this->av_frame->extended_data[x[0]];\ ++ p1 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[0]], sizeof (stype));\ + if (!p1) break;\ + sstep = 1;\ + } else {\ +- p1 = (stype *)this->av_frame->extended_data[0];\ ++ p1 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype));\ + if (!p1) break;\ + p1 += x[0];\ + sstep = this->ff_channels;\ +@@ -893,10 +893,10 @@ + break;\ + }\ + if (planar) {\ +- p2 = (stype *)this->av_frame->extended_data[x[1]];\ ++ p2 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[1]], sizeof (stype));\ + if (!p2) break;\ + } else\ +- p2 = (stype *)this->av_frame->extended_data[0] + x[1];\ ++ p2 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[1];\ + if (num == 2) {\ + for (i = 0; i < samples; i++) {\ + int32_t v = MIX_FIX(*p2);\ +@@ -911,10 +911,10 @@ + break;\ + }\ + if (planar) {\ +- p3 = (stype *)this->av_frame->extended_data[x[2]];\ ++ p3 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[2]], sizeof (stype));\ + if (!p3) break;\ + } else\ +- p3 = (stype *)this->av_frame->extended_data[0] + x[2];\ ++ p3 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[2];\ + if (num == 3) {\ + for (i = 0; i < samples; i++) {\ + int32_t v = MIX_FIX(*p2);\ +@@ -931,10 +931,10 @@ + break;\ + }\ + if (planar) {\ +- p4 = (stype *)this->av_frame->extended_data[x[3]];\ ++ p4 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[3]], sizeof (stype));\ + if (!p4) break;\ + } else\ +- p4 = (stype *)this->av_frame->extended_data[0] + x[3];\ ++ p4 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[3];\ + for (i = 0; i < samples; i++) {\ + int32_t v = MIX_FIX(*p2);\ + p2 += sstep;\ +@@ -1003,13 +1003,13 @@ + int i, sstep;\ + float gain3;\ + int8_t *x = idx;\ +- int16_t *dptr = (int16_t *)decode_buffer + dindx;\ ++ int16_t *dptr = decode_buffer + dindx;\ + if (planar) {\ +- p1 = (stype *)this->av_frame->extended_data[x[0]];\ ++ p1 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[0]], sizeof (stype));\ + if (!p1) break;\ + sstep = 1;\ + } else {\ +- p1 = (stype *)this->av_frame->extended_data[0];\ ++ p1 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype));\ + if (!p1) break;\ + p1 += x[0];\ + sstep = this->ff_channels;\ +@@ -1025,10 +1025,10 @@ + }\ + gain3 = gain * 0.7071;\ + if (planar) {\ +- p2 = (stype *)this->av_frame->extended_data[x[1]];\ ++ p2 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[1]], sizeof (stype));\ + if (!p2) break;\ + } else\ +- p2 = (stype *)this->av_frame->extended_data[0] + x[1];\ ++ p2 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[1];\ + if (num == 2) {\ + for (i = 0; i < samples; i++) {\ + int32_t v = (*p1) * gain + (*p2) * gain3;\ +@@ -1040,10 +1040,10 @@ + break;\ + }\ + if (planar) {\ +- p3 = (stype *)this->av_frame->extended_data[x[2]];\ ++ p3 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[2]], sizeof (stype));\ + if (!p3) break;\ + } else\ +- p3 = (stype *)this->av_frame->extended_data[0] + x[2];\ ++ p3 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[2];\ + if (num == 3) {\ + for (i = 0; i < samples; i++) {\ + int32_t v = (*p1) * gain + (*p2 + *p3) * gain3;\ +@@ -1056,10 +1056,10 @@ + break;\ + }\ + if (planar) {\ +- p4 = (stype *)this->av_frame->extended_data[x[3]];\ ++ p4 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[3]], sizeof (stype));\ + if (!p4) break;\ + } else\ +- p4 = (stype *)this->av_frame->extended_data[0] + x[3];\ ++ p4 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[3];\ + for (i = 0; i < samples; i++) {\ + int32_t v = (*p1) * gain + (*p2 + *p3 + *p4) * gain3;\ + p1 += sstep;\ +@@ -1240,8 +1240,8 @@ + /* the above codecs output float samples, not 16-bit integers */ + int samples = this->send.len / sizeof(float); + float gain = this->class->gain; +- float *p = (float *)this->decode_buffer; +- int16_t *q = (int16_t *)this->decode_buffer; ++ float *p = (float *)ASSUME_ALIGNED_2 (this->decode_buffer, 4); ++ int16_t *q = (int16_t *)ASSUME_ALIGNED_2 (this->decode_buffer, 2); + int i; + for (i = samples; i; i--) { + int v = *p++ * gain; +@@ -1255,7 +1255,7 @@ + int samples = this->send.len / (this->ff_channels * 2); + int channels = this->ao_channels; + int ff_channels = this->ff_channels; +- int16_t *p = (int16_t *)this->decode_buffer; ++ int16_t *p = (int16_t *)ASSUME_ALIGNED_2 (this->decode_buffer, 2); + int16_t *q = p; + int shift = this->downmix_shift, i, j; + /* downmix mono output to stereo first */ +@@ -1300,7 +1300,7 @@ + } + /* final mono downmix */ + if (channels > this->ao_channels) { +- p = (int16_t *)this->decode_buffer; ++ p = (int16_t *)ASSUME_ALIGNED_2 (this->decode_buffer, 2); + q = p; + for (i = samples; i; i--) { + int v = *p++; diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-4.patch b/srcpkgs/xine-lib/patches/ffmpeg7-4.patch new file mode 100644 index 00000000000000..d3bd5a71c757d6 --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-4.patch @@ -0,0 +1,447 @@ +# HG changeset patch +# User Torsten Jager +# Date 1715025355 -7200 +# Mon May 06 21:55:55 2024 +0200 +# Node ID 1e7b184008860c8be2289c3cefd9dee57f06193a +# Parent d1954d852980ddc887a67a9f1a26626909561ff5 +ffmpeg compatibility update 1. + +diff -r d1954d852980 -r 1e7b18400886 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Mon May 06 21:55:55 2024 +0200 +@@ -67,6 +67,7 @@ + + xine_t *xine; + float gain; ++ int bitexact; + } ff_audio_class_t; + + typedef struct ff_audio_decoder_s { +@@ -188,14 +189,25 @@ + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "ffmpeg_audio_dec: found AAC ADTS syncword after %d bytes\n", i); + if (this->buftype == BUF_AUDIO_AAC_LATM) { ++ uint8_t *ed = NULL; ++ int es = 0; + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "ffmpeg_audio_dec: stream says LATM but is ADTS -> switching decoders\n"); +- if (this->decoder_ok) { +- pthread_mutex_lock (&ffmpeg_lock); +- avcodec_close (this->context); +- pthread_mutex_unlock (&ffmpeg_lock); +- this->decoder_ok = 0; ++ pthread_mutex_lock (&ffmpeg_lock); ++ if (this->context) { ++ ed = this->context->extradata; ++ es = this->context->extradata_size; ++ this->context->extradata = NULL; ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + } ++ this->decoder_ok = 0; ++ this->context = XFF_ALLOC_CONTEXT (); ++ if (this->context) { ++ this->context->extradata = ed; ++ this->context->extradata_size = es; ++ } ++ pthread_mutex_unlock (&ffmpeg_lock); + this->codec = NULL; + ff_audio_open_codec (this, BUF_AUDIO_AAC); + } +@@ -349,6 +361,11 @@ + return -1; + } + ++ if (this->class->bitexact) ++ this->context->flags |= CODEC_FLAG_BITEXACT; ++ else ++ this->context->flags &= ~CODEC_FLAG_BITEXACT; ++ + pthread_mutex_lock (&ffmpeg_lock); + if (XFF_AVCODEC_OPEN (this->context, this->codec) < 0) { + pthread_mutex_unlock (&ffmpeg_lock); +@@ -1377,9 +1394,21 @@ + } + #endif + pthread_mutex_lock (&ffmpeg_lock); +- avcodec_close (this->context); +- if (XFF_AVCODEC_OPEN (this->context, this->codec) < 0) ++ { ++ uint8_t *ed = this->context->extradata; ++ int es = this->context->extradata_size; ++ this->context->extradata = NULL; ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + this->decoder_ok = 0; ++ this->context = XFF_ALLOC_CONTEXT (); ++ if (this->context) { ++ this->context->extradata = ed; ++ this->context->extradata_size = es; ++ } ++ } ++ if (XFF_AVCODEC_OPEN (this->context, this->codec) >= 0) ++ this->decoder_ok = 1; + pthread_mutex_unlock (&ffmpeg_lock); + } + +@@ -1418,20 +1447,20 @@ + XFF_FREE_FRAME (this->av_frame); + } + #endif +- pthread_mutex_lock (&ffmpeg_lock); +- avcodec_close (this->context); +- pthread_mutex_unlock (&ffmpeg_lock); + } ++ pthread_mutex_lock (&ffmpeg_lock); ++ if (this->context) { ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); ++ } ++ pthread_mutex_unlock (&ffmpeg_lock); + + ff_audio_output_close(this); + + xine_free_aligned (this->buf); + xine_free_aligned (this->decode_buffer); + +- _x_freep (&this->context->extradata); +- this->context->extradata_size = 0; +- XFF_FREE_CONTEXT (this->context); +- + XFF_PACKET_UNREF (this->avpkt); + + xine_pts_queue_delete (&this->pts_queue); +@@ -1513,6 +1542,12 @@ + free (this); + } + ++static void ff_bitexact_cb (void *user_data, xine_cfg_entry_t *entry) { ++ ff_audio_class_t *class = (ff_audio_class_t *)user_data; ++ ++ class->bitexact = entry->num_value; ++} ++ + void *init_audio_plugin (xine_t *xine, const void *data) { + + ff_audio_class_t *this ; +@@ -1540,5 +1575,12 @@ + 10, ff_gain_cb, this) + / (float)20); + ++ this->bitexact = xine->config->register_bool (xine->config, ++ "audio.processing.ffmpeg_bitexact", 0, ++ _("Let FFmpeg use precise but slower math"), ++ _("Get slightly better sound, at the expense of speed.\n" ++ "Takes effect with next stream."), ++ 10, ff_bitexact_cb, this); ++ + return this; + } +diff -r d1954d852980 -r 1e7b18400886 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Mon May 06 21:55:55 2024 +0200 +@@ -128,6 +128,7 @@ + + int64_t pts; + int64_t last_pts; ++ int64_t tagged_pts; + int video_step; + int reported_video_step; + uint8_t pts_tag_pass; +@@ -551,7 +552,9 @@ + # ifdef XFF_FRAME_AGE + av_frame->age = 1; + # endif ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE + av_frame->reordered_opaque = context->reordered_opaque; ++#endif + + ffsf = ffsf_new (this); + if (!ffsf) +@@ -862,7 +865,9 @@ + # endif + + /* take over pts for this frame to have it reordered */ ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE + av_frame->reordered_opaque = context->reordered_opaque; ++#endif + + return 0; + } +@@ -1142,9 +1147,13 @@ + if (this->codec->id == CODEC_ID_VC1 && + (!this->bih.biWidth || !this->bih.biHeight)) { + /* VC1 codec must be re-opened with correct width and height. */ +- avcodec_close(this->context); +- +- if (XFF_AVCODEC_OPEN (this->context, this->codec) < 0) { ++ if (this->context) { ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); ++ } ++ this->context = XFF_ALLOC_CONTEXT (); ++ if (!(this->context && XFF_AVCODEC_OPEN (this->context, this->codec) >= 0)) { + pthread_mutex_unlock(&ffmpeg_lock); + xprintf (this->stream->xine, XINE_VERBOSITY_LOG, + _("ffmpeg_video_dec: couldn't open decoder (pass 2)\n")); +@@ -1211,6 +1220,11 @@ + /* dont want initial AV_NOPTS_VALUE here */ + this->context->reordered_opaque = 0; + #endif ++ ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->context->time_base.num = 1; ++ this->context->time_base.den = 90000 << 8; ++#endif + } + + #ifdef ENABLE_VAAPI +@@ -1959,7 +1973,26 @@ + return (pts * 256) | this->pts_tag_pass; + } + +-static int64_t ff_untag_pts (ff_video_decoder_t *this, int64_t pts) { ++static int64_t ff_untag_pts (ff_video_decoder_t *this, AVFrame *av_frame) { ++ int64_t pts; ++#if defined(XFF_AVCODEC_FRAME_PTS) ++ pts = (av_frame->pts != AV_NOPTS_VALUE) ? av_frame->pts : 0; ++# if defined(XFF_AVCODEC_REORDERED_OPAQUE) ++ /* paranoia !!! */ ++ if (pts != av_frame->reordered_opaque) { ++ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, ++ LOG_MODULE ": WARNING: frame pts %" PRId64 " != reordered_opaque %" PRId64 ".\n", ++ pts, av_frame->reordered_opaque); ++ pts = av_frame->reordered_opaque; ++ } ++ av_frame->reordered_opaque = 0; ++# endif ++#elif defined(XFF_AVCODEC_REORDERED_OPAQUE) ++ pts = av_frame->reordered_opaque; ++ av_frame->reordered_opaque = 0; ++#else ++ pts = this->tagged_pts; ++#endif + if ((uint8_t)(pts & 0xff) == this->pts_tag_pass) { + /* restore sign. */ + return pts >> 8; +@@ -1984,7 +2017,9 @@ + this->avpkt->data = buf; + this->avpkt->size = buf_size; + this->avpkt->flags = AV_PKT_FLAG_KEY; +- ++# ifdef XFF_AVCODEC_FRAME_PTS ++ this->avpkt->pts = this->tagged_pts; ++# endif + # if XFF_PALETTE == 2 || XFF_PALETTE == 3 + if (buf && this->palette_changed) { + uint8_t *sd = av_packet_new_side_data (this->avpkt, AV_PKT_DATA_PALETTE, 256 * 4); +@@ -2094,9 +2129,14 @@ + #endif + + /* apply valid pts to first frame _starting_ thereafter only */ +- if (this->pts && !this->context->reordered_opaque) { +- this->context->reordered_opaque = +- this->av_frame->reordered_opaque = ff_tag_pts (this, this->pts); ++ if (this->pts && !this->tagged_pts) { ++ this->tagged_pts = ff_tag_pts (this, this->pts); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->context->reordered_opaque = this->av_frame->reordered_opaque = this->tagged_pts; ++#endif ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->av_frame->pts = this->tagged_pts; ++#endif + this->pts = 0; + } + +@@ -2207,9 +2247,11 @@ + img->top_field_first = this->av_frame->top_field_first; + + /* get back reordered pts */ +- img->pts = ff_untag_pts (this, this->av_frame->reordered_opaque); +- this->av_frame->reordered_opaque = 0; ++ img->pts = ff_untag_pts (this, this->av_frame); ++ this->tagged_pts = 0; ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE + this->context->reordered_opaque = 0; ++#endif + + if (this->av_frame->repeat_pict) + img->duration = this->video_step * 3 / 2; +@@ -2330,9 +2372,14 @@ + } + + if (this->size == 0) { ++ this->tagged_pts = ff_tag_pts (this, this->pts); + /* take over pts when we are about to buffer a frame */ +- this->av_frame->reordered_opaque = ff_tag_pts(this, this->pts); +- this->context->reordered_opaque = ff_tag_pts(this, this->pts); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->av_frame->reordered_opaque = this->context->reordered_opaque = this->tagged_pts; ++#endif ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->av_frame->pts = this->tagged_pts; ++#endif + this->pts = 0; + } + +@@ -2405,7 +2452,10 @@ + need_unref = 1; + #endif + /* reset consumed pts value */ +- this->context->reordered_opaque = ff_tag_pts(this, 0); ++ this->tagged_pts = ff_tag_pts (this, 0); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->context->reordered_opaque = this->tagged_pts; ++#endif + + if (err) { + +@@ -2439,10 +2489,14 @@ + ff_check_bufsize(this, this->size); + memmove (this->buf, &chunk_buf[offset], this->size); + chunk_buf = this->buf; +- + /* take over pts for next access unit */ +- this->av_frame->reordered_opaque = ff_tag_pts(this, this->pts); +- this->context->reordered_opaque = ff_tag_pts(this, this->pts); ++ this->tagged_pts = ff_tag_pts (this, this->pts); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->av_frame->reordered_opaque = this->context->reordered_opaque = this->tagged_pts; ++#endif ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->av_frame->pts = this->tagged_pts; ++#endif + this->pts = 0; + } + } +@@ -2559,8 +2613,7 @@ + ff_convert_frame(this, img, this->av_frame); + } + +- img->pts = ff_untag_pts(this, this->av_frame->reordered_opaque); +- this->av_frame->reordered_opaque = 0; ++ img->pts = ff_untag_pts(this, this->av_frame); + + /* workaround for weird 120fps streams */ + if( video_step_to_use == 750 ) { +@@ -2600,8 +2653,7 @@ + this->output_format, + VO_BOTH_FIELDS|this->frame_flags); + /* set PTS to allow early syncing */ +- img->pts = ff_untag_pts(this, this->av_frame->reordered_opaque); +- this->av_frame->reordered_opaque = 0; ++ img->pts = ff_untag_pts(this, this->av_frame); + + img->duration = video_step_to_use; + +@@ -2783,7 +2835,7 @@ + ff_convert_frame (this, img, this->av_frame2); + } + +- img->pts = ff_untag_pts (this, this->av_frame2->reordered_opaque); ++ img->pts = ff_untag_pts (this, this->av_frame2); + + if (video_step_to_use == 750) + video_step_to_use = 0; +@@ -2903,7 +2955,9 @@ + if (this->decoder_ok) { + + pthread_mutex_lock(&ffmpeg_lock); +- avcodec_close (this->context); ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + pthread_mutex_unlock(&ffmpeg_lock); + + #ifdef ENABLE_DIRECT_RENDERING +@@ -2912,16 +2966,15 @@ + + this->stream->video_out->close(this->stream->video_out, this->stream); + this->decoder_ok = 0; ++ } else if (this->context) { ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + } + + if (this->slice_offset_table) + free (this->slice_offset_table); + +- if (this->context) { +- _x_freep (&this->context->extradata); +- this->context->extradata_size = 0; +- XFF_FREE_CONTEXT (this->context); +- } + + #if XFF_VIDEO > 1 + XFF_PACKET_UNREF (this->avpkt); +diff -r d1954d852980 -r 1e7b18400886 src/combined/ffmpeg/ffmpeg_compat.h +--- a/src/combined/ffmpeg/ffmpeg_compat.h Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/combined/ffmpeg/ffmpeg_compat.h Mon May 06 21:55:55 2024 +0200 +@@ -54,9 +54,16 @@ + #endif + + /* reordered_opaque appeared in libavcodec 51.68.0 */ +-#define XFF_AVCODEC_REORDERED_OPAQUE +-#if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(51,68,0) +-# undef XFF_AVCODEC_REORDERED_OPAQUE ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(51,68,0) && LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(60,0,0) ++# define XFF_AVCODEC_REORDERED_OPAQUE ++#else ++# undef XFF_AVCODEC_REORDERED_OPAQUE ++#endif ++ ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(58,33,100) ++# define XFF_AVCODEC_FRAME_PTS ++#else ++# undef XFF_AVCODEC_FRAME_PTS + #endif + + /* colorspace and color_range were added before 52.29.0 */ +@@ -210,9 +217,11 @@ + #endif + + #if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(55,63,100) +-# define XFF_FREE_CONTEXT(pp) do {av_free(pp); pp = NULL;} while (0) ++# define XFF_FREE_CONTEXT(pp) do {if (pp) avcodec_close (pp); av_free (pp); pp = NULL;} while (0) ++#elif LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(58,33,100) ++# define XFF_FREE_CONTEXT(pp) do {if (pp) avcodec_close (pp); avcodec_free_context (&(pp));} while (0) + #else +-# define XFF_FREE_CONTEXT(pp) avcodec_free_context(&(pp)) ++# define XFF_FREE_CONTEXT(pp) avcodec_free_context (&(pp)) + #endif + + #if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(54,59,100) +@@ -303,4 +312,3 @@ + #endif /* defined(LIBAVCODEC_VERSION_INT) */ + + #endif /* XINE_AVCODEC_COMPAT_H */ +- +diff -r d1954d852980 -r 1e7b18400886 src/dxr3/ffmpeg_encoder.c +--- a/src/dxr3/ffmpeg_encoder.c Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/dxr3/ffmpeg_encoder.c Mon May 06 21:55:55 2024 +0200 +@@ -127,10 +127,8 @@ + unsigned char use_quantizer; + + if (this->context) { +- avcodec_close(this->context); +- free(this->context); ++ XFF_FREE_CONTEXT (this->context); + free(this->picture); +- this->context = NULL; + this->picture = NULL; + } + +@@ -344,10 +342,8 @@ + #if XFF_ENCVIDEO > 1 + XFF_PACKET_UNREF (this->pkt); + #endif +- avcodec_close(this->context); + XFF_FREE_CONTEXT (this->context); + free(this->picture); +- this->context = NULL; + this->picture = NULL; + } + return 1; diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-5.patch b/srcpkgs/xine-lib/patches/ffmpeg7-5.patch new file mode 100644 index 00000000000000..136750404be2db --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-5.patch @@ -0,0 +1,318 @@ +# HG changeset patch +# User Torsten Jager +# Date 1715160885 -7200 +# Wed May 08 11:34:45 2024 +0200 +# Node ID 73b833e7fe356cd2d9490dda4ebc9bfe16fce958 +# Parent 1e7b184008860c8be2289c3cefd9dee57f06193a +ffmpeg compatibility update 2. + +diff -r 1e7b18400886 -r 73b833e7fe35 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Mon May 06 21:55:55 2024 +0200 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Wed May 08 11:34:45 2024 +0200 +@@ -1393,6 +1393,9 @@ + XFF_FREE_FRAME (this->av_frame); + } + #endif ++#if 1 ++ avcodec_flush_buffers (this->context); ++#else + pthread_mutex_lock (&ffmpeg_lock); + { + uint8_t *ed = this->context->extradata; +@@ -1410,6 +1413,7 @@ + if (XFF_AVCODEC_OPEN (this->context, this->codec) >= 0) + this->decoder_ok = 1; + pthread_mutex_unlock (&ffmpeg_lock); ++#endif + } + + ff_audio_reset_parser(this); +diff -r 1e7b18400886 -r 73b833e7fe35 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Mon May 06 21:55:55 2024 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Wed May 08 11:34:45 2024 +0200 +@@ -89,6 +89,11 @@ + # define ENABLE_EMMS + #endif + ++/* ++#undef XFF_AVCODEC_SLICE_TABLE ++#define XFF_AVCODEC_SLICE_TABLE 1 ++*/ ++ + #define VIDEOBUFSIZE (128*1024) + #define SLICE_BUFFER_SIZE (1194*1024) + +@@ -148,11 +153,11 @@ + int bufsize; + int size; + int skipframes; +- ++#if XFF_AVCODEC_SLICE_TABLE == 1 + int *slice_offset_table; + int slice_offset_size; + int slice_offset_pos; +- ++#endif + AVFrame *av_frame; + AVFrame *av_frame2; + AVCodecContext *context; +@@ -238,6 +243,13 @@ + #if XFF_VIDEO > 1 + XFF_PACKET_DECL (avpkt); + #endif ++ ++#if XFF_AVCODEC_SLICE_TABLE == 2 ++ uint8_t *temp_buf; ++ uint32_t temp_size; ++ int slice_num; ++ uint8_t slice_table[1 + 256 * 8]; ++#endif + }; + + /* import color matrix names */ +@@ -1783,10 +1795,9 @@ + this->size += buf->size; + + if (buf->decoder_flags & BUF_FLAG_FRAME_END) { +- int codec_type; ++ uint32_t codec_type = buf->type & 0xFFFF0000; + + lprintf ("header complete\n"); +- codec_type = buf->type & 0xFFFF0000; + + if (buf->decoder_flags & BUF_FLAG_STDHEADER) { + +@@ -1912,33 +1923,44 @@ + #endif + } + else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) { +- /* o dear. Multiple decoding threads use individual contexts. +- av_decode_video2 () does only copy the _pointer_ to the offsets, +- not the offsets themselves. So we must not overwrite anything +- that another thread has not yet read. */ +- int i, l, total; +- +- lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n"); +- l = buf->decoder_info[2] + 1; +- +- total = l * this->class->thread_count; +- if (total < SLICE_OFFSET_SIZE) +- total = SLICE_OFFSET_SIZE; +- if (total > this->slice_offset_size) { +- this->slice_offset_table = realloc (this->slice_offset_table, total * sizeof (int)); +- this->slice_offset_size = total; +- } +- +- if (this->slice_offset_pos + l > this->slice_offset_size) +- this->slice_offset_pos = 0; +- this->context->slice_offset = this->slice_offset_table + this->slice_offset_pos; +- this->context->slice_count = l; +- +- lprintf ("slice_count=%d\n", l); +- for (i = 0; i < l; i++) { +- this->slice_offset_table[this->slice_offset_pos++] = +- ((uint32_t *)buf->decoder_info_ptr[2])[(2 * i) + 1]; +- lprintf("slice_offset[%d]=%d\n", i, this->context->slice_offset[i]); ++ { ++#if XFF_AVCODEC_SLICE_TABLE == 1 ++ /* o dear. Multiple decoding threads use individual contexts. ++ * av_decode_video2 () does only copy the _pointer_ to the offsets, ++ * not the offsets themselves. So we must not overwrite anything ++ * that another thread has not yet read. */ ++ int i, l, total; ++ ++ lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n"); ++ l = buf->decoder_info[2] + 1; ++ ++ total = l * this->class->thread_count; ++ if (total < SLICE_OFFSET_SIZE) ++ total = SLICE_OFFSET_SIZE; ++ if (total > this->slice_offset_size) { ++ this->slice_offset_table = realloc (this->slice_offset_table, total * sizeof (int)); ++ this->slice_offset_size = total; ++ } ++ ++ if (this->slice_offset_pos + l > this->slice_offset_size) ++ this->slice_offset_pos = 0; ++ this->context->slice_offset = this->slice_offset_table + this->slice_offset_pos; ++ this->context->slice_count = l; ++ ++ lprintf ("slice_count=%d\n", l); ++ for (i = 0; i < l; i++) { ++ this->slice_offset_table[this->slice_offset_pos++] = ++ ((uint32_t *)buf->decoder_info_ptr[2])[(2 * i) + 1]; ++ lprintf("slice_offset[%d]=%d\n", i, this->context->slice_offset[i]); ++ } ++#elif XFF_AVCODEC_SLICE_TABLE == 2 ++ /* (count-1):1, 1:4, (offs[0]):4, 1:4, (offs[1]:4, ... just in front of the frame bitstream. ++ * reverse engineered from ffmpeg/libavcodec/rv34.c. they seem to expect no ++ * external use of rv decoders, and did not document this. */ ++ this->slice_table[0] = buf->decoder_info[2]; ++ this->slice_num = this->slice_table[0] + 1; ++ memcpy (this->slice_table + 1, buf->decoder_info_ptr[2], 8 * this->slice_num); ++#endif + } + } + } +@@ -2004,6 +2026,7 @@ + + static int decode_video_wrapper (ff_video_decoder_t *this, + AVFrame *av_frame, int *err, void *buf, size_t buf_size) { ++ uint32_t tsize = 0; + int len; + + #if ENABLE_VAAPI +@@ -2013,9 +2036,32 @@ + } + #endif /* ENABLE_VAAPI */ + ++#if XFF_AVCODEC_SLICE_TABLE == 2 ++ if ((this->slice_num > 0) && buf) { ++ uint32_t nsize; ++ tsize = 1 + this->slice_num * 8; ++ nsize = tsize + buf_size + AV_INPUT_BUFFER_PADDING_SIZE; ++ if (this->temp_size < nsize) { ++ nsize = nsize * 3 / 2; ++ free (this->temp_buf); ++ this->temp_buf = malloc (nsize); ++ if (!this->temp_buf) ++ nsize = 0; ++ this->temp_size = nsize; ++ nsize = tsize + buf_size + AV_INPUT_BUFFER_PADDING_SIZE; ++ } ++ if (this->temp_size >= nsize) { ++ memcpy (this->temp_buf, this->slice_table, tsize); ++ memcpy (this->temp_buf + tsize, buf, buf_size + AV_INPUT_BUFFER_PADDING_SIZE); ++ buf = this->temp_buf; ++ } ++ this->slice_num = 0; ++ } ++#endif ++ + #if XFF_VIDEO > 1 + this->avpkt->data = buf; +- this->avpkt->size = buf_size; ++ this->avpkt->size = buf_size + tsize; + this->avpkt->flags = AV_PKT_FLAG_KEY; + # ifdef XFF_AVCODEC_FRAME_PTS + this->avpkt->pts = this->tagged_pts; +@@ -2486,7 +2532,6 @@ + this->size -= len; + + if (this->size > 0) { +- ff_check_bufsize(this, this->size); + memmove (this->buf, &chunk_buf[offset], this->size); + chunk_buf = this->buf; + /* take over pts for next access unit */ +@@ -2615,8 +2660,8 @@ + + img->pts = ff_untag_pts(this, this->av_frame); + +- /* workaround for weird 120fps streams */ +- if( video_step_to_use == 750 ) { ++ /* workaround for weird 120fps streams, as well as some rv20 with frame duration 3pts. */ ++ if (video_step_to_use <= 750) { + /* fallback to the VIDEO_PTS_MODE */ + video_step_to_use = 0; + } +@@ -2837,7 +2882,7 @@ + + img->pts = ff_untag_pts (this, this->av_frame2); + +- if (video_step_to_use == 750) ++ if (video_step_to_use <= 750) + video_step_to_use = 0; + img->duration = this->av_frame2->repeat_pict ? video_step_to_use * 3 / 2 : video_step_to_use; + img->progressive_frame = !this->av_frame2->interlaced_frame; +@@ -2941,6 +2986,9 @@ + mpeg_parser_reset(this->mpeg_parser); + + /* this->pts_tag_pass = 0; */ ++#if XFF_AVCODEC_SLICE_TABLE == 2 ++ this->slice_num = 0; ++#endif + } + + static void ff_dispose (video_decoder_t *this_gen) { +@@ -2953,12 +3001,15 @@ + rgb2yuy2_free (this->rgb2yuy2); + + if (this->decoder_ok) { ++ uint8_t *ed; + + pthread_mutex_lock(&ffmpeg_lock); +- _x_freep (&this->context->extradata); ++ ed = this->context->extradata; ++ this->context->extradata = NULL; + this->context->extradata_size = 0; + XFF_FREE_CONTEXT (this->context); + pthread_mutex_unlock(&ffmpeg_lock); ++ _x_freep (&ed); + + #ifdef ENABLE_DIRECT_RENDERING + ff_free_dr1_frames (this, 1); +@@ -2972,9 +3023,11 @@ + XFF_FREE_CONTEXT (this->context); + } + +- if (this->slice_offset_table) +- free (this->slice_offset_table); +- ++#if XFF_AVCODEC_SLICE_TABLE == 1 ++ free (this->slice_offset_table); ++#elif XFF_AVCODEC_SLICE_TABLE == 2 ++ free (this->temp_buf); ++#endif + + #if XFF_VIDEO > 1 + XFF_PACKET_UNREF (this->avpkt); +@@ -3062,21 +3115,25 @@ + this->decoder_ok = 0; + this->aspect_ratio = 0; + this->pts_tag_pass = 0; +-#ifdef HAVE_POSTPROC ++# ifdef HAVE_POSTPROC + this->pp_quality = 0; + this->our_context = NULL; + this->our_mode = NULL; +-#endif ++# endif + this->mpeg_parser = NULL; + this->set_stream_info = 0; + this->rgb2yuy2 = NULL; +-#ifdef ENABLE_VAAPI ++# ifdef ENABLE_VAAPI + this->accel = NULL; + this->accel_img = NULL; +-#endif +-#if XFF_VIDEO == 3 ++# endif ++# if XFF_VIDEO == 3 + this->flush_packet_sent = 0; +-#endif ++# endif ++# if XFF_AVCODEC_SLICE_TABLE == 2 ++ this->temp_size = 0; ++ this->temp_buf = NULL; ++# endif + #endif + + this->video_decoder.decode_data = ff_decode_data; +diff -r 1e7b18400886 -r 73b833e7fe35 src/combined/ffmpeg/ffmpeg_compat.h +--- a/src/combined/ffmpeg/ffmpeg_compat.h Mon May 06 21:55:55 2024 +0200 ++++ b/src/combined/ffmpeg/ffmpeg_compat.h Wed May 08 11:34:45 2024 +0200 +@@ -139,6 +139,14 @@ + # define XFF_PALETTE 3 + #endif + ++#if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(59,42,100) ++/* AVCodecContext.slice_{offset,count} */ ++# define XFF_AVCODEC_SLICE_TABLE 1 ++#else ++/* inline offset table before the frame. */ ++# define XFF_AVCODEC_SLICE_TABLE 2 ++#endif ++ + #if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(59,0,100) /** << revise this */ + # define XFF_VAAPI 1 /** << libavcodec/vaapi.h */ + #else diff --git a/srcpkgs/xine-lib/patches/ffmpeg8-1.patch b/srcpkgs/xine-lib/patches/ffmpeg8-1.patch new file mode 100644 index 00000000000000..1e4f9156c59dc4 --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg8-1.patch @@ -0,0 +1,114 @@ +Submitted By: Joe Locash +Date: 2025-11-18 +Initial Package Version: 1.2.13 +Upstream Status: Applied +Origin: Upstream commits 9bb397 and a8fffd +Description: Fixes building xine-lib against ffmpeg-8. + + +diff -Nuarp xine-lib-1.2.13.orig/src/combined/ffmpeg/ffmpeg_compat.h xine-lib-1.2.13/src/combined/ffmpeg/ffmpeg_compat.h +--- xine-lib-1.2.13.orig/src/combined/ffmpeg/ffmpeg_compat.h 2025-11-18 13:24:12.824655934 -0500 ++++ xine-lib-1.2.13/src/combined/ffmpeg/ffmpeg_compat.h 2025-11-18 12:59:41.956696804 -0500 +@@ -319,4 +319,20 @@ + # error avcodec.h must be included first ! + #endif /* defined(LIBAVCODEC_VERSION_INT) */ + ++#if LIBAVUTIL_VERSION_INT >= XFF_INT_VERSION(58,7,0) ++# define XFF_FRAME_IS_INTERLACED(_frame) ((_frame)->flags & AV_FRAME_FLAG_INTERLACED) ++# define XFF_FRAME_IS_TOP_FIELD_FIRST(_frame) ((_frame)->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ++# define XFF_FRAME_IS_KEY(_frame) ((_frame)->flags & AV_FRAME_FLAG_KEY) ++#else ++# define XFF_FRAME_IS_INTERLACED(_frame) ((_frame)->interlaced_frame) ++# define XFF_FRAME_IS_TOP_FIELD_FIRST(_frame) ((_frame)->top_field_first) ++# define XFF_FRAME_IS_KEY(_frame) ((_frame)->key_frame) ++#endif ++ ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(60,0,0) ++# define XFF_FRAME_RATE 2 /* AV_CODEC_PROP_FIELDS */ ++#else ++# define XFF_FRAME_RATE 1 /* AVCodecContext.ticks_per_frame */ ++#endif ++ + #endif /* XINE_AVCODEC_COMPAT_H */ +diff -Nuarp xine-lib-1.2.13.orig/src/combined/ffmpeg/ff_video_decoder.c xine-lib-1.2.13/src/combined/ffmpeg/ff_video_decoder.c +--- xine-lib-1.2.13.orig/src/combined/ffmpeg/ff_video_decoder.c 2025-11-18 13:24:12.825127146 -0500 ++++ xine-lib-1.2.13/src/combined/ffmpeg/ff_video_decoder.c 2025-11-18 13:07:52.717841093 -0500 +@@ -60,6 +60,10 @@ + + #include "ffmpeg_compat.h" + ++#if XFF_FRAME_RATE == 2 ++# include ++#endif ++ + #if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(59,0,100) + # undef HAVE_POSTPROC + #endif +@@ -2289,8 +2293,8 @@ static void ff_handle_mpeg12_buffer (ff_ + } + + /* transfer some more frame settings for deinterlacing */ +- img->progressive_frame = !this->av_frame->interlaced_frame; +- img->top_field_first = this->av_frame->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame); + + /* get back reordered pts */ + img->pts = ff_untag_pts (this, this->av_frame); +@@ -2370,20 +2374,29 @@ static void ff_postprocess (ff_video_dec + + static int ff_video_step_get (ff_video_decoder_t *this) { + /* use externally provided video_step or fall back to stream's time_base otherwise */ +- int step = this->video_step; ++ int step = this->video_step, num_fields; + if (step || !this->context->time_base.den) + return step; + ++#if XFF_FRAME_RATE == 1 ++ num_fields = this->context->ticks_per_frame; ++#else /* XFF_FRAME_RATE == 2 */ ++ { ++ const AVCodecDescriptor *desc = avcodec_descriptor_get (this->context->codec_id); ++ if (desc) ++ num_fields = (desc->props & AV_CODEC_PROP_FIELDS) ? 2 : 1; ++ else ++ num_fields = 2; ++ } ++#endif + /* good: 2 * 1001 / 48000. */ +- step = (int64_t)90000 * this->context->ticks_per_frame +- * this->context->time_base.num / this->context->time_base.den; ++ step = (int64_t)90000 * num_fields * this->context->time_base.num / this->context->time_base.den; + if (step >= 90) + return step; + + /* bad: 2 * 1 / 60000. seen this once from broken h.264 video usability info (VUI). + * VAAPI seems to apply a similar HACK.*/ +- step = (int64_t)90000000 * this->context->ticks_per_frame +- * this->context->time_base.num / this->context->time_base.den; ++ step = (int64_t)90000000 * num_fields * this->context->time_base.num / this->context->time_base.den; + return step; + } + +@@ -2675,8 +2688,8 @@ static void ff_handle_buffer (ff_video_d + img->duration = video_step_to_use; + + /* transfer some more frame settings for deinterlacing */ +- img->progressive_frame = !this->av_frame->interlaced_frame; +- img->top_field_first = this->av_frame->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame); + + this->skipframes = img->draw(img, this->stream); + this->state = STATE_FRAME_SENT; +@@ -2885,8 +2898,8 @@ static void ff_flush_internal (ff_video_ + if (video_step_to_use <= 750) + video_step_to_use = 0; + img->duration = this->av_frame2->repeat_pict ? video_step_to_use * 3 / 2 : video_step_to_use; +- img->progressive_frame = !this->av_frame2->interlaced_frame; +- img->top_field_first = this->av_frame2->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame2); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame2); + + this->skipframes = img->draw (img, this->stream); + if (free_img) diff --git a/srcpkgs/xine-lib/template b/srcpkgs/xine-lib/template index e0fabcab9a4faf..0d0abb69d026ce 100644 --- a/srcpkgs/xine-lib/template +++ b/srcpkgs/xine-lib/template @@ -1,14 +1,14 @@ # Template file for 'xine-lib' pkgname=xine-lib version=1.2.13 -revision=2 +revision=3 build_style=gnu-configure configure_args="--disable-vcd --disable-gnomevfs --without-esound --disable-dxr3 --disable-oss" hostmakedepends="automake gettext-devel libtool pkg-config perl" makedepends=" zlib-devel alsa-lib-devel libxcb-devel libSM-devel libXext-devel libXv-devel - libXvMC-devel liba52-devel libmad-devel ffmpeg6-devel pulseaudio-devel + libXvMC-devel liba52-devel libmad-devel ffmpeg-devel pulseaudio-devel jack-devel samba-devel libflac-devel libmodplug-devel libmpcdec-devel speex-devel libtheora-devel libvorbis-devel libdca-devel faad2-devel libcdio-devel libbluray-devel aalib-devel libcaca-devel libXinerama-devel From 0c5feafdef16deecfda27535e7295cf354e47a42 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 061/110] xpra: revbump for ffmpeg8 --- srcpkgs/xpra/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/xpra/template b/srcpkgs/xpra/template index efed2d24d1b6a1..002869f195ad09 100644 --- a/srcpkgs/xpra/template +++ b/srcpkgs/xpra/template @@ -1,14 +1,14 @@ # Template file for 'xpra' pkgname=xpra version=6.4.4 -revision=1 +revision=2 build_style=python3-module make_build_args="--without-cuda_kernels --without-cuda_rebuild $(vopt_if docs "--with-docs")" make_install_args="${make_build_args}" hostmakedepends="pkg-config python3-setuptools python3-Cython $(vopt_if docs pandoc)" -makedepends="ffmpeg6-devel libXcomposite-devel libXrandr-devel libXtst-devel +makedepends="ffmpeg-devel libXcomposite-devel libXrandr-devel libXtst-devel libvpx-devel libwebp-devel libxkbfile-devel python3-gobject-devel x264-devel gtk+3-devel pam-devel libXres-devel liblz4-devel libavif-devel procps-ng-devel xxHash-devel" From 83555186ddcc5bc0b1e13a4376e7765d3bf22f3a Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 062/110] ffmpegthumbnailer: update to 2.2.4 --- srcpkgs/ffmpegthumbnailer/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/ffmpegthumbnailer/template b/srcpkgs/ffmpegthumbnailer/template index 05698290ff3e6e..b3f8f2f47bf035 100644 --- a/srcpkgs/ffmpegthumbnailer/template +++ b/srcpkgs/ffmpegthumbnailer/template @@ -1,17 +1,17 @@ # Template file for 'ffmpegthumbnailer' pkgname=ffmpegthumbnailer -version=2.2.3 +version=2.2.4 revision=1 build_style=cmake hostmakedepends="pkg-config" -makedepends="libpng-devel libjpeg-turbo-devel ffmpeg6-devel" +makedepends="libpng-devel libjpeg-turbo-devel ffmpeg-devel" depends="ffmpeg" short_desc="Lightweight video thumbnailer" maintainer="Orphaned " license="GPL-2.0-or-later" homepage="https://github.com/dirkvdb" -distfiles="${homepage}/${pkgname}/archive/refs/tags/${version}.tar.gz" -checksum=8c9b9057c6cc8bce9d11701af224c8139c940f734c439a595525e073b09d19b8 +distfiles="${homepage}/${pkgname}/archive/refs/tags/v${version}.tar.gz" +checksum=2d5a667ab13e0312127e188388d61afc54735f6cb9da146b09eb65c6fdad7d45 post_install() { vinstall dist/ffmpegthumbnailer.thumbnailer 644 usr/share/thumbnailers From 013e505fb95370623e9a8b320c7c7580f643494b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 063/110] chromaprint: update to 1.6.0 --- srcpkgs/chromaprint/patches/ffmpeg5.patch | 569 ---------------------- srcpkgs/chromaprint/template | 11 +- 2 files changed, 6 insertions(+), 574 deletions(-) delete mode 100644 srcpkgs/chromaprint/patches/ffmpeg5.patch diff --git a/srcpkgs/chromaprint/patches/ffmpeg5.patch b/srcpkgs/chromaprint/patches/ffmpeg5.patch deleted file mode 100644 index a9fd307a23c8a4..00000000000000 --- a/srcpkgs/chromaprint/patches/ffmpeg5.patch +++ /dev/null @@ -1,569 +0,0 @@ -From 8ccad6937177b1b92e40ab8f4447ea27bac009a7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= -Date: Fri, 4 Nov 2022 21:47:38 +0100 -Subject: [PATCH] Use FFmpeg 5.x (#120) - -* Use FFmpeg 5.1.2 for CI builds - -* Build on Ubuntu 20.04 - -* Upgrade code to FFmpeg 5.x APIs - -* Only set FFmpeg include dirs if building tools - -* No longer needed - -* Use ubuntu 20.04 ---- - .github/workflows/build.yml | 6 +- - CMakeLists.txt | 16 -- - package/build.sh | 4 +- - src/audio/ffmpeg_audio_processor.h | 2 - - src/audio/ffmpeg_audio_processor_avresample.h | 72 ------- - src/audio/ffmpeg_audio_processor_swresample.h | 18 +- - src/audio/ffmpeg_audio_reader.h | 197 +++++++++--------- - tests/CMakeLists.txt | 6 + - 8 files changed, 122 insertions(+), 199 deletions(-) - delete mode 100644 src/audio/ffmpeg_audio_processor_avresample.h - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f8d6a32..4da2405 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -84,9 +84,6 @@ find_package(FFmpeg) - if(FFMPEG_LIBRARIES) - cmake_push_check_state(RESET) - set(CMAKE_REQUIRED_LIBRARIES ${FFMPEG_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} -lm) -- check_function_exists(av_packet_unref HAVE_AV_PACKET_UNREF) -- check_function_exists(av_frame_alloc HAVE_AV_FRAME_ALLOC) -- check_function_exists(av_frame_free HAVE_AV_FRAME_FREE) - cmake_pop_check_state() - endif() - -@@ -163,14 +160,11 @@ message(STATUS "Using ${FFT_LIB} for FFT calculations") - if(NOT AUDIO_PROCESSOR_LIB) - if(FFMPEG_LIBSWRESAMPLE_FOUND) - set(AUDIO_PROCESSOR_LIB "swresample") -- elseif(FFMPEG_LIBAVRESAMPLE_FOUND) -- set(AUDIO_PROCESSOR_LIB "avresample") - endif() - endif() - - if(AUDIO_PROCESSOR_LIB STREQUAL "swresample") - if(FFMPEG_LIBSWRESAMPLE_FOUND) -- set(USE_AVRESAMPLE OFF) - set(USE_SWRESAMPLE ON) - set(AUDIO_PROCESSOR_LIBRARIES ${FFMPEG_LIBSWRESAMPLE_LIBRARIES}) - set(AUDIO_PROCESSOR_INCLUDE_DIRS ${FFMPEG_LIBSWRESAMPLE_INCLUDE_DIRS}) -@@ -178,16 +172,6 @@ if(AUDIO_PROCESSOR_LIB STREQUAL "swresample") - message(FATAL_ERROR "Selected ${AUDIO_PROCESSOR_LIB} for audio processing, but the library is not found") - endif() - message(STATUS "Using ${AUDIO_PROCESSOR_LIB} for audio conversion") --elseif(AUDIO_PROCESSOR_LIB STREQUAL "avresample") -- if(FFMPEG_LIBAVRESAMPLE_FOUND) -- set(USE_AVRESAMPLE ON) -- set(USE_SWRESAMPLE OFF) -- set(AUDIO_PROCESSOR_LIBRARIES ${FFMPEG_LIBAVRESAMPLE_LIBRARIES}) -- set(AUDIO_PROCESSOR_INCLUDE_DIRS ${FFMPEG_LIBAVRESAMPLE_INCLUDE_DIRS}) -- else() -- message(FATAL_ERROR "Selected ${AUDIO_PROCESSOR_LIB} for audio processing, but the library is not found") -- endif() -- message(STATUS "Using ${AUDIO_PROCESSOR_LIB} for audio conversion") - else() - message(STATUS "Building without audio conversion support, please install FFmpeg with libswresample") - endif() -diff --git a/package/build.sh b/package/build.sh -index da631ae..b41d36e 100755 ---- a/package/build.sh -+++ b/package/build.sh -@@ -7,8 +7,8 @@ set -eux - - BASE_DIR=$(cd $(dirname $0)/.. && pwd) - --FFMPEG_VERSION=4.4.1 --FFMPEG_BUILD_TAG=v4.4.1-1 -+FFMPEG_VERSION=5.1.2 -+FFMPEG_BUILD_TAG=v${FFMPEG_VERSION}-1 - - TMP_BUILD_DIR=$BASE_DIR/$(mktemp -d build.XXXXXXXX) - trap 'rm -rf $TMP_BUILD_DIR' EXIT -diff --git a/src/audio/ffmpeg_audio_processor.h b/src/audio/ffmpeg_audio_processor.h -index 7628fc7..39f4f6d 100644 ---- a/src/audio/ffmpeg_audio_processor.h -+++ b/src/audio/ffmpeg_audio_processor.h -@@ -10,8 +10,6 @@ - - #if defined(USE_SWRESAMPLE) - #include "audio/ffmpeg_audio_processor_swresample.h" --#elif defined(USE_AVRESAMPLE) --#include "audio/ffmpeg_audio_processor_avresample.h" - #else - #error "no audio processing library" - #endif -diff --git a/src/audio/ffmpeg_audio_processor_avresample.h b/src/audio/ffmpeg_audio_processor_avresample.h -deleted file mode 100644 -index bd85f92..0000000 ---- a/src/audio/ffmpeg_audio_processor_avresample.h -+++ /dev/null -@@ -1,72 +0,0 @@ --// Copyright (C) 2016 Lukas Lalinsky --// Distributed under the MIT license, see the LICENSE file for details. -- --#ifndef CHROMAPRINT_AUDIO_FFMPEG_AUDIO_PROCESSOR_AVRESAMPLE_H_ --#define CHROMAPRINT_AUDIO_FFMPEG_AUDIO_PROCESSOR_AVRESAMPLE_H_ -- --extern "C" { --#include --} -- --namespace chromaprint { -- --class FFmpegAudioProcessor { --public: -- FFmpegAudioProcessor() { -- m_resample_ctx = avresample_alloc_context(); -- } -- -- ~FFmpegAudioProcessor() { -- avresample_free(&m_resample_ctx); -- } -- -- void SetCompatibleMode() { -- av_opt_set_int(m_resample_ctx, "filter_size", 16, 0); -- av_opt_set_int(m_resample_ctx, "phase_shift", 8, 0); -- av_opt_set_int(m_resample_ctx, "linear_interp", 1, 0); -- av_opt_set_double(m_resample_ctx, "cutoff", 0.8, 0); -- } -- -- void SetInputChannelLayout(int64_t channel_layout) { -- av_opt_set_int(m_resample_ctx, "in_channel_layout", channel_layout, 0); -- } -- -- void SetInputSampleFormat(AVSampleFormat sample_format) { -- av_opt_set_int(m_resample_ctx, "in_sample_fmt", sample_format, 0); -- } -- -- void SetInputSampleRate(int sample_rate) { -- av_opt_set_int(m_resample_ctx, "in_sample_rate", sample_rate, 0); -- } -- -- void SetOutputChannelLayout(int64_t channel_layout) { -- av_opt_set_int(m_resample_ctx, "out_channel_layout", channel_layout, 0); -- } -- -- void SetOutputSampleFormat(AVSampleFormat sample_format) { -- av_opt_set_int(m_resample_ctx, "out_sample_fmt", sample_format, 0); -- } -- -- void SetOutputSampleRate(int sample_rate) { -- av_opt_set_int(m_resample_ctx, "out_sample_fmt", sample_rate, 0); -- } -- -- int Init() { -- return avresample_open(m_resample_ctx); -- } -- -- int Convert(uint8_t **out, int out_count, const uint8_t **in, int in_count) { -- return avresample_convert(m_resample_ctx, out, 0, out_count, (uint8_t **) in, 0, in_count); -- } -- -- int Flush(uint8_t **out, int out_count) { -- return avresample_read(m_resample_ctx, out, out_count); -- } -- --private: -- AVAudioResampleContext *m_resample_ctx = nullptr; --}; -- --}; // namespace chromaprint -- --#endif -diff --git a/src/audio/ffmpeg_audio_processor_swresample.h b/src/audio/ffmpeg_audio_processor_swresample.h -index b86266b..b1d4bea 100644 ---- a/src/audio/ffmpeg_audio_processor_swresample.h -+++ b/src/audio/ffmpeg_audio_processor_swresample.h -@@ -28,30 +28,28 @@ public: - av_opt_set_double(m_swr_ctx, "cutoff", 0.8, 0); - } - -- void SetInputChannelLayout(int64_t channel_layout) { -- av_opt_set_int(m_swr_ctx, "icl", channel_layout, 0); -- av_opt_set_int(m_swr_ctx, "ich", av_get_channel_layout_nb_channels(channel_layout), 0); -+ void SetInputChannelLayout(AVChannelLayout *channel_layout) { -+ av_opt_set_int(m_swr_ctx, "in_channel_layout", channel_layout->u.mask, 0); - } - - void SetInputSampleFormat(AVSampleFormat sample_format) { -- av_opt_set_int(m_swr_ctx, "isf", sample_format, 0); -+ av_opt_set_sample_fmt(m_swr_ctx, "in_sample_fmt", sample_format, 0); - } - - void SetInputSampleRate(int sample_rate) { -- av_opt_set_int(m_swr_ctx, "isr", sample_rate, 0); -+ av_opt_set_int(m_swr_ctx, "in_sample_rate", sample_rate, 0); - } - -- void SetOutputChannelLayout(int64_t channel_layout) { -- av_opt_set_int(m_swr_ctx, "ocl", channel_layout, 0); -- av_opt_set_int(m_swr_ctx, "och", av_get_channel_layout_nb_channels(channel_layout), 0); -+ void SetOutputChannelLayout(AVChannelLayout *channel_layout) { -+ av_opt_set_int(m_swr_ctx, "out_channel_layout", channel_layout->u.mask, 0); - } - - void SetOutputSampleFormat(AVSampleFormat sample_format) { -- av_opt_set_int(m_swr_ctx, "osf", sample_format, 0); -+ av_opt_set_sample_fmt(m_swr_ctx, "out_sample_fmt", sample_format, 0); - } - - void SetOutputSampleRate(int sample_rate) { -- av_opt_set_int(m_swr_ctx, "osr", sample_rate, 0); -+ av_opt_set_int(m_swr_ctx, "out_sample_rate", sample_rate, 0); - } - - int Init() { -diff --git a/src/audio/ffmpeg_audio_reader.h b/src/audio/ffmpeg_audio_reader.h -index 5550164..1c6b346 100644 ---- a/src/audio/ffmpeg_audio_reader.h -+++ b/src/audio/ffmpeg_audio_reader.h -@@ -62,7 +62,7 @@ public: - bool Read(const int16_t **data, size_t *size); - - bool IsOpen() const { return m_opened; } -- bool IsFinished() const { return m_finished && !m_got_frame; } -+ bool IsFinished() const { return !m_has_more_packets && !m_has_more_frames; } - - std::string GetError() const { return m_error; } - int GetErrorCode() const { return m_error_code; } -@@ -74,20 +74,19 @@ private: - uint8_t *m_convert_buffer[1] = { nullptr }; - int m_convert_buffer_nb_samples = 0; - -- AVInputFormat *m_input_fmt = nullptr; -+ const AVInputFormat *m_input_fmt = nullptr; - AVDictionary *m_input_opts = nullptr; - - AVFormatContext *m_format_ctx = nullptr; - AVCodecContext *m_codec_ctx = nullptr; -- AVFrame *m_frame = nullptr; - int m_stream_index = -1; - std::string m_error; - int m_error_code = 0; -- bool m_finished = false; - bool m_opened = false; -- int m_got_frame = 0; -- AVPacket m_packet; -- AVPacket m_packet0; -+ bool m_has_more_packets = true; -+ bool m_has_more_frames = true; -+ AVPacket *m_packet = nullptr; -+ AVFrame *m_frame = nullptr; - - int m_output_sample_rate = 0; - int m_output_channels = 0; -@@ -98,19 +97,12 @@ private: - - inline FFmpegAudioReader::FFmpegAudioReader() { - av_log_set_level(AV_LOG_QUIET); -- -- av_init_packet(&m_packet); -- m_packet.data = nullptr; -- m_packet.size = 0; -- -- m_packet0 = m_packet; - } - - inline FFmpegAudioReader::~FFmpegAudioReader() { - Close(); - av_dict_free(&m_input_opts); - av_freep(&m_convert_buffer[0]); -- av_packet_unref(&m_packet0); - } - - inline bool FFmpegAudioReader::SetInputFormat(const char *name) { -@@ -135,11 +127,10 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - - Close(); - -- av_init_packet(&m_packet); -- m_packet.data = nullptr; -- m_packet.size = 0; -- -- m_packet0 = m_packet; -+ m_packet = av_packet_alloc(); -+ if (!m_packet) { -+ return false; -+ } - - ret = avformat_open_input(&m_format_ctx, file_name.c_str(), m_input_fmt, &m_input_opts); - if (ret < 0) { -@@ -153,26 +144,31 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - return false; - } - -- AVCodec *codec; -+ const AVCodec *codec; - ret = av_find_best_stream(m_format_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0); - if (ret < 0) { - SetError("Could not find any audio stream in the file", ret); - return false; - } - m_stream_index = ret; -+ auto stream = m_format_ctx->streams[m_stream_index]; - -- m_codec_ctx = m_format_ctx->streams[m_stream_index]->codec; -+ m_codec_ctx = avcodec_alloc_context3(codec); - m_codec_ctx->request_sample_fmt = AV_SAMPLE_FMT_S16; - -+ ret = avcodec_parameters_to_context(m_codec_ctx, stream->codecpar); -+ if (ret < 0) { -+ SetError("Could not copy the stream parameters", ret); -+ return false; -+ } -+ - ret = avcodec_open2(m_codec_ctx, codec, nullptr); - if (ret < 0) { - SetError("Could not open the codec", ret); - return false; - } - -- if (!m_codec_ctx->channel_layout) { -- m_codec_ctx->channel_layout = av_get_default_channel_layout(m_codec_ctx->channels); -- } -+ av_dump_format(m_format_ctx, 0, "foo", 0); - - m_frame = av_frame_alloc(); - if (!m_frame) { -@@ -183,19 +179,23 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - m_output_sample_rate = m_codec_ctx->sample_rate; - } - -- if (!m_output_channels) { -- m_output_channels = m_codec_ctx->channels; -+ AVChannelLayout output_channel_layout; -+ if (m_output_channels) { -+ av_channel_layout_default(&output_channel_layout, m_output_channels); -+ } else { -+ m_output_channels = m_codec_ctx->ch_layout.nb_channels; -+ av_channel_layout_default(&output_channel_layout, m_output_channels); - } - -- if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16 || m_codec_ctx->channels != m_output_channels || m_codec_ctx->sample_rate != m_output_sample_rate) { -+ if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16 || m_codec_ctx->ch_layout.nb_channels != m_output_channels || m_codec_ctx->sample_rate != m_output_sample_rate) { - m_converter.reset(new FFmpegAudioProcessor()); - m_converter->SetCompatibleMode(); - m_converter->SetInputSampleFormat(m_codec_ctx->sample_fmt); - m_converter->SetInputSampleRate(m_codec_ctx->sample_rate); -- m_converter->SetInputChannelLayout(m_codec_ctx->channel_layout); -+ m_converter->SetInputChannelLayout(&(m_codec_ctx->ch_layout)); - m_converter->SetOutputSampleFormat(AV_SAMPLE_FMT_S16); - m_converter->SetOutputSampleRate(m_output_sample_rate); -- m_converter->SetOutputChannelLayout(av_get_default_channel_layout(m_output_channels)); -+ m_converter->SetOutputChannelLayout(&output_channel_layout); - auto ret = m_converter->Init(); - if (ret != 0) { - SetError("Could not create an audio converter instance", ret); -@@ -203,10 +203,11 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - } - } - -+ av_channel_layout_uninit(&output_channel_layout); -+ - m_opened = true; -- m_finished = false; -- m_got_frame = 0; -- m_nb_packets = 0; -+ m_has_more_packets = true; -+ m_has_more_frames = true; - m_decode_error = 0; - - return true; -@@ -214,6 +215,7 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - - inline void FFmpegAudioReader::Close() { - av_frame_free(&m_frame); -+ av_packet_free(&m_packet); - - m_stream_index = -1; - -@@ -252,91 +254,98 @@ inline bool FFmpegAudioReader::Read(const int16_t **data, size_t *size) { - return false; - } - -+ *data = nullptr; -+ *size = 0; -+ - int ret; -+ bool needs_packet = false; - while (true) { -- while (m_packet.size <= 0) { -- av_packet_unref(&m_packet0); -- av_init_packet(&m_packet); -- m_packet.data = nullptr; -- m_packet.size = 0; -- ret = av_read_frame(m_format_ctx, &m_packet); -+ while (needs_packet && m_packet->size == 0) { -+ ret = av_read_frame(m_format_ctx, m_packet); - if (ret < 0) { - if (ret == AVERROR_EOF) { -- m_finished = true; -+ needs_packet = false; -+ m_has_more_packets = false; - break; -- } else { -+ } -+ SetError("Error reading from the audio source", ret); -+ return false; -+ } -+ if (m_packet->stream_index == m_stream_index) { -+ needs_packet = false; -+ } else { -+ av_packet_unref(m_packet); -+ } -+ } -+ -+ if (m_packet->size != 0) { -+ ret = avcodec_send_packet(m_codec_ctx, m_packet); -+ if (ret < 0) { -+ if (ret != AVERROR(EAGAIN)) { - SetError("Error reading from the audio source", ret); - return false; - } -- } -- m_packet0 = m_packet; -- if (m_packet.stream_index != m_stream_index) { -- m_packet.data = nullptr; -- m_packet.size = 0; - } else { -- m_nb_packets++; -+ av_packet_unref(m_packet); - } - } - -- ret = avcodec_decode_audio4(m_codec_ctx, m_frame, &m_got_frame, &m_packet); -+ ret = avcodec_receive_frame(m_codec_ctx, m_frame); - if (ret < 0) { -- if (m_decode_error) { -- SetError("Error decoding audio frame", m_decode_error); -- return false; -+ if (ret == AVERROR_EOF) { -+ m_has_more_frames = false; -+ } else if (ret == AVERROR(EAGAIN)) { -+ if (m_has_more_packets) { -+ needs_packet = true; -+ continue; -+ } else { -+ m_has_more_frames = false; -+ } - } -- m_decode_error = ret; -- m_packet.data = nullptr; -- m_packet.size = 0; -- continue; -+ SetError("Error decoding the audio source", ret); -+ return false; - } - -- break; -- } -- -- m_decode_error = 0; -- -- const int decoded = std::min(ret, m_packet.size); -- m_packet.data += decoded; -- m_packet.size -= decoded; -- -- if (m_got_frame) { -- if (m_converter) { -- if (m_frame->nb_samples > m_convert_buffer_nb_samples) { -- int linsize; -- av_freep(&m_convert_buffer[0]); -- m_convert_buffer_nb_samples = std::max(1024 * 8, m_frame->nb_samples); -- ret = av_samples_alloc(m_convert_buffer, &linsize, m_codec_ctx->channels, m_convert_buffer_nb_samples, AV_SAMPLE_FMT_S16, 1); -- if (ret < 0) { -- SetError("Couldn't allocate audio converter buffer", ret); -+ if (m_frame->nb_samples > 0) { -+ if (m_converter) { -+ if (m_frame->nb_samples > m_convert_buffer_nb_samples) { -+ int linsize; -+ av_freep(&m_convert_buffer[0]); -+ m_convert_buffer_nb_samples = std::max(1024 * 8, m_frame->nb_samples); -+ ret = av_samples_alloc(m_convert_buffer, &linsize, m_codec_ctx->ch_layout.nb_channels, m_convert_buffer_nb_samples, AV_SAMPLE_FMT_S16, 1); -+ if (ret < 0) { -+ SetError("Couldn't allocate audio converter buffer", ret); -+ return false; -+ } -+ } -+ auto nb_samples = m_converter->Convert(m_convert_buffer, m_convert_buffer_nb_samples, (const uint8_t **) m_frame->data, m_frame->nb_samples); -+ if (nb_samples < 0) { -+ SetError("Couldn't convert audio", ret); - return false; - } -- } -- auto nb_samples = m_converter->Convert(m_convert_buffer, m_convert_buffer_nb_samples, (const uint8_t **) m_frame->data, m_frame->nb_samples); -- if (nb_samples < 0) { -- SetError("Couldn't convert audio", ret); -- return false; -- } -- *data = (const int16_t *) m_convert_buffer[0]; -- *size = nb_samples; -- } else { -- *data = (const int16_t *) m_frame->data[0]; -- *size = m_frame->nb_samples; -- } -- } else { -- if (m_finished && m_converter) { -- auto nb_samples = m_converter->Flush(m_convert_buffer, m_convert_buffer_nb_samples); -- if (nb_samples < 0) { -- SetError("Couldn't convert audio", ret); -- return false; -- } else if (nb_samples > 0) { -- m_got_frame = 1; - *data = (const int16_t *) m_convert_buffer[0]; - *size = nb_samples; -+ } else { -+ *data = (const int16_t *) m_frame->data[0]; -+ *size = m_frame->nb_samples; -+ } -+ } else { -+ if (m_converter) { -+ if (IsFinished()) { -+ auto nb_samples = m_converter->Flush(m_convert_buffer, m_convert_buffer_nb_samples); -+ if (nb_samples < 0) { -+ SetError("Couldn't convert audio", ret); -+ return false; -+ } else if (nb_samples > 0) { -+ *data = (const int16_t *) m_convert_buffer[0]; -+ *size = nb_samples; -+ } -+ } - } - } -- } - -- return true; -+ return true; -+ } - } - - inline void FFmpegAudioReader::SetError(const char *message, int errnum) { -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index a2b517b..123e643 100644 ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -38,6 +38,12 @@ set(SRCS - - if(BUILD_TOOLS) - set(SRCS ${SRCS} ../src/audio/ffmpeg_audio_reader_test.cpp) -+ include_directories( -+ ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} -+ ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} -+ ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} -+ ${AUDIO_PROCESSOR_INCLUDE_DIRS} -+ ) - link_libraries(fpcalc_libs) - endif() - --- -2.38.1 - - diff --git a/srcpkgs/chromaprint/template b/srcpkgs/chromaprint/template index 1b990191b7fb02..70a39eafa68da0 100644 --- a/srcpkgs/chromaprint/template +++ b/srcpkgs/chromaprint/template @@ -1,18 +1,19 @@ # Template file for 'chromaprint' pkgname=chromaprint -version=1.5.1 -revision=2 +version=1.6.0 +revision=1 build_style=cmake configure_args="-DBUILD_TOOLS=ON" -make_check_target="check" -makedepends="fftw-devel ffmpeg6-devel" +# this ends with a 'nothing to do', BUILD_TESTS runs before 'do_check' +make_check_target="all_tests" +makedepends="fftw-devel ffmpeg-devel" short_desc="Library that extracts fingerprints from any audio source" maintainer="Orphaned " license="MIT, LGPL-2.1-only" homepage="https://acoustid.org/chromaprint" changelog="https://raw.githubusercontent.com/acoustid/chromaprint/master/NEWS.txt" distfiles="https://github.com/acoustid/chromaprint/releases/download/v${version}/chromaprint-${version}.tar.gz" -checksum=a1aad8fa3b8b18b78d3755b3767faff9abb67242e01b478ec9a64e190f335e1c +checksum=9d33482e56a1389a37a0d6742c376139fa43e3b8a63d29003222b93db2cb40da if [ -z "$XBPS_CHECK_PKGS" ] || [ "$CROSS_BUILD" ]; then configure_args+=" -DBUILD_TESTS=OFF" From 661119eceadcaf48b99a4fad83aab66b14e696b5 Mon Sep 17 00:00:00 2001 From: zlice Date: Sat, 20 Dec 2025 10:59:06 -0500 Subject: [PATCH 064/110] obs: revbump for ffmpeg8 --- srcpkgs/obs/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/obs/template b/srcpkgs/obs/template index c2b2019b3b7d6e..f46d8e53b8981c 100644 --- a/srcpkgs/obs/template +++ b/srcpkgs/obs/template @@ -1,7 +1,7 @@ # Template file for 'obs' pkgname=obs version=32.1.2 -revision=1 +revision=2 archs="i686* x86_64* ppc64le* aarch64* riscv64*" build_style=cmake configure_args="-DOBS_VERSION_OVERRIDE=${version} -DENABLE_JACK=ON @@ -13,7 +13,7 @@ configure_args="-DOBS_VERSION_OVERRIDE=${version} -DENABLE_JACK=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF" hostmakedepends="pkg-config swig python3-devel qt6-base" makedepends="$(vopt_if luajit LuaJIT-devel) fdk-aac-devel - ffmpeg6-devel glu-devel jack-devel libXcomposite-devel libcurl-devel + ffmpeg-devel glu-devel jack-devel libXcomposite-devel libcurl-devel libva-devel pulseaudio-devel python3-devel speexdsp-devel v4l-utils-devel vlc-devel qt6-svg-devel x264-devel mbedtls-devel jansson-devel wayland-devel pipewire-devel libxkbcommon-devel From 386d70c927234628a42eda567e0eb94a5494b4c6 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 065/110] droidcam-obs-plugin: update to 2.4.1 --- srcpkgs/droidcam-obs-plugin/patches/ffmpeg8.patch | 11 +++++++++++ srcpkgs/droidcam-obs-plugin/template | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/droidcam-obs-plugin/patches/ffmpeg8.patch diff --git a/srcpkgs/droidcam-obs-plugin/patches/ffmpeg8.patch b/srcpkgs/droidcam-obs-plugin/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..791642b60566db --- /dev/null +++ b/srcpkgs/droidcam-obs-plugin/patches/ffmpeg8.patch @@ -0,0 +1,11 @@ +--- a/src/ffmpeg_decode.cc ++++ b/src/ffmpeg_decode.cc +@@ -120,7 +120,7 @@ + } + + decoder->sample_rate = aac_frequencies[sr_idx]; +- decoder->profile = FF_PROFILE_AAC_LOW; ++ decoder->profile = AV_PROFILE_AAC_LOW; + + const int channels = (header[1] >> 3) & 0xF; + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 24, 100) diff --git a/srcpkgs/droidcam-obs-plugin/template b/srcpkgs/droidcam-obs-plugin/template index 67ff1e09a7d4a2..68f0b7ceb6f06d 100644 --- a/srcpkgs/droidcam-obs-plugin/template +++ b/srcpkgs/droidcam-obs-plugin/template @@ -1,18 +1,18 @@ # Template file for 'droidcam-obs-plugin' pkgname=droidcam-obs-plugin -version=2.4.0 -revision=1 +version=2.4.1 +revision=2 build_style=gnu-makefile make_use_env=yes make_build_args="ALLOW_STATIC=no" makedepends="obs-devel libusbmuxd-devel libjpeg-turbo-devel - ffmpeg6-devel libimobiledevice-devel" + ffmpeg-devel libimobiledevice-devel simde" short_desc="DroidCam OBS Source" maintainer="Michael Aldridge " license="GPL-2.0-only" homepage="https://github.com/dev47apps/droidcam-obs-plugin" distfiles="https://github.com/dev47apps/droidcam-obs-plugin/archive/refs/tags/$version.tar.gz" -checksum=55ffb07ca4c55d1018bfabb3029f7ac86622cfbcb05120edad62031da3f6fbc4 +checksum=c2b6dd4e4ea27b274780d8dfe69861f235e28984a6f9ae4fe84bc4ee980747fc broken="does not build with obs 32.1.0" From 57771bd4dbf05e3ed85756d6812ba647de162acb Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 066/110] droidcam: revbump for ffmpeg8 --- srcpkgs/droidcam/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/droidcam/template b/srcpkgs/droidcam/template index 083c23082fe617..4c6664761bd336 100644 --- a/srcpkgs/droidcam/template +++ b/srcpkgs/droidcam/template @@ -1,12 +1,12 @@ # Template file for 'droidcam' pkgname=droidcam version=2.1.5 -revision=1 +revision=2 build_style=gnu-makefile make_use_env=true make_build_args="USBMUXD=-lusbmuxd-2.0 APPINDICATOR=ayatana-appindicator3-0.1" hostmakedepends="pkg-config" -makedepends="pkg-config libjpeg-turbo-devel ffmpeg6-devel alsa-lib-devel +makedepends="pkg-config libjpeg-turbo-devel ffmpeg-devel alsa-lib-devel speex-devel libusbmuxd-devel libplist-devel gtk+3-devel libayatana-appindicator-devel" depends="v4l2loopback" From c7a35dcb97c94a465c375f9d229f2f4009052e9e Mon Sep 17 00:00:00 2001 From: zlice Date: Tue, 23 Dec 2025 08:29:55 -0500 Subject: [PATCH 067/110] libgme: update to 0.6.4, changed to github --- srcpkgs/libgme/patches/header.patch | 14 -------------- srcpkgs/libgme/patches/ppc-musl.patch | 17 ----------------- srcpkgs/libgme/template | 12 ++++++------ 3 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 srcpkgs/libgme/patches/header.patch delete mode 100644 srcpkgs/libgme/patches/ppc-musl.patch diff --git a/srcpkgs/libgme/patches/header.patch b/srcpkgs/libgme/patches/header.patch deleted file mode 100644 index d19a0bdc1bc1ce..00000000000000 --- a/srcpkgs/libgme/patches/header.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/gme/gme.h -+++ b/gme/gme.h -@@ -4,7 +4,11 @@ - #ifndef GME_H - #define GME_H - -+#ifdef GME_INTERNAL_BUILD - #include "blargg_source.h" -+#else -+#define BLARGG_EXPORT /* blank */ -+#endif - - #ifdef __cplusplus - extern "C" { diff --git a/srcpkgs/libgme/patches/ppc-musl.patch b/srcpkgs/libgme/patches/ppc-musl.patch deleted file mode 100644 index 4a9268efbe5f73..00000000000000 --- a/srcpkgs/libgme/patches/ppc-musl.patch +++ /dev/null @@ -1,17 +0,0 @@ -This removes an invalid assumption that results in both BLARGG_LITTLE_ENDIAN -and BLARGG_BIG_ENDIAN being defined on little endian musl, as we're already -covered by __LITTLE_ENDIAN__/__BIG_ENDIAN__ (which is specified as a part -of the ELFv2 ABI itself to be always present). Glibc was not broken because -it has its own check before that. - ---- a/gme/blargg_endian.h -+++ b/gme/blargg_endian.h -@@ -36,7 +36,7 @@ - #endif - - #if defined (MSB_FIRST) || defined (__BIG_ENDIAN__) || defined (WORDS_BIGENDIAN) || \ -- defined (__sparc__) || BLARGG_CPU_POWERPC || \ -+ defined (__sparc__) || \ - (defined (BIG_ENDIAN) && BIG_ENDIAN+0 != 4321) - #define BLARGG_BIG_ENDIAN 1 - #elif !defined (__mips__) diff --git a/srcpkgs/libgme/template b/srcpkgs/libgme/template index a6e600ffaf7adf..711376f93daed5 100644 --- a/srcpkgs/libgme/template +++ b/srcpkgs/libgme/template @@ -1,16 +1,16 @@ # Template file for 'libgme' pkgname=libgme -version=0.6.3 -revision=3 +version=0.6.4 +revision=1 build_style=cmake configure_args="-DENABLE_UBSAN=OFF" makedepends="zlib-devel SDL2-devel" short_desc="Video game music file emulation/playback library" maintainer="Pierre Allegraud " license="LGPL-2.1-or-later" -homepage="https://bitbucket.org/mpyne/game-music-emu/wiki/Home" -distfiles="https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-${version}.tar.xz" -checksum=aba34e53ef0ec6a34b58b84e28bf8cfbccee6585cebca25333604c35db3e051d +homepage="https://github.com/libgme/game-music-emu" +distfiles="https://github.com/libgme/game-music-emu/releases/download/${version}/libgme-${version}-src.tar.gz" +checksum=6f94eac735d86bca998a7ce1170d007995191ef6d4388345a0dc5ffa1de0bafa if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then CXXFLAGS="-DMSB_FIRST=1" @@ -18,7 +18,7 @@ fi if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then CXXFLAGS="-DLSB_FIRST=1" fi -CXXFLAGS+=" -DGME_INTERNAL_BUILD=1" +#CXXFLAGS+=" -DGME_INTERNAL_BUILD=1" libgme-devel_package() { short_desc+=" - development files" From 56415cb957fdfe339761fa706a87c50b8029c4d8 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 068/110] fooyin: revbump for ffmpeg8 --- srcpkgs/fooyin/patches/qt6.patch | 42 ++++++++++++++++++++++++++++++++ srcpkgs/fooyin/template | 4 +-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/fooyin/patches/qt6.patch diff --git a/srcpkgs/fooyin/patches/qt6.patch b/srcpkgs/fooyin/patches/qt6.patch new file mode 100644 index 00000000000000..77d9e9d459b1c5 --- /dev/null +++ b/srcpkgs/fooyin/patches/qt6.patch @@ -0,0 +1,42 @@ +From f57700420a3c72300e5135426d5a953547f90872 Mon Sep 17 00:00:00 2001 +From: Ivan V +Date: Sun, 30 Nov 2025 16:03:43 +0000 +Subject: [PATCH] [utils] Fix compatibility with Qt 6.10.1 + +--- + src/utils/starrating.cpp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/utils/starrating.cpp b/src/utils/starrating.cpp +index 1e71e1816..0be778632 100644 +--- a/src/utils/starrating.cpp ++++ b/src/utils/starrating.cpp +@@ -99,12 +99,12 @@ void StarRating::setStarScale(int scale) + void StarRating::paint(QPainter* painter, const QRect& rect, const QPalette& palette, EditMode mode, + Qt::Alignment alignment) const + { +- const QString cacheKey = u"StarRating:%1|%2|%3|%4|%5|%6"_s.arg(m_rating) +- .arg(m_scale) +- .arg(m_maxCount) +- .arg(mode == EditMode::Editable ? 1 : 0) +- .arg(rect.width()) +- .arg(alignment); ++ const QString cacheKey = u"StarRating:%1|%2|%3|%4|%5|%6"_s.arg(static_cast(m_rating)) ++ .arg(static_cast(m_scale)) ++ .arg(static_cast(m_maxCount)) ++ .arg(static_cast(mode == EditMode::Editable ? 1 : 0)) ++ .arg(static_cast(rect.width())) ++ .arg(static_cast(alignment)); + + QPixmap pixmap; + if(!QPixmapCache::find(cacheKey, &pixmap)) { + +--- a/src/plugins/vumeter/vumeterwidget.cpp ++++ b/src/plugins/vumeter/vumeterwidget.cpp +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + using namespace Qt::StringLiterals; diff --git a/srcpkgs/fooyin/template b/srcpkgs/fooyin/template index 6914fe02349c6c..2cf34de45307c8 100644 --- a/srcpkgs/fooyin/template +++ b/srcpkgs/fooyin/template @@ -1,14 +1,14 @@ # Template file for 'fooyin' pkgname=fooyin version=0.10.8 -revision=1 +revision=2 build_style=cmake configure_args=" -DBUILD_PCH=ON -DBUILD_WERROR=OFF" hostmakedepends="pkg-config qt6-base qt6-tools" makedepends="qt6-base-devel qt6-svg-devel alsa-lib-devel - ffmpeg6-devel icu-devel libarchive-devel libebur128-devel + ffmpeg-devel icu-devel libarchive-devel libebur128-devel libgme-devel libopenmpt-devel libsndfile-devel pipewire-devel SDL2-devel taglib-devel KDSingleApplication qcoro-qt6-devel" depends="qt6-svg qt6-plugin-sqlite" From fcba22517dd451976b9f86d8a5f6de6e08031ede Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:55:04 -0500 Subject: [PATCH 069/110] ffms2: update to 5.0 --- common/shlibs | 2 +- srcpkgs/ffms2/patches/ffmpeg5.patch | 424 ---------------------------- srcpkgs/ffms2/template | 8 +- 3 files changed, 5 insertions(+), 429 deletions(-) delete mode 100644 srcpkgs/ffms2/patches/ffmpeg5.patch diff --git a/common/shlibs b/common/shlibs index 7f21ebfab2954a..a295a2b90dc794 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3179,7 +3179,7 @@ libvali.so.1 vali-0.1.1_1 libphodav-3.0.so.0 phodav-3.0_1 libgfshare.so.2 libgfshare-2.0.0_1 libtacacs.so.1 tacacs-4.0.4.28_1 -libffms2.so.4 libffms2-2.23.1_1 +libffms2.so.5 libffms2-5.0.1_1 libddcutil.so.5 ddcutil-2.1.4_1 liblsmash.so.2 liblsmash-2.9.1_1 libgiac.so.0 libgiac-1.4.9r17_1 diff --git a/srcpkgs/ffms2/patches/ffmpeg5.patch b/srcpkgs/ffms2/patches/ffmpeg5.patch deleted file mode 100644 index 1479fabcafcb4e..00000000000000 --- a/srcpkgs/ffms2/patches/ffmpeg5.patch +++ /dev/null @@ -1,424 +0,0 @@ -From 45673149e9a2f5586855ad472e3059084eaa36b1 Mon Sep 17 00:00:00 2001 -From: Derek Buitenhuis -Date: Tue, 4 May 2021 14:41:21 +0100 -Subject: [PATCH] Use auto for AVCodec - -The geniuses over at FFmpeg decided to constify this API, so old -versions of the library will return AVCodec *, while new versions -of the libary will return const AVCodec *, which, in C++, are not -OK to convert between. - -Rather than use some macro hell in ffmscompat.h, we can work around -this by using auto. - -Gross. - -Signed-off-by: Derek Buitenhuis ---- - src/core/audiosource.cpp | 2 +- - src/core/indexing.cpp | 6 +++--- - src/core/videosource.cpp | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/core/audiosource.cpp b/src/core/audiosource.cpp -index e4ce97c..ac09666 100644 ---- a/src/core/audiosource.cpp -+++ b/src/core/audiosource.cpp -@@ -469,7 +469,7 @@ void FFMS_AudioSource::OpenFile() { - - LAVFOpenFile(SourceFile.c_str(), FormatContext, TrackNumber); - -- AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id); -+ auto *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id); - if (Codec == nullptr) - throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC, - "Audio codec not found"); -diff --git a/src/core/indexing.cpp b/src/core/indexing.cpp -index e547c5a..59fb4e8 100644 ---- a/src/core/indexing.cpp -+++ b/src/core/indexing.cpp -@@ -384,7 +384,7 @@ FFMS_TrackType FFMS_Indexer::GetTrackType(int Track) { - } - - const char *FFMS_Indexer::GetTrackCodec(int Track) { -- AVCodec *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id); -+ auto *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id); - return codec ? codec->name : nullptr; - } - -@@ -402,7 +402,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - UseDTS); - - if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { -- AVCodec *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); -+ auto *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); - if (!VideoCodec) { - FormatContext->streams[i]->discard = AVDISCARD_ALL; - IndexMask.erase(i); -@@ -433,7 +433,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - IndexMask.insert(i); - } - } else if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { -- AVCodec *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); -+ auto *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); - if (AudioCodec == nullptr) - throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_UNSUPPORTED, - "Audio codec not found"); -diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp -index b889970..8956c22 100644 ---- a/src/core/videosource.cpp -+++ b/src/core/videosource.cpp -@@ -171,7 +171,7 @@ FFMS_VideoSource::FFMS_VideoSource(const char *SourceFile, FFMS_Index &Index, in - - LAVFOpenFile(SourceFile, FormatContext, VideoTrack); - -- AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id); -+ auto *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id); - if (Codec == nullptr) - throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC, - "Video codec not found"); --- -2.40.0 - -From 96cbf38ea9381829a1314f432a2c60495dcefaad Mon Sep 17 00:00:00 2001 -From: Derek Buitenhuis -Date: Tue, 4 May 2021 14:12:41 +0100 -Subject: [PATCH] all: Update AVPacket API usage - -AVPackets must all be on the heap now, since it is no longer -part of the libav* ABI. - -Signed-off-by: Derek Buitenhuis ---- - src/core/audiosource.cpp | 16 ++++++---- - src/core/indexing.cpp | 63 ++++++++++++++++++++++------------------ - src/core/indexing.h | 4 +-- - src/core/utils.cpp | 6 ---- - src/core/utils.h | 1 - - src/core/videosource.cpp | 30 ++++++++++--------- - 6 files changed, 64 insertions(+), 56 deletions(-) - -diff --git a/src/core/audiosource.cpp b/src/core/audiosource.cpp -index 37cf9ae..e4ce97c 100644 ---- a/src/core/audiosource.cpp -+++ b/src/core/audiosource.cpp -@@ -285,10 +285,15 @@ FFMS_AudioSource::AudioBlock *FFMS_AudioSource::CacheBlock(CacheIterator &pos) { - int FFMS_AudioSource::DecodeNextBlock(CacheIterator *pos) { - CurrentFrame = &Frames[PacketNumber]; - -- AVPacket Packet; -- if (!ReadPacket(&Packet)) -+ AVPacket *Packet = av_packet_alloc(); -+ if (!Packet) -+ throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_ALLOCATION_FAILED, -+ "Could not allocate packet."); -+ if (!ReadPacket(Packet)) { -+ av_packet_free(&Packet); - throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_UNKNOWN, - "ReadPacket unexpectedly failed to read a packet"); -+ } - - // ReadPacket may have changed the packet number - CurrentFrame = &Frames[PacketNumber]; -@@ -297,8 +302,9 @@ int FFMS_AudioSource::DecodeNextBlock(CacheIterator *pos) { - int NumberOfSamples = 0; - AudioBlock *CachedBlock = nullptr; - -- int Ret = avcodec_send_packet(CodecContext, &Packet); -- av_packet_unref(&Packet); -+ int Ret = avcodec_send_packet(CodecContext, Packet); -+ av_packet_unref(Packet); -+ av_packet_free(&Packet); - - av_frame_unref(DecodeFrame); - Ret = avcodec_receive_frame(CodecContext, DecodeFrame); -@@ -513,8 +519,6 @@ void FFMS_AudioSource::Seek() { - } - - bool FFMS_AudioSource::ReadPacket(AVPacket *Packet) { -- InitNullPacket(*Packet); -- - while (av_read_frame(FormatContext, Packet) >= 0) { - if (Packet->stream_index == TrackNumber) { - // Required because not all audio packets, especially in ogg, have a pts. Use the previous valid packet's pts instead. -diff --git a/src/core/indexing.cpp b/src/core/indexing.cpp -index 23fb95b..e547c5a 100644 ---- a/src/core/indexing.cpp -+++ b/src/core/indexing.cpp -@@ -320,7 +320,7 @@ void FFMS_Indexer::CheckAudioProperties(int Track, AVCodecContext *Context) { - } - } - --void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt, int *RepeatPict, -+void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket *pkt, int *RepeatPict, - int *FrameType, bool *Invisible, enum AVPictureStructure *LastPicStruct) { - if (VideoContext.Parser) { - uint8_t *OB; -@@ -330,8 +330,8 @@ void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt - av_parser_parse2(VideoContext.Parser, - VideoContext.CodecContext, - &OB, &OBSize, -- pkt.data, pkt.size, -- pkt.pts, pkt.dts, pkt.pos); -+ pkt->data, pkt->size, -+ pkt->pts, pkt->dts, pkt->pos); - - // H.264 (PAFF) and HEVC may have one field per packet, so we need to track - // when we have a full or half frame available, and mark one of them as -@@ -351,15 +351,15 @@ void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt - - *RepeatPict = VideoContext.Parser->repeat_pict; - *FrameType = VideoContext.Parser->pict_type; -- *Invisible = (IncompleteFrame || VideoContext.Parser->repeat_pict < 0 || (pkt.flags & AV_PKT_FLAG_DISCARD)); -+ *Invisible = (IncompleteFrame || VideoContext.Parser->repeat_pict < 0 || (pkt->flags & AV_PKT_FLAG_DISCARD)); - } else { -- *Invisible = !!(pkt.flags & AV_PKT_FLAG_DISCARD); -+ *Invisible = !!(pkt->flags & AV_PKT_FLAG_DISCARD); - } - - if (VideoContext.CodecContext->codec_id == AV_CODEC_ID_VP8) -- ParseVP8(pkt.data[0], Invisible, FrameType); -+ ParseVP8(pkt->data[0], Invisible, FrameType); - else if (VideoContext.CodecContext->codec_id == AV_CODEC_ID_VP9) -- ParseVP9(pkt.data[0], Invisible, FrameType); -+ ParseVP9(pkt->data[0], Invisible, FrameType); - } - - void FFMS_Indexer::Free() { -@@ -458,32 +458,36 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - } - } - -- AVPacket Packet; -- InitNullPacket(Packet); -+ AVPacket *Packet = av_packet_alloc(); -+ if (!Packet) -+ throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_ALLOCATION_FAILED, -+ "Could not allocate packet."); - std::vector LastValidTS(FormatContext->nb_streams, AV_NOPTS_VALUE); - - int64_t filesize = avio_size(FormatContext->pb); - enum AVPictureStructure LastPicStruct = AV_PICTURE_STRUCTURE_UNKNOWN; -- while (av_read_frame(FormatContext, &Packet) >= 0) { -+ while (av_read_frame(FormatContext, Packet) >= 0) { - // Update progress - // FormatContext->pb can apparently be NULL when opening images. - if (IC && FormatContext->pb) { -- if ((*IC)(FormatContext->pb->pos, filesize, ICPrivate)) -+ if ((*IC)(FormatContext->pb->pos, filesize, ICPrivate)) { -+ av_packet_free(&Packet); - throw FFMS_Exception(FFMS_ERROR_CANCELLED, FFMS_ERROR_USER, - "Cancelled by user"); -+ } - } -- if (!IndexMask.count(Packet.stream_index)) { -- av_packet_unref(&Packet); -+ if (!IndexMask.count(Packet->stream_index)) { -+ av_packet_unref(Packet); - continue; - } - -- int Track = Packet.stream_index; -+ int Track = Packet->stream_index; - FFMS_Track &TrackInfo = (*TrackIndices)[Track]; -- bool KeyFrame = !!(Packet.flags & AV_PKT_FLAG_KEY); -+ bool KeyFrame = !!(Packet->flags & AV_PKT_FLAG_KEY); - ReadTS(Packet, LastValidTS[Track], (*TrackIndices)[Track].UseDTS); - - if (FormatContext->streams[Track]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { -- int64_t PTS = TrackInfo.UseDTS ? Packet.dts : Packet.pts; -+ int64_t PTS = TrackInfo.UseDTS ? Packet->dts : Packet->pts; - if (PTS == AV_NOPTS_VALUE) { - // VPx alt-refs are output as packets which lack timestmps or durations, since - // they are invisible. Currently, the timestamp mangling code in libavformat -@@ -495,9 +499,11 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - // FFMS2 currently sorts packets by PTS, which will break decoding, otherwise. - bool HasAltRefs = (FormatContext->streams[Track]->codecpar->codec_id == AV_CODEC_ID_VP8 || - FormatContext->streams[Track]->codecpar->codec_id == AV_CODEC_ID_VP9); -- if (Packet.duration == 0 && !HasAltRefs) -+ if (Packet->duration == 0 && !HasAltRefs) { -+ av_packet_free(&Packet); - throw FFMS_Exception(FFMS_ERROR_INDEXING, FFMS_ERROR_PARSER, - "Invalid packet pts, dts, and duration"); -+ } - - if (TrackInfo.empty()) - PTS = 0; -@@ -513,7 +519,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - ParseVideoPacket(AVContexts[Track], Packet, &RepeatPict, &FrameType, &Invisible, &LastPicStruct); - - TrackInfo.AddVideoFrame(PTS, RepeatPict, KeyFrame, -- FrameType, Packet.pos, Invisible); -+ FrameType, Packet->pos, Invisible); - } else if (FormatContext->streams[Track]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { - // For video seeking timestamps are used only if all packets have - // timestamps, while for audio they're used if any have timestamps, -@@ -522,28 +528,29 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - TrackInfo.HasTS = true; - - int64_t StartSample = AVContexts[Track].CurrentSample; -- uint32_t SampleCount = IndexAudioPacket(Track, &Packet, AVContexts[Track], *TrackIndices); -+ uint32_t SampleCount = IndexAudioPacket(Track, Packet, AVContexts[Track], *TrackIndices); - TrackInfo.SampleRate = AVContexts[Track].CodecContext->sample_rate; - - TrackInfo.AddAudioFrame(LastValidTS[Track], -- StartSample, SampleCount, KeyFrame, Packet.pos, Packet.flags & AV_PKT_FLAG_DISCARD); -+ StartSample, SampleCount, KeyFrame, Packet->pos, Packet->flags & AV_PKT_FLAG_DISCARD); - } - -- if (!(Packet.flags & AV_PKT_FLAG_DISCARD)) -- TrackInfo.LastDuration = Packet.duration; -+ if (!(Packet->flags & AV_PKT_FLAG_DISCARD)) -+ TrackInfo.LastDuration = Packet->duration; - -- av_packet_unref(&Packet); -+ av_packet_unref(Packet); - } -+ av_packet_free(&Packet); - - TrackIndices->Finalize(AVContexts, FormatContext->iformat->name); - return TrackIndices.release(); - } - --void FFMS_Indexer::ReadTS(const AVPacket &Packet, int64_t &TS, bool &UseDTS) { -- if (!UseDTS && Packet.pts != AV_NOPTS_VALUE) -- TS = Packet.pts; -+void FFMS_Indexer::ReadTS(const AVPacket *Packet, int64_t &TS, bool &UseDTS) { -+ if (!UseDTS && Packet->pts != AV_NOPTS_VALUE) -+ TS = Packet->pts; - if (TS == AV_NOPTS_VALUE) - UseDTS = true; -- if (UseDTS && Packet.dts != AV_NOPTS_VALUE) -- TS = Packet.dts; -+ if (UseDTS && Packet->dts != AV_NOPTS_VALUE) -+ TS = Packet->dts; - } -diff --git a/src/core/indexing.h b/src/core/indexing.h -index 3cfc3c3..5c06868 100644 ---- a/src/core/indexing.h -+++ b/src/core/indexing.h -@@ -80,10 +80,10 @@ private: - int64_t Filesize; - uint8_t Digest[20]; - -- void ReadTS(const AVPacket &Packet, int64_t &TS, bool &UseDTS); -+ void ReadTS(const AVPacket *Packet, int64_t &TS, bool &UseDTS); - void CheckAudioProperties(int Track, AVCodecContext *Context); - uint32_t IndexAudioPacket(int Track, AVPacket *Packet, SharedAVContext &Context, FFMS_Index &TrackIndices); -- void ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt, int *RepeatPict, int *FrameType, bool *Invisible, enum AVPictureStructure *LastPicStruct); -+ void ParseVideoPacket(SharedAVContext &VideoContext, AVPacket *pkt, int *RepeatPict, int *FrameType, bool *Invisible, enum AVPictureStructure *LastPicStruct); - void Free(); - public: - FFMS_Indexer(const char *Filename); -diff --git a/src/core/utils.cpp b/src/core/utils.cpp -index ce67533..8a2e997 100644 ---- a/src/core/utils.cpp -+++ b/src/core/utils.cpp -@@ -62,12 +62,6 @@ void ClearErrorInfo(FFMS_ErrorInfo *ErrorInfo) { - } - } - --void InitNullPacket(AVPacket &pkt) { -- av_init_packet(&pkt); -- pkt.data = nullptr; -- pkt.size = 0; --} -- - void FillAP(FFMS_AudioProperties &AP, AVCodecContext *CTX, FFMS_Track &Frames) { - AP.SampleFormat = static_cast(av_get_packed_sample_fmt(CTX->sample_fmt)); - AP.BitsPerSample = av_get_bytes_per_sample(CTX->sample_fmt) * 8; -diff --git a/src/core/utils.h b/src/core/utils.h -index 9819dc7..003ab79 100644 ---- a/src/core/utils.h -+++ b/src/core/utils.h -@@ -58,7 +58,6 @@ std::unique_ptr make_unique(Args&&... args) { - } - - void ClearErrorInfo(FFMS_ErrorInfo *ErrorInfo); --void InitNullPacket(AVPacket &pkt); - void FillAP(FFMS_AudioProperties &AP, AVCodecContext *CTX, FFMS_Track &Frames); - - void LAVFOpenFile(const char *SourceFile, AVFormatContext *&FormatContext, int Track); -diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp -index 06bd161..b889970 100644 ---- a/src/core/videosource.cpp -+++ b/src/core/videosource.cpp -@@ -673,30 +673,34 @@ void FFMS_VideoSource::DecodeNextFrame(int64_t &AStartTime, int64_t &Pos) { - if (HasPendingDelayedFrames()) - return; - -- AVPacket Packet; -- InitNullPacket(Packet); -- -- while (ReadFrame(&Packet) >= 0) { -- if (Packet.stream_index != VideoTrack) { -- av_packet_unref(&Packet); -+ AVPacket *Packet = av_packet_alloc(); -+ if (!Packet) -+ throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_ALLOCATION_FAILED, -+ "Could not allocate packet."); -+ -+ while (ReadFrame(Packet) >= 0) { -+ if (Packet->stream_index != VideoTrack) { -+ av_packet_unref(Packet); - continue; - } - - if (AStartTime < 0) -- AStartTime = Frames.UseDTS ? Packet.dts : Packet.pts; -+ AStartTime = Frames.UseDTS ? Packet->dts : Packet->pts; - - if (Pos < 0) -- Pos = Packet.pos; -+ Pos = Packet->pos; - -- bool FrameFinished = DecodePacket(&Packet); -- av_packet_unref(&Packet); -- if (FrameFinished) -+ bool FrameFinished = DecodePacket(Packet); -+ av_packet_unref(Packet); -+ if (FrameFinished) { -+ av_packet_free(&Packet); - return; -+ } - } - - // Flush final frames -- InitNullPacket(Packet); -- DecodePacket(&Packet); -+ DecodePacket(Packet); -+ av_packet_free(&Packet); - } - - bool FFMS_VideoSource::SeekTo(int n, int SeekOffset) { --- -2.40.0 - -From bf9e03e9e08534c024e5a744a6437c4aac160201 Mon Sep 17 00:00:00 2001 -From: Derek Buitenhuis -Date: Tue, 4 May 2021 14:20:47 +0100 -Subject: [PATCH 2/3] configure: Remove deprecated API use - -Signed-off-by: Derek Buitenhuis ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index b35ef80bc..d19714d0f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -102,10 +102,10 @@ CFLAGS="$_CFLAGS $FFMPEG_CFLAGS" - - AC_DEFUN([TEST_FFMPEG], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -- #include -+ #include - #include - ]],[[ -- avcodec_register_all(); -+ avformat_network_init(); - swscale_version(); - ]])], [eval $1=yes], [eval $1=no]) - ]) - diff --git a/srcpkgs/ffms2/template b/srcpkgs/ffms2/template index 42f402ce680151..54f702ab892fdc 100644 --- a/srcpkgs/ffms2/template +++ b/srcpkgs/ffms2/template @@ -1,17 +1,17 @@ # Template file for 'ffms2' pkgname=ffms2 -version=2.40 -revision=2 +version=5.0 +revision=1 build_style=gnu-configure configure_args="--enable-shared --disable-static" hostmakedepends="pkg-config autoconf automake libtool" -makedepends="ffmpeg6-devel zlib-devel" +makedepends="ffmpeg-devel zlib-devel" short_desc="Libav/ffmpeg based frames server" maintainer="Orphaned " license="MIT, GPL-3.0-or-later" homepage="https://github.com/FFMS/ffms2" distfiles="${homepage}/archive/${version}.tar.gz" -checksum=82e95662946f3d6e1b529eadbd72bed196adfbc41368b2d50493efce6e716320 +checksum=7770af0bbc0063f9580a6a5c8e7c51f1788f171d7da0b352e48a1e60943a8c3c pre_configure() { mkdir -p src/config From a796f43ffc55c87ac332fab87d6c040f22123874 Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 1 Dec 2025 12:33:09 -0500 Subject: [PATCH 070/110] libshout-idjc: update to 2.4.6-r2 --- srcpkgs/libshout-idjc/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/libshout-idjc/template b/srcpkgs/libshout-idjc/template index 508f975dd88496..740f5354b6c97c 100644 --- a/srcpkgs/libshout-idjc/template +++ b/srcpkgs/libshout-idjc/template @@ -1,6 +1,6 @@ # Template file for 'libshout-idjc' pkgname=libshout-idjc -version=2.4.6+1 +version=2.4.6+2 revision=1 build_style=gnu-configure hostmakedepends="automake libtool pkg-config" @@ -10,7 +10,7 @@ maintainer="Orphaned " license="LGPL-2.0-or-later" homepage="http://idjc.sourceforge.net" distfiles="${SOURCEFORGE_SITE}/libshoutidjc.idjc.p/${pkgname}-${version//+/-r}.tar.gz" -checksum=7594ffc5e1d435014125d7dffb15a3450bba15d480a413c49aeaa5605050e1a1 +checksum=28f99f6653a4850c840c5ec885ed2afbcd83a28cde1871d5abe19cdee3dcbb32 pre_configure() { autoreconf -fi From 4b1bc6e2a40b98addc3ecf1854642b96aa9d054b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 071/110] idjc: update to 0.9.10 --- srcpkgs/idjc/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/idjc/template b/srcpkgs/idjc/template index e11a1856a759a0..7840a082294fb8 100644 --- a/srcpkgs/idjc/template +++ b/srcpkgs/idjc/template @@ -1,11 +1,11 @@ # Template file for 'idjc' pkgname=idjc -version=0.9.8 -revision=5 +version=0.9.10 +revision=1 build_style=gnu-configure hostmakedepends="pkg-config git python3 automake gettext-devel libtool" makedepends="libvorbis-devel libogg-devel jack-devel libsamplerate-devel - libflac-devel libsndfile-devel mpg123-devel ffmpeg6-devel speex-devel + libflac-devel libsndfile-devel mpg123-devel ffmpeg-devel speex-devel glib-devel pixman-devel lame-devel python3-gobject-devel libshout-idjc-devel opus-devel twolame-devel python3-mutagen python3-devel libebur128-devel" depends="python3-gobject python3-mutagen desktop-file-utils shared-mime-info python3-dbus jack" @@ -14,7 +14,7 @@ maintainer="Orphaned " license="GPL-2.0-or-later" homepage="http://idjc.sourceforge.net" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz" -checksum=e5cc850d55cbe569b005df2df8910ff9dc0f6990cd1b143062e8ac35c275630b +checksum=aadd48058086baf2d95198926a60bf86b2f03fe1fdeb6b7a36cfdb0a5009ac4d pre_configure() { autoreconf -fi From 33ae284a3a0b067a36f67910dc45c9deb6168689 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 072/110] guvcview: update to 2.2.2 --- srcpkgs/guvcview/template | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/srcpkgs/guvcview/template b/srcpkgs/guvcview/template index a9d75922e3573b..8ef5f1184622ec 100644 --- a/srcpkgs/guvcview/template +++ b/srcpkgs/guvcview/template @@ -1,26 +1,24 @@ # Template file for 'guvcview' pkgname=guvcview -version=2.1.0 -revision=2 -build_style=gnu-configure -configure_args="--disable-static --disable-debian-menu" +version=2.2.2 +revision=1 +build_style=cmake +# configure_args="-DUSE_SFML=ON" +# requires 3.0(.2) but everything else in void that uses SFML breaks with 3.0 hostmakedepends="pkg-config intltool autoconf automake libtool glib-devel" -makedepends="eudev-libudev-devel gtk+3-devel SDL2-devel ffmpeg6-devel libusb-devel +makedepends="eudev-libudev-devel gtk+3-devel SDL2-devel ffmpeg-devel libusb-devel pulseaudio-devel v4l-utils-devel portaudio-devel gsl-devel" +# TODO: qt6 - zlice depends="desktop-file-utils" short_desc="Simple GTK interface for capturing and viewing video from UVC devices" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="http://guvcview.sourceforge.net/" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-src-${version}.tar.bz2" -checksum=3d93e4c9fab8d1a7a9bde1a6dbbf04d6cf9d347c134b5128b4586a1d90b63cfb +checksum=6a1b1348b99e79da957a0d9e237395a54757a09db7e0c0809f6c30668b69da3b post_patch() { sed '31a#include ' -i guvcview/guvcview.c # add missing EOL in this file to fix do_check() echo >> po/POTFILES.in } - -pre_configure() { - autoreconf -fi -} From 0424a08a9ef26ebce15bc1f0ef3b85e84d264d4f Mon Sep 17 00:00:00 2001 From: zlice Date: Sat, 20 Dec 2025 11:01:46 -0500 Subject: [PATCH 073/110] mpv: revbump for ffmpeg8 --- srcpkgs/mpv/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template index 332dc78cccc59f..cbd9b60584eb5e 100644 --- a/srcpkgs/mpv/template +++ b/srcpkgs/mpv/template @@ -1,7 +1,7 @@ # Template file for 'mpv' pkgname=mpv version=0.41.0 -revision=3 +revision=4 build_style=meson configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled -Dlibmpv=true -Dcplugins=enabled @@ -21,7 +21,7 @@ configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled $(vopt_feature pipewire pipewire) $(vopt_feature sndio sndio)" hostmakedepends="pkg-config python3-docutils $(vopt_if wayland wayland-devel)" -makedepends="MesaLib-devel ffmpeg6-devel harfbuzz-devel libXv-devel libass-devel +makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel libass-devel libbluray-devel libcdio-paranoia-devel libdvdnav-devel libuuid-devel libva-devel rubberband-devel uchardet-devel libplacebo-devel libarchive-devel libdisplay-info-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if caca libcaca-devel) From a0600ff3453e7d66281f6185d9a4a014ee7c8f3b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 074/110] mpv-mpris: revbump for ffmpeg8 --- srcpkgs/mpv-mpris/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mpv-mpris/template b/srcpkgs/mpv-mpris/template index 13e5bb10e24120..a796f9c1b24921 100644 --- a/srcpkgs/mpv-mpris/template +++ b/srcpkgs/mpv-mpris/template @@ -1,13 +1,13 @@ # Template file for 'mpv-mpris' pkgname=mpv-mpris version=1.2 -revision=1 +revision=2 build_style=gnu-makefile make_use_env=yes make_build_target=mpris.so make_check_target=test hostmakedepends="pkg-config" -makedepends="libglib-devel mpv-devel ffmpeg6-devel" +makedepends="libglib-devel mpv-devel ffmpeg-devel" depends="mpv" checkdepends="mpv playerctl sound-theme-freedesktop xvfb-run xauth jq socat dbus" From 9946bddff1c53192946c4d4f4dd9d8bc056f0818 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 075/110] notcurses: update to 3.0.17 --- srcpkgs/notcurses/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/notcurses/template b/srcpkgs/notcurses/template index 5704c264d66844..b26b9f41f1a724 100644 --- a/srcpkgs/notcurses/template +++ b/srcpkgs/notcurses/template @@ -1,11 +1,11 @@ # Template file for 'notcurses' pkgname=notcurses -version=3.0.9 -revision=3 +version=3.0.17 +revision=1 build_style=cmake configure_args="-DUSE_STATIC=ON -DUSE_QRCODEGEN=On $(vopt_bool man USE_PANDOC)" hostmakedepends="pkg-config $(vopt_if man pandoc)" -makedepends="libunistring-devel ffmpeg6-devel ncurses-libtinfo-devel qrcodegen +makedepends="libunistring-devel ffmpeg-devel ncurses-libtinfo-devel qrcodegen doctest-devel libdeflate-devel" depends="ncurses-base" short_desc="Blingful character graphics/TUI library" @@ -14,7 +14,7 @@ license="Apache-2.0" homepage="https://nick-black.com/dankwiki/index.php/Notcurses" changelog="https://raw.githubusercontent.com/dankamongmen/notcurses/master/NEWS.md" distfiles="https://github.com/dankamongmen/notcurses/archive/v${version}.tar.gz" -checksum=e5cc02aea82814b843cdf34dedd716e6e1e9ca440cf0f899853ca95e241bd734 +checksum=b0fbe824984fe25b5a16770dbd00b85d44db5d09cc35bd881b95335d0db53128 build_options="man" desc_option_man="Use pandoc for manpages" From 28d4fb9a91a67b271789f70c49f36ca1e14f799a Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 076/110] osg: revbump for ffmpeg8 --- srcpkgs/osg/patches/ffmpeg5.patch | 490 ----- srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch | 1770 ++++++++++++++++++ srcpkgs/osg/patches/musl-fileutil.patch | 12 + srcpkgs/osg/template | 4 +- 4 files changed, 1784 insertions(+), 492 deletions(-) delete mode 100644 srcpkgs/osg/patches/ffmpeg5.patch create mode 100644 srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch create mode 100644 srcpkgs/osg/patches/musl-fileutil.patch diff --git a/srcpkgs/osg/patches/ffmpeg5.patch b/srcpkgs/osg/patches/ffmpeg5.patch deleted file mode 100644 index ae46dcd4c467e3..00000000000000 --- a/srcpkgs/osg/patches/ffmpeg5.patch +++ /dev/null @@ -1,490 +0,0 @@ -Index: openscenegraph-3.6.5+dfsg1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp -=================================================================== ---- openscenegraph-3.6.5+dfsg1.orig/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp -+++ openscenegraph-3.6.5+dfsg1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp -@@ -45,12 +45,19 @@ static int decode_audio(AVCodecContext * - if (!frame) - return AVERROR(ENOMEM); - -- ret = avcodec_decode_audio4(avctx, frame, &got_frame, &avpkt); -+ ret = avcodec_send_packet(avctx, &avpkt); -+ if (ret >= 0) { -+ ret = avcodec_receive_frame(avctx, frame); -+ if (ret == 0) { -+ got_frame = 1; -+ } -+ } -+ - - #ifdef USE_AVRESAMPLE // libav's AVFrame structure does not contain a 'channels' field - if (ret >= 0 && got_frame) { - #else -- if (ret >= 0 && got_frame && av_frame_get_channels(frame)>0) { -+ if (ret >= 0 && got_frame && frame->ch_layout.nb_channels>0) { - #endif - int ch, plane_size; - int planar = av_sample_fmt_is_planar(avctx->sample_fmt); -@@ -151,11 +158,13 @@ void FFmpegDecoderAudio::open(AVStream * - return; - - m_stream = stream; -- m_context = stream->codec; -- -- m_in_sample_rate = m_context->sample_rate; -- m_in_nb_channels = m_context->channels; -- m_in_sample_format = m_context->sample_fmt; -+ AVCodecParameters* avp = stream->codecpar; -+ const AVCodec * p_codec = avcodec_find_decoder(avp->codec_id); -+ m_context = avcodec_alloc_context3(p_codec); -+ -+ m_in_sample_rate = avp->sample_rate; -+ m_in_nb_channels = avp->channels; -+ m_in_sample_format = ((AVSampleFormat)(avp->format)); - - AVDictionaryEntry *opt_out_sample_rate = av_dict_get( *parameters->getOptions(), "out_sample_rate", NULL, 0 ); - if ( opt_out_sample_rate ) -@@ -210,11 +219,10 @@ printf("### CONVERTING from sample forma - } - - // Check stream sanity -- if (m_context->codec_id == AV_CODEC_ID_NONE) -+ if (avp->codec_id == AV_CODEC_ID_NONE) - throw std::runtime_error("invalid audio codec");; - - // Find the decoder for the audio stream -- AVCodec * const p_codec = avcodec_find_decoder(m_context->codec_id); - - if (p_codec == 0) - throw std::runtime_error("avcodec_find_decoder() failed"); -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp new/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp ---- old/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2023-11-26 08:09:37.280442193 +1000 -@@ -62,7 +62,7 @@ - { - // Open video file - AVFormatContext * p_format_context = 0; -- AVInputFormat *iformat = 0; -+ const AVInputFormat *iformat = 0; - - if (filename.compare(0, 5, "/dev/")==0) - { -@@ -304,12 +304,11 @@ - else - { - // Make the packet data available beyond av_read_frame() logical scope. -- if ((error = av_dup_packet(&packet)) < 0) { -- OSG_FATAL << "av_dup_packet() returned " << AvStrError(error) << std::endl; -- throw std::runtime_error("av_dup_packet() failed"); -+ if ((error = av_packet_ref(&(m_pending_packet.packet), &packet)) < 0) { -+ OSG_FATAL << "av_packet_ref() returned " << AvStrError(error) << std::endl; -+ throw std::runtime_error("av_packet_ref() failed"); - } -- -- m_pending_packet = FFmpegPacket(packet); -+ m_pending_packet.type = FFmpegPacket::PACKET_DATA; - } - } - -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp new/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp ---- old/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp 2023-11-26 13:07:02.501812075 +1000 -@@ -6,6 +6,9 @@ - #include - #include - -+#include -+ -+ - namespace osgFFmpeg { - - // TODO - add support for using RGB or RGBA pixel format. -@@ -18,8 +21,6 @@ - m_stream(0), - m_context(0), - m_codec(0), -- m_packet_data(0), -- m_bytes_remaining(0), - m_packet_pts(AV_NOPTS_VALUE), - m_writeBuffer(0), - m_user_data(0), -@@ -61,8 +62,12 @@ - - void FFmpegDecoderVideo::open(AVStream * const stream) - { -+ int linesizes[4]; -+ - m_stream = stream; -- m_context = stream->codec; -+ -+ if (avcodec_parameters_to_context(m_context, stream->codecpar) < 0) -+ throw std::runtime_error("avcodec_parameters_to_context() failed inside FFMpegDecoderVideo::open()"); - - // Trust the video size given at this point - // (avcodec_open seems to sometimes return a 0x0 size) -@@ -99,11 +104,15 @@ - - // Allocate converted RGB frame - m_frame_rgba.reset(av_frame_alloc()); -- m_buffer_rgba[0].resize(avpicture_get_size(AV_PIX_FMT_RGB24, width(), height())); -+ m_buffer_rgba[0].resize(av_image_get_buffer_size(AV_PIX_FMT_RGB24, width(), height(), 1)); - m_buffer_rgba[1].resize(m_buffer_rgba[0].size()); - - // Assign appropriate parts of the buffer to image planes in m_frame_rgba -+#if BCS - avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height()); -+#else -+ av_image_fill_arrays(m_frame_rgba.get()->data, linesizes, &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height(), 1); -+#endif - - // Override get_buffer()/release_buffer() from codec context in order to retrieve the PTS of each frame. - m_context->opaque = this; -@@ -148,128 +157,123 @@ - } - - -- --void FFmpegDecoderVideo::decodeLoop() -+double FFmpegDecoderVideo::calculateFramePTS(int64_t packet_dts) - { -- FFmpegPacket packet; -- double pts; -+ double pts = 0; - -- while (! m_exit) -+#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(57,24,102) -+ //ffmpeg-3.0 and below -+ AVRational timebase; -+ // Find out the frame pts -+ if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) - { -- // Work on the current packet until we have decoded all of it -- -- while (m_bytes_remaining > 0) -- { -- // Save global PTS to be stored in m_frame via getBuffer() -+ pts = m_frame->pts; -+ timebase = m_context->time_base; -+ } -+ else if (packet_dts == int64_t(AV_NOPTS_VALUE) && -+ m_frame->opaque != 0 && -+ *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = *reinterpret_cast(m_frame->opaque); -+ timebase = m_stream->time_base; -+ } -+ else if (packet_dts != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = packet_dts; -+ timebase = m_stream->time_base; -+ } -+ else -+ { -+ timebase = m_context->time_base; -+ } - -- m_packet_pts = packet.packet.pts; -+ pts *= av_q2d(timebase); - -- // Decode video frame -+#else -+ //above ffmpeg-3.0 -+ // Find out the frame pts -+ if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = av_q2d(m_stream->time_base) * m_frame->pts; -+ } -+ else if (packet_dts == int64_t(AV_NOPTS_VALUE) && -+ m_frame->opaque != 0 && -+ *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = av_q2d(m_stream->time_base) * *reinterpret_cast(m_frame->opaque); -+ } -+ else if (packet_dts != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = av_q2d(m_stream->time_base) * packet_dts; -+ } -+#endif - -- int frame_finished = 0; -+ return pts; -+} - -- // We want to use the entire packet since some codecs will require extra information for decoding -- const int bytes_decoded = avcodec_decode_video2(m_context, m_frame.get(), &frame_finished, &(packet.packet)); - -- if (bytes_decoded < 0) -- throw std::runtime_error("avcodec_decode_video failed()"); -+void FFmpegDecoderVideo::decodeLoop() -+{ -+ bool need_more_data = true; -+ FFmpegPacket packet; - -- m_bytes_remaining -= bytes_decoded; -- m_packet_data += bytes_decoded; -+ while (! m_exit) -+ { -+ if (need_more_data) -+ { -+ bool is_empty = true; -+ packet = m_packets.timedPop(is_empty, 10); - -- // Publish the frame if we have decoded a complete frame -- if (frame_finished) -+ if (! is_empty) - { --#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(57,24,102) -- //ffmpeg-3.0 and below -- AVRational timebase; -- // Find out the frame pts -- if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) -- { -- pts = m_frame->pts; -- timebase = m_context->time_base; -- } -- else if (packet.packet.dts == int64_t(AV_NOPTS_VALUE) && -- m_frame->opaque != 0 && -- *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) -- { -- pts = *reinterpret_cast(m_frame->opaque); -- timebase = m_stream->time_base; -- } -- else if (packet.packet.dts != int64_t(AV_NOPTS_VALUE)) -- { -- pts = packet.packet.dts; -- timebase = m_stream->time_base; -- } -- else -- { -- pts = 0; -- timebase = m_context->time_base; -- } -- -- pts *= av_q2d(timebase); -+ if (packet.type == FFmpegPacket::PACKET_FLUSH) -+ avcodec_flush_buffers(m_context); - --#else -- //above ffmpeg-3.0 -- // Find out the frame pts -- if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) -- { -- pts = av_q2d(m_stream->time_base) * m_frame->pts; -- } -- else if (packet.packet.dts == int64_t(AV_NOPTS_VALUE) && -- m_frame->opaque != 0 && -- *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) -- { -- pts = av_q2d(m_stream->time_base) * *reinterpret_cast(m_frame->opaque); -- } -- else if (packet.packet.dts != int64_t(AV_NOPTS_VALUE)) -- { -- pts = av_q2d(m_stream->time_base) * packet.packet.dts; -- } -- else -- { -- pts = 0; -- } --#endif -- const double synched_pts = m_clocks.videoSynchClock(m_frame.get(), av_q2d(av_inv_q(m_context->framerate)), pts); -- const double frame_delay = m_clocks.videoRefreshSchedule(synched_pts); -+ // Save global PTS to be stored in m_frame via getBuffer() -+ m_packet_pts = packet.packet.pts; - -- publishFrame(frame_delay, m_clocks.audioDisabled()); -+ if (avcodec_send_packet(m_context, &packet.packet) < 0) -+ throw std::runtime_error("avcodec_send_packet() failed inside FFmpegDecoderVideo::decodeLoop()"); - } -- } -- -- while(m_paused && !m_exit) -- { -- microSleep(10000); -- } -+ } - -- // Get the next packet -+ const int decode_status = avcodec_receive_frame(m_context, m_frame.get()); - -- pts = 0; -+ if (decode_status == 0) -+ { -+ // Completed at least one full frame -+ need_more_data = false; - -- if (packet.valid()) -- packet.clear(); -+ const double pts = calculateFramePTS(m_frame.get()->pkt_dts); -+ const double synched_pts = m_clocks.videoSynchClock(m_frame.get(), av_q2d(av_inv_q(m_context->framerate)), pts); -+ const double frame_delay = m_clocks.videoRefreshSchedule(synched_pts); - -- bool is_empty = true; -- packet = m_packets.timedPop(is_empty, 10); -+ publishFrame(frame_delay, m_clocks.audioDisabled()); -+ } -+ else if (decode_status == AVERROR(EOF)) -+ { -+ // Decoder has reached end of the stream -+ return; -+ } -+ else if (decode_status == AVERROR(EAGAIN)) -+ { -+ // Frame not yet complete -+ need_more_data = true; -+ -+ if (packet.valid()) -+ packet.clear(); -+ } -+ else -+ throw std::runtime_error("avcodec_receive_frame() failed inside FFmpegDecoderVideo::decodeLoop()"); - -- if (! is_empty) -+ while(m_paused && !m_exit) - { -- if (packet.type == FFmpegPacket::PACKET_DATA) -- { -- m_bytes_remaining = packet.packet.size; -- m_packet_data = packet.packet.data; -- } -- else if (packet.type == FFmpegPacket::PACKET_FLUSH) -- { -- avcodec_flush_buffers(m_context); -- } -+ microSleep(10000); - } - } - } - - -- - void FFmpegDecoderVideo::findAspectRatio() - { - float ratio = 0.0f; -@@ -283,7 +287,8 @@ - m_pixel_aspect_ratio = ratio; - } - --int FFmpegDecoderVideo::convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, -+ -+int FFmpegDecoderVideo::convert(AVFrame *dst, int dst_pix_fmt, AVFrame *src, - int src_pix_fmt, int src_width, int src_height) - { - osg::Timer_t startTick = osg::Timer::instance()->tick(); -@@ -318,6 +323,8 @@ - - void FFmpegDecoderVideo::publishFrame(const double delay, bool audio_disabled) - { -+ int linesizes[4]; -+ - // If no publishing function, just ignore the frame - if (m_publish_func == 0) - return; -@@ -334,11 +341,11 @@ - return; - #endif - -- AVPicture * const src = (AVPicture *) m_frame.get(); -- AVPicture * const dst = (AVPicture *) m_frame_rgba.get(); -+ AVFrame * const src = (AVFrame *) m_frame.get(); -+ AVFrame * const dst = (AVFrame *) m_frame_rgba.get(); - - // Assign appropriate parts of the buffer to image planes in m_frame_rgba -- avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height()); -+ av_image_fill_arrays(m_frame_rgba.get()->data, linesizes, &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height(), 1); - - // Convert YUVA420p (i.e. YUV420p plus alpha channel) using our own routine - -@@ -370,7 +377,7 @@ - - - --void FFmpegDecoderVideo::yuva420pToRgba(AVPicture * const dst, AVPicture * const src, int width, int height) -+void FFmpegDecoderVideo::yuva420pToRgba(AVFrame * const dst, AVFrame * const src, int width, int height) - { - convert(dst, AV_PIX_FMT_RGB24, src, m_context->pix_fmt, width, height); - -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp new/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp ---- old/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp 2023-11-26 09:34:00.040263426 +1000 -@@ -87,10 +87,11 @@ - void decodeLoop(); - void findAspectRatio(); - void publishFrame(double delay, bool audio_disabled); -+ double calculateFramePTS(int64_t packet_dts); - double synchronizeVideo(double pts); -- void yuva420pToRgba(AVPicture *dst, AVPicture *src, int width, int height); -+ void yuva420pToRgba(AVFrame *dst, AVFrame *src, int width, int height); - -- int convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, -+ int convert(AVFrame *dst, int dst_pix_fmt, AVFrame *src, - int src_pix_fmt, int src_width, int src_height); - - -@@ -101,9 +102,7 @@ - FFmpegClocks & m_clocks; - AVStream * m_stream; - AVCodecContext * m_context; -- AVCodec * m_codec; -- const uint8_t * m_packet_data; -- int m_bytes_remaining; -+ const AVCodec * m_codec; - int64_t m_packet_pts; - - FramePtr m_frame; -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegPacket.hpp new/src/osgPlugins/ffmpeg/FFmpegPacket.hpp ---- old/src/osgPlugins/ffmpeg/FFmpegPacket.hpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegPacket.hpp 2023-11-26 07:20:03.739547190 +1000 -@@ -42,7 +42,7 @@ - void clear() - { - if (packet.data != 0) -- av_free_packet(&packet); -+ av_packet_unref(&packet); - - release(); - } -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegParameters.hpp new/src/osgPlugins/ffmpeg/FFmpegParameters.hpp ---- old/src/osgPlugins/ffmpeg/FFmpegParameters.hpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegParameters.hpp 2023-11-26 13:09:25.198807036 +1000 -@@ -20,7 +20,7 @@ - - bool isFormatAvailable() const { return m_format!=NULL; } - -- AVInputFormat* getFormat() { return m_format; } -+ const AVInputFormat* getFormat() { return m_format; } - AVDictionary** getOptions() { return &m_options; } - void setContext(AVIOContext* context) { m_context = context; } - AVIOContext* getContext() { return m_context; } -@@ -29,7 +29,7 @@ - - protected: - -- AVInputFormat* m_format; -+ const AVInputFormat* m_format; - AVIOContext* m_context; - AVDictionary* m_options; - }; -diff -Naur old/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp new/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp ---- old/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp 2023-11-26 13:25:22.060773249 +1000 -@@ -20,7 +20,7 @@ - #include - - --#if LIBAVCODEC_VERSION_MAJOR >= 53 || \ -+#if (LIBAVCODEC_VERSION_MAJOR>=53 && LIBAVCODEC_VERSION_MAJOR<=58) || \ - (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR>=30) || \ - (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR==20 && LIBAVCODEC_VERSION_MICRO >= 1) - #define USE_AV_LOCK_MANAGER -@@ -117,8 +117,11 @@ - // enable thread locking - av_lockmgr_register(&lockMgr); - #endif -- // Register all FFmpeg formats/codecs -+ -+#if LIBAVCODEC_VERSION_MAJOR<=57 -+ // Register all FFmpeg formats/codecs--- not required in FFmpeg 4.0 and later - av_register_all(); -+#endif - - avformat_network_init(); - } diff --git a/srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch b/srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch new file mode 100644 index 00000000000000..1f10ddb530e77a --- /dev/null +++ b/srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch @@ -0,0 +1,1770 @@ +From 26f6c9b5a63715dde3c9f85c8faf035d3ec0f657 Mon Sep 17 00:00:00 2001 +From: Pei Jia +Date: Tue, 18 Jun 2024 14:18:44 -0700 +Subject: [PATCH] Compatible with FFmpeg-7.0.1 + +--- + .../OpenCASCADE/ReaderWriterOpenCASCADE.cpp | 2 +- + src/osgPlugins/ffmpeg/FFmpegDecoder.cpp | 78 ++---- + src/osgPlugins/ffmpeg/FFmpegDecoder.hpp | 159 +++++------ + src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp | 256 +++++++++--------- + src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp | 71 +++-- + src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp | 223 +++++---------- + src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp | 19 +- + src/osgPlugins/ffmpeg/FFmpegPacket.hpp | 2 +- + src/osgPlugins/ffmpeg/FFmpegParameters.cpp | 8 +- + src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp | 61 +---- + 10 files changed, 352 insertions(+), 527 deletions(-) + +diff --git a/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp b/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp +index 91a14220016..a43ca5d511e 100644 +--- a/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp ++++ b/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp +@@ -211,7 +211,7 @@ osg::ref_ptr ReaderWritterOpenCASCADE::OCCTKReader::_createGeomet + { + // populate vertex list + // Ref: http://www.opencascade.org/org/forum/thread_16694/?forum=3 +- gp_Pnt pt = (triangulation->Nodes())(j).Transformed(transformation * location.Transformation()); ++ gp_Pnt pt = (triangulation->Node(j)).Transformed(transformation * location.Transformation()); + vertexList->push_back(osg::Vec3(pt.X(), pt.Y(), pt.Z())); + + // populate color list +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp +index 4de143d2279..4ce84ca733d 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp +@@ -1,4 +1,3 @@ +- + #include "FFmpegDecoder.hpp" + #include "FFmpegParameters.hpp" + +@@ -36,8 +35,10 @@ static std::string AvStrError(int errnum) + } + + FFmpegDecoder::FFmpegDecoder() : +- m_audio_stream(0), +- m_video_stream(0), ++ m_audio_stream(nullptr), ++ m_video_stream(nullptr), ++ m_audio_index(-1), ++ m_video_index(-1), + m_audio_queue(100), + m_video_queue(100), + m_audio_decoder(m_audio_queue, m_clocks), +@@ -61,10 +62,10 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + try + { + // Open video file +- AVFormatContext * p_format_context = 0; +- AVInputFormat *iformat = 0; ++ AVFormatContext * p_format_context = nullptr; ++ AVInputFormat *iformat = nullptr; + +- if (filename.compare(0, 5, "/dev/")==0) ++ if (filename.compare(0, 5, "/dev/") == 0) + { + #ifdef ANDROID + throw std::runtime_error("Device not supported on Android"); +@@ -78,24 +79,24 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + } + + std::string format = "video4linux2"; +- iformat = av_find_input_format(format.c_str()); ++ iformat = const_cast(av_find_input_format(format.c_str())); + + if (iformat) + { +- OSG_INFO<<"Found input format: "<getFormat() : 0; +- AVIOContext* context = parameters ? parameters->getContext() : 0; +- if (context != NULL) ++ iformat = parameters ? const_cast(parameters->getFormat()) : nullptr; ++ AVIOContext* context = parameters ? parameters->getContext() : nullptr; ++ if (context != nullptr) + { + p_format_context = avformat_alloc_context(); + p_format_context->pb = context; +@@ -105,22 +106,7 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + int error = avformat_open_input(&p_format_context, filename.c_str(), iformat, parameters->getOptions()); + if (error != 0) + { +- std::string error_str; +- switch (error) +- { +- //case AVERROR_UNKNOWN: error_str = "AVERROR_UNKNOWN"; break; // same value as AVERROR_INVALIDDATA +- case AVERROR_IO: error_str = "AVERROR_IO"; break; +- case AVERROR_NUMEXPECTED: error_str = "AVERROR_NUMEXPECTED"; break; +- case AVERROR_INVALIDDATA: error_str = "AVERROR_INVALIDDATA"; break; +- case AVERROR_NOMEM: error_str = "AVERROR_NOMEM"; break; +- case AVERROR_NOFMT: error_str = "AVERROR_NOFMT"; break; +- case AVERROR_NOTSUPP: error_str = "AVERROR_NOTSUPP"; break; +- case AVERROR_NOENT: error_str = "AVERROR_NOENT"; break; +- case AVERROR_PATCHWELCOME: error_str = "AVERROR_PATCHWELCOME"; break; +- default: error_str = "Unknown error"; break; +- } +- +- throw std::runtime_error("av_open_input_file() failed : " + error_str); ++ throw std::runtime_error("avformat_open_input() failed: " + AvStrError(error)); + } + + m_format_context.reset(p_format_context); +@@ -128,15 +114,15 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + // Retrieve stream info + // Only buffer up to one and a half seconds by default + float max_analyze_duration = 1.5; +- AVDictionaryEntry *mad = av_dict_get( *parameters->getOptions(), "mad", NULL, 0 ); +- if ( mad ) { ++ AVDictionaryEntry *mad = av_dict_get(*parameters->getOptions(), "mad", NULL, 0); ++ if (mad) { + max_analyze_duration = atof(mad->value); + } + p_format_context->max_analyze_duration = AV_TIME_BASE * max_analyze_duration; + // p_format_context->probesize = 100000; + + if (avformat_find_stream_info(p_format_context, NULL) < 0) +- throw std::runtime_error("av_find_stream_info() failed"); ++ throw std::runtime_error("avformat_find_stream_info() failed"); + + m_duration = double(m_format_context->duration) / AV_TIME_BASE; + if (m_format_context->start_time != static_cast(AV_NOPTS_VALUE)) +@@ -159,7 +145,7 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + m_audio_stream = m_format_context->streams[m_audio_index]; + else + { +- m_audio_stream = 0; ++ m_audio_stream = nullptr; + m_audio_index = std::numeric_limits::max(); + } + +@@ -271,7 +257,7 @@ bool FFmpegDecoder::readNextPacketNormal() + { + AVPacket packet; + +- if (! m_pending_packet) ++ if (!m_pending_packet) + { + bool end_of_stream = false; + +@@ -279,10 +265,10 @@ bool FFmpegDecoder::readNextPacketNormal() + int error = av_read_frame(m_format_context.get(), &packet); + if (error < 0) + { +- if (error == static_cast(AVERROR_EOF) || +- m_format_context.get()->pb->eof_reached) ++ if (error == static_cast(AVERROR_EOF) || m_format_context.get()->pb->eof_reached) + end_of_stream = true; +- else { ++ else ++ { + OSG_FATAL << "av_read_frame() returned " << AvStrError(error) << std::endl; + throw std::runtime_error("av_read_frame() failed"); + } +@@ -303,12 +289,6 @@ bool FFmpegDecoder::readNextPacketNormal() + } + else + { +- // Make the packet data available beyond av_read_frame() logical scope. +- if ((error = av_dup_packet(&packet)) < 0) { +- OSG_FATAL << "av_dup_packet() returned " << AvStrError(error) << std::endl; +- throw std::runtime_error("av_dup_packet() failed"); +- } +- + m_pending_packet = FFmpegPacket(packet); + } + } +@@ -340,8 +320,6 @@ bool FFmpegDecoder::readNextPacketNormal() + return false; + } + +- +- + bool FFmpegDecoder::readNextPacketEndOfStream() + { + const FFmpegPacket packet(FFmpegPacket::PACKET_END_OF_STREAM); +@@ -352,8 +330,6 @@ bool FFmpegDecoder::readNextPacketEndOfStream() + return false; + } + +- +- + bool FFmpegDecoder::readNextPacketRewinding() + { + const FFmpegPacket packet(FFmpegPacket::PACKET_FLUSH); +@@ -364,8 +340,6 @@ bool FFmpegDecoder::readNextPacketRewinding() + return false; + } + +- +- + void FFmpegDecoder::rewindButDontFlushQueues() + { + const AVRational AvTimeBaseQ = { 1, AV_TIME_BASE }; // = AV_TIME_BASE_Q +@@ -374,7 +348,8 @@ void FFmpegDecoder::rewindButDontFlushQueues() + const int64_t seek_target = av_rescale_q(pos, AvTimeBaseQ, m_video_stream->time_base); + + int error = 0; +- if ((error = av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0/*AVSEEK_FLAG_BYTE |*/ /*AVSEEK_FLAG_BACKWARD*/)) < 0) { ++ if ((error = av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0)) < 0) ++ { + OSG_FATAL << "av_seek_frame returned " << AvStrError(error) << std::endl; + throw std::runtime_error("av_seek_frame failed()"); + } +@@ -397,13 +372,14 @@ void FFmpegDecoder::seekButDontFlushQueues(double time) + { + const AVRational AvTimeBaseQ = { 1, AV_TIME_BASE }; // = AV_TIME_BASE_Q + +- const int64_t pos = int64_t(m_clocks.getStartTime()+time * double(AV_TIME_BASE)); ++ const int64_t pos = int64_t(m_clocks.getStartTime() + time * double(AV_TIME_BASE)); + const int64_t seek_target = av_rescale_q(pos, AvTimeBaseQ, m_video_stream->time_base); + + m_clocks.setSeekTime(time); + + int error = 0; +- if ((error = av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0/*AVSEEK_FLAG_BYTE |*/ /*AVSEEK_FLAG_BACKWARD*/)) < 0) { ++ if ((error = av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0)) < 0) ++ { + OSG_FATAL << "av_seek_frame() returned " << AvStrError(error) << std::endl; + throw std::runtime_error("av_seek_frame failed()"); + } +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoder.hpp b/src/osgPlugins/ffmpeg/FFmpegDecoder.hpp +index 95d638f25d8..e79323fed36 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoder.hpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoder.hpp +@@ -1,4 +1,3 @@ +- + #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_H + #define HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_H + +@@ -7,73 +6,76 @@ + + #include + +- + namespace osgFFmpeg { + + class FFmpegParameters; + + class FormatContextPtr + { +- public: +- +- typedef AVFormatContext T; +- +- explicit FormatContextPtr() : _ptr(0) {} +- explicit FormatContextPtr(T* ptr) : _ptr(ptr) {} +- +- ~FormatContextPtr() +- { +- cleanup(); +- } +- +- T* get() { return _ptr; } ++public: ++ typedef AVFormatContext T; + +- operator bool() const { return _ptr != 0; } ++ explicit FormatContextPtr() : _ptr(nullptr) {} ++ explicit FormatContextPtr(T* ptr) : _ptr(ptr) {} + +- T * operator-> () const // never throws +- { +- return _ptr; +- } ++ ~FormatContextPtr() ++ { ++ cleanup(); ++ } + +- void reset(T* ptr) +- { +- if (ptr==_ptr) return; +- cleanup(); +- _ptr = ptr; +- } ++ T* get() const { return _ptr; } ++ T** getPtr() { return &_ptr; } + +- void cleanup() ++ operator T*() const { return _ptr; } ++ ++ FormatContextPtr& operator=(T* ptr) ++ { ++ reset(ptr); ++ return *this; ++ } ++ ++ bool operator==(std::nullptr_t) const { return _ptr == nullptr; } ++ bool operator!=(std::nullptr_t) const { return _ptr != nullptr; } ++ ++ T* operator->() const // never throws ++ { ++ return _ptr; ++ } ++ ++ void reset(T* ptr) ++ { ++ if (ptr == _ptr) return; ++ cleanup(); ++ _ptr = ptr; ++ } ++ ++ void cleanup() ++ { ++ if (_ptr) + { +- if (_ptr) +- { + #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 17, 0) +- OSG_NOTICE<<"Calling avformat_close_input("<<&_ptr<<")"<start_time; +- else return HUGE_VAL; ++ if (m_format_context) return m_format_context->start_time; ++ else return HUGE_VAL; + } + + inline double FFmpegDecoder::duration() const +@@ -165,37 +161,30 @@ inline double FFmpegDecoder::duration() const + + inline double FFmpegDecoder::reference() + { +- return m_clocks.getCurrentTime(); ++ return m_clocks.getCurrentTime(); + } + +- +-inline FFmpegDecoderAudio & FFmpegDecoder::audio_decoder() ++inline FFmpegDecoderAudio& FFmpegDecoder::audio_decoder() + { + return m_audio_decoder; + } + +- +-inline FFmpegDecoderVideo & FFmpegDecoder::video_decoder() ++inline FFmpegDecoderVideo& FFmpegDecoder::video_decoder() + { + return m_video_decoder; + } + +- +-inline FFmpegDecoderAudio const & FFmpegDecoder::audio_decoder() const ++inline FFmpegDecoderAudio const& FFmpegDecoder::audio_decoder() const + { + return m_audio_decoder; + } + +- +-inline FFmpegDecoderVideo const & FFmpegDecoder::video_decoder() const ++inline FFmpegDecoderVideo const& FFmpegDecoder::video_decoder() const + { + return m_video_decoder; + } + +- +- + } // namespace osgFFmpeg + +- +- + #endif // HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_H ++ +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp +index 636bddd2546..5cfdb231ca7 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp +@@ -1,39 +1,24 @@ + #include "FFmpegDecoderAudio.hpp" +- + #include +- + #include +-#include +- +-//DEBUG +-//#include +- ++#include ++#include ++#include + + #ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE + #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 + #endif + +-#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1) +-#define av_frame_alloc avcodec_alloc_frame +-#define av_frame_free avcodec_free_frame +-#endif +- +-#if LIBAVCODEC_VERSION_MAJOR < 56 +- #define AV_CODEC_ID_NONE CODEC_ID_NONE +-#endif +- + namespace osgFFmpeg { + + static int decode_audio(AVCodecContext *avctx, int16_t *samples, +- int *frame_size_ptr, +- const uint8_t *buf, int buf_size, +- SwrContext *swr_context, +- int out_sample_rate, +- int out_nb_channels, +- AVSampleFormat out_sample_format) ++ int *frame_size_ptr, ++ const uint8_t *buf, int buf_size, ++ SwrContext *swr_context, ++ int out_sample_rate, ++ int out_nb_channels, ++ AVSampleFormat out_sample_format) + { +-#if LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR>=32) +- + AVPacket avpkt; + av_init_packet(&avpkt); + avpkt.data = const_cast(buf); +@@ -45,30 +30,39 @@ static int decode_audio(AVCodecContext *avctx, int16_t *samples, + if (!frame) + return AVERROR(ENOMEM); + +- ret = avcodec_decode_audio4(avctx, frame, &got_frame, &avpkt); ++ // Send the packet to the decoder ++ ret = avcodec_send_packet(avctx, &avpkt); ++ if (ret < 0) { ++ av_frame_free(&frame); ++ return ret; ++ } + +-#ifdef USE_AVRESAMPLE // libav's AVFrame structure does not contain a 'channels' field +- if (ret >= 0 && got_frame) { +-#else +- if (ret >= 0 && got_frame && av_frame_get_channels(frame)>0) { +-#endif ++ // Receive the frame from the decoder ++ ret = avcodec_receive_frame(avctx, frame); ++ if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) { ++ av_frame_free(&frame); ++ return 0; ++ } else if (ret < 0) { ++ av_frame_free(&frame); ++ return ret; ++ } else { ++ got_frame = 1; ++ } ++ ++ if (ret >= 0 && got_frame && frame->ch_layout.nb_channels > 0) { + int ch, plane_size; + int planar = av_sample_fmt_is_planar(avctx->sample_fmt); + + int out_samples; + // if sample rate changes, number of samples is different +- if ( out_sample_rate != avctx->sample_rate ) { +-// out_samples = av_rescale_rnd(swr_get_delay(swr_context, avctx->sample_rate) + +-// frame->nb_samples, out_sample_rate, avctx->sample_rate, AV_ROUND_UP); ++ if (out_sample_rate != avctx->sample_rate) { + out_samples = av_rescale_rnd(frame->nb_samples, out_sample_rate, avctx->sample_rate, AV_ROUND_UP); +- } +- else { ++ } else { + out_samples = frame->nb_samples; + } + + int output_data_size = av_samples_get_buffer_size(&plane_size, out_nb_channels, +- out_samples, +- out_sample_format, 1); ++ out_samples, out_sample_format, 1); + + if (*frame_size_ptr < output_data_size) { + av_log(avctx, AV_LOG_ERROR, "output buffer size is too small for " +@@ -78,23 +72,19 @@ static int decode_audio(AVCodecContext *avctx, int16_t *samples, + } + + // if resampling is needed, call swr_convert +- if ( swr_context != NULL ) { +- ++ if (swr_context != nullptr) { + out_samples = swr_convert(swr_context, (uint8_t **)&samples, out_samples, +- (const uint8_t **)frame->extended_data, frame->nb_samples); ++ (const uint8_t **)frame->extended_data, frame->nb_samples); + + // recompute output_data_size following swr_convert result (number of samples actually converted) + output_data_size = av_samples_get_buffer_size(&plane_size, out_nb_channels, +- out_samples, +- out_sample_format, 1); +- } +- else { +- ++ out_samples, out_sample_format, 1); ++ } else { + memcpy(samples, frame->extended_data[0], plane_size); + +- if (planar && avctx->channels > 1) { ++ if (planar && frame->ch_layout.nb_channels > 1) { + uint8_t *out = ((uint8_t *)samples) + plane_size; +- for (ch = 1; ch < avctx->channels; ch++) { ++ for (ch = 1; ch < frame->ch_layout.nb_channels; ch++) { + memcpy(out, frame->extended_data[ch], plane_size); + out += plane_size; + } +@@ -102,26 +92,21 @@ static int decode_audio(AVCodecContext *avctx, int16_t *samples, + } + + *frame_size_ptr = output_data_size; +- + } else { + *frame_size_ptr = 0; + } ++ + av_frame_free(&frame); + return ret; +- +-#else +- // fallback for older versions of ffmpeg that don't have avcodec_decode_audio3. +- return avcodec_decode_audio2(avctx, samples, frame_size_ptr, buf, buf_size); +-#endif + } + + +-FFmpegDecoderAudio::FFmpegDecoderAudio(PacketQueue & packets, FFmpegClocks & clocks) : ++FFmpegDecoderAudio::FFmpegDecoderAudio(PacketQueue &packets, FFmpegClocks &clocks) : + m_packets(packets), + m_clocks(clocks), +- m_stream(0), +- m_context(0), +- m_packet_data(0), ++ m_stream(nullptr), ++ m_context(nullptr), ++ m_packet_data(nullptr), + m_bytes_remaining(0), + m_audio_buffer((AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2), + m_audio_buf_size(0), +@@ -129,7 +114,7 @@ FFmpegDecoderAudio::FFmpegDecoderAudio(PacketQueue & packets, FFmpegClocks & clo + m_end_of_stream(false), + m_paused(true), + m_exit(false), +- m_swr_context(NULL) ++ m_swr_context(nullptr) + { + } + +@@ -137,103 +122,95 @@ FFmpegDecoderAudio::FFmpegDecoderAudio(PacketQueue & packets, FFmpegClocks & clo + + FFmpegDecoderAudio::~FFmpegDecoderAudio() + { +- this->close(true); ++ close(true); + } + + + +-void FFmpegDecoderAudio::open(AVStream * const stream, FFmpegParameters* parameters) ++void FFmpegDecoderAudio::open(AVStream *stream, FFmpegParameters* parameters) + { + try + { + // Sound can be optional (i.e. no audio stream is present) +- if (stream == 0) ++ if (stream == nullptr) + return; + + m_stream = stream; +- m_context = stream->codec; ++ m_context = avcodec_alloc_context3(nullptr); ++ avcodec_parameters_to_context(m_context, stream->codecpar); + + m_in_sample_rate = m_context->sample_rate; +- m_in_nb_channels = m_context->channels; ++ m_in_nb_channels = m_context->ch_layout.nb_channels; + m_in_sample_format = m_context->sample_fmt; + +- AVDictionaryEntry *opt_out_sample_rate = av_dict_get( *parameters->getOptions(), "out_sample_rate", NULL, 0 ); +- if ( opt_out_sample_rate ) ++ AVDictionaryEntry *opt_out_sample_rate = av_dict_get(*parameters->getOptions(), "out_sample_rate", nullptr, 0); ++ if (opt_out_sample_rate) + m_out_sample_rate = atoi(opt_out_sample_rate->value); + else + m_out_sample_rate = m_in_sample_rate; + +- AVDictionaryEntry *opt_out_sample_format = av_dict_get( *parameters->getOptions(), "out_sample_format", NULL, 0 ); +- if ( opt_out_sample_format ) ++ AVDictionaryEntry *opt_out_sample_format = av_dict_get(*parameters->getOptions(), "out_sample_format", nullptr, 0); ++ if (opt_out_sample_format) + m_out_sample_format = (AVSampleFormat) atoi(opt_out_sample_format->value); + else + // always packed, planar formats are evil! +- m_out_sample_format = av_get_packed_sample_fmt( m_in_sample_format ); ++ m_out_sample_format = av_get_packed_sample_fmt(m_in_sample_format); + +- AVDictionaryEntry *opt_out_nb_channels = av_dict_get( *parameters->getOptions(), "out_nb_channels", NULL, 0 ); +- if ( opt_out_nb_channels ) ++ AVDictionaryEntry *opt_out_nb_channels = av_dict_get(*parameters->getOptions(), "out_nb_channels", nullptr, 0); ++ if (opt_out_nb_channels) + m_out_nb_channels = atoi(opt_out_nb_channels->value); + else + m_out_nb_channels = m_in_nb_channels; + +- if ( m_in_sample_rate != m_out_sample_rate ++ if (m_in_sample_rate != m_out_sample_rate + || m_in_nb_channels != m_out_nb_channels +- || m_in_sample_format != m_out_sample_format ) ++ || m_in_sample_format != m_out_sample_format) + { +-#if 0 +-printf("### CONVERTING from sample format %s TO %s\n\t\tFROM %d TO %d channels\n\t\tFROM %d Hz to %d Hz\n", +- av_get_sample_fmt_name(m_in_sample_format), +- av_get_sample_fmt_name(m_out_sample_format), +- m_in_nb_channels, +- m_out_nb_channels, +- m_in_sample_rate, +- m_out_sample_rate); +-#endif +- m_swr_context = swr_alloc_set_opts(NULL, +- av_get_default_channel_layout(m_out_nb_channels), +- m_out_sample_format, +- m_out_sample_rate, +- av_get_default_channel_layout(m_in_nb_channels), +- m_in_sample_format, +- m_in_sample_rate, +- 0, NULL ); ++ AVChannelLayout in_ch_layout; ++ AVChannelLayout out_ch_layout; ++ av_channel_layout_default(&in_ch_layout, m_in_nb_channels); ++ av_channel_layout_default(&out_ch_layout, m_out_nb_channels); ++ ++ m_swr_context = swr_alloc(); ++ if (!m_swr_context) { ++ throw std::runtime_error("Could not allocate resampler context"); ++ } + +- int err = swr_init(m_swr_context); ++ av_opt_set_int(m_swr_context, "in_channel_count", in_ch_layout.nb_channels, 0); ++ av_opt_set_int(m_swr_context, "in_sample_rate", m_in_sample_rate, 0); ++ av_opt_set_sample_fmt(m_swr_context, "in_sample_fmt", m_in_sample_format, 0); ++ av_opt_set_chlayout(m_swr_context, "in_chlayout", &in_ch_layout, 0); ++ ++ av_opt_set_int(m_swr_context, "out_channel_count", out_ch_layout.nb_channels, 0); ++ av_opt_set_int(m_swr_context, "out_sample_rate", m_out_sample_rate, 0); ++ av_opt_set_sample_fmt(m_swr_context, "out_sample_fmt", m_out_sample_format, 0); ++ av_opt_set_chlayout(m_swr_context, "out_chlayout", &out_ch_layout, 0); + +- if ( err ) { ++ int err = swr_init(m_swr_context); ++ if (err < 0) { + char error_string[512]; +- av_strerror(err, error_string, 512); ++ av_strerror(err, error_string, sizeof(error_string)); + OSG_WARN << "FFmpegDecoderAudio - WARNING: Error initializing resampling context : " << error_string << std::endl; + swr_free(&m_swr_context); +- throw std::runtime_error("swr_init() failed");; ++ throw std::runtime_error("swr_init() failed"); + } + } + +- // Check stream sanity + if (m_context->codec_id == AV_CODEC_ID_NONE) +- throw std::runtime_error("invalid audio codec");; ++ throw std::runtime_error("invalid audio codec"); + +- // Find the decoder for the audio stream +- AVCodec * const p_codec = avcodec_find_decoder(m_context->codec_id); ++ const AVCodec *p_codec = avcodec_find_decoder(m_context->codec_id); + +- if (p_codec == 0) ++ if (p_codec == nullptr) + throw std::runtime_error("avcodec_find_decoder() failed"); + +- // Inform the codec that we can handle truncated bitstreams +- //if (p_codec->capabilities & CODEC_CAP_TRUNCATED) +- // m_context->flags |= CODEC_FLAG_TRUNCATED; +- +- // Open codec +- if (avcodec_open2(m_context, p_codec, NULL) < 0) ++ if (avcodec_open2(m_context, p_codec, nullptr) < 0) + throw std::runtime_error("avcodec_open() failed"); + +- m_context->get_buffer2 = avcodec_default_get_buffer2; +- + } +- + catch (...) + { +- m_context = 0; ++ avcodec_free_context(&m_context); + throw; + } + } +@@ -260,6 +237,10 @@ void FFmpegDecoderAudio::close(bool waitForThreadToExit) + join(); + } + swr_free(&m_swr_context); ++ if (m_context) ++ { ++ avcodec_free_context(&m_context); ++ } + } + + void FFmpegDecoderAudio::setVolume(float volume) +@@ -286,7 +267,7 @@ void FFmpegDecoderAudio::run() + decodeLoop(); + } + +- catch (const std::exception & error) ++ catch (const std::exception &error) + { + OSG_WARN << "FFmpegDecoderAudio::run : " << error.what() << std::endl; + } +@@ -301,15 +282,15 @@ void FFmpegDecoderAudio::run() + void FFmpegDecoderAudio::setAudioSink(osg::ref_ptr audio_sink) + { + // The FFmpegDecoderAudio object takes the responsibility of destroying the audio_sink. +- OSG_NOTICE<<"Assigning "<(buffer); ++ uint8_t *dst_buffer = reinterpret_cast(buffer); + + while (size != 0) + { +@@ -349,9 +330,9 @@ void FFmpegDecoderAudio::fillBuffer(void * const buffer, size_t size) + + void FFmpegDecoderAudio::decodeLoop() + { +- const bool skip_audio = ! validContext() || ! m_audio_sink.valid(); ++ const bool skip_audio = !validContext() || !m_audio_sink.valid(); + +- if (! skip_audio && ! m_audio_sink->playing()) ++ if (!skip_audio && !m_audio_sink->playing()) + { + m_clocks.audioSetDelay(m_audio_sink->getDelay()); + m_audio_sink->play(); +@@ -361,17 +342,17 @@ void FFmpegDecoderAudio::decodeLoop() + m_clocks.audioDisable(); + } + +- while (! m_exit) ++ while (!m_exit) + { + +- if(m_paused) ++ if (m_paused) + { + m_clocks.pause(true); + m_pause_timer.setStartTick(); + +- while(m_paused && !m_exit) ++ while (m_paused && !m_exit) + { +- microSleep(10000); ++ OpenThreads::Thread::microSleep(10000); + } + + m_clocks.setPauseTime(m_pause_timer.time_s()); +@@ -387,12 +368,30 @@ void FFmpegDecoderAudio::decodeLoop() + if (packet.valid()) + packet.clear(); + } +- // Else, just idle in this thread. +- // Note: If m_audio_sink has an audio callback, this thread will still be awaken +- // from time to time to refill the audio buffer. + else + { +- OpenThreads::Thread::microSleep(10000); ++ uint8_t audio_buffer[AVCODEC_MAX_AUDIO_FRAME_SIZE * 3 / 2]; ++ size_t audio_data_size = decodeFrame(audio_buffer, sizeof(audio_buffer)); ++ ++ if (audio_data_size > 0) ++ { ++ // Handle the decoded audio data here. ++ // Since the AudioSink class does not have a specific method for handling raw buffers, ++ // we'll assume you have another method or need to implement this part accordingly. ++ ++ // This part needs to match the actual implementation or subclass method ++ // If you have an actual derived class with specific methods, you should call them here. ++ // For example, if there's a method to write raw audio data, use it. ++ ++ // Placeholder for actual implementation ++ // Assuming m_audio_sink->writeAudioData(audio_buffer, audio_data_size); ++ ++ // OpenThreads::Thread::microSleep(10000); // Uncomment if you want to add a delay ++ } ++ else ++ { ++ OpenThreads::Thread::microSleep(10000); ++ } + } + } + } +@@ -433,7 +432,7 @@ void FFmpegDecoderAudio::adjustBufferEndPts(const size_t buffer_size) + + + +-size_t FFmpegDecoderAudio::decodeFrame(void * const buffer, const size_t size) ++size_t FFmpegDecoderAudio::decodeFrame(void *buffer, const size_t size) + { + for (;;) + { +@@ -443,7 +442,7 @@ size_t FFmpegDecoderAudio::decodeFrame(void * const buffer, const size_t size) + { + int data_size = size; + +- const int bytes_decoded = decode_audio(m_context, reinterpret_cast(buffer), &data_size, m_packet_data, m_bytes_remaining, m_swr_context, m_out_sample_rate, m_out_nb_channels, m_out_sample_format); ++ const int bytes_decoded = decode_audio(m_context, reinterpret_cast(buffer), &data_size, m_packet_data, m_bytes_remaining, m_swr_context, m_out_sample_rate, m_out_nb_channels, m_out_sample_format); + + if (bytes_decoded < 0) + { +@@ -503,10 +502,6 @@ size_t FFmpegDecoderAudio::decodeFrame(void * const buffer, const size_t size) + } + } + +- +-/** +- * +- */ + osg::AudioStream::SampleFormat FFmpegDecoderAudio::sampleFormat() const + { + switch (m_out_sample_format) +@@ -515,19 +510,14 @@ osg::AudioStream::SampleFormat FFmpegDecoderAudio::sampleFormat() const + throw std::runtime_error("invalid audio format AV_SAMPLE_FMT_NONE"); + case AV_SAMPLE_FMT_U8: + return osg::AudioStream::SAMPLE_FORMAT_U8; +- break; + case AV_SAMPLE_FMT_S16: + return osg::AudioStream::SAMPLE_FORMAT_S16; +- break; + case AV_SAMPLE_FMT_S32: + return osg::AudioStream::SAMPLE_FORMAT_S32; +- break; + case AV_SAMPLE_FMT_FLT: + return osg::AudioStream::SAMPLE_FORMAT_F32; +- break; + case AV_SAMPLE_FMT_DBL: + throw std::runtime_error("unhandled audio format AV_SAMPLE_FMT_DBL"); +- + default: + throw std::runtime_error("unknown audio format"); + } +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp +index 9f1b968ccbd..67c6a1ec1c0 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp +@@ -1,20 +1,19 @@ +- + #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_AUDIO_H + #define HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_AUDIO_H + +-#include ++extern "C" { ++#include ++#include ++} + ++#include + #include +- ++#include + #include "FFmpegClocks.hpp" + #include "FFmpegPacket.hpp" + #include "FFmpegParameters.hpp" +- +-#include +- + #include "BoundedMessageQueue.hpp" + +- + namespace osgFFmpeg { + + +@@ -24,12 +23,12 @@ class FFmpegDecoderAudio : public OpenThreads::Thread + public: + + typedef BoundedMessageQueue PacketQueue; +- typedef void (* PublishFunc) (const FFmpegDecoderAudio & decoder, void * user_data); ++ typedef void (*PublishFunc)(const FFmpegDecoderAudio &decoder, void *user_data); + +- FFmpegDecoderAudio(PacketQueue & packets, FFmpegClocks & clocks); ++ FFmpegDecoderAudio(PacketQueue &packets, FFmpegClocks &clocks); + ~FFmpegDecoderAudio(); + +- void open(AVStream * stream, FFmpegParameters* parameters); ++ void open(AVStream *stream, FFmpegParameters *parameters); + void pause(bool pause); + void close(bool waitForThreadToExit); + +@@ -39,7 +38,7 @@ class FFmpegDecoderAudio : public OpenThreads::Thread + virtual void run(); + + void setAudioSink(osg::ref_ptr audio_sink); +- void fillBuffer(void * buffer, size_t size); ++ void fillBuffer(void *buffer, size_t size); + + bool validContext() const; + int frequency() const; +@@ -53,37 +52,37 @@ class FFmpegDecoderAudio : public OpenThreads::Thread + + void decodeLoop(); + void adjustBufferEndPts(size_t buffer_size); +- size_t decodeFrame(void * buffer, size_t size); ++ size_t decodeFrame(void *buffer, size_t size); + + +- PacketQueue & m_packets; +- FFmpegClocks & m_clocks; +- AVStream * m_stream; +- AVCodecContext * m_context; +- FFmpegPacket m_packet; +- const uint8_t * m_packet_data; +- int m_bytes_remaining; ++ PacketQueue &m_packets; ++ FFmpegClocks &m_clocks; ++ AVStream *m_stream; ++ AVCodecContext *m_context; ++ FFmpegPacket m_packet; ++ const uint8_t *m_packet_data; ++ int m_bytes_remaining; + +- Buffer m_audio_buffer; +- size_t m_audio_buf_size; +- size_t m_audio_buf_index; ++ Buffer m_audio_buffer; ++ size_t m_audio_buf_size; ++ size_t m_audio_buf_index; + +- int m_in_sample_rate; +- int m_in_nb_channels; +- AVSampleFormat m_in_sample_format; +- int m_out_sample_rate; +- int m_out_nb_channels; +- AVSampleFormat m_out_sample_format; ++ int m_in_sample_rate; ++ int m_in_nb_channels; ++ AVSampleFormat m_in_sample_format; ++ int m_out_sample_rate; ++ int m_out_nb_channels; ++ AVSampleFormat m_out_sample_format; + +- SinkPtr m_audio_sink; ++ SinkPtr m_audio_sink; + +- osg::Timer m_pause_timer; ++ osg::Timer m_pause_timer; + +- bool m_end_of_stream; +- bool m_paused; +- volatile bool m_exit; ++ bool m_end_of_stream; ++ bool m_paused; ++ volatile bool m_exit; + +- SwrContext * m_swr_context; // Sw resampling context ++ SwrContext *m_swr_context; // Sw resampling context + }; + + +@@ -92,7 +91,7 @@ class FFmpegDecoderAudio : public OpenThreads::Thread + + inline bool FFmpegDecoderAudio::validContext() const + { +- return m_context != 0; ++ return m_context != nullptr; + } + + +@@ -110,5 +109,5 @@ inline int FFmpegDecoderAudio::nbChannels() const + } // namespace osgFFmpeg + + +- + #endif // HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_AUDIO_H ++ +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp +index 25df979a045..f0e92582754 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp +@@ -6,38 +6,35 @@ + #include + #include + +-namespace osgFFmpeg { +- +-// TODO - add support for using RGB or RGBA pixel format. +-// Note from Jason Daly in a osg-submissions thread, "The pix_fmt field of AVCodecContext will indicate the pixel format of the decoded video" ++extern "C" { ++#include ++} + ++namespace osgFFmpeg { + + FFmpegDecoderVideo::FFmpegDecoderVideo(PacketQueue & packets, FFmpegClocks & clocks) : + m_packets(packets), + m_clocks(clocks), +- m_stream(0), +- m_context(0), +- m_codec(0), +- m_packet_data(0), ++ m_stream(nullptr), ++ m_context(nullptr), ++ m_codec(nullptr), ++ m_packet_data(nullptr), + m_bytes_remaining(0), + m_packet_pts(AV_NOPTS_VALUE), + m_writeBuffer(0), +- m_user_data(0), +- m_publish_func(0), ++ m_user_data(nullptr), ++ m_publish_func(nullptr), + m_paused(true), + m_exit(false) + #ifdef USE_SWSCALE +- ,m_swscale_ctx(0) ++ ,m_swscale_ctx(nullptr) + #endif + { +- + } + +- +- + FFmpegDecoderVideo::~FFmpegDecoderVideo() + { +- OSG_INFO<<"Destructing FFmpegDecoderVideo..."<close(true); + +@@ -45,24 +42,23 @@ FFmpegDecoderVideo::~FFmpegDecoderVideo() + if (m_swscale_ctx) + { + sws_freeContext(m_swscale_ctx); +- m_swscale_ctx = 0; ++ m_swscale_ctx = nullptr; + } + #endif + + if (m_context) + { +- avcodec_close(m_context); ++ avcodec_free_context(&m_context); + } + +- OSG_INFO<<"Destructed FFmpegDecoderVideo"<codec; ++ m_context = avcodec_alloc_context3(nullptr); ++ avcodec_parameters_to_context(m_context, stream->codecpar); + + // Trust the video size given at this point + // (avcodec_open seems to sometimes return a 0x0 size) +@@ -74,43 +70,34 @@ void FFmpegDecoderVideo::open(AVStream * const stream) + m_alpha_channel = (m_context->pix_fmt == AV_PIX_FMT_YUVA420P); + + // Find out the framerate +- #if LIBAVCODEC_VERSION_MAJOR >= 56 + m_frame_rate = av_q2d(stream->avg_frame_rate); +- #else +- m_frame_rate = av_q2d(stream->r_frame_rate); +- #endif + + // Find the decoder for the video stream + m_codec = avcodec_find_decoder(m_context->codec_id); + +- if (m_codec == 0) ++ if (m_codec == nullptr) + throw std::runtime_error("avcodec_find_decoder() failed"); + +- // Inform the codec that we can handle truncated bitstreams +- //if (p_codec->capabilities & CODEC_CAP_TRUNCATED) +- // m_context->flags |= CODEC_FLAG_TRUNCATED; +- + // Open codec +- if (avcodec_open2(m_context, m_codec, NULL) < 0) +- throw std::runtime_error("avcodec_open() failed"); ++ if (avcodec_open2(m_context, m_codec, nullptr) < 0) ++ throw std::runtime_error("avcodec_open2() failed"); + + // Allocate video frame + m_frame.reset(av_frame_alloc()); + + // Allocate converted RGB frame + m_frame_rgba.reset(av_frame_alloc()); +- m_buffer_rgba[0].resize(avpicture_get_size(AV_PIX_FMT_RGB24, width(), height())); ++ m_buffer_rgba[0].resize(av_image_get_buffer_size(AV_PIX_FMT_RGB24, width(), height(), 1)); + m_buffer_rgba[1].resize(m_buffer_rgba[0].size()); + + // Assign appropriate parts of the buffer to image planes in m_frame_rgba +- avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height()); ++ av_image_fill_arrays(m_frame_rgba->data, m_frame_rgba->linesize, &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height(), 1); + +- // Override get_buffer()/release_buffer() from codec context in order to retrieve the PTS of each frame. ++ // Override get_buffer2() from codec context in order to retrieve the PTS of each frame. + m_context->opaque = this; + m_context->get_buffer2 = getBuffer; + } + +- + void FFmpegDecoderVideo::close(bool waitForThreadToExit) + { + if (isRunning()) +@@ -123,10 +110,7 @@ void FFmpegDecoderVideo::close(bool waitForThreadToExit) + + void FFmpegDecoderVideo::pause(bool pause) + { +- if(pause) +- m_paused = true; +- else +- m_paused = false; ++ m_paused = pause; + } + + void FFmpegDecoderVideo::run() +@@ -135,102 +119,60 @@ void FFmpegDecoderVideo::run() + { + decodeLoop(); + } +- +- catch (const std::exception & error) ++ catch (const std::exception &error) + { + OSG_WARN << "FFmpegDecoderVideo::run : " << error.what() << std::endl; + } +- + catch (...) + { + OSG_WARN << "FFmpegDecoderVideo::run : unhandled exception" << std::endl; + } + } + +- +- + void FFmpegDecoderVideo::decodeLoop() + { + FFmpegPacket packet; + double pts; + +- while (! m_exit) ++ while (!m_exit) + { + // Work on the current packet until we have decoded all of it +- + while (m_bytes_remaining > 0) + { + // Save global PTS to be stored in m_frame via getBuffer() +- + m_packet_pts = packet.packet.pts; + + // Decode video frame +- + int frame_finished = 0; ++ const int bytes_decoded = avcodec_receive_frame(m_context, m_frame.get()); + +- // We want to use the entire packet since some codecs will require extra information for decoding +- const int bytes_decoded = avcodec_decode_video2(m_context, m_frame.get(), &frame_finished, &(packet.packet)); +- +- if (bytes_decoded < 0) +- throw std::runtime_error("avcodec_decode_video failed()"); +- +- m_bytes_remaining -= bytes_decoded; +- m_packet_data += bytes_decoded; ++ if (bytes_decoded == 0) ++ { ++ frame_finished = 1; ++ m_bytes_remaining -= bytes_decoded; ++ m_packet_data += bytes_decoded; ++ } ++ else if (bytes_decoded == AVERROR(EAGAIN)) ++ { ++ break; ++ } ++ else if (bytes_decoded < 0) ++ { ++ throw std::runtime_error("avcodec_receive_frame() failed"); ++ } + + // Publish the frame if we have decoded a complete frame + if (frame_finished) + { +-#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(57,24,102) +- //ffmpeg-3.0 and below +- AVRational timebase; +- // Find out the frame pts +- if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) +- { +- pts = m_frame->pts; +- timebase = m_context->time_base; +- } +- else if (packet.packet.dts == int64_t(AV_NOPTS_VALUE) && +- m_frame->opaque != 0 && +- *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) +- { +- pts = *reinterpret_cast(m_frame->opaque); +- timebase = m_stream->time_base; +- } +- else if (packet.packet.dts != int64_t(AV_NOPTS_VALUE)) +- { +- pts = packet.packet.dts; +- timebase = m_stream->time_base; +- } +- else +- { +- pts = 0; +- timebase = m_context->time_base; +- } +- +- pts *= av_q2d(timebase); +- +-#else +- //above ffmpeg-3.0 +- // Find out the frame pts +- if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) ++ if (m_frame->pts != AV_NOPTS_VALUE) + { + pts = av_q2d(m_stream->time_base) * m_frame->pts; + } +- else if (packet.packet.dts == int64_t(AV_NOPTS_VALUE) && +- m_frame->opaque != 0 && +- *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) +- { +- pts = av_q2d(m_stream->time_base) * *reinterpret_cast(m_frame->opaque); +- } +- else if (packet.packet.dts != int64_t(AV_NOPTS_VALUE)) +- { +- pts = av_q2d(m_stream->time_base) * packet.packet.dts; +- } + else + { + pts = 0; + } +-#endif ++ + const double synched_pts = m_clocks.videoSynchClock(m_frame.get(), av_q2d(av_inv_q(m_context->framerate)), pts); + const double frame_delay = m_clocks.videoRefreshSchedule(synched_pts); + +@@ -238,13 +180,12 @@ void FFmpegDecoderVideo::decodeLoop() + } + } + +- while(m_paused && !m_exit) ++ while (m_paused && !m_exit) + { +- microSleep(10000); ++ OpenThreads::Thread::microSleep(10000); + } + + // Get the next packet +- + pts = 0; + + if (packet.valid()) +@@ -253,12 +194,13 @@ void FFmpegDecoderVideo::decodeLoop() + bool is_empty = true; + packet = m_packets.timedPop(is_empty, 10); + +- if (! is_empty) ++ if (!is_empty) + { + if (packet.type == FFmpegPacket::PACKET_DATA) + { + m_bytes_remaining = packet.packet.size; + m_packet_data = packet.packet.data; ++ avcodec_send_packet(m_context, &(packet.packet)); + } + else if (packet.type == FFmpegPacket::PACKET_FLUSH) + { +@@ -268,8 +210,6 @@ void FFmpegDecoderVideo::decodeLoop() + } + } + +- +- + void FFmpegDecoderVideo::findAspectRatio() + { + float ratio = 0.0f; +@@ -283,65 +223,52 @@ void FFmpegDecoderVideo::findAspectRatio() + m_pixel_aspect_ratio = ratio; + } + +-int FFmpegDecoderVideo::convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, +- int src_pix_fmt, int src_width, int src_height) ++int FFmpegDecoderVideo::convert(AVFrame *dst, int dst_pix_fmt, AVFrame *src, ++ int src_pix_fmt, int src_width, int src_height) + { + osg::Timer_t startTick = osg::Timer::instance()->tick(); + #ifdef USE_SWSCALE +- if (m_swscale_ctx==0) ++ if (m_swscale_ctx == nullptr) + { +- m_swscale_ctx = sws_getContext(src_width, src_height, (AVPixelFormat) src_pix_fmt, +- src_width, src_height, (AVPixelFormat) dst_pix_fmt, +- /*SWS_BILINEAR*/ SWS_BICUBIC, NULL, NULL, NULL); ++ m_swscale_ctx = sws_getContext(src_width, src_height, (AVPixelFormat)src_pix_fmt, ++ src_width, src_height, (AVPixelFormat)dst_pix_fmt, ++ SWS_BICUBIC, nullptr, nullptr, nullptr); + } + ++ OSG_DEBUG << "Using sws_scale "; + +- OSG_DEBUG<<"Using sws_scale "; +- +- int result = sws_scale(m_swscale_ctx, +- (src->data), (src->linesize), 0, src_height, +- (dst->data), (dst->linesize)); ++ int result = sws_scale(m_swscale_ctx, ++ src->data, src->linesize, 0, src_height, ++ dst->data, dst->linesize); + #else + +- OSG_DEBUG<<"Using img_convert "; +- +- int result = img_convert(dst, dst_pix_fmt, src, +- src_pix_fmt, src_width, src_height); ++ OSG_DEBUG << "Using img_convert "; + ++ int result = av_image_copy_to_buffer(dst->data, dst_pix_fmt, src->data, src_pix_fmt, src_width, src_height); + #endif + osg::Timer_t endTick = osg::Timer::instance()->tick(); +- OSG_DEBUG<<" time = "<delta_m(startTick,endTick)<<"ms"<data, dst->linesize, &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height(), 1); + + // Convert YUVA420p (i.e. YUV420p plus alpha channel) using our own routine +- + if (m_context->pix_fmt == AV_PIX_FMT_YUVA420P) + yuva420pToRgba(dst, src, width(), height()); + else +@@ -363,26 +290,25 @@ void FFmpegDecoderVideo::publishFrame(const double delay, bool audio_disabled) + i_delay -= micro_delay; + } + +- m_writeBuffer = 1-m_writeBuffer; ++ m_writeBuffer = 1 - m_writeBuffer; + +- m_publish_func(* this, m_user_data); ++ m_publish_func(*this, m_user_data); + } + +- +- +-void FFmpegDecoderVideo::yuva420pToRgba(AVPicture * const dst, AVPicture * const src, int width, int height) ++void FFmpegDecoderVideo::yuva420pToRgba(AVFrame * const dst, AVFrame * const src, int width, int height) + { + convert(dst, AV_PIX_FMT_RGB24, src, m_context->pix_fmt, width, height); + + const size_t bpp = 4; + +- uint8_t * a_dst = dst->data[0] + 3; +- +- for (int h = 0; h < height; ++h) { ++ uint8_t *a_dst = dst->data[0] + 3; + +- const uint8_t * a_src = src->data[3] + h * src->linesize[3]; ++ for (int h = 0; h < height; ++h) ++ { ++ const uint8_t *a_src = src->data[3] + h * src->linesize[3]; + +- for (int w = 0; w < width; ++w) { ++ for (int w = 0; w < width; ++w) ++ { + *a_dst = *a_src; + a_dst += bpp; + a_src += 1; +@@ -396,7 +322,7 @@ int FFmpegDecoderVideo::getBuffer(AVCodecContext * const context, AVFrame * cons + const FFmpegDecoderVideo * const this_ = reinterpret_cast(context->opaque); + + const int result = avcodec_default_get_buffer2(context, picture, flags); +- int64_t * p_pts = reinterpret_cast( av_malloc(sizeof(int64_t)) ); ++ int64_t *p_pts = reinterpret_cast(av_malloc(sizeof(int64_t))); + + *p_pts = this_->m_packet_pts; + picture->opaque = p_pts; +@@ -415,3 +341,4 @@ void FFmpegDecoderVideo::freeBuffer(void *opaque, uint8_t *data) + } + + } // namespace osgFFmpeg ++ +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp +index 778c1a9b8cb..0b7c30aab53 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp +@@ -1,4 +1,3 @@ +- + #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_VIDEO_H + #define HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_VIDEO_H + +@@ -15,11 +14,11 @@ namespace osgFFmpeg { + + class FramePtr + { +- public: ++ public: + + typedef AVFrame T; + +- explicit FramePtr() : _ptr(0) {} ++ explicit FramePtr() : _ptr(nullptr) {} + explicit FramePtr(T* ptr) : _ptr(ptr) {} + + ~FramePtr() +@@ -43,14 +42,11 @@ class FramePtr + + void cleanup() + { +- if (_ptr) av_free(_ptr); +- _ptr = 0; ++ if (_ptr) av_frame_free(&_ptr); ++ _ptr = nullptr; + } + +- +- + protected: +- + T* _ptr; + }; + +@@ -88,12 +84,11 @@ class FFmpegDecoderVideo : public OpenThreads::Thread + void findAspectRatio(); + void publishFrame(double delay, bool audio_disabled); + double synchronizeVideo(double pts); +- void yuva420pToRgba(AVPicture *dst, AVPicture *src, int width, int height); ++ void yuva420pToRgba(AVFrame* dst, AVFrame* src, int width, int height); + +- int convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, ++ int convert(AVFrame* dst, int dst_pix_fmt, AVFrame* src, + int src_pix_fmt, int src_width, int src_height); + +- + static int getBuffer(AVCodecContext * context, AVFrame * picture, int flags); + static void freeBuffer(void * opaque, uint8_t *data); + +@@ -101,7 +96,7 @@ class FFmpegDecoderVideo : public OpenThreads::Thread + FFmpegClocks & m_clocks; + AVStream * m_stream; + AVCodecContext * m_context; +- AVCodec * m_codec; ++ const AVCodec* m_codec; + const uint8_t * m_packet_data; + int m_bytes_remaining; + int64_t m_packet_pts; +diff --git a/src/osgPlugins/ffmpeg/FFmpegPacket.hpp b/src/osgPlugins/ffmpeg/FFmpegPacket.hpp +index e06bd8bb6d3..94cc13b1b6b 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegPacket.hpp ++++ b/src/osgPlugins/ffmpeg/FFmpegPacket.hpp +@@ -42,7 +42,7 @@ namespace osgFFmpeg + void clear() + { + if (packet.data != 0) +- av_free_packet(&packet); ++ av_packet_unref(&packet); + + release(); + } +diff --git a/src/osgPlugins/ffmpeg/FFmpegParameters.cpp b/src/osgPlugins/ffmpeg/FFmpegParameters.cpp +index 5915ab850bc..ed8c9adf9e7 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegParameters.cpp ++++ b/src/osgPlugins/ffmpeg/FFmpegParameters.cpp +@@ -1,4 +1,3 @@ +- + #include "FFmpegParameters.hpp" + + #include +@@ -21,11 +20,8 @@ extern "C" + + inline AVPixelFormat osg_av_get_pix_fmt(const char *name) { return av_get_pix_fmt(name); } + +- + namespace osgFFmpeg { + +- +- + FFmpegParameters::FFmpegParameters() : + m_format(0), + m_context(0), +@@ -40,7 +36,6 @@ FFmpegParameters::~FFmpegParameters() + av_dict_free(&m_options); + } + +- + void FFmpegParameters::parse(const std::string& name, const std::string& value) + { + if (value.empty()) +@@ -52,7 +47,8 @@ void FFmpegParameters::parse(const std::string& name, const std::string& value) + #ifndef ANDROID + avdevice_register_all(); + #endif +- m_format = av_find_input_format(value.c_str()); ++ const AVInputFormat* format = av_find_input_format(value.c_str()); ++ m_format = const_cast(format); + if (!m_format) + OSG_NOTICE<<"Failed to apply input video format: "< + #include + +- +-#if LIBAVCODEC_VERSION_MAJOR >= 53 || \ +- (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR>=30) || \ +- (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR==20 && LIBAVCODEC_VERSION_MICRO >= 1) +- #define USE_AV_LOCK_MANAGER +-#endif +- + extern "C" { + + static void log_to_osg(void* /*ptr*/, int level, const char *fmt, va_list vl) +@@ -100,26 +92,21 @@ class ReaderWriterFFmpeg : public osgDB::ReaderWriter + + supportsOption("format", "Force setting input format (e.g. vfwcap for Windows webcam)"); + supportsOption("pixel_format", "Set pixel format"); +- supportsOption("frame_size", "Set frame size (e.g. 320x240)"); ++ supportsOption("frame_size", "Set frame size (e.g. 320x240)"); + supportsOption("frame_rate", "Set frame rate (e.g. 25)"); + // WARNING: This option is kept for backwards compatibility only, use out_sample_rate instead! + supportsOption("audio_sample_rate", "Set audio sampling rate (e.g. 44100)"); + supportsOption("out_sample_format", "Set the output sample format (e.g. AV_SAMPLE_FMT_S16)"); +- supportsOption("out_sample_rate", "Set the output sample rate or frequency in Hz (e.g. 48000)"); ++ supportsOption("out_sample_rate", "Set the output sample rate or frequency in Hz (e.g. 48000)"); + supportsOption("out_nb_channels", "Set the output number of channels (e.g. 2 for stereo)"); +- supportsOption("context", "AVIOContext* for custom IO"); +- supportsOption("mad", "Max analyze duration (seconds)"); +- supportsOption("rtsp_transport", "RTSP transport (udp, tcp, udp_multicast or http)"); ++ supportsOption("context", "AVIOContext* for custom IO"); ++ supportsOption("mad", "Max analyze duration (seconds)"); ++ supportsOption("rtsp_transport", "RTSP transport (udp, tcp, udp_multicast or http)"); + + av_log_set_callback(log_to_osg); + +-#ifdef USE_AV_LOCK_MANAGER +- // enable thread locking +- av_lockmgr_register(&lockMgr); +-#endif + // Register all FFmpeg formats/codecs +- av_register_all(); +- ++ avdevice_register_all(); + avformat_network_init(); + } + +@@ -218,41 +205,7 @@ class ReaderWriterFFmpeg : public osgDB::ReaderWriter + } + } + } +- +-#ifdef USE_AV_LOCK_MANAGER +- static int lockMgr(void **mutex, enum AVLockOp op) +- { +- // returns are 0 success +- OpenThreads::Mutex **m=(OpenThreads::Mutex**)mutex; +- if (op==AV_LOCK_CREATE) +- { +- *m=new OpenThreads::Mutex; +- return !*m; +- } +- else if (op==AV_LOCK_DESTROY) +- { +- delete *m; +- return 0; +- } +- else if (op==AV_LOCK_OBTAIN) +- { +- (*m)->lock(); +- return 0; +- } +- else if (op==AV_LOCK_RELEASE) +- { +- (*m)->unlock(); +- return 0; +- } +- else +- { +- return -1; +- } +- } +-#endif +- + }; + +- +- + REGISTER_OSGPLUGIN(ffmpeg, ReaderWriterFFmpeg) ++ diff --git a/srcpkgs/osg/patches/musl-fileutil.patch b/srcpkgs/osg/patches/musl-fileutil.patch new file mode 100644 index 00000000000000..193554b7804f7c --- /dev/null +++ b/srcpkgs/osg/patches/musl-fileutil.patch @@ -0,0 +1,12 @@ +diff --git a/src/osgDB/FileUtils.cpp b/src/osgDB/FileUtils.cpp +index c0c8cec..0cd4c2f 100644 +--- a/src/osgDB/FileUtils.cpp ++++ b/src/osgDB/FileUtils.cpp +@@ -95,7 +95,7 @@ typedef char TCHAR; + #endif + #endif + +-#if defined(__ANDROID__) ++#if defined(__ANDROID__) || !defined(__GLIBC__) + #define stat64 stat + #endif diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template index b0b6fbf4e62e56..b6395444446a99 100644 --- a/srcpkgs/osg/template +++ b/srcpkgs/osg/template @@ -1,14 +1,14 @@ # Template file for 'osg' pkgname=osg version=3.6.5 -revision=6 +revision=7 build_style=cmake build_helper="qemu" # don't use /usr/lib64 on 64bit platforms configure_args="-DLIB_POSTFIX=" hostmakedepends="pkg-config xrandr" makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-devel - jasper-devel tiff-devel libgdal-devel libgta-devel ffmpeg6-devel xine-lib-devel + jasper-devel tiff-devel libgdal-devel libgta-devel ffmpeg-devel xine-lib-devel SDL2-devel gst-plugins-base1-devel collada-dom-devel $(vopt_if openexr libopenexr-devel) $(vopt_if poppler poppler-glib-devel) From b9010cf050a5607a865be05fff4b5c37573cb09d Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 077/110] synfig: revbump for ffmpeg8 --- srcpkgs/synfig/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/synfig/template b/srcpkgs/synfig/template index 95de32bc115f80..b30e791fd85c3e 100644 --- a/srcpkgs/synfig/template +++ b/srcpkgs/synfig/template @@ -2,12 +2,12 @@ # Should be kept in sync with 'synfigstudio' and 'ETL' pkgname=synfig version=1.4.5 -revision=2 +revision=3 build_style=gnu-configure configure_args="--with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib" hostmakedepends="boost-build ImageMagick pkg-config intltool" makedepends="ETL gettext-devel libxml++-devel mlt7-devel libmagick-devel - libmng-devel boost-build boost-headers libopenexr-devel ffmpeg6-devel" + libmng-devel boost-build boost-headers libopenexr-devel ffmpeg-devel" depends="ImageMagick" short_desc="CLI 2D vector and timeline-based animation software" maintainer="Orphaned " @@ -16,7 +16,7 @@ homepage="https://www.synfig.org/" distfiles="https://github.com/synfig/synfig/releases/download/v${version}/synfig-${version}.tar.gz" checksum=51a395f7dceb2ec51721043eb9b9f7149477a3399d92d624eef266f155521bc1 -CXXFLAGS="-std=c++11 -DHAVE_LOCALE_H=1" +CXXFLAGS="-std=c++14 -DHAVE_LOCALE_H=1" synfig-devel_package() { depends="${sourcepkg}>=${version}_${revision} From 4a597d3e68b83893175e848d082f8e3ab6ba5be7 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 078/110] timg: update to 1.6.3 --- srcpkgs/timg/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/timg/template b/srcpkgs/timg/template index ea6233a11c9e1a..a468b7647c1c9b 100644 --- a/srcpkgs/timg/template +++ b/srcpkgs/timg/template @@ -1,11 +1,11 @@ # Template file for 'timg' pkgname=timg version=1.6.3 -revision=1 +revision=2 build_style=cmake configure_args="-DWITH_OPENSLIDE_SUPPORT=OFF -DTIMG_VERSION_FROM_GIT=OFF" hostmakedepends="pkg-config" -makedepends="libgraphicsmagick-devel ffmpeg6-devel libjpeg-turbo-devel libexif-devel +makedepends="libgraphicsmagick-devel ffmpeg-devel libjpeg-turbo-devel libexif-devel libsixel-devel librsvg-devel poppler-glib-devel libdeflate-devel" short_desc="Terminal Image and Video Viewer" maintainer="Orphaned " From c982b216cd2afb5a7f0be64285f50f12b2b0cdbe Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 079/110] video-compare: revbump for ffmpeg8 --- srcpkgs/video-compare/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/video-compare/template b/srcpkgs/video-compare/template index d6700215fbd560..c69efa12c21588 100644 --- a/srcpkgs/video-compare/template +++ b/srcpkgs/video-compare/template @@ -1,9 +1,9 @@ # Template file for 'video-compare' pkgname=video-compare version=20260502 -revision=1 +revision=2 build_style=gnu-makefile -makedepends="ffmpeg6-devel SDL2-devel SDL2_ttf-devel" +makedepends="ffmpeg-devel SDL2-devel SDL2_ttf-devel" short_desc="Split screen video comparison tool using FFmpeg and SDL2" maintainer="sunshinehunter " license="GPL-2.0-only" From a166216aa60fe511bd39f1b262ba7a8a4623a388 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 080/110] kid3: revbump for ffmpeg8 --- srcpkgs/kid3/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/kid3/template b/srcpkgs/kid3/template index b7576416d1f0ae..d7ad26a67e4c74 100644 --- a/srcpkgs/kid3/template +++ b/srcpkgs/kid3/template @@ -1,7 +1,7 @@ # Template file for 'kid3' pkgname=kid3 version=3.10.0 -revision=1 +revision=2 build_style=cmake configure_args="-DBUILD_WITH_QT6=ON -DWITH_APPS='CLI;$(vopt_if KDE KDE Qt)' -DWITH_DOCBOOKDIR=/usr/share/xsl/docbook -DWITH_FLAC=$(vopt_if flac ON OFF) @@ -12,7 +12,7 @@ hostmakedepends="pkg-config python3 libxslt $(vopt_if KDE extra-cmake-modules) qt6-tools qt6-base" makedepends="qt6-declarative-devel qt6-multimedia-devel docbook-xsl readline-devel $(vopt_if KDE 'kf6-kio-devel kf6-kxmlgui-devel') $(vopt_if vorbis libvorbis-devel) - $(vopt_if mp4 libmp4v2-devel) $(vopt_if chromaprint 'chromaprint-devel ffmpeg6-devel') + $(vopt_if mp4 libmp4v2-devel) $(vopt_if chromaprint 'chromaprint-devel ffmpeg-devel') $(vopt_if mp3 id3lib-devel) $(vopt_if flac libflac-devel) $(vopt_if taglib taglib-devel)" depends="desktop-file-utils hicolor-icon-theme" short_desc="MP3, Ogg/Vorbis and FLAC tag editor" From fa5a42e484b078e6e3c3bf86ac0757e2a5d12e31 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 081/110] libopenshot: revbump for ffmpeg8 --- srcpkgs/libopenshot/patches/ffmpeg8.patch | 134 ++++++++++++++++++++++ srcpkgs/libopenshot/template | 4 +- 2 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/libopenshot/patches/ffmpeg8.patch diff --git a/srcpkgs/libopenshot/patches/ffmpeg8.patch b/srcpkgs/libopenshot/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..19ed4b80801405 --- /dev/null +++ b/srcpkgs/libopenshot/patches/ffmpeg8.patch @@ -0,0 +1,134 @@ +--- a/src/FFmpegReader.cpp ++++ b/src/FFmpegReader.cpp +@@ -670,9 +670,7 @@ + } + + void FFmpegReader::UpdateAudioInfo() { +- // Set default audio channel layout (if needed) +- if (AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channel_layout == 0) +- AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channel_layout = av_get_default_channel_layout(AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channels); ++ av_channel_layout_default(&aStream->codecpar->ch_layout, aStream->codecpar->ch_layout.nb_channels); + + if (info.sample_rate > 0) { + // Skip init - if info struct already populated +@@ -683,8 +681,8 @@ + info.has_audio = true; + info.file_size = pFormatCtx->pb ? avio_size(pFormatCtx->pb) : -1; + info.acodec = aCodecCtx->codec->name; +- info.channels = AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channels; +- info.channel_layout = (ChannelLayout) AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channel_layout; ++ info.channels = AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->ch_layout.nb_channels; ++ info.channel_layout = (ChannelLayout) AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->ch_layout.u.mask; + info.sample_rate = AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->sample_rate; + info.audio_bit_rate = AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->bit_rate; + if (info.audio_bit_rate <= 0) { +@@ -1594,12 +1592,12 @@ + // determine how many samples were decoded + int plane_size = -1; + data_size = av_samples_get_buffer_size(&plane_size, +- AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channels, ++ AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->ch_layout.nb_channels, + audio_frame->nb_samples, + (AVSampleFormat) (AV_GET_SAMPLE_FORMAT(aStream, aCodecCtx)), 1); + + // Calculate total number of samples +- packet_samples = audio_frame->nb_samples * AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channels; ++ packet_samples = audio_frame->nb_samples * AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->ch_layout.nb_channels; + } else { + if (audio_frame) { + // Free audio frame +@@ -1662,8 +1660,8 @@ + + // setup resample context + avr = SWR_ALLOC(); +- av_opt_set_int(avr, "in_channel_layout", AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channel_layout, 0); +- av_opt_set_int(avr, "out_channel_layout", AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channel_layout, 0); ++ av_opt_set_chlayout(avr, "in_channel_layout", &AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->ch_layout, 0); ++ av_opt_set_chlayout(avr, "out_channel_layout", &AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->ch_layout, 0); + av_opt_set_int(avr, "in_sample_fmt", AV_GET_SAMPLE_FORMAT(aStream, aCodecCtx), 0); + av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); + av_opt_set_int(avr, "in_sample_rate", info.sample_rate, 0); + +--- a/src/FFmpegWriter.cpp ++++ b/src/FFmpegWriter.cpp +@@ -1113,7 +1113,6 @@ + + // Set the sample parameters + c->bit_rate = info.audio_bit_rate; +- c->channels = info.channels; + + // Set valid sample rate (or throw error) + if (codec->supported_samplerates) { +@@ -1133,19 +1132,17 @@ + + // Set a valid number of channels (or throw error) + const uint64_t channel_layout = info.channel_layout; +- if (codec->channel_layouts) { ++ if (codec->ch_layouts) { + int i; +- for (i = 0; codec->channel_layouts[i] != 0; i++) +- if (channel_layout == codec->channel_layouts[i]) { ++ for (i = 0; codec->ch_layouts[i].nb_channels != 0; i++) ++ if (channel_layout == codec->ch_layouts[i].u.mask) { + // Set valid channel layout +- c->channel_layout = channel_layout; ++ c->ch_layout.u.mask = channel_layout; + break; + } +- if (codec->channel_layouts[i] == 0) +- throw InvalidChannels("An invalid channel layout was detected (i.e. MONO / STEREO).", path); + } else +- // Set valid channel layout +- c->channel_layout = channel_layout; ++ // Set valid channel layout // zlice - anyway??? ++ c->ch_layout.u.mask = channel_layout; + + // Choose a valid sample_fmt + if (codec->sample_fmts) { +@@ -1175,9 +1172,9 @@ + "FFmpegWriter::add_audio_stream", + "c->codec_id", c->codec_id, + "c->bit_rate", c->bit_rate, +- "c->channels", c->channels, ++ "c->channels", c->ch_layout.nb_channels, + "c->sample_fmt", c->sample_fmt, +- "c->channel_layout", c->channel_layout, ++ "c->channel_layout", c->ch_layout.u.mask, + "c->sample_rate", c->sample_rate); + + return st; +@@ -1878,9 +1875,8 @@ + + // Create output frame (and allocate arrays) + frame_final->nb_samples = audio_input_frame_size; +- frame_final->channels = info.channels; + frame_final->format = audio_codec_ctx->sample_fmt; +- frame_final->channel_layout = info.channel_layout; ++ frame_final->ch_layout.u.mask = info.channel_layout; + av_samples_alloc(frame_final->data, frame_final->linesize, info.channels, + frame_final->nb_samples, audio_codec_ctx->sample_fmt, 0); + +@@ -1929,7 +1925,7 @@ + frame_final->nb_samples = audio_input_frame_size; + + // Fill the final_frame AVFrame with audio (non planar) +- avcodec_fill_audio_frame(frame_final, audio_codec_ctx->channels, ++ avcodec_fill_audio_frame(frame_final, audio_codec_ctx->ch_layout.nb_channels, + audio_codec_ctx->sample_fmt, (uint8_t *) final_samples, + audio_encoder_buffer_size, 0); + } + +diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp +index 79cbc21c6..41a341df0 100644 +--- a/src/FFmpegWriter.cpp ++++ b/src/FFmpegWriter.cpp +@@ -1499,7 +1499,7 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVStream *st) { + switch (video_codec_ctx->codec_id) { + case AV_CODEC_ID_H264: + video_codec_ctx->max_b_frames = 0; // At least this GPU doesn't support b-frames +- video_codec_ctx->profile = FF_PROFILE_H264_BASELINE | FF_PROFILE_H264_CONSTRAINED; ++ video_codec_ctx->profile = AV_PROFILE_H264_BASELINE | AV_PROFILE_H264_BASELINE; + av_opt_set(video_codec_ctx->priv_data, "preset", "slow", 0); + av_opt_set(video_codec_ctx->priv_data, "tune", "zerolatency", 0); + av_opt_set(video_codec_ctx->priv_data, "vprofile", "baseline", AV_OPT_SEARCH_CHILDREN); + diff --git a/srcpkgs/libopenshot/template b/srcpkgs/libopenshot/template index dfe3a539a1ecff..e1dcaa3fc908f0 100644 --- a/srcpkgs/libopenshot/template +++ b/srcpkgs/libopenshot/template @@ -1,13 +1,13 @@ # Template file for 'libopenshot' pkgname=libopenshot version=0.4.0 -revision=2 +revision=3 build_style=cmake # Builds fail with Ruby-2.4.1 configure_args="-DENABLE_RUBY=OFF -DUSE_SYSTEM_JSONCPP=ON" hostmakedepends="swig doxygen ruby python3 python3-setuptools pkg-config qt5-qmake qt5-host-tools" -makedepends="python3-devel ffmpeg6-devel libmagick-devel qt5-devel libgomp-devel +makedepends="python3-devel ffmpeg-devel libmagick-devel qt5-devel libgomp-devel libopenshot-audio-devel qt5-multimedia-devel unittest-cpp zeromq-devel cppzmq jsoncpp-devel qt5-svg-devel" depends="python3" From 266927a95955c93db7b28608edc9176c435d061e Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 082/110] hedgewars: revbump for ffmpeg8 --- .../patches/cmake-policy-location.patch | 32 +++++++++++++++++++ srcpkgs/hedgewars/template | 4 +-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/hedgewars/patches/cmake-policy-location.patch diff --git a/srcpkgs/hedgewars/patches/cmake-policy-location.patch b/srcpkgs/hedgewars/patches/cmake-policy-location.patch new file mode 100644 index 00000000000000..02456718cba6da --- /dev/null +++ b/srcpkgs/hedgewars/patches/cmake-policy-location.patch @@ -0,0 +1,32 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,11 +9,12 @@ + endif() + endforeach() + +-foreach(hwpolicy CMP0026 CMP0068) +- if(POLICY ${hwpolicy}) +- cmake_policy(SET ${hwpolicy} OLD) +- endif() +-endforeach() ++# doesnt work anymore :( ++#foreach(hwpolicy CMP0026 CMP0068) ++# if(POLICY ${hwpolicy}) ++# cmake_policy(SET ${hwpolicy} OLD) ++# endif() ++#endforeach() + + set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules") + include(${CMAKE_MODULE_PATH}/utils.cmake) + +--- a/misc/libphyslayer/CMakeLists.txt ++++ b/misc/libphyslayer/CMakeLists.txt +@@ -21,7 +21,7 @@ + install(TARGETS physlayer RUNTIME DESTINATION ${target_binary_install_dir} + LIBRARY DESTINATION ${target_library_install_dir} + ARCHIVE DESTINATION ${target_library_install_dir}) +-get_target_property(physlayer_fullpath physlayer LOCATION) ++get_target_property(physlayer_fullpath physlayer CMAKE_CURRENT_SOURCE_DIR) + + + ## added standard variables (FORCE or cmake won't pick 'em) diff --git a/srcpkgs/hedgewars/template b/srcpkgs/hedgewars/template index ab8ded8aca7c8c..28ee10af000361 100644 --- a/srcpkgs/hedgewars/template +++ b/srcpkgs/hedgewars/template @@ -1,13 +1,13 @@ # Template file for 'hedgewars' pkgname=hedgewars version=1.0.2 -revision=2 +revision=3 build_style=cmake configure_args="-DNOSERVER=1 -DDATA_INSTALL_DIR=/usr/share/${pkgname} -DPHYSFS_SYSTEM=1 -DMINIMAL_FLAGS=1" make_cmd=make hostmakedepends="lua51 pkg-config qt5-qmake qt5-host-tools" -makedepends="ffmpeg6-devel lua51-devel physfs-devel qt5-tools-devel SDL2_image-devel +makedepends="ffmpeg-devel lua51-devel physfs-devel qt5-tools-devel SDL2_image-devel SDL2_mixer-devel SDL2_net-devel SDL2_ttf-devel" depends="libfreeglut" short_desc="Funny turn-based artillery game, featuring fighting Hedgehogs!" From 221165f20d7c1fb56f68c572db8f22ac93b4e679 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 083/110] dolphin-emu: revbump for ffmpeg8 --- srcpkgs/dolphin-emu/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dolphin-emu/template b/srcpkgs/dolphin-emu/template index bc04488c880f77..91c8a2a30a71e6 100644 --- a/srcpkgs/dolphin-emu/template +++ b/srcpkgs/dolphin-emu/template @@ -1,7 +1,7 @@ # Template file for 'dolphin-emu' pkgname=dolphin-emu version=2509 -revision=2 +revision=3 _cubeb_commit=54217bca3f3e0cd53c073690a23dd25d83557909 _fmt_commit=e69e5f977d458f2650bb346dadf2ad30c5320281 _googletest_commit=40412d85124f7c6f3d88454583c4633e5e10fc8c @@ -20,7 +20,7 @@ build_style=cmake configure_args="-DDISTRIBUTOR=voidlinux.org -DENABLE_ANALYTICS=OFF -DENABLE_AUTOUPDATE=OFF -DUSE_DISCORD_PRESENCE=OFF" hostmakedepends="gettext pkg-config python3 qt6-base qt6-tools" -makedepends="SDL3-devel SFML-devel alsa-lib-devel ffmpeg6-devel glew-devel +makedepends="SDL3-devel SFML-devel alsa-lib-devel ffmpeg-devel glew-devel hidapi-devel libbluetooth-devel libcurl-devel libenet-devel libevdev-devel libgomp-devel liblz4-devel liblzma-devel libopenal-devel libusb-devel lzo-devel mbedtls2-devel miniupnpc-devel portaudio-devel pugixml-devel pulseaudio-devel From 549af5e077b6296168ebd846da5a34d59de10f68 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 084/110] vba-m: revbump for ffmpeg8 --- srcpkgs/vba-m/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/vba-m/template b/srcpkgs/vba-m/template index 9e1ee2fcb88566..2d7b68b742cd13 100644 --- a/srcpkgs/vba-m/template +++ b/srcpkgs/vba-m/template @@ -2,13 +2,13 @@ pkgname=vba-m reverts=1292_2 version=2.2.3 -revision=2 +revision=3 build_style=cmake build_helper="cmake-wxWidgets-gtk3" configure_args="-DENABLE_GTK=TRUE -DENABLE_FFMPEG=TRUE -DENABLE_LINK=TRUE -DCMAKE_BUILD_TYPE=Release" hostmakedepends="gettext pkg-config unzip zip yasm wxWidgets-gtk3-devel" makedepends="zlib-devel libpng-devel MesaLib-devel libopenal-devel SDL2-devel - gtkmm2-devel ffmpeg6-devel gtk+3-devel x264-devel x265-devel + gtkmm2-devel ffmpeg-devel gtk+3-devel x264-devel x265-devel SFML-devel wxWidgets-gtk3-devel libgomp-devel" short_desc="Gameboy Advance Emulator" maintainer="Andrea Brancaleoni " From d5c1d8542124909d4350c19dd264764dd2346224 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:43 -0500 Subject: [PATCH 085/110] arcan: revbump for ffmpeg8 --- srcpkgs/arcan/patches/ffmpeg8.patch | 34 +++++++++++++++++++++++++++++ srcpkgs/arcan/template | 4 ++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/arcan/patches/ffmpeg8.patch diff --git a/srcpkgs/arcan/patches/ffmpeg8.patch b/srcpkgs/arcan/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..0a4241bd6dac32 --- /dev/null +++ b/srcpkgs/arcan/patches/ffmpeg8.patch @@ -0,0 +1,34 @@ +--- a/arcan/src/frameserver/encode/default/encode_presets.c ++++ b/arcan/src/frameserver/encode/default/encode_presets.c +@@ -63,7 +63,6 @@ + dst->storage.video.codec, NULL) != 0){ + dst->storage.video.codec = NULL; + dst->storage.video.context = NULL; +- avcodec_close(dst->storage.video.context); + return false; + } + +@@ -91,7 +90,6 @@ + + if (avcodec_open2( + dst->storage.audio.context, dst->storage.audio.codec, NULL) != 0){ +- avcodec_close(dst->storage.audio.context); + dst->storage.audio.context = NULL; + dst->storage.audio.codec = NULL; + return false; +@@ -181,7 +179,6 @@ + + if (avcodec_open2(dst->storage.video.context, + dst->storage.video.codec, &opts) != 0){ +- avcodec_close(dst->storage.video.context); + dst->storage.video.context = NULL; + dst->storage.video.codec = NULL; + return false; +@@ -247,7 +244,6 @@ + width, height, fps, vbr / 1024); + if (avcodec_open2(dst->storage.video.context, + dst->storage.video.codec, &opts) != 0){ +- avcodec_close(dst->storage.video.context); + dst->storage.video.context = NULL; + dst->storage.video.codec = NULL; + return false; diff --git a/srcpkgs/arcan/template b/srcpkgs/arcan/template index 088a3809d37f94..1bb31c87cce7a9 100644 --- a/srcpkgs/arcan/template +++ b/srcpkgs/arcan/template @@ -2,7 +2,7 @@ # !! keep synced with: acfgfs aclip aloadimage pkgname=arcan version=0.7.1 -revision=1 +revision=2 create_wrksrc=yes build_wrksrc=arcan/src build_style=cmake @@ -12,7 +12,7 @@ configure_args="-DDISTR_TAG='VoidLinux' -DVIDEO_PLATFORM=egl-dri $(vopt_if luajit '-DDISABLE_JIT=OFF' '-DDISABLE_JIT=ON')" hostmakedepends="pkg-config $(vopt_if wayland wayland-devel)" -makedepends="MesaLib-devel ffmpeg6-devel file-devel freetype-devel liblzma-devel +makedepends="MesaLib-devel ffmpeg-devel file-devel freetype-devel liblzma-devel libopenal-devel libusb-devel libvncserver-devel libxkbcommon-devel sqlite-devel vlc-devel SDL2-devel xcb-util-devel xcb-util-wm-devel mupdf-devel $(vopt_if tts 'libespeak-ng-devel') From c428cedf4780bbee894a03f873372bf49c25af6c Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 086/110] openimageio: revbump for ffmpeg8 --- srcpkgs/openimageio/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/openimageio/template b/srcpkgs/openimageio/template index 136000b19c7224..699a9d0f00d0bd 100644 --- a/srcpkgs/openimageio/template +++ b/srcpkgs/openimageio/template @@ -1,7 +1,7 @@ # Template file for 'openimageio' pkgname=openimageio version=3.1.8.0 -revision=1 +revision=2 build_style=cmake build_helper=qemu configure_args="-DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=0 @@ -10,7 +10,7 @@ configure_args="-DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=0 hostmakedepends="pkg-config git" makedepends="boost-headers giflib-devel libraw-devel libopenjpeg2-devel libwebp-devel libjpeg-turbo-devel tiff-devel libpng-devel libopenexr-devel freetype-devel - ffmpeg6-devel opencolorio-devel ptex-devel libheif-devel openvdb-devel + ffmpeg-devel opencolorio-devel ptex-devel libheif-devel openvdb-devel robin-map fmt-devel libjxl-devel" short_desc="Library for reading and writing images" maintainer="lemmi " From d5dddddfa3ff94a36b75308dae5603881f3dd864 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 087/110] blender: revbump for ffmpeg8 --- srcpkgs/blender/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template index f08a3386d351e3..1e3f21d5bc33c2 100644 --- a/srcpkgs/blender/template +++ b/srcpkgs/blender/template @@ -1,7 +1,7 @@ # Template file for 'blender' pkgname=blender version=5.0.0 -revision=1 +revision=2 archs="x86_64* aarch64* ppc64*" build_style=cmake build_helper="qemu numpy" @@ -19,7 +19,7 @@ configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF hostmakedepends="pkg-config python3 wayland-devel" makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel - libsamplerate-devel ffmpeg6-devel fftw-devel boost-headers pcre-devel llvm + libsamplerate-devel ffmpeg-devel fftw-devel boost-headers pcre-devel llvm libopenexr-devel libopenjpeg2-devel libXi-devel openimageio-devel opencolorio-devel opencollada-devel python3-numpy libXrender-devel OpenSubdiv-devel tbb-devel libxml2-devel openvdb-devel alembic-devel From 7e1481b0ce3fd1a9a712f53b13f0c139915b0c2c Mon Sep 17 00:00:00 2001 From: zlice Date: Tue, 2 Dec 2025 18:15:19 -0500 Subject: [PATCH 088/110] deadbeef: revbump for ffmpeg8 --- srcpkgs/deadbeef/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/deadbeef/template b/srcpkgs/deadbeef/template index 6a173fb6600f5b..ddbe981a0be647 100644 --- a/srcpkgs/deadbeef/template +++ b/srcpkgs/deadbeef/template @@ -1,13 +1,13 @@ # Template file for 'deadbeef' pkgname=deadbeef version=1.10.2 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-oss --disable-gtk2 --disable-libretro" hostmakedepends="automake libtool gettext gettext-devel intltool pkg-config yasm clang glib-devel" makedepends=" - alsa-lib-devel dbus-devel faad2-devel ffmpeg6-devel gtk+3-devel + alsa-lib-devel dbus-devel faad2-devel ffmpeg-devel gtk+3-devel jansson-devel libcddb-devel libcdio-devel libcurl-devel libflac-devel libmad-devel libsamplerate-devel libsndfile-devel libvorbis-devel libzip-devel mpg123-devel opusfile-devel pulseaudio-devel From b91d91d5cf7736a3313e74ba8408fff075c6503a Mon Sep 17 00:00:00 2001 From: zlice Date: Fri, 5 Dec 2025 17:36:19 -0500 Subject: [PATCH 089/110] aubio: revbump for ffmpeg8 --- srcpkgs/aubio/patches/ffmpeg8.patch | 348 ++++++++++++++++++++++++++++ srcpkgs/aubio/template | 4 +- 2 files changed, 350 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/aubio/patches/ffmpeg8.patch diff --git a/srcpkgs/aubio/patches/ffmpeg8.patch b/srcpkgs/aubio/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..57d5aad13e2c7d --- /dev/null +++ b/srcpkgs/aubio/patches/ffmpeg8.patch @@ -0,0 +1,348 @@ +from current git file vs 49 release (2025-dec) +--- a/src/io/source_avcodec.c ++++ b/src/io/source_avcodec.c +@@ -24,11 +24,7 @@ + + #include + #include +-#if defined(HAVE_SWRESAMPLE) + #include +-#elif defined(HAVE_AVRESAMPLE) +-#include +-#endif + #include + + // determine whether we use libavformat from ffmpeg or from libav +@@ -56,6 +52,12 @@ + #define av_packet_unref av_free_packet + #endif + ++#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57,28,100) ++//#warning "libavutil < 57.28.100 is deprecated" ++#else ++#define LIBAVUTIL_HAS_CH_LAYOUT ++#endif ++ + #include "aubio_priv.h" + #include "fvec.h" + #include "fmat.h" +@@ -64,8 +66,14 @@ + + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 56, 0) + #define AUBIO_AVCODEC_MAX_BUFFER_SIZE FF_MIN_BUFFER_SIZE +-#else ++#elif LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 40, 100) + #define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE ++#else ++#define AUBIO_AVCODEC_MAX_BUFFER_SIZE 16384 ++#endif ++ ++#if LIBAVCODEC_VERSION_MAJOR >= 59 ++#define FF_API_LAVF_AVCTX 1 + #endif + + struct _aubio_source_avcodec_t { +@@ -82,12 +90,12 @@ + AVFormatContext *avFormatCtx; + AVCodecContext *avCodecCtx; + AVFrame *avFrame; ++#if FF_API_INIT_PACKET ++ AVPacket *avPacket; ++#else + AVPacket avPacket; +-#ifdef HAVE_AVRESAMPLE +- AVAudioResampleContext *avr; +-#elif defined(HAVE_SWRESAMPLE) +- SwrContext *avr; + #endif ++ SwrContext *avr; + smpl_t *output; + uint_t read_samples; + uint_t read_index; +@@ -122,11 +130,15 @@ + AVFormatContext *avFormatCtx = NULL; + AVCodecContext *avCodecCtx = NULL; + AVFrame *avFrame = NULL; ++#if FF_API_INIT_PACKET ++ AVPacket *avPacket = NULL; ++#endif + sint_t selected_stream = -1; + #if FF_API_LAVF_AVCTX + AVCodecParameters *codecpar; + #endif +- AVCodec *codec; ++ ++ const AVCodec *codec; + uint_t i; + int err; + if (path == NULL) { +@@ -259,7 +271,11 @@ + + /* get input specs */ + s->input_samplerate = avCodecCtx->sample_rate; ++#ifdef LIBAVUTIL_HAS_CH_LAYOUT ++ s->input_channels = avCodecCtx->ch_layout.nb_channels; ++#else + s->input_channels = avCodecCtx->channels; ++#endif + //AUBIO_DBG("input_samplerate: %d\n", s->input_samplerate); + //AUBIO_DBG("input_channels: %d\n", s->input_channels); + +@@ -277,8 +293,17 @@ + avFrame = av_frame_alloc(); + if (!avFrame) { + AUBIO_ERR("source_avcodec: Could not allocate frame for (%s)\n", s->path); ++ goto beach; + } + ++#if FF_API_INIT_PACKET ++ avPacket = av_packet_alloc(); ++ if (!avPacket) { ++ AUBIO_ERR("source_avcodec: Could not allocate packet for (%s)\n", s->path); ++ goto beach; ++ } ++#endif ++ + /* allocate output for avr */ + s->output = (smpl_t *)av_malloc(AUBIO_AVCODEC_MAX_BUFFER_SIZE + * sizeof(smpl_t)); +@@ -289,6 +314,9 @@ + s->avFormatCtx = avFormatCtx; + s->avCodecCtx = avCodecCtx; + s->avFrame = avFrame; ++#if FF_API_INIT_PACKET ++ s->avPacket = avPacket; ++#endif + + aubio_source_avcodec_reset_resampler(s); + +@@ -312,16 +340,27 @@ + // create or reset resampler to/from mono/multi-channel + if ( s->avr == NULL ) { + int err; ++ SwrContext *avr = swr_alloc(); ++#ifdef LIBAVUTIL_HAS_CH_LAYOUT ++ AVChannelLayout input_layout; ++ AVChannelLayout output_layout; ++ av_channel_layout_default(&input_layout, s->input_channels); ++ av_channel_layout_default(&output_layout, s->input_channels); ++ ++#if LIBSWRESAMPLE_VERSION_INT < AV_VERSION_INT (4, 5, 100) ++ av_opt_set_chlayout(avr, "in_channel_layout", &input_layout, 0); ++ av_opt_set_chlayout(avr, "out_channel_layout", &output_layout, 0); ++#else ++ av_opt_set_chlayout(avr, "in_chlayout", &input_layout, 0); ++ av_opt_set_chlayout(avr, "out_chlayout", &output_layout, 0); ++#endif ++#else + int64_t input_layout = av_get_default_channel_layout(s->input_channels); + int64_t output_layout = av_get_default_channel_layout(s->input_channels); +-#ifdef HAVE_AVRESAMPLE +- AVAudioResampleContext *avr = avresample_alloc_context(); +-#elif defined(HAVE_SWRESAMPLE) +- SwrContext *avr = swr_alloc(); +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + + av_opt_set_int(avr, "in_channel_layout", input_layout, 0); + av_opt_set_int(avr, "out_channel_layout", output_layout, 0); ++#endif + av_opt_set_int(avr, "in_sample_rate", s->input_samplerate, 0); + av_opt_set_int(avr, "out_sample_rate", s->samplerate, 0); + av_opt_set_int(avr, "in_sample_fmt", s->avCodecCtx->sample_fmt, 0); +@@ -332,11 +371,7 @@ + #endif + // TODO: use planar? + //av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_FLTP, 0); +-#ifdef HAVE_AVRESAMPLE +- if ( ( err = avresample_open(avr) ) < 0) +-#elif defined(HAVE_SWRESAMPLE) + if ( ( err = swr_init(avr) ) < 0) +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + { + char errorstr[256]; + av_strerror (err, errorstr, sizeof(errorstr)); +@@ -354,36 +389,34 @@ + AVFormatContext *avFormatCtx = s->avFormatCtx; + AVCodecContext *avCodecCtx = s->avCodecCtx; + AVFrame *avFrame = s->avFrame; +- AVPacket avPacket = s->avPacket; +-#ifdef HAVE_AVRESAMPLE +- AVAudioResampleContext *avr = s->avr; +-#elif defined(HAVE_SWRESAMPLE) ++#if FF_API_INIT_PACKET ++ AVPacket *avPacket = s->avPacket; ++#else ++ AVPacket *avPacket = &s->avPacket; ++#endif + SwrContext *avr = s->avr; +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + int got_frame = 0; +-#ifdef HAVE_AVRESAMPLE +- int in_linesize = 0; +- int in_samples = avFrame->nb_samples; +- int out_linesize = 0; +- int max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE; +- int out_samples = 0; +-#elif defined(HAVE_SWRESAMPLE) + int in_samples = avFrame->nb_samples; ++#ifdef LIBAVUTIL_HAS_CH_LAYOUT ++ int max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE / avCodecCtx->ch_layout.nb_channels; ++#else + int max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE / avCodecCtx->channels; ++#endif + int out_samples = 0; +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + smpl_t *output = s->output; + #ifndef FF_API_LAVF_AVCTX + int len = 0; + #else + int ret = 0; + #endif +- av_init_packet (&avPacket); ++#ifndef FF_API_INIT_PACKET ++ av_init_packet (avPacket); ++#endif + *read_samples = 0; + + do + { +- int err = av_read_frame (avFormatCtx, &avPacket); ++ int err = av_read_frame (avFormatCtx, avPacket); + if (err == AVERROR_EOF) { + s->eof = 1; + goto beach; +@@ -396,10 +429,10 @@ + s->eof = 1; + goto beach; + } +- } while (avPacket.stream_index != s->selected_stream); ++ } while (avPacket->stream_index != s->selected_stream); + + #if FF_API_LAVF_AVCTX +- ret = avcodec_send_packet(avCodecCtx, &avPacket); ++ ret = avcodec_send_packet(avCodecCtx, avPacket); + if (ret < 0 && ret != AVERROR_EOF) { + AUBIO_ERR("source_avcodec: error when sending packet for %s\n", s->path); + goto beach; +@@ -422,7 +455,7 @@ + } + } + #else +- len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, &avPacket); ++ len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, avPacket); + + if (len < 0) { + AUBIO_ERR("source_avcodec: error while decoding %s\n", s->path); +@@ -436,33 +469,27 @@ + } + + #if LIBAVUTIL_VERSION_MAJOR > 52 +- if (avFrame->channels != (sint_t)s->input_channels) { ++#ifdef LIBAVUTIL_HAS_CH_LAYOUT ++ int frame_channels = avFrame->ch_layout.nb_channels; ++#else ++ int frame_channels = avFrame->channels; ++#endif ++ if (frame_channels != (sint_t)s->input_channels) { + AUBIO_WRN ("source_avcodec: trying to read from %d channel(s)," + "but configured for %d; is '%s' corrupt?\n", +- avFrame->channels, s->input_channels, s->path); ++ frame_channels, s->input_channels, s->path); + goto beach; + } + #else + #warning "avutil < 53 is deprecated, crashes might occur on corrupt files" + #endif + +-#ifdef HAVE_AVRESAMPLE +- in_linesize = 0; +- av_samples_get_buffer_size(&in_linesize, avCodecCtx->channels, +- avFrame->nb_samples, avCodecCtx->sample_fmt, 1); + in_samples = avFrame->nb_samples; +- out_linesize = 0; + max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE; +- out_samples = avresample_convert ( avr, +- (uint8_t **)&output, out_linesize, max_out_samples, +- (uint8_t **)avFrame->data, in_linesize, in_samples); +-#elif defined(HAVE_SWRESAMPLE) +- in_samples = avFrame->nb_samples; +- max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE / avCodecCtx->channels; ++ if (frame_channels > 0) max_out_samples /= frame_channels; + out_samples = swr_convert( avr, + (uint8_t **)&output, max_out_samples, + (const uint8_t **)avFrame->data, in_samples); +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + if (out_samples < 0) { + AUBIO_WRN("source_avcodec: error while resampling %s (%d)\n", + s->path, out_samples); +@@ -472,7 +499,7 @@ + *read_samples = out_samples; + + beach: +- av_packet_unref(&avPacket); ++ av_packet_unref(avPacket); + } + + void aubio_source_avcodec_do(aubio_source_avcodec_t * s, fvec_t * read_data, +@@ -596,19 +623,13 @@ + s->eof = 0; + s->read_index = 0; + s->read_samples = 0; +-#ifdef HAVE_AVRESAMPLE +- // reset the AVAudioResampleContext +- avresample_close(s->avr); +- avresample_open(s->avr); +-#elif defined(HAVE_SWRESAMPLE) + swr_close(s->avr); + swr_init(s->avr); +-#endif + return ret; + } + + uint_t aubio_source_avcodec_get_duration (aubio_source_avcodec_t * s) { +- if (s && &(s->avFormatCtx) != NULL) { ++ if (s && s->avFormatCtx != NULL) { + int64_t duration = s->avFormatCtx->duration; + return s->samplerate * ((uint_t)duration / 1e6 ); + } +@@ -617,13 +638,8 @@ + + uint_t aubio_source_avcodec_close(aubio_source_avcodec_t * s) { + if (s->avr != NULL) { +-#ifdef HAVE_AVRESAMPLE +- avresample_close( s->avr ); +- av_free ( s->avr ); +-#elif defined(HAVE_SWRESAMPLE) + swr_close ( s->avr ); + swr_free ( &s->avr ); +-#endif + } + s->avr = NULL; + if (s->avCodecCtx != NULL) { +@@ -638,7 +654,13 @@ + avformat_close_input(&s->avFormatCtx); + s->avFormatCtx = NULL; + } ++#if FF_API_INIT_PACKET ++ if (s->avPacket) { ++ av_packet_unref(s->avPacket); ++ } ++#else + av_packet_unref(&s->avPacket); ++#endif + return AUBIO_OK; + } + +@@ -653,6 +675,12 @@ + av_frame_free( &(s->avFrame) ); + } + s->avFrame = NULL; ++#if FF_API_INIT_PACKET ++ if (s->avPacket != NULL) { ++ av_packet_free( &(s->avPacket) ); ++ } ++ s->avPacket = NULL; ++#endif + if (s->path) { + AUBIO_FREE(s->path); + } diff --git a/srcpkgs/aubio/template b/srcpkgs/aubio/template index 98b5b8168c2a25..926e0dccd9ce59 100644 --- a/srcpkgs/aubio/template +++ b/srcpkgs/aubio/template @@ -1,11 +1,11 @@ # Template file for 'aubio' pkgname=aubio version=0.4.9 -revision=2 +revision=3 build_style=waf3 # XXX lash, pure and swig support. hostmakedepends="pkg-config txt2man" -makedepends="libsamplerate-devel fftw-devel jack-devel ffmpeg6-devel" +makedepends="libsamplerate-devel fftw-devel jack-devel ffmpeg-devel" short_desc="Library for audio labelling" maintainer="Orphaned " license="GPL-3.0-or-later" From 100c86403708972c38d01b67e57c47cb6ad9ba0d Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 22 Dec 2025 16:57:42 -0500 Subject: [PATCH 090/110] vlc: revbump for ffmpeg4 --- srcpkgs/vlc/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/vlc/template b/srcpkgs/vlc/template index 97aff2445a2b8f..fa550d4ba83f34 100644 --- a/srcpkgs/vlc/template +++ b/srcpkgs/vlc/template @@ -25,7 +25,7 @@ lib32disabled=yes hostmakedepends="automake libtool pkg-config flex gettext libgcrypt-devel live555-devel gettext-devel $(vopt_if lua lua52) $(vopt_if chromecast protobuf)" makedepends=" - avahi-libs-devel dbus-glib-devel faad2-devel ffmpeg-devel freefont-ttf + avahi-libs-devel dbus-glib-devel faad2-devel ffmpeg4-devel freefont-ttf gnutls-devel jack-devel liba52-devel libass-devel libbluray-devel libcdio-devel libdca-devel libdvbpsi-devel libdvdnav-devel libmad-devel libmatroska-devel libmodplug-devel libmpcdec-devel libmpeg2-devel From 512bf7c2b5783d469a35edea7503a25391a6c248 Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 22 Dec 2025 16:58:10 -0500 Subject: [PATCH 091/110] tvheadend: revbump for ffmpeg8 --- srcpkgs/tvheadend/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/tvheadend/template b/srcpkgs/tvheadend/template index 4bafba0f5954f0..ed09f06778c732 100644 --- a/srcpkgs/tvheadend/template +++ b/srcpkgs/tvheadend/template @@ -1,14 +1,14 @@ # Template file for 'tvheadend' pkgname=tvheadend version=4.3 -revision=1 +revision=2 build_style=gnu-configure configure_args="--enable-dvbscan --disable-ffmpeg_static --disable-hdhomerun_static --disable-bintray_cache --disable-libx264_static --disable-libx265_static --disable-libvpx_static --disable-libtheora_static --disable-libvorbis_static --disable-libfdkaac_static" hostmakedepends="gettext pkg-config python3 git which" -makedepends="avahi-libs-devel openssl-devel zlib-devel libcurl-devel ffmpeg6-devel" +makedepends="avahi-libs-devel openssl-devel zlib-devel libcurl-devel ffmpeg-devel" short_desc="TV streaming server" maintainer="lemmi " license="GPL-3.0-only" From 50f4d5e202b407590d1a3eb4f06a931b77d8adb3 Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 22 Dec 2025 16:58:42 -0500 Subject: [PATCH 092/110] ppsspp: revbump for ffmpeg4 --- srcpkgs/ppsspp/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/ppsspp/template b/srcpkgs/ppsspp/template index 6e901924c3152c..99d0fa7c284d6a 100644 --- a/srcpkgs/ppsspp/template +++ b/srcpkgs/ppsspp/template @@ -9,7 +9,7 @@ configure_args="-DHEADLESS=1 -DUSE_SYSTEM_FFMPEG=1 -DUNITTEST=ON -DUSING_QT_UI=$(vopt_if qt ON OFF) -DUSE_SYSTEM_ZSTD=ON -DARMIPS_USE_STD_FILESYSTEM=ON" hostmakedepends="pkg-config python3 $(vopt_if qt qt5-host-tools)" -makedepends="zlib-devel glew-devel ffmpeg-devel libzip-devel +makedepends="zlib-devel glew-devel ffmpeg4-devel libzip-devel snappy-devel rapidjson libpng-devel libzstd-devel $(vopt_if sdl2 'SDL2_ttf-devel SDL2-devel') wayland-devel $(vopt_if qt 'qt5-devel qt5-multimedia-devel')" From 89d26837792e2d8961ba3ae91f5c5d5b214564bf Mon Sep 17 00:00:00 2001 From: zlice Date: Tue, 23 Dec 2025 10:13:53 -0500 Subject: [PATCH 093/110] qt5-webengine: revbump for ffmpeg8 --- .../patches/0075-musl-lfs64.patch | 38 ++ .../0200-qt5-qtwebengine-ffmpeg7.patch | 493 ++++++++++++++++++ .../0201-qt5-qtwebengine-ffmpeg8.patch | 113 ++++ .../patches/0202-more-ffmpeg8.patch | 55 ++ .../patches/9999-cpp17-fixes.patch | 105 ++++ .../patches/9999-spellcheck-buildflags.patch | 10 + .../chromium-media-filters-cpp17.patch | 11 + .../patches/qt5-webengine-icu-78.patch | 16 + srcpkgs/qt5-webengine/template | 4 +- 9 files changed, 843 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/qt5-webengine/patches/0075-musl-lfs64.patch create mode 100644 srcpkgs/qt5-webengine/patches/0200-qt5-qtwebengine-ffmpeg7.patch create mode 100644 srcpkgs/qt5-webengine/patches/0201-qt5-qtwebengine-ffmpeg8.patch create mode 100644 srcpkgs/qt5-webengine/patches/0202-more-ffmpeg8.patch create mode 100644 srcpkgs/qt5-webengine/patches/9999-cpp17-fixes.patch create mode 100644 srcpkgs/qt5-webengine/patches/9999-spellcheck-buildflags.patch create mode 100644 srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp17.patch create mode 100644 srcpkgs/qt5-webengine/patches/qt5-webengine-icu-78.patch diff --git a/srcpkgs/qt5-webengine/patches/0075-musl-lfs64.patch b/srcpkgs/qt5-webengine/patches/0075-musl-lfs64.patch new file mode 100644 index 00000000000000..9beda0df656733 --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/0075-musl-lfs64.patch @@ -0,0 +1,38 @@ +--- a/src/3rdparty/gn/base/files/file_util_posix.cc ++++ b/src/3rdparty/gn/base/files/file_util_posix.cc +@@ -55,8 +55,7 @@ + + namespace { + +-#if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) || \ +- defined(OS_ANDROID) && __ANDROID_API__ < 21 ++#ifndef __GLIBC__ + int CallStat(const char* path, stat_wrapper_t* sb) { + return stat(path, sb); + } + +--- a/src/3rdparty/gn/base/files/file.h ++++ b/src/3rdparty/gn/base/files/file.h +@@ -22,8 +22,7 @@ + + namespace base { + +-#if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) || \ +- defined(OS_ANDROID) && __ANDROID_API__ < 21 ++#ifndef __GLIBC__ + typedef struct stat stat_wrapper_t; + #elif defined(OS_POSIX) || defined(OS_FUCHSIA) + typedef struct stat64 stat_wrapper_t; + +--- a/src/3rdparty/gn/base/files/file_posix.cc ++++ b/src/3rdparty/gn/base/files/file_posix.cc +@@ -24,8 +24,7 @@ + + namespace { + +-#if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) || \ +- defined(OS_ANDROID) && __ANDROID_API__ < 21 ++#ifndef __GLIBC__ + int CallFstat(int fd, stat_wrapper_t* sb) { + return fstat(fd, sb); + } diff --git a/srcpkgs/qt5-webengine/patches/0200-qt5-qtwebengine-ffmpeg7.patch b/srcpkgs/qt5-webengine/patches/0200-qt5-qtwebengine-ffmpeg7.patch new file mode 100644 index 00000000000000..182239fdd25c0a --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/0200-qt5-qtwebengine-ffmpeg7.patch @@ -0,0 +1,493 @@ +From 6e554a30893150793c2638e3689cf208ffc8e375 Mon Sep 17 00:00:00 2001 +From: Dale Curtis +Date: Sat, 2 Apr 2022 05:13:53 +0000 +Subject: [PATCH] Roll src/third_party/ffmpeg/ 574c39cce..32b2d1d526 (1125 + commits) + +https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/574c39cce323..32b2d1d526 + +Created with: + roll-dep src/third_party/ffmpeg + +Fixed: 1293918 +Cq-Include-Trybots: luci.chromium.try:mac_chromium_asan_rel_ng,linux_chromium_asan_rel_ng,linux_chromium_chromeos_asan_rel_ng +Change-Id: I41945d0f963e3d1f65940067bac22f63b68e37d2 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565647 +Auto-Submit: Dale Curtis +Reviewed-by: Dan Sanders +Commit-Queue: Dale Curtis +Cr-Commit-Position: refs/heads/main@{#988253} +--- + .../clear_key_cdm/ffmpeg_cdm_audio_decoder.cc | 29 ++++++++++--------- + media/ffmpeg/ffmpeg_common.cc | 11 +++---- + media/filters/audio_file_reader.cc | 9 +++--- + media/filters/audio_file_reader_unittest.cc | 6 ++-- + .../filters/audio_video_metadata_extractor.cc | 11 +++++-- + .../filters/ffmpeg_aac_bitstream_converter.cc | 7 +++-- + ...ffmpeg_aac_bitstream_converter_unittest.cc | 2 +- + media/filters/ffmpeg_audio_decoder.cc | 13 +++++---- + 8 files changed, 51 insertions(+), 37 deletions(-) + +diff --git a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc +index a043005..9ae2ca9 100644 +--- a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc ++++ b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc +@@ -73,7 +73,7 @@ void CdmAudioDecoderConfigToAVCodecContext( + codec_context->sample_fmt = AV_SAMPLE_FMT_NONE; + } + +- codec_context->channels = config.channel_count; ++ codec_context->ch_layout.nb_channels = config.channel_count; + codec_context->sample_rate = config.samples_per_second; + + if (config.extra_data) { +@@ -123,8 +123,8 @@ void CopySamples(cdm::AudioFormat cdm_format, + case cdm::kAudioFormatPlanarS16: + case cdm::kAudioFormatPlanarF32: { + const int decoded_size_per_channel = +- decoded_audio_size / av_frame.channels; +- for (int i = 0; i < av_frame.channels; ++i) { ++ decoded_audio_size / av_frame.ch_layout.nb_channels; ++ for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) { + memcpy(output_buffer, av_frame.extended_data[i], + decoded_size_per_channel); + output_buffer += decoded_size_per_channel; +@@ -184,13 +184,14 @@ bool FFmpegCdmAudioDecoder::Initialize( + // Success! + decoding_loop_.reset(new FFmpegDecodingLoop(codec_context_.get())); + samples_per_second_ = config.samples_per_second; +- bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8; ++ bytes_per_frame_ = ++ codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8; + output_timestamp_helper_.reset( + new AudioTimestampHelper(config.samples_per_second)); + is_initialized_ = true; + + // Store initial values to guard against midstream configuration changes. +- channels_ = codec_context_->channels; ++ channels_ = codec_context_->ch_layout.nb_channels; + av_sample_format_ = codec_context_->sample_fmt; + + return true; +@@ -290,17 +291,18 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer( + for (auto& frame : audio_frames) { + int decoded_audio_size = 0; + if (frame->sample_rate != samples_per_second_ || +- frame->channels != channels_ || frame->format != av_sample_format_) { ++ frame->ch_layout.nb_channels != channels_ || ++ frame->format != av_sample_format_) { + DLOG(ERROR) << "Unsupported midstream configuration change!" + << " Sample Rate: " << frame->sample_rate << " vs " +- << samples_per_second_ << ", Channels: " << frame->channels ++ << samples_per_second_ << ", Channels: " << frame->ch_layout.nb_channels + << " vs " << channels_ << ", Sample Format: " << frame->format + << " vs " << av_sample_format_; + return cdm::kDecodeError; + } + + decoded_audio_size = av_samples_get_buffer_size( +- nullptr, codec_context_->channels, frame->nb_samples, ++ nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples, + codec_context_->sample_fmt, 1); + if (!decoded_audio_size) + continue; +@@ -319,7 +321,7 @@ bool FFmpegCdmAudioDecoder::OnNewFrame( + size_t* total_size, + std::vector>* audio_frames, + AVFrame* frame) { +- *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels, ++ *total_size += av_samples_get_buffer_size(nullptr, codec_context_->ch_layout.nb_channels, + frame->nb_samples, + codec_context_->sample_fmt, 1); + audio_frames->emplace_back(av_frame_clone(frame)); +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +index c17dd9f..0448cb5 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -341,10 +341,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + codec_context->sample_fmt, codec_context->codec_id); + + ChannelLayout channel_layout = +- codec_context->channels > 8 ++ codec_context->ch_layout.nb_channels > 8 + ? CHANNEL_LAYOUT_DISCRETE +- : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout, +- codec_context->channels); ++ : ChannelLayoutToChromeChannelLayout( ++ codec_context->ch_layout.u.mask, ++ codec_context->ch_layout.nb_channels); + + int sample_rate = codec_context->sample_rate; + switch (codec) { +@@ -397,7 +398,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + extra_data, encryption_scheme, seek_preroll, + codec_context->delay); + if (channel_layout == CHANNEL_LAYOUT_DISCRETE) +- config->SetChannelsForDiscrete(codec_context->channels); ++ config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels); + + #if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO) + // These are bitstream formats unknown to ffmpeg, so they don't have +@@ -462,7 +463,7 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config, + + // TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses + // said information to decode. +- codec_context->channels = config.channels(); ++ codec_context->ch_layout.nb_channels = config.channels(); + codec_context->sample_rate = config.samples_per_second(); + + if (config.extra_data().empty()) { +diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +index bd73908..745c4c7 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -112,14 +112,15 @@ bool AudioFileReader::OpenDecoder() { + + // Verify the channel layout is supported by Chrome. Acts as a sanity check + // against invalid files. See http://crbug.com/171962 +- if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout, +- codec_context_->channels) == ++ if (ChannelLayoutToChromeChannelLayout( ++ codec_context_->ch_layout.u.mask, ++ codec_context_->ch_layout.nb_channels) == + CHANNEL_LAYOUT_UNSUPPORTED) { + return false; + } + + // Store initial values to guard against midstream configuration changes. +- channels_ = codec_context_->channels; ++ channels_ = codec_context_->ch_layout.nb_channels; + audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id); + sample_rate_ = codec_context_->sample_rate; + av_sample_format_ = codec_context_->sample_fmt; +@@ -222,7 +223,7 @@ bool AudioFileReader::OnNewFrame( + if (frames_read < 0) + return false; + +- const int channels = frame->channels; ++ const int channels = frame->ch_layout.nb_channels; + if (frame->sample_rate != sample_rate_ || channels != channels_ || + frame->format != av_sample_format_) { + DLOG(ERROR) << "Unsupported midstream configuration change!" +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc +index 6f231c8..ca5e5fb 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc +@@ -195,14 +195,15 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) { + if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id || + audio_profile_ != stream_codec_parameters_->profile || + sample_rate_index_ != sample_rate_index || +- channel_configuration_ != stream_codec_parameters_->channels || ++ channel_configuration_ != ++ stream_codec_parameters_->ch_layout.nb_channels || + frame_length_ != header_plus_packet_size) { + header_generated_ = + GenerateAdtsHeader(stream_codec_parameters_->codec_id, + 0, // layer + stream_codec_parameters_->profile, sample_rate_index, + 0, // private stream +- stream_codec_parameters_->channels, ++ stream_codec_parameters_->ch_layout.nb_channels, + 0, // originality + 0, // home + 0, // copyrighted_stream +@@ -214,7 +215,7 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) { + codec_ = stream_codec_parameters_->codec_id; + audio_profile_ = stream_codec_parameters_->profile; + sample_rate_index_ = sample_rate_index; +- channel_configuration_ = stream_codec_parameters_->channels; ++ channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels; + frame_length_ = header_plus_packet_size; + } + +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +index ac8bb13..3e4e3f6 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +@@ -29,7 +29,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test { + memset(&test_parameters_, 0, sizeof(AVCodecParameters)); + test_parameters_.codec_id = AV_CODEC_ID_AAC; + test_parameters_.profile = FF_PROFILE_AAC_MAIN; +- test_parameters_.channels = 2; ++ test_parameters_.ch_layout.nb_channels = 2; + test_parameters_.extradata = extradata_header_; + test_parameters_.extradata_size = sizeof(extradata_header_); + } +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +index 72fac61..ab49fd5 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +@@ -27,7 +27,7 @@ namespace media { + + // Return the number of channels from the data in |frame|. + static inline int DetermineChannels(AVFrame* frame) { +- return frame->channels; ++ return frame->ch_layout.nb_channels; + } + + // Called by FFmpeg's allocation routine to allocate a buffer. Uses +@@ -227,7 +227,7 @@ bool FFmpegAudioDecoder::OnNewFrame(const DecoderBuffer& buffer, + // Translate unsupported into discrete layouts for discrete configurations; + // ffmpeg does not have a labeled discrete configuration internally. + ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout( +- codec_context_->channel_layout, codec_context_->channels); ++ codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels); + if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED && + config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) { + channel_layout = CHANNEL_LAYOUT_DISCRETE; +@@ -344,11 +344,11 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) { + // Success! + av_sample_format_ = codec_context_->sample_fmt; + +- if (codec_context_->channels != config.channels()) { ++ if (codec_context_->ch_layout.nb_channels != config.channels()) { + MEDIA_LOG(ERROR, media_log_) + << "Audio configuration specified " << config.channels() + << " channels, but FFmpeg thinks the file contains " +- << codec_context_->channels << " channels"; ++ << codec_context_->ch_layout.nb_channels << " channels"; + ReleaseFFmpegResources(); + state_ = kUninitialized; + return false; +@@ -398,7 +398,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s, + if (frame->nb_samples <= 0) + return AVERROR(EINVAL); + +- if (s->channels != channels) { ++ if (s->ch_layout.nb_channels != channels) { + DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count."; + return AVERROR(EINVAL); + } +@@ -431,7 +431,8 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s, + ChannelLayout channel_layout = + config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE + ? CHANNEL_LAYOUT_DISCRETE +- : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels); ++ : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask, ++ s->ch_layout.nb_channels); + + if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) { + DLOG(ERROR) << "Unsupported channel layout."; +commit 62274859104bd828373ae406aa9309e610449ac5 +Author: Ted Meyer +Date: Fri Mar 22 19:56:55 2024 +0000 + + Replace deprecated use of AVCodecContext::reordered_opaque + + We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context + now to trigger timestamp propagation. + + Bug: 330573128 + Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858 + Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308 + Commit-Queue: Ted (Chromium) Meyer + Reviewed-by: Dan Sanders + Cr-Commit-Position: refs/heads/main@{#1277051} + +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +index 0448cb5..89e9cf9 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -414,7 +414,9 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + #if BUILDFLAG(USE_PROPRIETARY_CODECS) + // TODO(dalecurtis): Just use the profile from the codec context if ffmpeg + // ever starts supporting xHE-AAC. +- if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN) { ++ constexpr uint8_t kXHEAAc = 41; ++ if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN || ++ codec_context->profile == kXHEAAc) { + // Errors aren't fatal here, so just drop any MediaLog messages. + NullMediaLog media_log; + mp4::AAC aac_parser; +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc +index ebd1bab..04d5ecc 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc +@@ -86,16 +86,16 @@ FFMPEG_TEST_CASE(Cr47761, "crbug47761.ogg", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr50045, "crbug50045.mp4", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr62127, "crbug62127.webm", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr93620, "security/93620.ogg", PIPELINE_OK, PIPELINE_OK); +-FFMPEG_TEST_CASE(Cr100492, +- "security/100492.webm", +- DECODER_ERROR_NOT_SUPPORTED, +- DECODER_ERROR_NOT_SUPPORTED); ++FFMPEG_TEST_CASE(Cr100492, "security/100492.webm", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr100543, "security/100543.webm", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr101458, + "security/101458.webm", + PIPELINE_ERROR_DECODE, + PIPELINE_ERROR_DECODE); +-FFMPEG_TEST_CASE(Cr108416, "security/108416.webm", PIPELINE_OK, PIPELINE_OK); ++FFMPEG_TEST_CASE(Cr108416, ++ "security/108416.webm", ++ PIPELINE_ERROR_DECODE, ++ PIPELINE_ERROR_DECODE); + FFMPEG_TEST_CASE(Cr110849, + "security/110849.mkv", + DEMUXER_ERROR_COULD_NOT_OPEN, +@@ -150,7 +150,10 @@ FFMPEG_TEST_CASE(Cr234630b, + "security/234630b.mov", + DEMUXER_ERROR_NO_SUPPORTED_STREAMS, + DEMUXER_ERROR_NO_SUPPORTED_STREAMS); +-FFMPEG_TEST_CASE(Cr242786, "security/242786.webm", PIPELINE_OK, PIPELINE_OK); ++FFMPEG_TEST_CASE(Cr242786, ++ "security/242786.webm", ++ PIPELINE_OK, ++ PIPELINE_ERROR_DECODE); + // Test for out-of-bounds access with slightly corrupt file (detection logic + // thinks it's a MONO file, but actually contains STEREO audio). + FFMPEG_TEST_CASE(Cr275590, +@@ -371,8 +374,8 @@ FFMPEG_TEST_CASE(WEBM_2, + DEMUXER_ERROR_NO_SUPPORTED_STREAMS); + FFMPEG_TEST_CASE(WEBM_4, + "security/out.webm.68798.1929", +- DECODER_ERROR_NOT_SUPPORTED, +- DECODER_ERROR_NOT_SUPPORTED); ++ PIPELINE_OK, ++ PIPELINE_OK); + FFMPEG_TEST_CASE(WEBM_5, "frame_size_change.webm", PIPELINE_OK, PIPELINE_OK); + + // General MKV test cases. +diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +index 745c4c7..2b3abba 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -242,10 +242,10 @@ bool AudioFileReader::OnNewFrame( + // silence from being output. In the case where we are also discarding some + // portion of the packet (as indicated by a negative pts), we further want to + // adjust the duration downward by however much exists before zero. +- if (audio_codec_ == kCodecAAC && frame->pkt_duration) { ++ if (audio_codec_ == kCodecAAC && frame->duration) { + const base::TimeDelta pkt_duration = ConvertFromTimeBase( + glue_->format_context()->streams[stream_index_]->time_base, +- frame->pkt_duration + std::min(static_cast(0), frame->pts)); ++ frame->duration + std::min(static_cast(0), frame->pts)); + const base::TimeDelta frame_duration = base::TimeDelta::FromSecondsD( + frames_read / static_cast(sample_rate_)); + +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +index 7996606..a15aafc 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +@@ -86,7 +86,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) { + } + + FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log) +- : media_log_(media_log), state_(kUninitialized), decode_nalus_(false) { ++ : media_log_(media_log), state_(kUninitialized), decode_nalus_(false), timestamp_map_(128) { + DVLOG(1) << __func__; + thread_checker_.DetachFromThread(); + } +@@ -183,7 +183,6 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context, + frame->width = coded_size.width(); + frame->height = coded_size.height(); + frame->format = codec_context->pix_fmt; +- frame->reordered_opaque = codec_context->reordered_opaque; + + // Now create an AVBufferRef for the data just allocated. It will own the + // reference to the VideoFrame object. +@@ -318,8 +317,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) { + DCHECK(packet.data); + DCHECK_GT(packet.size, 0); + +- // Let FFmpeg handle presentation timestamp reordering. +- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds(); ++ const int64_t timestamp = buffer.timestamp().InMicroseconds(); ++ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId(); ++ timestamp_map_.Put(timestamp_id, timestamp); ++ packet.opaque = reinterpret_cast(timestamp_id.GetUnsafeValue()); + } + + switch (decoding_loop_->DecodePacket( +@@ -358,8 +359,13 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) { + + scoped_refptr video_frame = + reinterpret_cast(av_buffer_get_opaque(frame->buf[0])); ++ const auto ts_id = TimestampId(reinterpret_cast(frame->opaque)); ++ const auto ts_lookup = timestamp_map_.Get(ts_id); ++ if (ts_lookup == timestamp_map_.end()) { ++ return false; ++ } + video_frame->set_timestamp( +- base::TimeDelta::FromMicroseconds(frame->reordered_opaque)); ++ base::TimeDelta::FromMicroseconds(std::get<1>(*ts_lookup))); + video_frame->metadata()->power_efficient = false; + output_cb_.Run(video_frame); + return true; +@@ -385,8 +391,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config, + codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config); + codec_context_->thread_type = + FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME); ++ + codec_context_->opaque = this; + codec_context_->get_buffer2 = GetVideoBufferImpl; ++ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE; + + if (decode_nalus_) + codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h +index f13ce41..ee2444b 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h +@@ -8,6 +8,8 @@ + #include + #include + ++#include "base/containers/mru_cache.h" ++#include "base/util/type_safety/id_type.h" + #include "base/callback.h" + #include "base/macros.h" + #include "base/memory/ref_counted.h" +@@ -85,6 +87,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder { + // FFmpeg structures owned by this object. + std::unique_ptr codec_context_; + ++ // The gist here is that timestamps need to be 64 bits to store microsecond ++ // precision. A 32 bit integer would overflow at ~35 minutes at this level of ++ // precision. We can't cast the timestamp to the void ptr object used by the ++ // opaque field in ffmpeg then, because it would lose data on a 32 bit build. ++ // However, we don't actually have 2^31 timestamped frames in a single ++ // playback, so it's fine to use the 32 bit value as a key in a map which ++ // contains the actual timestamps. Additionally, we've in the past set 128 ++ // outstanding frames for re-ordering as a limit for cross-thread decoding ++ // tasks, so we'll do that here too with the LRU cache. ++ using TimestampId = util::IdType; ++ ++ TimestampId::Generator timestamp_id_generator_; ++ base::MRUCache timestamp_map_; ++ + VideoDecoderConfig config_; + + VideoFramePool frame_pool_; +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +index d12fade..8abfbbf 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +@@ -114,7 +114,6 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context, + int total_size = y_size + 2 * uv_size; + + av_frame->format = context->pix_fmt; +- av_frame->reordered_opaque = context->reordered_opaque; + + // Set |av_frame| members as required by FFmpeg. + av_frame->data[kYPlaneIndex] = frame_buffer->MutableDataY(); +@@ -273,8 +272,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, + return WEBRTC_VIDEO_CODEC_ERROR; + } + packet.size = static_cast(input_image.size()); +- int64_t frame_timestamp_us = input_image.ntp_time_ms_ * 1000; // ms -> μs +- av_context_->reordered_opaque = frame_timestamp_us; + + int result = avcodec_send_packet(av_context_.get(), &packet); + if (result < 0) { +@@ -290,10 +287,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, + return WEBRTC_VIDEO_CODEC_ERROR; + } + +- // We don't expect reordering. Decoded frame tamestamp should match +- // the input one. +- RTC_DCHECK_EQ(av_frame_->reordered_opaque, frame_timestamp_us); +- + absl::optional qp; + // TODO(sakal): Maybe it is possible to get QP directly from FFmpeg. + h264_bitstream_parser_.ParseBitstream(input_image.data(), input_image.size()); diff --git a/srcpkgs/qt5-webengine/patches/0201-qt5-qtwebengine-ffmpeg8.patch b/srcpkgs/qt5-webengine/patches/0201-qt5-qtwebengine-ffmpeg8.patch new file mode 100644 index 00000000000000..5b7073f2b8f864 --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/0201-qt5-qtwebengine-ffmpeg8.patch @@ -0,0 +1,113 @@ +diff -up qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.ffmpeg8 qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +--- qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.ffmpeg8 2025-11-02 21:41:06.931797956 +0000 ++++ qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc 2025-11-02 23:06:28.874349338 +0000 +@@ -237,22 +237,22 @@ AVCodecID VideoCodecToCodecID(VideoCodec + static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) { + // Clear out the CONSTRAINED & INTRA flags which are strict subsets of the + // corresponding profiles with which they're used. +- profile &= ~FF_PROFILE_H264_CONSTRAINED; +- profile &= ~FF_PROFILE_H264_INTRA; ++ profile &= ~AV_PROFILE_H264_CONSTRAINED; ++ profile &= ~AV_PROFILE_H264_INTRA; + switch (profile) { +- case FF_PROFILE_H264_BASELINE: ++ case AV_PROFILE_H264_BASELINE: + return H264PROFILE_BASELINE; +- case FF_PROFILE_H264_MAIN: ++ case AV_PROFILE_H264_MAIN: + return H264PROFILE_MAIN; +- case FF_PROFILE_H264_EXTENDED: ++ case AV_PROFILE_H264_EXTENDED: + return H264PROFILE_EXTENDED; +- case FF_PROFILE_H264_HIGH: ++ case AV_PROFILE_H264_HIGH: + return H264PROFILE_HIGH; +- case FF_PROFILE_H264_HIGH_10: ++ case AV_PROFILE_H264_HIGH_10: + return H264PROFILE_HIGH10PROFILE; +- case FF_PROFILE_H264_HIGH_422: ++ case AV_PROFILE_H264_HIGH_422: + return H264PROFILE_HIGH422PROFILE; +- case FF_PROFILE_H264_HIGH_444_PREDICTIVE: ++ case AV_PROFILE_H264_HIGH_444_PREDICTIVE: + return H264PROFILE_HIGH444PREDICTIVEPROFILE; + default: + DVLOG(1) << "Unknown profile id: " << profile; +@@ -263,23 +263,23 @@ static VideoCodecProfile ProfileIDToVide + static int VideoCodecProfileToProfileID(VideoCodecProfile profile) { + switch (profile) { + case H264PROFILE_BASELINE: +- return FF_PROFILE_H264_BASELINE; ++ return AV_PROFILE_H264_BASELINE; + case H264PROFILE_MAIN: +- return FF_PROFILE_H264_MAIN; ++ return AV_PROFILE_H264_MAIN; + case H264PROFILE_EXTENDED: +- return FF_PROFILE_H264_EXTENDED; ++ return AV_PROFILE_H264_EXTENDED; + case H264PROFILE_HIGH: +- return FF_PROFILE_H264_HIGH; ++ return AV_PROFILE_H264_HIGH; + case H264PROFILE_HIGH10PROFILE: +- return FF_PROFILE_H264_HIGH_10; ++ return AV_PROFILE_H264_HIGH_10; + case H264PROFILE_HIGH422PROFILE: +- return FF_PROFILE_H264_HIGH_422; ++ return AV_PROFILE_H264_HIGH_422; + case H264PROFILE_HIGH444PREDICTIVEPROFILE: +- return FF_PROFILE_H264_HIGH_444_PREDICTIVE; ++ return AV_PROFILE_H264_HIGH_444_PREDICTIVE; + default: + DVLOG(1) << "Unknown VideoCodecProfile: " << profile; + } +- return FF_PROFILE_UNKNOWN; ++ return AV_PROFILE_UNKNOWN; + } + + SampleFormat AVSampleFormatToSampleFormat(AVSampleFormat sample_format, +@@ -415,7 +415,7 @@ bool AVCodecContextToAudioDecoderConfig( + // TODO(dalecurtis): Just use the profile from the codec context if ffmpeg + // ever starts supporting xHE-AAC. + constexpr uint8_t kXHEAAc = 41; +- if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN || ++ if (codec == kCodecAAC && codec_context->profile == AV_PROFILE_UNKNOWN || + codec_context->profile == kXHEAAc) { + // Errors aren't fatal here, so just drop any MediaLog messages. + NullMediaLog media_log; +@@ -537,16 +537,16 @@ bool AVStreamToVideoDecoderConfig(const + break; + case kCodecVP9: + switch (codec_context->profile) { +- case FF_PROFILE_VP9_0: ++ case AV_PROFILE_VP9_0: + profile = VP9PROFILE_PROFILE0; + break; +- case FF_PROFILE_VP9_1: ++ case AV_PROFILE_VP9_1: + profile = VP9PROFILE_PROFILE1; + break; +- case FF_PROFILE_VP9_2: ++ case AV_PROFILE_VP9_2: + profile = VP9PROFILE_PROFILE2; + break; +- case FF_PROFILE_VP9_3: ++ case AV_PROFILE_VP9_3: + profile = VP9PROFILE_PROFILE3; + break; + default: +@@ -645,9 +645,15 @@ bool AVStreamToVideoDecoderConfig(const + coded_size, visible_rect, natural_size, extra_data, + GetEncryptionScheme(stream)); + ++#if (LIBAVFORMAT_VERSION_MAJOR < 62) + if (stream->nb_side_data) { + for (int i = 0; i < stream->nb_side_data; ++i) { + AVPacketSideData side_data = stream->side_data[i]; ++#else ++ if (stream->codecpar->nb_coded_side_data) { ++ for (int i = 0; i < stream->codecpar->nb_coded_side_data; ++i) { ++ const auto& side_data = stream->codecpar->coded_side_data[i]; ++#endif + if (side_data.type != AV_PKT_DATA_MASTERING_DISPLAY_METADATA) + continue; + diff --git a/srcpkgs/qt5-webengine/patches/0202-more-ffmpeg8.patch b/srcpkgs/qt5-webengine/patches/0202-more-ffmpeg8.patch new file mode 100644 index 00000000000000..61955b127d056d --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/0202-more-ffmpeg8.patch @@ -0,0 +1,55 @@ +--- qtwebengine-5.15.17-lts.orig/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc ++++ qtwebengine-5.15.17-lts/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc +@@ -63,17 +63,17 @@ + hdr[1] |= 1; + + switch (audio_profile) { +- case FF_PROFILE_AAC_MAIN: ++ case AV_PROFILE_AAC_MAIN: + break; +- case FF_PROFILE_AAC_HE: +- case FF_PROFILE_AAC_HE_V2: +- case FF_PROFILE_AAC_LOW: ++ case AV_PROFILE_AAC_HE: ++ case AV_PROFILE_AAC_HE_V2: ++ case AV_PROFILE_AAC_LOW: + hdr[2] |= (1 << 6); + break; +- case FF_PROFILE_AAC_SSR: ++ case AV_PROFILE_AAC_SSR: + hdr[2] |= (2 << 6); + break; +- case FF_PROFILE_AAC_LTP: ++ case AV_PROFILE_AAC_LTP: + hdr[2] |= (3 << 6); + break; + default: +--- qtwebengine-5.15.17-lts.orig/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc ++++ qtwebengine-5.15.17-lts/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +@@ -28,7 +28,7 @@ + // Set up reasonable aac parameters + memset(&test_parameters_, 0, sizeof(AVCodecParameters)); + test_parameters_.codec_id = AV_CODEC_ID_AAC; +- test_parameters_.profile = FF_PROFILE_AAC_MAIN; ++ test_parameters_.profile = AV_PROFILE_AAC_MAIN; + test_parameters_.ch_layout.nb_channels = 2; + test_parameters_.extradata = extradata_header_; + test_parameters_.extradata_size = sizeof(extradata_header_); +@@ -114,7 +114,7 @@ + + EXPECT_EQ(profile, kAacMainProfile); + +- test_parameters_.profile = FF_PROFILE_AAC_HE; ++ test_parameters_.profile = AV_PROFILE_AAC_HE; + FFmpegAACBitstreamConverter converter_he(&test_parameters_); + + test_packet.reset(new AVPacket()); +@@ -127,7 +127,7 @@ + + EXPECT_EQ(profile, kAacLowComplexityProfile); + +- test_parameters_.profile = FF_PROFILE_AAC_ELD; ++ test_parameters_.profile = AV_PROFILE_AAC_ELD; + FFmpegAACBitstreamConverter converter_eld(&test_parameters_); + + test_packet.reset(new AVPacket()); diff --git a/srcpkgs/qt5-webengine/patches/9999-cpp17-fixes.patch b/srcpkgs/qt5-webengine/patches/9999-cpp17-fixes.patch new file mode 100644 index 00000000000000..231d3b0cba93b1 --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/9999-cpp17-fixes.patch @@ -0,0 +1,105 @@ +--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn ++++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +@@ -566,7 +566,7 @@ + # Override Chromium's default for projects that wish to stay on C++11. + cflags_cc += [ "-std=${standard_prefix}++11" ] + } else { +- cflags_cc += [ "-std=${standard_prefix}++14" ] ++ cflags_cc += [ "-std=${standard_prefix}++17" ] + } + } else if (!is_win && !is_nacl) { + if (target_os == "android") { +@@ -583,7 +583,7 @@ + if (cxx11_override) { + cflags_cc += [ "-std=c++11" ] + } else { +- cflags_cc += [ "-std=c++14" ] ++ cflags_cc += [ "-std=c++17" ] + } + } + +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h ++++ a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +@@ -195,7 +195,7 @@ NumPartitionPagesPerSuperPage() { + // + // __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all + // platforms, as Chrome's requirement is C++14 as of 2020. +-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__) ++#if 0 + static constexpr size_t kAlignment = + std::max(alignof(std::max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__); + #else +diff --git a/chromium/third_party/webrtc/common_video/h264/sps_parser.h b/chromium/third_party/webrtc/common_video/h264/sps_parser.h +index 76e627d27a3..942435f44a0 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h ++++ a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h +@@ -12,6 +12,7 @@ + #define COMMON_VIDEO_H264_SPS_PARSER_H_ + + #include "absl/types/optional.h" ++#include + + namespace rtc { + class BitBuffer; +diff --git a/chromium/third_party/webrtc/common_video/h264/pps_parser.h b/chromium/third_party/webrtc/common_video/h264/pps_parser.h +index d6c31b06887..d8852dfd186 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h ++++ a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h +@@ -12,6 +12,7 @@ + #define COMMON_VIDEO_H264_PPS_PARSER_H_ + + #include "absl/types/optional.h" ++#include + + namespace rtc { + class BitBuffer; +diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h +index 3b9971abae1..d4458038527 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h ++++ a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "absl/types/optional.h" + #include "api/array_view.h" +diff --git a/chromium/third_party/webrtc/modules/include/module_common_types_public.h b/chromium/third_party/webrtc/modules/include/module_common_types_public.h +index 345e45ce127..e686e5d691a 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h ++++ a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h +@@ -12,6 +12,7 @@ + #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_ + + #include ++#include + + #include "absl/types/optional.h" + +diff --git a/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc b/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc +index 8fcc799b795..bc69ddcf18c 100644 +--- a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc ++++ a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc +@@ -15,6 +15,7 @@ + #include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h" + #include "third_party/blink/renderer/core/page/scrolling/text_fragment_finder.h" + #include "third_party/blink/renderer/platform/text/text_boundaries.h" ++#include "absl/base/attributes.h" + + namespace blink { + +diff --git a/chromium/third_party/abseil-cpp/absl/base/options.h b/chromium/third_party/abseil-cpp/absl/base/options.h +index df506f0fae6..1de105fed4a 100644 +--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h ++++ a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h +@@ -180,7 +180,7 @@ + // absl::variant is a typedef of std::variant, use the feature macro + // ABSL_USES_STD_VARIANT. + +-#define ABSL_OPTION_USE_STD_VARIANT 2 ++#define ABSL_OPTION_USE_STD_VARIANT 0 + + + // ABSL_OPTION_USE_INLINE_NAMESPACE + diff --git a/srcpkgs/qt5-webengine/patches/9999-spellcheck-buildflags.patch b/srcpkgs/qt5-webengine/patches/9999-spellcheck-buildflags.patch new file mode 100644 index 00000000000000..4aa4e547208a3f --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/9999-spellcheck-buildflags.patch @@ -0,0 +1,10 @@ +--- a/src/3rdparty/chromium/content/browser/BUILD.gn ++++ b/src/3rdparty/chromium/content/browser/BUILD.gn +@@ -40,6 +40,7 @@ + "//content/browser/devtools:protocol_sources", + "//content/common:buildflags", + "//third_party/inspector_protocol:crdtp", ++ "//components/spellcheck:buildflags", + ] + + sources = [ diff --git a/srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp17.patch b/srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp17.patch new file mode 100644 index 00000000000000..996f4102da6382 --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp17.patch @@ -0,0 +1,11 @@ +--- a/src/3rdparty/chromium/media/filters/BUILD.gn 2023-02-27 13:32:59.000000000 -0500 ++++ b/src/3rdparty/chromium/media/filters/BUILD.gn 2023-04-02 17:21:39.204066384 -0400 +@@ -96,6 +96,8 @@ + "//ui/gfx/geometry:geometry", + ] + ++ cflags_cc = [ "-std=c++17" ] ++ + libs = [] + + if (proprietary_codecs) { diff --git a/srcpkgs/qt5-webengine/patches/qt5-webengine-icu-78.patch b/srcpkgs/qt5-webengine/patches/qt5-webengine-icu-78.patch new file mode 100644 index 00000000000000..d55f3b095e0625 --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/qt5-webengine-icu-78.patch @@ -0,0 +1,16 @@ +https://aur.archlinux.org/cgit/aur.git/tree/qt5-webengine-icu-78.patch?h=qt5-webengine +--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc ++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc +@@ -162,11 +162,7 @@ + }; + // clang-format on + +-#if U_ICU_VERSION_MAJOR_NUM >= 58 +-#define BA_LB_COUNT (U_LB_COUNT - 3) +-#else +-#define BA_LB_COUNT U_LB_COUNT +-#endif ++#define BA_LB_COUNT (40) + // Line breaking table for CSS word-break: break-all. This table differs from + // asciiLineBreakTable in: + // - Indices are Line Breaking Classes defined in UAX#14 Unicode Line Breaking diff --git a/srcpkgs/qt5-webengine/template b/srcpkgs/qt5-webengine/template index 7b1c2994ae811a..38bfc3de29e771 100644 --- a/srcpkgs/qt5-webengine/template +++ b/srcpkgs/qt5-webengine/template @@ -1,7 +1,7 @@ # Template file for 'qt5-webengine' pkgname=qt5-webengine version=5.15.19 -revision=2 +revision=3 _version="${version}-lts" _chromium_commit=6d29e9cfcfffa7632cc3858ceaf8940677ba9c91 archs="x86_64* i686* armv[67]* ppc64* aarch64*" @@ -19,7 +19,7 @@ hostmakedepends="qt5-qmake gperf ninja qt5-host-tools flex pkg-config nodejs libjpeg-turbo-devel libpng-devel libwebp-devel freetype-devel harfbuzz-devel python3-html5lib" makedepends="qt5-webchannel-devel qt5-location-devel qt5-tools-devel qt5-devel - qt5-declarative-devel libevent-devel snappy-devel libicu78-devel ffmpeg6-devel + qt5-declarative-devel libevent-devel snappy-devel libicu78-devel ffmpeg-devel libwebp-devel opus-devel cups-devel nss-devel minizip-devel libxslt-devel libvpx-devel libXtst-devel libXcursor-devel libXcomposite-devel jsoncpp-devel harfbuzz-devel lcms2-devel protobuf-devel pulseaudio-devel From bbb48c5e8f7a3c03f5d7383eb3df37e0bc03bf22 Mon Sep 17 00:00:00 2001 From: zlice Date: Tue, 23 Dec 2025 10:14:10 -0500 Subject: [PATCH 094/110] qt6-pdf: revbump for ffmpeg8 --- srcpkgs/qt6-pdf/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qt6-pdf/template b/srcpkgs/qt6-pdf/template index d5568bd2eb04e4..8429937207ef6d 100644 --- a/srcpkgs/qt6-pdf/template +++ b/srcpkgs/qt6-pdf/template @@ -1,7 +1,7 @@ # Template file for 'qt6-pdf' pkgname=qt6-pdf version=6.10.2 -revision=1 +revision=2 build_style=cmake configure_args="-DQT_FEATURE_qtpdf_build=ON -DQT_FEATURE_qtpdf_widgets_build=ON @@ -14,7 +14,7 @@ hostmakedepends="qt6-base-devel perl pkg-config nodejs python3-html5lib makedepends="qt6-base-private-devel qt6-declarative-private-devel qt6-svg-devel zlib-devel sqlite-devel libopenjpeg2-devel libglib-devel eudev-libudev-devel openh264-devel - pciutils-devel opus-devel libxslt-devel libxml2-devel ffmpeg6-devel + pciutils-devel opus-devel libxslt-devel libxml2-devel ffmpeg-devel lcms2-devel libwebp-devel icu-devel re2-devel snappy-devel libevent-devel libvpx-devel minizip-devel tiff-devel libpng-devel harfbuzz-devel freetype-devel libjpeg-turbo-devel nss-devel libxshmfence-devel" From 963da2a2eb20e72da98e93ed18e8fb138db6366d Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:34:11 -0500 Subject: [PATCH 095/110] czkawka: revbump for ffmpeg8 --- srcpkgs/czkawka/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/czkawka/template b/srcpkgs/czkawka/template index 3aba43f3455291..04d7338fa39eaa 100644 --- a/srcpkgs/czkawka/template +++ b/srcpkgs/czkawka/template @@ -1,12 +1,12 @@ # Template file for 'czkawka' pkgname=czkawka version=11.0.1 -revision=1 +revision=2 build_style=cargo configure_args="--bin czkawka_cli --bin czkawka_gui --all-features" hostmakedepends="pkg-config" makedepends="libdav1d-devel libheif-devel gtk4-devel libraw-devel" -depends="ffmpeg6" +depends="ffmpeg" checkdepends="dbus xvfb-run" short_desc="App to find duplicates, empty folders, similar images, etc" maintainer="Orphaned " From c171681e3551e7833713602f3fa56f5faa2d8f80 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:34:34 -0500 Subject: [PATCH 096/110] dlib: revbump for ffmpeg8 --- srcpkgs/dlib/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dlib/template b/srcpkgs/dlib/template index f72b89e24919da..bc2889182568e2 100644 --- a/srcpkgs/dlib/template +++ b/srcpkgs/dlib/template @@ -1,14 +1,14 @@ # Template file for 'dlib' pkgname=dlib version=20.0 -revision=2 +revision=3 build_style=cmake # arm6/7 need helper build_helper=python3 configure_args="-DBUILD_SHARED_LIBS=ON" hostmakedepends="pkg-config python3-devel python3-setuptools python3-distutils-extra python3-packaging-bootstrap" -makedepends="libjpeg-turbo-devel libpng-devel zlib-devel ffmpeg6-devel cblas-devel +makedepends="libjpeg-turbo-devel libpng-devel zlib-devel ffmpeg-devel cblas-devel $(vopt_if openblas openblas-devel) $(vopt_if x11 libX11-devel) python3-pybind11 python3" short_desc="Modern C++ toolkit containing machine learning algorithms and tools" maintainer="Felix Hanley " From 7fb2267e3b7bf8bf88e10b29947642880e2ec256 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:34:50 -0500 Subject: [PATCH 097/110] freerdp: revbump for ffmpeg8 --- srcpkgs/freerdp/template | 4 ++-- srcpkgs/libfreerdp3 | 2 +- srcpkgs/libfreerdp3-server | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/freerdp/template b/srcpkgs/freerdp/template index 884acdee0bc70b..63adb085b513d8 100644 --- a/srcpkgs/freerdp/template +++ b/srcpkgs/freerdp/template @@ -1,7 +1,7 @@ # Template file for 'freerdp' pkgname=freerdp version=3.27.1 -revision=1 +revision=2 build_style=cmake build_helper=qemu configure_args="-Wno-dev -DCMAKE_BUILD_TYPE=Release @@ -27,7 +27,7 @@ makedepends="alsa-lib-devel cups-devel fuse3-devel icu-devel libXcursor-devel libXdamage-devel libXinerama-devel libXrandr-devel libXv-devel pam-devel libjpeg-turbo-devel libusb-devel libxkbfile-devel mit-krb5-devel openssl-devel pulseaudio-devel uriparser-devel $(vopt_if aad cJSON-devel) - $(vopt_if ffmpeg ffmpeg6-devel cairo-devel) $(vopt_if sdl3 SDL3_ttf-devel) + $(vopt_if ffmpeg ffmpeg-devel cairo-devel) $(vopt_if sdl3 SDL3_ttf-devel) $(vopt_if smartcard 'pcsclite-devel pkcs11-helper-devel') $(vopt_if webview libwebkit2gtk41-devel)" short_desc="Free RDP (Remote Desktop Protocol) client" diff --git a/srcpkgs/libfreerdp3 b/srcpkgs/libfreerdp3 index d8e6da3ebcadf3..ff5b2c64c02a44 120000 --- a/srcpkgs/libfreerdp3 +++ b/srcpkgs/libfreerdp3 @@ -1 +1 @@ -freerdp3 \ No newline at end of file +freerdp \ No newline at end of file diff --git a/srcpkgs/libfreerdp3-server b/srcpkgs/libfreerdp3-server index d8e6da3ebcadf3..ff5b2c64c02a44 120000 --- a/srcpkgs/libfreerdp3-server +++ b/srcpkgs/libfreerdp3-server @@ -1 +1 @@ -freerdp3 \ No newline at end of file +freerdp \ No newline at end of file From a5f0fa97f01ed96b68e5d0aafa09321575d312b1 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:36:13 -0500 Subject: [PATCH 098/110] mgba: revbump for ffmpeg8 --- srcpkgs/mgba/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mgba/template b/srcpkgs/mgba/template index 8685ed6bcaa858..191b65df6c4959 100644 --- a/srcpkgs/mgba/template +++ b/srcpkgs/mgba/template @@ -1,10 +1,10 @@ # Template file for 'mgba' pkgname=mgba version=0.10.5 -revision=1 +revision=2 build_style=cmake hostmakedepends="pkg-config qt5-host-tools qt5-qmake desktop-file-utils" -makedepends="SDL2-devel ffmpeg6-devel libedit-devel libepoxy-devel libmagick-devel +makedepends="SDL2-devel ffmpeg-devel libedit-devel libepoxy-devel libmagick-devel libzip-devel qt5-multimedia-devel qt5-tools-devel" short_desc="Game Boy Advance emulator written in C" maintainer="fanyx " From 27d6230caeb92684b1699e1086885cb53d4c1c0e Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:36:49 -0500 Subject: [PATCH 099/110] opencv: revbump for ffmpeg8 --- srcpkgs/opencv/patches/ffmpeg8.patch | 38 ++++++++++++++++++++++++++++ srcpkgs/opencv/template | 4 +-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/opencv/patches/ffmpeg8.patch diff --git a/srcpkgs/opencv/patches/ffmpeg8.patch b/srcpkgs/opencv/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..c21e56e6d93963 --- /dev/null +++ b/srcpkgs/opencv/patches/ffmpeg8.patch @@ -0,0 +1,38 @@ +--- a/modules/videoio/src/cap_ffmpeg_impl.hpp ++++ b/modules/videoio/src/cap_ffmpeg_impl.hpp +@@ -685,8 +685,12 @@ + if( video_st ) + { + #ifdef CV_FFMPEG_CODECPAR ++// avcodec_close removed in FFmpeg release 8.0 ++# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(61, 9, 108)) ++ + avcodec_close( context ); + #endif ++#endif + video_st = NULL; + } + +@@ -2005,7 +2009,21 @@ + rotation_angle = 0; + #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(57, 68, 100) + const uint8_t *data = 0; ++ // av_stream_get_side_data removed in FFmpeg release 8.0 ++# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(61, 9, 108)) + data = av_stream_get_side_data(video_st, AV_PKT_DATA_DISPLAYMATRIX, NULL); ++# else ++ AVPacketSideData* sd = video_st->codecpar->coded_side_data; ++ int nb_sd = video_st->codecpar->nb_coded_side_data; ++ if (sd && nb_sd > 0) ++ { ++ const AVPacketSideData* mtx = av_packet_side_data_get(sd, nb_sd, AV_PKT_DATA_DISPLAYMATRIX); ++ if (mtx) ++ { ++ data = mtx->data; ++ } ++ } ++# endif + if (data) + { + rotation_angle = -cvRound(av_display_rotation_get((const int32_t*)data)); + diff --git a/srcpkgs/opencv/template b/srcpkgs/opencv/template index af369793136814..73a2299f26e0be 100644 --- a/srcpkgs/opencv/template +++ b/srcpkgs/opencv/template @@ -1,7 +1,7 @@ # Template file for 'opencv' pkgname=opencv version=4.12.0 -revision=2 +revision=3 create_wrksrc=yes build_wrksrc=${pkgname}-${version} build_style=cmake @@ -13,7 +13,7 @@ configure_args="-DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_OPENMP=ON -DBUILD_opencv_wechat_qrcode=OFF -DBUILD_opencv_rgbd=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF" hostmakedepends="pkg-config eigen python3-numpy python3-setuptools" -makedepends="ffmpeg6-devel libpng-devel libjpeg-turbo-devel tiff-devel +makedepends="ffmpeg-devel libpng-devel libjpeg-turbo-devel tiff-devel jasper-devel ocl-icd-devel libgomp-devel libopenexr-devel gtk+3-devel libgphoto2-devel gst-plugins-base1-devel openblas-devel python3-numpy python3-devel" From d1efe3b21cfb3e79339d162b3f6afda4f8bbfeee Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:37:07 -0500 Subject: [PATCH 100/110] opera: revbump for ffmpeg8 --- srcpkgs/opera/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/opera/template b/srcpkgs/opera/template index 708ced7a7ceca7..96b5f097afab65 100644 --- a/srcpkgs/opera/template +++ b/srcpkgs/opera/template @@ -1,10 +1,10 @@ # Template file for 'opera' pkgname=opera version=132.0.5905.22 -revision=1 +revision=2 archs="x86_64" create_wrksrc=yes -depends="ffmpeg6 desktop-file-utils hicolor-icon-theme libcanberra-gtk3 gsettings-desktop-schemas" +depends="ffmpeg desktop-file-utils hicolor-icon-theme libcanberra-gtk3 gsettings-desktop-schemas" short_desc="Fast, secure, easy to use browser" maintainer="mobinmob " license="custom:Proprietary" From 8cccbc4c0a760876fbf59fcc56aaa0e6f7c407a7 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:38:09 -0500 Subject: [PATCH 101/110] qt5: revbump for ffmpeg8 --- srcpkgs/qt5/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index aacbc0ceb6c552..9be8a4a001c068 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -3,14 +3,14 @@ # revbump libqtxdg after bumping patch version pkgname=qt5 version=5.15.11+20231124 -revision=6 +revision=7 # commit 4765fa1df7a837db9c1f89c4da0dd76b74bb5fab # base repo: https://invent.kde.org/qt/qt/qt5 metapackage=yes hostmakedepends="cmake clang19 flex perl glib-devel pkg-config python3 re2c ruby which" makedepends="clang19-devel SDL2-devel Vulkan-Headers alsa-lib-devel double-conversion-devel - eudev-libudev-devel ffmpeg6-devel freetds-devel glib-devel gst-plugins-base1-devel + eudev-libudev-devel ffmpeg-devel freetds-devel glib-devel gst-plugins-base1-devel gtk+3-devel icu-devel libXv-devel libbluetooth-devel libcap-devel libinput-devel libmng-devel libmariadbclient-devel libproxy-devel libvpx-devel libwebp-devel libxkbcommon-devel From d32d4c5e58d167741da99e461fa09c33a62c626e Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:38:32 -0500 Subject: [PATCH 102/110] qt6-multimedia: revbump for ffmpeg8 --- srcpkgs/qt6-multimedia/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qt6-multimedia/template b/srcpkgs/qt6-multimedia/template index 0579b0b769fa73..546958288d8184 100644 --- a/srcpkgs/qt6-multimedia/template +++ b/srcpkgs/qt6-multimedia/template @@ -1,13 +1,13 @@ # Template file for 'qt6-multimedia' pkgname=qt6-multimedia version=6.10.2 -revision=1 +revision=2 build_style=cmake configure_args="-DQT_FEATURE_gstreamer=ON" hostmakedepends="perl qt6-declarative-host-tools pkg-config qt6-shadertools" makedepends="qt6-base-private-devel qt6-declarative-private-devel qt6-quick3d-private-devel qt6-shadertools-devel - pulseaudio-devel ffmpeg6-devel libva-devel + pulseaudio-devel ffmpeg-devel libva-devel libglib-devel gst-plugins-bad1-devel gst-plugins-base1-devel" short_desc="Cross-platform application and UI framework - multimedia" maintainer="John " From 7bbac764587b6e59ca4f9aa237ae7333964cef02 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:38:53 -0500 Subject: [PATCH 103/110] shotcut: revbump for ffmpeg8 --- srcpkgs/shotcut/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/shotcut/template b/srcpkgs/shotcut/template index a86041a1d098ec..3e97359b967494 100644 --- a/srcpkgs/shotcut/template +++ b/srcpkgs/shotcut/template @@ -1,20 +1,20 @@ # Template file for 'shotcut' pkgname=shotcut -version=26.4.30 -revision=1 +version=26.6.25 +revision=2 build_style=cmake configure_args="-DSHOTCUT_VERSION=${version}" hostmakedepends="pkg-config qt6-base qt6-tools" makedepends="mlt7-devel qt6-declarative-devel qt6-multimedia-devel qt6-websockets-devel qt6-plugin-mysql qt6-plugin-odbc - qt6-plugin-pgsql qt6-plugin-sqlite qt6-charts-devel" -depends="ffmpeg6 frei0r-plugins qt6-declarative" + qt6-plugin-pgsql qt6-plugin-sqlite qt6-charts-devel qt6-declarative-private-devel" +depends="ffmpeg frei0r-plugins qt6-declarative" short_desc="Free, open source, cross-platform video editor" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://www.shotcut.org" changelog="https://github.com/mltframework/shotcut/releases" distfiles="https://github.com/mltframework/shotcut/archive/v${version}.tar.gz" -checksum=c9f79d3b7daa6fa14595c657e907d28c622daa2edda70340c8cf6a9e207cd0f8 +checksum=e4dd736d2fd5d07ae0c377d7217a2c3bec686f1a0e51b09a3377608ba6de1fe6 CXXFLAGS="-DHAVE_LOCALE_H=1 -DSHOTCUT_NOUPGRADE" From b2228009dad276d89913aa0d7d03e52097e7313b Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:39:09 -0500 Subject: [PATCH 104/110] vhs: revbump for ffmpeg8 --- srcpkgs/vhs/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/vhs/template b/srcpkgs/vhs/template index f74c2a12a581cc..db17a43e127790 100644 --- a/srcpkgs/vhs/template +++ b/srcpkgs/vhs/template @@ -1,12 +1,12 @@ # Template file for 'vhs' pkgname=vhs version=0.11.0 -revision=1 +revision=2 build_style=go build_helper=qemu go_import_path="github.com/charmbracelet/vhs" go_ldflags="-X main.Version=v${version}" -depends="ffmpeg6 ttyd" +depends="ffmpeg ttyd" short_desc="Your CLI home video recorder" maintainer="tranzystorekk " license="MIT" From 38f297143b5c05ee75339851d8c2487df38105af Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:39:27 -0500 Subject: [PATCH 105/110] vice: revbump for ffmpeg8 --- srcpkgs/vice/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/vice/template b/srcpkgs/vice/template index a18c1e1b85f0d4..2fa54fb343298c 100644 --- a/srcpkgs/vice/template +++ b/srcpkgs/vice/template @@ -1,7 +1,7 @@ # Template file for 'vice' pkgname=vice version=3.9 -revision=1 +revision=2 build_style=gnu-configure configure_args="--enable-cpuhistory --enable-x64 --disable-pdf-docs --libdir=/usr/lib$XBPS_TARGET_WORDSIZE $(vopt_enable sdl2 sdlui2) @@ -12,7 +12,7 @@ hostmakedepends="pkg-config flex dos2unix xa perl glib-devel xdg-utils" makedepends="zlib-devel readline-devel libpng-devel glew-devel alsa-lib-devel libcurl-devel libevdev-devel $(vopt_if sdl2 SDL2_mixer-devel) $(vopt_if sdl2 SDL2-devel) $(vopt_if gtk3 gtk+3-devel) $(vopt_if gtk3 pulseaudio-devel) - $(vopt_if ffmpeg ffmpeg6-devel)" + $(vopt_if ffmpeg ffmpeg-devel)" short_desc="Emulator for C64, C128, CBM-II, PET, VIC20, Plus4 and C16" maintainer="Orphaned " license="GPL-2.0-or-later" From 7360779772aeda62a8f75e677d72f03cca8f8192 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:40:02 -0500 Subject: [PATCH 106/110] vokoscreenNG: revbump for ffmpeg8 --- srcpkgs/vokoscreenNG/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/vokoscreenNG/template b/srcpkgs/vokoscreenNG/template index aa433355f1c8d3..349f731e43bf5a 100644 --- a/srcpkgs/vokoscreenNG/template +++ b/srcpkgs/vokoscreenNG/template @@ -1,14 +1,14 @@ # Template file for 'vokoscreenNG' pkgname=vokoscreenNG version=4.9.0 -revision=1 +revision=2 build_style=qmake build_wrksrc="src" hostmakedepends="pkg-config qt6-base-devel qt6-tools-devel" makedepends="alsa-lib-devel libX11-devel libXrandr-devel pipewire-devel pulseaudio-devel gst-plugins-base1-devel qt6-multimedia-devel xdg-desktop-portal gstreamer1-devel" -depends="ffmpeg6 gstreamer1-pipewire gst-plugins-ugly1 gst-plugins-good1" +depends="ffmpeg gstreamer1-pipewire gst-plugins-ugly1 gst-plugins-good1" short_desc="Easy to use screencast creator" maintainer="Duncaen " license="GPL-2.0-only" From 4311487272f5e6afd3af478455f34a85b06e637d Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 14:42:21 -0500 Subject: [PATCH 107/110] srb2: revbump for libgme 0.6.4 --- srcpkgs/srb2/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/srb2/template b/srcpkgs/srb2/template index 96b6f272818531..6e02dd65978713 100644 --- a/srcpkgs/srb2/template +++ b/srcpkgs/srb2/template @@ -1,7 +1,7 @@ # Template file for 'srb2' pkgname=srb2 version=2.2.15 -revision=1 +revision=2 create_wrksrc=true build_wrksrc="SRB2-SRB2_release_${version}" build_style=gnu-makefile From df14811f62b744db8ed92561c3ca087775371eb2 Mon Sep 17 00:00:00 2001 From: zlice Date: Tue, 7 Apr 2026 16:08:47 -0400 Subject: [PATCH 108/110] vlc ffmpeg8 --- srcpkgs/vlc/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/vlc/template b/srcpkgs/vlc/template index fa550d4ba83f34..97aff2445a2b8f 100644 --- a/srcpkgs/vlc/template +++ b/srcpkgs/vlc/template @@ -25,7 +25,7 @@ lib32disabled=yes hostmakedepends="automake libtool pkg-config flex gettext libgcrypt-devel live555-devel gettext-devel $(vopt_if lua lua52) $(vopt_if chromecast protobuf)" makedepends=" - avahi-libs-devel dbus-glib-devel faad2-devel ffmpeg4-devel freefont-ttf + avahi-libs-devel dbus-glib-devel faad2-devel ffmpeg-devel freefont-ttf gnutls-devel jack-devel liba52-devel libass-devel libbluray-devel libcdio-devel libdca-devel libdvbpsi-devel libdvdnav-devel libmad-devel libmatroska-devel libmodplug-devel libmpcdec-devel libmpeg2-devel From 7e7e77a6483ab2619053e6b853ad4a724f93bb1e Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 8 Apr 2026 09:18:14 -0400 Subject: [PATCH 109/110] ppsspp: update to 1.20.3 - for ffmpeg8 --- srcpkgs/ppsspp/patches/ffmpeg6.patch | 15 ----------- srcpkgs/ppsspp/patches/fix-ffmpeg6.patch | 33 ------------------------ srcpkgs/ppsspp/patches/test.patch | 11 -------- srcpkgs/ppsspp/template | 10 +++---- 4 files changed, 4 insertions(+), 65 deletions(-) delete mode 100644 srcpkgs/ppsspp/patches/ffmpeg6.patch delete mode 100644 srcpkgs/ppsspp/patches/fix-ffmpeg6.patch delete mode 100644 srcpkgs/ppsspp/patches/test.patch diff --git a/srcpkgs/ppsspp/patches/ffmpeg6.patch b/srcpkgs/ppsspp/patches/ffmpeg6.patch deleted file mode 100644 index 5803c7bf227309..00000000000000 --- a/srcpkgs/ppsspp/patches/ffmpeg6.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/Core/HW/SimpleAudioDec.cpp 2024-02-04 08:08:02.000000000 -0500 -+++ b/Core/HW/SimpleAudioDec.cpp 2024-02-15 14:48:27.114362051 -0500 -@@ -81,7 +81,11 @@ - return; - } - // Find decoder -+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 18, 100) - codec_ = avcodec_find_decoder((AVCodecID)audioCodecId); -+#else // this is a macro to const in the header -+ codec_ = (AVCodec*)avcodec_find_decoder((AVCodecID)audioCodecId); -+#endif - if (!codec_) { - // Eh, we shouldn't even have managed to compile. But meh. - ERROR_LOG(ME, "This version of FFMPEG does not support AV_CODEC_ctx for audio (%s). Update your submodule.", GetCodecName(audioType)); - diff --git a/srcpkgs/ppsspp/patches/fix-ffmpeg6.patch b/srcpkgs/ppsspp/patches/fix-ffmpeg6.patch deleted file mode 100644 index a6a25067950b8b..00000000000000 --- a/srcpkgs/ppsspp/patches/fix-ffmpeg6.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/Core/HW/MediaEngine.cpp 2024-11-04 17:16:10.000000000 +0100 -+++ - 2024-12-26 20:30:02.355062203 +0100 -@@ -52,6 +52,11 @@ - #include "libavutil/imgutils.h" - #include "libswscale/swscale.h" - -+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 23, 100) -+ // private libavformat api (see demux.h in ffmpeg src tree) -+ void avpriv_stream_set_need_parsing(AVStream *st, enum AVStreamParseType type); -+#endif -+ - } - #endif // USE_FFMPEG - -@@ -426,12 +426,17 @@ bool MediaEngine::addVideoStream(int streamNum, int streamId) { - streamId = PSMF_VIDEO_STREAM_ID | streamNum; - - stream->id = 0x00000100 | streamId; -+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 23, 100) -+ avpriv_stream_set_need_parsing(stream, AVSTREAM_PARSE_FULL); -+#else -+ stream->need_parsing = AVSTREAM_PARSE_FULL; -+#endif -+ - #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) - stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; - stream->codecpar->codec_id = AV_CODEC_ID_H264; - #else - stream->request_probe = 0; -- stream->need_parsing = AVSTREAM_PARSE_FULL; - #endif - // We could set the width here, but we don't need to. - if (streamNum >= m_expectedVideoStreams) { diff --git a/srcpkgs/ppsspp/patches/test.patch b/srcpkgs/ppsspp/patches/test.patch deleted file mode 100644 index fb315a6099ab11..00000000000000 --- a/srcpkgs/ppsspp/patches/test.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ppsspp-1.19.3/CMakeLists.txt 2025-07-15 12:08:35.000000000 +0200 -+++ - 2025-12-28 16:46:59.277413410 +0100 -@@ -2855,7 +2855,7 @@ - add_test(math_util PPSSPPUnitTest MathUtil) - add_test(parsers PPSSPPUnitTest Parsers) - add_test(jit PPSSPPUnitTest Jit) -- add_test(matrix_transpose PPSSPPUnitTest MatrixTranspose) -+ add_test(matrix_transpose PPSSPPUnitTest VFPUMatrixTranspose) - add_test(parse_lbn PPSSPPUnitTest ParseLBN) - add_test(quick_texhash PPSSPPUnitTest QuickTexHash) - add_test(clz PPSSPPUnitTest CLZ) diff --git a/srcpkgs/ppsspp/template b/srcpkgs/ppsspp/template index 99d0fa7c284d6a..5dbc07a9138139 100644 --- a/srcpkgs/ppsspp/template +++ b/srcpkgs/ppsspp/template @@ -1,15 +1,13 @@ # Template file for 'ppsspp' -# !! any change to ffmpeg should be tested with apropiate games, -# major ffmpeg updates have a high likelyhood of breaking video playback pkgname=ppsspp -version=1.19.3 +version=1.20.3 revision=1 build_style=cmake configure_args="-DHEADLESS=1 -DUSE_SYSTEM_FFMPEG=1 -DUNITTEST=ON -DUSING_QT_UI=$(vopt_if qt ON OFF) -DUSE_SYSTEM_ZSTD=ON -DARMIPS_USE_STD_FILESYSTEM=ON" hostmakedepends="pkg-config python3 $(vopt_if qt qt5-host-tools)" -makedepends="zlib-devel glew-devel ffmpeg4-devel libzip-devel +makedepends="zlib-devel glew-devel ffmpeg-devel libzip-devel snappy-devel rapidjson libpng-devel libzstd-devel $(vopt_if sdl2 'SDL2_ttf-devel SDL2-devel') wayland-devel $(vopt_if qt 'qt5-devel qt5-multimedia-devel')" @@ -19,7 +17,7 @@ maintainer="John " license="GPL-2.0-or-later" homepage="https://www.ppsspp.org/" distfiles="https://github.com/hrydgard/ppsspp/releases/download/v${version}/ppsspp-${version}.tar.xz" -checksum=054401fa7fffbd99b7fd80e98a2951d6f0c3de83cb4b54719899c98bfad99614 +checksum=70818b8001aebb624b24aedc64a25c1808e23acc4b4b31f020288a732ce8495b # ppsspp always tries to compile x86 unittest # https://gist.github.com/Johnnynator/e18d59274451cff890b7235009d2e93d @@ -46,7 +44,7 @@ post_configure() { } do_install() { - vinstall icons/icon.svg 644 usr/share/pixmaps ppsspp.svg + vinstall icons/icon-512.svg 644 usr/share/pixmaps ppsspp.svg vbin build/PPSSPPHeadless ppsspp-headless vmkdir usr/share/ppsspp vcopy build/assets usr/share/ppsspp/ From 347cac0434f10c3918ce7367152b1c1a9f00366c Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 8 Apr 2026 10:21:34 -0400 Subject: [PATCH 110/110] ppsspp: update to 1.20.3 - use internal ppsspp-ffmpeg --- srcpkgs/ppsspp/template | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/srcpkgs/ppsspp/template b/srcpkgs/ppsspp/template index 5dbc07a9138139..b9a577bdb52803 100644 --- a/srcpkgs/ppsspp/template +++ b/srcpkgs/ppsspp/template @@ -1,13 +1,15 @@ # Template file for 'ppsspp' +# !! use internal ffmpeg from ppsspp - ffmpeg8 crashes pkgname=ppsspp version=1.20.3 revision=1 build_style=cmake -configure_args="-DHEADLESS=1 -DUSE_SYSTEM_FFMPEG=1 -DUNITTEST=ON +_psp_ffmpeg_commit=1e3b4965632f60b1d85360261d1b9dd45444bc71 +configure_args="-DHEADLESS=1 -DUSE_SYSTEM_FFMPEG=OFF -DUNITTEST=ON -DUSING_QT_UI=$(vopt_if qt ON OFF) -DUSE_SYSTEM_ZSTD=ON -DARMIPS_USE_STD_FILESYSTEM=ON" hostmakedepends="pkg-config python3 $(vopt_if qt qt5-host-tools)" -makedepends="zlib-devel glew-devel ffmpeg-devel libzip-devel +makedepends="zlib-devel glew-devel libzip-devel snappy-devel rapidjson libpng-devel libzstd-devel $(vopt_if sdl2 'SDL2_ttf-devel SDL2-devel') wayland-devel $(vopt_if qt 'qt5-devel qt5-multimedia-devel')" @@ -16,8 +18,12 @@ short_desc="Fast and portable PSP emulator" maintainer="John " license="GPL-2.0-or-later" homepage="https://www.ppsspp.org/" -distfiles="https://github.com/hrydgard/ppsspp/releases/download/v${version}/ppsspp-${version}.tar.xz" -checksum=70818b8001aebb624b24aedc64a25c1808e23acc4b4b31f020288a732ce8495b +distfiles="https://github.com/hrydgard/ppsspp/releases/download/v${version}/ppsspp-${version}.tar.xz + https://github.com/hrydgard/ppsspp-ffmpeg/archive/${_psp_ffmpeg_commit}.tar.gz" +checksum="70818b8001aebb624b24aedc64a25c1808e23acc4b4b31f020288a732ce8495b + 61b67072116fce28a64cfe82c1789af513f3c6de6712124646ad047b86be4b69" + +skip_extraction="${_psp_ffmpeg_commit}.tar.gz" # ppsspp always tries to compile x86 unittest # https://gist.github.com/Johnnynator/e18d59274451cff890b7235009d2e93d @@ -31,6 +37,10 @@ esac build_options="qt sdl2" build_options_default="sdl2" +post_extract() { + vsrcextract -C ffmpeg ${_psp_ffmpeg_commit}.tar.gz +} + post_patch() { # disable git versioning vsed -e 's|find_package(Git)|# &|' -i git-version.cmake