diff --git a/common/shlibs b/common/shlibs index fb04b0f760c495..5cc664ae91b8e2 100644 --- a/common/shlibs +++ b/common/shlibs @@ -397,25 +397,24 @@ libid3tag.so.0 libid3tag-0.15.1b_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 -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 +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.157 x264-20190507.2245_1 @@ -2951,8 +2950,8 @@ liblmdb.so.0 lmdb-0.9.18_2 libisns.so.0 libisns-0.101_2 libz80ex.so.1 z80ex-1.1.21_1 libz80ex_dasm.so.1 z80ex-1.1.21_1 -libqmmp.so.1 qmmp-1.1.4_1 -libqmmpui.so.1 qmmp-1.1.4_1 +libqmmp.so.2 qmmp-2.3.0_1 +libqmmpui.so.2 qmmp-2.3.0_1 libalkimia6.so.8 libalkimia-8.2.1_2 libpayeeidentifier_iban_bic_widgets.so.5 kmymoney-5.0.0_1 libKDb3.so.4 kdb-3.1.0_1 @@ -3162,7 +3161,7 @@ libvalaccodegen.so libvala-0.44.0_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/Aegisub/template b/srcpkgs/Aegisub/template index 8ab8491fc76980..c406dc9d53b927 100644 --- a/srcpkgs/Aegisub/template +++ b/srcpkgs/Aegisub/template @@ -7,8 +7,8 @@ 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 " 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" diff --git a/srcpkgs/alsa-plugins/template b/srcpkgs/alsa-plugins/template index 7948570cc0003d..76cf6479be773e 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" 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 ee79022be33382..e96f8bd61d8c02 100644 --- a/srcpkgs/arcan/template +++ b/srcpkgs/arcan/template @@ -2,7 +2,7 @@ # !! keep synced with: acfgfs aclip aloadimage pkgname=arcan version=0.7.0.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') 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 " 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" diff --git a/srcpkgs/audacious-plugins/template b/srcpkgs/audacious-plugins/template index fc1e1fe63496e9..d09b0984701edd 100644 --- a/srcpkgs/audacious-plugins/template +++ b/srcpkgs/audacious-plugins/template @@ -2,12 +2,12 @@ # Keep in sync with audacious and audacious-base pkgname=audacious-plugins version=4.5.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 diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template index 5d0444dadee942..a8b2cf468d7800 100644 --- a/srcpkgs/audacity/template +++ b/srcpkgs/audacity/template @@ -1,7 +1,7 @@ # Template file for 'audacity' pkgname=audacity version=3.7.3 -revision=3 +revision=4 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 diff --git a/srcpkgs/avidemux/template b/srcpkgs/avidemux/template index cdd8bb7fd608fa..f50941b9ab4529 100644 --- a/srcpkgs/avidemux/template +++ b/srcpkgs/avidemux/template @@ -1,14 +1,14 @@ # Template file for 'avidemux' pkgname=avidemux version=2.8.1 -revision=4 +revision=5 # 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 " diff --git a/srcpkgs/baresip/template b/srcpkgs/baresip/template index 3419968c532e59..b4e5a3d7ed217e 100644 --- a/srcpkgs/baresip/template +++ b/srcpkgs/baresip/template @@ -1,13 +1,13 @@ # Template file for 'baresip' pkgname=baresip version=3.20.0 -revision=2 +revision=3 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 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 diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template index 885f0f6b6ec887..cc8abdc38c9091 100644 --- a/srcpkgs/calibre/template +++ b/srcpkgs/calibre/template @@ -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" + ffmpeg-devel" 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 diff --git a/srcpkgs/ccextractor/patches/ffmpeg8.patch b/srcpkgs/ccextractor/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..933f0aacc98869 --- /dev/null +++ b/srcpkgs/ccextractor/patches/ffmpeg8.patch @@ -0,0 +1,22 @@ +From 25a447d42ee589db0257c1e91846700502b5cf58 Mon Sep 17 00:00:00 2001 +From: dmo +Date: Sun, 24 Aug 2025 19:52:21 +0200 +Subject: [PATCH] Fix build with ffmpeg 8 (#1739) + +--- + src/lib_ccx/hardsubx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib_ccx/hardsubx.c b/src/lib_ccx/hardsubx.c +index fb844c917..86dae0410 100644 +--- a/src/lib_ccx/hardsubx.c ++++ b/src/lib_ccx/hardsubx.c +@@ -125,7 +125,7 @@ int hardsubx_process_data(struct lib_hardsubx_ctx *ctx, struct lib_ccx_ctx *ctx_ + av_frame_free(&ctx->frame); + if (ctx->rgb_frame) + av_frame_free(&ctx->rgb_frame); +- avcodec_close(ctx->codec_ctx); ++ avcodec_free_context(&ctx->codec_ctx); + avformat_close_input(&ctx->format_ctx); + } + diff --git a/srcpkgs/ccextractor/template b/srcpkgs/ccextractor/template index 5d922ac0e442f7..c12ff1f3843223 100644 --- a/srcpkgs/ccextractor/template +++ b/srcpkgs/ccextractor/template @@ -1,25 +1,27 @@ # Template file for 'ccextractor' pkgname=ccextractor -version=0.93 -revision=3 +version=0.94 +revision=1 build_wrksrc="linux" build_style=gnu-configure +build_helper="rust" configure_args="--enable-ocr --enable-hardsubx" -hostmakedepends="automake pkg-config tesseract-ocr-devel" -makedepends="leptonica-devel tesseract-ocr-devel ffmpeg6-devel" +hostmakedepends="automake pkg-config tesseract-ocr-devel cargo clang" +makedepends="leptonica-devel tesseract-ocr-devel ffmpeg-devel rust-std" short_desc="Extract subtitles from video streams" maintainer="newbluemoon " license="GPL-2.0-or-later" homepage="https://www.ccextractor.org/" changelog="https://raw.githubusercontent.com/CCExtractor/ccextractor/master/docs/CHANGES.TXT" distfiles="https://github.com/CCExtractor/${pkgname}/archive/v${version}.tar.gz" -checksum=0e66d3e360db1b02a88271af11313ca4c9bbda1b03728e264a44c4c9f77192e3 +checksum=9c7be386257c69b5d8cd9d7466dbf20e3a45cea950cc8ca7486a956c3be54a42 CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/tesseract -DPNG_POWERPC_VSX_OPT=0" pre_configure() { vsed -i configure.ac \ -e "s/tesseract --version/tesseract-ocr --version/g" \ -e "s/\[lept\]/[leptonica]/" + vsed -i Makefile.am -e "s|@RUST_TARG|${XBPS_CROSS_RUST_TARGET}/&|g" ./autogen.sh } 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" 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 " 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" diff --git a/srcpkgs/czkawka/template b/srcpkgs/czkawka/template index eff3abb14a9e41..b5649225fe5ffa 100644 --- a/srcpkgs/czkawka/template +++ b/srcpkgs/czkawka/template @@ -1,12 +1,12 @@ # Template file for 'czkawka' pkgname=czkawka version=10.0.0 -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="sirkhancision " diff --git a/srcpkgs/deadbeef/template b/srcpkgs/deadbeef/template index 2a23d454af983a..cd6f3b2d97ea7b 100644 --- a/srcpkgs/deadbeef/template +++ b/srcpkgs/deadbeef/template @@ -1,13 +1,13 @@ # Template file for 'deadbeef' pkgname=deadbeef version=1.10.0 -revision=2 +revision=3 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 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 " diff --git a/srcpkgs/dolphin-emu/template b/srcpkgs/dolphin-emu/template index bc04488c880f77..69e7daa27ee608 100644 --- a/srcpkgs/dolphin-emu/template +++ b/srcpkgs/dolphin-emu/template @@ -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 diff --git a/srcpkgs/dragon-player/template b/srcpkgs/dragon-player/template index 6272730ac11486..24e34a86db14fa 100644 --- a/srcpkgs/dragon-player/template +++ b/srcpkgs/dragon-player/template @@ -1,7 +1,7 @@ # Template file for 'dragon-player' pkgname=dragon-player version=25.12.0 -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 " 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 b78d42e3efac65..67a903ace3affa 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 +version=2.4.1 revision=1 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 pre_build() { mkdir -p build diff --git a/srcpkgs/droidcam/template b/srcpkgs/droidcam/template index 65ea52f89f5256..84b752a7b99996 100644 --- a/srcpkgs/droidcam/template +++ b/srcpkgs/droidcam/template @@ -1,12 +1,12 @@ # Template file for 'droidcam' pkgname=droidcam version=2.1.4 -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" 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/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/template b/srcpkgs/ffmpeg/template index bfde8d74e5d5e7..f8c4d04837cff6 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=3 -metapackage=yes +version=8.0.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 + 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=05ee0b03119b45c0bdb4df654b96802e909e0a752f72e4fe3794f487229e5a41 -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,39 @@ 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 \ + $(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 +132,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 +157,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 +178,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 +199,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/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/ffmpeg/files/altivec.patch b/srcpkgs/ffmpeg4/files/altivec.patch similarity index 100% rename from srcpkgs/ffmpeg/files/altivec.patch rename to srcpkgs/ffmpeg4/files/altivec.patch diff --git a/srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch b/srcpkgs/ffmpeg4/patches/intel-media-driver-32bit.patch similarity index 100% rename from srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch rename to srcpkgs/ffmpeg4/patches/intel-media-driver-32bit.patch diff --git a/srcpkgs/ffmpeg/patches/svt-av1-3.0.patch b/srcpkgs/ffmpeg4/patches/svt-av1-3.0.patch similarity index 100% rename from srcpkgs/ffmpeg/patches/svt-av1-3.0.patch rename to srcpkgs/ffmpeg4/patches/svt-av1-3.0.patch diff --git a/srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch b/srcpkgs/ffmpeg4/patches/v4l2-fix-glibc.patch similarity index 100% rename from srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch rename to srcpkgs/ffmpeg4/patches/v4l2-fix-glibc.patch diff --git a/srcpkgs/ffmpeg/patches/vulkan-gcc14.patch b/srcpkgs/ffmpeg4/patches/vulkan-gcc14.patch similarity index 100% rename from srcpkgs/ffmpeg/patches/vulkan-gcc14.patch rename to srcpkgs/ffmpeg4/patches/vulkan-gcc14.patch diff --git a/srcpkgs/ffmpeg6/template b/srcpkgs/ffmpeg4/template similarity index 51% rename from srcpkgs/ffmpeg6/template rename to srcpkgs/ffmpeg4/template index f7502478d87cb6..f0e66bd3f6b20f 100644 --- a/srcpkgs/ffmpeg6/template +++ b/srcpkgs/ffmpeg4/template @@ -1,40 +1,50 @@ -# Template file for 'ffmpeg6' +# Template file for 'ffmpeg4' # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname! -pkgname=ffmpeg6 -version=6.1.3 -revision=4 +pkgname=ffmpeg4 +version=4.4.6 +revision=1 +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 libsoxr-devel - libcdio-paranoia-devel librtmp-devel libopenmpt-devel gnutls-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 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 $(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="ffplay6>=${version}_${revision}" -short_desc="Decoding, encoding and streaming software" -maintainer="Orphaned " + 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=bc5f1e4a4d283a6492354684ee1124129c52293bcfc6a9169193539fbece3487 +checksum=2290461f467c08ab801731ed412d8e724a5511d6c33173654bd9c1d2e25d0617 -build_options="vaapi vdpau fdk_aac nvcodec libvpl" +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*) - build_options_default+=" vaapi vdpau nvcodec" - hostmakedepends+=" nasm" - ;; - x86_64*) + i686*|x86_64*) hostmakedepends+=" nasm" - build_options_default+=" vaapi vdpau nvcodec libvpl" + build_options_default+=" vaapi vdpau nvenc nvdec" ;; ppc64*) build_options_default+=" vaapi vdpau";; mips*) CFLAGS="-mnan=legacy";; @@ -82,113 +92,128 @@ 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 --enable-libvpx --enable-libtheora \ + --enable-libx264 $(vopt_enable vpx libvpx) --enable-libtheora \ --enable-shared --enable-static --enable-libxcb \ - --enable-libpulse --enable-libfreetype --enable-libopenmpt \ + $(vopt_enable pulseaudio libpulse) --enable-libfreetype --enable-libmodplug \ --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 \ $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ - $(vopt_enable vaapi) $(vopt_enable vdpau) \ + --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 libvpl libvpl) \ - $(vopt_enable nvcodec nvenc) \ - $(vopt_enable nvcodec nvdec) + $(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} - make doc/ff{mpeg,play}.1 } +# transitional dummy package for ffmpeg +# binaries conflict with main ffmpeg do_install() { - make DESTDIR=${DESTDIR} install install-man + 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 } -libavcodec6_package() { +libavcodec4_package() { short_desc="FFmpeg codec library" pkg_install() { vmove "usr/lib/libavcodec.so.*" } } -libavdevice6_package() { +libavdevice4_package() { short_desc="FFmpeg device handling library" pkg_install() { vmove "usr/lib/libavdevice.so.*" } } -libavresample6_package() { - short_desc="Package deprecated, removal needed" - metapackage=yes +libavresample4_package() { + short_desc="FFmpeg audio resampling library" + pkg_install() { + vmove "usr/lib/libavresample.so.*" + } } -libavformat6_package() { +libavformat4_package() { short_desc="FFmpeg file format library" pkg_install() { vmove "usr/lib/libavformat.so.*" } } -libavutil6_package() { +libavutil4_package() { short_desc="FFmpeg utility library" pkg_install() { vmove "usr/lib/libavutil.so.*" } } -libavfilter6_package() { +libavfilter4_package() { short_desc="FFmpeg audio/video filter library" pkg_install() { vmove "usr/lib/libavfilter.so.*" } } -libpostproc6_package() { +libpostproc4_package() { short_desc="FFmpeg video postprocessing library" pkg_install() { vmove "usr/lib/libpostproc.so.*" } } -libswscale6_package() { +libswscale4_package() { short_desc="FFmpeg video scaling library" pkg_install() { vmove "usr/lib/libswscale.so.*" } } -libswresample6_package() { +libswresample4_package() { short_desc="FFmpeg video resampling library" pkg_install() { vmove "usr/lib/libswresample.so.*" } } -ffmpeg6-devel_package() { +ffmpeg4-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" + 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 @@ -196,6 +221,7 @@ ffmpeg6-devel_package() { # /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 @@ -206,10 +232,8 @@ ffmpeg6-devel_package() { } } -ffplay6_package() { - short_desc="Simple video player using FFmpeg and SDL2" - pkg_install() { - vmove usr/bin/ffplay - vmove "usr/share/man/man1/ffplay*" - } +ffplay4_package() { + short_desc="Simple video player using FFmpeg and SDL2 (transitional dummy package)" + metapackage=yes + depends="ffplay" } 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/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/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 diff --git a/srcpkgs/ffmpegthumbs/template b/srcpkgs/ffmpegthumbs/template index aed6df2c1479eb..4fcc9b4c31df16 100644 --- a/srcpkgs/ffmpegthumbs/template +++ b/srcpkgs/ffmpegthumbs/template @@ -1,14 +1,14 @@ # Template file for 'ffmpegthumbs' pkgname=ffmpegthumbs version=25.08.3 -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" 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 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/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/fooyin/patches/fix-cmake-sndfile.patch b/srcpkgs/fooyin/patches/fix-cmake-sndfile.patch deleted file mode 100644 index 27021a69bfb550..00000000000000 --- a/srcpkgs/fooyin/patches/fix-cmake-sndfile.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- a/cmake/modules/FindSndFile.cmake -+++ b/cmake/modules/FindSndFile.cmake -@@ -5,22 +5,21 @@ - # SndFile::SndFile - the sndfile library - - find_package(PkgConfig QUIET) --if(PkgConfig_FOUND) -- pkg_check_modules(SndFile sndfile QUIET) --else() -- find_path( -- SndFile_INCLUDEDIR -- NAMES sndfile.h -- PATH_SUFFIXES sndfile -- DOC "SndFile include directory" -- ) -+pkg_check_modules(SndFile sndfile QUIET) -+find_path( -+ SndFile_INCLUDEDIR -+ NAMES sndfile.h -+ PATH_SUFFIXES sndfile -+ HINTS ${PC_SndFile_INCLUDE_DIRS} -+ DOC "SndFile include directory" -+) - -- find_library( -- SndFile_LINK_LIBRARIES -- NAMES sndfile sndfile-1 -- DOC "SndFile library" -- ) --endif() -+find_library( -+ SndFile_LINK_LIBRARIES -+ NAMES sndfile sndfile-1 -+ HINTS ${PC_SndFile_LIBRARY_DIRS} -+ DOC "SndFile library" -+) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args( -@@ -30,17 +29,6 @@ - SndFile_INCLUDEDIR - ) - --file(STRINGS "${SndFile_INCLUDEDIR}/sndfile.h" -- SndFile_SUPPORTS_SET_COMPRESSION_LEVEL -- REGEX ".*SFC_SET_COMPRESSION_LEVEL.*" --) --if(SndFile_SUPPORTS_SET_COMPRESSION_LEVEL) -- set(SndFile_SUPPORTS_SET_COMPRESSION_LEVEL ON) --else() -- set(SndFile_SUPPORTS_SET_COMPRESSION_LEVEL OFF) --endif() --mark_as_advanced(SndFile_SUPPORTS_SET_COMPRESSION_LEVEL) -- - if(SndFile_FOUND) - if(NOT TARGET SndFile::sndfile) - add_library(SndFile::sndfile INTERFACE IMPORTED) 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/patches/qt610.patch b/srcpkgs/fooyin/patches/qt610.patch deleted file mode 100644 index 73eae61690e978..00000000000000 --- a/srcpkgs/fooyin/patches/qt610.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/src/gui/dirbrowser/dirdelegate.cpp -+++ b/src/gui/dirbrowser/dirdelegate.cpp -@@ -34,7 +34,7 @@ void DirDelegate::paint(QPainter* painte - - if(opt.backgroundBrush.style() != Qt::NoBrush) { - painter->fillRect(option.rect, opt.backgroundBrush); -- opt.backgroundBrush = {}; -+ opt.backgroundBrush = QBrush{}; - } - style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, option.widget); - ---- a/src/gui/librarytree/librarytreedelegate.cpp -+++ b/src/gui/librarytree/librarytreedelegate.cpp -@@ -42,7 +42,7 @@ void LibraryTreeDelegate::paint(QPainter - - if(opt.backgroundBrush.style() != Qt::NoBrush) { - painter->fillRect(option.rect, opt.backgroundBrush); -- opt.backgroundBrush = {}; -+ opt.backgroundBrush = QBrush{}; - } - style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, option.widget); - ---- a/src/gui/playlist/organiser/playlistorganiserdelegate.cpp -+++ b/src/gui/playlist/organiser/playlistorganiserdelegate.cpp -@@ -35,7 +35,7 @@ void PlaylistOrganiserDelegate::paint(QP - - if(opt.backgroundBrush.style() != Qt::NoBrush) { - painter->fillRect(option.rect, opt.backgroundBrush); -- opt.backgroundBrush = {}; -+ opt.backgroundBrush = QBrush{}; - } - style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, option.widget); - ---- a/src/plugins/vumeter/vumeterwidget.cpp -+++ b/src/plugins/vumeter/vumeterwidget.cpp -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/srcpkgs/fooyin/template b/srcpkgs/fooyin/template index 07a32ca1b87017..02ce7e48a448e9 100644 --- a/srcpkgs/fooyin/template +++ b/srcpkgs/fooyin/template @@ -1,15 +1,15 @@ # Template file for 'fooyin' pkgname=fooyin -version=0.8.1 +version=0.9.2 revision=1 -_libvgm_rev="34c368cde98f33c42455fbbfbec07073ba79bf5c" +_libvgm_rev="1aed079c8c9c3f3f4bc52080690e513db3ebaf25" build_style=cmake configure_args=" -DBUILD_PCH=ON -DBUILD_WERROR=OFF" hostmakedepends="pkg-config qt6-base-devel 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" depends="qt6-svg" @@ -21,8 +21,8 @@ homepage="https://www.fooyin.org/" changelog="https://raw.githubusercontent.com/fooyin/fooyin/refs/heads/master/CHANGELOG.md" distfiles="https://github.com/fooyin/fooyin/archive/v${version}.tar.gz https://github.com/ValleyBell/libvgm/archive/${_libvgm_rev}.tar.gz" -checksum="e702389488e19c4c48b1b62bf1b2adf263b818138e3b232a39259057cbcec9c2 - 29eaaaa86ed79ca54d6fa68fa9bf056c67ffdc2ad2c2b6c17e1f94ea415c96d2" +checksum="a3b0e880047790d169223983d4f9a26a2196499275d57321b15e9578dd716a94 + d573a2fd247ff87bb33d9883175e7326203548a5ec24a123a25a4832844f4759" skip_extraction="${_libvgm_rev}.tar.gz" diff --git a/srcpkgs/freerdp/patches/ffmpeg8.patch b/srcpkgs/freerdp/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..1d991cd18efb0a --- /dev/null +++ b/srcpkgs/freerdp/patches/ffmpeg8.patch @@ -0,0 +1,19 @@ +--- a/libfreerdp/codec/h264_ffmpeg.c ++++ b/libfreerdp/codec/h264_ffmpeg.c +@@ -100,7 +100,6 @@ + + if (sys->codecEncoderContext) + { +- avcodec_close(sys->codecEncoderContext); + #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 69, 100) + avcodec_free_context(&sys->codecEncoderContext); + #else +@@ -430,7 +429,6 @@ + + if (sys->codecDecoderContext) + { +- avcodec_close(sys->codecDecoderContext); + #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 69, 100) + avcodec_free_context(&sys->codecDecoderContext); + #else + diff --git a/srcpkgs/freerdp/template b/srcpkgs/freerdp/template index 10ab46339866e3..4b135b5959e82f 100644 --- a/srcpkgs/freerdp/template +++ b/srcpkgs/freerdp/template @@ -1,7 +1,7 @@ # Template file for 'freerdp' pkgname=freerdp version=2.11.7 -revision=2 +revision=3 build_style=cmake configure_args="-DWITH_ALSA=ON -DWITH_CUPS=OFF -DWITH_FFMPEG=ON -DWITH_GSTREAMER_0_10=OFF -DWITH_GSTREAMER_1_0=OFF -DWITH_JPEG=ON @@ -10,7 +10,7 @@ configure_args="-DWITH_ALSA=ON -DWITH_CUPS=OFF -DWITH_FFMPEG=ON -DWITH_XKBFILE=ON -DWITH_XRENDER=ON -DWITH_XV=ON -DWITH_SERVER=ON -DWAYLAND_SCANNER=/usr/bin/wayland-scanner -DWITH_CAIRO=ON" hostmakedepends="pkg-config xmlto wayland-devel" -makedepends="alsa-lib-devel ffmpeg6-devel glib-devel libusb-devel +makedepends="alsa-lib-devel ffmpeg-devel glib-devel libusb-devel libXcursor-devel libXinerama-devel libXrandr-devel libXv-devel libjpeg-turbo-devel openssl-devel libxkbfile-devel pulseaudio-devel libxkbcommon-devel wayland-devel cairo-devel libXdamage-devel" diff --git a/srcpkgs/freerdp3/template b/srcpkgs/freerdp3/template index ae81ed98c69462..5f0ea5e693a522 100644 --- a/srcpkgs/freerdp3/template +++ b/srcpkgs/freerdp3/template @@ -1,7 +1,7 @@ # Template file for 'freerdp3' pkgname=freerdp3 version=3.17.2 -revision=1 +revision=2 _webview_commit=2a0a1303c5e8c9c5b73fa9e461739042ebdabe6f build_style=cmake build_helper=qemu @@ -28,7 +28,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/gerbera/template b/srcpkgs/gerbera/template index ead68eb5917ab3..743fba1b6e0d1c 100644 --- a/srcpkgs/gerbera/template +++ b/srcpkgs/gerbera/template @@ -1,11 +1,11 @@ # Template file for 'gerbera' pkgname=gerbera version=2.5.0 -revision=2 +revision=3 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" diff --git a/srcpkgs/gifski/patches/ffmpeg8.patch b/srcpkgs/gifski/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..e07cd2d4a4d02c --- /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" + 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 = "36eca19434217b585748e0355a6d10c16deca8a2", 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..006364ec797bb4 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.0.1 } _setup_env() { diff --git a/srcpkgs/goldendict-ng/template b/srcpkgs/goldendict-ng/template index d872366a863c23..2dbfd40376b9d3 100644 --- a/srcpkgs/goldendict-ng/template +++ b/srcpkgs/goldendict-ng/template @@ -1,12 +1,12 @@ # Template file for 'goldendict-ng' pkgname=goldendict-ng version=25.06.0 -revision=2 +revision=3 _version_tag=Release.8a87a79b build_style=cmake configure_args="-DUSE_ALTERNATIVE_NAME=ON -DUSE_SYSTEM_FMT=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" 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 " diff --git a/srcpkgs/gst-libav/template b/srcpkgs/gst-libav/template index 03bb3c37348f2b..400e3922ca3e50 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.26.5 -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 " diff --git a/srcpkgs/gst-plugins-bad1/template b/srcpkgs/gst-plugins-bad1/template index ff0b583cfe7ab7..abb554af971e86 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.26.5 -revision=2 +revision=3 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}" diff --git a/srcpkgs/gst-rtsp-server/template b/srcpkgs/gst-rtsp-server/template index 69b3b5b729c14d..ff16a44601742a 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.26.5 -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 " 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 -} 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!" 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 diff --git a/srcpkgs/k3b/template b/srcpkgs/k3b/template index f844ef2d60e55c..6a9385658ddc5d 100644 --- a/srcpkgs/k3b/template +++ b/srcpkgs/k3b/template @@ -1,7 +1,7 @@ # Template file for 'k3b' pkgname=k3b version=25.08.3 -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" diff --git a/srcpkgs/kew/template b/srcpkgs/kew/template index 4b11961fb0dfac..64d5dbfce6580f 100644 --- a/srcpkgs/kew/template +++ b/srcpkgs/kew/template @@ -1,11 +1,11 @@ # Template file for 'kew' pkgname=kew version=3.6.4 -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" diff --git a/srcpkgs/kf6-kfilemetadata/template b/srcpkgs/kf6-kfilemetadata/template index 23d5a5cbe0db08..05740ac1de79e4 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.20.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" diff --git a/srcpkgs/kid3/template b/srcpkgs/kid3/template index cd0a5791b617ce..b6762e5609869f 100644 --- a/srcpkgs/kid3/template +++ b/srcpkgs/kid3/template @@ -1,7 +1,7 @@ # Template file for 'kid3' pkgname=kid3 -version=3.9.6 -revision=3 +version=3.9.7 +revision=1 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" @@ -21,7 +21,7 @@ license="GPL-2.0-only" homepage="https://kid3.kde.org" changelog="https://invent.kde.org/multimedia/kid3/-/raw/master/ChangeLog" distfiles="${SOURCEFORGE_SITE}/kid3/kid3-${version}.tar.gz" -checksum=df4a330b874cace7e84beb6d178316f681d09abb94d368c056de7e749ce4dff8 +checksum=392aafb176cc8dc9fdf08364f9bb754913725447b8f3e0e581c1d96c2fc30ae4 build_options="KDE mp3 mp4 flac vorbis taglib chromaprint" build_options_default="mp3 mp4 flac vorbis taglib chromaprint" diff --git a/srcpkgs/kodi/template b/srcpkgs/kodi/template index ec90bbe5536555..04c5abe67f3778 100644 --- a/srcpkgs/kodi/template +++ b/srcpkgs/kodi/template @@ -40,7 +40,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 ffmpeg-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" diff --git a/srcpkgs/kpipewire/template b/srcpkgs/kpipewire/template index 83722fd1ad1c97..84127a5c3ba9a1 100644 --- a/srcpkgs/kpipewire/template +++ b/srcpkgs/kpipewire/template @@ -1,12 +1,12 @@ # Template file for 'kpipewire' pkgname=kpipewire version=6.5.2 -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" 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/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/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/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/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/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/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/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/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/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/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/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/libgme/patches/header.patch b/srcpkgs/libgme/patches/header.patch deleted file mode 100644 index be687786429b2e..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_INTERAL_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 d0ed10d106f4f5..711376f93daed5 100644 --- a/srcpkgs/libgme/template +++ b/srcpkgs/libgme/template @@ -1,6 +1,6 @@ # Template file for 'libgme' pkgname=libgme -version=0.6.3 +version=0.6.4 revision=1 build_style=cmake configure_args="-DENABLE_UBSAN=OFF" @@ -8,9 +8,9 @@ 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" 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 " 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 c14ca23766acc7..50ca653926fbb1 100644 --- a/srcpkgs/libopenshot/template +++ b/srcpkgs/libopenshot/template @@ -7,7 +7,7 @@ build_style=cmake 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" 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/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/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/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 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/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/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 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/lms/template b/srcpkgs/lms/template index f88dce4ef9067c..a770897ba6c49b 100644 --- a/srcpkgs/lms/template +++ b/srcpkgs/lms/template @@ -1,11 +1,11 @@ # Template file for 'lms' pkgname=lms version=3.69.0 -revision=4 +revision=5 build_style=cmake configure_args="-DLMS_IMAGE_BACKEND=graphicsmagick" hostmakedepends="pkg-config" -makedepends="wt-devel ffmpeg6-devel boost-devel-minimal libboost_iostreams +makedepends="wt-devel ffmpeg-devel boost-devel-minimal libboost_iostreams libboost_program_options libconfig++-devel taglib-devel pam-devel libgraphicsmagick-devel gtest-devel libarchive-devel xxHash-devel" conf_files="/etc/lms.conf /etc/pam.d/lms" diff --git a/srcpkgs/localsearch/template b/srcpkgs/localsearch/template index 1adbe466119a9d..e71847f106ee7e 100644 --- a/srcpkgs/localsearch/template +++ b/srcpkgs/localsearch/template @@ -1,7 +1,7 @@ # Template file for 'localsearch' pkgname=localsearch version=3.9.0 -revision=1 +revision=2 build_style=meson build_helper=qemu configure_args="-Dextract=true -Dcue=enabled -Dexif=enabled -Dlibav=enabled @@ -11,7 +11,7 @@ configure_args="-Dextract=true -Dcue=enabled -Dexif=enabled -Dlibav=enabled -Dbattery_detection=upower -Dcharset_detection=icu -Dsystemd_user_services=false $(vopt_feature landlock)" hostmakedepends="pkg-config glib-devel intltool asciidoc" -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 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 " 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 " diff --git a/srcpkgs/mixxx/template b/srcpkgs/mixxx/template index d845c03c0cf437..a5d24f7d42f4e3 100644 --- a/srcpkgs/mixxx/template +++ b/srcpkgs/mixxx/template @@ -6,7 +6,7 @@ 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" -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 diff --git a/srcpkgs/mlt7/template b/srcpkgs/mlt7/template index e16182972c04a2..9f26ff11b18ccf 100644 --- a/srcpkgs/mlt7/template +++ b/srcpkgs/mlt7/template @@ -1,12 +1,12 @@ # Template file for 'mlt7' pkgname=mlt7 version=7.34.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 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" diff --git a/srcpkgs/mpd/template b/srcpkgs/mpd/template index 7081ee6a6f976b..f18759a6fba321 100644 --- a/srcpkgs/mpd/template +++ b/srcpkgs/mpd/template @@ -1,7 +1,7 @@ # Template file for 'mpd' pkgname=mpd version=0.24.5 -revision=3 +revision=4 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 diff --git a/srcpkgs/mpv-mpris/template b/srcpkgs/mpv-mpris/template index 4f35c0f78b8c3f..76aee34799c0ed 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.1 -revision=2 +revision=3 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" diff --git a/srcpkgs/mpv/patches/ffmpeg8.patch b/srcpkgs/mpv/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..dcfe998dbb1fda --- /dev/null +++ b/srcpkgs/mpv/patches/ffmpeg8.patch @@ -0,0 +1,22 @@ +--- a/demux/demux_mkv.c ++++ b/demux/demux_mkv.c +@@ -2200,16 +2200,16 @@ + // [0x30..0x37] are component tags utilized for + // non-mobile captioning service ("profile A"). + if (component_tag >= 0x30 && component_tag <= 0x37) +- lav->profile = FF_PROFILE_ARIB_PROFILE_A; ++ lav->profile = AV_PROFILE_ARIB_PROFILE_A; + break; + case 0x0012: + // component tag 0x87 signifies a mobile/partial reception + // (1seg) captioning service ("profile C"). + if (component_tag == 0x87) +- lav->profile = FF_PROFILE_ARIB_PROFILE_C; ++ lav->profile = AV_PROFILE_ARIB_PROFILE_C; + break; + } +- if (lav->profile == FF_PROFILE_UNKNOWN) ++ if (lav->profile == AV_PROFILE_UNKNOWN) + MP_WARN(demuxer, "ARIB caption profile %02x / %04x not supported.\n", + component_tag, data_component_id); + } diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template index b6fb7b849802d4..090aa8a5eaf197 100644 --- a/srcpkgs/mpv/template +++ b/srcpkgs/mpv/template @@ -22,7 +22,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) 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 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" diff --git a/srcpkgs/obs/template b/srcpkgs/obs/template index 8ea7dc238c7d98..7bcaff58217165 100644 --- a/srcpkgs/obs/template +++ b/srcpkgs/obs/template @@ -1,7 +1,7 @@ # Template file for 'obs' pkgname=obs version=32.0.2 -revision=2 +revision=3 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 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" diff --git a/srcpkgs/openimageio/template b/srcpkgs/openimageio/template index 136000b19c7224..2063e8a37c1443 100644 --- a/srcpkgs/openimageio/template +++ b/srcpkgs/openimageio/template @@ -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 " diff --git a/srcpkgs/openmw/template b/srcpkgs/openmw/template index a48d227fb3f538..814f13f4c52e33 100644 --- a/srcpkgs/openmw/template +++ b/srcpkgs/openmw/template @@ -1,7 +1,7 @@ # Template file for 'openmw' pkgname=openmw version=0.50.0 -revision=2 +revision=3 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" diff --git a/srcpkgs/openshot/template b/srcpkgs/openshot/template index 86c8f43a4ae2db..bcfc538f6bf9cb 100644 --- a/srcpkgs/openshot/template +++ b/srcpkgs/openshot/template @@ -1,10 +1,10 @@ # Template file for 'openshot' pkgname=openshot version=3.1.1 -revision=4 +revision=5 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" diff --git a/srcpkgs/opera/template b/srcpkgs/opera/template index af91e3ad17158f..546104b0d5d6f1 100644 --- a/srcpkgs/opera/template +++ b/srcpkgs/opera/template @@ -1,10 +1,10 @@ # Template file for 'opera' pkgname=opera version=122.0.5643.142 -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" 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 15b1b98f11fd36..9d78f80dd1dc22 100644 --- a/srcpkgs/osg/template +++ b/srcpkgs/osg/template @@ -1,14 +1,14 @@ # Template file for 'osg' pkgname=osg version=3.6.5 -revision=5 +revision=6 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) 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 " diff --git a/srcpkgs/ppsspp/template b/srcpkgs/ppsspp/template index a2ca9dd0cd1b09..66bf8019f8291e 100644 --- a/srcpkgs/ppsspp/template +++ b/srcpkgs/ppsspp/template @@ -18,7 +18,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')" 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" diff --git a/srcpkgs/qmmp/patches/cmake-cross.patch b/srcpkgs/qmmp/patches/cmake-cross.patch new file mode 100644 index 00000000000000..99949fb7563918 --- /dev/null +++ b/srcpkgs/qmmp/patches/cmake-cross.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -79,7 +79,7 @@ + find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS Widgets LinguistTools Network) + find_package(Qt6 6.2 CONFIG OPTIONAL_COMPONENTS DBus OpenGLWidgets Sql Multimedia) + +-get_target_property(QT_LRELEASE_EXECUTABLE Qt6::lrelease IMPORTED_LOCATION) ++set(QT_LRELEASE_EXECUTABLE /usr/lib/qt6/bin/lrelease) + + if(QT_LRELEASE_EXECUTABLE) + message(STATUS "Found lrelease executable: " ${QT_LRELEASE_EXECUTABLE}) diff --git a/srcpkgs/qmmp/patches/default-pulseaudio.patch b/srcpkgs/qmmp/patches/default-pulseaudio.patch deleted file mode 100644 index 4ff1da96269f4d..00000000000000 --- a/srcpkgs/qmmp/patches/default-pulseaudio.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/src/qmmp/output.cpp 2016-10-04 11:49:39.000000000 +0200 -+++ b/src/qmmp/output.cpp 2016-10-11 12:07:30.574173779 +0200 -@@ -14,6 +14,9 @@ - #include "qmmpplugincache_p.h" - #include "output.h" - -+#undef QMMP_DEFAULT_OUTPUT -+#define QMMP_DEFAULT_OUTPUT "pulse" -+ - Output::Output() - { - m_frequency = 0; diff --git a/srcpkgs/qmmp/patches/taglib2.patch b/srcpkgs/qmmp/patches/taglib2.patch deleted file mode 100644 index 9f095fe95686b1..00000000000000 --- a/srcpkgs/qmmp/patches/taglib2.patch +++ /dev/null @@ -1,44 +0,0 @@ -source: https://sourceforge.net/p/qmmp-dev/code/12168/tree//trunk/qmmp/src/plugins/Input/archive/archivetagreader.cpp?diff=5509cf2ad46bb41b66f44d6c:12167 - ---- a/src/plugins/Input/archive/archivetagreader.cpp -+++ b/src/plugins/Input/archive/archivetagreader.cpp -@@ -79,7 +79,11 @@ - { - return m_input->isOpen(); - } -+#if TAGLIB_MAJOR_VERSION >= 2 -+ virtual void seek(TagLib::offset_t offset, Position p = Beginning) override -+#else - virtual void seek(long offset, Position p = Beginning) override -+#endif - { - switch (p) - { -@@ -99,15 +103,27 @@ - m_input->seek(0); - TagLib::IOStream::clear(); - } -+#if TAGLIB_MAJOR_VERSION >= 2 -+ virtual TagLib::offset_t tell() const override -+#else - virtual long tell() const override -+#endif - { - return m_input->pos(); - } -+#if TAGLIB_MAJOR_VERSION >= 2 -+ virtual TagLib::offset_t length() override -+#else - virtual long length() override -+#endif - { - return m_input->size(); - } -+#if TAGLIB_MAJOR_VERSION >= 2 -+ virtual void truncate(TagLib::offset_t) override -+#else - virtual void truncate(long) override -+#endif - {} - - private: diff --git a/srcpkgs/qmmp/template b/srcpkgs/qmmp/template index 08ca2989477b2e..9a89313e7642b8 100644 --- a/srcpkgs/qmmp/template +++ b/srcpkgs/qmmp/template @@ -1,26 +1,26 @@ # Template file for 'qmmp' pkgname=qmmp -version=1.7.3 -revision=2 +version=2.3.0 +revision=1 build_style=cmake -configure_args="-DUSE_HAL:BOOL=FALSE -DQMMP_DEFAULT_UI:STRING=simple" -hostmakedepends="pkg-config qt5-host-tools qt5-qmake" +configure_args="-DQMMP_DEFAULT_UI:STRING=simple" +hostmakedepends="pkg-config qt6-base qt6-tools" # XXX projectm -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 libwildmidi-devel libshout-devel libsidplayfp-devel libsoxr-devel opusfile-devel pulseaudio-devel - projectM-devel qt5-multimedia-devel qt5-tools-devel qt5-x11extras-devel qt5-plugin-mysql - qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds taglib-devel + projectM-devel qt6-multimedia-devel qt6-tools-devel qt6-plugin-mysql + qt6-plugin-odbc qt6-plugin-pgsql qt6-plugin-sqlite taglib-devel wavpack-devel libmpcdec-devel pipewire-devel" # At least one QSql plugin should be available -depends="qt5-plugin-sqlite" -short_desc="Audio player based on the Qt5 libraries" +depends="qt6-plugin-sqlite" +short_desc="Audio player based on the Qt6 libraries" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="http://qmmp.ylsoftware.com" distfiles="http://qmmp.ylsoftware.com/files/qmmp/${version%.*}/qmmp-${version}.tar.bz2" -checksum=093100644c6d826170ba8bc22f8619fc4ae555ff41174ced510dd87a0a0dcbf0 +checksum=01c3e30367c885178cd115594d20f694a47a352fd7e65fcf5722e12ac8333063 qmmp-devel_package() { short_desc+=" - development files" 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-cpp14.patch b/srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp17.patch similarity index 89% rename from srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp14.patch rename to srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp17.patch index 04adc540f2cbc0..996f4102da6382 100644 --- a/srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp14.patch +++ b/srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp17.patch @@ -4,7 +4,7 @@ "//ui/gfx/geometry:geometry", ] -+ cflags_cc = [ "-std=c++14" ] ++ cflags_cc = [ "-std=c++17" ] + libs = [] 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 c72efe0a16e8dd..1f7ff38f03ede2 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.16 -revision=2 +revision=3 _version="${version}-lts" _chromium_commit=207c2ac45ca3386d153770c6b0d2ea2ec21ca880 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" makedepends="qt5-webchannel-devel qt5-location-devel qt5-tools-devel qt5-devel - qt5-declarative-devel libevent-devel snappy-devel icu-devel ffmpeg6-devel + qt5-declarative-devel libevent-devel snappy-devel icu-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 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 diff --git a/srcpkgs/qt6-multimedia/template b/srcpkgs/qt6-multimedia/template index 85c3bb89ecb967..a52197b50ccb57 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.0 -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 " diff --git a/srcpkgs/qt6-pdf/template b/srcpkgs/qt6-pdf/template index 4648333ff4b277..0071006bfec79d 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.0 -revision=2 +revision=3 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" diff --git a/srcpkgs/qtox/template b/srcpkgs/qtox/template index 5ec67bf253ede0..c29c8e46cc0b46 100644 --- a/srcpkgs/qtox/template +++ b/srcpkgs/qtox/template @@ -1,12 +1,12 @@ # Template file for 'qtox' pkgname=qtox version=1.18.3 -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" diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template index d701f4f2756a4a..c01bd914bb9237 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -154,6 +154,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 @@ -408,6 +411,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 @@ -498,6 +507,8 @@ replaces=" libpoppler86<=0.75.0_1 libpoppler87<=0.76.0_1 libpoppler89<=0.80.0_1 + libpostproc<=4.4.6_3 + libpostproc6<=6.1.3_4 libproxy-python<=0.4.18_1 libproxy-python3<=0.4.18_4 libpurple-hangouts<=20190606_1 @@ -519,6 +530,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 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 ed3fff7c3f6393..7ce9fef1c7bedf 100644 --- a/srcpkgs/retroarch/template +++ b/srcpkgs/retroarch/template @@ -1,7 +1,7 @@ # Template file for 'retroarch' pkgname=retroarch version=1.19.1 -revision=5 +revision=6 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')" 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" diff --git a/srcpkgs/rsgain/template b/srcpkgs/rsgain/template index 9d261ce8da096c..470fedff7f84d1 100644 --- a/srcpkgs/rsgain/template +++ b/srcpkgs/rsgain/template @@ -1,10 +1,10 @@ # Template file for 'rsgain' pkgname=rsgain version=3.6 -revision=3 +revision=4 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" diff --git a/srcpkgs/scrcpy/template b/srcpkgs/scrcpy/template index 77b903b21411ed..967056e4a11d27 100644 --- a/srcpkgs/scrcpy/template +++ b/srcpkgs/scrcpy/template @@ -1,12 +1,12 @@ # Template file for 'scrcpy' pkgname=scrcpy version=3.3.1 -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="SDL2-devel ffmpeg6-devel" +makedepends="SDL2-devel ffmpeg-devel" depends="android-tools" short_desc="Display and control your Android device" maintainer="SolitudeSF " diff --git a/srcpkgs/shotcut/template b/srcpkgs/shotcut/template index 6def38ab524316..701b48f0f13d21 100644 --- a/srcpkgs/shotcut/template +++ b/srcpkgs/shotcut/template @@ -1,14 +1,14 @@ # Template file for 'shotcut' pkgname=shotcut version=25.03.29 -revision=1 +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" +depends="ffmpeg frei0r-plugins qt6-declarative" short_desc="Free, open source, cross-platform video editor" maintainer="Orphaned " license="GPL-3.0-or-later" 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 " 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..96af0582ac3458 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 +version=0.9.4 revision=1 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" 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 diff --git a/srcpkgs/ssr/template b/srcpkgs/ssr/template index 5d5c0a98d65f58..a7df2db96d99d2 100644 --- a/srcpkgs/ssr/template +++ b/srcpkgs/ssr/template @@ -1,11 +1,11 @@ # Template file for 'ssr' pkgname=ssr version=0.4.4 -revision=3 +revision=4 build_style=cmake configure_args="-DWITH_QT5=ON" hostmakedepends="pkg-config" -makedepends="alsa-lib-devel ffmpeg6-devel glu-devel jack-devel pulseaudio-devel +makedepends="alsa-lib-devel ffmpeg-devel glu-devel jack-devel pulseaudio-devel qt5-tools-devel qt5-x11extras-devel libXinerama-devel v4l-utils-devel" depends="desktop-file-utils hicolor-icon-theme" short_desc="Simple Screen Recorder for programs and games" diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template index a7797e868aa7ac..d6d3a3e4dec444 100644 --- a/srcpkgs/sumo/template +++ b/srcpkgs/sumo/template @@ -4,7 +4,7 @@ version=1.12.0 revision=10 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 " 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} 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 d7700347f89587..81b01f6b02b2f2 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.3.1 -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 diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template index e54d1d9f555625..2256838b0c200f 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.20251022 -revision=1 +revision=2 _commit=5c5c71258777d0196dbb3a09cc37d2f56ead28ab _libyuv_commit=04821d1e7d60845525e8db55c7bcd41ef5be9406 _abseil_commit=d7aaad83b488fd62bd51c81ecf16cd938532cc0a @@ -11,7 +11,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" diff --git a/srcpkgs/tigervnc/template b/srcpkgs/tigervnc/template index c858e6226e706e..1cf1e8e0e5d7fe 100644 --- a/srcpkgs/tigervnc/template +++ b/srcpkgs/tigervnc/template @@ -1,7 +1,7 @@ # Template file for 'tigervnc' pkgname=tigervnc version=1.15.0 -revision=2 +revision=3 _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 " diff --git a/srcpkgs/timg/patches/musl.patch b/srcpkgs/timg/patches/musl.patch deleted file mode 100644 index f2eb8738d794da..00000000000000 --- a/srcpkgs/timg/patches/musl.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/termutils.h -+++ b/src/termutils.h -@@ -16,6 +16,7 @@ - #ifndef TIMG_TERMUTILS_H - #define TIMG_TERMUTILS_H - -+#include - #include - - namespace timg { diff --git a/srcpkgs/timg/template b/srcpkgs/timg/template index c4ef9765ff4e5d..6913b3c402b8cb 100644 --- a/srcpkgs/timg/template +++ b/srcpkgs/timg/template @@ -1,14 +1,15 @@ # Template file for 'timg' pkgname=timg -version=1.4.5 -revision=2 +version=1.6.3 +revision=1 build_style=cmake configure_args="-DWITH_OPENSLIDE_SUPPORT=off -Wno-dev" hostmakedepends="pkg-config git" -makedepends="libgraphicsmagick-devel ffmpeg6-devel libjpeg-turbo-devel libexif-devel" +makedepends="libgraphicsmagick-devel ffmpeg-devel libjpeg-turbo-devel libexif-devel + libdeflate-devel libsixel-devel librsvg-devel poppler-glib-devel" short_desc="24-bit color image & video viewer for terminal" maintainer="33KK " license="GPL-2.0-only" homepage="https://github.com/hzeller/timg" distfiles="https://github.com/hzeller/timg/archive/v${version}.tar.gz" -checksum=3c96476ce4ba2af4b9f639c5b59ded77ce1a4511551a04555ded105f14398e01 +checksum=59c908867f18c81106385a43065c232e63236e120d5b2596b179ce56340d7b01 diff --git a/srcpkgs/tvheadend/template b/srcpkgs/tvheadend/template index 9aea7de4ec7057..ef4cdddb9de0d6 100644 --- a/srcpkgs/tvheadend/template +++ b/srcpkgs/tvheadend/template @@ -1,14 +1,14 @@ # Template file for 'tvheadend' pkgname=tvheadend version=4.2.8 -revision=7 +revision=8 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 ffmpeg-devel" +makedepends="avahi-libs-devel openssl-devel zlib-devel libcurl-devel ffmpeg4-devel" short_desc="TV streaming server" maintainer="lemmi " license="GPL-3.0-only" 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" 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 " diff --git a/srcpkgs/vhs/template b/srcpkgs/vhs/template index 4fe950c84f52ed..567ac90bc2ee3b 100644 --- a/srcpkgs/vhs/template +++ b/srcpkgs/vhs/template @@ -1,12 +1,12 @@ # Template file for 'vhs' pkgname=vhs version=0.10.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" 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" diff --git a/srcpkgs/video-compare/template b/srcpkgs/video-compare/template index 076080e33775a5..5b5f32b1f8873f 100644 --- a/srcpkgs/video-compare/template +++ b/srcpkgs/video-compare/template @@ -1,16 +1,16 @@ # Template file for 'video-compare' pkgname=video-compare -version=20250420 +version=20250928 revision=1 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" homepage="https://github.com/pixop/video-compare" changelog="https://github.com/pixop/video-compare/releases" distfiles="https://github.com/pixop/video-compare/archive/refs/tags/${version}.tar.gz" -checksum=cfb1de9608fa141defa44b62c10ff7a56ea668c87d6c2c102409bddcaa98cd83 +checksum=cdcdb764868cf358ef5337f68e7bfd4526ec3efac27cc35db70c4158e3dea99f CXXFLAGS="-std=c++14 -D__STDC_CONSTANT_MACROS" diff --git a/srcpkgs/vlc/template b/srcpkgs/vlc/template index 66e27e616c47d7..0d36eb007ff80c 100644 --- a/srcpkgs/vlc/template +++ b/srcpkgs/vlc/template @@ -1,7 +1,7 @@ # Template file for 'vlc' pkgname=vlc version=3.0.22 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-gme --disable-libtar --enable-jack --enable-live555 --disable-fluidsynth --enable-dvdread @@ -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 diff --git a/srcpkgs/vokoscreenNG/template b/srcpkgs/vokoscreenNG/template index 5c6577203f7683..15705ecdbaffc0 100644 --- a/srcpkgs/vokoscreenNG/template +++ b/srcpkgs/vokoscreenNG/template @@ -1,14 +1,14 @@ # Template file for 'vokoscreenNG' pkgname=vokoscreenNG version=4.6.0 -revision=2 +revision=3 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" 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 " 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" 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 diff --git a/srcpkgs/xpra/template b/srcpkgs/xpra/template index 2067f87165f1a1..537d93bc96dd1f 100644 --- a/srcpkgs/xpra/template +++ b/srcpkgs/xpra/template @@ -1,14 +1,14 @@ # Template file for 'xpra' pkgname=xpra version=6.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"