Sun Apr 7 17:50:24 2024 UTC (45d)
multimedia/ffmpeg7: import ffmpeg7-7.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 7.
(ryoon)
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/ALTERNATIVES
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/DESCR
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/Makefile
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/Makefile.common
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/PLIST
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/buildlink3.mk
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/distinfo
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/options.mk
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-Makefile
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-configure
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-doc_Makefile
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-doc_general__contents.texi
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-doc_indevs.texi
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-doc_outdevs.texi
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavdevice_Makefile
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavdevice_sunau.c
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavdevice_sunau.h
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavdevice_sunau__dec.c
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavdevice_sunau__enc.c
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavformat_avformat.h
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavformat_mux__utils.c
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavutil_macros.h
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavutil_ppc_cpu.c
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavutil_x86_asm.h
diff -r0 -r1.1 pkgsrc/multimedia/ffmpeg7/patches/patch-libavutil_x86_cpu.c
bin/ffmpeg @PREFIX@/bin/ffmpeg7
bin/ffprobe @PREFIX@/bin/ffprobe7
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 7.
# $NetBSD: Makefile,v 1.1 2024/04/07 17:50:23 ryoon Exp $
PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg7/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://ffmpeg.org/
COMMENT= Decoding, encoding and streaming software (v6.x)
CONFIGURE_ARGS+= --enable-avfilter
CONFIGURE_ARGS+= --enable-postproc
CONFIGURE_ARGS+= --disable-ffplay
INSTALLATION_DIRS= lib/ffmpeg7 share/doc/ffmpeg7
.include "../../mk/bsd.prefs.mk"
.if ${_USE_RPATH:tl} != "no"
CONFIGURE_ARGS+= --enable-rpath
.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/ffmpeg7
.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/ffmpeg7/Makefile.common"
.include "../../mk/bsd.pkg.mk"
# $NetBSD: Makefile.common,v 1.1 2024/04/07 17:50:23 ryoon Exp $
# used by multimedia/ffmpeg7/Makefile
# used by multimedia/ffplay7/Makefile
DISTNAME= ffmpeg-7.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/ffmpeg7/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=7
CONFIGURE_ARGS+= --enable-runtime-cpudetect
CONFIGURE_ARGS+= --datadir=${PREFIX}/share/ffmpeg7
CONFIGURE_ARGS+= --docdir=${PREFIX}/share/doc/ffmpeg7
CONFIGURE_ARGS+= --incdir=${PREFIX}/include/ffmpeg7
CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/ffmpeg7
CONFIGURE_ARGS+= --shlibdir=${PREFIX}/lib/ffmpeg7
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/ffmpeg7
# https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/140
LDFLAGS.Darwin+= -Wl,-ld_classic
.if ${USE_CROSS_COMPILE: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:Q}
. include "../../mk/endian.mk"
. if ${MACHINE_ENDIAN} == "big"
CONFIGURE_ENV+= bigendian=yes
. endif
.endif
# altivec support is detected at runtime, and only code that is gated
# on the runtime detection can use it. The code in ffmpeg that is
# gated on the runtime detection doesn't need -maltivec -mabi=altivec.
# But passing -maltivec -mabi=altivec tells the compiler that _any_
# code, whether or not gated on runtime detection, can be done with
# altivec -- and the compiler will quietly take advantage of this,
# e.g. to zero-initialize objects on the stack. This doesn't work too
# well on powerpc CPUs without altivec, so nix the arguments.
.if !empty(MACHINE_ARCH:Mpowerpc*)
BUILDLINK_TRANSFORM+= rm:-maltivec
BUILDLINK_TRANSFORM+= rm:-mabi=altivec
.endif
.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
TOOL_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"
@comment $NetBSD: PLIST,v 1.1 2024/04/07 17:50:23 ryoon Exp $
bin/ffmpeg7
bin/ffprobe7
include/ffmpeg7/libavcodec/ac3_parser.h
include/ffmpeg7/libavcodec/adts_parser.h
include/ffmpeg7/libavcodec/avcodec.h
include/ffmpeg7/libavcodec/avdct.h
include/ffmpeg7/libavcodec/avfft.h
include/ffmpeg7/libavcodec/bsf.h
include/ffmpeg7/libavcodec/codec.h
include/ffmpeg7/libavcodec/codec_desc.h
include/ffmpeg7/libavcodec/codec_id.h
include/ffmpeg7/libavcodec/codec_par.h
include/ffmpeg7/libavcodec/d3d11va.h
include/ffmpeg7/libavcodec/defs.h
include/ffmpeg7/libavcodec/dirac.h
include/ffmpeg7/libavcodec/dv_profile.h
include/ffmpeg7/libavcodec/dxva2.h
include/ffmpeg7/libavcodec/jni.h
include/ffmpeg7/libavcodec/mediacodec.h
include/ffmpeg7/libavcodec/packet.h
include/ffmpeg7/libavcodec/qsv.h
include/ffmpeg7/libavcodec/vdpau.h
include/ffmpeg7/libavcodec/version.h
include/ffmpeg7/libavcodec/version_major.h
include/ffmpeg7/libavcodec/videotoolbox.h
include/ffmpeg7/libavcodec/vorbis_parser.h
include/ffmpeg7/libavdevice/avdevice.h
include/ffmpeg7/libavdevice/version.h
include/ffmpeg7/libavdevice/version_major.h
include/ffmpeg7/libavfilter/avfilter.h
include/ffmpeg7/libavfilter/buffersink.h
include/ffmpeg7/libavfilter/buffersrc.h
include/ffmpeg7/libavfilter/version.h
include/ffmpeg7/libavfilter/version_major.h
include/ffmpeg7/libavformat/avformat.h
include/ffmpeg7/libavformat/avio.h
include/ffmpeg7/libavformat/version.h
include/ffmpeg7/libavformat/version_major.h
include/ffmpeg7/libavutil/adler32.h
include/ffmpeg7/libavutil/aes.h
include/ffmpeg7/libavutil/aes_ctr.h
include/ffmpeg7/libavutil/ambient_viewing_environment.h
include/ffmpeg7/libavutil/attributes.h
include/ffmpeg7/libavutil/audio_fifo.h
include/ffmpeg7/libavutil/avassert.h
include/ffmpeg7/libavutil/avconfig.h
include/ffmpeg7/libavutil/avstring.h
include/ffmpeg7/libavutil/avutil.h
include/ffmpeg7/libavutil/base64.h
include/ffmpeg7/libavutil/blowfish.h
include/ffmpeg7/libavutil/bprint.h
include/ffmpeg7/libavutil/bswap.h
include/ffmpeg7/libavutil/buffer.h
include/ffmpeg7/libavutil/camellia.h
include/ffmpeg7/libavutil/cast5.h
include/ffmpeg7/libavutil/channel_layout.h
include/ffmpeg7/libavutil/common.h
include/ffmpeg7/libavutil/cpu.h
include/ffmpeg7/libavutil/crc.h
include/ffmpeg7/libavutil/csp.h
include/ffmpeg7/libavutil/des.h
include/ffmpeg7/libavutil/detection_bbox.h
include/ffmpeg7/libavutil/dict.h
include/ffmpeg7/libavutil/display.h
include/ffmpeg7/libavutil/dovi_meta.h
include/ffmpeg7/libavutil/downmix_info.h
include/ffmpeg7/libavutil/encryption_info.h
include/ffmpeg7/libavutil/error.h
include/ffmpeg7/libavutil/eval.h
include/ffmpeg7/libavutil/executor.h
include/ffmpeg7/libavutil/ffversion.h
include/ffmpeg7/libavutil/fifo.h
include/ffmpeg7/libavutil/file.h
include/ffmpeg7/libavutil/film_grain_params.h
include/ffmpeg7/libavutil/frame.h
include/ffmpeg7/libavutil/hash.h
include/ffmpeg7/libavutil/hdr_dynamic_metadata.h
include/ffmpeg7/libavutil/hdr_dynamic_vivid_metadata.h
include/ffmpeg7/libavutil/hmac.h
include/ffmpeg7/libavutil/hwcontext.h
include/ffmpeg7/libavutil/hwcontext_cuda.h
include/ffmpeg7/libavutil/hwcontext_d3d11va.h
include/ffmpeg7/libavutil/hwcontext_d3d12va.h
include/ffmpeg7/libavutil/hwcontext_drm.h
include/ffmpeg7/libavutil/hwcontext_dxva2.h
include/ffmpeg7/libavutil/hwcontext_mediacodec.h
include/ffmpeg7/libavutil/hwcontext_opencl.h
include/ffmpeg7/libavutil/hwcontext_qsv.h
include/ffmpeg7/libavutil/hwcontext_vaapi.h
include/ffmpeg7/libavutil/hwcontext_vdpau.h
include/ffmpeg7/libavutil/hwcontext_videotoolbox.h
include/ffmpeg7/libavutil/hwcontext_vulkan.h
include/ffmpeg7/libavutil/iamf.h
include/ffmpeg7/libavutil/imgutils.h
include/ffmpeg7/libavutil/intfloat.h
include/ffmpeg7/libavutil/intreadwrite.h
include/ffmpeg7/libavutil/lfg.h
include/ffmpeg7/libavutil/log.h
include/ffmpeg7/libavutil/lzo.h
include/ffmpeg7/libavutil/macros.h
include/ffmpeg7/libavutil/mastering_display_metadata.h
include/ffmpeg7/libavutil/mathematics.h
include/ffmpeg7/libavutil/md5.h
include/ffmpeg7/libavutil/mem.h
include/ffmpeg7/libavutil/motion_vector.h
include/ffmpeg7/libavutil/murmur3.h
include/ffmpeg7/libavutil/opt.h
include/ffmpeg7/libavutil/parseutils.h
include/ffmpeg7/libavutil/pixdesc.h
include/ffmpeg7/libavutil/pixelutils.h
include/ffmpeg7/libavutil/pixfmt.h
include/ffmpeg7/libavutil/random_seed.h
include/ffmpeg7/libavutil/rational.h
include/ffmpeg7/libavutil/rc4.h
include/ffmpeg7/libavutil/replaygain.h
include/ffmpeg7/libavutil/ripemd.h
include/ffmpeg7/libavutil/samplefmt.h
include/ffmpeg7/libavutil/sha.h
include/ffmpeg7/libavutil/sha512.h
include/ffmpeg7/libavutil/spherical.h
include/ffmpeg7/libavutil/stereo3d.h
include/ffmpeg7/libavutil/tea.h
include/ffmpeg7/libavutil/threadmessage.h
include/ffmpeg7/libavutil/time.h
include/ffmpeg7/libavutil/timecode.h
include/ffmpeg7/libavutil/timestamp.h
include/ffmpeg7/libavutil/tree.h
include/ffmpeg7/libavutil/twofish.h
include/ffmpeg7/libavutil/tx.h
include/ffmpeg7/libavutil/uuid.h
include/ffmpeg7/libavutil/version.h
include/ffmpeg7/libavutil/video_enc_params.h
include/ffmpeg7/libavutil/video_hint.h
include/ffmpeg7/libavutil/xtea.h
include/ffmpeg7/libpostproc/postprocess.h
include/ffmpeg7/libpostproc/version.h
include/ffmpeg7/libpostproc/version_major.h
include/ffmpeg7/libswresample/swresample.h
include/ffmpeg7/libswresample/version.h
include/ffmpeg7/libswresample/version_major.h
include/ffmpeg7/libswscale/swscale.h
include/ffmpeg7/libswscale/version.h
include/ffmpeg7/libswscale/version_major.h
lib/ffmpeg7/libavcodec.a
lib/ffmpeg7/libavcodec.so
lib/ffmpeg7/libavcodec.so.61
lib/ffmpeg7/libavcodec.so.61.3.100
lib/ffmpeg7/libavdevice.a
lib/ffmpeg7/libavdevice.so
lib/ffmpeg7/libavdevice.so.61
lib/ffmpeg7/libavdevice.so.61.1.100
lib/ffmpeg7/libavfilter.a
lib/ffmpeg7/libavfilter.so
lib/ffmpeg7/libavfilter.so.10
lib/ffmpeg7/libavfilter.so.10.1.100
lib/ffmpeg7/libavformat.a
lib/ffmpeg7/libavformat.so
lib/ffmpeg7/libavformat.so.61
lib/ffmpeg7/libavformat.so.61.1.100
lib/ffmpeg7/libavutil.a
lib/ffmpeg7/libavutil.so
lib/ffmpeg7/libavutil.so.59
lib/ffmpeg7/libavutil.so.59.8.100
lib/ffmpeg7/libpostproc.a
lib/ffmpeg7/libpostproc.so
lib/ffmpeg7/libpostproc.so.58
lib/ffmpeg7/libpostproc.so.58.1.100
lib/ffmpeg7/libswresample.a
lib/ffmpeg7/libswresample.so
lib/ffmpeg7/libswresample.so.5
lib/ffmpeg7/libswresample.so.5.1.100
lib/ffmpeg7/libswscale.a
lib/ffmpeg7/libswscale.so
lib/ffmpeg7/libswscale.so.8
lib/ffmpeg7/libswscale.so.8.1.100
lib/ffmpeg7/pkgconfig/libavcodec.pc
lib/ffmpeg7/pkgconfig/libavdevice.pc
lib/ffmpeg7/pkgconfig/libavfilter.pc
lib/ffmpeg7/pkgconfig/libavformat.pc
lib/ffmpeg7/pkgconfig/libavutil.pc
lib/ffmpeg7/pkgconfig/libpostproc.pc
lib/ffmpeg7/pkgconfig/libswresample.pc
lib/ffmpeg7/pkgconfig/libswscale.pc
man/man1/ffmpeg-all7.1
man/man1/ffmpeg-bitstream-filters7.1
man/man1/ffmpeg-codecs7.1
man/man1/ffmpeg-devices7.1
man/man1/ffmpeg-filters7.1
man/man1/ffmpeg-formats7.1
man/man1/ffmpeg-protocols7.1
man/man1/ffmpeg-resampler7.1
man/man1/ffmpeg-scaler7.1
man/man1/ffmpeg-utils7.1
man/man1/ffmpeg7.1
man/man1/ffprobe-all7.1
man/man1/ffprobe7.1
man/man3/libavcodec7.3
man/man3/libavdevice7.3
man/man3/libavfilter7.3
man/man3/libavformat7.3
man/man3/libavutil7.3
man/man3/libswresample7.3
man/man3/libswscale7.3
${PLIST.doc}share/doc/ffmpeg7/bootstrap.min.css
share/doc/ffmpeg7/build_system.txt
${PLIST.doc}share/doc/ffmpeg7/community.html
${PLIST.doc}share/doc/ffmpeg7/default.css
${PLIST.doc}share/doc/ffmpeg7/developer.html
share/doc/ffmpeg7/errno.txt
${PLIST.doc}share/doc/ffmpeg7/faq.html
${PLIST.doc}share/doc/ffmpeg7/fate.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-all.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-bitstream-filters.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-codecs.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-devices.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-filters.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-formats.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-protocols.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-resampler.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-scaler.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg-utils.html
${PLIST.doc}share/doc/ffmpeg7/ffmpeg.html
share/doc/ffmpeg7/ffmpeg.txt
${PLIST.doc}share/doc/ffmpeg7/ffprobe-all.html
${PLIST.doc}share/doc/ffmpeg7/ffprobe.html
share/doc/ffmpeg7/filter_design.txt
${PLIST.doc}share/doc/ffmpeg7/general.html
${PLIST.doc}share/doc/ffmpeg7/git-howto.html
share/doc/ffmpeg7/infra.txt
share/doc/ffmpeg7/issue_tracker.txt
share/doc/ffmpeg7/libav-merge.txt
${PLIST.doc}share/doc/ffmpeg7/libavcodec.html
${PLIST.doc}share/doc/ffmpeg7/libavdevice.html
${PLIST.doc}share/doc/ffmpeg7/libavfilter.html
${PLIST.doc}share/doc/ffmpeg7/libavformat.html
${PLIST.doc}share/doc/ffmpeg7/libavutil.html
${PLIST.doc}share/doc/ffmpeg7/libswresample.html
${PLIST.doc}share/doc/ffmpeg7/libswscale.html
${PLIST.doc}share/doc/ffmpeg7/mailing-list-faq.html
share/doc/ffmpeg7/mips.txt
share/doc/ffmpeg7/multithreading.txt
${PLIST.doc}share/doc/ffmpeg7/nut.html
share/doc/ffmpeg7/optimization.txt
${PLIST.doc}share/doc/ffmpeg7/platform.html
share/doc/ffmpeg7/rate_distortion.txt
share/doc/ffmpeg7/snow.txt
${PLIST.doc}share/doc/ffmpeg7/style.min.css
share/doc/ffmpeg7/swresample.txt
share/doc/ffmpeg7/swscale.txt
share/doc/ffmpeg7/tablegen.txt
share/doc/ffmpeg7/undefined.txt
share/doc/ffmpeg7/writing_filters.txt
share/ffmpeg7/examples/Makefile
share/ffmpeg7/examples/README
share/ffmpeg7/examples/avio_http_serve_files.c
share/ffmpeg7/examples/avio_list_dir.c
share/ffmpeg7/examples/avio_read_callback.c
share/ffmpeg7/examples/decode_audio.c
share/ffmpeg7/examples/decode_filter_audio.c
share/ffmpeg7/examples/decode_filter_video.c
share/ffmpeg7/examples/decode_video.c
share/ffmpeg7/examples/demux_decode.c
share/ffmpeg7/examples/encode_audio.c
share/ffmpeg7/examples/encode_video.c
share/ffmpeg7/examples/extract_mvs.c
share/ffmpeg7/examples/filter_audio.c
share/ffmpeg7/examples/hw_decode.c
share/ffmpeg7/examples/mux.c
share/ffmpeg7/examples/qsv_decode.c
share/ffmpeg7/examples/qsv_transcode.c
share/ffmpeg7/examples/remux.c
share/ffmpeg7/examples/resample_audio.c
share/ffmpeg7/examples/scale_video.c
share/ffmpeg7/examples/show_metadata.c
share/ffmpeg7/examples/transcode.c
share/ffmpeg7/examples/transcode_aac.c
share/ffmpeg7/examples/vaapi_encode.c
share/ffmpeg7/examples/vaapi_transcode.c
share/ffmpeg7/ffprobe.xsd
share/ffmpeg7/libvpx-1080p.ffpreset
share/ffmpeg7/libvpx-1080p50_60.ffpreset
share/ffmpeg7/libvpx-360p.ffpreset
share/ffmpeg7/libvpx-720p.ffpreset
share/ffmpeg7/libvpx-720p50_60.ffpreset
# $NetBSD: buildlink3.mk,v 1.1 2024/04/07 17:50:23 ryoon Exp $
BUILDLINK_TREE+= ffmpeg7
.if !defined(FFMPEG7_BUILDLINK3_MK)
FFMPEG7_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.ffmpeg7+= ffmpeg7>=7.0
BUILDLINK_PKGSRCDIR.ffmpeg7?= ../../multimedia/ffmpeg7
pkgbase := ffmpeg7
.include "../../mk/pkg-build-options.mk"
.include "../../mk/bsd.fast.prefs.mk"
.if ${PKG_BUILD_OPTIONS.ffmpeg7:Mav1}
. include "../../multimedia/libaom/buildlink3.mk"
.endif
.if ${PKG_BUILD_OPTIONS.ffmpeg7:Mfreetype}
. include "../../graphics/freetype2/buildlink3.mk"
.endif
.if ${PKG_BUILD_OPTIONS.ffmpeg7:Mfontconfig}
. include "../../fonts/fontconfig/buildlink3.mk"
.endif
.if ${PKG_BUILD_OPTIONS.ffmpeg7:Mtheora}
. include "../../multimedia/libtheora/buildlink3.mk"
.endif
.if ${PKG_BUILD_OPTIONS.ffmpeg7:Mxvid}
. include "../../multimedia/xvidcore/buildlink3.mk"
.endif
.if ${PKG_BUILD_OPTIONS.ffmpeg7:Mx264}
. include "../../multimedia/x264/buildlink3.mk"
.endif
.if ${PKG_BUILD_OPTIONS.ffmpeg7:Mlibvpx}
. include "../../multimedia/libvpx/buildlink3.mk"
.endif
.if ${PKG_BUILD_OPTIONS.ffmpeg7:Mvaapi}
. include "../../multimedia/libva/buildlink3.mk"
.endif
.if ${PKG_BUILD_OPTIONS.ffmpeg7:Mvdpau}
. include "../../multimedia/libvdpau/buildlink3.mk"
.endif
BUILDLINK_INCDIRS.ffmpeg7+= include/ffmpeg7
BUILDLINK_LIBDIRS.ffmpeg7+= lib/ffmpeg7
BUILDLINK_FNAME_TRANSFORM.ffmpeg7+= -e 's|lib/ffmpeg7/pkgconfig/|lib/pkgconfig/|'
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../archivers/xz/buildlink3.mk"
.include "../../devel/libgetopt/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.endif # FFMPEG7_BUILDLINK3_MK
BUILDLINK_TREE+= -ffmpeg7
$NetBSD: distinfo,v 1.1 2024/04/07 17:50:23 ryoon Exp $
BLAKE2s (ffmpeg-7.0.tar.xz) = 9712a6ec9d3cbbc3c8a92712a30982c12005abcdefb6f0c56a13fa8f4f0137e5
SHA512 (ffmpeg-7.0.tar.xz) = f693027b9c142c3757b76b2fe1c09bdafa4bf2580e691b20306bc6621080005173d068122668e80f52bd46dba3ab04a32f0608d709c8e6fd1c73387b4d4881f7
Size (ffmpeg-7.0.tar.xz) = 10791240 bytes
SHA1 (patch-Makefile) = 2d27f218ee49179fdea14bb5c86c506dfb64dbd6
SHA1 (patch-configure) = bdb43e6d014e0cdfa57b44ee30a2283c75871831
SHA1 (patch-doc_Makefile) = 35a23c09f3f735131647888cdc1ba725ff0f33ac
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_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-libavformat_avformat.h) = fd10d2646728d8340ac4b654e06db8deb9cf8522
SHA1 (patch-libavformat_mux__utils.c) = a46cdcc8e32251773362406adad06efb367349ca
SHA1 (patch-libavutil_macros.h) = 7d9770f018a2207d2dcb1fe057564e30be51fd42
SHA1 (patch-libavutil_ppc_cpu.c) = 0c77fecf2b92fa7b8f786987b216fe70a0d45904
SHA1 (patch-libavutil_x86_asm.h) = 8f48f9e8ec08b5176bb40fc0021f3bb913dbef22
SHA1 (patch-libavutil_x86_cpu.c) = 9c97e68fde0fcb19741e034a803d509040ea4487
# $NetBSD: options.mk,v 1.1 2024/04/07 17:50:23 ryoon Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg7
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 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
.if ${OPSYS} != "Darwin"
PKG_SUGGESTED_OPTIONS+= x11
.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
$NetBSD: patch-Makefile,v 1.1 2024/04/07 17:50:23 ryoon 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
$NetBSD: patch-configure,v 1.1 2024/04/07 17:50:23 ryoon Exp $
Sun audio support.
Enable PIC on NetBSD, even on i386, to avoid text relocations.
Fix install_name_dir on Darwin.
Do not use 'rsync'.
--- configure.orig 2024-04-04 23:22:59.000000000 +0000
+++ configure
@@ -2298,6 +2298,7 @@ HEADERS_LIST="
sys_resource_h
sys_select_h
sys_soundcard_h
+ sys_audioio_h
sys_time_h
sys_un_h
sys_videoio_h
@@ -2443,7 +2444,6 @@ TOOLCHAIN_FEATURES="
inline_asm_labels
inline_asm_nonlocal_labels
pragma_deprecated
- rsync_contimeout
symver_asm_label
symver_gnu_asm
vfp_args
@@ -3695,6 +3695,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"
@@ -5711,6 +5713,7 @@ 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
@@ -5737,7 +5740,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"
@@ -6110,10 +6113,13 @@ extern_prefix=${sym%%ff_extern*}
check_cc pragma_deprecated "" '_Pragma("GCC diagnostic push") _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 } }"
@@ -6598,6 +6604,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 pthread_np.h
check_headers sys/param.h
check_headers sys/resource.h
@@ -7129,7 +7136,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
$NetBSD: patch-doc_Makefile,v 1.1 2024/04/07 17:50:23 ryoon 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/%7.1) $(AVPROGS-yes:%=doc/%-all7.1) $(COMPONENTS-yes:%=doc/%7.1)
+MANPAGES3 = $(LIBRARIES-yes:%=doc/%7.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/%7.1 doc/%7.3: TAG = MAN
+doc/%7.1: doc/%.pod $(GENTEXI)
$(M)pod2man --section=1 --center=" " --release=" " --date=" " $< > $@
-doc/%.3: doc/%.pod $(GENTEXI)
+doc/%7.3: doc/%.pod $(GENTEXI)
$(M)pod2man --section=3 --center=" " --release=" " --date=" " $< > $@
$(DOCS) doc/doxy/html: | doc/
$NetBSD: patch-doc_general__contents.texi,v 1.1 2024/04/07 17:50:23 ryoon 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
$NetBSD: patch-doc_indevs.texi,v 1.1 2024/04/07 17:50:23 ryoon 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.
$NetBSD: patch-doc_outdevs.texi,v 1.1 2024/04/07 17:50:23 ryoon 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.
$NetBSD: patch-libavdevice_Makefile,v 1.1 2024/04/07 17:50:23 ryoon 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
$NetBSD: patch-libavdevice_sunau.c,v 1.1 2024/04/07 17:50:23 ryoon 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>
+ *
+ * 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;
+}
$NetBSD: patch-libavdevice_sunau.h,v 1.1 2024/04/07 17:50:24 ryoon 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>
+ *
+ * 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 */
$NetBSD: patch-libavdevice_sunau__dec.c,v 1.1 2024/04/07 17:50:24 ryoon 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>
+ *
+ * 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,
+};
$NetBSD: patch-libavdevice_sunau__enc.c,v 1.1 2024/04/07 17:50:24 ryoon 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>
+ *
+ * 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,
+};
$NetBSD: patch-libavformat_avformat.h,v 1.1 2024/04/07 17:50:24 ryoon Exp $
expose av_stream_get_first_dts() for chromium - from ArchLinux
--- libavformat/avformat.h.orig 2024-04-04 23:23:00.000000000 +0000
+++ libavformat/avformat.h
@@ -1170,6 +1170,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
/**
$NetBSD: patch-libavformat_mux__utils.c,v 1.1 2024/04/07 17:50:24 ryoon Exp $
expose av_stream_get_first_dts() for chromium - from ArchLinux
--- libavformat/mux_utils.c.orig 2024-04-04 23:23:00.000000000 +0000
+++ libavformat/mux_utils.c
@@ -30,6 +30,13 @@
#include "internal.h"
#include "mux.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 ^^^
+
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
int std_compliance)
{
$NetBSD: patch-libavutil_macros.h,v 1.1 2024/04/07 17:50:24 ryoon 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
$NetBSD: patch-libavutil_ppc_cpu.c,v 1.1 2024/04/07 17:50:24 ryoon Exp $
Handle machdep.altivec on NetBSD like on OpenBSD.
--- libavutil/ppc/cpu.c.orig 2023-11-09 23:38:54.000000000 +0000
+++ libavutil/ppc/cpu.c
@@ -27,7 +27,7 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#elif defined(__OpenBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/types.h>
#include <sys/sysctl.h>
#include <machine/cpu.h>
@@ -56,8 +56,8 @@ int ff_get_cpu_flags_ppc(void)
if (result == VECTORTYPE_ALTIVEC)
return AV_CPU_FLAG_ALTIVEC;
return 0;
-#elif defined(__APPLE__) || defined(__OpenBSD__)
-#ifdef __OpenBSD__
+#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
#else
int sels[2] = {CTL_HW, HW_VECTORUNIT};
$NetBSD: patch-libavutil_x86_asm.h,v 1.1 2024/04/07 17:50:24 ryoon 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"
$NetBSD: patch-libavutil_x86_cpu.c,v 1.1 2024/04/07 17:50:24 ryoon 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) {