aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MOVED1
-rw-r--r--multimedia/Makefile1
-rw-r--r--multimedia/nuppelvideo/Makefile85
-rw-r--r--multimedia/nuppelvideo/distinfo3
-rw-r--r--multimedia/nuppelvideo/files/patch-Makefile71
-rw-r--r--multimedia/nuppelvideo/files/patch-RTjpegN.c13
-rw-r--r--multimedia/nuppelvideo/files/patch-memmem.c62
-rw-r--r--multimedia/nuppelvideo/files/patch-nuv2mpg50
-rw-r--r--multimedia/nuppelvideo/files/patch-nuv2vbr48
-rw-r--r--multimedia/nuppelvideo/files/patch-nuvedit10
-rw-r--r--multimedia/nuppelvideo/files/patch-nuvplay.c12
-rw-r--r--multimedia/nuppelvideo/files/patch-nuvrec.c429
-rw-r--r--multimedia/nuppelvideo/files/patch-rtjpeg_plugin.h9
-rw-r--r--multimedia/nuppelvideo/pkg-descr6
-rw-r--r--multimedia/nuppelvideo/pkg-plist5
15 files changed, 1 insertions, 804 deletions
diff --git a/MOVED b/MOVED
index 06333a144d18..f66948989df8 100644
--- a/MOVED
+++ b/MOVED
@@ -3452,3 +3452,4 @@ x11-toolkits/tkstep80||2008-04-09|Has expired: development stalled for years, ou
devel/p5-Tie-Watch|x11-toolkits/p5-Tk|2008-04-14|bundled with p5-Tk
games/teewars|games/teeworls|2008-04-17|Project renamed
multimedia/exportvideo||2008-04-21|Add-on for soon to be removed nuppelvideo port
+multimedia/nuppelvideo||2008-04-21|Unmaintained upstream for years. The nuppelvideo format is now supported by mencoder
diff --git a/multimedia/Makefile b/multimedia/Makefile
index f141781d69c6..1374def6040e 100644
--- a/multimedia/Makefile
+++ b/multimedia/Makefile
@@ -163,7 +163,6 @@
SUBDIR += mythtv
SUBDIR += netshow
SUBDIR += noatun-plugins
- SUBDIR += nuppelvideo
SUBDIR += nxtvepg
SUBDIR += ogle
SUBDIR += ogle-gui
diff --git a/multimedia/nuppelvideo/Makefile b/multimedia/nuppelvideo/Makefile
deleted file mode 100644
index 94d8e059b5c3..000000000000
--- a/multimedia/nuppelvideo/Makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# New ports collection makefile for: NuppelViodeo
-# Date created: Mon 10 Feb 2003 22:21:51 CET
-# Whom: Steve O'Hara-Smith <steve@sohara.org>
-#
-# $FreeBSD$
-#
-
-PORTNAME= NuppelVideo
-PORTVERSION= 0.52.a
-PORTREVISION= 4
-CATEGORIES= multimedia audio
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= arved
-DISTNAME= ${PORTNAME}-${PORTVERSION:C/.(.)$/\1/}
-
-MAINTAINER= steve@sohara.org
-COMMENT= A very low CPU usage VCR/DVR application
-
-RUN_DEPENDS= wish8.4:${PORTSDIR}/x11-toolkits/tk84
-
-DEPRECATED= Unmaintained upstream for years. The nuppelvideo format is now supported by mencoder
-EXPIRATION_DATE=2007-10-03
-
-USE_XORG= x11 sm xext
-USE_GMAKE= yes
-
-PORTDOCS= README
-
-# find dependencies
-CFLAGS+= -I${LOCALBASE}/include \
- -L${LOCALBASE}/lib
-
-.include <bsd.port.pre.mk>
-
-###
-## Auto detected features
-###
-.if ${ARCH} == "i386"
-. if (defined(MACHINE_CPU) && ${MACHINE_CPU:Mmmx:L} == "mmx")
-WITH_MMX=yes
-. endif
-.endif
-
-###
-## Port options
-###
-.ifdef(WITH_OPTIMIZED_CFLAGS)
-CFLAGS+= -O3 -ffast-math -fomit-frame-pointer -finline-functions \
- -funroll-loops -fexpensive-optimizations
-.endif
-#
-.ifdef(WITH_MMX)
-CFLAGS+= -DMMX
-.endif
-
-pre-everything::
-.ifndef(WITH_OPTIMIZED_CFLAGS)
- @${ECHO_MSG}
- @${ECHO_MSG} 'You can enable additional compilation optimizations'
- @${ECHO_MSG} 'by defining WITH_OPTIMIZED_CFLAGS'
-.endif
-.if (${ARCH} == "i386" && !defined(WITH_MMX))
- @${ECHO_MSG}
- @${ECHO_MSG} 'You can enable MMX compilation optimizations'
- @${ECHO_MSG} 'by defining WITH_MMX'
-.endif
-
-post-patch:
-# C{C,FLAGS} safeness
- @${REINPLACE_CMD} -E -e \
- 's|^CFLAGS.*$$|#|' \
- -e 's|^CC.*$$|#|' \
- -e 's|^(COPTSRT).*$$|\1=\$$(CFLAGS)|' \
- ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e 's|[(]__u8[)]strm[[]|((__u8*)strm)[|' ${WRKSRC}/RTjpegN.c
-
-post-install:
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
-.for i in ${PORTDOCS}
- ${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR}
-.endfor
-.endif
-
-.include <bsd.port.post.mk>
diff --git a/multimedia/nuppelvideo/distinfo b/multimedia/nuppelvideo/distinfo
deleted file mode 100644
index cd6b3946f89f..000000000000
--- a/multimedia/nuppelvideo/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 (NuppelVideo-0.52a.tar.gz) = 66f0e1dbf56f55e37e45051eed1782d1
-SHA256 (NuppelVideo-0.52a.tar.gz) = 80973970e492fd71921c7f2a93ba746910ac026880dd11035a49f099693fe2b6
-SIZE (NuppelVideo-0.52a.tar.gz) = 105334
diff --git a/multimedia/nuppelvideo/files/patch-Makefile b/multimedia/nuppelvideo/files/patch-Makefile
deleted file mode 100644
index 0ab3b6cd8ca0..000000000000
--- a/multimedia/nuppelvideo/files/patch-Makefile
+++ /dev/null
@@ -1,71 +0,0 @@
---- Makefile.orig Sat Jul 7 14:08:52 2001
-+++ Makefile Thu Oct 28 02:47:40 2004
-@@ -1,10 +1,10 @@
--CC=gcc
-+#
- #CFLAGS= -g -Wall -O3 -mcpu=pentium -march=pentium -funroll-loops -fexpensive-optimizations -finline
--CFLAGS= -Wall -O3 -DMMX -mcpu=pentium -march=pentium -funroll-loops -fexpensive-optimizations -finline-functions
-+#
-
- V4LDIR=/usr/src/linux/drivers/char/
- COPTS=$(CFLAGS) -I$(V4LDIR)
--COPTSRT= -O3 -Wall -DMMX -mcpu=pentium -funroll-loops -fexpensive-optimizations -finline-functions
-+COPTSRT=$(CFLAGS)
-
- all: nuvplay nuvrec
-
-@@ -19,32 +19,35 @@
-
-
- soxfuncs.o: soxfuncs.c
-- $(CC) $(COPTS) -O3 -funroll-loops -finline-functions -c soxfuncs.c
-+ $(CC) $(COPTS) -c soxfuncs.c
-
-
- resample.o: resample.c
-- $(CC) $(COPTS) -O3 -funroll-loops -finline-functions -c resample.c
-+ $(CC) $(COPTS) -c resample.c
-
-
- minilzo.o: minilzo.c minilzo.h
-- $(CC) $(COPTS) -O3 -fexpensive-optimizations -funroll-loops -finline-functions -c minilzo.c
-+ $(CC) $(COPTS) -c minilzo.c
-
-
- yuv2rgb_mmx.o: yuv2rgb_mmx.c yuv2rgb.h
-- $(CC) $(COPTS) -O3 -funroll-loops -finline-functions -c yuv2rgb_mmx.c
-+ $(CC) $(COPTS) -c yuv2rgb_mmx.c
-
- areaDeinterlace.o: areaDeinterlace.h areaDeinterlace.c
-- $(CC) $(COPTS) -O3 -fexpensive-optimizations -funroll-loops -finline-functions -c areaDeinterlace.c
-+ $(CC) $(COPTS) -c areaDeinterlace.c
-+
-+memmem.o: memmem.c
-+ $(CC) $(COPTS) -c memmem.c
-
- rtjpeg_plugin.o: rtjpeg_plugin.c rtjpeg_plugin.h
-- $(CC) $(COPTS) -O3 -fexpensive-optimizations -funroll-loops -finline-functions -c rtjpeg_plugin.c
-+ $(CC) $(COPTS) -c rtjpeg_plugin.c
-
- nuvrec: nuvrec.c RTjpegN.h RTjpegN.o minilzo.o
- $(CC) $(COPTS) -o nuvrec minilzo.o RTjpegN.o nuvrec.c
-
--nuvplay:nuvplay.c RTjpegN.h areaDeinterlace.o RTjpegN.o XJ.o minilzo.o yuv2rgb_mmx.o rtjpeg_plugin.o resample.o soxfuncs.o
-+nuvplay:nuvplay.c RTjpegN.h areaDeinterlace.o RTjpegN.o XJ.o minilzo.o yuv2rgb_mmx.o memmem.o rtjpeg_plugin.o resample.o soxfuncs.o
- $(CC) $(COPTS) -L/usr/X11R6/lib -lm -lXext -o nuvplay RTjpegN.o yuv2rgb_mmx.o \
-- minilzo.o areaDeinterlace.o XJ.o soxfuncs.o resample.o rtjpeg_plugin.o nuvplay.c
-+ minilzo.o areaDeinterlace.o XJ.o soxfuncs.o resample.o memmem.o rtjpeg_plugin.o nuvplay.c
-
- static: rec-s nuvplay
-
-@@ -52,8 +55,8 @@
- $(CC) $(COPTS) -static -o nuvrec minilzo.o RTjpegN.o nuvrec.c
-
- install: nuvrec nuvplay
-- strip nuvrec nuvplay
-- install -m 755 nuvrec nuvplay nuvedit nuv2mpg nuv2vbr /usr/local/bin
-+ @${BSD_INSTALL_PROGRAM} nuvrec nuvplay ${PREFIX}/bin
-+ @${BSD_INSTALL_SCRIPT} nuvedit nuv2mpg nuv2vbr ${PREFIX}/bin
-
- clean:
- rm -f *.o nuvplay nuvrec
diff --git a/multimedia/nuppelvideo/files/patch-RTjpegN.c b/multimedia/nuppelvideo/files/patch-RTjpegN.c
deleted file mode 100644
index c7e2260d341c..000000000000
--- a/multimedia/nuppelvideo/files/patch-RTjpegN.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- RTjpegN.c.orig Mon Jul 2 23:55:42 2001
-+++ RTjpegN.c Thu Aug 5 00:03:22 2004
-@@ -351,8 +351,8 @@
- case 0x00:
- data[i]= 0;
- break;
-- default:
--
-+ default:
-+ break;
- }
-
- if( bitoff == 0 ) {
diff --git a/multimedia/nuppelvideo/files/patch-memmem.c b/multimedia/nuppelvideo/files/patch-memmem.c
deleted file mode 100644
index 76dbf50883a7..000000000000
--- a/multimedia/nuppelvideo/files/patch-memmem.c
+++ /dev/null
@@ -1,62 +0,0 @@
---- memmem.c.orig Thu Jan 1 00:00:00 1970
-+++ memmem.c Sun Oct 24 23:05:56 2004
-@@ -0,0 +1,59 @@
-+/* Copyright (C) 1991,92,93,94,96,97,98,2000 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <stddef.h>
-+#include <string.h>
-+
-+/* Prepare for the case that `__builtin_expect' is not available. */
-+#ifndef HAVE_BUILTIN_EXPECT
-+# define __builtin_expect(expr, val) (expr)
-+#endif
-+
-+#undef memmem
-+
-+/* Return the first occurrence of NEEDLE in HAYSTACK. */
-+void *
-+memmem (haystack, haystack_len, needle, needle_len)
-+ const void *haystack;
-+ size_t haystack_len;
-+ const void *needle;
-+ size_t needle_len;
-+{
-+ const char *begin;
-+ const char *const last_possible
-+ = (const char *) haystack + haystack_len - needle_len;
-+
-+ if (needle_len == 0)
-+ /* The first occurrence of the empty string is deemed to occur at
-+ the beginning of the string. */
-+ return (void *) haystack;
-+
-+ /* Sanity check, otherwise the loop might search through the whole
-+ memory. */
-+ if (__builtin_expect (haystack_len < needle_len, 0))
-+ return NULL;
-+
-+ for (begin = (const char *) haystack; begin <= last_possible; ++begin)
-+ if (begin[0] == ((const char *) needle)[0] &&
-+ !memcmp ((const void *) &begin[1],
-+ (const void *) ((const char *) needle + 1),
-+ needle_len - 1))
-+ return (void *) begin;
-+
-+ return NULL;
-+}
diff --git a/multimedia/nuppelvideo/files/patch-nuv2mpg b/multimedia/nuppelvideo/files/patch-nuv2mpg
deleted file mode 100644
index 5dbe4121a9d5..000000000000
--- a/multimedia/nuppelvideo/files/patch-nuv2mpg
+++ /dev/null
@@ -1,50 +0,0 @@
---- nuv2mpg.orig Mon Jun 25 21:33:41 2001
-+++ nuv2mpg Thu Oct 28 16:30:47 2004
-@@ -1,13 +1,30 @@
- #!/bin/sh
-
-+if [ $# = 0 ]; then
-+ echo "Usage: $0 <nuvfile>"
-+ exit 1
-+fi
-+name=${1%.nuv}
-+
-+retval=0
-+for PROG in toolame exportvideo mpeg2enc mplex ; do
-+ which -s $PROG || retval=$?
-+ if [ $retval -ne 0 ]; then
-+ echo "Error: could't find '$PROG' on this system." >&2
-+ exit 1
-+ fi
-+done
-+
- echo "you have choosen to make a VCD compliant MPEG stream"
- echo "please notice that VBR MPEG streams can have the same"
- echo "visual quality with lower/low bitrates too (like divx)"
- echo ""
-
--nuvplay -e $1.nuv | toolame -s 44100 -b 224 -p 2 -m s /dev/stdin $1.mp2
--exportvideo $1.nuv "|mpeg2enc -b 1152 -G 15 -g 15 -N -o $1.m1v"
--mplex -f 1 -s 2324 -p 1 -o $1.mpg $1.m1v $1.mp2
-+nuvplay -e $name.nuv | toolame -s 44.1 -b 224 -p 2 -m s /dev/stdin $name.mp2
-+exportvideo -Y 2 $name.nuv | mpeg2enc -f 1 -o $name.m1v
-+mplex -f 1 -s 2324 -p 1 -o $name.mpg $name.m1v $name.mp2
-+
-+which -s vcdimager || exit 2
-
- echo ""
- echo "Press enter for making a BIN and CUE file from your MPG file or"
-@@ -15,11 +32,11 @@
- echo ""
- read enter
-
--vcdimager -c $1.cue -b $1.bin $1.mpg
-+vcdimager -c $name.cue -b $name.bin $name.mpg
-
- echo "you can burn your bin/cue files with cdrdao, simple change the
- echo "device parameter to your cdwriter id and type"
- echo ""
--echo "cdrdao write --eject --device=0,3,0 $1.cue"
-+echo "cdrdao write --eject --device=0,3,0 $name.cue"
- echo ""
- echo "have fun"
diff --git a/multimedia/nuppelvideo/files/patch-nuv2vbr b/multimedia/nuppelvideo/files/patch-nuv2vbr
deleted file mode 100644
index bdb5dce97d77..000000000000
--- a/multimedia/nuppelvideo/files/patch-nuv2vbr
+++ /dev/null
@@ -1,48 +0,0 @@
---- nuv2vbr.orig Mon Jun 25 21:35:49 2001
-+++ nuv2vbr Thu Oct 28 18:43:41 2004
-@@ -1,23 +1,39 @@
- #!/bin/sh
-
-+if [ $# = 0 ]; then
-+ echo "Usage: $0 <nuvfile>"
-+ exit 1
-+fi
-+name=${1%.nuv}
-+
-+retval=0
-+for PROG in toolame exportvideo mpeg2enc mplex ; do
-+ which -s $PROG || retval=$?
-+ if [ $retval -ne 0 ]; then
-+ echo "Error: could't find '$PROG' on this system." >&2
-+ exit 1
-+ fi
-+done
-+
- echo "you have choosen to make a VBR MPEG stream"
- echo "please notice that VBR MPEG streams cannot be burned to"
- echo "a VCD for use with a DVD player, if you want that use nuv2mpg"
- echo ""
- echo "this is only an example script you should edit it to your"
--echo "quality needs. i'll make a better all purpose mpeg script
-+echo "quality needs. i'll make a better all purpose mpeg script"
- echo "in time. try to play around with -q and -b and read the"
- echo "mpeg2enc man page!!!"
-+echo
-
--nuvplay -e $1.nuv | toolame -s 44100 -b 192 -p 2 -m s /dev/stdin $1.mp2
--exportvideo $1.nuv "|mpeg2enc -b 1300 -q 7 -G 21 -g 21 -N -o $1.m1v"
--mplex -V -s 2324 -p 1 -o $1.mpg $1.m1v $1.mp2
-+nuvplay -e $name.nuv | toolame -s 44.1 -b 192 -p 2 -m s /dev/stdin $name.mp2
-+exportvideo -Y 2 $name.nuv | mpeg2enc -b 1300 -q 7 -G 21 -g 21 -o $name.m1v
-+mplex -V -r 2000 -s 2324 -p 1 -o $name.mpg $name.m1v $name.mp2
-
--echo "you can burn your mpg files with cdrecord, simple change the
-+echo "you can burn your mpg files with cdrecord, simple change the"
- echo "device parameter to your cdwriter id and type"
- echo ""
- echo "mkdir disk1"
--echo "mv $1.mpg disk1/"
-+echo "mv $name.mpg disk1/"
- echo "cd disk1/"
- echo "md5sum * >disk.md5"
- echo "cd .."
diff --git a/multimedia/nuppelvideo/files/patch-nuvedit b/multimedia/nuppelvideo/files/patch-nuvedit
deleted file mode 100644
index 89593e219f71..000000000000
--- a/multimedia/nuppelvideo/files/patch-nuvedit
+++ /dev/null
@@ -1,10 +0,0 @@
---- nuvedit.orig Wed Jul 4 13:17:18 2001
-+++ nuvedit Thu Oct 28 14:08:14 2004
-@@ -1,6 +1,6 @@
- #!/bin/sh
- # \
--exec wish "$0" "$@"
-+exec wish8.4 "$0" "$@"
-
-
- set procfil {}
diff --git a/multimedia/nuppelvideo/files/patch-nuvplay.c b/multimedia/nuppelvideo/files/patch-nuvplay.c
deleted file mode 100644
index 0adf99aaaf92..000000000000
--- a/multimedia/nuppelvideo/files/patch-nuvplay.c
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur ../NuppelVideo-0.52a/nuvplay.c ./nuvplay.c
---- ../NuppelVideo-0.52a/nuvplay.c Wed Jul 4 17:28:41 2001
-+++ ./nuvplay.c Mon Feb 10 18:38:06 2003
-@@ -272,7 +272,7 @@
- if (rtjpeg_fileheader.audioblocks!=0 && playaudio!=0) {
- if (writeaudiotofile) {
- // write to file, file MUST NOT exist
-- audf = (writeaudiotofile==1) ? open(audiofilename, O_EXCL|O_CREAT|O_WRONLY|O_SYNC, 0600) : 1;
-+ audf = (writeaudiotofile==1) ? open(audiofilename, O_EXCL|O_CREAT|O_WRONLY|O_FSYNC, 0600) : 1;
- if (audf==-1) {
- if (errno!=EEXIST)
- fprintf(stderr, "cannot write to file '%s', no audio is played\n", audiofilename);
diff --git a/multimedia/nuppelvideo/files/patch-nuvrec.c b/multimedia/nuppelvideo/files/patch-nuvrec.c
deleted file mode 100644
index 00562ac6dab6..000000000000
--- a/multimedia/nuppelvideo/files/patch-nuvrec.c
+++ /dev/null
@@ -1,429 +0,0 @@
---- nuvrec.c.orig Wed Jul 4 23:59:36 2001
-+++ nuvrec.c Thu Oct 28 12:02:27 2004
-@@ -27,14 +27,28 @@
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-+#include <sys/param.h>
-+#if __FreeBSD_version >= 502100
-+#include <dev/bktr/ioctl_meteor.h>
-+#include <dev/bktr/ioctl_bt848.h>
-+#else
-+#include <machine/ioctl_meteor.h>
-+#include <machine/ioctl_bt848.h>
-+#endif
- #include <sys/soundcard.h>
--#include <linux/videodev.h>
--#include <linux/wait.h>
-+#include <sys/wait.h>
- #include <errno.h>
- #include "minilzo.h"
- #include "RTjpegN.h"
- #include "nuppelvideo.h"
-
-+typedef unsigned char UINT8;
-+typedef unsigned int UINT32;
-+typedef unsigned long long UINT64;
-+typedef signed char INT8;
-+typedef signed int INT32;
-+typedef signed long long INT64;
-+
- // #define TESTINPUT 1
- // #define TESTSPLIT 1
- #define KEYFRAMEDIST 30
-@@ -42,16 +56,38 @@
- #ifdef TESTSPLIT
- #define MAXBYTES 20000000
- #define MAXBYTESFORCE 21000000
-+#define SPLIT 1
- #else
- #define MAXBYTES 2000000000
- #define MAXBYTESFORCE 2100000000
- #endif
-
--// we need the BTTV_FIELDNR, so we really know how many frames we lose
--#define BTTV_FIELDNR _IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int)
-+#ifndef SPLIT
-+#define SPLIT 0
-+#endif
-+
-+#define PAL 1
-+#define NTSC 2
-+#define SECAM 3
-+#define PALN 4
-+#define PALM 5
-+#define PALBDGHI PAL
-+#define NTSCJ 6
-+#define NTSCM NTSC
-+
-+/* PAL is 768 x 576. NTSC is 640 x 480 */
-+#define PAL_HEIGHT 576
-+#define SECAM_HEIGHT 576
-+#define NTSC_HEIGHT 480
-+
-+#include <sys/mman.h>
-+#include <sys/time.h>
-+#include <signal.h>
-
- /* Globals */
-
-+int bktr_dev[] = { METEOR_DEV0, METEOR_DEV1, METEOR_DEV2,
-+ METEOR_DEV3, METEOR_DEV_SVIDEO };
- int fd; // output file haendle
- int ostr=0;
- __s8 *strm;
-@@ -71,10 +107,10 @@
- unsigned long long audiobytes;
- int effectivedsp;
- int ntsc=0; // default to PAL, this info is only for the video header
-+int secam=0;
- int quiet;
- int rawmode=0;
--int usebttv=1;
--struct video_audio origaudio;
-+int usebttv=0;
-
- //#define DP(DSTRING) fprintf(stderr, "%s\n", DSTRING);
- #define DP(DSTRING)
-@@ -173,9 +209,6 @@
- kill(pid, 9);
- if (recordaudio) kill(pid2, 9);
-
-- // reset audio settings
-- if (ioctl(fd, VIDIOCSAUDIO, &origaudio)<0) perror("VIDIOCSAUDIO");
--
- if (!quiet) fprintf(stderr, "\n"); // preserve status line
- exit(i);
- }
-@@ -201,24 +234,25 @@
- unsigned char *startaudio;
-
- if (init_shm) {
-- shmid = shmget(IPC_PRIVATE, video_buffer_size*video_buffer_count +
-+ shmid = shmget(0xdeadbeef, video_buffer_size*video_buffer_count +
- audio_buffer_size*audio_buffer_count +
- video_buffer_count*sizeof(vidbuffertyp) +
- audio_buffer_count*sizeof(audbuffertyp),
-- IPC_EXCL | IPC_CREAT | 0600);
-+ IPC_CREAT | SHM_R | SHM_W);
- if (shmid == -1)
- ERROR("shmget");
- }
-- sharedbuffer = shmat(shmid, IPC_RMID, SHM_RND);
-+ sharedbuffer = shmat(shmid, (char *) 0, 0);
- if (sharedbuffer == (char*)-1)
- {
-+ fprintf (stderr, "shmid %d\n", shmid);
- perror("shmat");
- if(shmctl(shmid, IPC_RMID, NULL))
- perror("shmctl");
- exit(-1);
- }
-- if(shmctl(shmid, IPC_RMID, NULL))
-- ERROR("shmctl");
-+// if(shmctl(shmid, IPC_RMID, NULL))
-+// ERROR("shmctl");
-
- videobuffer = (struct vidbuffertype *)sharedbuffer;
- startaudiodesc = (char *)(sharedbuffer + video_buffer_count*sizeof(vidbuffertyp));
-@@ -792,7 +826,7 @@
- // we have no frames in our cycle buffer
- //fprintf(stderr,"*");
-
-- if (byteswritten > MAXBYTES) {
-+ if (SPLIT && byteswritten > MAXBYTES) {
- actfile++;
- if (0 != create_nuppelfile(fname, actfile, w, h)) {
- fprintf(stderr, "cannot open %s-%d.nuv for writing\n", fname, actfile);
-@@ -804,7 +838,7 @@
- continue; // check for next frame
- }
-
-- if (byteswritten > MAXBYTESFORCE) {
-+ if (SPLIT && byteswritten > MAXBYTESFORCE) {
- actfile++;
- if (0 != create_nuppelfile(fname, actfile, w, h)) {
- fprintf(stderr, "cannot open %s-%d.nuv for writing\n", fname, actfile);
-@@ -899,24 +933,6 @@
- #ifdef TESTINPUT
- tf+=2; // when reading from files we won't lose frames ;)
- #else
-- if (usebttv) {
-- // i hate it when interfaces changes and a non existent ioctl doesn't make an error
-- // and doesn't return -1, returning 0 instead and making no error is really weird
-- if (ioctl(fd, BTTV_FIELDNR, &tf)) {
-- perror("BTTV_FIELDNR");
-- usebttv = 0;
-- fprintf(stderr, "\nbttv_fieldnr not supported by bttv-driver"
-- "\nuse insmod/modprobe bttv card=YOURCARD field_nr=1 to activate f.n."
-- "\nfalling back to timecode routine to determine lost frames\n");
-- }
-- if (tf==0) {
-- usebttv = 0;
-- fprintf(stderr, "\nbttv_fieldnr not supported by bttv-driver"
-- "\nuse insmod/modprobe bttv card=YOURCARD field_nr=1 to activate f.n."
-- "\nfalling back to timecode routine to determine lost frames\n");
-- }
-- }
--
- // here is the non preferable timecode - drop algorithm - fallback
- if (!usebttv) {
-
-@@ -1073,21 +1089,125 @@
- exit(-1);
- }
-
-+INT64 av_gettime(void)
-+{
-+ struct timeval tv;
-+ gettimeofday(&tv,NULL);
-+ return (INT64)tv.tv_sec * 1000000 + tv.tv_usec;
-+}
-+
-+static int nsignals = 0;
-+static void catchsignal(int signal)
-+{
-+ nsignals++;
-+ return;
-+}
-+
-+static int bktr_init(int video_fd, int width, int height, UINT8 **video_buf, int channel)
-+{
-+ int format = PAL;
-+ struct meteor_geomet geo;
-+ int c;
-+ int h_max;
-+ struct sigaction act,old;
-+
-+ if (channel < 0 || channel > 4)
-+ channel = 1;
-+ if (ntsc) {
-+ format = NTSC;
-+ } else if (secam) {
-+ format = SECAM;
-+ }
-+
-+ memset(&act,0,sizeof(act));
-+ sigemptyset(&act.sa_mask);
-+ act.sa_handler = catchsignal;
-+ sigaction(SIGUSR1,&act,&old);
-+
-+ geo.rows = height;
-+ geo.columns = width;
-+ geo.frames = 1;
-+ geo.oformat = METEOR_GEO_YUV_422 | METEOR_GEO_YUV_12;
-+
-+ switch (format) {
-+ case PAL: h_max = PAL_HEIGHT; c = BT848_IFORM_F_PALBDGHI; break;
-+ case PALN: h_max = PAL_HEIGHT; c = BT848_IFORM_F_PALN; break;
-+ case PALM: h_max = PAL_HEIGHT; c = BT848_IFORM_F_PALM; break;
-+ case SECAM: h_max = SECAM_HEIGHT; c = BT848_IFORM_F_SECAM; break;
-+ case NTSC: h_max = NTSC_HEIGHT; c = BT848_IFORM_F_NTSCM; break;
-+ case NTSCJ: h_max = NTSC_HEIGHT; c = BT848_IFORM_F_NTSCJ; break;
-+ default: h_max = PAL_HEIGHT; c = BT848_IFORM_F_PALBDGHI; break;
-+ }
-+ if (height <= h_max/2) {
-+ geo.oformat |= METEOR_GEO_EVEN_ONLY;
-+ }
-+
-+ if (ioctl(video_fd, METEORSETGEO, &geo) < 0) {
-+ perror ("METEORSETGEO");
-+ return -EIO;
-+ }
-+
-+ if (ioctl(video_fd, BT848SFMT, &c) < 0) {
-+ perror ("BT848SFMT");
-+ return -EIO;
-+ }
-+
-+ c = bktr_dev[channel];
-+ if (ioctl(video_fd, METEORSINPUT, &c) < 0) {
-+ perror ("METEORSINPUT");
-+ return -EIO;
-+ }
-+ *video_buf = (UINT8 *) mmap((caddr_t)0, width*height*3,
-+ PROT_READ, MAP_SHARED, video_fd, (off_t) 0);
-+ if (*video_buf == MAP_FAILED) {
-+ perror ("mmap");
-+ return -EIO;
-+ }
-+ c = METEOR_CAP_CONTINOUS;
-+ ioctl(video_fd, METEORCAPTUR, &c);
-+ c = SIGUSR1;
-+ ioctl (video_fd, METEORSSIGNAL, &c);
-+ return 0;
-+}
-+
-+/* note: we support only one picture read at a time */
-+static void bktr_getframe(int width, int height, UINT64 per_frame)
-+{
-+ int size, halfsize;
-+ UINT64 curtime;
-+ static UINT64 last_frame_time = 0;
-+
-+ size = width * height;
-+ halfsize = size << 1;
-+
-+ curtime = av_gettime();
-+ if (!last_frame_time
-+ || ((last_frame_time + per_frame) > curtime)) {
-+ if (!usleep (last_frame_time + per_frame + per_frame/8 - curtime)) {
-+ if (!nsignals)
-+ printf ("\nSLEPT NO signals - %d microseconds late\n",
-+ av_gettime() - last_frame_time - per_frame);
-+ }
-+ }
-+ nsignals = 0;
-+
-+ last_frame_time = curtime;
-+}
-+
-+
- // ----------------------------------------------------------
- // -- MAIN --------------------------------------------------
-
- int main(int argc, char** argv)
- {
-- struct video_mmap mm;
-- struct video_mbuf vm;
-- struct video_channel vchan;
-- struct video_audio va;
-- struct video_tuner vt;
-+ int tuner_fd;
-+ int video_frame_rate = 25;
-+ UINT64 per_frame = (UINT64) (((UINT64)1000000 * (UINT64)10000) / (UINT64)video_frame_rate);
-+ UINT8 *video_buf = NULL;
-
-- char *videodevice = "/dev/video0";
-+ char *videodevice = "/dev/bktr0";
- char c;
-- int secam;
-- int channel=0;
-+ int channel=1;
- double frequency=0.0;
- long v4lfrequency=0;
- int volume = -1;
-@@ -1277,109 +1397,28 @@
- testinput();
- #else
-
-- fd = open(videodevice, O_RDWR|O_CREAT);
-+ fd = open(videodevice, O_RDONLY);
- if(fd<=0){
- perror("open");
- fatherhandler(-1);
- }
--
-- if(ioctl(fd, VIDIOCGMBUF, &vm)<0)
-- {
-- perror("VIDIOCMCAPTUREi0");
-- fatherhandler(-1);
-- }
-- if(vm.frames<2)
-- {
-- fprintf(stderr, "stoopid prog want min 2 cap buffs!\n");
-- fatherhandler(-1);
-+ tuner_fd = open ("/dev/tuner0", O_RDWR);
-+ if (tuner_fd < 0) {
-+ perror("Warning: Tuner not opened continuing");
- }
--
-- // fprintf(stderr, "We have vm.frames=%d\n", vm.frames);
--
-- buf = (unsigned char*)mmap(0, vm.size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-- if (buf<=0)
-- {
-- perror("mmap");
-- fatherhandler(-1);
-- }
--
--
-- vchan.channel = channel;
-- if(ioctl(fd, VIDIOCGCHAN, &vchan)<0) perror("VIDIOCGCHAN");
--
-- // choose the right input
-- if(ioctl(fd, VIDIOCSCHAN, &vchan)<0) perror("VIDIOCSCHAN");
--
-- // if channel has a audio then activate it
-- if ((vchan.flags & VIDEO_VC_AUDIO)==VIDEO_VC_AUDIO) {
-- // we assume only a channel with audio can have a tuner therefore
-- // we only tune here if we are supposed to
-- if (frequency != 0.0) {
-- v4lfrequency = ((unsigned long)frequency)*16;
-- v4lfrequency |= ((unsigned long)( (frequency-(v4lfrequency/16))*100 )*16)/100; // ??????
-- if (ioctl(fd, VIDIOCSFREQ, &v4lfrequency)<0) perror("VIDIOCSFREQ");
-- if (!quiet) fprintf(stderr, "tuner frequency set to '%5.4f' MHz.\n", frequency);
-- }
-- if (!quiet) fprintf(stderr, "%s\n", "unmuting tv-audio");
-- // audio hack, to enable audio from tvcard, in case we use a tuner
-- va.audio = 0; // use audio channel 0
-- if (ioctl(fd, VIDIOCGAUDIO, &va)<0) perror("VIDIOCGAUDIO");
-- origaudio = va;
-- if (!quiet) fprintf(stderr, "audio volume was '%d'\n", va.volume);
-- va.audio = 0;
-- va.flags &= ~VIDEO_AUDIO_MUTE; // now this really has to work
--
-- if ((volume==-1 && va.volume<32768) || volume!=-1) {
-- if (volume==-1) {
-- va.volume = 32768; // no more silence 8-)
-- } else {
-- va.volume = volume;
-- }
-- if (!quiet) fprintf(stderr, "audio volume set to '%d'\n", va.volume);
-- }
-- if (ioctl(fd, VIDIOCSAUDIO, &va)<0) perror("VIDIOCSAUDIO");
-- } else {
-- if (!quiet) fprintf(stderr, "channel '%d' has no tuner (composite)\n", channel);
-+
-+ bktr_init (fd, w, h, &video_buf, channel);
-+ if (frequency != 0.0) {
-+ v4lfrequency = (unsigned long)(frequency*16);
-+ if (ioctl(tuner_fd, TVTUNER_SETFREQ, &v4lfrequency)<0)
-+ perror("TVTUNER_SETFREQ");
-+ if (!quiet)
-+ fprintf(stderr, "tuner frequency set to '%5.4f' MHz.\n", frequency);
- }
-
-- // setting video mode
-- vt.tuner = 0;
-- if(ioctl(fd, VIDIOCGTUNER, &vt)<0) perror("VIDIOCGTUNER");
-- if (ntsc) { vt.flags |= VIDEO_TUNER_NTSC; vt.mode |= VIDEO_MODE_NTSC; }
-- else if (secam) { vt.flags |= VIDEO_TUNER_SECAM; vt.mode |= VIDEO_MODE_SECAM; }
-- else { vt.flags |= VIDEO_TUNER_PAL; vt.mode |= VIDEO_MODE_PAL; }
-- vt.tuner = 0;
-- if(ioctl(fd, VIDIOCSTUNER, &vt)<0) perror("VIDIOCSTUNER");
--
-- // make sure we use the right input
-- if(ioctl(fd, VIDIOCSCHAN, &vchan)<0) perror("VIDIOCSCHAN");
--
-- mm.height = h;
-- mm.width = w;
-- mm.format = VIDEO_PALETTE_YUV420P ; /* YCrCb422 */
--
-- mm.frame = 0;
-- if(ioctl(fd, VIDIOCMCAPTURE, &mm)<0) perror("VIDIOCMCAPTUREi0");
-- mm.frame = 1;
-- if(ioctl(fd, VIDIOCMCAPTURE, &mm)<0) perror("VIDIOCMCAPTUREi1");
--
- while(1) {
-- frame=0;
-- mm.frame = 0;
-- if(ioctl(fd, VIDIOCSYNC, &frame)<0) perror("VIDIOCSYNC0");
-- else {
-- if(ioctl(fd, VIDIOCMCAPTURE, &mm)<0) perror("VIDIOCMCAPTURE0");
-- DP("Captured 0er");
-- bufferit(buf+vm.offsets[0]);
-- }
-- frame=1;
-- mm.frame = 1;
-- if(ioctl(fd, VIDIOCSYNC, &frame)<0) perror("VIDIOCSYNC1");
-- else {
-- if(ioctl(fd, VIDIOCMCAPTURE, &mm)<0) perror("VIDIOCMCAPTURE1");
-- DP("Captured 1er");
-- bufferit(buf+vm.offsets[1]);
-- }
-+ bktr_getframe (w, h, per_frame);
-+ bufferit(video_buf);
- }
- #endif
-
diff --git a/multimedia/nuppelvideo/files/patch-rtjpeg_plugin.h b/multimedia/nuppelvideo/files/patch-rtjpeg_plugin.h
deleted file mode 100644
index 07759b495015..000000000000
--- a/multimedia/nuppelvideo/files/patch-rtjpeg_plugin.h
+++ /dev/null
@@ -1,9 +0,0 @@
---- rtjpeg_plugin.h.orig Tue Jul 3 15:01:32 2001
-+++ rtjpeg_plugin.h Thu Oct 28 02:28:45 2004
-@@ -56,3 +56,6 @@
- int rtjpeg_end_of_video();
- int rtjpeg_check_sig(char *fname);
-
-+/* Stolen from glibc */
-+void *memmem(const void *haystack, size_t haystacklen,
-+ const void *needle, size_t needlelen);
diff --git a/multimedia/nuppelvideo/pkg-descr b/multimedia/nuppelvideo/pkg-descr
deleted file mode 100644
index cd62bd4d4df4..000000000000
--- a/multimedia/nuppelvideo/pkg-descr
+++ /dev/null
@@ -1,6 +0,0 @@
-NuppelVideo is a simple low consuming and fast capture program for
-bktr. It is based on the RTjpeg2.0 test3* programs from Justin
-Schoemann who wrote the both very fast and fine RTjpeg2.0 codec
-(improved by Joerg Walter and Wim Taymans).
-
-WWW: http://frost.htu.tuwien.ac.at/~roman/nuppelvideo/
diff --git a/multimedia/nuppelvideo/pkg-plist b/multimedia/nuppelvideo/pkg-plist
deleted file mode 100644
index 7d4661cead28..000000000000
--- a/multimedia/nuppelvideo/pkg-plist
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/nuv2mpg
-bin/nuv2vbr
-bin/nuvedit
-bin/nuvplay
-bin/nuvrec