Here is an update to MPlayer snapshot from 20130819. Tested a bit on amd64. Looking for any additional testing or feedback.
Index: Makefile =================================================================== RCS file: /cvs/ports/x11/mplayer/Makefile,v retrieving revision 1.223 diff -u -p -r1.223 Makefile --- Makefile 19 Aug 2013 14:40:21 -0000 1.223 +++ Makefile 20 Aug 2013 07:50:46 -0000 @@ -7,9 +7,8 @@ ONLY_FOR_ARCHS = ${GCC4_ARCHS} COMMENT = movie player supporting many formats -V = 20130214 +V = 20130819 FFMPEG_V = 20130718 -REVISION = 5 SUBST_VARS += PREFIX CONFDIR Index: README =================================================================== RCS file: /cvs/ports/x11/mplayer/README,v retrieving revision 1.5 diff -u -p -r1.5 README --- README 21 Jan 2013 16:23:05 -0000 1.5 +++ README 20 Aug 2013 07:50:46 -0000 @@ -27,7 +27,7 @@ codec libraries for the same codec. There is an exception to this rule, which is where an external library provides an encoder and decoder, and there is a decoder for the given codec in FFmpeg, but no encoder; in such a case, go ahead and link the -external library so that users can encode with mencoder. +external library so that users can encode with Mencoder. Be aware that some hardware lacks a floating point unit (ARM for example). On these architectures, you should select integer decoders @@ -35,7 +35,7 @@ where possible. Eg. Tremor instead of Vo External FAAC linkage (and graphics/ffmpeg's external FAAC linkage) was disabled due to conflicting licenses. Only the FFmpeg's -internal "ffaac" encoder remains for use with encoding AAC in mencoder. +internal "ffaac" encoder remains for use with encoding AAC in Mencoder. https://bugs.launchpad.net/ubuntu/+source/faac/+bug/374900 Rolling a Distfile @@ -54,5 +54,5 @@ Testing Mencoder See here to know what you can contain it what: http://en.wikipedia.org/wiki/Comparison_of_container_formats -Make a h264/mp4 (although lavc containers are somewhat broken in mencoder): +Make a H.264 / MP4 (although lavc containers are somewhat broken in Mencoder): mencoder -ovc x264 -of lavf -lavfopts format=mp4 -nosound -o out.mp4 <infile> Index: distinfo =================================================================== RCS file: /cvs/ports/x11/mplayer/distinfo,v retrieving revision 1.37 diff -u -p -r1.37 distinfo --- distinfo 13 Mar 2013 02:28:11 -0000 1.37 +++ distinfo 20 Aug 2013 07:50:46 -0000 @@ -1,2 +1,2 @@ -SHA256 (mplayer-20130214.tar.xz) = 1qcsmDzu9waXkTYh4KnvelDrsxQwbst99xUoZvXZz14= -SIZE (mplayer-20130214.tar.xz) = 5262364 +SHA256 (mplayer-20130819.tar.xz) = +sUhhiXfXp+jUAILtZqMlcHuUaQ5u7ARJd8CXwNLfCc= +SIZE (mplayer-20130819.tar.xz) = 5270956 Index: patches/patch-DOCS_man_en_mplayer_1 =================================================================== RCS file: /cvs/ports/x11/mplayer/patches/patch-DOCS_man_en_mplayer_1,v retrieving revision 1.7 diff -u -p -r1.7 patch-DOCS_man_en_mplayer_1 --- patches/patch-DOCS_man_en_mplayer_1 13 Mar 2013 02:28:11 -0000 1.7 +++ patches/patch-DOCS_man_en_mplayer_1 20 Aug 2013 07:50:46 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-DOCS_man_en_mplayer_1,v 1.7 2013/03/13 02:28:11 brad Exp $ ---- DOCS/man/en/mplayer.1.orig Sun Jan 13 23:54:05 2013 -+++ DOCS/man/en/mplayer.1 Mon Jan 21 11:45:15 2013 -@@ -1505,7 +1505,7 @@ May be negative. +--- DOCS/man/en/mplayer.1.orig Mon Aug 19 10:49:18 2013 ++++ DOCS/man/en/mplayer.1 Tue Aug 20 02:39:05 2013 +@@ -1541,7 +1541,7 @@ May be negative. . .TP .B \-cdrom\-device <path to device> @@ -10,7 +10,7 @@ $OpenBSD: patch-DOCS_man_en_mplayer_1,v . .TP .B \-channels <number> (also see \-af channels) -@@ -12240,11 +12240,11 @@ mplayer \-vo zr2 \-vf scale=352:288,zrmjpeg file.avi +@@ -12298,11 +12298,11 @@ mplayer \-vo zr2 \-vf scale=352:288,zrmjpeg file.avi .PP .B Play DTS-CD with passthrough: .nf Index: patches/patch-Makefile =================================================================== RCS file: /cvs/ports/x11/mplayer/patches/patch-Makefile,v retrieving revision 1.26 diff -u -p -r1.26 patch-Makefile --- patches/patch-Makefile 19 Aug 2013 14:40:21 -0000 1.26 +++ patches/patch-Makefile 20 Aug 2013 07:50:46 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-Makefile,v 1.26 2013/08/19 14:40:21 brad Exp $ ---- Makefile.orig Thu Feb 14 14:46:11 2013 -+++ Makefile Tue Jun 4 22:13:48 2013 +--- Makefile.orig Mon Aug 19 10:49:12 2013 ++++ Makefile Tue Aug 20 02:49:57 2013 @@ -35,6 +35,7 @@ OS_FEATURE-$(VSSCANF) += osdep/vsscanf. # conditional source declarations SRCS_AUDIO_INPUT-$(ALSA) += stream/ai_alsa.c @@ -8,22 +8,22 @@ $OpenBSD: patch-Makefile,v 1.26 2013/08/ +SRCS_AUDIO_INPUT-$(SNDIO) += stream/ai_sndio.c SRCS_COMMON-$(AUDIO_INPUT) += $(SRCS_AUDIO_INPUT-yes) SRCS_COMMON-$(BITMAP_FONT) += sub/font_load.c - SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \ -@@ -565,6 +566,7 @@ SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c - SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c libvo/sdl_common.c + SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \ +@@ -573,6 +574,7 @@ SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c + libvo/sdl_common.c SRCS_MPLAYER-$(SGIAUDIO) += libao2/ao_sgi.c SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c +SRCS_MPLAYER-$(SNDIO) += libao2/ao_sndio.c SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c -@@ -628,7 +630,8 @@ SRCS_MPLAYER = command.c \ - libvo/vo_mpegpes.c \ - libvo/vo_null.c \ - sub/spuenc.c \ +@@ -638,7 +640,8 @@ SRCS_MPLAYER = command.c \ + libvo/vo_mpegpes.c \ + libvo/vo_null.c \ + sub/spuenc.c \ - $(SRCS_MPLAYER-yes) -+ $(SRCS_MPLAYER-yes) \ -+ libao2/ao_rtunes.c - ++ $(SRCS_MPLAYER-yes) \ ++ libao2/ao_rtunes.c + #MEncoder SRCS_MENCODER-$(FAAC) += libmpcodecs/ae_faac.c Index: patches/patch-configure =================================================================== RCS file: /cvs/ports/x11/mplayer/patches/patch-configure,v retrieving revision 1.70 diff -u -p -r1.70 patch-configure --- patches/patch-configure 5 May 2013 21:11:32 -0000 1.70 +++ patches/patch-configure 20 Aug 2013 07:50:46 -0000 @@ -1,23 +1,48 @@ $OpenBSD: patch-configure,v 1.70 2013/05/05 21:11:32 brad Exp $ ---- configure.orig Thu Feb 14 14:46:19 2013 -+++ configure Sun May 5 00:59:13 2013 -@@ -35,34 +35,37 @@ - # - ############################################################################# +--- configure.orig Mon Aug 19 10:49:15 2013 ++++ configure Tue Aug 20 02:49:06 2013 +@@ -523,6 +523,7 @@ Audio output: + --disable-nas disable NAS audio output [autodetect] + --disable-sgiaudio disable SGI audio output [autodetect] + --disable-sunaudio disable Sun audio output [autodetect] ++ --disable-sndio disable OpenBSD sndio audio output [autodetect] + --disable-kai disable KAI audio output [autodetect] + --disable-dart disable DART audio output [autodetect] + --disable-win32waveout disable Windows waveout audio output [autodetect] +@@ -756,6 +757,7 @@ _xf86keysym=auto + _mlib=no #broken, thus disabled + _sgiaudio=auto + _sunaudio=auto ++_sndio=auto + _alsa=auto + _fastmemcpy=yes + hardcoded_tables=no +@@ -1193,6 +1195,8 @@ for ac_option do + --disable-mlib) _mlib=no ;; + --enable-sunaudio) _sunaudio=yes ;; + --disable-sunaudio) _sunaudio=no ;; ++ --enable-sndio) _sndio=yes ;; ++ --disable-sndio) _sndio=no ;; + --enable-sgiaudio) _sgiaudio=yes ;; + --disable-sgiaudio) _sgiaudio=no ;; + --enable-alsa) _alsa=yes ;; +@@ -1491,36 +1495,36 @@ echo configuration: $configuration > "$TMPLOG" + echo >> "$TMPLOG" + +-# local FFmpeg checkout handling -if test -e ffmpeg/.svn ; then - echo "You have an outdated FFmpeg SVN checkout in ffmpeg/, please (re)move or replace it" - exit 1 -fi -+# OpenBSD -+# Don't do anything funky with Git or SVN, we will provide mplayer with FFmpeg -+# ++## local FFmpeg checkout handling +#if test -e ffmpeg/.svn ; then +# echo "You have an outdated FFmpeg SVN checkout in ffmpeg/, please (re)move or replace it" +# exit 1 +#fi +# +#if test -e ffmpeg/mp_auto_pull ; then ++# echo "Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable" +# (cd ffmpeg && git checkout master) +# if ! (cd ffmpeg && git pull --rebase --ff-only) ; then +# echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling" @@ -41,6 +66,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 +#fi -if test -e ffmpeg/mp_auto_pull ; then +- echo "Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable" - (cd ffmpeg && git checkout master) - if ! (cd ffmpeg && git pull --rebase --ff-only) ; then - echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling" @@ -63,35 +89,10 @@ $OpenBSD: patch-configure,v 1.70 2013/05 - touch ffmpeg/mp_auto_pull -fi - - # Prevent locale nonsense from breaking basic text processing utilities - export LC_ALL=C - -@@ -542,6 +545,7 @@ Audio output: - --disable-nas disable NAS audio output [autodetect] - --disable-sgiaudio disable SGI audio output [autodetect] - --disable-sunaudio disable Sun audio output [autodetect] -+ --disable-sndio disable OpenBSD sndio audio output [autodetect] - --disable-kai disable KAI audio output [autodetect] - --disable-dart disable DART audio output [autodetect] - --disable-win32waveout disable Windows waveout audio output [autodetect] -@@ -795,6 +799,7 @@ _xf86keysym=auto - _mlib=no #broken, thus disabled - _sgiaudio=auto - _sunaudio=auto -+_sndio=auto - _alsa=auto - _fastmemcpy=yes - hardcoded_tables=no -@@ -1222,6 +1227,8 @@ for ac_option do - --disable-mlib) _mlib=no ;; - --enable-sunaudio) _sunaudio=yes ;; - --disable-sunaudio) _sunaudio=no ;; -+ --enable-sndio) _sndio=yes ;; -+ --disable-sndio) _sndio=no ;; - --enable-sgiaudio) _sgiaudio=yes ;; - --disable-sgiaudio) _sgiaudio=no ;; - --enable-alsa) _alsa=yes ;; -@@ -1635,7 +1642,7 @@ if test -z "$_target" ; then + list_subparts() { + pattern="s/^[^#]*${1}.*([^ ,]*, *\([^ ,)]*\).*/\1_${2}/p" + sed -n "$pattern" ffmpeg/libav${3} | toupper +@@ -1696,7 +1700,7 @@ if test -z "$_target" ; then sh3|sh4|sh4a) host_arch=sh ;; s390) host_arch=s390 ;; s390x) host_arch=s390x ;; @@ -100,7 +101,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 vax) host_arch=vax ;; xtensa*) host_arch=xtensa ;; *) host_arch=UNKNOWN ;; -@@ -2288,7 +2295,7 @@ case "$host_arch" in +@@ -2349,7 +2353,7 @@ case "$host_arch" in arch='sparc' iproc='sparc' if test "$host_arch" = "sparc64" ; then @@ -109,7 +110,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 proc='ultrasparc' def_fast_64bit='#define HAVE_FAST_64BIT 1' elif sunos ; then -@@ -2611,7 +2618,7 @@ cat > $TMPC << EOF +@@ -2672,7 +2676,7 @@ cat > $TMPC << EOF int ff_extern; EOF cc_check -c || die "Symbol mangling check failed." @@ -118,7 +119,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 extern_prefix=${sym%%ff_extern*} def_extern_asm="#define EXTERN_ASM $extern_prefix" def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\"" -@@ -5767,6 +5774,22 @@ fi +@@ -5776,6 +5780,22 @@ fi echores "$_sunaudio" @@ -141,23 +142,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 def_mlib='#define CONFIG_MLIB 0' if sunos; then echocheck "Sun mediaLib" -@@ -5883,7 +5906,15 @@ else - default_dvd_device="/dev/dvd" - fi - -+if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos ; then -+ default_bluray_device=$default_cdrom_device -+elif darwin ; then -+ default_bluray_device="/dev/rdiskN" -+else -+ default_bluray_device="/dev/dvd" -+fi - -+ - echocheck "VCD support" - if test "$_vcd" = auto; then - _vcd=no -@@ -6033,7 +6064,7 @@ echocheck "cdparanoia" +@@ -6087,7 +6107,7 @@ echocheck "cdparanoia" if test "$_cdparanoia" = auto ; then _cdparanoia=no for inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do @@ -166,7 +151,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 _cdparanoia=yes && extra_cflags="$extra_cflags $inc_tmp" && break done fi -@@ -7978,6 +8009,7 @@ extra_ldflags="$extra_ldflags -lm" +@@ -8033,6 +8053,7 @@ extra_ldflags="$extra_ldflags -lm" # XML documentation tests echocheck "XML catalogs" for try_catalog in \ @@ -174,7 +159,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 /etc/sgml/catalog \ /usr/share/xml/docbook/*/catalog.xml \ /opt/local/share/xml/docbook-xml/*/catalog.xml \ -@@ -8005,6 +8037,7 @@ fi +@@ -8060,6 +8081,7 @@ fi echocheck "XML chunked stylesheet" for try_chunk_xsl in \ @@ -182,7 +167,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 /usr/share/xml/docbook/*/html/chunk.xsl \ /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \ /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \ -@@ -8030,6 +8063,7 @@ fi +@@ -8085,6 +8107,7 @@ fi echocheck "XML monolithic stylesheet" for try_docbook_xsl in \ @@ -190,7 +175,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 /usr/share/xml/docbook/*/html/docbook.xsl \ /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \ /usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \ -@@ -8083,6 +8117,7 @@ EOF +@@ -8138,6 +8161,7 @@ EOF echocheck "XML DTD" #FIXME: This should prefer higher version numbers, not the other way around .. for try_dtd in \ @@ -198,7 +183,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 /usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \ /usr/share/xml/docbook/*/docbookx.dtd \ /usr/share/sgml/docbook/*/docbookx.dtd \ -@@ -8354,6 +8389,7 @@ SPEEX = $_speex +@@ -8413,6 +8437,7 @@ SPEEX = $_speex STREAM_CACHE = $_stream_cache SGIAUDIO = $_sgiaudio SUNAUDIO = $_sunaudio @@ -206,15 +191,7 @@ $OpenBSD: patch-configure,v 1.70 2013/05 SVGA = $_svga TDFXFB = $_tdfxfb TDFXVID = $_tdfxvid -@@ -8687,6 +8723,7 @@ $(ff_config_enable "$cpuexts_all" "$cpuexts" "#" "HAVE - /* Blu-ray/DVD/VCD/CD */ - #define DEFAULT_CDROM_DEVICE "$default_cdrom_device" - #define DEFAULT_DVD_DEVICE "$default_dvd_device" -+#define DEFAULT_BLURAY_DEVICE "$default_bluray_device" - $def_bluray - $def_bsdi_dvd - $def_cddb -@@ -8773,6 +8810,7 @@ $def_ossaudio_devmixer +@@ -8846,6 +8871,7 @@ $def_ossaudio_devmixer $def_pulse $def_sgiaudio $def_sunaudio Index: patches/patch-fmt-conversion_c =================================================================== RCS file: patches/patch-fmt-conversion_c diff -N patches/patch-fmt-conversion_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-fmt-conversion_c 20 Aug 2013 07:50:46 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ +--- fmt-conversion.c.orig Tue Aug 20 02:57:56 2013 ++++ fmt-conversion.c Tue Aug 20 03:08:51 2013 +@@ -64,8 +64,12 @@ static const struct { + { IMGFMT_RGB64LE, AV_PIX_FMT_RGBA64LE }, + { IMGFMT_RGB64BE, AV_PIX_FMT_RGBA64BE }, + #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */ ++ ++#if 0 + { IMGFMT_XYZ12LE, AV_PIX_FMT_XYZ12LE }, + { IMGFMT_XYZ12BE, AV_PIX_FMT_XYZ12BE }, ++#endif ++ + { IMGFMT_422A, AV_PIX_FMT_YUVA422P }, + { IMGFMT_444A, AV_PIX_FMT_YUVA444P }, + { IMGFMT_GBR24P, AV_PIX_FMT_GBRP }, Index: patches/patch-libmpdemux_demux_lavf_c =================================================================== RCS file: patches/patch-libmpdemux_demux_lavf_c diff -N patches/patch-libmpdemux_demux_lavf_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libmpdemux_demux_lavf_c 20 Aug 2013 07:50:46 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- libmpdemux/demux_lavf.c.orig Tue Aug 20 03:13:59 2013 ++++ libmpdemux/demux_lavf.c Tue Aug 20 03:14:31 2013 +@@ -441,7 +441,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormat + else if (codec->codec_id == AV_CODEC_ID_MOV_TEXT) + type = 'm'; + else if (codec->codec_id == AV_CODEC_ID_SSA +-#if LIBAVUTIL_VERSION_MICRO >= 100 ++#if 0 + || codec->codec_id == AV_CODEC_ID_ASS + #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */ + ) Index: patches/patch-libmpdemux_mp_taglists_c =================================================================== RCS file: patches/patch-libmpdemux_mp_taglists_c diff -N patches/patch-libmpdemux_mp_taglists_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libmpdemux_mp_taglists_c 20 Aug 2013 07:50:46 -0000 @@ -0,0 +1,13 @@ +$OpenBSD$ +--- libmpdemux/mp_taglists.c.orig Tue Aug 20 03:11:43 2013 ++++ libmpdemux/mp_taglists.c Tue Aug 20 03:12:27 2013 +@@ -29,8 +29,8 @@ + static const struct AVCodecTag mp_wav_tags[] = { + { AV_CODEC_ID_ADPCM_4XM, MKTAG('4', 'X', 'M', 'A') }, + { AV_CODEC_ID_ADPCM_ADX, MKTAG('S', 'a', 'd', 'x') }, +-#if LIBAVUTIL_VERSION_MICRO >= 100 + { AV_CODEC_ID_ADPCM_AFC, MKTAG('A', 'F', 'C', ' ') }, ++#if 0 + { AV_CODEC_ID_ADPCM_DTK, MKTAG('D', 'T', 'K', ' ') }, + #endif + { AV_CODEC_ID_ADPCM_IMA_APC, MKTAG('A', 'P', 'C', 'A') }, Index: patches/patch-stream_stream_bluray_c =================================================================== RCS file: patches/patch-stream_stream_bluray_c diff -N patches/patch-stream_stream_bluray_c --- patches/patch-stream_stream_bluray_c 13 Mar 2013 02:28:11 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-stream_stream_bluray_c,v 1.3 2013/03/13 02:28:11 brad Exp $ ---- stream/stream_bluray.c.orig Sun Jan 13 23:53:53 2013 -+++ stream/stream_bluray.c Mon Jan 21 11:45:15 2013 -@@ -257,6 +257,8 @@ static int bluray_stream_open(stream_t *s, int mode, - device = p->device; - else if (bluray_device) - device = bluray_device; -+ else -+ device = DEFAULT_BLURAY_DEVICE; - - if (!device) { - mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_BlurayNoDevice); Index: patches/patch-stream_tvi_bsdbt848_c =================================================================== RCS file: /cvs/ports/x11/mplayer/patches/patch-stream_tvi_bsdbt848_c,v retrieving revision 1.4 diff -u -p -r1.4 patch-stream_tvi_bsdbt848_c --- patches/patch-stream_tvi_bsdbt848_c 8 Nov 2010 21:25:44 -0000 1.4 +++ patches/patch-stream_tvi_bsdbt848_c 20 Aug 2013 07:50:46 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.4 2010/11/08 21:25:44 edd Exp $ ---- stream/tvi_bsdbt848.c.orig Mon Sep 13 19:09:29 2010 -+++ stream/tvi_bsdbt848.c Sun Oct 24 10:40:01 2010 -@@ -54,9 +54,10 @@ +--- stream/tvi_bsdbt848.c.orig Mon Aug 19 10:49:11 2013 ++++ stream/tvi_bsdbt848.c Tue Aug 20 02:51:59 2013 +@@ -51,9 +51,10 @@ #include <signal.h> #include <string.h> #include <errno.h> @@ -13,7 +13,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v #include <sys/audioio.h> #endif -@@ -68,6 +69,9 @@ +@@ -65,6 +66,9 @@ #include IOCTL_BT848_H_NAME #endif @@ -23,7 +23,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v #ifdef HAVE_SYS_SOUNDCARD_H #include <sys/soundcard.h> #else -@@ -77,6 +81,7 @@ +@@ -74,6 +78,7 @@ #include <machine/soundcard.h> #endif #endif @@ -31,7 +31,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v #include "libaf/af_format.h" #include "libmpcodecs/img_format.h" -@@ -106,7 +111,13 @@ typedef struct priv { +@@ -103,7 +108,13 @@ typedef struct priv { /* Audio */ char *dspdev; int dspready; @@ -45,7 +45,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v int dspsamplesize; int dspstereo; int dspspeed; -@@ -114,6 +125,9 @@ typedef struct priv { +@@ -111,6 +122,9 @@ typedef struct priv { int dspframesize; int dsprate; long long dspbytesread; @@ -55,7 +55,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v /* Video */ char *btdev; -@@ -163,6 +177,15 @@ static priv_t *G_private=NULL; +@@ -160,6 +174,15 @@ static priv_t *G_private=NULL; static int getinput(int innumber); @@ -71,7 +71,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v static void processframe(int signal) { struct timeval curtime; -@@ -223,7 +246,9 @@ static tvi_handle_t *tvi_init_bsdbt848(tv_param_t* tv_ +@@ -220,7 +243,9 @@ static tvi_handle_t *tvi_init_bsdbt848(tv_param_t* tv_ /* set audio device name */ if (!tv_param->adevice) @@ -82,7 +82,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v priv->dspdev = strdup("/dev/sound"); #else priv->dspdev = strdup("/dev/dsp"); -@@ -332,12 +357,39 @@ static int control(priv_t *priv, int cmd, void *arg) +@@ -329,12 +354,39 @@ static int control(priv_t *priv, int cmd, void *arg) { int dspspeed = *(int *)arg; @@ -123,7 +123,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v priv->dspspeed = dspspeed; priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/ -@@ -646,12 +698,76 @@ priv->dspready = TRUE; +@@ -643,12 +695,76 @@ priv->dspready = 1; priv->dspsamplesize = 16; priv->dspstereo = 1; priv->dspspeed = 44100; @@ -200,8 +200,8 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v if((priv->dspfd = open (priv->dspdev, O_RDONLY, 0)) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningDspDev, strerror(errno)); -@@ -677,6 +793,8 @@ if((priv->dspready == TRUE) && - priv->dspready = FALSE; +@@ -674,6 +790,8 @@ if(priv->dspready && + priv->dspready = 0; } +#endif @@ -209,7 +209,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v return 1; } -@@ -701,7 +819,9 @@ if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0) +@@ -697,7 +815,9 @@ if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0) return 0; } @@ -219,7 +219,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v gettimeofday(&curtime, NULL); -@@ -740,10 +860,15 @@ if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 ) +@@ -736,10 +856,15 @@ if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 ) return 0; } @@ -236,8 +236,8 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v +close(priv->btfd); priv->btfd = -1; - priv->dspready = priv->videoready = FALSE; -@@ -823,13 +948,21 @@ gettimeofday(&curtime, NULL); + priv->dspready = priv->videoready = 0; +@@ -819,13 +944,21 @@ gettimeofday(&curtime, NULL); /* Get exactly one frame of audio, which forces video sync to audio.. */ @@ -260,7 +260,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorReadingAudio, strerror(errno)); return 0; -@@ -862,13 +995,19 @@ return priv->dspbytesread * 1.0 / priv->dsprate; +@@ -858,13 +991,19 @@ return priv->dspbytesread * 1.0 / priv->dsprate; static int get_audio_framesize(priv_t *priv) { int bytesavail; @@ -269,7 +269,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v struct audio_info auinf; #endif - if(priv->dspready == FALSE) return 0; + if(!priv->dspready) return 0; -#ifdef CONFIG_SUN_AUDIO +#if defined(CONFIG_SNDIO_AUDIO) -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.