pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/multimedia/ffmpeg6
Module Name: pkgsrc
Committed By: wiz
Date: Fri Jun 2 16:44:07 UTC 2023
Added Files:
pkgsrc/multimedia/ffmpeg6: ALTERNATIVES DESCR Makefile Makefile.common
PLIST buildlink3.mk distinfo options.mk
pkgsrc/multimedia/ffmpeg6/patches: patch-Makefile patch-configure
patch-doc_Makefile patch-doc_general__contents.texi
patch-doc_indevs.texi patch-doc_outdevs.texi
patch-libavdevice_Makefile patch-libavdevice_alldevices.c
patch-libavdevice_sunau.c patch-libavdevice_sunau.h
patch-libavdevice_sunau__dec.c patch-libavdevice_sunau__enc.c
patch-libavutil_macros.h patch-libavutil_x86_asm.h
patch-libavutil_x86_cpu.c
Log Message:
multimedia/ffmpeg6: import ffmpeg6-6.0
FFmpeg is a complete, cross-platform solution to record, convert
and stream audio and video. It includes libavcodec - the leading
audio/video codec library.
This package contains major version 6.
Changes compared to 5:
A new major release, FFmpeg 6.0 "Von Neumann", is now available
for download. This release has many new encoders and decoders,
filters, ffmpeg CLI tool improvements, and also, changes the way
releases are done. All major releases will now bump the version of
the ABI. We plan to have a new major release each year. Another
release-specific change is that deprecated APIs will be removed
after 3 releases, upon the next major bump. This means that releases
will be done more often and will be more organized.
New decoders featured are Bonk, RKA, Radiance, SC-4, APAC, VQC,
WavArc and a few ADPCM formats. QSV and NVenc now support AV1
encoding. The FFmpeg CLI (we usually reffer to it as ffmpeg.c to
avoid confusion) has speed-up improvements due to threading, as
well as statistics options, and the ability to pass option values
for filters from a file. There are quite a few new audio and video
filters, such as adrc, showcwt, backgroundkey and ssim360, with a
few hardware ones too. Finally, the release features many
behind-the-scenes changes, including a new FFT and MDCT implementation
used in codecs (expect a blog post about this soon), numerous
bugfixes, better ICC profile handling and colorspace signalling
improvement, introduction of a number of RISC-V vector and scalar
assembly optimized routines, and a few new improved APIs, which
can be viewed in the doc/APIchanges file in our tree. A few submitted
features, such as the Vulkan improvements and more FFT optimizations
will be in the next minor release, 6.1, which we plan to release
soon, in line with our new release schedule. Some highlights are:
Radiance HDR image support
ddagrab (Desktop Duplication) video capture filter
ffmpeg -shortest_buf_duration option
ffmpeg now requires threading to be built
ffmpeg now runs every muxer in a separate thread
Add new mode to cropdetect filter to detect crop-area based on motion vectors and edges
VAAPI decoding and encoding for 10/12bit 422, 10/12bit 444 HEVC and VP9
WBMP (Wireless Application Protocol Bitmap) image format
a3dscope filter
bonk decoder and demuxer
Micronas SC-4 audio decoder
LAF demuxer
APAC decoder and demuxer
Media 100i decoders
DTS to PTS reorder bsf
ViewQuest VQC decoder
backgroundkey filter
nvenc AV1 encoding support
MediaCodec decoder via NDKMediaCodec
MediaCodec encoder
oneVPL support for QSV
QSV AV1 encoder
QSV decoding and encoding for 10/12bit 422, 10/12bit 444 HEVC and VP9
showcwt multimedia filter
corr video filter
adrc audio filter
afdelaysrc audio filter
WADY DPCM decoder and demuxer
CBD2 DPCM decoder
ssim360 video filter
ffmpeg CLI new options: -stats_enc_pre[_fmt], -stats_enc_post[_fmt], -stats_mux_pre[_fmt]
hstack_vaapi, vstack_vaapi and xstack_vaapi filters
XMD ADPCM decoder and demuxer
media100 to mjpegb bsf
ffmpeg CLI new option: -fix_sub_duration_heartbeat
WavArc decoder and demuxer
CrystalHD decoders deprecated
SDNS demuxer
RKA decoder and demuxer
filtergraph syntax in ffmpeg CLI now supports passing file contents as option values
hstack_qsv, vstack_qsv and xstack_qsv filters
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/multimedia/ffmpeg6/ALTERNATIVES \
pkgsrc/multimedia/ffmpeg6/DESCR pkgsrc/multimedia/ffmpeg6/Makefile \
pkgsrc/multimedia/ffmpeg6/Makefile.common pkgsrc/multimedia/ffmpeg6/PLIST \
pkgsrc/multimedia/ffmpeg6/buildlink3.mk \
pkgsrc/multimedia/ffmpeg6/distinfo pkgsrc/multimedia/ffmpeg6/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/multimedia/ffmpeg6/patches/patch-Makefile \
pkgsrc/multimedia/ffmpeg6/patches/patch-configure \
pkgsrc/multimedia/ffmpeg6/patches/patch-doc_Makefile \
pkgsrc/multimedia/ffmpeg6/patches/patch-doc_general__contents.texi \
pkgsrc/multimedia/ffmpeg6/patches/patch-doc_indevs.texi \
pkgsrc/multimedia/ffmpeg6/patches/patch-doc_outdevs.texi \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_Makefile \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_alldevices.c \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau.c \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau.h \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau__dec.c \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau__enc.c \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_macros.h \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_x86_asm.h \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_x86_cpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/multimedia/ffmpeg6/ALTERNATIVES
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/ALTERNATIVES:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/ALTERNATIVES Fri Jun 2 16:44:06 2023
@@ -0,0 +1,2 @@
+bin/ffmpeg @PREFIX@/bin/ffmpeg6
+bin/ffprobe @PREFIX@/bin/ffprobe6
Index: pkgsrc/multimedia/ffmpeg6/DESCR
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/DESCR:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/DESCR Fri Jun 2 16:44:06 2023
@@ -0,0 +1,5 @@
+FFmpeg is a complete, cross-platform solution to record, convert
+and stream audio and video. It includes libavcodec - the leading
+audio/video codec library.
+
+This package contains major version 6.
Index: pkgsrc/multimedia/ffmpeg6/Makefile
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/Makefile:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/Makefile Fri Jun 2 16:44:06 2023
@@ -0,0 +1,45 @@
+# $NetBSD: Makefile,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg6/}
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://ffmpeg.org/
+COMMENT= Decoding, encoding and streaming software (v6.x)
+
+CONFIGURE_ARGS+= --enable-avfilter
+CONFIGURE_ARGS+= --enable-postproc
+CONFIGURE_ARGS+= --enable-rpath
+CONFIGURE_ARGS+= --disable-ffplay
+
+INSTALLATION_DIRS= lib/ffmpeg6 share/doc/ffmpeg6
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${USE_CROSS_COMPILE:U:tl} == yes
+CONFIGURE_ARGS+= --enable-cross-compile
+CONFIGURE_ARGS+= --host-cc=${NATIVE_CC:Q}
+CONFIGURE_ARGS+= --host-ld=${NATIVE_CC:Q}
+CONFIGURE_ARGS+= --target-os=${LOWER_OPSYS}
+.endif
+
+PRINT_PLIST_AWK+= /html/ { $$0 = "$${PLIST.doc}" $$0 }
+PRINT_PLIST_AWK+= /css/ { $$0 = "$${PLIST.doc}" $$0 }
+
+TEST_TARGET= check
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/doc/*.txt \
+ ${DESTDIR}${PREFIX}/share/doc/ffmpeg6
+
+.include "options.mk"
+
+# disable asm on i386 to avoid text relocations
+.if ${MACHINE_ARCH} == "i386"
+CONFIGURE_ARGS+= --disable-asm
+.endif
+
+# configure script uses uname -m to detect arch, as opposed to uname -p in
+# GNU/configure. Unable to detect NetBSD/macppc hosts correctly.
+CONFIGURE_ARGS+= --arch=${MACHINE_ARCH}
+
+.include "../../multimedia/ffmpeg6/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/multimedia/ffmpeg6/Makefile.common
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/Makefile.common:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/Makefile.common Fri Jun 2 16:44:06 2023
@@ -0,0 +1,84 @@
+# $NetBSD: Makefile.common,v 1.1 2023/06/02 16:44:06 wiz Exp $
+# used by multimedia/ffmpeg6/Makefile
+# used by multimedia/ffplay6/Makefile
+
+DISTNAME= ffmpeg-6.0
+CATEGORIES= multimedia
+MASTER_SITES= http://www.ffmpeg.org/releases/
+EXTRACT_SUFX= .tar.xz
+
+LICENSE= gnu-lgpl-v2.1 AND gnu-gpl-v2 ${ADDITIONAL_LICENSE}
+
+PATCHDIR= ${.CURDIR}/../../multimedia/ffmpeg6/patches
+
+USE_LIBTOOL= yes
+USE_TOOLS+= gmake pod2man perl pkg-config
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS+= --cc=${CC:Q}
+CONFIGURE_ARGS+= --disable-debug
+CONFIGURE_ARGS+= --disable-optimizations
+CONFIGURE_ARGS+= --disable-stripping
+CONFIGURE_ARGS+= --enable-gpl
+CONFIGURE_ARGS+= --enable-libxml2
+CONFIGURE_ARGS+= --enable-pthreads
+CONFIGURE_ARGS+= --enable-shared
+CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
+CONFIGURE_ARGS+= --prefix=${PREFIX}
+CONFIGURE_ARGS+= --progs-suffix=6
+
+CONFIGURE_ARGS+= --enable-runtime-cpudetect
+CONFIGURE_ARGS+= --datadir=${PREFIX}/share/ffmpeg6
+CONFIGURE_ARGS+= --docdir=${PREFIX}/share/doc/ffmpeg6
+CONFIGURE_ARGS+= --incdir=${PREFIX}/include/ffmpeg6
+CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/ffmpeg6
+CONFIGURE_ARGS+= --shlibdir=${PREFIX}/lib/ffmpeg6
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/ffmpeg6
+
+.if !empty(MACHINE_PLATFORM:MDarwin-1[2-9].*-*) || !empty(MACHINE_PLATFORM:MDarwin-2*)
+CONFIGURE_ARGS+= --enable-opencl
+.endif
+
+.if ${OPSYS} == "SunOS"
+USE_TOOLS+= bash:build
+CONFIG_SHELL= ${TOOLS_PATH.bash}
+.endif
+
+# Let's not put garbage into /tmp
+CONFIGURE_ENV+= TMPDIR=${WRKSRC}/tmp
+
+.include "../../mk/compiler.mk"
+
+.if !empty(PKGSRC_COMPILER:Msunpro)
+SUBST_CLASSES+= sunwspro
+SUBST_MESSAGE.sunwspro= Fixing compiler options for SunStudio C compiler.
+SUBST_STAGE.sunwspro= post-configure
+SUBST_FILES.sunwspro= config.mak
+SUBST_SED.sunwspro= -e "s/-O /-KPIC -DPIC /"
+SUBST_SED.sunwspro+= -e "s/-O3/-xO2/g"
+SUBST_SED.sunwspro+= -e "s/-std=c99/-xc99=all/"
+SUBST_SED.sunwspro+= -e "s/-Wl,-rpath-link,/-L /g"
+.endif
+
+.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == i386
+BUILD_DEPENDS+= nasm>=2.13:../../devel/nasm
+.endif
+
+REPLACE_PERL+= doc/texi2pod.pl
+REPLACE_SH+= configure
+REPLACE_SH+= ffbuild/pkgconfig_generate.sh
+REPLACE_SH+= ffbuild/version.sh
+
+PLIST_SRC+= ${PKGDIR}/PLIST
+
+MAKE_ENV+= EXTRA_LIBS=${LIBGETOPT:Q}
+
+pre-configure:
+ ${MKDIR} ${WRKSRC}/tmp
+
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../archivers/xz/buildlink3.mk"
+.include "../../devel/libgetopt/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../mk/atomic64.mk"
+.include "../../mk/pthread.buildlink3.mk"
Index: pkgsrc/multimedia/ffmpeg6/PLIST
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/PLIST:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/PLIST Fri Jun 2 16:44:06 2023
@@ -0,0 +1,280 @@
+@comment $NetBSD: PLIST,v 1.1 2023/06/02 16:44:06 wiz Exp $
+bin/ffmpeg6
+bin/ffprobe6
+include/ffmpeg6/libavcodec/ac3_parser.h
+include/ffmpeg6/libavcodec/adts_parser.h
+include/ffmpeg6/libavcodec/avcodec.h
+include/ffmpeg6/libavcodec/avdct.h
+include/ffmpeg6/libavcodec/avfft.h
+include/ffmpeg6/libavcodec/bsf.h
+include/ffmpeg6/libavcodec/codec.h
+include/ffmpeg6/libavcodec/codec_desc.h
+include/ffmpeg6/libavcodec/codec_id.h
+include/ffmpeg6/libavcodec/codec_par.h
+include/ffmpeg6/libavcodec/d3d11va.h
+include/ffmpeg6/libavcodec/defs.h
+include/ffmpeg6/libavcodec/dirac.h
+include/ffmpeg6/libavcodec/dv_profile.h
+include/ffmpeg6/libavcodec/dxva2.h
+include/ffmpeg6/libavcodec/jni.h
+include/ffmpeg6/libavcodec/mediacodec.h
+include/ffmpeg6/libavcodec/packet.h
+include/ffmpeg6/libavcodec/qsv.h
+include/ffmpeg6/libavcodec/vdpau.h
+include/ffmpeg6/libavcodec/version.h
+include/ffmpeg6/libavcodec/version_major.h
+include/ffmpeg6/libavcodec/videotoolbox.h
+include/ffmpeg6/libavcodec/vorbis_parser.h
+include/ffmpeg6/libavcodec/xvmc.h
+include/ffmpeg6/libavdevice/avdevice.h
+include/ffmpeg6/libavdevice/version.h
+include/ffmpeg6/libavdevice/version_major.h
+include/ffmpeg6/libavfilter/avfilter.h
+include/ffmpeg6/libavfilter/buffersink.h
+include/ffmpeg6/libavfilter/buffersrc.h
+include/ffmpeg6/libavfilter/version.h
+include/ffmpeg6/libavfilter/version_major.h
+include/ffmpeg6/libavformat/avformat.h
+include/ffmpeg6/libavformat/avio.h
+include/ffmpeg6/libavformat/version.h
+include/ffmpeg6/libavformat/version_major.h
+include/ffmpeg6/libavutil/adler32.h
+include/ffmpeg6/libavutil/aes.h
+include/ffmpeg6/libavutil/aes_ctr.h
+include/ffmpeg6/libavutil/ambient_viewing_environment.h
+include/ffmpeg6/libavutil/attributes.h
+include/ffmpeg6/libavutil/audio_fifo.h
+include/ffmpeg6/libavutil/avassert.h
+include/ffmpeg6/libavutil/avconfig.h
+include/ffmpeg6/libavutil/avstring.h
+include/ffmpeg6/libavutil/avutil.h
+include/ffmpeg6/libavutil/base64.h
+include/ffmpeg6/libavutil/blowfish.h
+include/ffmpeg6/libavutil/bprint.h
+include/ffmpeg6/libavutil/bswap.h
+include/ffmpeg6/libavutil/buffer.h
+include/ffmpeg6/libavutil/camellia.h
+include/ffmpeg6/libavutil/cast5.h
+include/ffmpeg6/libavutil/channel_layout.h
+include/ffmpeg6/libavutil/common.h
+include/ffmpeg6/libavutil/cpu.h
+include/ffmpeg6/libavutil/crc.h
+include/ffmpeg6/libavutil/csp.h
+include/ffmpeg6/libavutil/des.h
+include/ffmpeg6/libavutil/detection_bbox.h
+include/ffmpeg6/libavutil/dict.h
+include/ffmpeg6/libavutil/display.h
+include/ffmpeg6/libavutil/dovi_meta.h
+include/ffmpeg6/libavutil/downmix_info.h
+include/ffmpeg6/libavutil/encryption_info.h
+include/ffmpeg6/libavutil/error.h
+include/ffmpeg6/libavutil/eval.h
+include/ffmpeg6/libavutil/ffversion.h
+include/ffmpeg6/libavutil/fifo.h
+include/ffmpeg6/libavutil/file.h
+include/ffmpeg6/libavutil/film_grain_params.h
+include/ffmpeg6/libavutil/frame.h
+include/ffmpeg6/libavutil/hash.h
+include/ffmpeg6/libavutil/hdr_dynamic_metadata.h
+include/ffmpeg6/libavutil/hdr_dynamic_vivid_metadata.h
+include/ffmpeg6/libavutil/hmac.h
+include/ffmpeg6/libavutil/hwcontext.h
+include/ffmpeg6/libavutil/hwcontext_cuda.h
+include/ffmpeg6/libavutil/hwcontext_d3d11va.h
+include/ffmpeg6/libavutil/hwcontext_drm.h
+include/ffmpeg6/libavutil/hwcontext_dxva2.h
+include/ffmpeg6/libavutil/hwcontext_mediacodec.h
+include/ffmpeg6/libavutil/hwcontext_opencl.h
+include/ffmpeg6/libavutil/hwcontext_qsv.h
+include/ffmpeg6/libavutil/hwcontext_vaapi.h
+include/ffmpeg6/libavutil/hwcontext_vdpau.h
+include/ffmpeg6/libavutil/hwcontext_videotoolbox.h
+include/ffmpeg6/libavutil/hwcontext_vulkan.h
+include/ffmpeg6/libavutil/imgutils.h
+include/ffmpeg6/libavutil/intfloat.h
+include/ffmpeg6/libavutil/intreadwrite.h
+include/ffmpeg6/libavutil/lfg.h
+include/ffmpeg6/libavutil/log.h
+include/ffmpeg6/libavutil/lzo.h
+include/ffmpeg6/libavutil/macros.h
+include/ffmpeg6/libavutil/mastering_display_metadata.h
+include/ffmpeg6/libavutil/mathematics.h
+include/ffmpeg6/libavutil/md5.h
+include/ffmpeg6/libavutil/mem.h
+include/ffmpeg6/libavutil/motion_vector.h
+include/ffmpeg6/libavutil/murmur3.h
+include/ffmpeg6/libavutil/opt.h
+include/ffmpeg6/libavutil/parseutils.h
+include/ffmpeg6/libavutil/pixdesc.h
+include/ffmpeg6/libavutil/pixelutils.h
+include/ffmpeg6/libavutil/pixfmt.h
+include/ffmpeg6/libavutil/random_seed.h
+include/ffmpeg6/libavutil/rational.h
+include/ffmpeg6/libavutil/rc4.h
+include/ffmpeg6/libavutil/replaygain.h
+include/ffmpeg6/libavutil/ripemd.h
+include/ffmpeg6/libavutil/samplefmt.h
+include/ffmpeg6/libavutil/sha.h
+include/ffmpeg6/libavutil/sha512.h
+include/ffmpeg6/libavutil/spherical.h
+include/ffmpeg6/libavutil/stereo3d.h
+include/ffmpeg6/libavutil/tea.h
+include/ffmpeg6/libavutil/threadmessage.h
+include/ffmpeg6/libavutil/time.h
+include/ffmpeg6/libavutil/timecode.h
+include/ffmpeg6/libavutil/timestamp.h
+include/ffmpeg6/libavutil/tree.h
+include/ffmpeg6/libavutil/twofish.h
+include/ffmpeg6/libavutil/tx.h
+include/ffmpeg6/libavutil/uuid.h
+include/ffmpeg6/libavutil/version.h
+include/ffmpeg6/libavutil/video_enc_params.h
+include/ffmpeg6/libavutil/xtea.h
+include/ffmpeg6/libpostproc/postprocess.h
+include/ffmpeg6/libpostproc/version.h
+include/ffmpeg6/libpostproc/version_major.h
+include/ffmpeg6/libswresample/swresample.h
+include/ffmpeg6/libswresample/version.h
+include/ffmpeg6/libswresample/version_major.h
+include/ffmpeg6/libswscale/swscale.h
+include/ffmpeg6/libswscale/version.h
+include/ffmpeg6/libswscale/version_major.h
+lib/ffmpeg6/libavcodec.a
+lib/ffmpeg6/libavcodec.so
+lib/ffmpeg6/libavcodec.so.60
+lib/ffmpeg6/libavcodec.so.60.3.100
+lib/ffmpeg6/libavdevice.a
+lib/ffmpeg6/libavdevice.so
+lib/ffmpeg6/libavdevice.so.60
+lib/ffmpeg6/libavdevice.so.60.1.100
+lib/ffmpeg6/libavfilter.a
+lib/ffmpeg6/libavfilter.so
+lib/ffmpeg6/libavfilter.so.9
+lib/ffmpeg6/libavfilter.so.9.3.100
+lib/ffmpeg6/libavformat.a
+lib/ffmpeg6/libavformat.so
+lib/ffmpeg6/libavformat.so.60
+lib/ffmpeg6/libavformat.so.60.3.100
+lib/ffmpeg6/libavutil.a
+lib/ffmpeg6/libavutil.so
+lib/ffmpeg6/libavutil.so.58
+lib/ffmpeg6/libavutil.so.58.2.100
+lib/ffmpeg6/libpostproc.a
+lib/ffmpeg6/libpostproc.so
+lib/ffmpeg6/libpostproc.so.57
+lib/ffmpeg6/libpostproc.so.57.1.100
+lib/ffmpeg6/libswresample.a
+lib/ffmpeg6/libswresample.so
+lib/ffmpeg6/libswresample.so.4
+lib/ffmpeg6/libswresample.so.4.10.100
+lib/ffmpeg6/libswscale.a
+lib/ffmpeg6/libswscale.so
+lib/ffmpeg6/libswscale.so.7
+lib/ffmpeg6/libswscale.so.7.1.100
+lib/ffmpeg6/pkgconfig/libavcodec.pc
+lib/ffmpeg6/pkgconfig/libavdevice.pc
+lib/ffmpeg6/pkgconfig/libavfilter.pc
+lib/ffmpeg6/pkgconfig/libavformat.pc
+lib/ffmpeg6/pkgconfig/libavutil.pc
+lib/ffmpeg6/pkgconfig/libpostproc.pc
+lib/ffmpeg6/pkgconfig/libswresample.pc
+lib/ffmpeg6/pkgconfig/libswscale.pc
+man/man1/ffmpeg-all6.1
+man/man1/ffmpeg-bitstream-filters6.1
+man/man1/ffmpeg-codecs6.1
+man/man1/ffmpeg-devices6.1
+man/man1/ffmpeg-filters6.1
+man/man1/ffmpeg-formats6.1
+man/man1/ffmpeg-protocols6.1
+man/man1/ffmpeg-resampler6.1
+man/man1/ffmpeg-scaler6.1
+man/man1/ffmpeg-utils6.1
+man/man1/ffmpeg6.1
+man/man1/ffprobe-all6.1
+man/man1/ffprobe6.1
+man/man3/libavcodec6.3
+man/man3/libavdevice6.3
+man/man3/libavfilter6.3
+man/man3/libavformat6.3
+man/man3/libavutil6.3
+man/man3/libswresample6.3
+man/man3/libswscale6.3
+${PLIST.doc}share/doc/ffmpeg6/bootstrap.min.css
+share/doc/ffmpeg6/build_system.txt
+${PLIST.doc}share/doc/ffmpeg6/default.css
+${PLIST.doc}share/doc/ffmpeg6/developer.html
+share/doc/ffmpeg6/errno.txt
+${PLIST.doc}share/doc/ffmpeg6/faq.html
+${PLIST.doc}share/doc/ffmpeg6/fate.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-all.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-bitstream-filters.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-codecs.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-devices.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-filters.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-formats.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-protocols.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-resampler.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-scaler.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg-utils.html
+${PLIST.doc}share/doc/ffmpeg6/ffmpeg.html
+share/doc/ffmpeg6/ffmpeg.txt
+${PLIST.doc}share/doc/ffmpeg6/ffprobe-all.html
+${PLIST.doc}share/doc/ffmpeg6/ffprobe.html
+share/doc/ffmpeg6/filter_design.txt
+${PLIST.doc}share/doc/ffmpeg6/general.html
+${PLIST.doc}share/doc/ffmpeg6/git-howto.html
+share/doc/ffmpeg6/issue_tracker.txt
+share/doc/ffmpeg6/libav-merge.txt
+${PLIST.doc}share/doc/ffmpeg6/libavcodec.html
+${PLIST.doc}share/doc/ffmpeg6/libavdevice.html
+${PLIST.doc}share/doc/ffmpeg6/libavfilter.html
+${PLIST.doc}share/doc/ffmpeg6/libavformat.html
+${PLIST.doc}share/doc/ffmpeg6/libavutil.html
+${PLIST.doc}share/doc/ffmpeg6/libswresample.html
+${PLIST.doc}share/doc/ffmpeg6/libswscale.html
+${PLIST.doc}share/doc/ffmpeg6/mailing-list-faq.html
+share/doc/ffmpeg6/mips.txt
+share/doc/ffmpeg6/multithreading.txt
+${PLIST.doc}share/doc/ffmpeg6/nut.html
+share/doc/ffmpeg6/optimization.txt
+${PLIST.doc}share/doc/ffmpeg6/platform.html
+share/doc/ffmpeg6/rate_distortion.txt
+share/doc/ffmpeg6/snow.txt
+${PLIST.doc}share/doc/ffmpeg6/style.min.css
+share/doc/ffmpeg6/swresample.txt
+share/doc/ffmpeg6/swscale.txt
+share/doc/ffmpeg6/tablegen.txt
+share/doc/ffmpeg6/undefined.txt
+share/doc/ffmpeg6/writing_filters.txt
+share/ffmpeg6/examples/Makefile
+share/ffmpeg6/examples/README
+share/ffmpeg6/examples/avio_http_serve_files.c
+share/ffmpeg6/examples/avio_list_dir.c
+share/ffmpeg6/examples/avio_read_callback.c
+share/ffmpeg6/examples/decode_audio.c
+share/ffmpeg6/examples/decode_filter_audio.c
+share/ffmpeg6/examples/decode_filter_video.c
+share/ffmpeg6/examples/decode_video.c
+share/ffmpeg6/examples/demux_decode.c
+share/ffmpeg6/examples/encode_audio.c
+share/ffmpeg6/examples/encode_video.c
+share/ffmpeg6/examples/extract_mvs.c
+share/ffmpeg6/examples/filter_audio.c
+share/ffmpeg6/examples/hw_decode.c
+share/ffmpeg6/examples/mux.c
+share/ffmpeg6/examples/qsv_decode.c
+share/ffmpeg6/examples/qsv_transcode.c
+share/ffmpeg6/examples/remux.c
+share/ffmpeg6/examples/resample_audio.c
+share/ffmpeg6/examples/scale_video.c
+share/ffmpeg6/examples/show_metadata.c
+share/ffmpeg6/examples/transcode.c
+share/ffmpeg6/examples/transcode_aac.c
+share/ffmpeg6/examples/vaapi_encode.c
+share/ffmpeg6/examples/vaapi_transcode.c
+share/ffmpeg6/ffprobe.xsd
+share/ffmpeg6/libvpx-1080p.ffpreset
+share/ffmpeg6/libvpx-1080p50_60.ffpreset
+share/ffmpeg6/libvpx-360p.ffpreset
+share/ffmpeg6/libvpx-720p.ffpreset
+share/ffmpeg6/libvpx-720p50_60.ffpreset
Index: pkgsrc/multimedia/ffmpeg6/buildlink3.mk
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/buildlink3.mk:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/buildlink3.mk Fri Jun 2 16:44:06 2023
@@ -0,0 +1,62 @@
+# $NetBSD: buildlink3.mk,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+BUILDLINK_TREE+= ffmpeg6
+
+.if !defined(FFMPEG6_BUILDLINK3_MK)
+FFMPEG6_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.ffmpeg6+= ffmpeg6>=6.0
+BUILDLINK_PKGSRCDIR.ffmpeg6?= ../../multimedia/ffmpeg6
+
+pkgbase := ffmpeg6
+.include "../../mk/pkg-build-options.mk"
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${PKG_BUILD_OPTIONS.ffmpeg6:Mav1}
+. include "../../multimedia/libaom/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.ffmpeg6:Mfreetype}
+. include "../../graphics/freetype2/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.ffmpeg6:Mfontconfig}
+. include "../../fonts/fontconfig/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.ffmpeg6:Mtheora}
+. include "../../multimedia/libtheora/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.ffmpeg6:Mxvid}
+. include "../../multimedia/xvidcore/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.ffmpeg6:Mx264}
+. include "../../multimedia/x264/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.ffmpeg6:Mlibvpx}
+. include "../../multimedia/libvpx/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.ffmpeg6:Mvaapi}
+. include "../../multimedia/libva/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.ffmpeg6:Mvdpau}
+. include "../../multimedia/libvdpau/buildlink3.mk"
+.endif
+
+BUILDLINK_INCDIRS.ffmpeg6+= include/ffmpeg6
+BUILDLINK_LIBDIRS.ffmpeg6+= lib/ffmpeg6
+BUILDLINK_FNAME_TRANSFORM.ffmpeg6+= -e 's|lib/ffmpeg6/pkgconfig/|lib/pkgconfig/|'
+
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../archivers/xz/buildlink3.mk"
+.include "../../devel/libgetopt/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.endif # FFMPEG6_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -ffmpeg6
Index: pkgsrc/multimedia/ffmpeg6/distinfo
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/distinfo:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/distinfo Fri Jun 2 16:44:06 2023
@@ -0,0 +1,20 @@
+$NetBSD: distinfo,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+BLAKE2s (ffmpeg-6.0.tar.xz) = ce6f75464ac37374825b33d7b32b22f7e9dcea51026cc885cd6668fbada65c08
+SHA512 (ffmpeg-6.0.tar.xz) = 4d0e8f635d5a1633710f30cb3e0a854b6ca3bf85e33a289d1ec7aca2ad55dc4910010bc9cf3f13eee9f6decb9d50a0df6d7aa5a342f308c3868d2730f3a6b980
+Size (ffmpeg-6.0.tar.xz) = 10234012 bytes
+SHA1 (patch-Makefile) = 2d27f218ee49179fdea14bb5c86c506dfb64dbd6
+SHA1 (patch-configure) = 59195d37ae1a70b2eb4b6576e1680e0916e1e99f
+SHA1 (patch-doc_Makefile) = c513af183e374bff4fa5945d374ddae472d51bad
+SHA1 (patch-doc_general__contents.texi) = 13704795d2688dc0377a512dc6e65025ad674724
+SHA1 (patch-doc_indevs.texi) = 8cd421a67f34ebbe6099102bf1de7c6cdb13dcb7
+SHA1 (patch-doc_outdevs.texi) = 0aec04682b516016abe9b81f6efcbbef97b1c3b2
+SHA1 (patch-libavdevice_Makefile) = 526efd20021068245d8904c0d55508a540ae4054
+SHA1 (patch-libavdevice_alldevices.c) = a9e2a2027fb2c18d5509b68deb5fd8523305dfc7
+SHA1 (patch-libavdevice_sunau.c) = 554a5fc77c0e94828e9eadc7f1f9d4067a76d4ae
+SHA1 (patch-libavdevice_sunau.h) = 2678d87f81e7b3faa42b5cc9814e373c4ad812f6
+SHA1 (patch-libavdevice_sunau__dec.c) = d2fc01e941c68ab8b6f5e0b98ee536a32cc56bdc
+SHA1 (patch-libavdevice_sunau__enc.c) = efe765b99ad6379d0237c619ac0dce41306431be
+SHA1 (patch-libavutil_macros.h) = 7d9770f018a2207d2dcb1fe057564e30be51fd42
+SHA1 (patch-libavutil_x86_asm.h) = 8f48f9e8ec08b5176bb40fc0021f3bb913dbef22
+SHA1 (patch-libavutil_x86_cpu.c) = 9c97e68fde0fcb19741e034a803d509040ea4487
Index: pkgsrc/multimedia/ffmpeg6/options.mk
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/options.mk:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/options.mk Fri Jun 2 16:44:06 2023
@@ -0,0 +1,286 @@
+# $NetBSD: options.mk,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg6
+PKG_OPTIONS_OPTIONAL_GROUPS= ssl
+PKG_OPTIONS_GROUP.ssl= gnutls mbedtls openssl
+
+PKG_SUPPORTED_OPTIONS= ass aom bluray doc fdk-aac fontconfig freetype jack \
+ lame libvpx libwebp opencore-amr opus pulseaudio rav1e rpi rtmp \
+ speex tesseract theora vorbis x11 x264 x265 xvid
+PKG_SUGGESTED_OPTIONS= ass aom bluray freetype fontconfig gnutls lame \
+ libvpx libwebp opus speex theora vorbis x11 x264 x265 xvid
+
+PLIST_VARS+= doc
+
+# Add VDPAU if it is available
+.include "../../multimedia/libvdpau/available.mk"
+.if ${VDPAU_AVAILABLE} == "yes"
+PKG_SUPPORTED_OPTIONS+= vdpau
+PKG_SUGGESTED_OPTIONS+= vdpau
+.endif
+
+# Add VAAPI if it is available
+.include "../../multimedia/libva/available.mk"
+.if ${VAAPI_AVAILABLE} == "yes"
+PKG_SUPPORTED_OPTIONS+= vaapi
+PKG_SUGGESTED_OPTIONS+= vaapi
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+# Fontconfig
+.if !empty(PKG_OPTIONS:Mfontconfig)
+CONFIGURE_ARGS+= --enable-fontconfig
+.include "../../fonts/fontconfig/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-fontconfig
+.endif
+
+# freetype option
+.if !empty(PKG_OPTIONS:Mfreetype)
+CONFIGURE_ARGS+= --enable-libfreetype
+.include "../../graphics/freetype2/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libfreetype
+.endif
+
+# ass option
+.if !empty(PKG_OPTIONS:Mass)
+CONFIGURE_ARGS+= --enable-libass
+.include "../../multimedia/libass/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libass
+.endif
+
+# av1 option with libaom
+.if !empty(PKG_OPTIONS:Maom)
+CONFIGURE_ARGS+= --enable-libaom
+BUILDLINK_API_DEPENDS.libaom+= libaom>=1.0.0nb1
+.include "../../multimedia/libaom/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libaom
+.endif
+
+# av1 option with rav1e
+.if !empty(PKG_OPTIONS:Mrav1e)
+CONFIGURE_ARGS+= --enable-librav1e
+.include "../../multimedia/rav1e/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-librav1e
+.endif
+
+.if !empty(PKG_OPTIONS:Maom) || !empty(PKG_OPTIONS:Mrav1e)
+CONFIGURE_ARGS+= --enable-libdav1d
+.include "../../multimedia/dav1d/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libdav1d
+.endif
+
+# doc option
+.if !empty(PKG_OPTIONS:Mdoc)
+PLIST.doc= yes
+USE_TOOLS+= texi2html
+CONFIGURE_ARGS+= --enable-htmlpages
+.else
+CONFIGURE_ARGS+= --disable-htmlpages
+.endif
+
+# Fraunhofer FDK AAC codec support
+.if !empty(PKG_OPTIONS:Mfdk-aac)
+RESTRICTED= ffmpeg built with fdk-aac combines GPL and GPL-incompatible code
+NO_BIN_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_FTP= ${RESTRICTED}
+CONFIGURE_ARGS+= --enable-libfdk_aac
+CONFIGURE_ARGS+= --enable-nonfree
+.include "../../audio/fdk-aac/buildlink3.mk"
+.endif
+
+# GnuTLS support
+.if !empty(PKG_OPTIONS:Mgnutls)
+CONFIGURE_ARGS+= --enable-gnutls
+.include "../../security/gnutls/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-gnutls
+.endif
+
+# mbedTLS support
+.if !empty(PKG_OPTIONS:Mmbedtls)
+CONFIGURE_ARGS+= --enable-mbedtls
+# Apache License 2.0 is incompatible with (L)GPL versions before 3
+CONFIGURE_ARGS+= --enable-version3
+ADDITIONAL_LICENSE+= AND gnu-lgpl-v3
+.include "../../security/mbedtls/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-mbedtls
+.endif
+
+# opencore-amr option
+.if !empty(PKG_OPTIONS:Mopencore-amr)
+CONFIGURE_ARGS+= --enable-libopencore-amrnb
+CONFIGURE_ARGS+= --enable-libopencore-amrwb
+# Apache License 2.0 is incompatible with (L)GPL versions before 3
+CONFIGURE_ARGS+= --enable-version3
+ADDITIONAL_LICENSE+= AND gnu-lgpl-v3
+.include "../../audio/opencore-amr/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libopencore-amrnb
+CONFIGURE_ARGS+= --disable-libopencore-amrwb
+.endif
+
+# OpenSSL support
+.if !empty(PKG_OPTIONS:Mopenssl)
+CONFIGURE_ARGS+= --enable-nonfree
+CONFIGURE_ARGS+= --enable-openssl
+.include "../../security/openssl/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-openssl
+.endif
+
+# jack option
+.if !empty(PKG_OPTIONS:Mjack)
+CONFIGURE_ARGS+= --enable-libjack
+.include "../../audio/jack/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libjack
+.endif
+
+# pulseaudio option
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+CONFIGURE_ARGS+= --enable-libpulse
+.include "../../audio/pulseaudio/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libpulse
+.endif
+
+# RTMP support via librtmp
+.if !empty(PKG_OPTIONS:Mrtmp)
+CONFIGURE_ARGS+= --enable-librtmp
+.include "../../net/rtmpdump/buildlink3.mk"
+.endif
+
+# OCR filter using Tesseract
+.if !empty(PKG_OPTIONS:Mtesseract)
+CONFIGURE_ARGS+= --enable-libtesseract
+.include "../../graphics/tesseract/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libtesseract
+.endif
+
+# OGG Theora support
+.if !empty(PKG_OPTIONS:Mtheora)
+CONFIGURE_ARGS+= --enable-libtheora
+.include "../../multimedia/libtheora/buildlink3.mk"
+.endif
+
+# OGG Vorbis support
+.if !empty(PKG_OPTIONS:Mvorbis)
+CONFIGURE_ARGS+= --enable-libvorbis
+.include "../../audio/libvorbis/buildlink3.mk"
+.endif
+
+# LAME MP3 encoder
+.if !empty(PKG_OPTIONS:Mlame)
+# "lame-3.98" isn't compatible with "ffmpeg" which breaks audio encoding.
+BUILDLINK_API_DEPENDS.lame+= lame>=3.98.2nb1
+CONFIGURE_ARGS+= --enable-libmp3lame
+.include "../../audio/lame/buildlink3.mk"
+.endif
+
+# OPUS support
+.if !empty(PKG_OPTIONS:Mopus)
+CONFIGURE_ARGS+= --enable-libopus
+.include "../../audio/libopus/buildlink3.mk"
+.endif
+
+# Speex support
+.if !empty(PKG_OPTIONS:Mspeex)
+CONFIGURE_ARGS+= --enable-libspeex
+.include "../../audio/speex/buildlink3.mk"
+.endif
+
+# Raspberry Pi support
+.if !empty(PKG_OPTIONS:Mrpi)
+CONFIGURE_ARGS+= --enable-omx-rpi
+CONFIGURE_ARGS+= --enable-mmal
+SUBST_CLASSES+= vc
+SUBST_STAGE.vc= pre-configure
+SUBST_MESSAGE.vc= Fixing path to VideoCore libraries.
+SUBST_FILES.vc= configure
+SUBST_SED.vc+= -e 's;-isystem/opt/vc;-I${PREFIX};g'
+SUBST_SED.vc+= -e 's;/opt/vc;${PREFIX};g'
+.include "../../misc/raspberrypi-userland/buildlink3.mk"
+.endif
+
+# XviD support
+.if !empty(PKG_OPTIONS:Mxvid)
+CONFIGURE_ARGS+= --enable-libxvid
+.include "../../multimedia/xvidcore/buildlink3.mk"
+.endif
+
+# x264 support
+.if !empty(PKG_OPTIONS:Mx264)
+BUILDLINK_API_DEPENDS.x264+= x264>=20220601
+CONFIGURE_ARGS+= --enable-libx264
+.include "../../multimedia/x264/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libx264
+.endif
+
+# x265 support
+.if !empty(PKG_OPTIONS:Mx265)
+CONFIGURE_ARGS+= --enable-libx265
+.include "../../multimedia/x265/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libx265
+.endif
+
+# VDPAU support
+.if !empty(PKG_OPTIONS:Mvdpau) && !empty(PKG_OPTIONS:Mx11)
+CONFIGURE_ARGS+= --enable-vdpau
+.include "../../multimedia/libvdpau/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-vdpau
+.endif
+
+# VAAPI support
+.if !empty(PKG_OPTIONS:Mvaapi) && !empty(PKG_OPTIONS:Mx11)
+CONFIGURE_ARGS+= --enable-vaapi
+.include "../../multimedia/libva/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-vaapi
+.endif
+
+# VPX support
+.if !empty(PKG_OPTIONS:Mlibvpx)
+CONFIGURE_ARGS+= --enable-libvpx
+.include "../../multimedia/libvpx/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libvpx
+.endif
+
+# WEBP support
+.if !empty(PKG_OPTIONS:Mlibwebp)
+CONFIGURE_ARGS+= --enable-libwebp
+.include "../../graphics/libwebp/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libwebp
+.endif
+
+# X11 screen capture support using libxcb
+.if !empty(PKG_OPTIONS:Mx11)
+CONFIGURE_ARGS+= --enable-libxcb
+CONFIGURE_ARGS+= --enable-libxcb-shape
+CONFIGURE_ARGS+= --enable-libxcb-shm
+CONFIGURE_ARGS+= --enable-libxcb-xfixes
+.include "../../x11/libxcb/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libxcb
+.endif
+
+# Bluray support
+.if !empty(PKG_OPTIONS:Mbluray)
+CONFIGURE_ARGS+= --enable-libbluray
+.include "../../multimedia/libbluray/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libbluray
+.endif
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-Makefile
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-Makefile:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-Makefile Fri Jun 2 16:44:06 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Do "install -c".
+
+--- Makefile.orig 2018-04-20 10:02:55.000000000 +0000
++++ Makefile
+@@ -125,7 +125,7 @@ install-libs: install-libs-yes
+
+ install-data: $(DATA_FILES)
+ $(Q)mkdir -p "$(DATADIR)"
+- $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
++ $(INSTALL) -c -m 644 $(DATA_FILES) "$(DATADIR)"
+
+ uninstall: uninstall-data uninstall-headers uninstall-libs uninstall-pkgconfig
+
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-configure
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-configure:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-configure Fri Jun 2 16:44:06 2023
@@ -0,0 +1,89 @@
+$NetBSD: patch-configure,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Sun audio support.
+
+Enable PIC and section_data_rel_ro on NetBSD, even on i386,
+to avoid text relocations.
+
+Fix install_name_dir on Darwin.
+
+Do not use 'rsync'.
+
+--- configure.orig 2022-04-04 14:40:22.000000000 +0000
++++ configure
+@@ -2196,6 +2196,7 @@ HEADERS_LIST="
+ sys_resource_h
+ sys_select_h
+ sys_soundcard_h
++ sys_audioio_h
+ sys_time_h
+ sys_un_h
+ sys_videoio_h
+@@ -2337,7 +2338,6 @@ TOOLCHAIN_FEATURES="
+ inline_asm_labels
+ inline_asm_nonlocal_labels
+ pragma_deprecated
+- rsync_contimeout
+ symver_asm_label
+ symver_gnu_asm
+ vfp_args
+@@ -3521,6 +3521,8 @@ opengl_outdev_deps="opengl"
+ opengl_outdev_suggest="sdl2"
+ oss_indev_deps_any="sys_soundcard_h"
+ oss_outdev_deps_any="sys_soundcard_h"
++sunau_indev_deps_any="sys_audioio_h"
++sunau_outdev_deps_any="sys_audioio_h"
+ pulse_indev_deps="libpulse"
+ pulse_outdev_deps="libpulse"
+ sdl2_outdev_deps="sdl2"
+@@ -5491,6 +5493,8 @@ case $target_os in
+ ;;
+ netbsd)
+ disable symver
++ enable section_data_rel_ro
++ enable pic
+ oss_indev_extralibs="-lossaudio"
+ oss_outdev_extralibs="-lossaudio"
+ enabled gcc || check_ldflags -Wl,-zmuldefs
+@@ -5516,7 +5520,7 @@ case $target_os in
+ ;;
+ darwin)
+ enabled ppc && add_asflags -force_cpusubtype_ALL
+- install_name_dir_default='$(SHLIBDIR)'
++ install_name_dir_default=$shlibdir
+ SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(INSTALL_NAME_DIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
+ enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
+ strip="${strip} -x"
+@@ -5889,10 +5893,13 @@ done
+ check_cc pragma_deprecated "" '_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")'
+
+ # The global variable ensures the bits appear unchanged in the object file.
+-test_cc <<EOF || die "endian test failed"
+-unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
++test_exec <<EOF || enable bigendian
++int main()
++{
++ long one = 1;
++ return !(*((char *)(&one)));
++}
+ EOF
+-od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
+
+ check_cc const_nan math.h "struct { double d; } static const bar[] = { { NAN } }"
+
+@@ -6305,6 +6312,7 @@ check_headers malloc.h
+ check_headers mftransform.h
+ check_headers net/udplite.h
+ check_headers poll.h
++check_headers sys/audioio.h
+ check_headers sys/param.h
+ check_headers sys/resource.h
+ check_headers sys/select.h
+@@ -6783,7 +6791,6 @@ enabled makeinfo \
+ disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
+ perl -v > /dev/null 2>&1 && enable perl || disable perl
+ pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
+-rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
+ xmllint --version > /dev/null 2>&1 && enable xmllint || disable xmllint
+
+ # check V4L2 codecs available in the API
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-doc_Makefile
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-doc_Makefile:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-doc_Makefile Fri Jun 2 16:44:06 2023
@@ -0,0 +1,31 @@
+$NetBSD: patch-doc_Makefile,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Make man pages and html docs versioned.
+
+--- doc/Makefile.orig 2016-02-15 02:29:37.000000000 +0000
++++ doc/Makefile
+@@ -14,8 +14,8 @@ COMPONENTS-$(CONFIG_AVFORMAT) += ffmpe
+ COMPONENTS-$(CONFIG_AVDEVICE) += ffmpeg-devices
+ COMPONENTS-$(CONFIG_AVFILTER) += ffmpeg-filters
+
+-MANPAGES1 = $(AVPROGS-yes:%=doc/%.1) $(AVPROGS-yes:%=doc/%-all.1) $(COMPONENTS-yes:%=doc/%.1)
+-MANPAGES3 = $(LIBRARIES-yes:%=doc/%.3)
++MANPAGES1 = $(AVPROGS-yes:%=doc/%6.1) $(AVPROGS-yes:%=doc/%-all6.1) $(COMPONENTS-yes:%=doc/%6.1)
++MANPAGES3 = $(LIBRARIES-yes:%=doc/%6.3)
+ MANPAGES = $(MANPAGES1) $(MANPAGES3)
+ PODPAGES = $(AVPROGS-yes:%=doc/%.pod) $(AVPROGS-yes:%=doc/%-all.pod) $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod)
+ HTMLPAGES = $(AVPROGS-yes:%=doc/%.html) $(AVPROGS-yes:%=doc/%-all.html) $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \
+@@ -114,10 +114,10 @@ doc/%-all.pod: doc/%.texi $(SRC_PATH)/do
+ $(Q)$(TEXIDEP)
+ $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@
+
+-doc/%.1 doc/%.3: TAG = MAN
+-doc/%.1: doc/%.pod $(GENTEXI)
++doc/%6.1 doc/%6.3: TAG = MAN
++doc/%6.1: doc/%.pod $(GENTEXI)
+ $(M)pod2man --section=1 --center=" " --release=" " --date=" " $< > $@
+-doc/%.3: doc/%.pod $(GENTEXI)
++doc/%6.3: doc/%.pod $(GENTEXI)
+ $(M)pod2man --section=3 --center=" " --release=" " --date=" " $< > $@
+
+ $(DOCS) doc/doxy/html: | doc/
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-doc_general__contents.texi
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-doc_general__contents.texi:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-doc_general__contents.texi Fri Jun 2 16:44:06 2023
@@ -0,0 +1,14 @@
+$NetBSD: patch-doc_general__contents.texi,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Add Sun Audio.
+
+--- doc/general_contents.texi.orig 2021-04-10 06:55:24.000000000 +0000
++++ doc/general_contents.texi
+@@ -1419,6 +1419,7 @@ performance on systems without hardware
+ @item OSS @tab X @tab X
+ @item PulseAudio @tab X @tab X
+ @item SDL @tab @tab X
++@item Sun Audio @tab @tab X
+ @item Video4Linux2 @tab X @tab X
+ @item VfW capture @tab X @tab
+ @item X11 grabbing @tab X @tab
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-doc_indevs.texi
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-doc_indevs.texi:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-doc_indevs.texi Fri Jun 2 16:44:06 2023
@@ -0,0 +1,42 @@
+$NetBSD: patch-doc_indevs.texi,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+* Add sunau documentation.
+
+--- doc/indevs.texi.orig 2019-12-31 21:35:22.000000000 +0000
++++ doc/indevs.texi
+@@ -1282,6 +1282,35 @@ Set the number of channels. Default is 2
+
+ @end table
+
++@section sunau
++
++Solaris/NetBSD audio input device.
++
++The filename to provide to the input device is the device node
++representing the Sun input device, and is usually set to
++@file{/dev/audio0}.
++
++For example to grab from @file{/dev/audio0} using @command{ffmpeg} use the
++command:
++@example
++ffmpeg -f sunau -i /dev/audio0 /tmp/oss.wav
++@end example
++
++@subsection Options
++
++@table @option
++
++@item buffer_samples
++Set the size of the audio buffer in samples. Default is 32.
++
++@item sample_rate
++Set the sample rate in Hz. Default is 48000.
++
++@item channels
++Set the number of channels. Default is 2.
++
++@end table
++
+ @section video4linux2, v4l2
+
+ Video4Linux2 input video device.
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-doc_outdevs.texi
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-doc_outdevs.texi:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-doc_outdevs.texi Fri Jun 2 16:44:06 2023
@@ -0,0 +1,24 @@
+$NetBSD: patch-doc_outdevs.texi,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+* Add sunau documentation.
+
+--- doc/outdevs.texi.orig 2019-12-31 21:35:22.000000000 +0000
++++ doc/outdevs.texi
+@@ -393,6 +393,17 @@ ffmpeg -i INPUT -c:v rawvideo -pix_fmt y
+
+ sndio audio output device.
+
++@section sunau
++
++Solaris/NetBSD audio output device.
++
++@subsection Options
++@table @option
++
++@item buffer_samples
++Set the size of the audio buffer in samples. Default is 32.
++@end table
++
+ @section v4l2
+
+ Video4Linux2 output device.
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_Makefile
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_Makefile:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_Makefile Fri Jun 2 16:44:06 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-libavdevice_Makefile,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Sun audio support.
+
+--- libavdevice/Makefile.orig 2019-12-31 21:35:24.000000000 +0000
++++ libavdevice/Makefile
+@@ -43,6 +43,8 @@ OBJS-$(CONFIG_PULSE_OUTDEV)
+ OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o
+ OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o
+ OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o
++OBJS-$(CONFIG_SUNAU_INDEV) += sunau_dec.o sunau.o
++OBJS-$(CONFIG_SUNAU_OUTDEV) += sunau_enc.o sunau.o
+ OBJS-$(CONFIG_V4L2_INDEV) += v4l2.o v4l2-common.o timefilter.o
+ OBJS-$(CONFIG_V4L2_OUTDEV) += v4l2enc.o v4l2-common.o
+ OBJS-$(CONFIG_VFWCAP_INDEV) += vfwcap.o
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_alldevices.c
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_alldevices.c:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_alldevices.c Fri Jun 2 16:44:06 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-libavdevice_alldevices.c,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Sun audio support.
+
+--- libavdevice/alldevices.c.orig 2023-02-27 20:43:45.000000000 +0000
++++ libavdevice/alldevices.c
+@@ -48,6 +48,8 @@ extern const AVInputFormat ff_pulse_dem
+ extern const FFOutputFormat ff_pulse_muxer;
+ extern const FFOutputFormat ff_sdl2_muxer;
+ extern const AVInputFormat ff_sndio_demuxer;
++extern const AVInputFormat ff_sunau_demuxer;
++extern const AVOutputFormat ff_sunau_muxer;
+ extern const FFOutputFormat ff_sndio_muxer;
+ extern const AVInputFormat ff_v4l2_demuxer;
+ extern const FFOutputFormat ff_v4l2_muxer;
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau.c
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau.c:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau.c Fri Jun 2 16:44:06 2023
@@ -0,0 +1,110 @@
+$NetBSD: patch-libavdevice_sunau.c,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Sun audio support.
+
+--- libavdevice/sunau.c.orig 2023-06-02 16:15:11.549198344 +0000
++++ libavdevice/sunau.c
+@@ -0,0 +1,103 @@
++/*
++ * Solaris/NetBSD play and grab interface
++ * Copyright (c) 2020 Yorick Hardy
++ * Copyright (c) 2020 Nia Alarie <nia%NetBSD.org@localhost>
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include "config.h"
++
++#include <string.h>
++
++#include <unistd.h>
++#include <fcntl.h>
++#include <sys/audioio.h>
++#include <sys/ioctl.h>
++
++#include "libavutil/file_open.h"
++#include "libavutil/log.h"
++
++#include "libavcodec/avcodec.h"
++#include "avdevice.h"
++
++#include "sunau.h"
++
++int ff_sunau_audio_open(AVFormatContext *s1, int is_output,
++ const char *audio_device)
++{
++ SunAudioData *s = s1->priv_data;
++ struct audio_info info;
++ struct audio_prinfo *prinfo;
++ int audio_fd, err;
++
++ audio_fd = avpriv_open(audio_device, is_output ? O_WRONLY : O_RDONLY);
++ if (audio_fd < 0) {
++ av_log(s1, AV_LOG_ERROR, "%s: %s\n", audio_device, av_err2str(AVERROR(errno)));
++ return AVERROR(EIO);
++ }
++
++ AUDIO_INITINFO(&info);
++
++#ifdef AUMODE_PLAY /* BSD extension */
++ info.mode = is_output ? AUMODE_PLAY : AUMODE_RECORD;
++#endif
++
++ prinfo = is_output ? &info.play : &info.record;
++
++ prinfo->encoding = AUDIO_ENCODING_LINEAR;
++ prinfo->precision = 16;
++ prinfo->sample_rate = s->sample_rate;
++ prinfo->channels = s->channels;
++
++ if ((err = ioctl(audio_fd, AUDIO_SETINFO, &info)) < 0) {
++ av_log(s1, AV_LOG_ERROR, "AUDIO_SETINFO: %s\n", av_err2str(AVERROR(errno)));
++ goto fail;
++ }
++
++ if ((err = ioctl(audio_fd, AUDIO_GETINFO, &info)) < 0) {
++ av_log(s1, AV_LOG_ERROR, "AUDIO_GETINFO: %s\n", av_err2str(AVERROR(errno)));
++ goto fail;
++ }
++
++ s->fd = audio_fd;
++#if HAVE_BIGENDIAN
++ s->codec_id = AV_CODEC_ID_PCM_S16BE;
++#else
++ s->codec_id = AV_CODEC_ID_PCM_S16LE;
++#endif
++ s->precision = prinfo->precision;
++ s->sample_rate = prinfo->sample_rate;
++ s->channels = prinfo->channels;
++ s->blocksize = s->buffer_samples * prinfo->precision * prinfo->channels;
++
++ if ((s->buffer = malloc(s->blocksize)) == NULL) {
++ av_log(s1, AV_LOG_ERROR, "malloc: %s\n", av_err2str(AVERROR(errno)));
++ goto fail;
++ }
++
++ return 0;
++ fail:
++ close(audio_fd);
++ return AVERROR(EIO);
++}
++
++int ff_sunau_audio_close(SunAudioData *s)
++{
++ close(s->fd);
++ return 0;
++}
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau.h
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau.h:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau.h Fri Jun 2 16:44:06 2023
@@ -0,0 +1,55 @@
+$NetBSD: patch-libavdevice_sunau.h,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Sun audio support.
+
+--- libavdevice/sunau.h.orig 2020-03-20 20:53:01.579839153 +0000
++++ libavdevice/sunau.h
+@@ -0,0 +1,48 @@
++/*
++ * Solaris/NetBSD play and grab interface
++ * Copyright (c) 2020 Yorick Hardy
++ * Copyright (c) 2020 Nia Alarie <nia%NetBSD.org@localhost>
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#ifndef AVDEVICE_SUNAU_H
++#define AVDEVICE_SUNAU_H
++
++#include "libavcodec/avcodec.h"
++
++#include "libavformat/avformat.h"
++
++typedef struct SunAudioData {
++ AVClass *class;
++ int fd;
++ int buffer_samples;
++ unsigned int sample_rate;
++ unsigned int channels;
++ unsigned int precision;
++ size_t blocksize;
++ enum AVCodecID codec_id;
++ uint8_t *buffer;
++ size_t buffer_ptr;
++} SunAudioData;
++
++int ff_sunau_audio_open(AVFormatContext *s1, int is_output,
++ const char *audio_device);
++
++int ff_sunau_audio_close(SunAudioData *s);
++
++#endif /* AVDEVICE_SUNAU_H */
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau__dec.c
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau__dec.c:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau__dec.c Fri Jun 2 16:44:06 2023
@@ -0,0 +1,145 @@
+$NetBSD: patch-libavdevice_sunau__dec.c,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Sun audio support.
+
+--- libavdevice/sunau_dec.c.orig 2020-03-20 20:53:01.607986932 +0000
++++ libavdevice/sunau_dec.c
+@@ -0,0 +1,138 @@
++/*
++ * Solaris/NetBSD play and grab interface
++ * Copyright (c) 2020 Yorick Hardy
++ * Copyright (c) 2020 Nia Alarie <nia%NetBSD.org@localhost>
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include "config.h"
++
++#include <stdint.h>
++
++#include <unistd.h>
++#include <fcntl.h>
++#include <poll.h>
++#include <sys/audioio.h>
++#include <sys/ioctl.h>
++
++#include "libavutil/internal.h"
++#include "libavutil/opt.h"
++#include "libavutil/time.h"
++
++#include "libavcodec/avcodec.h"
++
++#include "avdevice.h"
++#include "libavformat/internal.h"
++
++#include "sunau.h"
++
++static int audio_read_header(AVFormatContext *s1)
++{
++ SunAudioData *s = s1->priv_data;
++ AVStream *st;
++
++ st = avformat_new_stream(s1, NULL);
++ if (!st) {
++ return AVERROR(ENOMEM);
++ }
++
++ if (ff_sunau_audio_open(s1, 0, s1->url) < 0) {
++ return AVERROR(EIO);
++ }
++
++ /* take real parameters */
++ st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
++ st->codecpar->codec_id = s->codec_id;
++ st->codecpar->sample_rate = s->sample_rate;
++ st->codecpar->channels = s->channels;
++
++ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
++
++ return 0;
++}
++
++static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
++{
++ SunAudioData *s = s1->priv_data;
++ struct audio_info info;
++ int ret;
++ long bdelay;
++ int64_t cur_time;
++
++ if ((ret = av_new_packet(pkt, s->blocksize)) < 0)
++ return ret;
++
++ ret = read(s->fd, pkt->data, pkt->size);
++ if (ret <= 0) {
++ av_packet_unref(pkt);
++ pkt->size = 0;
++ return ret < 0 ? AVERROR(errno) : AVERROR_EOF;
++ }
++
++ /* compute pts of the start of the packet */
++ cur_time = av_gettime();
++ bdelay = ret;
++
++#ifdef AUDIO_GETBUFINFO /* BSD extension */
++ if (ioctl(s->fd, AUDIO_GETBUFINFO, &info) == 0) {
++ bdelay += info.record.seek;
++ }
++#endif
++
++ /* subtract time represented by the number of bytes in the audio fifo */
++ cur_time -= (bdelay * 1000000LL) / (s->sample_rate * s->channels * s->precision);
++
++ /* convert to wanted units */
++ pkt->pts = cur_time;
++
++ return 0;
++}
++
++static int audio_read_close(AVFormatContext *s1)
++{
++ SunAudioData *s = s1->priv_data;
++
++ ff_sunau_audio_close(s);
++ return 0;
++}
++
++static const AVOption options[] = {
++ { "buffer_samples", "", offsetof(SunAudioData, buffer_samples), AV_OPT_TYPE_INT, {.i64 = 32}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
++ { "sample_rate", "", offsetof(SunAudioData, sample_rate), AV_OPT_TYPE_INT, {.i64 = 48000}, 1000, 192000, AV_OPT_FLAG_DECODING_PARAM },
++ { "channels", "", offsetof(SunAudioData, channels), AV_OPT_TYPE_INT, {.i64 = 2}, 1, 12, AV_OPT_FLAG_DECODING_PARAM },
++ { NULL },
++};
++
++static const AVClass sunau_demuxer_class = {
++ .class_name = "Sun/NetBSD audio demuxer",
++ .item_name = av_default_item_name,
++ .option = options,
++ .version = LIBAVUTIL_VERSION_INT,
++ .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
++};
++
++AVInputFormat ff_sunau_demuxer = {
++ .name = "sunau",
++ .long_name = NULL_IF_CONFIG_SMALL("Sun/NetBSD audio capture"),
++ .priv_data_size = sizeof(SunAudioData),
++ .read_header = audio_read_header,
++ .read_packet = audio_read_packet,
++ .read_close = audio_read_close,
++ .flags = AVFMT_NOFILE,
++ .priv_class = &sunau_demuxer_class,
++};
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau__enc.c
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau__enc.c:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavdevice_sunau__enc.c Fri Jun 2 16:44:06 2023
@@ -0,0 +1,121 @@
+$NetBSD: patch-libavdevice_sunau__enc.c,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Sun audio support.
+
+--- libavdevice/sunau_enc.c.orig 2020-03-20 20:53:01.636938971 +0000
++++ libavdevice/sunau_enc.c
+@@ -0,0 +1,114 @@
++/*
++ * Solaris/NetBSD play and grab interface
++ * Copyright (c) 2020 Yorick Hardy
++ * Copyright (c) 2020 Nia Alarie <nia%NetBSD.org@localhost>
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include "config.h"
++
++#include <unistd.h>
++#include <fcntl.h>
++#include <sys/audioio.h>
++#include <sys/ioctl.h>
++
++#include "libavutil/internal.h"
++
++#include "libavcodec/avcodec.h"
++
++#include "avdevice.h"
++#include "libavformat/internal.h"
++
++#include "sunau.h"
++
++static int audio_write_header(AVFormatContext *s1)
++{
++ SunAudioData *s = s1->priv_data;
++ AVStream *st;
++
++ st = s1->streams[0];
++ s->sample_rate = st->codecpar->sample_rate;
++ s->channels = st->codecpar->channels;
++ s->codec_id = st->codecpar->codec_id;
++ return ff_sunau_audio_open(s1, 1, s1->url) < 0 ? AVERROR(EIO) : 0;
++}
++
++static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
++{
++ SunAudioData *s = s1->priv_data;
++ unsigned int len, size = pkt->size;
++ uint8_t *buf = pkt->data;
++ int ret;
++
++ while (size > 0) {
++ len = FFMIN(s->blocksize - s->buffer_ptr, size);
++ memcpy(s->buffer + s->buffer_ptr, buf, len);
++ s->buffer_ptr += len;
++ if (s->buffer_ptr >= s->blocksize) {
++ for (;;) {
++ ret = write(s->fd, s->buffer, s->blocksize);
++ if (ret > 0)
++ break;
++ if (ret < 0 && (errno != EAGAIN && errno != EINTR))
++ return AVERROR(EIO);
++ }
++ s->buffer_ptr = 0;
++ }
++ buf += len;
++ size -= len;
++ }
++ return 0;
++}
++
++static int audio_write_trailer(AVFormatContext *s1)
++{
++ SunAudioData *s = s1->priv_data;
++
++ ff_sunau_audio_close(s);
++ return 0;
++}
++
++static const AVOption options[] = {
++ { "buffer_samples", "", offsetof(SunAudioData, buffer_samples), AV_OPT_TYPE_INT, {.i64 = 32}, 1, 192000, AV_OPT_FLAG_DECODING_PARAM },
++ { NULL },
++};
++
++static const AVClass sunau_muxer_class = {
++ .class_name = "Sun/NetBSD audio muxer",
++ .item_name = av_default_item_name,
++ .option = options,
++ .version = LIBAVUTIL_VERSION_INT,
++ .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
++};
++
++AVOutputFormat ff_sunau_muxer = {
++ .name = "sunau",
++ .long_name = NULL_IF_CONFIG_SMALL("Sun/NetBSD audio playback"),
++ .priv_data_size = sizeof(SunAudioData),
++ /* XXX: we may need to support higher precisions in the future, but
++ right now this is what the kernel can handle natively */
++ /* XXX: find better solution with "preinit" method, needed also in
++ other formats */
++ .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
++ .video_codec = AV_CODEC_ID_NONE,
++ .write_header = audio_write_header,
++ .write_packet = audio_write_packet,
++ .write_trailer = audio_write_trailer,
++ .flags = AVFMT_NOFILE,
++ .priv_class = &sunau_muxer_class,
++};
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_macros.h
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_macros.h:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_macros.h Fri Jun 2 16:44:06 2023
@@ -0,0 +1,29 @@
+$NetBSD: patch-libavutil_macros.h,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Add required int includes on various opensource platforms.
+
+--- libavutil/macros.h.orig 2022-01-14 18:45:40.000000000 +0000
++++ libavutil/macros.h
+@@ -27,6 +27,22 @@
+
+ #include "libavutil/avconfig.h"
+
++#if defined(__cplusplus)
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__)
++#undef _STDINT_H_
++#undef _SYS_STDINT_H_
++#undef _STDINT_H
++#undef _GCC_WRAP_STDINT_H
++#ifndef __STDC_CONSTANT_MACROS
++#define __STDC_CONSTANT_MACROS
++#endif
++#include <stdint.h>
++#endif /* FreeBSD | OpenBSD | linux */
++#if defined(__DragonFly__) || defined(__NetBSD__)
++#include <machine/int_const.h>
++#endif /* DragonFly | NetBSD */
++#endif /* __cplusplus */
++
+ #if AV_HAVE_BIGENDIAN
+ # define AV_NE(be, le) (be)
+ #else
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_x86_asm.h
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_x86_asm.h:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_x86_asm.h Fri Jun 2 16:44:06 2023
@@ -0,0 +1,18 @@
+$NetBSD: patch-libavutil_x86_asm.h,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Avoid SunOS regset.h definition for REG_SP
+
+--- libavutil/x86/asm.h.orig 2016-10-28 18:31:25.000000000 +0000
++++ libavutil/x86/asm.h
+@@ -27,6 +27,11 @@
+ typedef struct xmm_reg { uint64_t a, b; } xmm_reg;
+ typedef struct ymm_reg { uint64_t a, b, c, d; } ymm_reg;
+
++/* avoid SunOS regset.h definition for REG_SP */
++#if defined (__sun) && defined (REG_SP)
++#undef REG_SP
++#endif
++
+ #if ARCH_X86_64
+ # define FF_OPSIZE "q"
+ # define FF_REG_a "rax"
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_x86_cpu.c
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_x86_cpu.c:1.1
--- /dev/null Fri Jun 2 16:44:07 2023
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavutil_x86_cpu.c Fri Jun 2 16:44:06 2023
@@ -0,0 +1,22 @@
+$NetBSD: patch-libavutil_x86_cpu.c,v 1.1 2023/06/02 16:44:06 wiz Exp $
+
+Make a part of the code depend on GCC >= 4.2.
+
+--- libavutil/x86/cpu.c.orig 2016-01-15 16:58:37.000000000 +0000
++++ libavutil/x86/cpu.c
+@@ -116,6 +116,7 @@ int ff_get_cpu_flags_x86(void)
+ #if HAVE_SSE
+ if (std_caps & (1 << 25))
+ rval |= AV_CPU_FLAG_SSE;
++#if !defined(__GNUC__) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
+ if (std_caps & (1 << 26))
+ rval |= AV_CPU_FLAG_SSE2;
+ if (ecx & 1)
+@@ -138,6 +139,7 @@ int ff_get_cpu_flags_x86(void)
+ }
+ }
+ #endif /* HAVE_AVX */
++#endif /* gcc >= 4.2 */
+ #endif /* HAVE_SSE */
+ }
+ if (max_std_level >= 7) {
Home |
Main Index |
Thread Index |
Old Index