diff options
author | zuntum <zuntum> | 2001-12-26 00:58:04 +0000 |
---|---|---|
committer | zuntum <zuntum> | 2001-12-26 00:58:04 +0000 |
commit | d449776d8d230fed4a4cabae0fff123e96acb126 (patch) | |
tree | 599e018b3c969a2883610d707509976e11cb35b6 /graphics | |
parent | b2798518b365cb0a683c829a2ef05394f4cba250 (diff) | |
download | pkgsrc-d449776d8d230fed4a4cabae0fff123e96acb126.tar.gz |
Update mplayer package to 0.60pre1
No ChangeLog found, but a lot has changed since previous pkgsrc
release (0.18pre1), so you definitely want to upgrade.
Update provided by Sergey Svishchev <svs@ropnet.ru> - thanks!
Diffstat (limited to 'graphics')
35 files changed, 453 insertions, 1943 deletions
diff --git a/graphics/mplayer/DESCR b/graphics/mplayer/DESCR index 5c04a0d2a78..290a89c0b28 100644 --- a/graphics/mplayer/DESCR +++ b/graphics/mplayer/DESCR @@ -1,9 +1,13 @@ -MPlayer is a movie player for UNIX. It plays most MPEG, AVI and ASF files, -supported by many native and Win32 DLL codecs. You can watch VCD, DVD and even -DivX movies too. The another big feature of mplayer is the wide range of -supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, -but you can use SDL (and this way all drivers of SDL, for example AAlib) and -some lowlevel card-specific drivers (for Matrox) too! Most of them supports -software or hardware scaling, so you can enjoy movies in fullscreen. And what -about the nice big antialiased shaded subtitles (7 supported types!!!) with -hungarian, english, cyrillic, czech, korean fonts, and OSD? +MPlayer is a movie player for LINUX (though it runs on most Unices, +and even on non-x86 architectures). It plays most MPEG, AVI and +ASF files (also some QT/MOV files, with CVID, VP31 video, and raw +audio), supported by many native and win32 DLL codecs. You can +watch VCD, DVD and even DivX movies too. The another big feature +of mplayer is the wide range of supported output drivers. It works +with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, but you can use SDL (and +this way all drivers of SDL) and some lowlevel card-specific drivers +(for Matrox/3dfx/SiS) too! Most of them supports software or hardware +scaling, so you can enjoy movies in fullscreen. 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... diff --git a/graphics/mplayer/MESSAGE b/graphics/mplayer/MESSAGE new file mode 100644 index 00000000000..0999d9284fa --- /dev/null +++ b/graphics/mplayer/MESSAGE @@ -0,0 +1,6 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1 2001/12/26 00:58:04 zuntum Exp $ + +Apply patch from PR 13695 to get functional '-vo dga' on i386. + +=========================================================================== diff --git a/graphics/mplayer/Makefile b/graphics/mplayer/Makefile index 711ecf4e9e5..94f1feeeb1c 100644 --- a/graphics/mplayer/Makefile +++ b/graphics/mplayer/Makefile @@ -1,11 +1,10 @@ -# $NetBSD: Makefile,v 1.7 2001/12/25 18:38:00 zuntum Exp $ -# +# $NetBSD: Makefile,v 1.8 2001/12/26 00:58:04 zuntum Exp $ -DISTNAME= MPlayer-0.18pre -PKGNAME= mplayer-0.18.0.1 +DISTNAME= MPlayer-0.60pre1 +PKGNAME= mplayer-0.60 CATEGORIES= graphics -MASTER_SITES= http://zuntum.utech.lublin.pl/distfiles/ -EXTRACT_SUFX= .tgz +MASTER_SITES= http://mp.dev.hu/MPlayer/releases/ +EXTRACT_SUFX= .tar.bz2 MAINTAINER= svs@ropnet.ru,zuntum@netbsd.org HOMEPAGE= http://www.mplayerhq.hu/ @@ -15,6 +14,7 @@ ONLY_FOR_PLATFORM= NetBSD-1.5[Y-Z]*-i386 DEPENDS+= win32-codecs>=010122:../../graphics/win32-codecs BUILD_DEPENDS+= nasm>=0.98:../../devel/nasm +REPLACE_BUILDLINK_PATTERNS+= *.mak RESTRICTED= "unsure of the license" NO_BIN_ON_CDROM= ${RESTRICTED} @@ -24,27 +24,26 @@ USE_X11= YES USE_GMAKE= YES HAS_CONFIGURE= YES -WRKSRC= ${WRKDIR}/MPlayer-0.18pre5 +WRKSRC= ${WRKDIR}/${DISTNAME} CONFIGURE_ARGS+= --prefix="${PREFIX}" CONFIGURE_ARGS+= --with-extraincdir="${BUILDLINK_DIR}/include" -CONFIGURE_ARGS+= --with-extralibdir="${BUILDLINK_DIR}/lib" +CONFIGURE_ARGS+= --with-extralibdir="${LOCALBASE}/lib" CONFIGURE_ARGS+= --with-win32libdir="${LOCALBASE}/lib/win32" -#CONFIGURE_ARGS+= --disable-gcc-checking CONFIGURE_ARGS+= --disable-css -CONFIGURE_ARGS+= --disable-streaming -post-patch: - cd ${WRKSRC} && for i in TOOLS/audio-block.c TOOLS/audio-block2.c TOOLS/audio-select.c \ - libao2/ao_oss.c mp3lib/test2.c libac3/test2.c; do \ - ${SED} "s,\/dev\/dsp,\/dev\/audio,g" $${i} >> $${i}.done; \ - ${MV} -f $${i}.done $${i}; \ - done; +post-configure: + ${CP} ${FILESDIR}/vcd_read_nbsd.c ${WRKSRC}/libmpdemux/vcd_read_nbsd.h -post-install: +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/mplayer ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/DOCS/mplayer.1 ${PREFIX}/man/man1 ${INSTALL_DATA_DIR} ${PREFIX}/share/mplayer + ${INSTALL_DATA} ${WRKSRC}/etc/codecs.conf ${PREFIX}/share/mplayer ${CP} -R ${WRKSRC}/DOCS ${PREFIX}/share/mplayer +.include "../../audio/lame/buildlink.mk" .include "../../devel/SDL/buildlink.mk" .include "../../graphics/png/buildlink.mk" +.include "../../mk/ossaudio.buildlink.mk" .include "../../mk/bsd.pkg.mk" diff --git a/graphics/mplayer/PLIST b/graphics/mplayer/PLIST index 02cbc64958a..52023340f76 100644 --- a/graphics/mplayer/PLIST +++ b/graphics/mplayer/PLIST @@ -1,56 +1,57 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2001/12/21 23:38:52 zuntum Exp $ +@comment $NetBSD: PLIST,v 1.2 2001/12/26 00:58:04 zuntum Exp $ bin/mplayer man/man1/mplayer.1 -share/mplayer/DOCS/AUTHORS -share/mplayer/DOCS/BUGREPORTS -share/mplayer/DOCS/BUGS -share/mplayer/DOCS/CDROM -share/mplayer/DOCS/CODECS -share/mplayer/DOCS/ChangeLog -share/mplayer/DOCS/ChangeLog.mpeg -share/mplayer/DOCS/DEBIAN -share/mplayer/DOCS/DGA -share/mplayer/DOCS/DVD -share/mplayer/DOCS/DVD-FAQ -share/mplayer/DOCS/FREEBSD -share/mplayer/DOCS/German/BUGREPORTS -share/mplayer/DOCS/German/CDROM -share/mplayer/DOCS/German/CODECS -share/mplayer/DOCS/German/DEBIAN -share/mplayer/DOCS/Hungarian/BUGREPORTS -share/mplayer/DOCS/Hungarian/CDROM -share/mplayer/DOCS/Hungarian/CODECS -share/mplayer/DOCS/Hungarian/DEBIAN -share/mplayer/DOCS/Hungarian/DGA -share/mplayer/DOCS/Hungarian/DVD -share/mplayer/DOCS/Hungarian/DVD-FAQ -share/mplayer/DOCS/Hungarian/FREEBSD -share/mplayer/DOCS/Hungarian/INSTALL -share/mplayer/DOCS/Hungarian/LIRC -share/mplayer/DOCS/Hungarian/MPlayer-FAQ -share/mplayer/DOCS/Hungarian/MTRR -share/mplayer/DOCS/Hungarian/OpenDivX -share/mplayer/DOCS/Hungarian/README -share/mplayer/DOCS/Hungarian/SDL -share/mplayer/DOCS/Hungarian/SOUNDCARDS -share/mplayer/DOCS/Hungarian/TVout-G400 -share/mplayer/DOCS/Hungarian/Translator -share/mplayer/DOCS/Hungarian/VIDEOCARDS +share/mplayer/DOCS/DVB +share/mplayer/DOCS/DXR3 +share/mplayer/DOCS/French/bugreports.html +share/mplayer/DOCS/French/cd-dvd.html +share/mplayer/DOCS/French/codecs.html +share/mplayer/DOCS/French/documentation.html +share/mplayer/DOCS/French/exemple.conf +share/mplayer/DOCS/French/faq.html +share/mplayer/DOCS/French/skin-fr.html +share/mplayer/DOCS/French/sound.html +share/mplayer/DOCS/French/video.html +share/mplayer/DOCS/German/bugreports.html +share/mplayer/DOCS/German/cd-dvd.html +share/mplayer/DOCS/German/codecs.html +share/mplayer/DOCS/German/documentation.html +share/mplayer/DOCS/German/encoding.html +share/mplayer/DOCS/German/faq.html +share/mplayer/DOCS/German/formats.html +share/mplayer/DOCS/German/gcc-2.96-3.0.html +share/mplayer/DOCS/German/sound.html +share/mplayer/DOCS/German/video.html +share/mplayer/DOCS/Hungarian/bugreports.html +share/mplayer/DOCS/Hungarian/cd-dvd.html +share/mplayer/DOCS/Hungarian/codecs.html +share/mplayer/DOCS/Hungarian/documentation.html +share/mplayer/DOCS/Hungarian/encoding.html share/mplayer/DOCS/Hungarian/example.conf -share/mplayer/DOCS/INSTALL -share/mplayer/DOCS/LIRC -share/mplayer/DOCS/MAINTAINERS -share/mplayer/DOCS/MPlayer-FAQ -share/mplayer/DOCS/MTRR -share/mplayer/DOCS/OpenDivX -share/mplayer/DOCS/Polish/BUGREPORTS -share/mplayer/DOCS/Polish/BUGS -share/mplayer/DOCS/Polish/Debian -share/mplayer/DOCS/Polish/FreeBSD -share/mplayer/DOCS/Polish/README -share/mplayer/DOCS/Polish/SUB+OSD -share/mplayer/DOCS/README -share/mplayer/DOCS/Requirements +share/mplayer/DOCS/Hungarian/faq.html +share/mplayer/DOCS/Hungarian/formats.html +share/mplayer/DOCS/Hungarian/mplayer.1 +share/mplayer/DOCS/Hungarian/skin-hu.html +share/mplayer/DOCS/Hungarian/sound.html +share/mplayer/DOCS/Hungarian/video.html +share/mplayer/DOCS/Polish/DVB +share/mplayer/DOCS/Polish/DXR3 +share/mplayer/DOCS/Polish/bugreports.html +share/mplayer/DOCS/Polish/cd-dvd.html +share/mplayer/DOCS/Polish/codecs-in.html +share/mplayer/DOCS/Polish/codecs.html +share/mplayer/DOCS/Polish/documentation.html +share/mplayer/DOCS/Polish/encoding.html +share/mplayer/DOCS/Polish/faq.html +share/mplayer/DOCS/Polish/formats.html +share/mplayer/DOCS/Polish/gcc-2.96-3.0.html +share/mplayer/DOCS/Polish/mencoder.1 +share/mplayer/DOCS/Polish/mplayer.1 +share/mplayer/DOCS/Polish/skin-en.html +share/mplayer/DOCS/Polish/sound.html +share/mplayer/DOCS/Polish/users_against_developers.html +share/mplayer/DOCS/Polish/video.html +share/mplayer/DOCS/Russian/BUGS share/mplayer/DOCS/Russian/CODECS share/mplayer/DOCS/Russian/DEBIAN share/mplayer/DOCS/Russian/DGA @@ -67,11 +68,6 @@ share/mplayer/DOCS/Russian/install share/mplayer/DOCS/Russian/lirc share/mplayer/DOCS/Russian/mtrr share/mplayer/DOCS/Russian/sdl -share/mplayer/DOCS/SDL -share/mplayer/DOCS/SOLARIS -share/mplayer/DOCS/SOUNDCARDS -share/mplayer/DOCS/SPEED -share/mplayer/DOCS/SUB+OSD share/mplayer/DOCS/Spanish/BUGREPORTS share/mplayer/DOCS/Spanish/CDROM share/mplayer/DOCS/Spanish/DEBIAN @@ -94,21 +90,37 @@ share/mplayer/DOCS/Spanish/TVout-G400 share/mplayer/DOCS/Spanish/Translator share/mplayer/DOCS/Spanish/VIDEOCARDS share/mplayer/DOCS/Spanish/example.conf -share/mplayer/DOCS/TODO -share/mplayer/DOCS/TVout-G400 -share/mplayer/DOCS/VIDEOCARDS +share/mplayer/DOCS/bugreports.html +share/mplayer/DOCS/cd-dvd.html share/mplayer/DOCS/codecs-in.html -share/mplayer/DOCS/codecs.conf -share/mplayer/DOCS/example.conf -share/mplayer/DOCS/inttypes.h +share/mplayer/DOCS/codecs.html +share/mplayer/DOCS/documentation.html +share/mplayer/DOCS/encoding.html +share/mplayer/DOCS/faq.html +share/mplayer/DOCS/formats.html +share/mplayer/DOCS/gcc-2.96-3.0.html +share/mplayer/DOCS/mencoder.1 share/mplayer/DOCS/mplayer.1 -share/mplayer/DOCS/mpsub.sub -share/mplayer/DOCS/tech-eng.txt -share/mplayer/DOCS/tech-hun.txt +share/mplayer/DOCS/skin-en.html +share/mplayer/DOCS/sound.html +share/mplayer/DOCS/tech/TODO +share/mplayer/DOCS/tech/cvs-howto.txt +share/mplayer/DOCS/tech/formats-hun.txt +share/mplayer/DOCS/tech/formats.txt +share/mplayer/DOCS/tech/libvo2.txt +share/mplayer/DOCS/tech/mpsub.sub +share/mplayer/DOCS/tech/patches.txt +share/mplayer/DOCS/tech/tech-eng.txt +share/mplayer/DOCS/tech/tech-hun.txt +share/mplayer/DOCS/users_against_developers.html +share/mplayer/DOCS/video.html +share/mplayer/codecs.conf +@dirrm share/mplayer/DOCS/tech @dirrm share/mplayer/DOCS/Spanish @dirrm share/mplayer/DOCS/Russian @dirrm share/mplayer/DOCS/Polish @dirrm share/mplayer/DOCS/Hungarian @dirrm share/mplayer/DOCS/German +@dirrm share/mplayer/DOCS/French @dirrm share/mplayer/DOCS @dirrm share/mplayer diff --git a/graphics/mplayer/distinfo b/graphics/mplayer/distinfo index ccd6bbc98cc..b445c6be2f8 100644 --- a/graphics/mplayer/distinfo +++ b/graphics/mplayer/distinfo @@ -1,33 +1,12 @@ -$NetBSD: distinfo,v 1.2 2001/12/21 23:58:27 zuntum Exp $ +$NetBSD: distinfo,v 1.3 2001/12/26 00:58:04 zuntum Exp $ -SHA1 (MPlayer-0.18pre.tgz) = ac440d64d69e26ca9bbc4df8b451c27857e1bd1a -Size (MPlayer-0.18pre.tgz) = 1012232 bytes -SHA1 (patch-aa) = ed1f58f04703e808d8c7daff6d9c7f0113ba540e -SHA1 (patch-ab) = b10669d5577ecaf7ce67aabb8756a3140cdac5dc -SHA1 (patch-ac) = 0abea756448a47177005383fe1cb2dc87cf09c31 -SHA1 (patch-ad) = bb8754bdea394818e6227b262b4ab73d7b530bd7 -SHA1 (patch-ae) = 3c1654794454ebc906a7999fdcd04ef020a0b0f2 -SHA1 (patch-af) = ef6b4e816fe3efdd14bea9c30af7627342638e32 -SHA1 (patch-ag) = 1158ed93f6f8d594e18eaefb87f78684f4a93a7d -SHA1 (patch-ah) = fd8a2145f33c2e0769aa8012d41f9ed819458536 -SHA1 (patch-ai) = 7f4fc4e9b69c40002c2df615f4f8dedb9388516f -SHA1 (patch-aj) = 431b917c225d8667899ffeac2fc4f6fa1fa61764 -SHA1 (patch-ak) = 97821c28cce2ce8b04881d962b9e0fe8e0c423ac -SHA1 (patch-al) = d2fb5274f852ac8bb31c580bff4dfc941660202c -SHA1 (patch-am) = dbbc8131be35d2c88680e0e32181df059cc55838 -SHA1 (patch-an) = 713c67e276713e8bfac493b740a8b4708700a0ec -SHA1 (patch-ao) = 6f7fccf574ddc551886dd2ccdd87a15444319539 -SHA1 (patch-ap) = ab3b94fc31654b03ff98e3d2ab9906b32ef81050 -SHA1 (patch-aq) = 12363063cb68e9f101697f926fd2b2e19d434dec -SHA1 (patch-ar) = 9cca7efe82d8d73c0b7046293083cfd86cefc5cb -SHA1 (patch-as) = 22efcab70397cd2fbeb1310b3a60fd499ae6e932 -SHA1 (patch-at) = dececd42336eadf991ec4029e001099554d01ed5 -SHA1 (patch-au) = ebb03b8b115d67386c99c2d1d3d9a76719687186 -SHA1 (patch-av) = 2a7c2650b16357ad1aafa055a62b09a9ac89941a -SHA1 (patch-ax) = 92f88b1e7542d88e39784d3c68b861146f420eab -SHA1 (patch-ay) = 68af26124eb96348098b382cb70d44134fe9b2d2 -SHA1 (patch-az) = a7b18e6efcea21d057e6cb184002a56aba0c78f8 -SHA1 (patch-ba) = 90978e82a64c1545ab3ae5f9f8179491e0600320 -SHA1 (patch-bb) = 5ddcb4dd8fa95a1d0130fb92525926aa5614fa36 -SHA1 (patch-bc) = c1676330aec9cdb7ef206eb803613ab8684bc775 -SHA1 (patch-bd) = 4130fd3302879edc6de79089f6805ea5ebafbe26 +SHA1 (MPlayer-0.60pre1.tar.bz2) = c3af1cf1c4ac6f3bb8a88d5d25acb33086fd2acd +Size (MPlayer-0.60pre1.tar.bz2) = 1905451 bytes +SHA1 (patch-aa) = 1e626d0312631e441d126a89314f4e4e6d177e1f +SHA1 (patch-ab) = b57033b07b789917dc2f576e34dacf06e90fc824 +SHA1 (patch-ac) = 0061804974919d44ae911bcd6a8f56637869e810 +SHA1 (patch-ad) = 2caecb946658925f20874a2aff61afc972354a37 +SHA1 (patch-ae) = 84db805213925f9ebc511de56f723ba29147ba99 +SHA1 (patch-af) = c2189af1b14f8f541242106c55d41827f8eec716 +SHA1 (patch-ag) = bfbae41a30a7f0c9440ece02e3f2eadd1fca87a1 +SHA1 (patch-ah) = 506cda70793d84342b035570b428cb7b566b622e diff --git a/graphics/mplayer/files/vcd_read_nbsd.c b/graphics/mplayer/files/vcd_read_nbsd.c new file mode 100644 index 00000000000..b8d28ae6851 --- /dev/null +++ b/graphics/mplayer/files/vcd_read_nbsd.c @@ -0,0 +1,200 @@ +/* $NetBSD: vcd_read_nbsd.c,v 1.1 2001/12/26 00:58:05 zuntum Exp $ */ + +#include <sys/types.h> +#include <sys/inttypes.h> +#include <sys/cdio.h> +#include <sys/scsiio.h> + +#define HAVE_VCD + +#define CDROM_LEADOUT 0xAA + +static struct ioc_read_toc_entry vcd_entry; +static struct cd_toc_entry vcd_entry_data; +static char vcd_buf[VCD_SECTOR_SIZE]; + +static inline void +vcd_set_msf(unsigned int sect) +{ + unsigned int s = sect; + vcd_entry_data.addr.msf.frame = sect % 75; + sect = sect / 75; + vcd_entry_data.addr.msf.second = sect % 60; + sect = sect / 60; + vcd_entry_data.addr.msf.minute = sect; +} + +static inline unsigned int +vcd_get_msf() +{ + return vcd_entry_data.addr.msf.frame + + (vcd_entry_data.addr.msf.second + + vcd_entry_data.addr.msf.minute * 60) * 75; +} + +int +vcd_seek_to_track(int fd, int track) +{ + vcd_entry.address_format = CD_MSF_FORMAT; + vcd_entry.starting_track = track; + vcd_entry.data_len = sizeof(struct cd_toc_entry); + vcd_entry.data = &vcd_entry_data; + if (ioctl(fd, CDIOREADTOCENTRIES, &vcd_entry)) { + perror("ioctl dif1"); + return -1; + } + return VCD_SECTOR_DATA * vcd_get_msf(); +} + +int +vcd_get_track_end(int fd, int track) +{ + struct ioc_toc_header tochdr; + if (ioctl(fd, CDIOREADTOCHEADER, &tochdr) == -1) { + perror("read CDROM toc header: "); + return -1; + } + vcd_entry.address_format = CD_MSF_FORMAT; + vcd_entry.starting_track = track < tochdr.ending_track ? (track + 1) : CDROM_LEADOUT; + vcd_entry.data_len = sizeof(struct cd_toc_entry); + vcd_entry.data = &vcd_entry_data; + if (ioctl(fd, CDIOREADTOCENTRYS, &vcd_entry)) { + perror("ioctl dif2"); + return -1; + } + return VCD_SECTOR_DATA * vcd_get_msf(); +} + +void +vcd_read_toc(int fd) +{ + struct ioc_toc_header tochdr; + int i; + if (ioctl(fd, CDIOREADTOCHEADER, &tochdr) == -1) { + perror("read CDROM toc header: "); + return; + } + for (i = tochdr.starting_track; i <= tochdr.ending_track; i++) { + struct ioc_read_toc_entry tocentry; + struct cd_toc_entry tocentry_data; + + tocentry.starting_track = i; + tocentry.address_format = CD_MSF_FORMAT; + tocentry.data_len = sizeof(struct cd_toc_entry); + tocentry.data = &tocentry_data; + + if (ioctl(fd, CDIOREADTOCENTRYS, &tocentry) == -1) { + perror("read CDROM toc entry: "); + return; + } + printf("track %02d: adr=%d ctrl=%d format=%d %02d:%02d:%02d\n", + (int) tocentry.starting_track, + (int) tocentry.data->addr_type, + (int) tocentry.data->control, + (int) tocentry.address_format, + (int) tocentry.data->addr.msf.minute, + (int) tocentry.data->addr.msf.second, + (int) tocentry.data->addr.msf.frame + ); + } +} + +static int +vcd_read(int fd, char *mem) +{ + struct scsireq sc; + int lba = vcd_get_msf(); + int blocks; + int sector_type; + int sync, header_code, user_data, edc_ecc, error_field; + int sub_channel; + int rc; + + blocks = 1; + sector_type = 5; /* mode2/form2 */ + sync = 0; + header_code = 0; + user_data = 1; + edc_ecc = 0; + error_field = 0; + sub_channel = 0; + + memset(&sc, 0, sizeof(sc)); + sc.cmd[0] = 0xBE; + sc.cmd[1] = (sector_type) << 2; + sc.cmd[2] = (lba >> 24) & 0xff; + sc.cmd[3] = (lba >> 16) & 0xff; + sc.cmd[4] = (lba >> 8) & 0xff; + sc.cmd[5] = lba & 0xff; + sc.cmd[6] = (blocks >> 16) & 0xff; + sc.cmd[7] = (blocks >> 8) & 0xff; + sc.cmd[8] = blocks & 0xff; + sc.cmd[9] = (sync << 7) | (header_code << 5) | (user_data << 4) | + (edc_ecc << 3) | (error_field << 1); + sc.cmd[10] = sub_channel; + sc.cmdlen = 12; + sc.databuf = (caddr_t) mem; + sc.datalen = 2328; + sc.senselen = sizeof(sc.sense); + sc.flags = SCCMD_READ; + sc.timeout = 10000; + rc = ioctl(fd, SCIOCCOMMAND, &sc); + if (rc == -1) { + perror("SCIOCCOMMAND"); + return -1; + } + if (sc.retsts || sc.error) { + fprintf(stderr, "scsi command failed: status %d error %d\n", sc.retsts, + sc.error); + return -1; + } + return VCD_SECTOR_DATA; +} + +#ifdef VCD_CACHE + +static int vcd_cache_size = 0; +static char *vcd_cache_data = NULL; +static int *vcd_cache_sectors = NULL; +static int vcd_cache_index = 0; +static int vcd_cache_current = -1; + +void +vcd_cache_init(int s) +{ + vcd_cache_size = s; + vcd_cache_sectors = malloc(s * sizeof(int)); + vcd_cache_data = malloc(s * VCD_SECTOR_SIZE); + memset(vcd_cache_sectors, 255, s * sizeof(int)); +} + +static inline void +vcd_cache_seek(int sect) +{ + vcd_cache_current = sect; +} + +int +vcd_cache_read(int fd, char *mem) +{ + int i; + char *vcd_buf; + for (i = 0; i < vcd_cache_size; i++) + if (vcd_cache_sectors[i] == vcd_cache_current) { + vcd_buf = &vcd_cache_data[i * VCD_SECTOR_SIZE]; + ++vcd_cache_current; + memcpy(mem, &vcd_buf[VCD_SECTOR_OFFS], VCD_SECTOR_DATA); + return VCD_SECTOR_DATA; + } + vcd_buf = &vcd_cache_data[vcd_cache_index * VCD_SECTOR_SIZE]; + vcd_cache_sectors[vcd_cache_index] = vcd_cache_current; + ++vcd_cache_index; + if (vcd_cache_index >= vcd_cache_size) + vcd_cache_index = 0; + vcd_set_msf(vcd_cache_current); + memcpy(vcd_buf, &vcd_entry_data.addr.msf, sizeof(vcd_entry_data.addr.msf)); + ++vcd_cache_current; + memcpy(mem, &vcd_buf[VCD_SECTOR_OFFS], VCD_SECTOR_DATA); + return VCD_SECTOR_DATA; +} +#endif diff --git a/graphics/mplayer/patches/patch-aa b/graphics/mplayer/patches/patch-aa index c7d96817ff3..9023a37e512 100644 --- a/graphics/mplayer/patches/patch-aa +++ b/graphics/mplayer/patches/patch-aa @@ -1,30 +1,21 @@ -$NetBSD: patch-aa,v 1.2 2001/12/25 18:02:08 wiz Exp $ ---- Makefile.orig Sun Jul 8 04:21:20 2001 -+++ Makefile Mon Jul 30 22:13:00 2001 -@@ -16,7 +16,7 @@ - #prefix = /usr/local - BINDIR = ${prefix}/bin - # BINDIR = /usr/local/bin --SRCS = find_sub.c aviprint.c dll_init.c dec_audio.c dec_video.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c $(STREAM_SRCS) -+SRCS = find_sub.c aviprint.c dll_init.c dec_audio.c dec_video.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c dvdauth.c spudec.c $(STREAM_SRCS) - OBJS = $(SRCS:.c=.o) - CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall - A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB) -@@ -85,14 +85,9 @@ - $(PRG_CFG): version.h codec-cfg.c codec-cfg.h - $(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML +$NetBSD: patch-aa,v 1.3 2001/12/26 00:58:05 zuntum Exp $ + +--- configure.in Sun Nov 25 13:42:15 2001 ++++ configure Sun Nov 25 14:12:54 2001 +@@ -1731,7 +1731,7 @@ + if test "$_ossaudio" = auto ; then + cat > $TMPC << EOF + #include <sys/soundcard.h> +-int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; } ++int main(void) { int arg = SOUND_VERSION; return 0; } + EOF + _ossaudio=no + cc_check && _ossaudio=yes +@@ -2397,6 +2397,7 @@ --install: $(PRG) $(PRG_FIBMAP) -- install -D -m 755 -s $(PRG) $(BINDIR)/$(PRG) -- install -D -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1 -- @echo "Following task requires root privs. If it fails don't panic" -- @echo "however it means you can't use fibmap_mplayer." -- @echo "Without this (or without running mplayer as root) you won't be" -- @echo "able to play DVDs." -- install -D -o root -g root -m 4755 -s $(PRG_FIBMAP) $(BINDIR)/$(PRG_FIBMAP) -+install: $(PRG) -+ install -c -m 755 $(PRG) $(BINDIR)/$(PRG) -+ install -c -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1 + _ld_arch="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic" + bsdos && _ld_arch="$_ld_arch -ldvd" ++netbsd && _ld_arch="$_ld_arch -li386 -lossaudio" - clean: - rm -f *.o *~ $(OBJS) + _def_debug='#undef MP_DEBUG' + test "$_debug" && _def_debug='#define MP_DEBUG 1' diff --git a/graphics/mplayer/patches/patch-ab b/graphics/mplayer/patches/patch-ab index e858a34d241..842b9dfeb72 100644 --- a/graphics/mplayer/patches/patch-ab +++ b/graphics/mplayer/patches/patch-ab @@ -1,196 +1,21 @@ -$NetBSD: patch-ab,v 1.1.1.1 2001/12/21 23:38:52 zuntum Exp $ +$NetBSD: patch-ab,v 1.2 2001/12/26 00:58:05 zuntum Exp $ ---- configure.orig Fri Jul 6 22:00:22 2001 -+++ configure -@@ -183,8 +183,12 @@ - if [ "$system_name" = "FreeBSD" ]; then - _archlibs="-rdynamic -pthread" - else -+if [ "$system_name" = "NetBSD" ]; then -+_archlibs="-li386 -lpthread -lossaudio" -+else - _archlibs="-ldl -lpthread" - fi -+fi - - # LGB: temporary files - -@@ -236,11 +240,6 @@ - _x11incdir=-I/usr/X11/include - fi - --# Lots of stuff are installed under /usr/local -- --_extralibdir=-L/usr/local/lib --_extraincdir=-I/usr/local/include -- - _skip_cc_check=no - _skip_as_check=no - if [ "$system_name" = "FreeBSD" ]; then -@@ -280,10 +279,10 @@ - _sdlconfig=`echo $ac_option | cut -d '=' -f 2` - ;; +--- configure.orig Tue Dec 25 23:00:07 2001 ++++ configure Tue Dec 25 22:58:10 2001 +@@ -233,6 +233,7 @@ + ;; --with-extralibdir=*) -- _extralibdir=-L`echo $ac_option | cut -d '=' -f 2` -+ _extralibdir=`echo $ac_option | cut -d '=' -f 2` - ;; - --with-extraincdir=*) -- _extraincdir=-I`echo $ac_option | cut -d '=' -f 2` -+ _extraincdir=`echo $ac_option | cut -d '=' -f 2` - ;; - esac + _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` ++ _ld_extra="${_ld_extra} -Wl,-R"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` + ;; + esac done -@@ -584,13 +583,13 @@ - #echo "DONE (${proc})." - - --$_cc $_extraincdir $_extralibdir $TMPC -o $TMPO -lvgagl -lvga > /dev/null 2>&1 && _svga=yes -+$_cc -I$_extraincdir -L$_extralibdir $TMPC -o $TMPO -lvgagl -lvga > /dev/null 2>&1 && _svga=yes - - if [ "$system_name" = "FreeBSD" ]; then - $_cc $TMPC -o $TMPO -pthread > /dev/null 2>&1 || \ - { echo "Lib pthread not found."; rm -f $TMPC $TMPO $TMPS ; exit 1; } - else --$_cc $TMPC -o $TMPO -lpthread > /dev/null 2>&1 || \ -+$_cc $TMPC -I$_extraincdir -L$_extralibdir -o $TMPO -lpthread > /dev/null 2>&1 || \ - { echo "Lib pthread not found."; rm -f $TMPC $TMPO $TMPS ; exit 1; } - fi - -@@ -615,12 +614,8 @@ - - # Atmosfear: added libcss autodetect - _css=no --if test -s "/usr/local/lib/libcss.so" ; then -- _csslibdir="/usr/local/lib/" -- if test -s "/usr/local/include/css.h" ; then -- _cssincdir="/usr/local/include" -+if [ -s "$_extralibdir/libcss.so" -a -s "$_extraincdir/css.h" ]; then - _css=yes -- fi - else - if test -s "/usr/lib/libcss.so" ; then - _csslibdir="/usr/lib/" -@@ -635,7 +630,7 @@ - $_cc $TMPC -o $TMPO -ltermcap > /dev/null 2>&1 && _termcap=yes - - _png=no --$_cc $_extraincdir $_extralibdir $TMPC -o $TMPO -lpng -lz -lm > /dev/null 2>&1 && _png=yes -+$_cc -I$_extraincdir -L$_extralibdir $TMPC -o $TMPO -lpng -lz -lm > /dev/null 2>&1 && _png=yes - - _ggi=no - $_cc $TMPC -o $TMPO -lggi > /dev/null 2>&1 && _ggi=yes -@@ -664,7 +659,6 @@ - - if [ $_x11 = yes ]; then - --$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms $_socklib > /dev/null 2>&1 && _xdpms=yes - $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXv $_socklib > /dev/null 2>&1 && _xv=yes - $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXxf86vm $_socklib > /dev/null 2>&1 && _vm=yes - -@@ -682,7 +676,7 @@ - $_cc $_x11incdir $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL -pthread $_socklib > /dev/null 2>&1 || \ - { _gl=no; echo "GL includes not found!";} - else --$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL $_socklib > /dev/null 2>&1 || \ -+$_cc $_x11incdir $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL -lm $_socklib > /dev/null 2>&1 || \ - { _gl=no; echo "GL includes not found!";} - fi - -@@ -721,7 +715,7 @@ - - cat > $TMPC << EOF - #include <sys/soundcard.h> --int main( void ) { return 0; } -+int main( void ) { int arg = SOUND_VERSION; } - EOF - - _sys_soundcard_h=no -@@ -729,12 +723,16 @@ - - - cat > $TMPC << EOF --#include <sys/soundcard.h> --int main( void ) { int arg = SNDCTL_DSP_SETFRAGMENT; } -+#include <soundcard.h> -+int main( void ) { int arg = SOUND_VERSION; } - EOF - -+_soundcard_h=no -+$_cc -o $TMPO $TMPC 2> /dev/null && _soundcard_h=yes -+ - _oss_audio=no --$_cc -o $TMPO $TMPC 2> /dev/null && _oss_audio=yes -+test $_sys_soundcard_h = yes && _oss_audio=yes -+test $_soundcard_h = yes && _oss_audio=yes - - - cat > $TMPC << EOF -@@ -778,7 +776,7 @@ - int main( void ){ return 0; } - EOF - --$_cc $_extraincdir $_extralibdir -o $TMPO -lesd $TMPC 2> /dev/null || { _esd=no; } -+$_cc -I$_extraincdir -L$_extralibdir -o $TMPO -lesd $TMPC 2> /dev/null || { _esd=no; } - - # --- - -@@ -1015,6 +1013,13 @@ - esac - done - -+_datadir=$_prefix"/share/mplayer" -+ -+# Lots of stuff are installed under /usr/local -+ -+_extralibdir=${_prefix}/lib -+_extraincdir=${_prefix}/include -+ - # Checking assembler (_as) compatibility... - as_version=`$_as --version 2>&1 | sed -n 's/^.*assembler \([0-9.]*\).*$/\1/p'` - echo $_echo_n "Checking assembler ($_as) ... $as_version, $_echo_c" -@@ -1311,12 +1316,21 @@ - _sunaudio='#undef USE_SUN_AUDIO' - fi - -+if [ "$system_name" = "NetBSD" ]; then -+ _aosrc="$_aosrc ao_netbsd.c" -+fi -+ - if [ "$_sys_soundcard_h" = "yes" ]; then - _have_soundcard_h='#define HAVE_SYS_SOUNDCARD_H 1' - else - _have_soundcard_h='#undef HAVE_SYS_SOUNDCARD_H' - fi - -+if [ "$_soundcard_h" = "yes" ]; then -+ _have_soundcard_h='#define HAVE_SOUNDCARD_H 1' -+else -+ _have_soundcard_h='#undef HAVE_SOUNDCARD_H' -+fi - - # Checking for CFLAGS - if [ "$_profile" != "" ] || [ "$_debug" != "" ]; then -@@ -1524,12 +1538,12 @@ - CC=$_cc - # OPTFLAGS=-O4 $_profile $_debug -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math - OPTFLAGS=$CFLAGS --EXTRA_INC=$_extraincdir -+EXTRA_INC=-I$_extraincdir - WIN32_PATH=-DWIN32_PATH=\"$_win32libdir\" - - X11_INC=$_x11incdir - X11DIR=$_x11libdir --X_LIBS=$_x11libdir $_extralibdir $_gllib $_ggilib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng $_socklib -+X_LIBS=$_x11libdir -L$_extralibdir $_gllib $_ggilib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng $_socklib - - TERMCAP_LIB=$_libtermcap - XMM_LIBS = $_xmmplibs -@@ -1741,7 +1755,7 @@ +@@ -1986,7 +1986,7 @@ - EOF --if [ $_mtrr = yes ]; then -+if [ $_mtrr = yes -a -e /proc/mtrr ]; then - echo "Please check mtrr settings at /proc/mtrr (see DOCS/MTRR)" - echo - fi + echocheck "VCD support" +-if linux || bsdos || freebsd || sunos ; then ++if linux || bsdos || freebsd || netbsd || sunos ; then + _inputmodules="vcd $_inputmodules" + _def_vcd='#define HAVE_VCD 1' + echores "ok" diff --git a/graphics/mplayer/patches/patch-ac b/graphics/mplayer/patches/patch-ac index 31b02cdeb3b..e21c4b7aa1b 100644 --- a/graphics/mplayer/patches/patch-ac +++ b/graphics/mplayer/patches/patch-ac @@ -1,32 +1,29 @@ -$NetBSD: patch-ac,v 1.2 2001/12/25 18:02:08 wiz Exp $ ---- dvdauth.c.orig Thu Jun 21 04:06:40 2001 -+++ dvdauth.c Mon Jul 30 22:10:09 2001 -@@ -74,6 +74,14 @@ - * With the old libcss-0.1 api, we have to find out the LBA for - * a title for title authentication. - */ -+ -+int CSSDVDAuthTitlePath(DVDHandle hdl,unsigned char *key_title,char *path) -+{ -+ int lba=path_to_lba(path); -+ if (lba==-1) return -1; -+ return CSSAuthTitle(hdl,key_title,lba); -+} -+ - #ifdef __linux__ - #include <linux/fs.h> - #include <errno.h> -@@ -121,13 +129,6 @@ - return lba; - } +$NetBSD: patch-ac,v 1.3 2001/12/26 00:58:05 zuntum Exp $ + +--- Makefile.orig Fri Oct 19 22:53:42 2001 ++++ Makefile Fri Oct 19 23:09:34 2001 +@@ -170,18 +170,17 @@ + $(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML -- --int CSSDVDAuthTitlePath(DVDHandle hdl,unsigned char *key_title,char *path) --{ -- int lba=path_to_lba(path); -- if (lba==-1) return -1; -- return CSSAuthTitle(hdl,key_title,lba); --} - - - #else /*linux*/ + install: $(ALL_PRG) +- if test ! -d $(BINDIR) ; then mkdir -p $(BINDIR) ; fi +- $(INSTALL) -m 755 -s $(PRG) $(BINDIR)/$(PRG) ++ $(BSD_INSTALL_PROGRAM_DIR) $(BINDIR) ++ $(BSD_INSTALL_PROGRAM) $(PRG) $(BINDIR) + ifeq ($(GUI),yes) +- -ln -sf $(BINDIR)/$(PRG) $(BINDIR)/gmplayer ++ -ln -sf $(PRG) $(BINDIR)/gmplayer + endif +- if test ! -d $(MANDIR)/man1 ; then mkdir -p $(MANDIR)/man1; fi +- $(INSTALL) -c -m 644 DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1 ++ $(BSD_INSTALL_MAN) DOCS/mplayer.1 $(prefix)/man/man1/ + ifeq ($(MENCODER),yes) +- $(INSTALL) -m 755 -s $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER) +- $(INSTALL) -c -m 644 DOCS/mencoder.1 $(MANDIR)/man1/mencoder.1 ++ $(BSD_INSTALL_PROGRAM) $(PRG_MENCODER) $(BINDIR) ++ $(BSD_INSTALL_MAN) DOCS/mencoder.1 $(prefix)/man/man1/ + endif + + ifeq ($(CSS_USE),yes) + @echo "Following task requires root privs. If it fails don't panic" + @echo "however it means you can't use fibmap_mplayer." diff --git a/graphics/mplayer/patches/patch-ad b/graphics/mplayer/patches/patch-ad index 1b9f3c1cae8..82d356d804c 100644 --- a/graphics/mplayer/patches/patch-ad +++ b/graphics/mplayer/patches/patch-ad @@ -1,12 +1,16 @@ -$NetBSD: patch-ad,v 1.2 2001/12/25 18:02:08 wiz Exp $ ---- libao2/ao_alsa5.c.orig Tue Jun 12 18:13:26 2001 -+++ libao2/ao_alsa5.c Mon Jul 30 22:10:09 2001 -@@ -41,7 +41,7 @@ - static int alsa_rate = SND_PCM_RATE_CONTINUOUS; - - /* to set/get/query special features/parameters */ --static int control(int cmd, int arg) -+static int control(int cmd, void* arg) - { - return(CONTROL_UNKNOWN); - } +$NetBSD: patch-ad,v 1.3 2001/12/26 00:58:05 zuntum Exp $ + +--- libao2/ao_oss.c.orig Sun Nov 25 14:23:25 2001 ++++ libao2/ao_oss.c Sun Nov 25 14:25:16 2001 +@@ -254,9 +254,11 @@ + static float get_delay(){ + /* Calculate how many bytes/second is sent out */ + if(audio_delay_method==2){ ++#ifdef SNDCTL_DSP_GETODELAY + int r=0; + if(ioctl(audio_fd, SNDCTL_DSP_GETODELAY, &r)!=-1) + return ((float)r)/(float)ao_data.bps; ++#endif + audio_delay_method=1; // fallback if not supported + } + if(audio_delay_method==1){ diff --git a/graphics/mplayer/patches/patch-ae b/graphics/mplayer/patches/patch-ae index 3643b65ceb5..a4e27d6c193 100644 --- a/graphics/mplayer/patches/patch-ae +++ b/graphics/mplayer/patches/patch-ae @@ -1,12 +1,16 @@ -$NetBSD: patch-ae,v 1.2 2001/12/25 18:02:08 wiz Exp $ ---- libao2/ao_alsa9.c.orig Sat Jun 23 22:59:54 2001 -+++ libao2/ao_alsa9.c Mon Jul 30 22:10:09 2001 -@@ -47,7 +47,7 @@ - static int alsa_fragcount = 8; +$NetBSD: patch-ae,v 1.3 2001/12/26 00:58:05 zuntum Exp $ + +--- libmpdemux/stream.c.orig Fri Sep 28 00:36:53 2001 ++++ libmpdemux/stream.c Mon Oct 1 22:56:02 2001 +@@ -19,7 +19,11 @@ + #ifdef __FreeBSD__ + #include "vcd_read_fbsd.h" + #else ++#ifdef __NetBSD__ ++#include "vcd_read_nbsd.h" ++#else + #include "vcd_read.h" ++#endif + #endif - /* to set/get/query special features/parameters */ --static int control(int cmd, int arg) -+static int control(int cmd, void* arg) - { - switch(cmd) - { + #endif diff --git a/graphics/mplayer/patches/patch-af b/graphics/mplayer/patches/patch-af index c4df74557ac..1cfcc8c085e 100644 --- a/graphics/mplayer/patches/patch-af +++ b/graphics/mplayer/patches/patch-af @@ -1,264 +1,13 @@ -$NetBSD: patch-af,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- libao2/ao_netbsd.c.orig Thu Jan 1 03:00:00 1970 -+++ libao2/ao_netbsd.c Mon Jul 30 22:10:09 2001 -@@ -0,0 +1,260 @@ -+#include <stdio.h> -+#include <sys/ioctl.h> -+#include <sys/types.h> -+#include <sys/audioio.h> -+#include <fcntl.h> -+#include <unistd.h> -+ -+#include "../config.h" -+ -+#include "afmt.h" -+#include "audio_out.h" -+#include "audio_out_internal.h" -+ -+static ao_info_t info = -+{ -+ "NetBSD audio output", -+ "netbsd", -+ "Sergey Svishchev <svs@ropnet.ru>", -+ "" -+}; -+ -+LIBAO_EXTERN(netbsd) -+ static char *dsp = "/dev/sound"; -+ static int audio_fd = -1; -+ static char *mixer = "/dev/mixer"; -+ static int mixer_fd = -1; -+ static audio_info_t audio_info; -+ static mixer_ctrl_t mixer_pcm; -+ static mixer_ctrl_t mixer_master; -+ -+ static int control(int cmd, void *arg) -+{ -+ int rc; -+ mixer_ctrl_t *mc; -+ ao_control_vol_t *vol; -+ -+ switch (cmd) { -+ case AOCONTROL_SET_DEVICE: -+ if (arg) { -+ dsp = strdup((char *) arg); -+ return CONTROL_OK; -+ } else -+ return CONTROL_ERROR; -+ case AOCONTROL_QUERY_FORMAT: -+ return CONTROL_TRUE; -+ case AOCONTROL_SET_MIXER_DEVICE: -+ if (arg) { -+ mixer = strdup((char *) arg); -+ return CONTROL_OK; -+ } else -+ return CONTROL_ERROR; -+ case AOCONTROL_GET_VOLUME: -+ vol = (ao_control_vol_t *) arg; -+ mc = vol->usemaster ? &mixer_master : &mixer_pcm; -+ rc = ioctl(mixer_fd, AUDIO_MIXER_READ, mc); -+ if (rc == -1) -+ return CONTROL_ERROR; -+ switch (mc->un.value.num_channels) { -+ case 1: -+ vol->left = vol->right = -+ (float) mc->un.value.level[AUDIO_MIXER_LEVEL_MONO] / 2.55; -+ break; -+ case 2: -+ vol->left = -+ (float) mc->un.value.level[AUDIO_MIXER_LEVEL_LEFT] / 2.55; -+ vol->right = -+ (float) mc->un.value.level[AUDIO_MIXER_LEVEL_RIGHT] / 2.55; -+ break; -+ default: -+ } -+ return CONTROL_ERROR; -+ case AOCONTROL_SET_VOLUME: -+ vol = (ao_control_vol_t *) arg; -+ mc = vol->usemaster ? &mixer_master : &mixer_pcm; -+ switch (mc->un.value.num_channels) { -+ case 1: -+ vol->left = vol->right = -+ mc->un.value.level[AUDIO_MIXER_LEVEL_MONO] = (u_char) -+ (vol->left + vol->right) * 2.55 / 2.0; -+ break; -+ case 2: -+ mc->un.value.level[AUDIO_MIXER_LEVEL_LEFT] = -+ (u_char) (vol->left * 2.55); -+ mc->un.value.level[AUDIO_MIXER_LEVEL_RIGHT] = -+ (u_char) (vol->right * 2.55); -+ break; -+ default: -+ return CONTROL_ERROR; -+ } -+ rc = ioctl(mixer_fd, AUDIO_MIXER_WRITE, mc); -+ if (rc == -1) -+ return CONTROL_ERROR; -+ default: -+ } -+ return CONTROL_UNKNOWN; -+} -+ -+/* -+ * open & setup audio device. returns: 1 = success 0 = fail -+ */ -+static int -+init(int rate, int channels, int format, int flags) -+{ -+ int rc, mci, mco; -+ mixer_devinfo_t mi; -+ -+ audio_fd = open(dsp, O_WRONLY); -+ if (audio_fd < 0) { -+ perror("libao2(netbsd): Can't open audio device"); -+ return 0; -+ } -+ rc = ioctl(audio_fd, AUDIO_GETINFO, &audio_info); -+ if (rc < 0) { -+ perror("libao2(netbsd): Can't query device parameters"); -+ return 0; -+ } -+ switch (format) { -+ case AFMT_A_LAW: -+ audio_info.play.precision = 8; -+ audio_info.play.encoding = AUDIO_ENCODING_ALAW; -+ break; -+ case AFMT_MU_LAW: -+ audio_info.play.precision = 8; -+ audio_info.play.encoding = AUDIO_ENCODING_ULAW; -+ break; -+ case AFMT_S16_LE: -+ audio_info.play.precision = 16; -+ audio_info.play.encoding = AUDIO_ENCODING_SLINEAR_LE; -+ break; -+ case AFMT_U8: -+ audio_info.play.precision = 8; -+ audio_info.play.encoding = AUDIO_ENCODING_ULINEAR; -+ break; -+ default: -+ printf("libao2(netbsd): unhandled sample format %08x\n", format); -+ return 0; -+ } -+ ao_format = format; -+ ao_buffersize = audio_info.play.buffer_size; -+ audio_info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL; -+ audio_info.play.sample_rate = ao_samplerate = rate; -+ audio_info.play.channels = ao_channels = channels; -+#if 1 -+ audio_info.blocksize = ao_buffersize / 12; -+ audio_info.hiwat = 12; -+ audio_info.lowat = 9; -+#endif -+ rc = ioctl(audio_fd, AUDIO_SETINFO, &audio_info); -+ if (rc < 0) { -+ perror("libao2(netbsd): Can't set desired device parameters"); -+ return 0; -+ } -+ ao_outburst = audio_info.blocksize; -+ -+ mixer_fd = open(mixer, O_RDWR); -+ if (mixer_fd < 0) { -+ perror("libao2(netbsd): Can't open mixer device"); -+ goto out; -+ } -+ mi.index = 0; -+ mixer_master.dev = mixer_pcm.dev = -1; -+ mci = mco = -1; -+ rc = ioctl(mixer_fd, AUDIO_MIXER_DEVINFO, &mi); -+ while (rc != -1) { -+ if (mi.type == AUDIO_MIXER_CLASS && !strcmp(mi.label.name, AudioCinputs)) -+ mci = mi.index; -+ if (mi.type == AUDIO_MIXER_CLASS && !strcmp(mi.label.name, AudioCoutputs)) -+ mco = mi.index; -+ mi.index++; -+ rc = ioctl(mixer_fd, AUDIO_MIXER_DEVINFO, &mi); -+ } -+ -+ mi.index = 0; -+ rc = ioctl(mixer_fd, AUDIO_MIXER_DEVINFO, &mi); -+ while (rc != -1) { -+ if (mi.type == AUDIO_MIXER_VALUE && mi.mixer_class == mci && -+ !strcmp(mi.label.name, AudioNdac)) { -+ mixer_pcm.dev = mi.index; -+ mixer_pcm.type = AUDIO_MIXER_VALUE; -+ mixer_pcm.un.value.num_channels = mi.un.v.num_channels; -+ } -+ if (mi.type == AUDIO_MIXER_VALUE && mi.mixer_class == mco && -+ !strcmp(mi.label.name, AudioNmaster)) { -+ mixer_master.dev = mi.index; -+ mixer_master.type = AUDIO_MIXER_VALUE; -+ mixer_master.un.value.num_channels = mi.un.v.num_channels; -+ } -+ mi.index++; -+ rc = ioctl(mixer_fd, AUDIO_MIXER_DEVINFO, &mi); -+ } -+ rc = ioctl(mixer_fd, AUDIO_MIXER_READ, &mixer_pcm); -+ rc = ioctl(mixer_fd, AUDIO_MIXER_READ, &mixer_master); -+ /* -+ printf("found mixers: pcm %d (%d channels), master %d (%d channels)\n", -+ mixer_pcm.dev, -+ mixer_pcm.dev == -1 ? -1 : mixer_pcm.un.value.num_channels, -+ mixer_master.dev, -+ mixer_master.dev == -1 ? -1 : mixer_master.un.value.num_channels); -+ */ -+ -+out: -+ return 1; -+} -+ -+static void -+uninit() -+{ -+ ioctl(audio_fd, AUDIO_DRAIN); -+ close(audio_fd); -+ audio_fd = -1; -+} -+ -+static void -+reset() -+{ -+ ioctl(audio_fd, AUDIO_DRAIN); -+} -+ -+static void -+audio_pause() -+{ -+ ioctl(audio_fd, AUDIO_DRAIN); -+ ioctl(audio_fd, AUDIO_GETINFO, &audio_info); -+ audio_info.play.pause = 1; -+ ioctl(audio_fd, AUDIO_SETINFO, &audio_info); -+} -+ -+static void -+audio_resume() -+{ -+ ioctl(audio_fd, AUDIO_GETINFO, &audio_info); -+ audio_info.play.pause = 0; -+ audio_info.play.seek = 0; -+ ioctl(audio_fd, AUDIO_SETINFO, &audio_info); -+} -+ -+static int -+play(void *data, int len, int flags) -+{ -+ len /= ao_outburst; -+ return audio_fd > 0 ? write(audio_fd, data, len * ao_outburst) : -1; -+} -+ -+static int -+get_space() -+{ -+ audio_info_t ai; -+ -+ int rc = ioctl(audio_fd, AUDIO_GETINFO, &ai); -+ return (rc == -1) ? ao_outburst : (ao_buffersize - ai.play.seek); -+} -+ -+static int -+get_delay() -+{ -+ audio_info_t ai; -+ -+ int rc = ioctl(audio_fd, AUDIO_GETINFO, &ai); -+ return (rc == -1) ? 0 : ai.play.seek; -+} +$NetBSD: patch-af,v 1.3 2001/12/26 00:58:05 zuntum Exp $ + +--- cpudetect.c.orig Mon Dec 24 13:35:42 2001 ++++ cpudetect.c Tue Dec 25 23:26:28 2001 +@@ -341,7 +341,7 @@ + #else + /* Do nothing on other platforms for now. + */ +- message( "Not testing OS support for SSE, leaving disabled.\n" ); ++ printf( "Not testing OS support for SSE, leaving disabled.\n" ); + gCpuCaps.hasSSE=0; + #endif /* __linux__ */ + } diff --git a/graphics/mplayer/patches/patch-ag b/graphics/mplayer/patches/patch-ag index f600858c8d5..74af17432c9 100644 --- a/graphics/mplayer/patches/patch-ag +++ b/graphics/mplayer/patches/patch-ag @@ -1,12 +1,13 @@ -$NetBSD: patch-ag,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- libao2/ao_null.c.orig Tue Jun 5 22:40:44 2001 -+++ libao2/ao_null.c Mon Jul 30 22:10:10 2001 -@@ -23,7 +23,7 @@ - // ao_buffersize +$NetBSD: patch-ag,v 1.3 2001/12/26 00:58:05 zuntum Exp $ + +--- libao2/ao_oss.c.orig Wed Dec 26 02:32:52 2001 ++++ libao2/ao_oss.c Tue Dec 25 23:35:56 2001 +@@ -30,7 +30,7 @@ - // to set/get/query special features/parameters --static int control(int cmd,int arg){ -+static int control(int cmd,void* arg){ - return -1; - } + LIBAO_EXTERN(oss) + +-static char *dsp="/dev/dsp"; ++static char *dsp="/dev/sound"; + static audio_buf_info zz; + static int audio_fd=-1; diff --git a/graphics/mplayer/patches/patch-ah b/graphics/mplayer/patches/patch-ah index 3e69c482613..c213ac82603 100644 --- a/graphics/mplayer/patches/patch-ah +++ b/graphics/mplayer/patches/patch-ah @@ -1,111 +1,13 @@ -$NetBSD: patch-ah,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- libao2/ao_oss.c.orig Fri Jun 22 03:07:15 2001 -+++ libao2/ao_oss.c Mon Jul 30 22:10:10 2001 -@@ -7,9 +7,14 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> --#include <sys/soundcard.h> - - #include "../config.h" -+#ifdef HAVE_SYS_SOUNDCARD_H -+#include <sys/soundcard.h> -+#endif -+#ifdef HAVE_SOUNDCARD_H -+#include <soundcard.h> -+#endif - - #include "audio_out.h" - #include "audio_out_internal.h" -@@ -40,56 +45,58 @@ - static int audio_fd=-1; - - char *oss_mixer_device = "/dev/mixer"; --int oss_mixer_usemaster = 0; - - // to set/get/query special features/parameters --static int control(int cmd,int arg){ -+static int control(int cmd,void *arg){ - switch(cmd){ - case AOCONTROL_SET_DEVICE: -- dsp=(char*)arg; -+ if (arg) { -+ dsp = strdup((char *) arg); - return CONTROL_OK; -+ } else -+ return CONTROL_ERROR; - case AOCONTROL_QUERY_FORMAT: - return CONTROL_TRUE; -+ case AOCONTROL_SET_MIXER_DEVICE: -+ if (arg) { -+ oss_mixer_device = strdup((char *) arg); -+ return CONTROL_OK; -+ } else -+ return CONTROL_ERROR; - case AOCONTROL_GET_VOLUME: - case AOCONTROL_SET_VOLUME: - { - ao_control_vol_t *vol = (ao_control_vol_t *)arg; - int fd, v, mcmd, devs; - -- if ((fd = open("/dev/mixer", O_RDONLY)) > 0) -- { -+ if ((fd = open(oss_mixer_device, O_RDONLY)) > 0) { - ioctl(fd, SOUND_MIXER_READ_DEVMASK, &devs); -- if ((devs & SOUND_MASK_PCM) && (oss_mixer_usemaster == 0)) -+ if ((devs & SOUND_MASK_PCM) && (vol->usemaster == 0)) { - if (cmd == AOCONTROL_GET_VOLUME) - mcmd = SOUND_MIXER_READ_PCM; - else - mcmd = SOUND_MIXER_WRITE_PCM; -- else if ((devs & SOUND_MASK_VOLUME) && (oss_mixer_usemaster == 1)) -+ } else if ((devs & SOUND_MASK_VOLUME) && (vol->usemaster == 1)) { - if (cmd == AOCONTROL_GET_VOLUME) - mcmd = SOUND_MIXER_READ_VOLUME; - else - mcmd = SOUND_MIXER_WRITE_VOLUME; -- else -- { -+ } else { - close(fd); - return CONTROL_ERROR; - } - -- if (cmd == AOCONTROL_GET_VOLUME) -- { -- ioctl(fd, cmd, &v); -- vol->right = (v & 0xFF00) >> 8; -- vol->left = v & 0x00FF; -- } -- else -- { -+ if (cmd == AOCONTROL_GET_VOLUME) { -+ ioctl(fd, mcmd, &v); -+ vol->right = (float) ((v & 0xFF00) >> 8); -+ vol->left = (float) (v & 0x00FF); -+ } else { - v = ((int)vol->right << 8) | (int)vol->left; -- ioctl(fd, cmd, &v); -+ ioctl(fd, mcmd, &v); - } - close(fd); - return CONTROL_OK; -- } -- else -+ } else - return CONTROL_ERROR; - } - return CONTROL_ERROR; -@@ -249,10 +256,12 @@ - // return: how many unplayed bytes are in the buffer - static int get_delay(){ - if(audio_delay_method==2){ -+#ifdef SNDCTL_DSP_GETODELAY - // - int r=0; - if(ioctl(audio_fd, SNDCTL_DSP_GETODELAY, &r)!=-1) - return r; -+#endif - audio_delay_method=1; // fallback if not supported - } - if(audio_delay_method==1){ +$NetBSD: patch-ah,v 1.3 2001/12/26 00:58:05 zuntum Exp $ + +--- libmp1e/common/mmx.c.orig Wed Dec 5 02:56:43 2001 ++++ libmp1e/common/mmx.c Tue Dec 25 23:23:07 2001 +@@ -44,6 +44,8 @@ + * VIA has no similar document available as of Jan 2001. + */ + ++#define cpuid_t xcpuid_t ++ + typedef union { + unsigned char s[16]; + struct { diff --git a/graphics/mplayer/patches/patch-ai b/graphics/mplayer/patches/patch-ai deleted file mode 100644 index 071141daeea..00000000000 --- a/graphics/mplayer/patches/patch-ai +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ai,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- libao2/ao_pcm.c.orig Tue Jun 12 18:37:32 2001 -+++ libao2/ao_pcm.c Mon Jul 30 22:10:10 2001 -@@ -68,7 +68,7 @@ - static FILE *fp = NULL; - - // to set/get/query special features/parameters --static int control(int cmd,int arg){ -+static int control(int cmd,void* arg){ - return -1; - } - diff --git a/graphics/mplayer/patches/patch-aj b/graphics/mplayer/patches/patch-aj deleted file mode 100644 index 542fce4fa9a..00000000000 --- a/graphics/mplayer/patches/patch-aj +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-aj,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- libao2/ao_sdl.c.orig Wed Jun 27 15:40:15 2001 -+++ libao2/ao_sdl.c Mon Jul 30 22:10:10 2001 -@@ -120,7 +120,7 @@ - - - // to set/get/query special features/parameters --static int control(int cmd,int arg){ -+static int control(int cmd,void* arg){ - return -1; - } - diff --git a/graphics/mplayer/patches/patch-ak b/graphics/mplayer/patches/patch-ak deleted file mode 100644 index 45671dc2212..00000000000 --- a/graphics/mplayer/patches/patch-ak +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-ak,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- libao2/ao_sun.c.orig Sat Jun 23 23:40:04 2001 -+++ libao2/ao_sun.c Mon Jul 30 22:15:45 2001 -@@ -197,10 +197,10 @@ - } - - // to set/get/query special features/parameters --static int control(int cmd,int arg){ -+static int control(int cmd,void* arg){ - switch(cmd){ - case AOCONTROL_SET_DEVICE: -- audio_dev=(char*)arg; -+ audio_dev=strdup((char*)arg); - return CONTROL_OK; - case AOCONTROL_QUERY_FORMAT: - return CONTROL_TRUE; diff --git a/graphics/mplayer/patches/patch-al b/graphics/mplayer/patches/patch-al deleted file mode 100644 index d999b73196b..00000000000 --- a/graphics/mplayer/patches/patch-al +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-al,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- libao2/audio_out.c.orig Fri Jun 22 02:34:58 2001 -+++ libao2/audio_out.c Mon Jul 30 22:10:10 2001 -@@ -31,6 +31,9 @@ - #ifdef HAVE_SDL - extern ao_functions_t audio_out_sdl; - #endif -+#ifdef __NetBSD__ -+extern ao_functions_t audio_out_netbsd; -+#endif - #ifdef USE_SUN_AUDIO - extern ao_functions_t audio_out_sun; - #endif -@@ -57,6 +60,9 @@ - #endif - #ifdef USE_SUN_AUDIO - &audio_out_sun, -+#endif -+#ifdef __NetBSD__ -+ &audio_out_netbsd, - #endif - &audio_out_pcm, - // &audio_out_pss, diff --git a/graphics/mplayer/patches/patch-am b/graphics/mplayer/patches/patch-am deleted file mode 100644 index a70a254ff3b..00000000000 --- a/graphics/mplayer/patches/patch-am +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-am,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- libao2/audio_out.h.orig Fri Jun 22 02:34:58 2001 -+++ libao2/audio_out.h Mon Jul 30 22:10:10 2001 -@@ -13,7 +13,7 @@ - typedef struct ao_functions_s - { - ao_info_t *info; -- int (*control)(int cmd,int arg); -+ int (*control)(int cmd,void* arg); - int (*init)(int rate,int channels,int format,int flags); - void (*uninit)(); - void (*reset)(); -@@ -50,8 +50,10 @@ - #define AOCONTROL_QUERY_FORMAT 3 /* test for availabilty of a format */ - #define AOCONTROL_GET_VOLUME 4 - #define AOCONTROL_SET_VOLUME 5 -+#define AOCONTROL_SET_MIXER_DEVICE 6 - - typedef struct ao_control_vol_s { - float left; - float right; -+ int usemaster; - } ao_control_vol_t; diff --git a/graphics/mplayer/patches/patch-an b/graphics/mplayer/patches/patch-an deleted file mode 100644 index 04518c59901..00000000000 --- a/graphics/mplayer/patches/patch-an +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-an,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- libao2/audio_out_internal.h.orig Tue Jun 5 22:40:44 2001 -+++ libao2/audio_out_internal.h Mon Jul 30 22:10:10 2001 -@@ -1,7 +1,7 @@ - - // prototypes: - //static ao_info_t info; --static int control(int cmd,int arg); -+static int control(int cmd,void* arg); - static int init(int rate,int channels,int format,int flags); - static void uninit(); - static void reset(); diff --git a/graphics/mplayer/patches/patch-ao b/graphics/mplayer/patches/patch-ao deleted file mode 100644 index b74de75175f..00000000000 --- a/graphics/mplayer/patches/patch-ao +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-ao,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- mixer.c.orig Sat Jun 9 03:33:55 2001 -+++ mixer.c Mon Jul 30 21:20:01 2001 -@@ -15,7 +15,13 @@ - * Mixer interface using OSS style soundcard commands. - */ - -+#ifdef HAVE_SYS_SOUNDCARD_H - #include <sys/soundcard.h> -+#endif -+ -+#ifdef HAVE_SOUNDCARD_H -+#include <soundcard.h> -+#endif - - - char * mixer_device=DEV_MIXER; diff --git a/graphics/mplayer/patches/patch-ap b/graphics/mplayer/patches/patch-ap deleted file mode 100644 index 8542ab37c9c..00000000000 --- a/graphics/mplayer/patches/patch-ap +++ /dev/null @@ -1,102 +0,0 @@ -$NetBSD: patch-ap,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- mp3lib/d_cpu.s.orig Mon Jul 2 12:07:41 2001 -+++ mp3lib/d_cpu.s Mon Jul 30 21:20:01 2001 -@@ -1,8 +1,8 @@ - --/ --------------------------------------------------------------------------- --/ Cpu function detect by Pontscho/fresh!mindworkz (c) 2000 - 2000 --/ 3dnow-dsp detection by Nick Kurshev (C) 2001 --/ --------------------------------------------------------------------------- -+# --------------------------------------------------------------------------- -+# Cpu function detect by Pontscho/fresh!mindworkz (c) 2000 - 2000 -+# 3dnow-dsp detection by Nick Kurshev (C) 2001 -+# --------------------------------------------------------------------------- - - .text - -@@ -11,10 +11,10 @@ - .globl a3dnow - .globl isse - --/ --------------------------------------------------------------------------- --/ in C: unsigned long CpuDetect( void ); --/ return: cpu ident number. --/ --------------------------------------------------------------------------- -+# --------------------------------------------------------------------------- -+# in C: unsigned long CpuDetect( void ); -+# return: cpu ident number. -+# --------------------------------------------------------------------------- - CpuDetect: - pushl %ebx - pushl %ecx -@@ -44,12 +44,12 @@ - popl %ebx - ret - --/ --------------------------------------------------------------------------- --/ in C: unsigled long ipentium( void ); --/ return: 0 if this processor i386 or i486 --/ 1 otherwise --/ 3 if this cpu supports mmx --/ --------------------------------------------------------------------------- -+# --------------------------------------------------------------------------- -+# in C: unsigled long ipentium( void ); -+# return: 0 if this processor i386 or i486 -+# 1 otherwise -+# 3 if this cpu supports mmx -+# --------------------------------------------------------------------------- - ipentium: - pushl %ebx - pushl %ecx -@@ -84,12 +84,12 @@ - popl %ebx - ret - --/ --------------------------------------------------------------------------- --/ in C: unsigned long a3dnow( void ); --/ return: 0 if this processor does not support 3dnow! --/ 1 otherwise --/ 3 if this cpu supports 3dnow-dsp extension --/ --------------------------------------------------------------------------- -+# --------------------------------------------------------------------------- -+# in C: unsigned long a3dnow( void ); -+# return: 0 if this processor does not support 3dnow! -+# 1 otherwise -+# 3 if this cpu supports 3dnow-dsp extension -+# --------------------------------------------------------------------------- - a3dnow: - pushl %ebx - pushl %edx -@@ -109,11 +109,11 @@ - xorl %eax,%eax - testl $0x80000000,%edx - jz exit2 --/// eax=1 - K6 3DNow! -+#// eax=1 - K6 3DNow! - inc %eax - testl $0x40000000,%edx - jz exit2 --/// eax=2 - K7 3DNowEx! -+#// eax=2 - K7 3DNowEx! - orl $2, %eax - exit2: - -@@ -122,12 +122,12 @@ - popl %ebx - ret - --/ --------------------------------------------------------------------------- --/ in C: unsigned long isse( void ); --/ return: 0 if this processor does not support sse --/ 1 otherwise --/ 3 if this cpu supports sse2 extension --/ --------------------------------------------------------------------------- -+# --------------------------------------------------------------------------- -+# in C: unsigned long isse( void ); -+# return: 0 if this processor does not support sse -+# 1 otherwise -+# 3 if this cpu supports sse2 extension -+# --------------------------------------------------------------------------- - isse: - pushl %ebx - pushl %edx diff --git a/graphics/mplayer/patches/patch-aq b/graphics/mplayer/patches/patch-aq deleted file mode 100644 index 0090fce27af..00000000000 --- a/graphics/mplayer/patches/patch-aq +++ /dev/null @@ -1,60 +0,0 @@ -$NetBSD: patch-aq,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- mp3lib/dct36_3dnow.s.orig Sat Feb 24 23:31:08 2001 -+++ mp3lib/dct36_3dnow.s Mon Jul 30 21:20:01 2001 -@@ -1,30 +1,30 @@ --/ --/ dct36_3dnow.s - 3DNow! optimized dct36() --/ --/ This code based 'dct36_3dnow.s' by Syuuhei Kashiyama --/ <squash@mb.kcom.ne.jp>,only two types of changes have been made: --/ --/ - remove PREFETCH instruction for speedup --/ - change function name for support 3DNow! automatic detect --/ --/ You can find Kashiyama's original 3dnow! support patch --/ (for mpg123-0.59o) at --/ http://user.ecc.u-tokyo.ac.jp/~g810370/linux-simd/ (Japanese). --/ --/ by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> - until 31.Mar.1999 --/ <kim@comtec.co.jp> - after 1.Apr.1999 --/ -+# -+# dct36_3dnow.s - 3DNow! optimized dct36() -+# -+# This code based 'dct36_3dnow.s' by Syuuhei Kashiyama -+# <squash@mb.kcom.ne.jp>,only two types of changes have been made: -+# -+# - remove PREFETCH instruction for speedup -+# - change function name for support 3DNow! automatic detect -+# -+# You can find Kashiyama's original 3dnow! support patch -+# (for mpg123-0.59o) at -+# http://user.ecc.u-tokyo.ac.jp/~g810370/linux-simd/ (Japanese). -+# -+# by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> - until 31.Mar.1999 -+# <kim@comtec.co.jp> - after 1.Apr.1999 -+# - --/// --/// Replacement of dct36() with AMD's 3DNow! SIMD operations support --/// --/// Syuuhei Kashiyama <squash@mb.kcom.ne.jp> --/// --/// The author of this program disclaim whole expressed or implied --/// warranties with regard to this program, and in no event shall the --/// author of this program liable to whatever resulted from the use of --/// this program. Use it at your own risk. --/// -+#// -+#// Replacement of dct36() with AMD's 3DNow! SIMD operations support -+#// -+#// Syuuhei Kashiyama <squash@mb.kcom.ne.jp> -+#// -+#// The author of this program disclaim whole expressed or implied -+#// warranties with regard to this program, and in no event shall the -+#// author of this program liable to whatever resulted from the use of -+#// this program. Use it at your own risk. -+#// - - .globl dct36_3dnow - .type dct36_3dnow,@function diff --git a/graphics/mplayer/patches/patch-ar b/graphics/mplayer/patches/patch-ar deleted file mode 100644 index 57a92552658..00000000000 --- a/graphics/mplayer/patches/patch-ar +++ /dev/null @@ -1,88 +0,0 @@ -$NetBSD: patch-ar,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- mp3lib/dct36_k7.s.orig Wed May 9 11:59:55 2001 -+++ mp3lib/dct36_k7.s Mon Jul 30 21:20:01 2001 -@@ -1,44 +1,44 @@ --/// --/// Replacement of dct36() with AMD's 3DNowEx(DSP)! SIMD operations support --/// --/// This code based 'dct36_3dnow.s' by Syuuhei Kashiyama --/// <squash@mb.kcom.ne.jp>,only some types of changes have been made: --/// --/// - added new opcode PSWAPD --/// - change function name for support 3DNowEx! automatic detect --/// --/// note: because K7 processors are an aggresive out-of-order three-way --/// superscalar ones instruction order is not significand for them. --/// --/// Modified by Nick Kurshev <nickols_k@mail.ru> --/// --/ --/ dct36_3dnow.s - 3DNow! optimized dct36() --/ --/ This code based 'dct36_3dnow.s' by Syuuhei Kashiyama --/ <squash@mb.kcom.ne.jp>,only two types of changes have been made: --/ --/ - remove PREFETCH instruction for speedup --/ - change function name for support 3DNow! automatic detect --/ --/ You can find Kashiyama's original 3dnow! support patch --/ (for mpg123-0.59o) at --/ http://user.ecc.u-tokyo.ac.jp/~g810370/linux-simd/ (Japanese). --/ --/ by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> - until 31.Mar.1999 --/ <kim@comtec.co.jp> - after 1.Apr.1999 --/ -+#// -+#// Replacement of dct36() with AMD's 3DNowEx(DSP)! SIMD operations support -+#// -+#// This code based 'dct36_3dnow.s' by Syuuhei Kashiyama -+#// <squash@mb.kcom.ne.jp>,only some types of changes have been made: -+#// -+#// - added new opcode PSWAPD -+#// - change function name for support 3DNowEx! automatic detect -+#// -+#// note: because K7 processors are an aggresive out-of-order three-way -+#// superscalar ones instruction order is not significand for them. -+#// -+#// Modified by Nick Kurshev <nickols_k@mail.ru> -+#// -+# -+# dct36_3dnow.s - 3DNow! optimized dct36() -+# -+# This code based 'dct36_3dnow.s' by Syuuhei Kashiyama -+# <squash@mb.kcom.ne.jp>,only two types of changes have been made: -+# -+# - remove PREFETCH instruction for speedup -+# - change function name for support 3DNow! automatic detect -+# -+# You can find Kashiyama's original 3dnow! support patch -+# (for mpg123-0.59o) at -+# http://user.ecc.u-tokyo.ac.jp/~g810370/linux-simd/ (Japanese). -+# -+# by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> - until 31.Mar.1999 -+# <kim@comtec.co.jp> - after 1.Apr.1999 -+# - --/// --/// Replacement of dct36() with AMD's 3DNow! SIMD operations support --/// --/// Syuuhei Kashiyama <squash@mb.kcom.ne.jp> --/// --/// The author of this program disclaim whole expressed or implied --/// warranties with regard to this program, and in no event shall the --/// author of this program liable to whatever resulted from the use of --/// this program. Use it at your own risk. --/// -+#// -+#// Replacement of dct36() with AMD's 3DNow! SIMD operations support -+#// -+#// Syuuhei Kashiyama <squash@mb.kcom.ne.jp> -+#// -+#// The author of this program disclaim whole expressed or implied -+#// warranties with regard to this program, and in no event shall the -+#// author of this program liable to whatever resulted from the use of -+#// this program. Use it at your own risk. -+#// - - .globl dct36_3dnowex - .type dct36_3dnowex,@function diff --git a/graphics/mplayer/patches/patch-as b/graphics/mplayer/patches/patch-as deleted file mode 100644 index 182a8868496..00000000000 --- a/graphics/mplayer/patches/patch-as +++ /dev/null @@ -1,106 +0,0 @@ -$NetBSD: patch-as,v 1.2 2001/12/25 18:02:09 wiz Exp $ ---- mp3lib/dct64_3dnow.s.orig Fri Jul 6 14:59:14 2001 -+++ mp3lib/dct64_3dnow.s Mon Jul 30 21:20:01 2001 -@@ -30,7 +30,7 @@ - orl %ecx,%ecx - movl %esp,%ecx - --/* Phase 1*/ -+#* Phase 1*/ - movq (%eax), %mm0 - movq 8(%eax), %mm4 - movq %mm0, %mm3 -@@ -147,7 +147,7 @@ - movd %mm3, 72(%edx) - movd %mm7, 64(%edx) - --/* Phase 2*/ -+#* Phase 2*/ - - movq (%edx), %mm0 - movq 8(%edx), %mm4 -@@ -207,7 +207,7 @@ - movd %mm3, 40(%ecx) - movd %mm7, 32(%ecx) - --/* Phase 3*/ -+#* Phase 3*/ - - movq 64(%edx), %mm0 - movq 72(%edx), %mm4 -@@ -267,7 +267,7 @@ - movd %mm3, 104(%ecx) - movd %mm7, 96(%ecx) - --/* Phase 4*/ -+#* Phase 4*/ - - movq (%ecx), %mm0 - movq 8(%ecx), %mm4 -@@ -385,7 +385,7 @@ - movd %mm3, 120(%edx) - movd %mm7, 112(%edx) - --/* Phase 5 */ -+#* Phase 5 */ - - movq (%edx), %mm0 - movq 16(%edx), %mm4 -@@ -503,8 +503,8 @@ - movd %mm3, 104(%ecx) - movd %mm7, 120(%ecx) - --/* Phase 6. This is the end of easy road. */ --/* Code below is coded in scalar mode. Should be optimized */ -+#* Phase 6. This is the end of easy road. */ -+#* Code below is coded in scalar mode. Should be optimized */ - - movd plus_1f, %mm6 - punpckldq 120(%ebx), %mm6 /* mm6 = 1.0 | 120(%ebx)*/ -@@ -563,7 +563,7 @@ - movq %mm1, 56(%edx) - movq %mm0, 48(%edx) - --/*---*/ -+#*---*/ - - movd 92(%ecx), %mm1 - pfsub 88(%ecx), %mm1 -@@ -622,8 +622,8 @@ - - jnz .L01 - --/* Phase 7*/ --/* Code below is coded in scalar mode. Should be optimized */ -+#* Phase 7*/ -+#* Code below is coded in scalar mode. Should be optimized */ - - movd (%ecx), %mm0 - pfadd 4(%ecx), %mm0 -@@ -666,7 +666,7 @@ - pfadd %mm3, %mm2 - movd %mm2, 256(%edi) - --/* Phase 8*/ -+#* Phase 8*/ - - movq 32(%edx), %mm0 - movq 48(%edx), %mm1 -@@ -741,7 +741,7 @@ - - jmp .L_bye - .L01: --/* Phase 9*/ -+#* Phase 9*/ - - movq (%ecx), %mm0 - movq %mm0, %mm1 -@@ -799,7 +799,7 @@ - movd %mm2, %eax - movw %ax, 128(%edi) - --/* Phase 10*/ -+#* Phase 10*/ - - movq 32(%edx), %mm0 - movq 48(%edx), %mm1 diff --git a/graphics/mplayer/patches/patch-at b/graphics/mplayer/patches/patch-at deleted file mode 100644 index de3d18f290c..00000000000 --- a/graphics/mplayer/patches/patch-at +++ /dev/null @@ -1,84 +0,0 @@ -$NetBSD: patch-at,v 1.2 2001/12/25 18:02:10 wiz Exp $ ---- mp3lib/dct64_MMX.s.orig Thu Jul 5 13:44:18 2001 -+++ mp3lib/dct64_MMX.s Mon Jul 30 21:20:01 2001 -@@ -14,7 +14,7 @@ - pushl %edi - subl $256,%esp - movl 280(%esp),%eax --/* Phase 1*/ -+#* Phase 1*/ - flds (%eax) - leal 128(%esp),%edx - fadds 124(%eax) -@@ -165,7 +165,7 @@ - fmuls 60(%ebx) - fstps 64(%edx) - --/* Phase 2*/ -+#* Phase 2*/ - - flds (%edx) - fadds 60(%edx) -@@ -239,7 +239,7 @@ - fmuls 92(%ebx) - fstps 32(%ecx) - --/* Phase 3*/ -+#* Phase 3*/ - - flds 64(%edx) - fadds 124(%edx) -@@ -313,7 +313,7 @@ - fmuls 92(%ebx) - fstps 96(%ecx) - --/* Phase 4*/ -+#* Phase 4*/ - - flds (%ecx) - fadds 28(%ecx) -@@ -603,7 +603,7 @@ - fmuls 116(%ebx) - fstps 120(%ecx) - --/* Phase 5*/ -+#* Phase 5*/ - - flds 32(%ecx) - fadds 36(%ecx) -@@ -715,7 +715,7 @@ - fstps 120(%edx) - jnz .L01 - --/* Phase 6*/ -+#* Phase 6*/ - - flds (%ecx) - fadds 4(%ecx) -@@ -755,7 +755,7 @@ - faddp %st(1) - fstps 256(%edi) - --/* Phase 7*/ -+#* Phase 7*/ - - flds 32(%edx) - fadds 48(%edx) -@@ -852,7 +852,7 @@ - popl %ebx - ret - .L01: --/* Phase 8*/ -+#* Phase 8*/ - - flds (%ecx) - fadds 4(%ecx) -@@ -893,7 +893,7 @@ - faddp %st(1) - fistp 128(%edi) - --/* Phase 9*/ -+#* Phase 9*/ - - flds 32(%edx) - fadds 48(%edx) diff --git a/graphics/mplayer/patches/patch-au b/graphics/mplayer/patches/patch-au deleted file mode 100644 index 2bf4cca908f..00000000000 --- a/graphics/mplayer/patches/patch-au +++ /dev/null @@ -1,106 +0,0 @@ -$NetBSD: patch-au,v 1.2 2001/12/25 18:02:10 wiz Exp $ ---- mp3lib/dct64_k7.s.orig Fri Jul 6 14:59:14 2001 -+++ mp3lib/dct64_k7.s Mon Jul 30 21:20:01 2001 -@@ -31,7 +31,7 @@ - orl %ecx,%ecx - movl %esp,%ecx - --/* Phase 1*/ -+#* Phase 1*/ - movq (%eax), %mm0 - movq 8(%eax), %mm4 - movq %mm0, %mm3 -@@ -116,7 +116,7 @@ - movq %mm3, 72(%edx) - movq %mm7, 64(%edx) - --/* Phase 2*/ -+#* Phase 2*/ - - movq (%edx), %mm0 - movq 8(%edx), %mm4 -@@ -160,7 +160,7 @@ - movq %mm3, 40(%ecx) - movq %mm7, 32(%ecx) - --/* Phase 3*/ -+#* Phase 3*/ - - movq 64(%edx), %mm0 - movq 72(%edx), %mm4 -@@ -204,7 +204,7 @@ - movq %mm3, 104(%ecx) - movq %mm7, 96(%ecx) - --/* Phase 4*/ -+#* Phase 4*/ - - movq 96(%ebx), %mm2 - movq 104(%ebx), %mm6 -@@ -293,7 +293,7 @@ - movq %mm3, 120(%edx) - movq %mm7, 112(%edx) - --/* Phase 5 */ -+#* Phase 5 */ - - movq 112(%ebx), %mm2 - -@@ -382,8 +382,8 @@ - movq %mm7, 120(%ecx) - - --/* Phase 6. This is the end of easy road. */ --/* Code below is coded in scalar mode. Should be optimized */ -+#* Phase 6. This is the end of easy road. */ -+#* Code below is coded in scalar mode. Should be optimized */ - - movd plus_1f, %mm6 - punpckldq 120(%ebx), %mm6 /* mm6 = 1.0 | 120(%ebx)*/ -@@ -442,7 +442,7 @@ - movq %mm1, 56(%edx) - movq %mm0, 48(%edx) - --/*---*/ -+#*---*/ - - movd 92(%ecx), %mm1 - pfsub 88(%ecx), %mm1 -@@ -501,8 +501,8 @@ - - jnz .L01 - --/* Phase 7*/ --/* Code below is coded in scalar mode. Should be optimized */ -+#* Phase 7*/ -+#* Code below is coded in scalar mode. Should be optimized */ - - movd (%ecx), %mm0 - pfadd 4(%ecx), %mm0 -@@ -545,7 +545,7 @@ - pfadd %mm3, %mm2 - movd %mm2, 256(%edi) - --/* Phase 8*/ -+#* Phase 8*/ - - movq 32(%edx), %mm0 - movq 48(%edx), %mm1 -@@ -620,7 +620,7 @@ - - jmp .L_bye - .L01: --/* Phase 9*/ -+#* Phase 9*/ - - movq (%ecx), %mm0 - movq %mm0, %mm1 -@@ -678,7 +678,7 @@ - movd %mm2, %eax - movw %ax, 128(%edi) - --/* Phase 10*/ -+#* Phase 10*/ - - movq 32(%edx), %mm0 - movq 48(%edx), %mm1 diff --git a/graphics/mplayer/patches/patch-av b/graphics/mplayer/patches/patch-av deleted file mode 100644 index 1e5776af08c..00000000000 --- a/graphics/mplayer/patches/patch-av +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-av,v 1.2 2001/12/25 18:02:10 wiz Exp $ ---- mp3lib/decode_MMX.s.orig Fri Jul 6 16:08:32 2001 -+++ mp3lib/decode_MMX.s Mon Jul 30 21:20:02 2001 -@@ -48,10 +48,10 @@ - .text - - .globl synth_1to1_MMX_s --// --// void synth_1to1_MMX_s(real *bandPtr, int channel, short *samples, --// short *buffs, int *bo); --// -+# -+# void synth_1to1_MMX_s(real *bandPtr, int channel, short *samples, -+# short *buffs, int *bo); -+# - synth_1to1_MMX_s: - pushl %ebp - pushl %edi diff --git a/graphics/mplayer/patches/patch-ax b/graphics/mplayer/patches/patch-ax deleted file mode 100644 index 1e9b43cee78..00000000000 --- a/graphics/mplayer/patches/patch-ax +++ /dev/null @@ -1,146 +0,0 @@ -$NetBSD: patch-ax,v 1.2 2001/12/25 18:02:10 wiz Exp $ ---- mplayer.c.orig Sun Jul 8 17:11:01 2001 -+++ mplayer.c Mon Jul 30 22:10:10 2001 -@@ -36,6 +36,9 @@ - #error "=============================================" - #endif - -+int mixer_usemaster; -+char * mixer_device; -+ - #include "cfgparser.h" - #include "cfg-mplayer-def.h" - -@@ -400,7 +403,6 @@ - extern int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen); - - --#include "mixer.h" - #include "cfg-mplayer.h" - - void parse_cfgfiles( void ) -@@ -578,7 +580,8 @@ - fprintf(stderr,"Invalid audio output driver name: %s\nUse '-ao help' to get a list of available audio drivers.\n",audio_driver); - return 0; - } --/*DSP!! if(dsp) audio_out->control(AOCONTROL_SET_DEVICE,(int)dsp);*/ -+ if(ao_subdevice) audio_out->control(AOCONTROL_SET_DEVICE,ao_subdevice); -+ audio_out->control(AOCONTROL_SET_MIXER_DEVICE,mixer_device); - - // check codec.conf - if(!parse_codec_cfg(get_path("codecs.conf"))){ -@@ -1070,11 +1073,6 @@ - - fflush(stdout); - --if(!sh_video){ -- fprintf(stderr,"Sorry, no video stream... it's unplayable yet\n"); -- exit(1); --} -- - //================== Init AUDIO (codec) ========================== - if(has_audio){ - // Go through the codec.conf and find the best codec... -@@ -1108,6 +1106,7 @@ - - //================== Init VIDEO (codec & libvo) ========================== - -+if(!sh_video) goto NOVIDEO; - // Go through the codec.conf and find the best codec... - sh_video->codec=NULL; - while(1){ -@@ -1169,6 +1168,7 @@ - - if(verbose) printf("vo_debug2: out_fmt=%s\n",vo_format_name(out_fmt)); - -+NOVIDEO: - // ================== Init output files for encoding =============== - if(encode_name){ - // encode file!!! -@@ -1209,6 +1209,7 @@ - } - #endif - -+ if(sh_video) { - if(screen_size_xy>0){ - if(screen_size_xy<=8){ - screen_size_x=screen_size_xy*sh_video->disp_w; -@@ -1249,6 +1250,7 @@ - screen_size_x,screen_size_y, - fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), - title,out_fmt); -+ } - - if(verbose) printf("vo_debug3: out_fmt=%s\n",vo_format_name(out_fmt)); - -@@ -1261,7 +1263,7 @@ - } - #endif - -- if(video_out->init(sh_video->disp_w,sh_video->disp_h, -+ if(sh_video && video_out->init(sh_video->disp_w,sh_video->disp_h, - screen_size_x,screen_size_y, - fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), - title,out_fmt)){ -@@ -1567,6 +1569,7 @@ - - //------------------------ frame decoded. -------------------- - -+ if(!sh_video) goto NOVIDEO2; - // Increase video timers: - num_frames+=frame_time; - frame_time*=sh_video->frametime; -@@ -1590,6 +1593,7 @@ - - if(verbose>1) printf("*** ftime=%5.3f ***\n",frame_time); - -+ NOVIDEO2: - if(drop_frame){ - - if(has_audio){ -@@ -1600,11 +1604,11 @@ - if(time_frame>-2*frame_time) { - drop_frame=0; // stop dropping frames - if (verbose>0) printf("\nstop frame drop %.2f\n", time_frame); -- }else{ -+ } /* else{ - ++drop_frame_cnt; - if (verbose > 0 && drop_frame_cnt%10 == 0) - printf("\nstill dropping, %.2f\n", time_frame); -- } -+ } */ - } - - } else { -@@ -1833,21 +1837,23 @@ - break; - case '*': - case '/': { -- float mixer_l, mixer_r; -- mixer_getvolume( &mixer_l,&mixer_r ); -+ ao_control_vol_t v; -+ -+ audio_out->control(AOCONTROL_GET_VOLUME, (void *)&v); - if(c=='*'){ -- mixer_l++; if ( mixer_l > 100 ) mixer_l = 100; -- mixer_r++; if ( mixer_r > 100 ) mixer_r = 100; -+ v.left += 1.0; if ( v.left > 100.0 ) v.left = 100.0; -+ v.right+= 1.0; if ( v.right > 100.0 ) v.right = 100.0; - } else { -- mixer_l--; if ( mixer_l < 0 ) mixer_l = 0; -- mixer_r--; if ( mixer_r < 0 ) mixer_r = 0; -+ v.left -= 1.0; if ( v.left < 0.0 ) v.left = 0.0; -+ v.right-= 1.0; if ( v.right < 0.0 ) v.right = 0.0; - } -- mixer_setvolume( mixer_l,mixer_r ); -+ v.usemaster = mixer_usemaster; -+ audio_out->control(AOCONTROL_SET_VOLUME, (void *)&v); - - if(osd_level){ - osd_visible=sh_video->fps; // 1 sec - vo_osd_progbar_type=OSD_VOLUME; -- vo_osd_progbar_value=(mixer_l+mixer_r)*5/4; -+ vo_osd_progbar_value=(v.left+v.right)*5/4; - //printf("volume: %d\n",vo_osd_progbar_value); - } - } diff --git a/graphics/mplayer/patches/patch-ay b/graphics/mplayer/patches/patch-ay deleted file mode 100644 index ef81aedc224..00000000000 --- a/graphics/mplayer/patches/patch-ay +++ /dev/null @@ -1,40 +0,0 @@ -$NetBSD: patch-ay,v 1.2 2001/12/25 18:02:10 wiz Exp $ ---- stream.c.orig Thu Jun 21 04:06:40 2001 -+++ stream.c Mon Jul 30 22:10:10 2001 -@@ -12,8 +12,12 @@ - #ifdef __FreeBSD__ - #include "vcd_read_fbsd.c" - #else -+#ifdef __NetBSD__ -+#include "vcd_read_nbsd.c" -+#else - #include "vcd_read.c" - #endif -+#endif - - //=================== STREAMER ========================= - -@@ -37,6 +41,7 @@ - s->buf_len=len; - s->pos+=len; - // printf("[%d]",len);fflush(stdout); -+ if(s->type == STREAMTYPE_VCD) vcd_set_msf(s->pos/VCD_SECTOR_DATA); - return len; - } - -@@ -68,6 +73,7 @@ - s->pos=newpos; // real seek - if(lseek(s->fd,s->pos,SEEK_SET)<0) s->eof=1; - break; -+#ifdef HAVE_VCD - case STREAMTYPE_VCD: - s->pos=newpos; // real seek - #ifdef VCD_CACHE -@@ -76,6 +82,7 @@ - vcd_set_msf(s->pos/VCD_SECTOR_DATA); - #endif - break; -+#endif - case STREAMTYPE_STREAM: - //s->pos=newpos; // real seek - if(newpos<s->pos){ diff --git a/graphics/mplayer/patches/patch-az b/graphics/mplayer/patches/patch-az deleted file mode 100644 index 43d0462d039..00000000000 --- a/graphics/mplayer/patches/patch-az +++ /dev/null @@ -1,11 +0,0 @@ -$NetBSD: patch-az,v 1.2 2001/12/25 18:02:10 wiz Exp $ ---- vcd_read.c.orig Tue Jun 12 10:53:32 2001 -+++ vcd_read.c Mon Jul 30 21:23:54 2001 -@@ -8,6 +8,7 @@ - static int sun_vcd_read(int, int*); - #endif - -+#define HAVE_VCD 1 - - static struct cdrom_tocentry vcd_entry; - diff --git a/graphics/mplayer/patches/patch-ba b/graphics/mplayer/patches/patch-ba deleted file mode 100644 index 7769bb73780..00000000000 --- a/graphics/mplayer/patches/patch-ba +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ba,v 1.2 2001/12/25 18:02:10 wiz Exp $ ---- vcd_read_fbsd.c.orig Thu Jun 21 04:06:40 2001 -+++ vcd_read_fbsd.c Mon Jul 30 21:24:00 2001 -@@ -1,6 +1,8 @@ - #include <sys/cdio.h> - #include <sys/cdrio.h> - -+#define HAVE_VCD 1 -+ - //=================== VideoCD ========================== - #define CDROM_LEADOUT 0xAA - diff --git a/graphics/mplayer/patches/patch-bb b/graphics/mplayer/patches/patch-bb deleted file mode 100644 index 99df8ab6938..00000000000 --- a/graphics/mplayer/patches/patch-bb +++ /dev/null @@ -1,202 +0,0 @@ -$NetBSD: patch-bb,v 1.2 2001/12/25 18:02:10 wiz Exp $ ---- vcd_read_nbsd.c.orig Thu Jan 1 03:00:00 1970 -+++ vcd_read_nbsd.c Mon Jul 30 22:10:10 2001 -@@ -0,0 +1,198 @@ -+#include <sys/types.h> -+#include <sys/inttypes.h> -+#include <sys/cdio.h> -+#include <sys/scsiio.h> -+ -+#define HAVE_VCD -+ -+#define CDROM_LEADOUT 0xAA -+ -+static struct ioc_read_toc_entry vcd_entry; -+static struct cd_toc_entry vcd_entry_data; -+static char vcd_buf[VCD_SECTOR_SIZE]; -+ -+static inline void -+vcd_set_msf(unsigned int sect) -+{ -+ unsigned int s = sect; -+ vcd_entry_data.addr.msf.frame = sect % 75; -+ sect = sect / 75; -+ vcd_entry_data.addr.msf.second = sect % 60; -+ sect = sect / 60; -+ vcd_entry_data.addr.msf.minute = sect; -+} -+ -+static inline unsigned int -+vcd_get_msf() -+{ -+ return vcd_entry_data.addr.msf.frame + -+ (vcd_entry_data.addr.msf.second + -+ vcd_entry_data.addr.msf.minute * 60) * 75; -+} -+ -+int -+vcd_seek_to_track(int fd, int track) -+{ -+ vcd_entry.address_format = CD_MSF_FORMAT; -+ vcd_entry.starting_track = track; -+ vcd_entry.data_len = sizeof(struct cd_toc_entry); -+ vcd_entry.data = &vcd_entry_data; -+ if (ioctl(fd, CDIOREADTOCENTRIES, &vcd_entry)) { -+ perror("ioctl dif1"); -+ return -1; -+ } -+ return VCD_SECTOR_DATA * vcd_get_msf(); -+} -+ -+int -+vcd_get_track_end(int fd, int track) -+{ -+ struct ioc_toc_header tochdr; -+ if (ioctl(fd, CDIOREADTOCHEADER, &tochdr) == -1) { -+ perror("read CDROM toc header: "); -+ return -1; -+ } -+ vcd_entry.address_format = CD_MSF_FORMAT; -+ vcd_entry.starting_track = track < tochdr.ending_track ? (track + 1) : CDROM_LEADOUT; -+ vcd_entry.data_len = sizeof(struct cd_toc_entry); -+ vcd_entry.data = &vcd_entry_data; -+ if (ioctl(fd, CDIOREADTOCENTRYS, &vcd_entry)) { -+ perror("ioctl dif2"); -+ return -1; -+ } -+ return VCD_SECTOR_DATA * vcd_get_msf(); -+} -+ -+void -+vcd_read_toc(int fd) -+{ -+ struct ioc_toc_header tochdr; -+ int i; -+ if (ioctl(fd, CDIOREADTOCHEADER, &tochdr) == -1) { -+ perror("read CDROM toc header: "); -+ return; -+ } -+ for (i = tochdr.starting_track; i <= tochdr.ending_track; i++) { -+ struct ioc_read_toc_entry tocentry; -+ struct cd_toc_entry tocentry_data; -+ -+ tocentry.starting_track = i; -+ tocentry.address_format = CD_MSF_FORMAT; -+ tocentry.data_len = sizeof(struct cd_toc_entry); -+ tocentry.data = &tocentry_data; -+ -+ if (ioctl(fd, CDIOREADTOCENTRYS, &tocentry) == -1) { -+ perror("read CDROM toc entry: "); -+ return; -+ } -+ printf("track %02d: adr=%d ctrl=%d format=%d %02d:%02d:%02d\n", -+ (int) tocentry.starting_track, -+ (int) tocentry.data->addr_type, -+ (int) tocentry.data->control, -+ (int) tocentry.address_format, -+ (int) tocentry.data->addr.msf.minute, -+ (int) tocentry.data->addr.msf.second, -+ (int) tocentry.data->addr.msf.frame -+ ); -+ } -+} -+ -+static int -+vcd_read(int fd, char *mem) -+{ -+ struct scsireq sc; -+ int lba = vcd_get_msf(); -+ int blocks; -+ int sector_type; -+ int sync, header_code, user_data, edc_ecc, error_field; -+ int sub_channel; -+ int rc; -+ -+ blocks = 1; -+ sector_type = 5; /* mode2/form2 */ -+ sync = 0; -+ header_code = 0; -+ user_data = 1; -+ edc_ecc = 0; -+ error_field = 0; -+ sub_channel = 0; -+ -+ memset(&sc, 0, sizeof(sc)); -+ sc.cmd[0] = 0xBE; -+ sc.cmd[1] = (sector_type) << 2; -+ sc.cmd[2] = (lba >> 24) & 0xff; -+ sc.cmd[3] = (lba >> 16) & 0xff; -+ sc.cmd[4] = (lba >> 8) & 0xff; -+ sc.cmd[5] = lba & 0xff; -+ sc.cmd[6] = (blocks >> 16) & 0xff; -+ sc.cmd[7] = (blocks >> 8) & 0xff; -+ sc.cmd[8] = blocks & 0xff; -+ sc.cmd[9] = (sync << 7) | (header_code << 5) | (user_data << 4) | -+ (edc_ecc << 3) | (error_field << 1); -+ sc.cmd[10] = sub_channel; -+ sc.cmdlen = 12; -+ sc.databuf = (caddr_t) mem; -+ sc.datalen = 2328; -+ sc.senselen = sizeof(sc.sense); -+ sc.flags = SCCMD_READ; -+ sc.timeout = 10000; -+ rc = ioctl(fd, SCIOCCOMMAND, &sc); -+ if (rc == -1) { -+ perror("SCIOCCOMMAND"); -+ return -1; -+ } -+ if (sc.retsts || sc.error) { -+ fprintf(stderr, "scsi command failed: status %d error %d\n", sc.retsts, -+ sc.error); -+ return -1; -+ } -+ return VCD_SECTOR_DATA; -+} -+ -+#ifdef VCD_CACHE -+ -+static int vcd_cache_size = 0; -+static char *vcd_cache_data = NULL; -+static int *vcd_cache_sectors = NULL; -+static int vcd_cache_index = 0; -+static int vcd_cache_current = -1; -+ -+void -+vcd_cache_init(int s) -+{ -+ vcd_cache_size = s; -+ vcd_cache_sectors = malloc(s * sizeof(int)); -+ vcd_cache_data = malloc(s * VCD_SECTOR_SIZE); -+ memset(vcd_cache_sectors, 255, s * sizeof(int)); -+} -+ -+static inline void -+vcd_cache_seek(int sect) -+{ -+ vcd_cache_current = sect; -+} -+ -+int -+vcd_cache_read(int fd, char *mem) -+{ -+ int i; -+ char *vcd_buf; -+ for (i = 0; i < vcd_cache_size; i++) -+ if (vcd_cache_sectors[i] == vcd_cache_current) { -+ vcd_buf = &vcd_cache_data[i * VCD_SECTOR_SIZE]; -+ ++vcd_cache_current; -+ memcpy(mem, &vcd_buf[VCD_SECTOR_OFFS], VCD_SECTOR_DATA); -+ return VCD_SECTOR_DATA; -+ } -+ vcd_buf = &vcd_cache_data[vcd_cache_index * VCD_SECTOR_SIZE]; -+ vcd_cache_sectors[vcd_cache_index] = vcd_cache_current; -+ ++vcd_cache_index; -+ if (vcd_cache_index >= vcd_cache_size) -+ vcd_cache_index = 0; -+ vcd_set_msf(vcd_cache_current); -+ memcpy(vcd_buf, &vcd_entry_data.addr.msf, sizeof(vcd_entry_data.addr.msf)); -+ ++vcd_cache_current; -+ memcpy(mem, &vcd_buf[VCD_SECTOR_OFFS], VCD_SECTOR_DATA); -+ return VCD_SECTOR_DATA; -+} -+#endif diff --git a/graphics/mplayer/patches/patch-bc b/graphics/mplayer/patches/patch-bc deleted file mode 100644 index d35ac8ecdf1..00000000000 --- a/graphics/mplayer/patches/patch-bc +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-bc,v 1.2 2001/12/25 18:02:10 wiz Exp $ ---- loader/Makefile.orig Thu Jul 12 21:02:55 2001 -+++ loader/Makefile Tue Jul 31 14:45:12 2001 -@@ -26,7 +19,7 @@ - distclean: clean - - .c.o: $@ -- $(CC) $(CFLAGS) $(DEFINES) -c $< -+ $(CC) $(CFLAGS) $(DEFINES) $(EXTRA_INC) -c $< - - libloader.a: $(LIB_OBJECTS) stubs.s - $(CC) -c ./stubs.s -o stubs.o diff --git a/graphics/mplayer/patches/patch-bd b/graphics/mplayer/patches/patch-bd deleted file mode 100644 index 45942ddd7a2..00000000000 --- a/graphics/mplayer/patches/patch-bd +++ /dev/null @@ -1,61 +0,0 @@ -$NetBSD: patch-bd,v 1.1.1.1 2001/12/21 23:38:52 zuntum Exp $ - ---- libvo/x11_common.c.orig Wed Jul 4 01:23:55 2001 -+++ libvo/x11_common.c -@@ -17,9 +17,6 @@ - #include <X11/Xutil.h> - #include <X11/Xatom.h> - --#include <X11/extensions/dpms.h> -- --static int dpms_disabled=0; - static int timeout_save=0; - - char* mDisplayName=NULL; -@@ -279,25 +276,6 @@ - void saver_on(Display *mDisplay) { - - int nothing; -- if (dpms_disabled) -- { -- if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing)) -- { -- if (!DPMSEnable(mDisplay)) { // restoring power saving settings -- printf("DPMS not available?\n"); -- } else { -- // DPMS does not seem to be enabled unless we call DPMSInfo -- BOOL onoff; -- CARD16 state; -- DPMSInfo(mDisplay, &state, &onoff); -- if (onoff) { -- printf ("Successfully enabled DPMS\n"); -- } else { -- printf ("Could not enable DPMS\n"); -- } -- } -- } -- } - - if (timeout_save) - { -@@ -313,20 +291,6 @@ - - int interval, prefer_blank, allow_exp, nothing; - -- if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing)) -- { -- BOOL onoff; -- CARD16 state; -- DPMSInfo(mDisplay, &state, &onoff); -- if (onoff) -- { -- Status stat; -- printf ("Disabling DPMS\n"); -- dpms_disabled=1; -- stat = DPMSDisable(mDisplay); // monitor powersave off -- printf ("stat: %d\n", stat); -- } -- } - XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp); - if (timeout_save) - XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp); |