New version of mplayer based upon a snapshot (20090708).

* fixes some flv playback
  * removed ggi output - broken i386/sparc64.
  * removed gui (deprecated) - use gnome-mplayer instead.
  * removed win32 codecs - opensource codecs are good quality.

OK, naddy@, sthen@
This commit is contained in:
edd 2009-10-11 13:36:23 +00:00
parent 08a9c471f8
commit b4530c988d
57 changed files with 864 additions and 1383 deletions

View File

@ -1,43 +1,42 @@
# $OpenBSD: Makefile,v 1.155 2009/09/13 18:20:55 martynas Exp $
# $OpenBSD: Makefile,v 1.156 2009/10/11 13:36:23 edd Exp $
# May not be hard to add more.
ONLY_FOR_ARCHS= amd64 i386 powerpc sparc64 arm
SUBST_VARS += PREFIX
COMMENT= movie player supporting MPEG, DivX, AVI, ASF, MOV & more
V= 1.0rc2
V= 20090708
N= mplayer
DISTNAME= MPlayer-${V}
DIST_SUBDIR= ${N}
PKGNAME= ${N}-${V}p28
DISTNAME= mplayer-export-snapshot-${V}
PKGNAME= ${N}-${V}
CATEGORIES= x11 multimedia
EXTRACT_SUFX= .tar.bz2
WRKDIST = ${WRKDIR}/mplayer-export-2009-07-08
HOMEPAGE= http://www.mplayerhq.hu/
# GPL
# GPLv2
PERMIT_PACKAGE_CDROM= patents
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c crypto m ncurses oil-0.3 pthread stdc++ util sndio z
WANTLIB= c m ncurses pthread stdc++ util sndio z
MASTER_SITES= http://www1.mplayerhq.hu/MPlayer/releases/ \
http://www2.mplayerhq.hu/MPlayer/releases/ \
http://www.mplayerhq.hu/MPlayer/releases/ \
http://ftp.lug.udel.edu/MPlayer/releases/
# The skins tarball changes on a daily basis so it is mirrored
# locally, do NOT change this.
#MASTER_SITES0= http://www2.mplayerhq.hu/MPlayer/Skin/
MASTER_SITES0= ${MASTER_SITE_BACKUP}
# snapshot
#MASTER_SITES = http://www.mplayerhq.hu/MPlayer/releases/
MASTER_SITES = http://students.dec.bmth.ac.uk/ebarrett/distfiles/
MAINTAINER= Bjorn Sandell <biorn@chalmers.se>
SKIN= default
SKINVER= 1.7
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${SKIN}-${SKINVER}${EXTRACT_SUFX}:0
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MODULES= gcc4
MODGCC4_ARCHES= powerpc
MODULES+= converters/libiconv
.include <bsd.own.mk>
@ -51,13 +50,29 @@ LIB_DEPENDS= png::graphics/png \
ogg.>=5::audio/libogg \
xvidcore::multimedia/xvidcore \
x264.>=3::multimedia/x264 \
faad.>=2::audio/faad \
dca.>=0::audio/libdca \
mp3lame:lame-*:audio/lame \
dv::multimedia/libdv
dv::multimedia/libdv \
dvdnavmini:libdvdnav->=4.1.3:multimedia/libdvdnav \
dvdread::devel/libdvdread \
fribidi::devel/fribidi \
lcms::graphics/lcms \
mng::graphics/libmng \
vorbisidec::audio/tremor \
dca::audio/libdca \
bz2::archivers/bzip2 \
schroedinger-1.0::multimedia/schroedinger \
faac::audio/faad \
faad::audio/faac
BUILD_DEPENDS= ::net/livemedia \
:rtunes->=0.8:audio/rtunes
:rtunes->=0.8:audio/rtunes \
:libxml-*:textproc/libxml \
:libxslt-*:textproc/libxslt \
::textproc/docbook \
::textproc/docbook-xsl \
::audio/tremor \
::devel/yasm \
::audio/ladspa
CONFDIR= ${SYSCONFDIR}/mplayer
SUBST_VARS= CONFDIR
@ -71,117 +86,82 @@ CONFIGURE_ARGS+=--disable-alsa \
--disable-nas \
--disable-liblzo \
--disable-caca \
--disable-vidix-internal \
--disable-vidix-external \
--enable-libdv \
--disable-vidix \
--disable-smb \
--disable-tremor-external \
--enable-tremor-internal \
--disable-faac \
--disable-select \
--enable-theora \
--enable-libdca \
--disable-langinfo \
--disable-openal \
--disable-libvorbis \
--disable-libcdio \
--disable-toolame \
--disable-dvdread-internal \
--disable-libdvdcss-internal \
--disable-faad-internal \
--disable-tremor-internal \
--enable-menu \
--enable-iconv \
--enable-cdparanoia \
--enable-x264 \
--enable-tv-v4l2 \
--with-extraincdir=${LOCALBASE}/include/libpng:${LOCALBASE}/include \
--with-extralibdir=${LOCALBASE}/lib \
--extra-libs-mplayer="$$(pkg-config --libs x264)" \
--extra-libs-mencoder="$$(pkg-config --libs x264)" \
--confdir=${CONFDIR} \
--mandir=${LOCALBASE}/man \
--disable-langinfo \
--disable-fribidi \
--disable-openal \
--disable-faad-internal \
--enable-faad-external \
--disable-libvorbis \
--disable-libcdio
--extra-cflags="-I${LOCALBASE}/include -I${LOCALBASE}/include/libpng" \
--extra-ldflags="-L${LOCALBASE}/lib" \
--disable-gui \
--disable-win32dll \
--disable-ggi
CONFIGURE_ENV+= TMPDIR="${WRKBUILD}"
.if ${MACHINE_ARCH:Mi386}
# bintools 2.15 does not do sse3 for i386/amd64
.if ${MACHINE_ARCH:Mi386} || ${MACHINE_ARCH:Mamd64}
CONFIGURE_ARGS+=--enable-runtime-cpudetection
CONFIGURE_ARGS+=--disable-ssse3
.endif
# again bintools 2.15 limits what we can do here too
.if ${MACHINE_ARCH:Mpowerpc}
CONFIGURE_ARGS+=--disable-altivec
CONFIGURE_ARGS+=--enable-runtime-cpudetection
.endif
FLAVORS= sdl ggi debug mad no_x11 aa jack
FLAVORS= sdl debug mad no_x11 aa jack
FLAVOR?=
# again old binutils...
.if ${MACHINE_ARCH:Marm}
CONFIGURE_ARGS+=--disable-mp3lib
CONFIGURE_ARGS+=--target=generic-openbsd
FLAVOR+= mad
.endif
.if ${FLAVOR:L:Mno_x11}
MODULES= converters/libiconv
. if ${FLAVOR:L:Msdl} || ${FLAVOR:L:Mggi}
ERRORS+="Fatal: nonsense combination of flavors"
. else
CONFIGURE_ARGS+=--disable-gui \
--disable-gl \
CONFIGURE_ARGS+=--disable-gl \
--disable-xv \
--disable-x11 \
--disable-fontconfig \
--disable-freetype
. endif
.else
CONFIGURE_ARGS+=--enable-gui \
--enable-gl
USE_X11= Yes
LIB_DEPENDS+= gdk-x11-2.0,gdk_pixbuf-2.0,gtk-x11-2.0::x11/gtk+2
WANTLIB+= GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext \
Xfixes Xi Xinerama Xrandr Xrender Xv Xxf86dga Xxf86vm \
atk-1.0 cairo expat fontconfig freetype gio-2.0 \
glib-2.0 glitz gmodule-2.0 gobject-2.0 pango-1.0 \
pangocairo-1.0 pangoft2-1.0 pixman-1 pthread-stubs xcb
MODULES= devel/gettext
WANTLIB+= GL X11 Xext Xinerama Xss Xv Xxf86dga Xxf86vm fontconfig \
freetype
RUN_DEPENDS+= :desktop-file-utils-*:devel/desktop-file-utils
.endif
.if ${FLAVOR:L:Msdl}
CONFIGURE_ARGS+=--enable-sdl \
--with-sdl-config=${LOCALBASE}/bin/sdl-config
CONFIGURE_ARGS+=--with-sdl-config=${LOCALBASE}/bin/sdl-config
LIB_DEPENDS+= SDL:sdl->=1.2.5:devel/sdl
.else
CONFIGURE_ARGS+=--disable-sdl
.endif
.if ${FLAVOR:L:Mggi}
CONFIGURE_ARGS+=--enable-ggi
LIB_DEPENDS+= ggi::graphics/ggi
.else
CONFIGURE_ARGS+=--disable-ggi
.endif
.if ${FLAVOR:L:Mdebug}
CONFIGURE_ARGS+=--enable-debug=3
.endif
.if ${FLAVOR:L:Mmad}
CONFIGURE_ARGS+=--enable-mad
LIB_DEPENDS+= mad.>=2::audio/libmad
.else
CONFIGURE_ARGS+=--disable-mad
.endif
.if ${MACHINE_ARCH:Mi386}
CONFIGURE_ARGS+=--win32codecsdir=${LOCALBASE}/lib/win32 \
--enable-qtx \
--realcodecsdir=${LOCALBASE}/lib/win32
.else
CONFIGURE_ARGS+=--disable-win32dll \
--disable-qtx \
--disable-real
.endif
.if ${FLAVOR:L:Maa}
CONFIGURE_ARGS+=--enable-aa
.if ${FLAVOR:L:Mno_x11}
LIB_DEPENDS+= aa.>=1.3:aalib-*-no_x11:graphics/aalib,no_x11
.else
@ -192,7 +172,6 @@ CONFIGURE_ARGS+=--disable-aa
.endif
.if ${FLAVOR:L:Mjack}
CONFIGURE_ARGS+=--enable-jack
LIB_DEPENDS+= jack::audio/jack
.else
CONFIGURE_ARGS+=--disable-jack
@ -200,18 +179,27 @@ CONFIGURE_ARGS+=--disable-jack
NO_REGRESS= Yes
# 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_libsndio.c ${WRKSRC}/libao2
@cp ${FILESDIR}/ao_rtunes.c ${FILESDIR}/ao_sndio.c ${WRKSRC}/libao2
@cp ${FILESDIR}/ai_sndio.c ${WRKSRC}/stream
post-build:
@cd ${WRKSRC}/DOCS/xml && ${MAKE_PROGRAM}
DOCDIR = ${PREFIX}/share/doc/mplayer
EXAMPLEDIR = ${PREFIX}/share/examples/mplayer
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mplayer
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mplayer
${INSTALL_DATA_DIR} ${PREFIX}/share/mplayer/skins/${SKIN}
${INSTALL_DATA} ${WRKDIR}/${SKIN}/* ${PREFIX}/share/mplayer/skins/${SKIN}
${INSTALL_DATA_DIR} ${DOCDIR}
${INSTALL_DATA_DIR} ${EXAMPLEDIR}
cd ${WRKDIST}/etc; ${INSTALL_DATA} input.conf menu.conf codecs.conf \
${PREFIX}/share/examples/mplayer
${INSTALL_DATA} ${WRKDIST}/etc/example.conf \
${PREFIX}/share/examples/mplayer/mplayer.conf
${INSTALL_DATA} ${WRKDIST}/DOCS/HTML/en/*.html ${PREFIX}/share/doc/mplayer
${EXAMPLEDIR}
${INSTALL_DATA} ${WRKDIST}/etc/example.conf ${EXAMPLEDIR}/mplayer.conf
${INSTALL_DATA} ${WRKDIST}/DOCS/HTML/en/*.html ${DOCDIR}
${INSTALL_DATA} ${FILESDIR}/README.OpenBSD ${DOCDIR}
.include <bsd.port.mk>

View File

@ -1,10 +1,5 @@
MD5 (mplayer/MPlayer-1.0rc2.tar.bz2) = fiflNcLSZ2N980iY8bkXBw==
MD5 (mplayer/default-1.7.tar.bz2) = fh0WwvijJGn0NUywQ+7MXQ==
RMD160 (mplayer/MPlayer-1.0rc2.tar.bz2) = O1y6FSmFahd6UZHiL43MALWoPFI=
RMD160 (mplayer/default-1.7.tar.bz2) = X3j/nbKW2P1T72YD7IoifutgLdE=
SHA1 (mplayer/MPlayer-1.0rc2.tar.bz2) = 6bSW81J8VSAE7G0B1rQ/GWtDzi0=
SHA1 (mplayer/default-1.7.tar.bz2) = aRLD5YtMdvrZf9tylFsngVBp9+M=
SHA256 (mplayer/MPlayer-1.0rc2.tar.bz2) = OHW3zIXo59+BwCpjjba0qXDR5mqG2tbr8podGfOPWVM=
SHA256 (mplayer/default-1.7.tar.bz2) = qZkLpTTMqUwad0dF2eMUiRn3kAOmgz/8x4N3HM3gulM=
SIZE (mplayer/MPlayer-1.0rc2.tar.bz2) = 9338201
SIZE (mplayer/default-1.7.tar.bz2) = 173439
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

View File

@ -0,0 +1,32 @@
Possible issues with using MPlayer on OpenBSD:
all arches:
MPlayer might fail due to lack of shared memory, e.g. when using gui
mode under KDE. Starting with OpenBSD 3.3, sysctl(8) can modify the
shared memory parameters. In particular kern.shminfo.shmall might need
to be raised, e.g.
# sysctl kern.shminfo.shmall=32768
The GUI is deprecated so we stripped it from the build. You can use
x11/gnome-mplayer instead.
i386:
win32 codecs were disabled in OpenBSD's build, as the open-source codecs
are now of decent quality.
Also note that MPlayer may sometimes fail to play a file (particularly
WMV files) unless machdep.userldt sysctl is enabled.
arm:
You may encounter slow video output. In this case you can disable
the X.Org screen rotation in /etc/X11/xorg.conf. Depending on the
video you are playing you may want to pass the -framedrop or the
-hardframedrop option to mplayer.
The internal mp3lib (mpg123) is disabled because it relies on the
FPU. Instead of using mp3lib the mad flavor is enabled by default.
If you want to use libmad as an audio decoder please pass the
'-ac mad' option to mplayer.
See the package description for a list of FLAVORs and their meaning.

View File

@ -0,0 +1,50 @@
#include <stdio.h>
#include <stdlib.h>
#include "config.h"
#include <sndio.h>
#include "audio_in.h"
#include "mp_msg.h"
#include "help_mp.h"
int ai_sndio_setup(audio_in_t *ai)
{
struct sio_par par;
sio_initpar(&par);
par.bits = 16;
par.sig = 1;
par.le = 1;
par.rchan = ai->req_channels;
par.rate = ai->req_samplerate;
par.appbufsz = ai->req_samplerate; /* 1 sec */
if (!sio_setpar(ai->sndio.hdl, &par) || !sio_getpar(ai->sndio.hdl, &par)) {
mp_msg(MSGT_TV, MSGL_ERR, "could not configure sndio audio");
return -1;
}
ai->channels = par.rchan;
ai->samplerate = par.rate;
ai->samplesize = par.bits;
ai->bytes_per_sample = par.bps;
ai->blocksize = par.round * par.bps;
return 0;
}
int ai_sndio_init(audio_in_t *ai)
{
int err;
if ((ai->sndio.hdl = sio_open(ai->sndio.device, SIO_REC, 0)) == NULL) {
mp_msg(MSGT_TV, MSGL_ERR, "could not open sndio audio");
return -1;
}
err = ai_sndio_setup(ai);
return err;
}

View File

@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include "bswap.h"
#include "libavutil/bswap.h"
#include "subopt-helper.h"
#include "libaf/af_format.h"
#include "audio_out.h"

View File

@ -30,13 +30,13 @@
#include "audio_out_internal.h"
static ao_info_t info = {
"libsndio audio output",
"sndio audio output",
"sndio",
"Alexandre Ratchov <alex@caoua.org>",
""
};
LIBAO_EXTERN(libsndio)
LIBAO_EXTERN(sndio)
static struct sio_hdl *hdl = NULL;
static struct sio_par par;
@ -70,7 +70,7 @@ static int init(int rate, int channels, int format, int flags)
hdl = sio_open(NULL, SIO_PLAY, 0);
if (hdl == NULL) {
mp_msg(MSGT_AO, MSGL_ERR, "ao2: can't open libsndio\n");
mp_msg(MSGT_AO, MSGL_ERR, "ao2: can't open sndio\n");
return 0;
}

View File

@ -1,30 +1,26 @@
$OpenBSD: patch-DOCS_man_en_mplayer_1,v 1.1 2009/02/08 20:25:09 naddy Exp $
--- DOCS/man/en/mplayer.1.orig Sun Feb 8 19:50:39 2009
+++ DOCS/man/en/mplayer.1 Sun Feb 8 19:51:38 2009
@@ -1177,7 +1177,7 @@ May be negative.
$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.
.
.TP
.B \-cdrom-device <path to device>
.B \-cdrom\-device <path to device>
-Specify the CD-ROM device (default: /dev/\:cdrom).
+Specify the CD-ROM device (default: /dev/rcd0c).
.
.TP
.B \-channels <number> (also see \-af channels)
@@ -1300,7 +1300,7 @@ frequency before giving up (default: 30).
.
.TP
.B \-dvd-device <path to device> (DVD only)
-Specify the DVD device (default: /dev/\:dvd).
+Specify the DVD device (default: /dev/rcd0c).
You can also specify a directory that contains files previously copied directly
from a DVD (with e.g.\& vobcopy).
Note that using \-dumpstream is usually a better way to
@@ -10519,7 +10519,7 @@ mplayer dvd://1 \-dvdangle 2
@@ -11207,11 +11207,11 @@ mplayer \-vo zr2 \-vf scale=352:288,zrmjpeg file.avi
.PP
.B Play from a different DVD device:
.B Play DTS-CD with passthrough:
.nf
-mplayer dvd://1 \-dvd-device /dev/\:dvd2
+mplayer dvd://1 \-dvd-device /dev/rcd1c
-mplayer \-ac hwdts \-rawaudio format=0x2001 \-cdrom\-device /dev/cdrom cdda://
+mplayer \-ac hwdts \-rawaudio format=0x2001 \-cdrom\-device /dev/rcd0c cdda://
.fi
.br
You can also use \-afm hwac3 instead of \-ac hwdts.
-Adjust '/dev/cdrom' to match the CD-ROM device on your system.
+Adjust '/dev/rcd0c' to match the CD-ROM device on your system.
If your external receiver supports decoding raw DTS streams,
you can directly play it via cdda:// without setting format, hwac3 or hwdts.
.
.PP

View File

@ -0,0 +1,39 @@
$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
@@ -18,7 +18,8 @@ for _try_catalog in \
/usr/lib/sgml/catalog \
/usr/local/lib/sgml/catalog \
/usr/share/docbook-xml42/catalog.xml \
- /usr/share/sgml/docbook/xmlcatalog
+ /usr/share/sgml/docbook/xmlcatalog \
+ ${PREFIX}/share/sgml/catalog
do
if test -f "$_try_catalog"
then
@@ -49,6 +50,7 @@ for _try_chunk_xsl in \
/usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \
/usr/share/xml/docbook/stylesheet/nwalsh/current/html/chunk.xsl \
/opt/local/share/xsl/docbook-xsl/html/chunk.xsl \
+ ${PREFIX}/share/xsl/docbook/html/chunk.xsl
do
if test -f "$_try_chunk_xsl"
@@ -78,6 +80,7 @@ for _try_docbook_xsl in \
/usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \
/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl \
/opt/local/share/xsl/docbook-xsl/html/docbook.xsl \
+ ${PREFIX}/share/xsl/docbook/html/docbook.xsl
do
if test -f "$_try_docbook_xsl"
@@ -135,7 +138,8 @@ for _try_dtd in \
/usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \
/usr/share/docbook-xml*/docbookx.dtd \
/opt/local/share/xml/docbook*/*/docbookx.dtd \
- /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd
+ /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd \
+ ${PREFIX}/share/xml/docbook/*/docbookx.dtd
do
if test -f "$_try_dtd"
then

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-DOCS_xml_en_cd-dvd_xml,v 1.1 2009/10/11 13:36:23 edd Exp $
--- DOCS/xml/en/cd-dvd.xml.orig Mon Jul 13 19:08:41 2009
+++ DOCS/xml/en/cd-dvd.xml Mon Jul 13 19:10:04 2009
@@ -202,8 +202,8 @@ For the complete list of available options, please rea
Syntax for a standard Video CD (VCD) is as follows:
<screen>mplayer vcd://<replaceable>&lt;track&gt;</replaceable> [-cdrom-device <replaceable>&lt;device&gt;</replaceable>]</screen>
Example:
-<screen>mplayer vcd://2 -cdrom-device /dev/hdc</screen>
-The default VCD device is <filename>/dev/cdrom</filename>. If your setup
+<screen>mplayer vcd://2 -cdrom-device /dev/rcd1c</screen>
+The default VCD device is <filename>/dev/rcd0c</filename>. If your setup
differs, make a symlink or specify the correct device on the command line
with the <option>-cdrom-device</option> option.
</para>

View File

@ -1,12 +1,55 @@
$OpenBSD: patch-Makefile,v 1.18 2008/07/09 02:19:36 jakemsr Exp $
--- Makefile.orig Sun Oct 7 12:49:33 2007
+++ Makefile Sat Jun 28 14:12:25 2008
@@ -88,7 +88,7 @@ ALL_PRG-$(MPLAYER) += mplayer$(EXESUF)
ALL_PRG-$(MENCODER) += mencoder$(EXESUF)
$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) \
SRCS_AUDIO_INPUT-$(ALSA1X) += stream/ai_alsa1x.c
SRCS_AUDIO_INPUT-$(ALSA9) += stream/ai_alsa.c
SRCS_AUDIO_INPUT-$(OSS) += stream/ai_oss.c
+SRCS_AUDIO_INPUT-$(SNDIO) += stream/ai_sndio.c
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
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
+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
@@ -677,7 +680,8 @@ SRCS_MPLAYER = command.c \
libvo/video_out.c \
libvo/vo_mpegpes.c \
libvo/vo_null.c \
- $(SRCS_MPLAYER-yes)
+ $(SRCS_MPLAYER-yes) \
+ libao2/ao_rtunes.c
SRCS_MENCODER-$(FAAC) += libmpcodecs/ae_faac.c
@@ -888,7 +892,16 @@ loader/%: CFLAGS += -Iloader -fno-omit-frame-pointer $
#loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN)
-mp3lib/decode_i586%: CFLAGS += -fomit-frame-pointer
+ifdef ARCH_X86_32
+ifeq (,$(findstring -O,$(CFLAGS)))
+mp3lib/decode_i586.o: CFLAGS += -O
+mp3lib/dct64_sse.o: CFLAGS += -O
+liba52/imdct.o: CFLAGS += -O
+endif
+mp3lib/decode_i586.o: CFLAGS += -fomit-frame-pointer
+mp3lib/dct64_sse.o: CFLAGS += -fomit-frame-pointer
+liba52/imdct.o: CFLAGS += -fomit-frame-pointer
+endif
stream/stream_dvdnav%: CFLAGS := $(CFLAGS_LIBDVDNAV) $(CFLAGS)
COMMON_LIBS += $(COMMON_LIBS-yes)
-LIBS_MPLAYER += $(LIBS_MPLAYER-yes)
+LIBS_MPLAYER += $(LIBS_MPLAYER-yes) -lrtunes -lcrypto
OBJS_MPLAYER += $(OBJS_MPLAYER-yes)
PARTS += $(PARTS-yes)
ALL_PRG += $(ALL_PRG-yes)

View File

@ -0,0 +1,12 @@
$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)
case MP_CMD_RUN:
#ifndef __MINGW32__
if (!fork()) {
- execl("/bin/sh", "sh", "-c", cmd->args[0].v.s, NULL);
+ execl("/bin/sh", "sh", "-c", cmd->args[0].v.s, (char *)NULL);
exit(0);
}
#endif

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-common_mak,v 1.2 2008/07/09 02:19:36 jakemsr Exp $
--- common.mak.orig Sun Oct 7 12:49:33 2007
+++ common.mak Sat Jun 28 14:11:44 2008
@@ -10,9 +10,17 @@ OBJS += $(OBJS-yes)
ASM_OBJS += $(ASM_OBJS-yes)
CPP_OBJS += $(CPP_OBJS-yes)
-CFLAGS += -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
+CFLAGS := -DHAVE_AV_CONFIG_H \
-D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) \
- -I$(SRC_PATH)/libavutil $(OPTFLAGS)
+ -I$(SRC_PATH)/libavutil $(CFLAGS)
+
+ifeq ($(ARCH_X86),yes)
+CFLAGS += -fomit-frame-pointer
+endif
+
+#CFLAGS := $(subst -O3,-O,$(CFLAGS))
+#CFLAGS := $(subst -O2,-O,$(CFLAGS))
+#CFLAGS := $(subst -O1,-O,$(CFLAGS))
SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPPOBJS:.o=.cpp)
OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS)

View File

@ -1,209 +1,166 @@
$OpenBSD: patch-configure,v 1.52 2009/07/14 19:43:07 naddy Exp $
--- configure.orig Sun Oct 7 21:49:33 2007
+++ configure Mon Jul 13 23:49:43 2009
@@ -76,7 +76,7 @@ cc_check() {
}
cxx_check() {
- compile_check $TMPCPP $@ -lstdc++
+ compile_check $TMPCPP $@ -lstdc++ -lm
}
tmp_run() {
@@ -397,6 +397,7 @@ Audio output:
$OpenBSD: patch-configure,v 1.53 2009/10/11 13:36:23 edd Exp $
--- configure.orig Thu Jun 25 00:31:17 2009
+++ configure Thu Aug 27 18:05:38 2009
@@ -420,6 +420,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-libsndio disable libsndio audio output [autodetect]
+ --disable-sndio disable sndio audio output [autodetect]
--disable-dart disable DART audio output [autodetect]
--disable-win32waveout disable Windows waveout audio output [autodetect]
--disable-select disable using select() on the audio device [enable]
@@ -501,7 +502,7 @@ _libavcodec_a=auto
_libamr_nb=auto
_libamr_wb=auto
_libavdecoders_all=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
-_libavdecoders=` echo $_libavdecoders_all | sed -e s/LIBFAAD_DECODER// -e s/MPEG4AAC_DECODER// -e s/LIBA52_DECODER// -e s/LIBGSM_DECODER// -e s/LIBGSM_MS_DECODER// -e s/LIBVORBIS_DECODER// `
+_libavdecoders=` echo $_libavdecoders_all | sed -e s/LIBFAAD_DECODER// -e s/MPEG4AAC_DECODER// -e s/LIBA52_DECODER// -e s/LIBGSM_DECODER// -e s/LIBGSM_MS_DECODER// -e s/LIBVORBIS_DECODER// -e s/VORBIS_DECODER// `
_libavencoders_all=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
_libavencoders=` echo $_libavencoders_all | sed -e s/LIBGSM_ENCODER// -e s/LIBGSM_MS_ENCODER// -e s/LIBTHEORA_ENCODER// `
_libavparsers_all=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
@@ -598,6 +599,7 @@ _xf86keysym=auto
--disable-coreaudio disable CoreAudio audio output [autodetect]
@@ -651,6 +652,7 @@ _xf86keysym=auto
_mlib=no #broken, thus disabled
_sgiaudio=auto
_sunaudio=auto
+_libsndio=auto
+_sndio=auto
_alsa=auto
_fastmemcpy=yes
_unrarlib=yes
@@ -963,6 +965,8 @@ for ac_option do
_unrar_exec=auto
@@ -1075,6 +1077,8 @@ for ac_option do
--disable-mlib) _mlib=no ;;
--enable-sunaudio) _sunaudio=yes ;;
--disable-sunaudio) _sunaudio=no ;;
+ --enable-libsndio) _libsndio=yes ;;
+ --disable-libsndio) _libsndio=no ;;
+ --enable-sndio) _sndio=yes ;;
+ --disable-sndio) _sndio=no ;;
--enable-sgiaudio) _sgiaudio=yes ;;
--disable-sgiaudio) _sgiaudio=no ;;
--enable-alsa) _alsa=yes ;;
@@ -1557,6 +1561,8 @@ if x86 ; then
pparam=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
-e s/xmm/sse/ -e s/kni/sse/`
+ if x86_64 ; then pparam="3dnow 3dnowext mmx mmxext xmm sse sse2" ; fi
+
for ext in $pparam ; do
eval test \"\$_$ext\" = auto 2>/dev/null && eval _$ext=kernel_check
done
@@ -2323,7 +2329,7 @@ fi # if darwin && test "$cc_vendor" = "gnu" ; then
# Checking for CFLAGS
_install_strip="-s"
if test "$_profile" != "" || test "$_debug" != "" ; then
- CFLAGS="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
+ CFLAGS="-W -Wall -O1 $_march $_mcpu $_pipe $_debug $_profile"
_install_strip=
elif test -z "$CFLAGS" ; then
if test "$cc_vendor" = "intel" ; then
@@ -3065,7 +3071,7 @@ int main(void) { pthread_t tid; return pthread_create
@@ -2374,7 +2378,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_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
echores $extern_prefix
@@ -3347,7 +3351,7 @@ int main(void) { pthread_t tid; return pthread_create(
EOF
_pthreads=no
if not hpux ; then
if ! hpux ; then
- for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
+ for _ld_tmp in "-lpthreadGC2" "" "-pthread" "-lpthread" ; do
# for crosscompilation, we cannot execute the program, be happy if we can link statically
cc_check $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break
cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break
done
@@ -3108,7 +3114,7 @@ fi
echores "$_rpath"
echocheck "iconv"
-if test "$_iconv" = auto ; then
+if test "$_iconv" != no ; then
cat > $TMPC << EOF
#include <stdio.h>
#include <unistd.h>
@@ -4369,6 +4375,8 @@ if test "$_aa" = yes ; then
_def_aa='#define HAVE_AA 1'
@@ -4666,6 +4670,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`"
libs_mplayer="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
+ else
+ _libs_mplayer="$_libs_mplayer -laa"
+ libs_mplayer="$libs_mplayer $(aalib-config --libs)"
fi
_vosrc="$_vosrc vo_aa.c"
_vomodules="aa $_vomodules"
@@ -4576,7 +4584,7 @@ fi
echores "$_png"
if test "$_png" = yes ; then
_def_png='#define HAVE_PNG 1'
- _ld_extra="$_ld_extra -lpng -lz"
+ _ld_extra="$_ld_extra -lpng -lz $_ld_lm"
_vosrc="$_vosrc vo_png.c"
_vomodules="png $_vomodules"
else
@@ -5129,7 +5137,8 @@ fi
echocheck "JACK"
if test "$_jack" = auto ; then
_jack=yes
-
+fi
+if test "$_jack" = yes ; then
cat > $TMPC << EOF
#include <jack/jack.h>
int main(void) { jack_client_new("test"); return 0; }
@@ -5303,6 +5312,27 @@ fi
@@ -4911,14 +4917,14 @@ int main(void) {
return !p_ver || p_ver[0] == 0;
}
EOF
- if cc_check -lmng -lz $_ld_lm ; then
+ if cc_check -lmng -llcms -ljpeg -lz -lm $_ld_lm ; then
_mng=yes
fi
fi
echores "$_mng"
if test "$_mng" = yes ; then
def_mng='#define CONFIG_MNG 1'
- extra_ldflags="$extra_ldflags -lmng -lz"
+ extra_ldflags="$extra_ldflags -lmng -llcms -ljpeg -lz -lm"
else
def_mng='#undef CONFIG_MNG'
fi
@@ -5510,6 +5516,7 @@ fi
if test "$_jack" = yes ; then
def_jack='#define CONFIG_JACK 1'
_aomodules="jack $_aomodules"
+ libs_mplayer="$libs_mplayer $(pkg-config --libs jack)"
else
_noaomodules="jack $_noaomodules"
fi
@@ -5672,6 +5679,26 @@ fi
echores "$_sunaudio"
+echocheck "libsndio audio"
+if test "$_libsndio" = auto ; then
+echocheck "sndio audio"
+if test "$_sndio" = auto ; then
+ cat > $TMPC << EOF
+#include <sndio.h>
+int main(void) { struct sio_par par; sio_initpar(&par); return 0; }
+EOF
+ _libsndio=no
+ cc_check -lsndio && _libsndio=yes
+ _sndio=no
+ cc_check -lsndio && _sndio=yes
+fi
+if test "$_libsndio" = yes ; then
+ _def_libsndio='#define USE_LIBSNDIO_AUDIO 1'
+ _aosrc="$_aosrc ao_libsndio.c"
+ _aomodules="libsndio $_aomodules"
+ _libs_mplayer="$_libs_mplayer -lsndio"
+if test "$_sndio" = yes ; then
+ def_sndio='#define CONFIG_SNDIO_AUDIO 1'
+ _aomodules="sndio $_aomodules"
+ extra_ldflags="$extra_ldflags -lsndio"
+else
+ _def_libsndio='#undef USE_LIBSNDIO_AUDIO'
+ _noaomodules="libsndio $_noaomodules"
+ def_sndio='#undef CONFIG_SNDIO_AUDIO'
+ _noaomodules="sndio $_noaomodules"
+fi
+echores "$_libsndio"
+echores "$_sndio"
+
+
def_mlib='#define CONFIG_MLIB 0'
if sunos; then
echocheck "Sun mediaLib"
if test "$_mlib" = auto ; then
@@ -5343,7 +5373,7 @@ fi #if irix
echocheck "VCD support"
-if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32; then
+if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32 || openbsd ; then
_inputmodules="vcd $_inputmodules"
_def_vcd='#define HAVE_VCD 1'
_vcd="yes"
@@ -5592,7 +5622,7 @@ int main()
}
EOF
_fontconfig=no
- for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
+ for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz $_ld_lm" ; do
_ld_tmp="-lfontconfig $_ld_tmp"
cc_check $_ld_tmp && _fontconfig=yes && _ld_extra="$_ld_extra $_ld_tmp" && break
done
@@ -5704,10 +5734,10 @@ cat > $TMPC << EOF
int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
EOF
_zlib=no
-cc_check -lz && _zlib=yes
+cc_check "-lz $_ld_lm" && _zlib=yes
if test "$_zlib" = yes ; then
_def_zlib='#define HAVE_ZLIB 1'
- _ld_extra="$_ld_extra -lz"
+ _ld_extra="$_ld_extra -lz $_ld_lm"
else
_def_zlib='#undef HAVE_ZLIB'
_libavdecoders=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
@@ -5986,11 +6016,11 @@ if test "$_libdca" = auto ; then
@@ -5767,7 +5794,7 @@ elif dragonfly ; then
elif freebsd ; then
default_cdrom_device="/dev/acd0"
elif openbsd ; then
- default_cdrom_device="/dev/rcd0a"
+ default_cdrom_device="/dev/rcd0c"
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
#include <dts.h>
int main(void) { dts_init (0); return 0; }
int main(void) { dts_init(0); return 0; }
EOF
- cc_check -ldts $_ld_lm && _libdca=yes
+ cc_check -ldca $_ld_lm && _libdca=yes
- for _ld_dca in -ldts -ldca ; 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
EOF
_faac=no
for _ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
- cc_check -O4 $_ld_faac $_ld_lm && libs_mencoder="$libs_mencoder $_ld_faac" && _faac=yes && break
+ cc_check $_ld_faac $_ld_lm && libs_mencoder="$libs_mencoder $_ld_faac" && _faac=yes && break
done
fi
if test "$_libdca" = yes ; then
_def_libdca='#define USE_LIBDCA 1'
- _ld_extra="$_ld_extra -ldts"
+ _ld_extra="$_ld_extra -ldca"
_codecmodules="libdca $_codecmodules"
else
_def_libdca='#undef USE_LIBDCA'
@@ -6207,7 +6237,7 @@ if test "$_real" = auto ; then
_real=no
_res_comment="dynamic loader support needed"
if test "$_dl" = yes || test "$_win32dll" = yes &&
- (linux || freebsd || netbsd || win32 || darwin) ; then
+ (linux || freebsd || netbsd || openbsd || win32 || darwin) ; then
_real=yes
if test "$_faac" = yes ; then
@@ -7560,6 +7587,15 @@ if test "$_tv_v4l2" = auto ; then
int main(void) { return 0; }
EOF
cc_check && _tv_v4l2=yes
+ else
+ cat > $TMPC <<EOF
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/videoio.h>
+int main(void) { return 0; }
+EOF
+ cc_check && _tv_v4l2=yes
fi
fi
@@ -8151,6 +8181,7 @@ $_def_openal_h
$_def_sys_asoundlib_h
$_def_alsa_asoundlib_h
$_def_sunaudio
+$_def_libsndio
$_def_sgiaudio
$_def_win32waveout
$_def_nas
@@ -8240,7 +8271,7 @@ $_def_vcd
#define DEFAULT_CDROM_DEVICE "/dev/disk1"
#define DEFAULT_DVD_DEVICE "/dev/rdiskN"
#elif defined(__OpenBSD__)
-#define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
+#define DEFAULT_CDROM_DEVICE "/dev/rcd0c"
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#define DEFAULT_CDROM_DEVICE "/dev/acd0"
if test "$_tv_v4l2" = yes ; then
@@ -8303,6 +8339,7 @@ SPEEX = $_speex
STREAM_CACHE = $_stream_cache
SGIAUDIO = $_sgiaudio
SUNAUDIO = $_sunaudio
+SNDIO = $_sndio
SVGA = $_svga
TDFXFB = $_tdfxfb
TDFXVID = $_tdfxvid
@@ -8677,6 +8714,7 @@ $def_ossaudio_devmixer
$def_pulse
$def_sgiaudio
$def_sunaudio
+$def_sndio
$def_win32waveout
$def_ladspa

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-dvdread_Makefile,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
--- dvdread/Makefile.orig Mon Jan 21 15:04:18 2008
+++ dvdread/Makefile Mon Jan 21 15:04:41 2008
@@ -12,8 +12,8 @@ SRCS_COMMON = cmd_print.c \
nav_print.c \
nav_read.c \
-CFLAGS = -D__USE_UNIX98 -D_GNU_SOURCE
-
CFLAGS-$(DVDCSS_INTERNAL) += -I../libdvdcss -DHAVE_DVDCSS_DVDCSS_H
include ../mpcommon.mak
+
+CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-gui_wm_ws_c,v 1.1 2009/09/13 18:20:55 martynas Exp $
--- gui/wm/ws.c.orig Sun Oct 7 13:49:27 2007
+++ gui/wm/ws.c Sun Sep 13 12:39:53 2009
@@ -1157,6 +1157,7 @@ void wsCreateImage( wsTWindow * win,int Width,int Heig
win->xImage->data=win->Shminfo.shmaddr;
win->Shminfo.readOnly=0;
XShmAttach( wsDisplay,&win->Shminfo );
+ XSync(wsDisplay, False);
shmctl( win->Shminfo.shmid,IPC_RMID,0 );
}
else

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-libao2_Makefile,v 1.1 2008/02/12 11:33:16 jakemsr Exp $
--- libao2/Makefile.orig Sun Oct 7 12:49:27 2007
+++ libao2/Makefile Sun Feb 10 17:05:17 2008
@@ -6,6 +6,7 @@ SRCS_MPLAYER = audio_out.c \
ao_mpegpes.c \
ao_null.c \
ao_pcm.c \
+ ao_rtunes.c \
$(AO_SRCS) \
include ../mpcommon.mak

View File

@ -1,139 +0,0 @@
$OpenBSD: patch-libao2_ao_sun_c,v 1.4 2008/02/08 17:32:41 jakemsr Exp $
--- libao2/ao_sun.c.orig Sun Oct 7 12:49:27 2007
+++ libao2/ao_sun.c Mon Feb 4 05:07:06 2008
@@ -102,6 +102,7 @@ static int af2sunfmt(int format)
// sample counter information
static int realtime_samplecounter_available(char *dev)
{
+#ifdef __svr4__
int fd = -1;
audio_info_t info;
int rtsc_ok = RTSC_DISABLED;
@@ -217,6 +218,9 @@ error:
}
return rtsc_ok;
+#else
+ return RTSC_DISABLED;
+#endif
}
@@ -440,7 +444,7 @@ static int control(int cmd,void *arg){
else
info.play.balance = (vol->right - vol->left + volume) * AUDIO_RIGHT_BALANCE / (2*volume);
}
-#if !defined (__OpenBSD__) && !defined (__NetBSD__)
+#if !defined (__NetBSD__)
info.output_muted = (volume == 0);
#endif
ioctl( fd,AUDIO_SETINFO,&info );
@@ -566,11 +570,20 @@ static int init(int rate,int channels,int format,int f
ao_data.bps = byte_per_sec = bytes_per_sample * ao_data.samplerate;
ao_data.outburst = byte_per_sec > 100000 ? 16384 : 8192;
+#if defined(__OpenBSD__) || defined(__NetBSD__)
AUDIO_INITINFO(&info);
+ info.blocksize = ao_data.outburst;
+ ioctl (audio_fd, AUDIO_SETINFO, &info);
+#endif
+#ifdef __svr4__
+ AUDIO_INITINFO(&info);
info.play.samples = 0;
info.play.eof = 0;
info.play.error = 0;
ioctl (audio_fd, AUDIO_SETINFO, &info);
+#else
+ ioctl (audio_fd, AUDIO_FLUSH);
+#endif
queued_bursts = 0;
queued_samples = 0;
@@ -607,9 +620,11 @@ static void reset(void){
: AUDIO_PRECISION_8);
info.play.channels = ao_data.channels;
info.play.sample_rate = ao_data.samplerate;
+#ifdef __svr4__
info.play.samples = 0;
info.play.eof = 0;
info.play.error = 0;
+#endif
ioctl (audio_fd, AUDIO_SETINFO, &info);
queued_bursts = 0;
queued_samples = 0;
@@ -636,7 +651,11 @@ static void audio_resume(void)
// return: how many bytes can be played without blocking
static int get_space(void){
+#if defined(__OpenBSD__)
+ audio_bufinfo_t ab;
+#else
audio_info_t info;
+#endif
// check buffer
#ifdef HAVE_AUDIO_SELECT
@@ -651,14 +670,22 @@ static int get_space(void){
}
#endif
+#if defined(__OpenBSD__)
+ ioctl(audio_fd, AUDIO_GETPRINFO, &ab);
+ if (ab.hiwat * ab.blksize - ab.seek < ao_data.outburst)
+ return 0;
+ else
+ return ao_data.outburst;
+#else
ioctl(audio_fd, AUDIO_GETINFO, &info);
-#if !defined (__OpenBSD__) && !defined(__NetBSD__)
+#if !defined(__NetBSD__)
if (queued_bursts - info.play.eof > 2)
return 0;
return ao_data.outburst;
#else
return info.hiwat * info.blocksize - info.play.seek;
#endif
+#endif // __OpenBSD__
}
@@ -666,6 +693,16 @@ static int get_space(void){
// it should round it down to outburst*n
// return: number of bytes played
static int play(void* data,int len,int flags){
+#ifdef __OpenBSD__
+ if(len==0)
+ return len;
+ if(len>ao_data.outburst || !(flags & AOPLAY_FINAL_CHUNK)) {
+ len/=ao_data.outburst;
+ len*=ao_data.outburst;
+ }
+ len=write(audio_fd,data,len);
+ return len;
+#else
if (len < ao_data.outburst) return 0;
len /= ao_data.outburst;
len *= ao_data.outburst;
@@ -679,16 +716,19 @@ static int play(void* data,int len,int flags){
queued_bursts ++;
}
return len;
+#endif
}
// return: delay in seconds between first and last sample in buffer
static float get_delay(void){
- audio_info_t info;
- ioctl(audio_fd, AUDIO_GETINFO, &info);
#if defined (__OpenBSD__) || defined(__NetBSD__)
- return (float) info.play.seek/ (float)byte_per_sec ;
+ u_long bytes;
+ ioctl(audio_fd, AUDIO_WSEEK, &bytes);
+ return (float) bytes/ (float)byte_per_sec ;
#else
+ audio_info_t info;
+ ioctl(audio_fd, AUDIO_GETINFO, &info);
if (info.play.samples && enable_sample_timing == RTSC_ENABLED)
return (float)(queued_samples - info.play.samples) / (float)ao_data.samplerate;
else

View File

@ -1,38 +1,37 @@
--- libao2/audio_out.c.orig Sun Oct 7 21:49:27 2007
+++ libao2/audio_out.c Tue Oct 14 11:48:58 2008
@@ -53,6 +53,9 @@ extern ao_functions_t audio_out_sdl;
#ifdef USE_SUN_AUDIO
extern ao_functions_t audio_out_sun;
#endif
+#ifdef USE_LIBSNDIO_AUDIO
+extern ao_functions_t audio_out_libsndio;
+#endif
#ifdef USE_SGI_AUDIO
extern ao_functions_t audio_out_sgi;
#endif
@@ -74,6 +77,7 @@ extern ao_functions_t audio_out_v4l2;
extern ao_functions_t audio_out_mpegpes;
extern ao_functions_t audio_out_pcm;
extern ao_functions_t audio_out_pss;
+extern ao_functions_t audio_out_rtunes;
$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
@@ -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;
extern const ao_functions_t audio_out_sdl;
+extern const ao_functions_t audio_out_sndio;
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;
extern const ao_functions_t audio_out_mpegpes;
extern const ao_functions_t audio_out_pcm;
extern const ao_functions_t audio_out_pss;
+extern const ao_functions_t audio_out_rtunes;
ao_functions_t* audio_out_drivers[] =
const ao_functions_t* const audio_out_drivers[] =
{
@@ -102,6 +106,9 @@ ao_functions_t* audio_out_drivers[] =
#ifdef USE_SGI_AUDIO
@@ -82,6 +84,9 @@ const ao_functions_t* const audio_out_drivers[] =
#ifdef CONFIG_SGI_AUDIO
&audio_out_sgi,
#endif
+#ifdef USE_LIBSNDIO_AUDIO
+ &audio_out_libsndio,
+#ifdef CONFIG_SNDIO_AUDIO
+ &audio_out_sndio,
+#endif
#ifdef USE_SUN_AUDIO
#ifdef CONFIG_SUN_AUDIO
&audio_out_sun,
#endif
@@ -140,6 +147,7 @@ ao_functions_t* audio_out_drivers[] =
@@ -120,6 +125,7 @@ const ao_functions_t* const audio_out_drivers[] =
&audio_out_null,
// should not be auto-selected:
&audio_out_pcm,
&audio_out_pcm,
+ &audio_out_rtunes,
NULL
NULL
};

View File

@ -1,13 +1,31 @@
$OpenBSD: patch-libavcodec_Makefile,v 1.7 2008/02/08 17:32:41 jakemsr Exp $
--- libavcodec/Makefile.orig Sun Oct 7 12:49:37 2007
+++ libavcodec/Makefile Mon Jan 21 14:07:36 2008
@@ -420,6 +420,9 @@ ALTIVEC-OBJS-$(CONFIG_WMV3_DECODER) += ppc/vc1dsp_a
# -maltivec is needed in order to build AltiVec code.
$(ALTIVEC-OBJS-yes): CFLAGS += -maltivec -mabi=altivec
$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
+# compiler optimizations cause problems
+ppc/mpegvideo_altivec.o: CFLAGS += -O
include $(SUBDIR)../subdir.mak
+ifdef ARCH_X86_32
+ifeq (,$(findstring -O,$(CFLAGS)))
+x86/dsputil_mmx.o: CFLAGS += -O
+x86/flacdsp_mmx.o: CFLAGS += -O
+x86/fft_3dn.o: CFLAGS += -O
+x86/fft_3dn2.o: CFLAGS += -O
+x86/mlpdsp.o: CFLAGS += -O
+x86/snowdsp_mmx.o: CFLAGS += -O
+h264.o: CFLAGS += -O
+h264_parser.o: CFLAGS += -O
+cabac.o: CFLAGS += -O
+endif
+x86/dsputil_mmx.o: CFLAGS += -fomit-frame-pointer
+x86/flacdsp_mmx.o: CFLAGS += -fomit-frame-pointer
+x86/fft_3dn.o: CFLAGS += -fomit-frame-pointer
+x86/fft_3dn2.o: CFLAGS += -fomit-frame-pointer
+x86/mlpdsp.o: CFLAGS += -fomit-frame-pointer
+x86/snowdsp_mmx.o: CFLAGS += -fomit-frame-pointer
+h264.o: CFLAGS += -fomit-frame-pointer
+h264_parser.o: CFLAGS += -fomit-frame-pointer
+cabac.o: CFLAGS += -fomit-frame-pointer
+endif
+
# check_altivec must be built without -maltivec
OBJS-$(HAVE_ALTIVEC) += $(ALTIVEC-OBJS-yes) \
ppc/check_altivec.o
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o

View File

@ -1,22 +0,0 @@
$OpenBSD: patch-libavcodec_dsputil_c,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
--- libavcodec/dsputil.c.orig Sun Oct 7 12:49:37 2007
+++ libavcodec/dsputil.c Mon Feb 4 16:24:38 2008
@@ -39,7 +39,9 @@
void ff_spatial_dwt(int *buffer, int width, int height, int stride, int type, int decomposition_count);
/* vorbis.c */
+#if ENABLE_VORBIS_DECODER
void vorbis_inverse_coupling(float *mag, float *ang, int blocksize);
+#endif
/* flacenc.c */
void ff_flac_compute_autocorr(const int32_t *data, int len, int lag, double *autoc);
@@ -3850,7 +3852,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx
{
int i;
- ff_check_alignment();
+ /*ff_check_alignment();*/
#ifdef CONFIG_ENCODERS
if(avctx->dct_algo==FF_DCT_FASTINT) {

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libavcodec_h264_c,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
--- libavcodec/h264.c.orig Mon Jan 21 13:58:41 2008
+++ libavcodec/h264.c Mon Jan 21 14:00:06 2008
@@ -5241,7 +5241,7 @@ static inline int get_cabac_cbf_ctx( H264Context *h, i
return ctx + 4 * cat;
}
-static const attribute_used uint8_t last_coeff_flag_offset_8x8[63] = {
+const attribute_used uint8_t last_coeff_flag_offset_8x8[63] = {
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-libavcodec_libx264_c,v 1.1 2009/04/14 19:52:08 kili Exp $
--- libavcodec/libx264.c.orig Sun Jan 4 00:43:21 2009
+++ libavcodec/libx264.c Sun Jan 4 00:44:24 2009
@@ -162,7 +162,7 @@ X264_init(AVCodecContext *avctx)
x4->params.i_bframe = avctx->max_b_frames;
x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
- x4->params.b_bframe_adaptive = avctx->b_frame_strategy;
+ x4->params.i_bframe_adaptive = avctx->b_frame_strategy;
x4->params.i_bframe_bias = avctx->bframebias;
x4->params.b_bframe_pyramid = (avctx->flags2 & CODEC_FLAG2_BPYRAMID);
avctx->has_b_frames= (avctx->flags2 & CODEC_FLAG2_BPYRAMID) ? 2 : !!avctx->max_b_frames;
@@ -225,8 +225,6 @@ X264_init(AVCodecContext *avctx)
x4->params.analyse.i_me_range = avctx->me_range;
x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
- x4->params.analyse.b_bidir_me = (avctx->bidir_refine > 0);
- x4->params.analyse.b_bframe_rdo = (avctx->flags2 & CODEC_FLAG2_BRDO);
x4->params.analyse.b_mixed_references =
(avctx->flags2 & CODEC_FLAG2_MIXED_REFS);
x4->params.analyse.b_chroma_me = (avctx->me_cmp & FF_CMP_CHROMA);
@@ -251,7 +249,6 @@ X264_init(AVCodecContext *avctx)
x4->params.rc.f_ip_factor = 1/fabs(avctx->i_quant_factor);
x4->params.rc.f_pb_factor = avctx->b_quant_factor;
x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
- x4->params.rc.psz_rc_eq = avctx->rc_eq;
x4->params.analyse.b_psnr = (avctx->flags & CODEC_FLAG_PSNR);
x4->params.i_log_level = X264_LOG_DEBUG;

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-libavformat_4xm_c,v 1.1 2009/01/29 17:28:13 sthen Exp $
--- libavformat/4xm.c.orig Thu Jan 29 11:19:43 2009
+++ libavformat/4xm.c Thu Jan 29 11:20:45 2009
@@ -163,10 +163,12 @@ static int fourxm_read_header(AVFormatContext *s,
return AVERROR_INVALIDDATA;
}
current_track = AV_RL32(&header[i + 8]);
+ if((unsigned)current_track >= UINT_MAX / sizeof(AudioTrack) - 1){
+ av_log(s, AV_LOG_ERROR, "current_track too large\n");
+ return -1;
+ }
if (current_track + 1 > fourxm->track_count) {
fourxm->track_count = current_track + 1;
- if((unsigned)fourxm->track_count >= UINT_MAX / sizeof(AudioTrack))
- return -1;
fourxm->tracks = av_realloc(fourxm->tracks,
fourxm->track_count * sizeof(AudioTrack));
if (!fourxm->tracks) {

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-libavutil_x86_cpu_h,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
--- libavutil/x86_cpu.h.orig Sat Jan 26 15:11:55 2008
+++ libavutil/x86_cpu.h Sat Jan 26 15:14:22 2008
@@ -61,7 +61,7 @@
# define HAVE_7REGS 1
#endif
-#if defined(ARCH_X86_64) && defined(PIC)
+#if defined(ARCH_X86_64) /* && defined(PIC)) the stuff under this condition just isn't amd64 compatible */
# define BROKEN_RELOCATIONS 1
$OpenBSD: patch-libavutil_x86_cpu_h,v 1.2 2009/10/11 13:36:23 edd Exp $
--- libavutil/x86_cpu.h.orig Wed Jul 29 20:37:28 2009
+++ libavutil/x86_cpu.h Wed Jul 29 20:37:58 2009
@@ -69,7 +69,7 @@ typedef int x86_reg;
#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
#define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
-#if ARCH_X86_64 && defined(PIC)
+#if ARCH_X86_64 /* && defined(PIC) */
# define BROKEN_RELOCATIONS 1
#endif

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libdvdcss_Makefile,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
--- libdvdcss/Makefile.orig Mon Jan 21 15:05:17 2008
+++ libdvdcss/Makefile Mon Jan 21 15:05:34 2008
@@ -9,6 +9,6 @@ SRCS_COMMON = css.c \
libdvdcss.c \
#bsdi_ioctl \
-CFLAGS = -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\"
-
include ../mpcommon.mak
+
+CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\"

View File

@ -1,8 +1,8 @@
$OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.2 2008/09/15 22:13:02 jakemsr Exp $
--- libmpcodecs/ad_faad.c.orig Sun Oct 7 12:49:25 2007
+++ libmpcodecs/ad_faad.c Wed Jul 16 01:50:40 2008
@@ -66,7 +66,7 @@ static int aac_probe(unsigned char *buffer, int len)
$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
@@ -83,7 +83,7 @@ static int aac_probe(unsigned char *buffer, int len)
static int init(sh_audio_t *sh)
{
- unsigned long faac_samplerate;
@ -10,7 +10,7 @@ $OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.2 2008/09/15 22:13:02 jakemsr Exp $
unsigned char faac_channels;
int faac_init, pos = 0;
faac_hdec = faacDecOpen();
@@ -148,7 +148,7 @@ static int init(sh_audio_t *sh)
@@ -166,7 +166,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!
@ -19,12 +19,12 @@ $OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.2 2008/09/15 22:13:02 jakemsr Exp $
sh->channels = faac_channels;
if (audio_output_channels <= 2) sh->channels = faac_channels > 1 ? 2 : 1;
sh->samplerate = faac_samplerate;
@@ -276,7 +276,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *
@@ -294,7 +294,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",
- sh->samplesize*faac_finfo.samples);
+ (long)sh->samplesize*faac_finfo.samples);
memcpy(buf+len,faac_sample_buffer, sh->samplesize*faac_finfo.samples);
last_dec_len = sh->samplesize*faac_finfo.samples;
len += last_dec_len;
if (sh->channels >= 5)
reorder_channel_copy_nch(faac_sample_buffer,

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libmpcodecs_ad_pcm_c,v 1.3 2006/07/19 21:40:47 robert Exp $
--- libmpcodecs/ad_pcm.c.orig Sun Jun 11 20:35:41 2006
+++ libmpcodecs/ad_pcm.c Thu Jul 6 00:08:11 2006
@@ -20,6 +20,8 @@ LIBAD_EXTERN(pcm)
static int init(sh_audio_t *sh_audio)
{
WAVEFORMATEX *h=sh_audio->wf;
+ if (!h)
+ return 0;
sh_audio->i_bps=h->nAvgBytesPerSec;
sh_audio->channels=h->nChannels;
sh_audio->samplerate=h->nSamplesPerSec;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libmpdemux_demux_audio_c,v 1.1 2008/02/11 00:22:03 jakemsr Exp $
--- libmpdemux/demux_audio.c.orig Fri Feb 8 13:28:43 2008
+++ libmpdemux/demux_audio.c Fri Feb 8 13:29:10 2008
@@ -229,6 +229,8 @@ get_flac_metadata (demuxer_t* demuxer)
ptr += 4;
comment = ptr;
+ if (&comment[length] < comments || &comment[length] >= &comments[blk_len])
+ return;
c = comment[length];
comment[length] = 0;

View File

@ -1,36 +0,0 @@
$OpenBSD: patch-libmpdemux_demux_mov_c,v 1.3 2008/02/11 00:22:03 jakemsr Exp $
--- libmpdemux/demux_mov.c.orig Fri Feb 8 13:29:41 2008
+++ libmpdemux/demux_mov.c Fri Feb 8 13:31:59 2008
@@ -173,11 +173,12 @@ void mov_build_index(mov_track_t* trak,int timescale){
i=trak->chunkmap_size;
while(i>0){
--i;
- for(j=trak->chunkmap[i].first;j<last;j++){
+ j=FFMAX(trak->chunkmap[i].first, 0);
+ for(;j<last;j++){
trak->chunks[j].desc=trak->chunkmap[i].sdid;
trak->chunks[j].size=trak->chunkmap[i].spc;
}
- last=trak->chunkmap[i].first;
+ last=FFMIN(trak->chunkmap[i].first, trak->chunks_size);
}
#if 0
@@ -235,6 +236,8 @@ void mov_build_index(mov_track_t* trak,int timescale){
s=0;
for(j=0;j<trak->durmap_size;j++){
for(i=0;i<trak->durmap[j].num;i++){
+ if (s >= trak->samples_size)
+ break;
trak->samples[s].pts=pts;
++s;
pts+=trak->durmap[j].dur;
@@ -246,6 +249,8 @@ void mov_build_index(mov_track_t* trak,int timescale){
for(j=0;j<trak->chunks_size;j++){
off_t pos=trak->chunks[j].pos;
for(i=0;i<trak->chunks[j].size;i++){
+ if (s >= trak->samples_size)
+ break;
trak->samples[s].pos=pos;
mp_msg(MSGT_DEMUX, MSGL_DBG3, "Sample %5d: pts=%8d off=0x%08X size=%d\n",s,
trak->samples[s].pts,

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-libmpdemux_demux_real_c,v 1.3 2008/10/01 16:01:51 naddy Exp $
--- libmpdemux/demux_real.c.orig Sun Oct 7 21:49:33 2007
+++ libmpdemux/demux_real.c Tue Sep 30 16:34:43 2008
@@ -958,6 +958,7 @@ got_video:
// last fragment!
if(dp_hdr->len!=vpkg_length-vpkg_offset)
mp_msg(MSGT_DEMUX,MSGL_V,"warning! assembled.len=%d frag.len=%d total.len=%d \n",dp->len,vpkg_offset,vpkg_length-vpkg_offset);
+ if (vpkg_offset > dp->len - sizeof(dp_hdr_t) - dp_hdr->len) vpkg_offset = dp->len - sizeof(dp_hdr_t) - dp_hdr->len;
stream_read(demuxer->stream, dp_data+dp_hdr->len, vpkg_offset);
if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else
dp_hdr->len+=vpkg_offset;
@@ -981,6 +982,7 @@ got_video:
// non-last fragment:
if(dp_hdr->len!=vpkg_offset)
mp_msg(MSGT_DEMUX,MSGL_V,"warning! assembled.len=%d offset=%d frag.len=%d total.len=%d \n",dp->len,vpkg_offset,len,vpkg_length);
+ if (len > dp->len - sizeof(dp_hdr_t) - dp_hdr->len) len = dp->len - sizeof(dp_hdr_t) - dp_hdr->len;
stream_read(demuxer->stream, dp_data+dp_hdr->len, len);
if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else
dp_hdr->len+=len;
@@ -1003,6 +1005,7 @@ got_video:
extra[0]=1; extra[1]=0; // offset of the first chunk
if(0x00==(vpkg_header&0xc0)){
// first fragment:
+ if (len > dp->len - sizeof(dp_hdr_t)) len = dp->len - sizeof(dp_hdr_t);
dp_hdr->len=len;
stream_read(demuxer->stream, dp_data, len);
ds->asf_packet=dp;

View File

@ -1,56 +0,0 @@
$OpenBSD: patch-libmpdemux_demux_vqf_c,v 1.1 2008/12/15 21:30:07 naddy Exp $
--- libmpdemux/demux_vqf.c.orig Sun Oct 7 21:49:33 2007
+++ libmpdemux/demux_vqf.c Mon Dec 15 19:10:38 2008
@@ -50,11 +50,14 @@ static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
unsigned chunk_size;
hi->size=chunk_size=stream_read_dword(s); /* include itself */
stream_read(s,chunk_id,4);
+ if (chunk_size < 8) return NULL;
+ chunk_size -= 8;
if(*((uint32_t *)&chunk_id[0])==mmioFOURCC('C','O','M','M'))
{
- char buf[chunk_size-8];
+ char buf[BUFSIZ];
unsigned i,subchunk_size;
- if(stream_read(s,buf,chunk_size-8)!=chunk_size-8) return NULL;
+ if (chunk_size > sizeof(buf) || chunk_size < 20) return NULL;
+ if(stream_read(s,buf,chunk_size)!=chunk_size) return NULL;
i=0;
subchunk_size=be2me_32(*((uint32_t *)&buf[0]));
hi->channelMode=be2me_32(*((uint32_t *)&buf[4]));
@@ -83,13 +86,15 @@ static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
sh_audio->samplesize = 4;
w->wBitsPerSample = 8*sh_audio->samplesize;
w->cbSize = 0;
+ if (subchunk_size > chunk_size - 4) continue;
i+=subchunk_size+4;
- while(i<chunk_size-8)
+ while(i + 8 < chunk_size)
{
unsigned slen,sid;
- char sdata[chunk_size];
+ char sdata[BUFSIZ];
sid=*((uint32_t *)&buf[i]); i+=4;
slen=be2me_32(*((uint32_t *)&buf[i])); i+=4;
+ if (slen > sizeof(sdata) - 1 || slen > chunk_size - i) break;
if(sid==mmioFOURCC('D','S','I','Z'))
{
hi->Dsiz=be2me_32(*((uint32_t *)&buf[i]));
@@ -141,7 +146,7 @@ static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
if(*((uint32_t *)&chunk_id[0])==mmioFOURCC('D','A','T','A'))
{
demuxer->movi_start=stream_tell(s);
- demuxer->movi_end=demuxer->movi_start+chunk_size-8;
+ demuxer->movi_end=demuxer->movi_start+chunk_size;
mp_msg(MSGT_DEMUX, MSGL_V, "Found data at %"PRIX64" size %"PRIu64"\n",demuxer->movi_start,demuxer->movi_end);
/* Done! play it */
break;
@@ -149,7 +154,7 @@ static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
else
{
mp_msg(MSGT_DEMUX, MSGL_V, "Unhandled chunk '%c%c%c%c' %u bytes\n",((char *)&chunk_id)[0],((char *)&chunk_id)[1],((char *)&chunk_id)[2],((char *)&chunk_id)[3],chunk_size);
- stream_skip(s,chunk_size-8); /*unknown chunk type */
+ stream_skip(s,chunk_size); /*unknown chunk type */
}
}

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-libpostproc_Makefile,v 1.1 2009/10/11 13:36:23 edd Exp $
--- libpostproc/Makefile.orig Mon Apr 7 14:16:31 2008
+++ libpostproc/Makefile Mon Jul 20 17:37:07 2009
@@ -8,3 +8,10 @@ HEADERS = postprocess.h
OBJS = postprocess.o
include $(SUBDIR)../subdir.mak
+
+ifdef ARCH_X86_32
+ifeq (,$(findstring -O,$(CFLAGS)))
+postprocess.o: CFLAGS += -O
+endif
+postprocess.o: CFLAGS += -fomit-frame-pointer
+endif

View File

@ -1,36 +0,0 @@
$OpenBSD: patch-libpostproc_postprocess_template_c,v 1.1 2008/02/08 17:32:42 jakemsr Exp $
--- libpostproc/postprocess_template.c.orig Mon Jan 21 16:47:04 2008
+++ libpostproc/postprocess_template.c Mon Jan 21 16:47:55 2008
@@ -3747,7 +3747,7 @@ static void RENAME(postProcess)(uint8_t src[], int src
//FIXME filter first line
if(y>0) RENAME(dering)(dstBlock - stride - 8, stride, &c);
}
-
+#if 0
if(mode & TEMP_NOISE_FILTER)
{
RENAME(tempNoiseReducer)(dstBlock-8, stride,
@@ -3755,6 +3755,7 @@ static void RENAME(postProcess)(uint8_t src[], int src
c.tempBluredPast[isColor] + (y>>3)*256 + (x>>3),
c.ppMode.maxTmpNoise);
}
+#endif
}
dstBlock+=8;
@@ -3772,6 +3773,7 @@ static void RENAME(postProcess)(uint8_t src[], int src
if(y > 0) RENAME(dering)(dstBlock - dstStride - 8, dstStride, &c);
}
+#if 0
if((mode & TEMP_NOISE_FILTER))
{
RENAME(tempNoiseReducer)(dstBlock-8, dstStride,
@@ -3779,6 +3781,7 @@ static void RENAME(postProcess)(uint8_t src[], int src
c.tempBluredPast[isColor] + (y>>3)*256 + (x>>3),
c.ppMode.maxTmpNoise);
}
+#endif
/* did we use a tmp buffer for the last lines*/
if(y+15 >= height)

View File

@ -0,0 +1,14 @@
$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
DIRS = bfin mlib ppc sparc x86
include $(SUBDIR)../subdir.mak
+
+ifdef ARCH_X86_32
+ifeq (,$(findstring -O,$(CFLAGS)))
+x86/yuv2rgb_mmx.o: CFLAGS += -O
+endif
+x86/yuv2rgb_mmx.o: CFLAGS += -fomit-frame-pointer
+endif

View File

@ -1,93 +0,0 @@
$OpenBSD: patch-loader_wrapper_S,v 1.3 2004/10/18 06:48:20 biorn Exp $
--- loader/wrapper.S.orig Mon Nov 25 21:37:12 2002
+++ loader/wrapper.S Thu Jul 15 09:29:23 2004
@@ -1,27 +1,36 @@
+#include "../mangle.h"
+#if defined(__OpenBSD__) && !defined(__ELF__)
+.data
+#else
.section .data
-.globl caller_return
-caller_return:
+#endif
+.globl MANGLEA(caller_return)
+MANGLEA(caller_return):
.long 0
-.globl report_entry
-report_entry:
- .long null_call
-.globl report_ret
-report_ret:
- .long null_call
-.global wrapper_target
-wrapper_target:
- .long null_call
+.globl MANGLEA(report_entry)
+MANGLEA(report_entry):
+ .long MANGLEA(null_call)
+.globl MANGLEA(report_ret)
+MANGLEA(report_ret):
+ .long MANGLEA(null_call)
+.global MANGLEA(wrapper_target)
+MANGLEA(wrapper_target):
+ .long MANGLEA(null_call)
+#if defined(__OpenBSD__) && !defined(__ELF__)
+.text
+#else
.section .text
-.globl null_call
- .type null_call, @function
+#endif
+.globl MANGLEA(null_call)
+ .type MANGLEA(null_call), @function
.balign 16,0x90
-null_call:
+MANGLEA(null_call):
ret
-.globl wrapper
- .type wrapper, @function
+.globl MANGLEA(wrapper)
+ .type MANGLEA(wrapper), @function
.balign 16,0x90
-wrapper:
+MANGLEA(wrapper):
pusha # store registers (EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI)
pushf # store flags
@@ -39,7 +48,7 @@ wrapper:
push %eax
push %edx
- call *report_entry # report entry
+ call *MANGLEA(report_entry) # report entry
test %eax, %eax
jnz .Ldone
@@ -48,14 +57,14 @@ wrapper:
popf # restore flags
popa # restore registers
- popl caller_return # switch return addresses
+ popl MANGLEA(caller_return) # switch return addresses
pushl $.Lwrapper_return
- jmp *wrapper_target # wrapper_target should return at .Lwrapper_return
+ jmp *MANGLEA(wrapper_target) # wrapper_target should return at .Lwrapper_return
.balign 16, 0x90
.Lwrapper_return:
- pushl caller_return # restore the original return address
+ pushl MANGLEA(caller_return) # restore the original return address
pusha # more for reference sake here
pushf
@@ -73,7 +82,7 @@ wrapper:
push %eax
push %edx
- call *report_ret # report the return information (same args)
+ call *MANGLEA(report_ret) # report the return information (same args)
.Ldone:
leave

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-mangle_h,v 1.4 2008/02/08 17:32:42 jakemsr Exp $
--- mangle.h.orig Sun Oct 7 12:49:33 2007
+++ mangle.h Sun Dec 16 21:06:56 2007
@@ -11,8 +11,10 @@
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \
(defined(__OpenBSD__) && !defined(__ELF__)) || defined(__APPLE__)
#define MANGLE(a) "_" #a
+#define MANGLEA(a) _ ## a
#else
#define MANGLE(a) #a
+#define MANGLEA(a) a
#endif
#endif /* !MANGLE_H */

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-mencoder_c,v 1.3 2008/02/08 17:32:42 jakemsr Exp $
--- mencoder.c.orig Sun Oct 7 12:49:33 2007
+++ mencoder.c Sun Dec 16 21:06:56 2007
@@ -1506,6 +1506,7 @@ if(sh_audio && !demuxer2){
} // while(!at_eof)
+mux_v->aspect=sh_video->aspect;
if (!interrupted && filelist[++curfile].name != 0) {
if (sh_video && sh_video->vfilter) { // Before uniniting sh_video and the filter chain, break apart the VE.
vf_instance_t * ve; // this will be the filter right before the ve.

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-mp3lib_layer2_c,v 1.5 2007/04/19 08:37:09 ajacoutot Exp $
--- mp3lib/layer2.c.orig Sun Jun 11 20:35:43 2006
+++ mp3lib/layer2.c Thu Apr 19 09:41:04 2007
@@ -294,6 +294,11 @@ static int do_layer2(struct frame *fr,int outmode)
fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ?
(fr->mode_ext<<2)+4 : fr->II_sblimit;
+ if (fr->jsbound > fr->II_sblimit) {
+ fprintf(stderr, "Truncating stereo boundary to sideband limit.\n");
+ fr->jsbound=fr->II_sblimit;
+ }
+
if(stereo == 1 || single == 3)
single = 0;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-mpcommon_mak,v 1.1 2008/02/08 17:32:42 jakemsr Exp $
--- mpcommon.mak.orig Mon Jan 21 14:55:57 2008
+++ mpcommon.mak Mon Jan 21 14:56:09 2008
@@ -8,7 +8,7 @@ OBJS_MENCODER += $(addsuffix .o, $(basename $(SRCS_ME
CFLAGS-$(LIBAVCODEC) += -I../libavcodec
CFLAGS-$(LIBAVFORMAT) += -I../libavformat
-CFLAGS += $(CFLAGS-yes) $(OPTFLAGS)
+CFLAGS := $(CFLAGS-yes) $(OPTFLAGS)
LIBS-$(MPLAYER) += $(LIBNAME_MPLAYER)
LIBS-$(MENCODER) += $(LIBNAME_MENCODER)

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-mplayer_c,v 1.8 2008/02/08 17:32:42 jakemsr Exp $
--- mplayer.c.orig Sun Oct 7 12:49:33 2007
+++ mplayer.c Sun Dec 16 21:06:56 2007
@@ -774,7 +774,7 @@ static void exit_sighandler(int x){
gdb_pid = fork();
mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forked...\n");
if (gdb_pid == 0) { // We are the child
- if (execlp("gdb", "gdb", prog_path, spid, NULL) == -1)
+ if (execlp("gdb", "gdb", prog_path, spid, (char *)NULL) == -1)
mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't start gdb\n");
} else if (gdb_pid < 0)
mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't fork\n");

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-stream_Makefile,v 1.1 2008/02/08 17:32:42 jakemsr Exp $
--- stream/Makefile.orig Sun Oct 7 12:49:26 2007
+++ stream/Makefile Mon Jan 21 12:13:35 2008
@@ -66,6 +66,8 @@ endif
include ../mpcommon.mak
+stream_dvd.o: CFLAGS := -I.. $(CFLAGS)
+
clean::
rm -f realrtsp/*.o realrtsp/*.a realrtsp/*~ \
librtsp/*.o librtsp/*.a librtsp/*~ \

View File

@ -0,0 +1,117 @@
$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)
ai->oss.device = strdup("/dev/dsp");
return 0;
#endif
+#ifdef CONFIG_SNDIO_AUDIO
+ case AUDIO_IN_SNDIO:
+ ai->sndio.hdl = NULL;
+ ai->sndio.device = strdup("default");
+ return 0;
+#endif
default:
return -1;
}
@@ -57,6 +63,12 @@ int audio_in_setup(audio_in_t *ai)
ai->setup = 1;
return 0;
#endif
+#ifdef CONFIG_SNDIO_AUDIO
+ case AUDIO_IN_SNDIO:
+ if (ai_sndio_init(ai) < 0) return -1;
+ ai->setup = 1;
+ return 0;
+#endif
default:
return -1;
}
@@ -79,6 +91,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
+#ifdef CONFIG_SNDIO_AUDIO
+ case AUDIO_IN_SNDIO:
+ ai->req_samplerate = rate;
+ if (!ai->setup) return 0;
+ if (ai_sndio_setup(ai) < 0) return -1;
+ return ai->samplerate;
+#endif
default:
return -1;
}
@@ -101,6 +120,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
+#ifdef CONFIG_SNDIO_AUDIO
+ case AUDIO_IN_SNDIO:
+ ai->req_channels = channels;
+ if (!ai->setup) return 0;
+ if (ai_sndio_setup(ai) < 0) return -1;
+ return ai->channels;
+#endif
default:
return -1;
}
@@ -129,6 +155,12 @@ int audio_in_set_device(audio_in_t *ai, char *device)
ai->oss.device = strdup(device);
return 0;
#endif
+#ifdef CONFIG_SNDIO_AUDIO
+ case AUDIO_IN_SNDIO:
+ if (ai->sndio.device) free(ai->sndio.device);
+ ai->sndio.device = strdup(device);
+ return 0;
+#endif
default:
return -1;
}
@@ -154,6 +186,13 @@ int audio_in_uninit(audio_in_t *ai)
ai->setup = 0;
return 0;
#endif
+#ifdef CONFIG_SNDIO_AUDIO
+ case AUDIO_IN_SNDIO:
+ if (ai->sndio.hdl)
+ sio_close(ai->sndio.hdl);
+ ai->setup = 0;
+ return 0;
+#endif
}
}
return -1;
@@ -170,6 +209,12 @@ int audio_in_start_capture(audio_in_t *ai)
case AUDIO_IN_OSS:
return 0;
#endif
+#ifdef CONFIG_SNDIO_AUDIO
+ case AUDIO_IN_SNDIO:
+ if (!sio_start(ai->sndio.hdl))
+ return -1;
+ return 0;
+#endif
default:
return -1;
}
@@ -203,6 +248,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);
+ if (ret != ai->blocksize) {
+ if (ret < 0) {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, strerror(errno));
+ } else {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_NotEnoughSamples);
+ }
+ return -1;
+ }
+ return ret;
+#endif
+#ifdef CONFIG_SNDIO_AUDIO
+ case AUDIO_IN_SNDIO:
+ ret = sio_read(ai->sndio.hdl, buffer, ai->blocksize);
if (ret != ai->blocksize) {
if (ret < 0) {
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, strerror(errno));

View File

@ -0,0 +1,50 @@
$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 @@
#define AUDIO_IN_ALSA 1
#define AUDIO_IN_OSS 2
+#define AUDIO_IN_SNDIO 3
#include "config.h"
@@ -27,6 +28,16 @@ typedef struct {
} ai_oss_t;
#endif
+#ifdef CONFIG_SNDIO_AUDIO
+#include <sndio.h>
+
+typedef struct {
+ char *device;
+
+ struct sio_hdl *hdl;
+} ai_sndio_t;
+#endif
+
typedef struct
{
int type;
@@ -49,6 +60,9 @@ typedef struct
#ifdef CONFIG_OSS_AUDIO
ai_oss_t oss;
#endif
+#ifdef CONFIG_SNDIO_AUDIO
+ ai_sndio_t sndio;
+#endif
} 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);
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);
+#endif
+
+#ifdef CONFIG_SNDIO_AUDIO
+int ai_sndio_setup(audio_in_t *ai);
+int ai_sndio_init(audio_in_t *ai);
#endif
#endif /* MPLAYER_AUDIO_IN_H */

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-stream_stream_cddb_c,v 1.1 2008/02/11 00:22:03 jakemsr Exp $
--- stream/stream_cddb.c.orig Fri Feb 8 13:34:13 2008
+++ stream/stream_cddb.c Fri Feb 8 13:38:40 2008
@@ -53,6 +53,7 @@
#include "version.h"
#include "stream.h"
#include "network.h"
+#include "libavutil/intreadwrite.h"
#define DEFAULT_FREEDB_SERVER "freedb.freedb.org"
#define DEFAULT_CACHE_DIR "/.cddb/"
@@ -453,8 +454,9 @@ cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_
} else {
len = ptr2-ptr+1;
}
+ len = FFMIN(sizeof(album_title) - 1, len);
strncpy(album_title, ptr, len);
- album_title[len-2]='\0';
+ album_title[len]='\0';
}
mp_msg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title);
return 0;
@@ -490,8 +492,9 @@ cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t
} else {
len = ptr2-ptr+1;
}
+ len = FFMIN(sizeof(album_title) - 1, len);
strncpy(album_title, ptr, len);
- album_title[len-2]='\0';
+ album_title[len]='\0';
}
mp_msg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title);
return cddb_request_titles(cddb_data);

View File

@ -1,23 +1,29 @@
$OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.1 2008/02/08 17:32:42 jakemsr Exp $
--- stream/tvi_bsdbt848.c.orig Sun Oct 7 12:49:26 2007
+++ stream/tvi_bsdbt848.c Mon Dec 17 14:49:10 2007
@@ -36,6 +36,7 @@
#include <sys/time.h>
$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 @@
#include <signal.h>
#include <string.h>
+#include <errno.h>
#include <errno.h>
+#include <sys/ioctl.h>
#include <sys/param.h>
#ifdef USE_SUN_AUDIO
@@ -50,6 +51,7 @@
-#ifdef CONFIG_SUN_AUDIO
+#if defined(CONFIG_SUN_AUDIO) && !defined(CONFIG_SNDIO_AUDIO)
#include <sys/audioio.h>
#endif
@@ -51,6 +52,9 @@
#include IOCTL_BT848_H_NAME
#endif
+#ifndef __OpenBSD__
+#if defined(CONFIG_SNDIO_AUDIO)
+#include <sndio.h>
+#else
#ifdef HAVE_SYS_SOUNDCARD_H
#include <sys/soundcard.h>
#else
@@ -59,6 +61,7 @@
@@ -60,6 +64,7 @@
#include <machine/soundcard.h>
#endif
#endif
@ -25,176 +31,171 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.1 2008/02/08 17:32:42 jakemsr Exp $
#include "libaf/af_format.h"
#include "libmpcodecs/img_format.h"
@@ -141,9 +144,14 @@ typedef struct {
@@ -89,7 +94,12 @@ typedef struct {
/* Audio */
char *dspdev;
int dspready;
+#if defined(CONFIG_SNDIO_AUDIO)
+ struct sio_hdl *hdl;
+ struct sio_par spar, gpar;
+#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_
#include "tvi_def.h"
+static int sources[6] = { METEOR_INPUT_DEV1, METEOR_INPUT_DEV0, METEOR_INPUT_DEV2,
+ METEOR_INPUT_DEV3, METEOR_INPUT_DEV_RGB, METEOR_INPUT_DEV_SVIDEO };
+
+
static priv_t *G_private=NULL;
static int getinput(int innumber);
+static int getsource(int insrc);
static void processframe(int signal)
{
@@ -314,7 +322,14 @@ static int control(priv_t *priv, int cmd, void *arg)
/* set audio device name */
if (!tv_param->adevice)
-#ifdef CONFIG_SUN_AUDIO
+#if defined(CONFIG_SNDIO_AUDIO)
+ priv->dspdev = NULL;
+#elif defined(CONFIG_SUN_AUDIO)
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)
{
int dspspeed = *(int *)arg;
+#if defined(__OpenBSD__)
+ audio_info_t audio_if;
+ AUDIO_INITINFO(&audio_if);
+ audio_if.record.sample_rate = dspspeed;
+ if (ioctl(priv->dspfd, AUDIO_SETINFO, &audio_if) == -1)
+#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;
+#else
if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1)
+#endif
if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, strerror(errno));
return(TVI_CONTROL_FALSE);
@@ -525,7 +540,12 @@ static int init(priv_t *priv)
int marg;
int count;
u_short tmp_fps;
+int tuner_audio;
+#if defined(__OpenBSD__)
+audio_info_t audio_if;
return TVI_CONTROL_FALSE;
}
-
+#endif
priv->dspspeed = dspspeed;
+
G_private = priv; /* Oooh, sick */
/* Video Configuration */
@@ -536,7 +556,7 @@ priv->iformat = METEOR_FMT_PAL;
priv->maxheight = PAL_HEIGHT;
priv->maxwidth = PAL_WIDTH;
priv->maxfps = PAL_FPS;
-priv->source = METEOR_INPUT_DEV0;
+priv->source = METEOR_INPUT_DEV1;
priv->fps = priv->maxfps;
priv->starttime=0;
@@ -622,13 +642,33 @@ if(priv->tunerfd < 0)
priv->tunerready = FALSE;
}
+if(ioctl(priv->tunerfd, BT848_GAUDIO, &tuner_audio) < 0)
+ {
+ perror("tuner get audio");
+ priv->tunerready = FALSE;
+ }
+if(tuner_audio & AUDIO_MUTE)
+ {
+ tuner_audio = AUDIO_UNMUTE;
+ if(ioctl(priv->tunerfd, BT848_SAUDIO, &tuner_audio) < 0)
+ {
+ perror("tuner unmute");
+ priv->tunerready = FALSE;
+ }
+ }
+
+
/* Audio Configuration */
priv->dspready = TRUE;
priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/
@@ -629,12 +648,46 @@ priv->dspready = TRUE;
priv->dspsamplesize = 16;
priv->dspstereo = 1;
priv->dspspeed = 44100;
+#if defined (__OpenBSD__)
+priv->dspfmt = AUDIO_ENCODING_SLINEAR_LE;
+#else
+#if !defined(CONFIG_SNDIO_AUDIO)
priv->dspfmt = AFMT_S16_LE;
+#endif
priv->dspbytesread = 0;
priv->dsprate = priv->dspspeed * priv->dspsamplesize/8*(priv->dspstereo+1);
priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/priv->fps *
@@ -642,6 +682,26 @@ if((priv->dspfd = open (priv->dspdev, O_RDONLY, 0)) <
priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/priv->fps *
(priv->dspstereo+1);
marg = (256 << 16) | 12;
+#if defined(__OpenBSD__)
+#if defined(CONFIG_SNDIO_AUDIO)
+
+ AUDIO_INITINFO(&audio_if);
+if((priv->hdl = sio_open(priv->dspdev, SIO_REC, 0) == NULL))
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningDspDev, strerror(errno));
+ priv->dspready = FALSE;
+ }
+
+ audio_if.record.precision = priv->dspsamplesize;
+ audio_if.record.channels = priv->dspstereo+1;
+ audio_if.record.sample_rate = priv->dspspeed;
+ audio_if.record.encoding = priv->dspfmt;
+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;
+
+ audio_if.mode = AUMODE_RECORD;
+if((priv->dspready == TRUE) &&
+ (!sio_setpar(priv->hdl, &priv->spar)))
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, strerror(errno));
+ sio_close(priv->hdl);
+ priv->dspready = FALSE;
+ }
+
+ if (ioctl(priv->dspfd, AUDIO_SETINFO, &audio_if) < 0)
+ {
+ perror ("AUDIO_SETINFO:ioctl");
+ close(priv->dspfd);
+ priv->dspready = FALSE;
+ }
+if(!sio_start(priv->hdl))
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, strerror(errno));
+ sio_close(priv->hdl);
+ priv->dspready = FALSE;
+ }
+
+#else
+
if (ioctl(priv->dspfd, SNDCTL_DSP_SETFRAGMENT, &marg ) < 0 )
if((priv->dspfd = open (priv->dspdev, O_RDONLY, 0)) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "SNDCTL_DSP_SETFRAGMENT", strerror(errno));
@@ -659,6 +719,8 @@ if((priv->dspready == TRUE) &&
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningDspDev, strerror(errno));
@@ -660,6 +713,8 @@ if((priv->dspready == TRUE) &&
priv->dspready = FALSE;
}
+#endif
+
return(1);
return 1;
}
@@ -703,6 +765,7 @@ return(1);
static int uninit(priv_t *priv)
{
int marg;
+int tuner_audio;
@@ -684,7 +739,9 @@ if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0)
return 0;
}
if(priv->videoready == FALSE) return(0);
+#if !defined(CONFIG_SNDIO_AUDIO)
read(priv->dspfd, &tmp, 2);
+#endif
@@ -725,6 +788,15 @@ if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 )
close(priv->btfd);
gettimeofday(&curtime, NULL);
@@ -723,10 +780,15 @@ if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 )
return 0;
}
-close(priv->btfd);
+#if defined(CONFIG_SNDIO_AUDIO)
+sio_close(priv->hdl);
+priv->hdl = NULL;
+#else
close(priv->dspfd);
+tuner_audio = AUDIO_MUTE;
+if(ioctl(priv->tunerfd, BT848_SAUDIO, &tuner_audio) < 0)
+ {
+ perror("tuner mute");
+ priv->tunerready = FALSE;
+ }
+
+close(priv->tunerfd);
+
-
priv->dspfd = -1;
+#endif
+
+close(priv->btfd);
priv->btfd = -1;
@@ -869,22 +941,15 @@ if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0)
/* When mencoder wants audio data, it wants data..
it won't go do anything else until it gets it :( */
priv->dspready = priv->videoready = FALSE;
@@ -806,11 +868,19 @@ gettimeofday(&curtime, NULL);
-if(bytesavail == 0) return FRAGSIZE;
+// if(bytesavail == 0) return FRAGSIZE;
/* Get exactly one frame of audio, which forces video sync to audio.. */
return(bytesavail);
}
+#if defined(CONFIG_SNDIO_AUDIO)
+bytesread=sio_read(priv->hdl, buffer, len);
+#else
bytesread=read(priv->dspfd, buffer, len);
+#endif
static int getinput(int innumber)
while(bytesread < len)
{
+#if defined(CONFIG_SNDIO_AUDIO)
+ ret=sio_read(priv->hdl, &buffer[bytesread], len-bytesread);
+#else
ret=read(priv->dspfd, &buffer[bytesread], len-bytesread);
+#endif
if(ret == -1)
{
@@ -845,13 +915,16 @@ return priv->dspbytesread * 1.0 / priv->dsprate;
static int get_audio_framesize(priv_t *priv)
{
-switch(innumber)
- {
- case 0: return METEOR_INPUT_DEV0; /* RCA */
- case 1: return METEOR_INPUT_DEV1; /* Tuner */
- case 2: return METEOR_INPUT_DEV2; /* In 1 */
- case 3: return METEOR_INPUT_DEV3; /* In 2 */
- case 4: return METEOR_INPUT_DEV_RGB; /* RGB */
- case 5: return METEOR_INPUT_DEV_SVIDEO; /* SVid */
- }
-
+if (sources[innumber])
+ return sources[innumber];
+
return 0;
}
int bytesavail;
-#ifdef CONFIG_SUN_AUDIO
+#if defined(CONFIG_SUN_AUDIO) && !defined(CONFIG_SNDIO_AUDIO)
struct audio_info auinf;
#endif
if(priv->dspready == FALSE) return 0;
-#ifdef CONFIG_SUN_AUDIO
+#if defined(CONFIG_SNDIO_AUDIO)
+sio_getpar(priv->hdl, &priv->gpar);
+bytesavail = priv->gpar.round * priv->gpar.bps;
+#elif defined(CONFIG_SUN_AUDIO)
if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "AUDIO_GETINFO", strerror(errno));

View File

@ -1,16 +1,15 @@
$OpenBSD: patch-stream_tvi_v4l2_c,v 1.1 2008/09/03 12:20:52 brad Exp $
--- stream/tvi_v4l2.c.orig Mon Sep 1 22:57:10 2008
+++ stream/tvi_v4l2.c Mon Sep 1 22:57:48 2008
@@ -38,8 +38,13 @@ known issues:
$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
@@ -49,8 +49,12 @@ known issues:
#ifdef HAVE_SYS_SYSINFO_H
#include <sys/sysinfo.h>
#endif
+#ifdef __linux__
#include <linux/types.h>
#include <linux/videodev2.h>
+#endif
+#ifdef __OpenBSD__
+#include <sys/videoio.h>
+#else
#include <linux/types.h>
#include <linux/videodev2.h>
+#endif
#include "mp_msg.h"
#include "libmpcodecs/img_format.h"

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-stream_url_c,v 1.1 2008/02/11 00:22:03 jakemsr Exp $
--- stream/url.c.orig Fri Feb 8 13:32:35 2008
+++ stream/url.c Fri Feb 8 13:33:05 2008
@@ -328,6 +328,7 @@ url_escape_string(char *outbuf, const char *inbuf) {
}
}
+ tmp = NULL;
while(i < len) {
// look for the next char that must be kept
for (j=i;j<len;j++) {

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-tremor_block_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
--- tremor/block.c.orig Sun Oct 7 20:49:27 2007
+++ tremor/block.c Sun Mar 30 22:26:40 2008
@@ -25,6 +25,7 @@
#include "window.h"
#include "registry.h"
#include "misc.h"
+#include "block.h"
static int ilog(unsigned int v){
int ret=0;

View File

@ -1,28 +0,0 @@
$OpenBSD: patch-tremor_block_h,v 1.1 2008/03/30 20:39:41 fgsch Exp $
--- tremor/block.h.orig Sat Mar 29 16:17:25 2008
+++ tremor/block.h Sat Mar 29 16:17:25 2008
@@ -0,0 +1,24 @@
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: basic shared block operations
+
+ ********************************************************************/
+
+#ifndef _V_BLOCK_H_
+#define _V_BLOCK_H_
+
+void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
+void _vorbis_block_ripcord(vorbis_block *vb);
+
+#endif

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-tremor_floor0_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
--- tremor/floor0.c.orig Sun Oct 7 20:49:27 2007
+++ tremor/floor0.c Sun Mar 30 22:26:40 2008
@@ -25,6 +25,7 @@
#include "codebook.h"
#include "misc.h"
#include "os.h"
+#include "block.h"
#define LSP_FRACBITS 14

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-tremor_floor1_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
--- tremor/floor1.c.orig Sun Oct 7 20:49:27 2007
+++ tremor/floor1.c Sun Mar 30 22:26:40 2008
@@ -24,6 +24,7 @@
#include "registry.h"
#include "codebook.h"
#include "misc.h"
+#include "block.h"
#define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-tremor_res012_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
--- tremor/res012.c.orig Sun Oct 7 20:49:27 2007
+++ tremor/res012.c Sun Mar 30 22:26:40 2008
@@ -25,6 +25,7 @@
#include "codebook.h"
#include "misc.h"
#include "os.h"
+#include "block.h"
typedef struct {
vorbis_info_residue0 *info;

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-tremor_synthesis_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
--- tremor/synthesis.c.orig Sun Oct 7 20:49:27 2007
+++ tremor/synthesis.c Sun Mar 30 22:26:40 2008
@@ -23,6 +23,7 @@
#include "registry.h"
#include "misc.h"
#include "os.h"
+#include "block.h"
int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){
vorbis_dsp_state *vd=vb->vd;

View File

@ -1,59 +1,18 @@
MPlayer is a movie player for LINUX (runs on many other Unices, and
non-x86 CPUs, see the documentation). It plays most MPEG, VOB, AVI,
VIVO, ASF/WMV, QT/MOV, FLI, NuppelVideo, yuv4mpeg, FILM, RoQ, and some
RealMedia files, supported by many native, XAnim, and Win32 DLL codecs.
You can watch VideoCD, SVCD, DVD, 3ivx, FLI, and even DivX movies too
(and you don't need the avifile library at all!).
MPlayer is a media player. It plays most MPEG, VOB, AVI, VIVO, ASF/WMV,
QT/MOV, FLI, NuppelVideo, yuv4mpeg, FILM, RoQ, and some RealMedia files,
supported by many native, XAnim, and Win32 DLL codecs. You can watch
VideoCD, SVCD, DVD, 3ivx, FLI, and even DivX movies too.
Another big feature of mplayer is the wide range of supported output
drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, but
you can use SDL (and this way all drivers of SDL), VESA (on every VESA
compatible card, even without X!), and some lowlevel card-specific
drivers (for Matrox, 3Dfx and Radeon) too! Most of them supports
software or hardware scaling, so you can enjoy movies in fullscreen.
MPlayer supports displaying through some hardware MPEG decoder boards,
such as the DVB and DXR3/Hollywood+ ! And what about the nice big
antialiased shaded subtitles (9 supported types!!!) with european/ISO
8859-1,2 (hungarian, english, czech, etc), cyrillic, korean fonts, and
OSD?
MPlayer might fail due to lack of shared memory, e.g. when using gui mode
under KDE. Starting with OpenBSD 3.3, sysctl(8) can modify the shared
memory parameters. In particular kern.shminfo.shmall might need to
be raised, e.g.
sysctl kern.shminfo.shmall=32768
On i386 mplayer can use win32 codecs if they are installed (package
win32-codecs) and if the machdep.userldt sysctl is enabled, e.g. by
entering
sysctl machdep.userldt=1
Both sysctl settings can also be achieved via /etc/sysctl.conf.
On arm (e.g. Zaurus) you may encounter slow video output.
In this case you can disable the X.Org screen rotation in
/etc/X11/xorg.conf. Depending on the video you are playing
you may want to pass the -framedrop or the -hardframedrop
option to mplayer.
By default we disable the internal mp3lib (mpg123), because
it relies on the FPU. Instead of using mp3lib the mad flavor
is enabled by default. If you want to use libmad as an audio
decoder please pass the -ac mad option to mplayer.
MPlayer supports a wide range of video output drivers. It works with
X11, Xv, DGA, OpenGL and optionally AAlib or SDL (and this way all
drivers of SDL). Most of them support software or hardware scaling,
so you can enjoy movies in fullscreen.
Flavors:
sdl: enables sdl, requires devel/sdl
ggi: enables ggi, requires graphics/ggi
debug: enables debugging information
mad: enables mad, requires audio/libmad
no_x11: disables gui and most video output.
aa: enables ascii art, requires graphics/aalib
jack: enables jack, requires audio/jack

View File

@ -1,2 +1 @@
This package may need further setup. Run "pkg_info mplayer" to find out more
and be sure to read the package description carefully.
This package may need further setup. Please see ${PREFIX}/share/doc/mplayer/README.OpenBSD for some information regarding running MPlayer on OpenBSD.

View File

@ -1,39 +0,0 @@
@comment $OpenBSD: PFRAG.no-no_x11,v 1.6 2006/07/19 21:40:47 robert Exp $
bin/gmplayer
share/applications/
share/applications/mplayer.desktop
share/mplayer/
share/mplayer/skins/
share/mplayer/skins/default/
share/mplayer/skins/default/README
share/mplayer/skins/default/VERSION
share/mplayer/skins/default/about.png
share/mplayer/skins/default/back.png
share/mplayer/skins/default/eq.png
share/mplayer/skins/default/eqb.png
share/mplayer/skins/default/exit.png
share/mplayer/skins/default/font.fnt
share/mplayer/skins/default/font.png
share/mplayer/skins/default/forward.png
share/mplayer/skins/default/fsb.png
share/mplayer/skins/default/iconify.png
share/mplayer/skins/default/load.png
share/mplayer/skins/default/main.png
share/mplayer/skins/default/menu.png
share/mplayer/skins/default/menus.png
share/mplayer/skins/default/next.png
share/mplayer/skins/default/pause.png
share/mplayer/skins/default/play.png
share/mplayer/skins/default/playbar.png
share/mplayer/skins/default/plb.png
share/mplayer/skins/default/pos.png
share/mplayer/skins/default/prev.png
share/mplayer/skins/default/skin
share/mplayer/skins/default/stop.png
share/mplayer/skins/default/sub.png
share/mplayer/skins/default/subload.png
share/mplayer/skins/default/symbols.fnt
share/mplayer/skins/default/symbols.png
share/mplayer/skins/default/volume.png
share/pixmaps/
share/pixmaps/mplayer.xpm

View File

@ -1,15 +1,16 @@
@comment $OpenBSD: PLIST,v 1.23 2008/07/09 02:19:36 jakemsr Exp $
@comment $OpenBSD: PLIST,v 1.24 2009/10/11 13:36:23 edd Exp $
@bin bin/mencoder
@bin bin/mplayer
@man man/man1/mencoder.1
@man man/man1/mplayer.1
share/doc/mplayer/
share/doc/mplayer/README.OpenBSD
share/doc/mplayer/aalib.html
share/doc/mplayer/advaudio-channels.html
share/doc/mplayer/advaudio-surround.html
share/doc/mplayer/advaudio-volume.html
share/doc/mplayer/advaudio.html
share/doc/mplayer/aspect.html
share/doc/mplayer/audio-codecs.html
share/doc/mplayer/audio-formats.html
share/doc/mplayer/audio.html
share/doc/mplayer/bsd.html
share/doc/mplayer/bugreports.html
share/doc/mplayer/bugreports_advusers.html
@ -19,30 +20,24 @@ share/doc/mplayer/bugreports_report.html
share/doc/mplayer/bugreports_security.html
share/doc/mplayer/bugreports_what.html
share/doc/mplayer/bugreports_where.html
share/doc/mplayer/bugs-audio.html
share/doc/mplayer/bugs-special.html
share/doc/mplayer/bugs.html
share/doc/mplayer/caca.html
share/doc/mplayer/cd-dvd.html
share/doc/mplayer/codec-importing.html
share/doc/mplayer/codecs.html
share/doc/mplayer/codec-installation.html
share/doc/mplayer/commandline.html
share/doc/mplayer/containers.html
share/doc/mplayer/control.html
share/doc/mplayer/dfbmga.html
share/doc/mplayer/dga.html
share/doc/mplayer/directfb.html
share/doc/mplayer/drives.html
share/doc/mplayer/dummy.html
share/doc/mplayer/dvd.html
share/doc/mplayer/edl.html
share/doc/mplayer/encoding-guide.html
share/doc/mplayer/exotic_platforms.html
share/doc/mplayer/faq.html
share/doc/mplayer/fbdev.html
share/doc/mplayer/features.html
share/doc/mplayer/fonts-osd.html
share/doc/mplayer/gui.html
share/doc/mplayer/history.html
share/doc/mplayer/howtoread.html
share/doc/mplayer/index.html
share/doc/mplayer/install.html
@ -87,10 +82,8 @@ share/doc/mplayer/softreq.html
share/doc/mplayer/streaming.html
share/doc/mplayer/subosd.html
share/doc/mplayer/svgalib.html
share/doc/mplayer/sync.html
share/doc/mplayer/tdfx_vid.html
share/doc/mplayer/tdfxfb.html
share/doc/mplayer/troubleshooting.html
share/doc/mplayer/tv-input.html
share/doc/mplayer/tv-teletext.html
share/doc/mplayer/tv.html
@ -99,8 +92,6 @@ share/doc/mplayer/unix.html
share/doc/mplayer/usage.html
share/doc/mplayer/vcd.html
share/doc/mplayer/vesa.html
share/doc/mplayer/video-codecs.html
share/doc/mplayer/video-formats.html
share/doc/mplayer/video.html
share/doc/mplayer/vidix.html
share/doc/mplayer/windows.html
@ -114,5 +105,4 @@ share/examples/mplayer/input.conf
share/examples/mplayer/menu.conf
@sample ${CONFDIR}/menu.conf
share/examples/mplayer/mplayer.conf
!%%no_x11%%
@extraunexec rm -rf ${CONFDIR}