update to mplayer-export-snapshot-20100308

locally:
* fix audio when using bsdbt848 video driver (problems noted by simon@)
* allow 24-bit audio output formats in the sndio backend (from ratchov@)

mostly from edd@ (MAINTAINER)
This commit is contained in:
jakemsr 2010-05-26 21:29:56 +00:00
parent fe26fb0aca
commit 8cf7b6253f
18 changed files with 306 additions and 168 deletions

View File

@ -1,20 +1,22 @@
# $OpenBSD: Makefile,v 1.164 2010/05/18 05:14:17 dcoppa Exp $
# $OpenBSD: Makefile,v 1.165 2010/05/26 21:29:56 jakemsr Exp $
# May not be hard to add more.
ONLY_FOR_ARCHS= amd64 i386 powerpc sparc64 arm mips64 mips64el
SUBST_VARS += PREFIX
COMMENT= movie player supporting MPEG, DivX, AVI, ASF, MOV & more
V= 20090708
V= 20100308
V_DASHED= 2010-03-08
SUBST_VARS+= PREFIX CONFDIR
N= mplayer
DISTNAME= mplayer-export-snapshot-${V}
PKGNAME= ${N}-${V}p5
PKGNAME= ${N}-${V}
CATEGORIES= x11 multimedia
EXTRACT_SUFX= .tar.bz2
WRKDIST = ${WRKDIR}/mplayer-export-2009-07-08
WRKDIST = ${WRKDIR}/mplayer-export-${V_DASHED}
HOMEPAGE= http://www.mplayerhq.hu/
@ -25,9 +27,8 @@ PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c crypto m ncurses oil-0.3 pthread stdc++ util sndio z
# snapshot
#MASTER_SITES = http://www.mplayerhq.hu/MPlayer/releases/
MASTER_SITES = http://students.dec.bmth.ac.uk/ebarrett/distfiles/
# snapshot - mplayer don't do releases
MASTER_SITES= http://theunixzoo.co.uk/distfiles/
MAINTAINER= Edd Barrett <edd@openbsd.org>
@ -49,7 +50,6 @@ LIB_DEPENDS= png::graphics/png \
mpcdec::audio/libmpcdec \
ogg.>=5::audio/libogg \
xvidcore::multimedia/xvidcore \
x264.>=3::multimedia/x264 \
mp3lame:lame-*:audio/lame \
dv::multimedia/libdv \
dvdnavmini:libdvdnav->=4.1.3:multimedia/libdvdnav \
@ -62,7 +62,9 @@ LIB_DEPENDS= png::graphics/png \
bz2::archivers/bzip2 \
schroedinger-1.0::multimedia/schroedinger \
faac::audio/faad \
faad::audio/faac
faad::audio/faac \
a52::audio/liba52 \
x264.>=3::multimedia/x264
BUILD_DEPENDS= ::net/livemedia \
:rtunes->=0.8:audio/rtunes \
@ -74,10 +76,9 @@ BUILD_DEPENDS= ::net/livemedia \
::audio/ladspa
CONFDIR= ${SYSCONFDIR}/mplayer
SUBST_VARS= CONFDIR
USE_GMAKE= Yes
CONFIGURE_STYLE= simple
CONFIGURE_STYLE=simple
CONFIGURE_ARGS+=--disable-alsa \
--disable-arts \
--disable-esd \
@ -97,14 +98,16 @@ CONFIGURE_ARGS+=--disable-alsa \
--disable-libdvdcss-internal \
--disable-faad-internal \
--disable-tremor-internal \
--disable-gui \
--disable-win32dll \
--disable-ggi \
--disable-libopenjpeg \
--enable-menu \
--confdir=${CONFDIR} \
--mandir=${LOCALBASE}/man \
--extra-cflags="-I${LOCALBASE}/include -I${LOCALBASE}/include/libpng" \
--extra-ldflags="-L${LOCALBASE}/lib" \
--disable-gui \
--disable-win32dll \
--disable-ggi
--extra-libs-mplayer="-lrtunes -lcrypto" \
CONFIGURE_ENV+= TMPDIR="${WRKBUILD}"
@ -178,13 +181,18 @@ CONFIGURE_ARGS+=--disable-jack
NO_REGRESS= Yes
post-extract:
@cp ${FILESDIR}/ao_rtunes.c ${FILESDIR}/ao_sndio.c ${WRKSRC}/libao2
@cp ${FILESDIR}/ai_sndio.c ${WRKSRC}/stream
# subst PREFIX in a patch, careful with update-patches!
pre-configure:
${SUBST_CMD} ${WRKSRC}/DOCS/xml/configure
post-patch:
@cp ${FILESDIR}/ao_rtunes.c ${FILESDIR}/ao_sndio.c ${WRKSRC}/libao2
@cp ${FILESDIR}/ai_sndio.c ${WRKSRC}/stream
post-configure:
# Put a version.h in place so svn is not a BUILD_DEPEND
# (see version.sh for how this was supposed to work).
cp ${FILESDIR}/version.h ${WRKDIST}/version.h
post-build:
@cd ${WRKSRC}/DOCS/xml && ${MAKE_PROGRAM}

View File

@ -1,5 +1,5 @@
MD5 (mplayer-export-snapshot-20090708.tar.bz2) = XYBaG3E4g3fdMu6vTNW+4g==
RMD160 (mplayer-export-snapshot-20090708.tar.bz2) = KWTgoDLjhsjTs4w9Qkm310WVDh4=
SHA1 (mplayer-export-snapshot-20090708.tar.bz2) = /XGBmgcrR2zj4vYTTMU26N5wk8k=
SHA256 (mplayer-export-snapshot-20090708.tar.bz2) = CFtDchdvXwXt/4pQo7f6KpWXEIw6ghz5+e4Z//isIVE=
SIZE (mplayer-export-snapshot-20090708.tar.bz2) = 8238626
MD5 (mplayer-export-snapshot-20100308.tar.bz2) = y/60A+FbzhccShluFskeGg==
RMD160 (mplayer-export-snapshot-20100308.tar.bz2) = WCGSDqQH6Sde3of6xFvrwgjcgFE=
SHA1 (mplayer-export-snapshot-20100308.tar.bz2) = nSMSY1qcl0fo38VKZrYQyUYXI8U=
SHA256 (mplayer-export-snapshot-20100308.tar.bz2) = TOzg0vR+1cRwIPNklgFuIpiEGe1TaNULKLMRV7ZWfWc=
SIZE (mplayer-export-snapshot-20100308.tar.bz2) = 8870973

View File

@ -153,7 +153,7 @@ static int init(int rate, int channels, int format, int flags)
format = par.sig ?
(par.le ? AF_FORMAT_S16_LE : AF_FORMAT_S16_BE) :
(par.le ? AF_FORMAT_U16_LE : AF_FORMAT_U16_BE);
} else if (par.bits == 32 && par.bps == 4) {
} else if ((par.bits == 32 || par.msb) && par.bps == 4) {
format = par.sig ?
(par.le ? AF_FORMAT_S32_LE : AF_FORMAT_S32_BE) :
(par.le ? AF_FORMAT_U32_LE : AF_FORMAT_U32_BE);

View File

@ -0,0 +1,2 @@
#define VERSION "SVN-r30866"
#define MP_TITLE "%s "VERSION" (C) 2000-2010 MPlayer Team\n"

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-DOCS_man_en_mplayer_1,v 1.2 2009/10/11 13:36:23 edd Exp $
--- DOCS/man/en/mplayer.1.orig Mon Jul 13 19:05:24 2009
+++ DOCS/man/en/mplayer.1 Mon Jul 13 19:07:42 2009
@@ -1288,7 +1288,7 @@ May be negative.
$OpenBSD: patch-DOCS_man_en_mplayer_1,v 1.3 2010/05/26 21:29:56 jakemsr Exp $
--- DOCS/man/en/mplayer.1.orig Fri Mar 5 23:13:08 2010
+++ DOCS/man/en/mplayer.1 Mon Mar 8 14:28:41 2010
@@ -1296,7 +1296,7 @@ May be negative.
.
.TP
.B \-cdrom\-device <path to device>
@ -10,7 +10,7 @@ $OpenBSD: patch-DOCS_man_en_mplayer_1,v 1.2 2009/10/11 13:36:23 edd Exp $
.
.TP
.B \-channels <number> (also see \-af channels)
@@ -11207,11 +11207,11 @@ mplayer \-vo zr2 \-vf scale=352:288,zrmjpeg file.avi
@@ -11474,11 +11474,11 @@ mplayer \-vo zr2 \-vf scale=352:288,zrmjpeg file.avi
.PP
.B Play DTS-CD with passthrough:
.nf

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-DOCS_xml_configure,v 1.1 2009/10/11 13:36:23 edd Exp $
--- DOCS/xml/configure.orig Tue May 12 19:58:57 2009
+++ DOCS/xml/configure Fri Jul 10 10:48:16 2009
$OpenBSD: patch-DOCS_xml_configure,v 1.2 2010/05/26 21:29:56 jakemsr Exp $
--- DOCS/xml/configure.orig Sun Dec 13 15:48:20 2009
+++ DOCS/xml/configure Wed May 19 10:14:40 2010
@@ -18,7 +18,8 @@ for _try_catalog in \
/usr/lib/sgml/catalog \
/usr/local/lib/sgml/catalog \

View File

@ -1,15 +1,7 @@
$OpenBSD: patch-Makefile,v 1.19 2009/10/11 13:36:23 edd Exp $
--- Makefile.orig Mon Jul 6 19:01:36 2009
+++ Makefile Tue Jul 21 15:13:33 2009
@@ -29,6 +29,7 @@ COMMON_LDFLAGS += $(EXTRA_LIB)\
LDFLAGS_MPLAYER = $(EXTRALIBS_MPLAYER) \
$(COMMON_LDFLAGS) \
+ -lrtunes -lcrypto
LDFLAGS_MENCODER = $(EXTRALIBS_MENCODER) \
$(COMMON_LDFLAGS) \
@@ -36,6 +37,7 @@ LDFLAGS_MENCODER = $(EXTRALIBS_MENCODER) \
$OpenBSD: patch-Makefile,v 1.20 2010/05/26 21:29:56 jakemsr Exp $
--- Makefile.orig Fri Mar 5 23:13:08 2010
+++ Makefile Mon Mar 8 21:24:09 2010
@@ -28,6 +28,7 @@ include config.mak
SRCS_AUDIO_INPUT-$(ALSA1X) += stream/ai_alsa1x.c
SRCS_AUDIO_INPUT-$(ALSA9) += stream/ai_alsa.c
SRCS_AUDIO_INPUT-$(OSS) += stream/ai_oss.c
@ -17,7 +9,7 @@ $OpenBSD: patch-Makefile,v 1.19 2009/10/11 13:36:23 edd Exp $
SRCS_COMMON-$(AUDIO_INPUT) += $(SRCS_AUDIO_INPUT-yes)
SRCS_COMMON-$(BITMAP_FONT) += libvo/font_load.c
SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \
@@ -615,6 +617,7 @@ SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c
@@ -627,6 +628,7 @@ SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c
SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c
SRCS_MPLAYER-$(SGIAUDIO) += libao2/ao_sgi.c
SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c
@ -25,7 +17,7 @@ $OpenBSD: patch-Makefile,v 1.19 2009/10/11 13:36:23 edd Exp $
SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c
SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c
SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c
@@ -677,7 +680,8 @@ SRCS_MPLAYER = command.c \
@@ -689,7 +691,8 @@ SRCS_MPLAYER = command.c \
libvo/video_out.c \
libvo/vo_mpegpes.c \
libvo/vo_null.c \
@ -35,7 +27,18 @@ $OpenBSD: patch-Makefile,v 1.19 2009/10/11 13:36:23 edd Exp $
SRCS_MENCODER-$(FAAC) += libmpcodecs/ae_faac.c
@@ -888,7 +892,16 @@ loader/%: CFLAGS += -Iloader -fno-omit-frame-pointer $
@@ -901,7 +904,9 @@ version.h: version.sh
# Make sure all generated header files are created.
codec-cfg.d codec-cfg.o: codecs.conf.h
$(DEPS) $(MENCODER_DEPS) $(MPLAYER_DEPS): help_mp.h
-$(call ADDSUFFIXES,.d .o,mpcommon vobsub stream/stream_cddb stream/network libmpdemux/muxer_avi gui/win32/gui osdep/mplayer.rc): version.h
+#$(call ADDSUFFIXES,.d .o,mpcommon vobsub stream/stream_cddb stream/network libmpdemux/muxer_avi gui/win32/gui osdep/mplayer.rc): version.h
+# OpenBSD - don't run version.sh, it requres SVN, see post-configure
+$(call ADDSUFFIXES,.d .o,mpcommon vobsub stream/stream_cddb stream/network libmpdemux/muxer_avi gui/win32/gui osdep/mplayer.rc):
libdvdcss/%: CFLAGS := -Ilibdvdcss -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) $(CFLAGS)
libdvdnav/%: CFLAGS := -Ilibdvdnav -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" $(CFLAGS)
@@ -912,7 +917,16 @@ loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_N
#loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN)

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-command_c,v 1.1 2009/10/11 13:36:23 edd Exp $
--- command.c.orig Sun Jul 12 08:12:25 2009
+++ command.c Sun Jul 12 08:12:46 2009
@@ -3131,7 +3131,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd)
$OpenBSD: patch-command_c,v 1.2 2010/05/26 21:29:56 jakemsr Exp $
--- command.c.orig Sat Jan 30 23:24:23 2010
+++ command.c Mon Mar 8 14:28:42 2010
@@ -3167,7 +3167,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd)
case MP_CMD_RUN:
#ifndef __MINGW32__
if (!fork()) {

View File

@ -1,50 +1,58 @@
$OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
--- configure.orig Thu Jun 25 01:31:17 2009
+++ configure Sat Feb 13 11:34:11 2010
@@ -420,6 +420,7 @@ Audio output:
$OpenBSD: patch-configure,v 1.56 2010/05/26 21:29:56 jakemsr Exp $
--- configure.orig Thu Mar 4 14:46:44 2010
+++ configure Mon Mar 8 21:09:42 2010
@@ -423,6 +423,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 sndio 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]
--disable-coreaudio disable CoreAudio audio output [autodetect]
@@ -651,6 +652,7 @@ _xf86keysym=auto
@@ -665,6 +666,7 @@ _xf86keysym=auto
_mlib=no #broken, thus disabled
_sgiaudio=auto
_sunaudio=auto
+_sndio=auto
_alsa=auto
_fastmemcpy=yes
_unrar_exec=auto
@@ -1075,6 +1077,8 @@ for ac_option do
--disable-mlib) _mlib=no ;;
--enable-sunaudio) _sunaudio=yes ;;
--disable-sunaudio) _sunaudio=no ;;
hardcoded_tables=no
@@ -1098,6 +1100,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 ;;
@@ -1408,7 +1412,7 @@ if test -z "$_target" ; then
--enable-sgiaudio) _sgiaudio=yes ;;
--disable-sgiaudio) _sgiaudio=no ;;
--enable-alsa) _alsa=yes ;;
@@ -1434,7 +1438,7 @@ if test -z "$_target" ; then
sh3|sh4|sh4a) host_arch=sh ;;
s390) host_arch=s390 ;;
s390x) host_arch=s390x ;;
- mips*) host_arch=mips ;;
- *mips*) host_arch=mips ;;
+ sgi|mips*|loongson) host_arch=mips ;;
vax) host_arch=vax ;;
xtensa*) host_arch=xtensa ;;
*) host_arch=UNKNOWN ;;
@@ -2374,7 +2378,7 @@ cat > $TMPC << EOF
@@ -2456,7 +2460,7 @@ cat > $TMPC << EOF
int ff_extern;
EOF
cc_check -c || die "Symbol mangling check failed."
-sym=$($_nm -P -g $TMPEXE)
+sym=$($_nm -g $TMPEXE | grep ff_extern | cut -d ' ' -f 3)
extern_prefix=${sym%%ff_extern*}
def_extern_asm="#define EXTERN_ASM $extern_prefix"
def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
echores $extern_prefix
@@ -3347,7 +3351,7 @@ int main(void) { pthread_t tid; return pthread_create(
@@ -3205,6 +3209,7 @@ if test "$_struct_sockaddr_storage" = auto; then
#if HAVE_WINSOCK2_H
#include <winsock2.h>
#else
+#include <stdlib.h>
#include <sys/socket.h>
#endif
int main(void) { struct sockaddr_storage sas; return 0; }
@@ -3613,7 +3618,7 @@ int main(void) { pthread_t tid; return pthread_create(
EOF
_pthreads=no
if ! hpux ; then
@ -53,7 +61,7 @@ $OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
# for crosscompilation, we cannot execute the program, be happy if we can link statically
cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break
done
@@ -4666,6 +4670,8 @@ if test "$_aa" = yes ; then
@@ -4892,6 +4897,8 @@ if test "$_aa" = yes ; then
def_aa='#define CONFIG_AA 1'
if cygwin ; then
libs_mplayer="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
@ -62,7 +70,7 @@ $OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
fi
_vomodules="aa $_vomodules"
else
@@ -4911,14 +4917,14 @@ int main(void) {
@@ -5188,14 +5195,14 @@ int main(void) {
return !p_ver || p_ver[0] == 0;
}
EOF
@ -79,7 +87,7 @@ $OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
else
def_mng='#undef CONFIG_MNG'
fi
@@ -5510,6 +5516,7 @@ fi
@@ -5823,6 +5830,7 @@ fi
if test "$_jack" = yes ; then
def_jack='#define CONFIG_JACK 1'
_aomodules="jack $_aomodules"
@ -87,7 +95,7 @@ $OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
else
_noaomodules="jack $_noaomodules"
fi
@@ -5672,6 +5679,26 @@ fi
@@ -5985,6 +5993,26 @@ fi
echores "$_sunaudio"
@ -114,7 +122,7 @@ $OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
def_mlib='#define CONFIG_MLIB 0'
if sunos; then
echocheck "Sun mediaLib"
@@ -5767,7 +5794,7 @@ elif dragonfly ; then
@@ -6100,7 +6128,7 @@ elif dragonfly ; then
elif freebsd ; then
default_cdrom_device="/dev/acd0"
elif openbsd ; then
@ -123,16 +131,28 @@ $OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
elif sunos ; then
default_cdrom_device="/vol/dev/aliases/cdrom0"
# Modern Solaris versions use HAL instead of the vold daemon, the volfs
@@ -6507,7 +6534,7 @@ if test "$_libdca" = auto ; then
@@ -6169,8 +6197,9 @@ elif test "$_dvdread" = auto ; then
#include <dvdread/nav_read.h>
int main(void) { return 0; }
EOF
- _dvdreadcflags=$($_dvdreadconfig --cflags)
- _dvdreadlibs=$($_dvdreadconfig --libs)
+# OpenBSD - we do not use dvdread-config, picked up anyway without
+# _dvdreadcflags=$($_dvdreadconfig --cflags)
+# _dvdreadlibs=$($_dvdreadconfig --libs)
if cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
$_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
_dvdread=yes
@@ -6848,7 +6877,7 @@ if test "$_libdca" = auto ; then
#include <dts.h>
int main(void) { dts_init(0); return 0; }
EOF
- for _ld_dca in -ldts -ldca ; do
+ for _ld_dca in -ldca ; do
- for _ld_dca in -ldca -ldts ; do
+ for _ld_dca in -ldca; do
cc_check $_ld_dca $_ld_lm && extra_ldflags="$extra_ldflags $_ld_dca" \
&& _libdca=yes && break
done
@@ -6557,7 +6584,7 @@ int main(void) { unsigned long x, y; faacEncOpen(48000
@@ -6898,7 +6927,7 @@ int main(void) { unsigned long x, y; faacEncOpen(48000
EOF
_faac=no
for _ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
@ -141,7 +161,7 @@ $OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
done
fi
if test "$_faac" = yes ; then
@@ -7560,6 +7587,15 @@ if test "$_tv_v4l2" = auto ; then
@@ -7899,6 +7928,15 @@ if test "$_tv_v4l2" = auto ; then
int main(void) { return 0; }
EOF
cc_check && _tv_v4l2=yes
@ -157,7 +177,7 @@ $OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
fi
fi
if test "$_tv_v4l2" = yes ; then
@@ -8303,6 +8339,7 @@ SPEEX = $_speex
@@ -8637,6 +8675,7 @@ SPEEX = $_speex
STREAM_CACHE = $_stream_cache
SGIAUDIO = $_sgiaudio
SUNAUDIO = $_sunaudio
@ -165,7 +185,7 @@ $OpenBSD: patch-configure,v 1.55 2010/02/23 19:59:13 phessler Exp $
SVGA = $_svga
TDFXFB = $_tdfxfb
TDFXVID = $_tdfxvid
@@ -8677,6 +8714,7 @@ $def_ossaudio_devmixer
@@ -9026,6 +9065,7 @@ $def_ossaudio_devmixer
$def_pulse
$def_sgiaudio
$def_sunaudio

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-libao2_audio_out_c,v 1.3 2009/10/11 13:36:23 edd Exp $
--- libao2/audio_out.c.orig Mon May 4 07:53:47 2009
+++ libao2/audio_out.c Fri Jul 10 10:56:55 2009
$OpenBSD: patch-libao2_audio_out_c,v 1.4 2010/05/26 21:29:56 jakemsr Exp $
--- libao2/audio_out.c.orig Sat Feb 20 21:02:49 2010
+++ libao2/audio_out.c Mon Mar 8 14:28:42 2010
@@ -43,6 +43,7 @@ extern const ao_functions_t audio_out_alsa5;
extern const ao_functions_t audio_out_alsa;
extern const ao_functions_t audio_out_nas;
@ -9,7 +9,7 @@ $OpenBSD: patch-libao2_audio_out_c,v 1.3 2009/10/11 13:36:23 edd Exp $
extern const ao_functions_t audio_out_sun;
extern const ao_functions_t audio_out_sgi;
extern const ao_functions_t audio_out_win32;
@@ -54,6 +55,7 @@ extern const ao_functions_t audio_out_v4l2;
@@ -55,6 +56,7 @@ extern const ao_functions_t audio_out_v4l2;
extern const ao_functions_t audio_out_mpegpes;
extern const ao_functions_t audio_out_pcm;
extern const ao_functions_t audio_out_pss;
@ -17,7 +17,7 @@ $OpenBSD: patch-libao2_audio_out_c,v 1.3 2009/10/11 13:36:23 edd Exp $
const ao_functions_t* const audio_out_drivers[] =
{
@@ -82,6 +84,9 @@ const ao_functions_t* const audio_out_drivers[] =
@@ -86,6 +88,9 @@ const ao_functions_t* const audio_out_drivers[] =
#ifdef CONFIG_SGI_AUDIO
&audio_out_sgi,
#endif
@ -27,7 +27,7 @@ $OpenBSD: patch-libao2_audio_out_c,v 1.3 2009/10/11 13:36:23 edd Exp $
#ifdef CONFIG_SUN_AUDIO
&audio_out_sun,
#endif
@@ -120,6 +125,7 @@ const ao_functions_t* const audio_out_drivers[] =
@@ -124,6 +129,7 @@ const ao_functions_t* const audio_out_drivers[] =
&audio_out_null,
// should not be auto-selected:
&audio_out_pcm,

View File

@ -1,7 +1,10 @@
$OpenBSD: patch-libavcodec_Makefile,v 1.8 2009/10/11 13:36:23 edd Exp $
--- libavcodec/Makefile.orig Tue Jul 7 02:33:53 2009
+++ libavcodec/Makefile Mon Jul 20 17:53:46 2009
@@ -575,4 +575,27 @@ DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
$OpenBSD: patch-libavcodec_Makefile,v 1.9 2010/05/26 21:29:56 jakemsr Exp $
Anything requiring cabac.h will only build with -O -fomit-frame-pointer.
--- libavcodec/Makefile.orig Mon Mar 8 04:33:02 2010
+++ libavcodec/Makefile Mon Mar 22 15:20:40 2010
@@ -729,6 +729,45 @@ CLEANFILES = sin_tables.c cos_tables.c *_tables.h *_ta
include $(SUBDIR)../subdir.mak
@ -15,6 +18,14 @@ $OpenBSD: patch-libavcodec_Makefile,v 1.8 2009/10/11 13:36:23 edd Exp $
+x86/snowdsp_mmx.o: CFLAGS += -O
+h264.o: CFLAGS += -O
+h264_parser.o: CFLAGS += -O
+h264_loopfilter.o: CFLAGS += -O
+h264_direct.o: CFLAGS += -O
+h264_sei.o: CFLAGS += -O
+h264_ps.o: CFLAGS += -O
+h264_refs.o: CFLAGS += -O
+h264_cavlc.o: CFLAGS += -O
+h264_cabac.o: CFLAGS += -O
+svq3.o: CFLAGS += -O
+cabac.o: CFLAGS += -O
+endif
+x86/dsputil_mmx.o: CFLAGS += -fomit-frame-pointer
@ -25,7 +36,17 @@ $OpenBSD: patch-libavcodec_Makefile,v 1.8 2009/10/11 13:36:23 edd Exp $
+x86/snowdsp_mmx.o: CFLAGS += -fomit-frame-pointer
+h264.o: CFLAGS += -fomit-frame-pointer
+h264_parser.o: CFLAGS += -fomit-frame-pointer
+h264_loopfilter.o: CFLAGS += -fomit-frame-pointer
+h264_direct.o: CFLAGS += -fomit-frame-pointer
+h264_sei.o: CFLAGS += -fomit-frame-pointer
+h264_ps.o: CFLAGS += -fomit-frame-pointer
+h264_refs.o: CFLAGS += -fomit-frame-pointer
+h264_cavlc.o: CFLAGS += -fomit-frame-pointer
+h264_cabac.o: CFLAGS += -fomit-frame-pointer
+svq3.o: CFLAGS += -fomit-frame-pointer
+cabac.o: CFLAGS += -fomit-frame-pointer
+endif
+
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
$(SUBDIR)cos_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF)

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.3 2009/10/11 13:36:23 edd Exp $
--- libmpcodecs/ad_faad.c.orig Thu Jul 30 12:37:54 2009
+++ libmpcodecs/ad_faad.c Thu Jul 30 12:42:42 2009
$OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.4 2010/05/26 21:29:56 jakemsr Exp $
--- libmpcodecs/ad_faad.c.orig Wed Feb 17 21:36:00 2010
+++ libmpcodecs/ad_faad.c Mon Mar 8 14:37:50 2010
@@ -83,7 +83,7 @@ static int aac_probe(unsigned char *buffer, int len)
static int init(sh_audio_t *sh)
@ -10,16 +10,16 @@ $OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.3 2009/10/11 13:36:23 edd Exp $
unsigned char faac_channels;
int faac_init, pos = 0;
faac_hdec = faacDecOpen();
@@ -166,7 +166,7 @@ static int init(sh_audio_t *sh)
@@ -164,7 +164,7 @@ static int init(sh_audio_t *sh)
return 0;
} else {
mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Decoder init done (%dBytes)!\n", sh->a_in_buffer_len); // XXX: remove or move to debug!
- mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %ldHz channels: %d\n", faac_samplerate, faac_channels);
+ mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %dHz channels: %d\n", faac_samplerate, faac_channels);
sh->channels = faac_channels;
// 8 channels is aac channel order #7.
sh->channels = faac_channels == 7 ? 8 : faac_channels;
if (audio_output_channels <= 2) sh->channels = faac_channels > 1 ? 2 : 1;
sh->samplerate = faac_samplerate;
@@ -294,7 +294,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *
@@ -293,7 +293,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *
} else {
/* XXX: samples already multiplied by channels! */
mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Successfully decoded frame (%ld Bytes)!\n",

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-libswscale_Makefile,v 1.1 2009/10/11 13:36:23 edd Exp $
--- libswscale/Makefile.orig Sat Apr 18 06:52:00 2009
+++ libswscale/Makefile Mon Jul 20 17:54:49 2009
@@ -22,3 +22,10 @@ TESTPROGS = colorspace
$OpenBSD: patch-libswscale_Makefile,v 1.2 2010/05/26 21:29:56 jakemsr Exp $
--- libswscale/Makefile.orig Wed Jan 27 00:25:23 2010
+++ libswscale/Makefile Mon Mar 8 14:28:42 2010
@@ -21,3 +21,10 @@ TESTPROGS = colorspace swscale
DIRS = bfin mlib ppc sparc x86
include $(SUBDIR)../subdir.mak

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-stream_audio_in_c,v 1.1 2009/10/11 13:36:23 edd Exp $
--- stream/audio_in.c.orig Tue Jul 21 14:38:14 2009
+++ stream/audio_in.c Tue Jul 21 14:52:10 2009
@@ -36,6 +36,12 @@ int audio_in_init(audio_in_t *ai, int type)
$OpenBSD: patch-stream_audio_in_c,v 1.2 2010/05/26 21:29:56 jakemsr Exp $
--- stream/audio_in.c.orig Sat Jan 30 22:26:47 2010
+++ stream/audio_in.c Mon Mar 8 14:28:42 2010
@@ -54,6 +54,12 @@ int audio_in_init(audio_in_t *ai, int type)
ai->oss.device = strdup("/dev/dsp");
return 0;
#endif
@ -14,7 +14,7 @@ $OpenBSD: patch-stream_audio_in_c,v 1.1 2009/10/11 13:36:23 edd Exp $
default:
return -1;
}
@@ -57,6 +63,12 @@ int audio_in_setup(audio_in_t *ai)
@@ -75,6 +81,12 @@ int audio_in_setup(audio_in_t *ai)
ai->setup = 1;
return 0;
#endif
@ -27,7 +27,7 @@ $OpenBSD: patch-stream_audio_in_c,v 1.1 2009/10/11 13:36:23 edd Exp $
default:
return -1;
}
@@ -79,6 +91,13 @@ int audio_in_set_samplerate(audio_in_t *ai, int rate)
@@ -97,6 +109,13 @@ int audio_in_set_samplerate(audio_in_t *ai, int rate)
if (ai_oss_set_samplerate(ai) < 0) return -1;
return ai->samplerate;
#endif
@ -41,7 +41,7 @@ $OpenBSD: patch-stream_audio_in_c,v 1.1 2009/10/11 13:36:23 edd Exp $
default:
return -1;
}
@@ -101,6 +120,13 @@ int audio_in_set_channels(audio_in_t *ai, int channels
@@ -119,6 +138,13 @@ int audio_in_set_channels(audio_in_t *ai, int channels
if (ai_oss_set_channels(ai) < 0) return -1;
return ai->channels;
#endif
@ -55,7 +55,7 @@ $OpenBSD: patch-stream_audio_in_c,v 1.1 2009/10/11 13:36:23 edd Exp $
default:
return -1;
}
@@ -129,6 +155,12 @@ int audio_in_set_device(audio_in_t *ai, char *device)
@@ -147,6 +173,12 @@ int audio_in_set_device(audio_in_t *ai, char *device)
ai->oss.device = strdup(device);
return 0;
#endif
@ -68,7 +68,7 @@ $OpenBSD: patch-stream_audio_in_c,v 1.1 2009/10/11 13:36:23 edd Exp $
default:
return -1;
}
@@ -154,6 +186,13 @@ int audio_in_uninit(audio_in_t *ai)
@@ -172,6 +204,13 @@ int audio_in_uninit(audio_in_t *ai)
ai->setup = 0;
return 0;
#endif
@ -82,7 +82,7 @@ $OpenBSD: patch-stream_audio_in_c,v 1.1 2009/10/11 13:36:23 edd Exp $
}
}
return -1;
@@ -170,6 +209,12 @@ int audio_in_start_capture(audio_in_t *ai)
@@ -188,6 +227,12 @@ int audio_in_start_capture(audio_in_t *ai)
case AUDIO_IN_OSS:
return 0;
#endif
@ -95,7 +95,7 @@ $OpenBSD: patch-stream_audio_in_c,v 1.1 2009/10/11 13:36:23 edd Exp $
default:
return -1;
}
@@ -203,6 +248,19 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char
@@ -221,6 +266,19 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char
#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
ret = read(ai->oss.audio_fd, buffer, ai->blocksize);

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-stream_audio_in_h,v 1.1 2009/10/11 13:36:23 edd Exp $
--- stream/audio_in.h.orig Tue Jul 21 14:38:27 2009
+++ stream/audio_in.h Tue Jul 21 15:16:02 2009
@@ -3,6 +3,7 @@
$OpenBSD: patch-stream_audio_in_h,v 1.2 2010/05/26 21:29:56 jakemsr Exp $
--- stream/audio_in.h.orig Sat Jan 30 22:26:47 2010
+++ stream/audio_in.h Mon Mar 8 14:28:42 2010
@@ -21,6 +21,7 @@
#define AUDIO_IN_ALSA 1
#define AUDIO_IN_OSS 2
@ -9,7 +9,7 @@ $OpenBSD: patch-stream_audio_in_h,v 1.1 2009/10/11 13:36:23 edd Exp $
#include "config.h"
@@ -27,6 +28,16 @@ typedef struct {
@@ -45,6 +46,16 @@ typedef struct {
} ai_oss_t;
#endif
@ -26,7 +26,7 @@ $OpenBSD: patch-stream_audio_in_h,v 1.1 2009/10/11 13:36:23 edd Exp $
typedef struct
{
int type;
@@ -49,6 +60,9 @@ typedef struct
@@ -67,6 +78,9 @@ typedef struct
#ifdef CONFIG_OSS_AUDIO
ai_oss_t oss;
#endif
@ -36,7 +36,7 @@ $OpenBSD: patch-stream_audio_in_h,v 1.1 2009/10/11 13:36:23 edd Exp $
} audio_in_t;
int audio_in_init(audio_in_t *ai, int type);
@@ -70,6 +84,11 @@ int ai_alsa_xrun(audio_in_t *ai);
@@ -88,6 +102,11 @@ int ai_alsa_xrun(audio_in_t *ai);
int ai_oss_set_samplerate(audio_in_t *ai);
int ai_oss_set_channels(audio_in_t *ai);
int ai_oss_init(audio_in_t *ai);

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
--- stream/tvi_bsdbt848.c.orig Tue May 12 19:58:57 2009
+++ stream/tvi_bsdbt848.c Sat Jul 11 06:45:32 2009
@@ -37,9 +37,10 @@
$OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.3 2010/05/26 21:29:56 jakemsr Exp $
--- stream/tvi_bsdbt848.c.orig Sat Jan 30 14:26:47 2010
+++ stream/tvi_bsdbt848.c Wed May 19 15:25:37 2010
@@ -54,9 +54,10 @@
#include <signal.h>
#include <string.h>
#include <errno.h>
@ -13,7 +13,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
#include <sys/audioio.h>
#endif
@@ -51,6 +52,9 @@
@@ -68,6 +69,9 @@
#include IOCTL_BT848_H_NAME
#endif
@ -23,7 +23,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
#ifdef HAVE_SYS_SOUNDCARD_H
#include <sys/soundcard.h>
#else
@@ -60,6 +64,7 @@
@@ -77,6 +81,7 @@
#include <machine/soundcard.h>
#endif
#endif
@ -31,20 +31,47 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
#include "libaf/af_format.h"
#include "libmpcodecs/img_format.h"
@@ -89,7 +94,12 @@ typedef struct {
@@ -106,7 +111,13 @@ typedef struct {
/* Audio */
char *dspdev;
int dspready;
+#if defined(CONFIG_SNDIO_AUDIO)
+ struct sio_hdl *hdl;
+ struct sio_par spar, gpar;
+ struct sio_par par;
+ int round, appbufsz; /* sizes in bytes */
+#else
int dspfd;
+#endif
int dspsamplesize;
int dspstereo;
int dspspeed;
@@ -206,7 +216,9 @@ static tvi_handle_t *tvi_init_bsdbt848(tv_param_t* tv_
@@ -114,6 +125,9 @@ typedef struct {
int dspframesize;
int dsprate;
long long dspbytesread;
+#if defined(CONFIG_SNDIO_AUDIO)
+ long long realpos;
+#endif
/* Video */
char *btdev;
@@ -163,6 +177,15 @@ static priv_t *G_private=NULL;
static int getinput(int innumber);
+#if defined(CONFIG_SNDIO_AUDIO)
+void movecb(void *addr, int delta)
+{
+ priv_t *priv = addr;
+
+ priv->realpos += delta * priv->dspsamplesize/8 * (priv->dspstereo+1);
+}
+#endif
+
static void processframe(int signal)
{
struct timeval curtime;
@@ -223,7 +246,9 @@ static tvi_handle_t *tvi_init_bsdbt848(tv_param_t* tv_
/* set audio device name */
if (!tv_param->adevice)
@ -55,16 +82,36 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
priv->dspdev = strdup("/dev/sound");
#else
priv->dspdev = strdup("/dev/dsp");
@@ -315,12 +327,19 @@ static int control(priv_t *priv, int cmd, void *arg)
@@ -332,12 +357,39 @@ static int control(priv_t *priv, int cmd, void *arg)
{
int dspspeed = *(int *)arg;
+#if defined(CONFIG_SNDIO_AUDIO)
+ sio_initpar(&priv->spar);
+ priv->spar.rate = dspspeed;
+ if(!sio_setpar(priv->hdl, &priv->spar)) { printf("sio_setpar failed at %d\n", __LINE__); }
+ if(!sio_getpar(priv->hdl, &priv->gpar)) { printf("sio_getpar failed at %d\n", __LINE__); }
+ dspspeed = priv->gpar.rate;
+ if (!sio_stop(priv->hdl))
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, "sio_stop failed");
+ return TVI_CONTROL_FALSE;
+ }
+ sio_initpar(&priv->par);
+ priv->par.rate = dspspeed;
+ priv->par.round = 4096 / (priv->dspsamplesize/8 * (priv->dspstereo + 1));
+ if(!sio_setpar(priv->hdl, &priv->par) || !sio_getpar(priv->hdl, &priv->par))
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, "sio_[s|g]etpar failed");
+ return TVI_CONTROL_FALSE;
+ }
+ priv->round = priv->par.round * priv->par.bps * priv->par.rchan;
+ priv->appbufsz = priv->par.appbufsz * priv->par.bps * priv->par.rchan;
+ if(priv->par.rate != dspspeed)
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, "returned rate != requested rate");
+ return TVI_CONTROL_FALSE;
+ }
+ if (!sio_start(priv->hdl))
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, "sio_start failed");
+ return TVI_CONTROL_FALSE;
+ }
+#else
if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1)
{
@ -76,7 +123,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
priv->dspspeed = dspspeed;
priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/
@@ -629,12 +648,46 @@ priv->dspready = TRUE;
@@ -646,12 +698,76 @@ priv->dspready = TRUE;
priv->dspsamplesize = 16;
priv->dspstereo = 1;
priv->dspspeed = 44100;
@ -90,40 +137,70 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
+#if defined(CONFIG_SNDIO_AUDIO)
+
+if((priv->hdl = sio_open(priv->dspdev, SIO_REC, 0) == NULL))
+if((priv->hdl = sio_open(priv->dspdev, SIO_REC, 0)) == NULL)
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningDspDev, strerror(errno));
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningDspDev, "sio_open failed");
+ priv->dspready = FALSE;
+ }
+
+sio_initpar(&priv->spar);
+priv->spar.rchan = priv->dspstereo + 1;
+priv->spar.rate = priv->dspspeed;
+priv->spar.bits = priv->dspsamplesize;
+priv->spar.le = 1;
+priv->spar.sig = 1;
+sio_initpar(&priv->par);
+priv->par.rchan = priv->dspstereo + 1;
+priv->par.rate = priv->dspspeed;
+priv->par.bits = priv->dspsamplesize;
+priv->par.sig = 1;
+//priv->par.round = FRAGSIZE / (priv->dspsamplesize/8 * (priv->dspstereo + 1));
+priv->par.round = priv->dspspeed / 100; /* 10 ms */
+priv->par.appbufsz = priv->dspspeed / 4; /* 250 ms */
+
+if((priv->dspready == TRUE) &&
+ (!sio_setpar(priv->hdl, &priv->spar)))
+if(priv->dspready && (!sio_setpar(priv->hdl, &priv->par) || !sio_getpar(priv->hdl, &priv->par)))
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, strerror(errno));
+ sio_close(priv->hdl);
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, "sio_[s|g]etpar failed");
+ priv->dspready = FALSE;
+ }
+
+if(!sio_start(priv->hdl))
+priv->round = priv->par.round * priv->par.bps * priv->par.rchan;
+priv->appbufsz = priv->par.appbufsz * priv->par.bps * priv->par.rchan;
+
+if(priv->par.rchan != priv->dspstereo + 1)
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, strerror(errno));
+ sio_close(priv->hdl);
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, "returned channels != requested channels");
+ priv->dspready = FALSE;
+ }
+if (priv->par.bits != priv->dspsamplesize || priv->par.sig != 1 || priv->par.le != SIO_LE_NATIVE)
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, "returned format != requested format");
+ priv->dspready = FALSE;
+ }
+if(priv->par.rate != priv->dspspeed)
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, "returned rate != requested rate");
+ // this may be overridden later with command line options, so it's not necessarily a problem
+ //priv->dspready = FALSE;
+ }
+
+priv->realpos = 0;
+
+if(priv->dspready == TRUE)
+ {
+ sio_onmove(priv->hdl, movecb, priv);
+ if(!sio_start(priv->hdl))
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, "sio_start failed");
+ priv->dspready = FALSE;
+ }
+ }
+
+if(priv->dspready == FALSE)
+ {
+ sio_close(priv->hdl);
+ }
+
+#else
+
if((priv->dspfd = open (priv->dspdev, O_RDONLY, 0)) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningDspDev, strerror(errno));
@@ -660,6 +713,8 @@ if((priv->dspready == TRUE) &&
@@ -677,6 +793,8 @@ if((priv->dspready == TRUE) &&
priv->dspready = FALSE;
}
@ -132,7 +209,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
return 1;
}
@@ -684,7 +739,9 @@ if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0)
@@ -701,7 +819,9 @@ if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0)
return 0;
}
@ -142,7 +219,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
gettimeofday(&curtime, NULL);
@@ -723,10 +780,15 @@ if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 )
@@ -740,10 +860,15 @@ if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 )
return 0;
}
@ -160,7 +237,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
priv->btfd = -1;
priv->dspready = priv->videoready = FALSE;
@@ -806,11 +868,19 @@ gettimeofday(&curtime, NULL);
@@ -823,13 +948,21 @@ gettimeofday(&curtime, NULL);
/* Get exactly one frame of audio, which forces video sync to audio.. */
@ -174,13 +251,16 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
{
+#if defined(CONFIG_SNDIO_AUDIO)
+ ret=sio_read(priv->hdl, &buffer[bytesread], len-bytesread);
+ if(ret == 0)
+#else
ret=read(priv->dspfd, &buffer[bytesread], len-bytesread);
+#endif
-
if(ret == -1)
+#endif
{
@@ -845,13 +915,16 @@ return priv->dspbytesread * 1.0 / priv->dsprate;
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorReadingAudio, strerror(errno));
return 0;
@@ -862,13 +995,19 @@ return priv->dspbytesread * 1.0 / priv->dsprate;
static int get_audio_framesize(priv_t *priv)
{
int bytesavail;
@ -193,8 +273,11 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.2 2009/10/11 13:36:23 edd Exp $
-#ifdef CONFIG_SUN_AUDIO
+#if defined(CONFIG_SNDIO_AUDIO)
+sio_getpar(priv->hdl, &priv->gpar);
+bytesavail = priv->gpar.round * priv->gpar.bps;
+bytesavail = priv->realpos - priv->dspbytesread;
+if(bytesavail > priv->appbufsz)
+ bytesavail = priv->appbufsz;
+if(bytesavail < priv->round)
+ bytesavail = priv->round;
+#elif defined(CONFIG_SUN_AUDIO)
if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0)
{

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-stream_tvi_v4l2_c,v 1.2 2009/10/11 13:36:23 edd Exp $
--- stream/tvi_v4l2.c.orig Thu Jul 9 16:35:01 2009
+++ stream/tvi_v4l2.c Thu Jul 9 16:35:48 2009
$OpenBSD: patch-stream_tvi_v4l2_c,v 1.3 2010/05/26 21:29:56 jakemsr Exp $
--- stream/tvi_v4l2.c.orig Fri Dec 11 21:33:57 2009
+++ stream/tvi_v4l2.c Mon Mar 8 14:28:42 2010
@@ -49,8 +49,12 @@ known issues:
#ifdef HAVE_SYS_SYSINFO_H
#include <sys/sysinfo.h>
@ -13,4 +13,4 @@ $OpenBSD: patch-stream_tvi_v4l2_c,v 1.2 2009/10/11 13:36:23 edd Exp $
+#endif
#include "mp_msg.h"
#include "libmpcodecs/img_format.h"
#include "libaf/af_format.h"
#include "libmpcodecs/dec_teletext.h"

View File

@ -1,9 +1,10 @@
@comment $OpenBSD: PLIST,v 1.24 2009/10/11 13:36:23 edd Exp $
@comment $OpenBSD: PLIST,v 1.25 2010/05/26 21:29:56 jakemsr Exp $
@bin bin/mencoder
@bin bin/mplayer
@man man/man1/mencoder.1
@man man/man1/mplayer.1
share/doc/mplayer/
share/doc/mplayer/MPlayer.html
share/doc/mplayer/README.OpenBSD
share/doc/mplayer/aalib.html
share/doc/mplayer/advaudio-channels.html