diff options
Diffstat (limited to 'multimedia')
27 files changed, 266 insertions, 1355 deletions
diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 2fa68d11ec4..2f0d63be7c5 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -1,43 +1,63 @@ -# $NetBSD: Makefile,v 1.36 2008/09/01 00:00:10 tonnerre Exp $ +# $NetBSD: Makefile,v 1.37 2008/09/07 23:39:37 ahoka Exp $ -DISTNAME= ffmpeg-0.4.9-pre1 -PKGNAME= ffmpeg-0.4.9pre1 -PKGREVISION= 4 +DISTNAME= ffmpeg-${DISTVERSION} +PKGNAME= ffmpeg-${DISTVERSION:S/-//g} CATEGORIES= multimedia -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ffmpeg/} +MASTER_SITES= ${MASTER_SITE_FREEBSD} +EXTRACT_SUFX= .tar.bz2 -MAINTAINER= zul@NetBSD-fr.org +MAINTAINER= ahoka@NetBSD.org HOMEPAGE= http://ffmpeg.mplayerhq.hu/ COMMENT= MPEG decoding, encoding and streaming software -# The `sparc' code in libavcode/sparc is only suitable for sparc64 -NOT_FOR_PLATFORM= *-*-sparc - +DISTVERSION= 2008-07-27 PKG_DESTDIR_SUPPORT= user-destdir HAS_CONFIGURE= YES -CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR} -USE_TOOLS+= gmake texi2html pod2man USE_LIBTOOL= YES +USE_TOOLS+= gmake texi2html pod2man + +REPLACE_PERL+= doc/texi2pod.pl + +SUBST_CLASSES+= conf +SUBST_STAGE.conf= post-patch +SUBST_FILES.conf= ffserver.c +SUBST_SED.conf= -e 's,/etc/ffserver.conf,${PKG_SYSCONFDIR}/ffserver.conf,g' +SUBST_MESSAGE.conf= Fixing configuration path. CONFLICTS+= ffmpeg-devel-[0-9]* -REPLACE_PERL+= doc/texi2pod.pl +PLIST_SRC+= ${PKGDIR}/PLIST -CONF_FILES= ${PREFIX}/share/examples/ffmpeg/ffserver.conf \ +CONF_FILES+= ${PREFIX}/share/examples/ffmpeg/ffserver.conf \ ${PKG_SYSCONFDIR}/ffserver.conf -MAKE_ENV+= EXTRA_LIBS=${LIBGETOPT:Q} \ - FFSERVER_CONF=${PKG_SYSCONFDIR}/ffserver.conf \ - LOCALBASE=${LOCALBASE:Q} +MAKE_ENV+= EXTRA_LIBS=${LIBGETOPT:Q} +# LOCALBASE=${LOCALBASE:Q} + +# Let's not put garbage into /tmp +CONFIGURE_ENV+= TMPDIR=${WRKDIR:Q} + +CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR} \ + --cc=${CC:Q} \ + --prefix=${PREFIX:Q} \ + --disable-debug \ + --disable-vhook \ + --enable-avfilter \ + --enable-swscale \ + --enable-gpl \ + --enable-postproc \ + --enable-pthreads \ + --enable-shared \ + --enable-libvorbis \ + --enable-libmp3lame -CONFIGURE_ARGS+= --cc=${CC:Q} --prefix=${PREFIX:Q} -CONFIGURE_ARGS+= --enable-pp --disable-vhook --disable-debug -CONFIGURE_ARGS+= --enable-gpl -CONFIGURE_ARGS+= --enable-ffplay +# Doesn't work without memalign and memalign looks buggy. +.if !empty(MACHINE_ARCH:Mi386) +CONFIGURE_ARGS+= --disable-mmx +.endif -INSTALLATION_DIRS= include/ffmpeg/libpostproc lib \ - share/examples/ffmpeg share/doc/ffmpeg +INSTALLATION_DIRS= lib share/examples/ffmpeg share/doc/ffmpeg .include "options.mk" @@ -49,8 +69,9 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DESTDIR}${PREFIX}/share/doc/ffmpeg ${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \ ${DESTDIR}${PREFIX}/share/examples/ffmpeg - ${INSTALL_DATA} ${WRKSRC}/libavcodec/libpostproc/postprocess.h \ - ${DESTDIR}${PREFIX}/include/ffmpeg/libpostproc +.include "../../audio/lame/buildlink3.mk" +.include "../../audio/libvorbis/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" .include "../../devel/libgetopt/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/multimedia/ffmpeg/PLIST b/multimedia/ffmpeg/PLIST index f834ab3f054..98224dc7d45 100644 --- a/multimedia/ffmpeg/PLIST +++ b/multimedia/ffmpeg/PLIST @@ -1,26 +1,79 @@ -@comment $NetBSD: PLIST,v 1.6 2006/08/09 14:14:40 ben Exp $ +@comment $NetBSD: PLIST,v 1.7 2008/09/07 23:39:37 ahoka Exp $ bin/ffmpeg +bin/ffplay bin/ffserver -include/ffmpeg/avcodec.h -include/ffmpeg/avformat.h -include/ffmpeg/avio.h -include/ffmpeg/common.h -include/ffmpeg/libpostproc/postprocess.h -include/ffmpeg/rational.h -include/ffmpeg/rtp.h -include/ffmpeg/rtsp.h -include/ffmpeg/rtspcodes.h -lib/libavcodec.la -lib/libavformat.la +include/libavcodec/avcodec.h +include/libavcodec/opt.h +include/libavdevice/avdevice.h +include/libavfilter/avfilter.h +include/libavformat/avformat.h +include/libavformat/avio.h +include/libavformat/rtsp.h +include/libavformat/rtspcodes.h +include/libavutil/adler32.h +include/libavutil/avstring.h +include/libavutil/avutil.h +include/libavutil/base64.h +include/libavutil/common.h +include/libavutil/crc.h +include/libavutil/fifo.h +include/libavutil/intfloat_readwrite.h +include/libavutil/log.h +include/libavutil/lzo.h +include/libavutil/mathematics.h +include/libavutil/md5.h +include/libavutil/mem.h +include/libavutil/random.h +include/libavutil/rational.h +include/libavutil/sha1.h +include/libpostproc/postprocess.h +include/libswscale/rgb2rgb.h +include/libswscale/swscale.h +lib/libavcodec.a +lib/libavcodec.so +lib/libavcodec.so.51 +lib/libavcodec.so.51.61.0 +lib/libavdevice.a +lib/libavdevice.so +lib/libavdevice.so.52 +lib/libavdevice.so.52.0.0 +lib/libavfilter.a +lib/libavfilter.so +lib/libavfilter.so.0 +lib/libavfilter.so.0.0.0 +lib/libavformat.a +lib/libavformat.so +lib/libavformat.so.52 +lib/libavformat.so.52.18.0 +lib/libavutil.a +lib/libavutil.so +lib/libavutil.so.49 +lib/libavutil.so.49.7.0 +lib/libpostproc.a +lib/libpostproc.so +lib/libpostproc.so.51 +lib/libpostproc.so.51.1.0 +lib/libswscale.a +lib/libswscale.so +lib/libswscale.so.0 +lib/libswscale.so.0.5.1 +lib/pkgconfig/libavcodec.pc +lib/pkgconfig/libavdevice.pc +lib/pkgconfig/libavfilter.pc +lib/pkgconfig/libavformat.pc +lib/pkgconfig/libavutil.pc +lib/pkgconfig/libpostproc.pc +lib/pkgconfig/libswscale.pc man/man1/ffmpeg.1 +man/man1/ffplay.1 man/man1/ffserver.1 share/doc/ffmpeg/README share/doc/ffmpeg/TODO share/doc/ffmpeg/apiexample.c +share/doc/ffmpeg/avutil.txt share/doc/ffmpeg/ffmpeg_powerpc_performance_evaluation_howto.txt +share/doc/ffmpeg/issue_tracker.txt share/doc/ffmpeg/optimization.txt +share/doc/ffmpeg/snow.txt +share/doc/ffmpeg/soc.txt share/examples/ffmpeg/ffserver.conf -@dirrm share/examples/ffmpeg -@dirrm share/doc/ffmpeg -@dirrm include/ffmpeg/libpostproc -@dirrm include/ffmpeg diff --git a/multimedia/ffmpeg/PLIST.sdl b/multimedia/ffmpeg/PLIST.sdl new file mode 100644 index 00000000000..a996ab221ea --- /dev/null +++ b/multimedia/ffmpeg/PLIST.sdl @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST.sdl,v 1.1 2008/09/07 23:39:37 ahoka Exp $ +bin/ffplay diff --git a/multimedia/ffmpeg/buildlink3.mk b/multimedia/ffmpeg/buildlink3.mk index d6ab5cd91ae..ddfd1cbe780 100644 --- a/multimedia/ffmpeg/buildlink3.mk +++ b/multimedia/ffmpeg/buildlink3.mk @@ -1,9 +1,9 @@ -# $NetBSD: buildlink3.mk,v 1.9 2006/07/08 23:11:01 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.10 2008/09/07 23:39:37 ahoka Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ FFMPEG_BUILDLINK3_MK:= ${FFMPEG_BUILDLINK3_MK}+ -.if !empty(BUILDLINK_DEPTH:M+) +.if ${BUILDLINK_DEPTH} == "+" BUILDLINK_DEPENDS+= ffmpeg .endif @@ -11,10 +11,41 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nffmpeg} BUILDLINK_PACKAGES+= ffmpeg BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}ffmpeg -.if !empty(FFMPEG_BUILDLINK3_MK:M+) -BUILDLINK_API_DEPENDS.ffmpeg+= ffmpeg>=0.4.9pre1 -BUILDLINK_ABI_DEPENDS.ffmpeg?= ffmpeg>=0.4.9pre1 +.if ${FFMPEG_BUILDLINK3_MK} == "+" +BUILDLINK_API_DEPENDS.ffmpeg+= ffmpeg>=20080727 BUILDLINK_PKGSRCDIR.ffmpeg?= ../../multimedia/ffmpeg + +pkgbase := ffmpeg +. include "../../mk/pkg-build-options.mk" + .endif # FFMPEG_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +.include "../../mk/bsd.fast.prefs.mk" + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Msdl) +. include "../../devel/SDL/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mtheora) +. include "../../multimedia/libtheora/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mxvid) +. include "../../multimedia/xvidcore/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mx264) +. include "../../multimedia/x264-devel/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mfaad) +. include "../../audio/faad2/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mfaac) +. include "../../audio/faac/buildlink3.mk" +.endif + +.include "../../devel/libgetopt/buildlink3.mk" + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/multimedia/ffmpeg/distinfo b/multimedia/ffmpeg/distinfo index fcb56824c75..eef1f89927d 100644 --- a/multimedia/ffmpeg/distinfo +++ b/multimedia/ffmpeg/distinfo @@ -1,19 +1,9 @@ -$NetBSD: distinfo,v 1.15 2008/09/01 00:00:10 tonnerre Exp $ +$NetBSD: distinfo,v 1.16 2008/09/07 23:39:37 ahoka Exp $ -SHA1 (ffmpeg-0.4.9-pre1.tar.gz) = aad00445137520bec19e56bcb042e75a10c53bb3 -RMD160 (ffmpeg-0.4.9-pre1.tar.gz) = fd682846f97ada32951af7844e185c42783189a4 -Size (ffmpeg-0.4.9-pre1.tar.gz) = 1611332 bytes -SHA1 (patch-aa) = 9211ce3acfccf8c543ffea4a99e10413742aaaea -SHA1 (patch-ab) = 15c7def153b0854169f36ebc7c1e8ae49a0268ea -SHA1 (patch-ac) = cae476460362637186a1ba31fbec4434b18e8dc8 -SHA1 (patch-ad) = c822a8141842c5bceeb4aaadfcb69b2dd200311a -SHA1 (patch-ae) = 3a7b0422684f2e7174b52a08a4932aa937574af3 -SHA1 (patch-af) = 82f7e656ab01320235c85e98ec4c57277956ceb8 -SHA1 (patch-ag) = 69656d16d44d3321bdf9b790e6263db1529d2c99 -SHA1 (patch-ah) = 3b600dd8d5bc0d4363139cea0ba8338691d8fa75 -SHA1 (patch-ai) = fe1bbecd05f2eef812650efa83223a3b6417ed6a -SHA1 (patch-aj) = b998fdc2b3cc5f6efd2fb4f12fbb630d5832004b -SHA1 (patch-ak) = 564d7d55372281909f70c63c6a72eb7d97afd99d -SHA1 (patch-al) = d418bf4af796f1e3b829ceab19ddde94a0ca8ec4 -SHA1 (patch-an) = 3e2327f2a30571daf82edd67128c63845819224e -SHA1 (patch-ao) = f1e8f504a951ab02d70aae083862414b32d8b55a +SHA1 (ffmpeg-2008-07-27.tar.bz2) = 103acde7a0f02aa1c32d5dab5bf187c94441c479 +RMD160 (ffmpeg-2008-07-27.tar.bz2) = e69128fc034a3f8b0fd561f1e6ecc04dd118a977 +Size (ffmpeg-2008-07-27.tar.bz2) = 2581976 bytes +SHA1 (patch-bktr) = dddf7149810d227f531e5a198445fc0d1893bece +SHA1 (patch-configure) = c61628c17bfb31021ee56782177c7df5a91ca5aa +SHA1 (patch-r14477) = fb68f691fe68b6dc4ddd31c4c366d0dae11ab999 +SHA1 (patch-v4l2) = ed35dbd2d08337239f051c74c414e01609fb6ef6 diff --git a/multimedia/ffmpeg/files/bktr.diff b/multimedia/ffmpeg/files/bktr.diff deleted file mode 100644 index d3762993be2..00000000000 --- a/multimedia/ffmpeg/files/bktr.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- libavformat/Makefile.orig -+++ libavformat/Makefile -@@ -40,7 +40,7 @@ - OBJS+= framehook.o - - ifeq ($(CONFIG_VIDEO4LINUX),yes) --OBJS+= grab.o -+OBJS+= grab_bsdbktr.o - endif - - ifeq ($(CONFIG_DV1394),yes) - ---- configure.orig -+++ configure -@@ -301,6 +301,8 @@ - *) ;; - esac - -+v4l="yes" -+ - # From mplayer configure. We need TARGET_OS available - # to the Makefile, so it can distinguish between flavors - # of AltiVec on PowerPC diff --git a/multimedia/ffmpeg/files/ffmpeg.1.diff b/multimedia/ffmpeg/files/ffmpeg.1.diff deleted file mode 100644 index 8e2ae71e9bb..00000000000 --- a/multimedia/ffmpeg/files/ffmpeg.1.diff +++ /dev/null @@ -1,61 +0,0 @@ ---- doc/ffmpeg.1.orig 2004-08-29 12:38:34.000000000 +0200 -+++ doc/ffmpeg.1 2004-08-29 13:03:08.000000000 +0200 -@@ -505,21 +505,49 @@ - tell that the raw codec data must be copied as is. - .Sh "Audio/Video grab options" - .IX Subsection "Audio/Video grab options" --.IP "\fB\-vd device\fR" 4 --.IX Item "-vd device" --set video grab device (e.g. \fI/dev/video0\fR) --.IP "\fB\-vc channel\fR" 4 --.IX Item "-vc channel" --set video grab channel (\s-1DV1394\s0 only) - .IP "\fB\-tvstd standard\fR" 4 - .IX Item "-tvstd standard" - set television standard (\s-1NTSC\s0, \s-1PAL\s0 (\s-1SECAM\s0)) --.IP "\fB\-dv1394\fR" 4 --.IX Item "-dv1394" --set \s-1DV1394\s0 grab - .IP "\fB\-ad device\fR" 4 - .IX Item "-ad device" - set audio device (e.g. \fI/dev/dsp\fR) -+.PP -+This build of ffmpeg includes NetBSD-specific patches that change the -+video-grabbing semantics. Recording from bktr(4) can be controlled via the -+following environment variables: -+.PP -+.RS -+.B BKTR_DEV -+(0\-4): which of the devices on the bktr should provide the signal (tuner, -+video-in,...) -+.PP -+.B BKTR_FORMAT -+(1\-6): TV format, 1 PAL 2 NTSC 3 SECAM 4 PALN 5 PALM 6 NTSCJ -+.PP -+.B BKTR_FREQUENCY -+(float): frequency to which the tuner should be set. -+.PP -+.B BKTR_CHANNEL -+(int): channel to which the tuner should be set, overrides BKTR_FREQUENCY -+.RE -+.PP -+If you set the channel or frequency with a different program such as xawtv -+or fxtv you might not get audio; try to use the environment variables in -+that case. Do not forget to set the following mixerctl variables to useful -+values: -+.PP -+.RS -+record.source=line -+.PP -+record.volume=255,255 -+.PP -+inputs.line=255,255 -+.RE -+.PP -+One possible command line would then be: -+.PP -+ffmpeg -y -intra -tvstd pal -vcodec mpeg2video -s 768x576 -b 9600 -ab 128 -ad -+/dev/audio -ac 2 -ar 44100 /tmp/file.mpg - .Sh "Advanced options" - .IX Subsection "Advanced options" - .IP "\fB\-map file:stream\fR" 4 diff --git a/multimedia/ffmpeg/files/grab_bsdbktr.c b/multimedia/ffmpeg/files/grab_bsdbktr.c deleted file mode 100644 index 8db64a678b5..00000000000 --- a/multimedia/ffmpeg/files/grab_bsdbktr.c +++ /dev/null @@ -1,340 +0,0 @@ -/* - * FreeBSD video grab interface - * Copyright (c) 2002 Steve O'Hara-Smith - * based on - * Linux video grab interface - * Copyright (c) 2000,2001 Gerard Lantau. - * and - * simple_grab.c Copyright (c) 1999 Roger Hardiman - * - * GPL virus inherited: - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include "avformat.h" -#if defined __DragonFly__ -#include <dev/video/meteor/ioctl_meteor.h> -#include <dev/video/bktr/ioctl_bt848.h> -#else -#if defined __FreeBSD__ -#if __FreeBSD__ >= 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 -#else -#include <dev/ic/bt8xx.h> -#endif -#endif -#include <unistd.h> -#include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/mman.h> -#include <sys/time.h> -#include <signal.h> - -typedef struct { - int fd; - int tuner_fd; - int frame_format; /* see VIDEO_PALETTE_xxx */ - int width, height; - int frame_rate; - int frame_rate_base; - int64_t per_frame; -} VideoData; - -const char *video_device = "/dev/bktr0"; - -#define PAL 1 -#define PALBDGHI 1 -#define NTSC 2 -#define NTSCM 2 -#define SECAM 3 -#define PALN 4 -#define PALM 5 -#define NTSCJ 6 - -/* PAL is 768 x 576. NTSC is 640 x 480 */ -#define PAL_HEIGHT 576 -#define SECAM_HEIGHT 576 -#define NTSC_HEIGHT 480 - -#ifndef VIDEO_FORMAT -#define VIDEO_FORMAT NTSC -#endif - -static int bktr_dev[] = { METEOR_DEV0, METEOR_DEV1, METEOR_DEV2, - METEOR_DEV3, METEOR_DEV_SVIDEO }; - -static u_int8_t *video_buf; -static int nsignals = 0; -static void catchsignal(int signal) -{ - nsignals++; - return; -} - -static int bktr_init (const char *video_device, int width, int height, - int format, u_int8_t **video_buf, int *video_fd, int *tuner_fd, - int idev, double frequency) -{ - struct meteor_geomet geo; - int h_max; - long ioctl_frequency; - char *arg; - int c; - int channel = 0; - struct sigaction act,old; - - if (idev < 0 || idev > 4) - { - arg = getenv ("BKTR_DEV"); - if (arg) - idev = atoi (arg); - if (idev < 0 || idev > 4) - idev = 0; - } - - if (format < 1 || format > 6) - { - arg = getenv ("BKTR_FORMAT"); - if (arg) - format = atoi (arg); - if (format < 1 || format > 6) - format = VIDEO_FORMAT; - } - - if (frequency <= 0) - { - arg = getenv ("BKTR_FREQUENCY"); - if (arg) - frequency = atof (arg); - if (frequency <= 0) - frequency = 0.0; - } - - arg = getenv ("BKTR_CHANNEL"); - if (arg) - channel = atoi (arg); - if (channel < 0) - channel = 0; - - memset(&act,0,sizeof(act)); - sigemptyset(&act.sa_mask); - act.sa_handler = catchsignal; - sigaction(SIGUSR1,&act,&old); - - *tuner_fd = open ("/dev/tuner0", O_RDONLY); - if (*tuner_fd < 0) { - perror("Warning: Tuner not opened continuing"); - } - - *video_fd = open (video_device, O_RDONLY); - if (*video_fd < 0) { - perror (video_device); - return -1; - } - - geo.rows = height; - geo.columns = width; - geo.frames = 1; -// geo.oformat = METEOR_GEO_YUV_422 | METEOR_GEO_YUV_12; - geo.oformat = METEOR_GEO_YUV_PACKED; - - 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 -1; - } - - if (ioctl(*video_fd, BT848SFMT, &c) < 0) { - perror ("BT848SFMT"); - return -1; - } - - c = bktr_dev[idev]; - if (ioctl(*video_fd, METEORSINPUT, &c) < 0) { - perror ("METEORSINPUT"); - return -1; - } - *video_buf = (u_int8_t *) mmap((caddr_t)0, width*height*2, - PROT_READ, MAP_SHARED, *video_fd, (off_t) 0); - if (*video_buf == MAP_FAILED) { - perror ("mmap"); - return -1; - } - if (frequency != 0.0) { - ioctl_frequency = (unsigned long)(frequency*16); - if (ioctl(*tuner_fd, TVTUNER_SETFREQ, &ioctl_frequency)<0) - perror("TVTUNER_SETFREQ"); - } - if (channel != 0) { - if (ioctl(*tuner_fd, TVTUNER_SETCHNL, &channel) < 0) - perror("TVTUNER_SETCHNL"); - } - c = METEOR_CAP_CONTINOUS; - ioctl(*video_fd, METEORCAPTUR, &c); - c = SIGUSR1; - ioctl (*video_fd, METEORSSIGNAL, &c); - return 0; -} - -static void bktr_getframe(u_int64_t per_frame) -{ - u_int64_t curtime; - static u_int64_t last_frame_time = 0; - - 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", - (int) (av_gettime() - last_frame_time - per_frame)); - } - } - nsignals = 0; - - last_frame_time = curtime; -} - -void bf_memcpy (char *dest, char *src, int size) -{ - while (size -= 2) - { - dest[0] = src[1]; - dest[1] = src[0]; - dest += 2; - src += 2; - } -} - -/* note: we support only one picture read at a time */ -static int grab_read_packet(AVFormatContext *s1, AVPacket *pkt) -{ - VideoData *s = s1->priv_data; - int size, halfsize; - - size = s->width * s->height; - halfsize = size << 1; - -// if (av_new_packet(pkt, size + halfsize) < 0) - if (av_new_packet(pkt, size + size) < 0) - return -EIO; - - bktr_getframe (s->per_frame); - pkt->pts = av_gettime() & ((1LL << 48) - 1); - bf_memcpy (pkt->data, video_buf, size + size); -// bf_memcpy (pkt->data, video_buf, size + halfsize); - -// return size + halfsize; - return size + size; -} - -static int grab_read_header (AVFormatContext *s1, AVFormatParameters *ap) -{ - VideoData *s = s1->priv_data; - AVStream *st; - int width, height; - int frame_rate; - int frame_rate_base; - int format = -1; - - if (!ap || ap->width <= 0 || ap->height <= 0 || ap->frame_rate <= 0) - return -1; - - width = ap->width; - height = ap->height; - frame_rate = ap->frame_rate; - frame_rate_base = ap->frame_rate_base; - - st = av_new_stream(s1, 0); - if (!st) - return -ENOMEM; - - s->width = width; - s->height = height; - s->frame_rate = frame_rate; - s->frame_rate_base = frame_rate_base; - s->per_frame = ((int64_t)1000000 * s->frame_rate_base) / s->frame_rate; - - st->codec.codec_type = CODEC_TYPE_VIDEO; -// st->codec.pix_fmt = PIX_FMT_YUV420P; - st->codec.pix_fmt = PIX_FMT_YUV422; - st->codec.codec_id = CODEC_ID_RAWVIDEO; - st->codec.width = width; - st->codec.height = height; - st->codec.frame_rate = frame_rate; - st->codec.frame_rate_base = frame_rate_base; - - av_set_pts_info(s1, 48, 1, 1000000); /* 48 bits pts in use */ - - if (ap->standard) { - if (!strcasecmp(ap->standard, "pal")) - format = PAL; - if (!strcasecmp(ap->standard, "secam")) - format = SECAM; - if (!strcasecmp(ap->standard, "ntsc")) - format = NTSC; - } - - if (bktr_init (video_device, width, height, format, &video_buf, - &(s->fd), &(s->tuner_fd), -1, 0.0) < 0) - return -EIO; - return 0; -} - -static int grab_read_close (AVFormatContext *s1) -{ - VideoData *s = s1->priv_data; - - int c = METEOR_CAP_STOP_CONT; - ioctl(s->fd, METEORCAPTUR, &c); - close(s->fd); - close(s->tuner_fd); - av_free(s); - return 0; -} - -AVInputFormat video_grab_device_format = { - "video4linux", - "video grab", - sizeof(VideoData), - NULL, - grab_read_header, - grab_read_packet, - grab_read_close, - flags: AVFMT_NOFILE, -}; - -int video_grab_init(void) -{ - av_register_input_format(&video_grab_device_format); - return 0; -} diff --git a/multimedia/ffmpeg/options.mk b/multimedia/ffmpeg/options.mk index 560209bda10..f9efdbcdf98 100644 --- a/multimedia/ffmpeg/options.mk +++ b/multimedia/ffmpeg/options.mk @@ -1,97 +1,73 @@ -# $NetBSD: options.mk,v 1.6 2007/08/02 21:53:05 dbj Exp $ +# $NetBSD: options.mk,v 1.7 2008/09/07 23:39:37 ahoka Exp $ # Global and legacy options PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg -PKG_SUPPORTED_OPTIONS= bktr lame mmx vorbis faac faad a52 +PKG_SUPPORTED_OPTIONS= sdl theora xvid faad faac #x264 +PKG_SUGGESTED_OPTIONS= faac theora xvid +#PKG_OPTIONS_OPTIONAL_GROUPS= aac-decoder +#PKG_OPTIONS_GROUP.aac-decoder= faad faac .include "../../mk/bsd.options.mk" - .include "../../mk/bsd.prefs.mk" ### -### MMX support +### faad option ### -.include "../../mk/compiler.mk" - -.if !empty(MACHINE_ARCH:Mi386) -. if !empty(PKG_OPTIONS:Mmmx) && !empty(CC_VERSION:Mgcc*) -CFLAGS+= -fomit-frame-pointer -. else -CONFIGURE_ARGS+= --disable-mmx -. endif -.else -CONFIGURE_ARGS+= --disable-mmx +.if !empty(PKG_OPTIONS:Mfaad) +CONFIGURE_ARGS+= --enable-libfaad +.include "../../audio/faad2/buildlink3.mk" .endif + ### -### bktr options +### faac option ### -.if !empty(PKG_OPTIONS:Mbktr) -post-extract: - ${CP} ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat - -post-patch: - ${PATCH} -p0 --quiet -d ${WRKSRC} < ${FILESDIR}/bktr.diff -#TODO -#Update the documentation -# ${PATCH} --quiet -d ${WRKSRC} < ${FILESDIR}/ffmpeg.1.diff +.if !empty(PKG_OPTIONS:Mfaac) +CONFIGURE_ARGS+= --enable-libfaac +.include "../../audio/faac/buildlink3.mk" .endif ### -### using lame option +### SDL support +### +### You can build the frontend with SDL support enabled ### -.if !empty(PKG_OPTIONS:Mlame) -CONFIGURE_ARGS+= --enable-mp3lame -.include "../../audio/lame/buildlink3.mk" -.else -CONFIGURE_ARGS+= --disable-mp3lame -.endif +.if !empty(PKG_OPTIONS:Msdl) -### -### using vorbis option -### +CONFIGURE_ARGS+= --enable-ffplay +PLIST_SRC+= ${PKGDIR}/PLIST.sdl -.if !empty(PKG_OPTIONS:Mvorbis) -CONFIGURE_ARGS+= --enable-vorbis -.include "../../audio/libvorbis/buildlink3.mk" -.else -CONFIGURE_ARGS+= --disable-vorbis +.include "../../devel/SDL/buildlink3.mk" .endif ### -### faad option +### OGG Theora support ### -.if !empty(PKG_OPTIONS:Mfaad) -CONFIGURE_ARGS+= --enable-faad -.include "../../audio/faad2/buildlink3.mk" -.else -CONFIGURE_ARGS+= --disable-faad +.if !empty(PKG_OPTIONS:Mtheora) +CONFIGURE_ARGS+= --enable-libtheora +.include "../../multimedia/libtheora/buildlink3.mk" .endif ### -### faac option +### XviD support ### -.if !empty(PKG_OPTIONS:Mfaac) -CONFIGURE_ARGS+= --enable-faac -.include "../../audio/faac/buildlink3.mk" -.else -CONFIGURE_ARGS+= --disable-faac +.if !empty(PKG_OPTIONS:Mxvid) +CONFIGURE_ARGS+= --enable-libxvid +.include "../../multimedia/xvidcore/buildlink3.mk" .endif ### -### a52 option +### x264 support ### -.if !empty(PKG_OPTIONS:Ma52) -CONFIGURE_ARGS+= --enable-a52 -# XXX this pkg currently compiles its own liba52 into libavcodec -#.include "../../audio/liba52/buildlink3.mk" -.else -CONFIGURE_ARGS+= --disable-a52 +.if !empty(PKG_OPTIONS:Mx264) +BUILDLINK_API_DEPENDS.x264-devel+= x264-devel>=20071218 +CONFIGURE_ARGS+= --enable-libx264 +.include "../../multimedia/x264-devel/buildlink3.mk" .endif diff --git a/multimedia/ffmpeg/patches/patch-aa b/multimedia/ffmpeg/patches/patch-aa deleted file mode 100644 index 7947e58f8a1..00000000000 --- a/multimedia/ffmpeg/patches/patch-aa +++ /dev/null @@ -1,35 +0,0 @@ -$NetBSD: patch-aa,v 1.7 2007/12/22 00:05:25 joerg Exp $ - ---- configure.orig 2004-07-05 21:06:16.000000000 +0300 -+++ configure -@@ -224,11 +224,10 @@ FFSLDFLAGS="" - need_inet_aton="yes" - extralibs="$extralibs -lsocket -lnsl" - ;; --FreeBSD) -+FreeBSD|NetBSD|DragonFly) - v4l="no" - audio_oss="yes" - dv1394="no" --make="gmake" - CFLAGS="-pthread" - LDFLAGS="$LDFLAGS -export-dynamic -pthread" - ;; -@@ -244,7 +243,6 @@ cc="cc" - v4l="no" - audio_oss="no" - dv1394="no" --ffserver="no" - SHFLAGS="-dynamiclib" - extralibs="" - darwin="yes" -@@ -1140,8 +1138,8 @@ fi - if test "$vhook" = "yes" ; then - echo "BUILD_VHOOK=yes" >> config.mak - echo "#define HAVE_VHOOK 1" >> $TMPH -- extralibs="$extralibs $ldl" - fi -+extralibs="$extralibs $ldl" - if test "$lshared" = "yes" ; then - echo "BUILD_SHARED=yes" >> config.mak - echo "PIC=-fPIC" >> config.mak diff --git a/multimedia/ffmpeg/patches/patch-ab b/multimedia/ffmpeg/patches/patch-ab deleted file mode 100644 index 214ef626486..00000000000 --- a/multimedia/ffmpeg/patches/patch-ab +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-ab,v 1.4 2006/06/26 19:39:54 wiz Exp $ - ---- ffserver.c.orig 2004-05-29 02:06:31.000000000 +0000 -+++ ffserver.c -@@ -4375,7 +4375,7 @@ static void show_help(void) - "\n" - "-L : print the LICENSE\n" - "-h : this help\n" -- "-f configfile : use configfile instead of /etc/ffserver.conf\n" -+ "-f configfile : use configfile instead of " FFSERVER_CONF "\n" - ); - } - -@@ -4433,7 +4433,7 @@ int main(int argc, char **argv) - - av_register_all(); - -- config_filename = "/etc/ffserver.conf"; -+ config_filename = FFSERVER_CONF; - - my_program_name = argv[0]; - my_program_dir = getcwd(0, 0); diff --git a/multimedia/ffmpeg/patches/patch-ac b/multimedia/ffmpeg/patches/patch-ac deleted file mode 100644 index 7dfe0239b1b..00000000000 --- a/multimedia/ffmpeg/patches/patch-ac +++ /dev/null @@ -1,125 +0,0 @@ -$NetBSD: patch-ac,v 1.5 2007/12/22 00:05:25 joerg Exp $ - ---- Makefile.orig 2004-07-08 13:02:04.000000000 +0200 -+++ Makefile -@@ -5,9 +5,7 @@ - include config.mak - - VPATH=$(SRC_PATH) -- --CFLAGS=$(OPTFLAGS) -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE --LDFLAGS+= -g -+CFLAGS= $(SHCFLAGS) -Wall -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE - - ifeq ($(TARGET_GPROF),yes) - CFLAGS+=-p -@@ -46,6 +44,8 @@ ifeq ($(CONFIG_VORBIS),yes) - EXTRALIBS+=-logg -lvorbis -lvorbisenc - endif - -+EXTRALIBS+=${LIBOSSAUDIO} -+ - ifeq ($(CONFIG_FAAD),yes) - ifeq ($(CONFIG_FAADBIN),yes) - # no libs needed -@@ -76,7 +76,7 @@ endif - - OBJS = ffmpeg.o ffserver.o cmdutils.o ffplay.o - SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) --FFLIBS = -L./libavformat -lavformat -L./libavcodec -lavcodec -+FFLIBS = libavformat/libavformat.la libavcodec/libavcodec.la - - all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC) - -@@ -84,25 +84,18 @@ lib: - $(MAKE) -C libavcodec all - $(MAKE) -C libavformat all - --ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs -- $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS) -- --ffmpeg$(EXESUF): ffmpeg_g$(EXESUF) -- cp -p $< $@ -- $(STRIP) $@ -+ffmpeg$(EXESUF): ffmpeg.o cmdutils.o .ffmpeglibs -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS) - --ffserver$(EXESUF): ffserver.o .libs -- $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS) -+ffserver$(EXESUF): ffserver.o .ffmpeglibs -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS) - --ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs -- $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS) - --ffplay$(EXESUF): ffplay_g$(EXESUF) -- cp -p $< $@ -- $(STRIP) $@ -+ffplay$(EXESUF): ffplay.o cmdutils.o .ffmpeglibs -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS) - --output_example$(EXESUF): output_example.o .libs -- $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS) -+output_example$(EXESUF): output_example.o .ffmpeglibs -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS) - - qt-faststart$(EXESUF): qt-faststart.c - $(CC) qt-faststart.c -o qt-faststart$(EXESUF) -@@ -111,9 +104,9 @@ ffplay.o: ffplay.c - $(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $< - - %.o: %.c -- $(CC) $(CFLAGS) -c -o $@ $< -+ $(CC) -DFFSERVER_CONF=\"$(FFSERVER_CONF)\" $(CFLAGS) -c -o $@ $< - --videohook: .libs -+videohook: .ffmpeglibs - $(MAKE) -C vhook all - - documentation: -@@ -122,10 +115,10 @@ documentation: - .PHONY: install - - install: all install-man $(INSTALLVHOOK) -- $(MAKE) -C libavcodec install -- $(MAKE) -C libavformat install -- install -d "$(bindir)" -- install -c -s -m 755 $(PROG) "$(bindir)" -+ $(MAKE) -C libavcodec install install-headers -+ $(MAKE) -C libavformat install install-headers -+ install -d "${DESTDIR}$(bindir)" -+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(bindir) - - # create the window installer - wininstaller: all install -@@ -135,8 +128,8 @@ wininstaller: all install - install-man: - ifneq ($(CONFIG_WIN32),yes) - if [ -f $(SRC_PATH)/doc/ffmpeg.1 ] ; then \ -- install -d "$(mandir)/man1" ; \ -- install -m 644 $(MANPAGE) "$(mandir)/man1" ; \ -+ install -d "${DESTDIR}$(mandir)/man1" ; \ -+ install -m 644 $(MANPAGE) "${DESTDIR}$(mandir)/man1" ; \ - fi - endif - -@@ -159,15 +152,15 @@ endif - .depend: $(SRCS) - $(CC) -MM $(CFLAGS) $(SDL_CFLAGS) $^ 1>.depend - --.libs: lib -- @test -f .libs || touch .libs -- @for i in $(DEP_LIBS) ; do if $(TEST) $$i -nt .libs ; then touch .libs; fi ; done -+.ffmpeglibs: lib -+ @test -f .ffmpeglibs || touch .ffmpeglibs -+ @for i in $(DEP_LIBS) ; do if $(TEST) $$i -nt .ffmpeglibs ; then touch .ffmpeglibs; fi ; done - - clean: $(CLEANVHOOK) - $(MAKE) -C libavcodec clean - $(MAKE) -C libavformat clean - $(MAKE) -C tests clean -- rm -f *.o *.d *~ .libs .depend gmon.out TAGS ffmpeg_g$(EXESUF) ffplay_g$(EXESUF) $(PROG) $(PROGTEST) -+ rm -f *.o *.d *~ .ffmpeglibs .depend gmon.out TAGS ffmpeg_g$(EXESUF) ffplay_g$(EXESUF) $(PROG) $(PROGTEST) - - clean-vhook: - $(MAKE) -C vhook clean diff --git a/multimedia/ffmpeg/patches/patch-ad b/multimedia/ffmpeg/patches/patch-ad deleted file mode 100644 index 6f05ce0b0dd..00000000000 --- a/multimedia/ffmpeg/patches/patch-ad +++ /dev/null @@ -1,75 +0,0 @@ -$NetBSD: patch-ad,v 1.6 2007/12/22 00:05:25 joerg Exp $ - ---- libavformat/Makefile.orig 2004-04-24 17:16:23.000000000 +0200 -+++ libavformat/Makefile -@@ -6,7 +6,7 @@ include ../config.mak - - VPATH=$(SRC_PATH)/libavformat - --CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -+CFLAGS=$(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE - - OBJS= utils.o cutils.o os_support.o allformats.o - PPOBJS= -@@ -68,6 +68,11 @@ endif - - ifeq ($(CONFIG_VORBIS),yes) - OBJS+= ogg.o -+EXTRALIBS+= -lvorbis -lvorbisenc -+endif -+ -+ifeq ($(CONFIG_MP3LAME),yes) -+EXTRALIBS += -lmp3lame - endif - - ifeq ($(TARGET_ARCH_SPARC64),yes) -@@ -81,12 +86,14 @@ endif - - SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp) - -+install: all -+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(LIB:.a=.la) ${DESTDIR}$(prefix)/lib -+ - all: $(LIB) $(SLIB) - - $(LIB): $(OBJS) $(PPOBJS) - rm -f $@ -- $(AR) rc $@ $(OBJS) $(PPOBJS) -- $(RANLIB) $@ -+ $(LIBTOOL) --mode=link $(CC) -o $(LIB:.a=.la) $(OBJS:.o=.lo) $(PPOBJS:.o=.lo) -rpath $(prefix)/lib $(LIBOSSAUDIO) $(EXTRALIBS) - - $(SLIB): $(OBJS) - ifeq ($(CONFIG_WIN32),yes) -@@ -96,9 +103,6 @@ else - $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) - endif - --depend: $(SRCS) -- $(CC) -MM $(CFLAGS) $^ 1>.depend -- - ifeq ($(BUILD_SHARED),yes) - install: all install-headers - ifeq ($(CONFIG_WIN32),yes) -@@ -117,18 +121,18 @@ installlib: all install-headers - install -m 644 $(LIB) $(prefix)/lib - - install-headers: -- mkdir -p "$(prefix)/include/ffmpeg" -+ mkdir -p "${DESTDIR}$(prefix)/include/ffmpeg" - install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \ - $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \ - $(SRC_PATH)/libavformat/rtspcodes.h \ -- "$(prefix)/include/ffmpeg" -+ "${DESTDIR}$(prefix)/include/ffmpeg" - - %.o: %.c -- $(CC) $(CFLAGS) -c -o $@ $< -+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $< - - # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings - %.o: %.cpp -- g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< -+ $(LIBTOOL) --mode=compile $(CXX) $(subst -Wall,,$(CFLAGS)) -c -o $@ $< - - distclean clean: - rm -f *.o *.d .depend *~ *.a $(LIB) diff --git a/multimedia/ffmpeg/patches/patch-ae b/multimedia/ffmpeg/patches/patch-ae deleted file mode 100644 index f76ddfa2d0d..00000000000 --- a/multimedia/ffmpeg/patches/patch-ae +++ /dev/null @@ -1,77 +0,0 @@ -$NetBSD: patch-ae,v 1.8 2007/12/22 00:05:25 joerg Exp $ - ---- libavcodec/Makefile.orig 2004-06-18 15:11:15.000000000 +0200 -+++ libavcodec/Makefile -@@ -7,7 +7,7 @@ include ../config.mak - VPATH=$(SRC_PATH)/libavcodec - - # NOTE: -I.. is needed to include config.h --CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -+CFLAGS=$(SHCFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE - - OBJS= common.o utils.o mem.o allcodecs.o \ - mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\ -@@ -165,7 +165,7 @@ endif - ifeq ($(TARGET_ARCH_SPARC),yes) - OBJS+=sparc/dsputil_vis.o - sparc/%.o: sparc/%.c -- $(CC) -mcpu=ultrasparc -mtune=ultrasparc $(CFLAGS) -c -o $@ $< -+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $< - endif - ifeq ($(TARGET_ARCH_SPARC64),yes) - CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc -@@ -180,6 +180,9 @@ SLIB= $(SLIBPREF)avcodec$(SLIBSUF) - endif - TESTS= imgresample-test dct-test motion-test fft-test - -+install: all -+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(LIB:.a=.la) ${DESTDIR}$(prefix)/lib -+ - all: $(LIB) $(SLIB) - - amrlibs: -@@ -189,8 +192,8 @@ tests: apiexample cpuid_test $(TESTS) - - $(LIB): $(OBJS) $(AMRLIBS) - rm -f $@ -- $(AR) rc $@ $(OBJS) $(AMREXTRALIBS) -- $(RANLIB) $@ -+ $(LIBTOOL) --mode=link $(CC) -o $(LIB:.a=.la) $(OBJS:.o=.lo) -rpath $(prefix)/lib $(EXTRALIBS) $(AMREXTRALIBS) -+ - - $(SLIB): $(OBJS) - ifeq ($(CONFIG_WIN32),yes) -@@ -206,13 +209,10 @@ libpostproc/libpostproc.a: - $(MAKE) -C libpostproc - - %.o: %.c -- $(CC) $(CFLAGS) -c -o $@ $< -+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $< - - %.o: %.S -- $(CC) $(CFLAGS) -c -o $@ $< -- --depend: $(SRCS) -- $(CC) -MM $(CFLAGS) $^ 1>.depend -+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $< - - dep: depend - -@@ -278,14 +278,14 @@ install: - endif - - installlib: all install-headers -- install -m 644 $(LIB) $(prefix)/lib -+ install -m 644 $(LIB) ${DESTDIR}$(prefix)/lib - - install-headers: -- mkdir -p "$(prefix)/include/ffmpeg" -+ mkdir -p "${DESTDIR}$(prefix)/include/ffmpeg" - install -m 644 $(SRC_PATH)/libavcodec/avcodec.h \ - $(SRC_PATH)/libavcodec/common.h \ - $(SRC_PATH)/libavcodec/rational.h \ -- "$(prefix)/include/ffmpeg" -+ ${DESTDIR}$(prefix)/include/ffmpeg - - # - # include dependency files if they exist diff --git a/multimedia/ffmpeg/patches/patch-af b/multimedia/ffmpeg/patches/patch-af deleted file mode 100644 index 03a7ee1bd15..00000000000 --- a/multimedia/ffmpeg/patches/patch-af +++ /dev/null @@ -1,80 +0,0 @@ -$NetBSD: patch-af,v 1.5 2006/02/16 10:26:30 abs Exp $ - ---- libavcodec/utils.c.orig 2006-02-06 23:52:35.000000000 +0000 -+++ libavcodec/utils.c -@@ -210,26 +210,10 @@ int avcodec_default_get_buffer(AVCodecCo - buf->last_pic_num= *picture_number; - }else{ - int h_chroma_shift, v_chroma_shift; -- int s_align, pixel_size; -+ int s_align, pixel_size, size[3]; -+ AVPicture picture; - - avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift); -- -- switch(s->pix_fmt){ -- case PIX_FMT_RGB555: -- case PIX_FMT_RGB565: -- case PIX_FMT_YUV422: -- pixel_size=2; -- break; -- case PIX_FMT_RGB24: -- case PIX_FMT_BGR24: -- pixel_size=3; -- break; -- case PIX_FMT_RGBA32: -- pixel_size=4; -- break; -- default: -- pixel_size=1; -- } - - avcodec_align_dimensions(s, &w, &h); - #if defined(ARCH_POWERPC) || defined(HAVE_MMI) //FIXME some cleaner check -@@ -243,20 +227,39 @@ int avcodec_default_get_buffer(AVCodecCo - h+= EDGE_WIDTH*2; - } - -+ avpicture_fill(&picture, NULL, s->pix_fmt, w, h); -+ pixel_size= picture.linesize[0]*8 / w; -+//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d\n", (int)picture.data[1], w, h, s->pix_fmt); -+ assert(pixel_size>=1); -+ //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it -+ if(pixel_size == 3*8) -+ w= ALIGN(w, s_align<<h_chroma_shift); -+ else -+ w= ALIGN(pixel_size*w, s_align<<(h_chroma_shift+3)) / pixel_size; -+ size[1] = avpicture_fill(&picture, NULL, s->pix_fmt, w, h); -+ size[0] = picture.linesize[0] * h; -+ size[1] -= size[0]; -+ if(picture.data[2]) -+ size[1]= size[2]= size[1]/2; -+ else -+ size[2]= 0; -+ - buf->last_pic_num= -256*256*256*64; -+ memset(buf->base, 0, sizeof(buf->base)); -+ memset(buf->data, 0, sizeof(buf->data)); - -- for(i=0; i<3; i++){ -+ for(i=0; i<3 && size[i]; i++){ - const int h_shift= i==0 ? 0 : h_chroma_shift; - const int v_shift= i==0 ? 0 : v_chroma_shift; - -- //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it -- buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, s_align<<(h_chroma_shift-h_shift)); -+ buf->linesize[i]= picture.linesize[i]; - -- buf->base[i]= av_mallocz((buf->linesize[i]*h>>v_shift)+16); //FIXME 16 -+ buf->base[i]= av_malloc(size[i]+16); //FIXME 16 - if(buf->base[i]==NULL) return -1; -- memset(buf->base[i], 128, buf->linesize[i]*h>>v_shift); -- -- if(s->flags&CODEC_FLAG_EMU_EDGE) -+ memset(buf->base[i], 128, size[i]); -+ -+ // no edge if EDEG EMU or not planar YUV, we check for PAL8 redundantly to protect against a exploitable bug regression ... -+ if((s->flags&CODEC_FLAG_EMU_EDGE) || (s->pix_fmt == PIX_FMT_PAL8) || !size[2]) - buf->data[i] = buf->base[i]; - else - buf->data[i] = buf->base[i] + ALIGN((buf->linesize[i]*EDGE_WIDTH>>v_shift) + (EDGE_WIDTH>>h_shift), s_align); diff --git a/multimedia/ffmpeg/patches/patch-ag b/multimedia/ffmpeg/patches/patch-ag deleted file mode 100644 index 7f88193950b..00000000000 --- a/multimedia/ffmpeg/patches/patch-ag +++ /dev/null @@ -1,194 +0,0 @@ -$NetBSD: patch-ag,v 1.2 2006/02/16 10:26:30 abs Exp $ - ---- libavformat/audio.c.orig 2004-06-19 05:59:34.000000000 +0200 -+++ libavformat/audio.c -@@ -18,10 +18,19 @@ - */ - #include "avformat.h" - -+#ifdef __NetBSD__ -+#define USE_SUNAUDIO -+#endif -+ - #include <stdlib.h> - #include <stdio.h> - #include <string.h> -+#ifndef USE_SUNAUDIO - #include <sys/soundcard.h> -+#else -+#include <sys/types.h> -+#include <sys/audioio.h> -+#endif - #include <unistd.h> - #include <fcntl.h> - #include <sys/ioctl.h> -@@ -47,9 +56,18 @@ static int audio_open(AudioData *s, int - int tmp, err; - char *flip = getenv("AUDIO_FLIP_LEFT"); - -+#ifdef USE_SUNAUDIO -+ audio_info_t info; -+ struct audio_prinfo *settings; -+ int mixer_fd; -+ -+ if (!audio_device) -+ audio_device = "/dev/audio"; -+#else - /* open linux audio device */ - if (!audio_device) - audio_device = "/dev/dsp"; -+#endif - - if (is_output) - audio_fd = open(audio_device, O_WRONLY); -@@ -77,6 +95,7 @@ static int audio_open(AudioData *s, int - } - #endif - -+#ifndef USE_SUNAUDIO - /* select format : favour native format */ - err = ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &tmp); - -@@ -124,14 +143,114 @@ static int audio_open(AudioData *s, int - } - if (tmp) - s->channels = 2; -+#else /* USE_SUNAUDIO */ -+ AUDIO_INITINFO(&info); -+ if (!is_output) { -+ info.mode = AUMODE_RECORD; -+ settings = &info.record; -+ } else { -+ info.mode = AUMODE_PLAY; -+ settings = &info.play; -+ } -+ -+ /* select format */ -+ /* Try native 16 bit format first */ -+#ifdef WORDS_BIGENDIAN -+ settings->encoding = AUDIO_ENCODING_SLINEAR_BE; -+ s->codec_id = CODEC_ID_PCM_S16BE; -+#else -+ settings->encoding = AUDIO_ENCODING_SLINEAR_LE; -+ s->codec_id = CODEC_ID_PCM_S16LE; -+#endif -+ settings->precision = 16; -+ err = ioctl(audio_fd, AUDIO_SETINFO, &info); -+ if (err < 0) { -+ fprintf(stderr, "Soundcard does not support signed 16 bit sample format\n"); -+ close(audio_fd); -+ return -EIO; -+ } - -+ /* set channels */ -+ AUDIO_INITINFO(&info); -+ settings->channels = s->channels; -+ err = ioctl(audio_fd, AUDIO_SETINFO, &info); -+ if (err < 0) { -+ fprintf(stderr, "stereo not supported, using mono"); -+ } -+ -+ /* set gain */ -+ AUDIO_INITINFO(&info); -+ settings->gain = AUDIO_MAX_GAIN; -+ err = ioctl(audio_fd, AUDIO_SETINFO, &info); -+ if (err < 0) { -+ fprintf(stderr, "setting gain to %d failed", AUDIO_MAX_GAIN); -+ } -+ -+#ifndef MIXER_DEVICE -+#define MIXER_DEVICE "/dev/mixer" -+#endif -+ if ((mixer_fd=open(MIXER_DEVICE, O_RDONLY)) == -1) -+ fprintf(stderr, "can't open %s\n", MIXER_DEVICE); -+ else { -+ int n; -+ mixer_devinfo_t mdt; -+ /* get debuggin information about all mixer devices */ -+ mdt.index = n = 0; -+ while (ioctl(mixer_fd, AUDIO_MIXER_DEVINFO, &mdt) != -1) { -+ if (strcasecmp(mdt.label.name, "inputs") == 0) { -+ while (mdt.next != -1) { -+ printf("Mixer device %d: `%s' has type %d, class %d\n", -+ mdt.index, mdt.label.name, mdt.type, -+ mdt.mixer_class); -+ mdt.index = mdt.next; -+ if (ioctl(mixer_fd, AUDIO_MIXER_DEVINFO, &mdt) == -1) { -+ fprintf(stderr, "getting next mixer device " -+ "failed (%d)", mdt.index); -+ break; -+ } -+ printf("next device: "); -+ } -+ printf("Mixer device %d: `%s' has type %d, class %d\n", -+ mdt.index, mdt.label.name, mdt.type, -+ mdt.mixer_class); -+ } -+ n++; -+ mdt.index = n; -+ } -+ /* set input to line-in */ -+ AUDIO_INITINFO(&info); -+ settings->port = AUDIO_LINE_IN; -+ err = ioctl(audio_fd, AUDIO_SETINFO, &info); -+ if (err < 0) { -+ fprintf(stderr, "setting input to line-in failed"); -+ } -+ } -+ close(mixer_fd); -+#endif -+ -+#ifndef USE_SUNAUDIO - tmp = s->sample_rate; - err = ioctl(audio_fd, SNDCTL_DSP_SPEED, &tmp); - if (err < 0) { - perror("SNDCTL_DSP_SPEED"); - goto fail; - } -+ - s->sample_rate = tmp; /* store real sample rate */ -+#else -+ AUDIO_INITINFO(&info); -+ settings->sample_rate = s->sample_rate; -+ err = ioctl(audio_fd, AUDIO_SETINFO, &info); -+ if (err < 0) { -+ fprintf(stderr, "setting sample rate to %d failed", s->sample_rate); -+ err = ioctl(audio_fd, AUDIO_GETINFO, &info); -+ if (err < 0) { -+ perror("AUDIO_GETINFO"); -+ goto fail; -+ } -+ s->sample_rate = settings->sample_rate; -+ } -+#endif - s->fd = audio_fd; - - return 0; -@@ -240,7 +359,11 @@ static int audio_read_packet(AVFormatCon - AudioData *s = s1->priv_data; - int ret, bdelay; - int64_t cur_time; -+#ifndef USE_SUNAUDIO - struct audio_buf_info abufi; -+#else -+ audio_info_t info; -+#endif - - if (av_new_packet(pkt, s->frame_size) < 0) - return AVERROR_IO; -@@ -276,9 +399,15 @@ static int audio_read_packet(AVFormatCon - /* compute pts of the start of the packet */ - cur_time = av_gettime(); - bdelay = ret; -+#ifndef USE_SUNAUDIO - if (ioctl(s->fd, SNDCTL_DSP_GETISPACE, &abufi) == 0) { - bdelay += abufi.bytes; - } -+#else -+ if (ioctl(s->fd, AUDIO_GETINFO, &info) == 0) { -+ bdelay += info.record.seek * (info.record.precision/8); -+ } -+#endif - /* substract time represented by the number of bytes in the audio fifo */ - cur_time -= (bdelay * 1000000LL) / (s->sample_rate * s->channels); - diff --git a/multimedia/ffmpeg/patches/patch-ah b/multimedia/ffmpeg/patches/patch-ah deleted file mode 100644 index d97fe5fc190..00000000000 --- a/multimedia/ffmpeg/patches/patch-ah +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-ah,v 1.1 2006/06/26 19:40:06 wiz Exp $ - ---- libavcodec/avcodec.h.orig 2004-07-09 12:49:55.000000000 +0000 -+++ libavcodec/avcodec.h -@@ -1657,6 +1657,13 @@ typedef struct AVOption { - #define FF_OPT_MAX_DEPTH 10 - } AVOption; - -+#ifdef HAVE_MMX -+extern const struct AVOption avoptions_common[3 + 5]; -+#else -+extern const struct AVOption avoptions_common[3]; -+#endif -+extern const struct AVOption avoptions_workaround_bug[11]; -+ - /** - * Parse option(s) and sets fields in passed structure - * @param strct structure where the parsed results will be written diff --git a/multimedia/ffmpeg/patches/patch-ai b/multimedia/ffmpeg/patches/patch-ai deleted file mode 100644 index 421732c4ccd..00000000000 --- a/multimedia/ffmpeg/patches/patch-ai +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-ai,v 1.1 2006/06/26 19:40:06 wiz Exp $ - ---- libavcodec/common.h.orig 2004-07-01 12:33:07.000000000 +0000 -+++ libavcodec/common.h -@@ -62,14 +62,6 @@ - #define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr } - #define AVOPTION_END() AVOPTION_SUB(NULL) - --struct AVOption; --#ifdef HAVE_MMX --extern const struct AVOption avoptions_common[3 + 5]; --#else --extern const struct AVOption avoptions_common[3]; --#endif --extern const struct AVOption avoptions_workaround_bug[11]; -- - #endif /* HAVE_AV_CONFIG_H */ - - /* Suppress restrict if it was not defined in config.h. */ diff --git a/multimedia/ffmpeg/patches/patch-aj b/multimedia/ffmpeg/patches/patch-aj deleted file mode 100644 index 965519892e9..00000000000 --- a/multimedia/ffmpeg/patches/patch-aj +++ /dev/null @@ -1,60 +0,0 @@ -$NetBSD: patch-aj,v 1.1 2006/06/26 19:40:06 wiz Exp $ - ---- libavcodec/ac3tab.h.orig 2004-06-26 10:08:49.000000000 +0000 -+++ libavcodec/ac3tab.h -@@ -4,10 +4,10 @@ - */ - - /* possible frequencies */ --static const uint16_t ac3_freqs[3] = { 48000, 44100, 32000 }; -+const uint16_t ac3_freqs[3] = { 48000, 44100, 32000 }; - - /* possible bitrates */ --static const uint16_t ac3_bitratetab[19] = { -+const uint16_t ac3_bitratetab[19] = { - 32, 40, 48, 56, 64, 80, 96, 112, 128, - 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 - }; -@@ -15,7 +15,7 @@ static const uint16_t ac3_bitratetab[19] - /* AC3 MDCT window */ - - /* MDCT window */ --static const int16_t ac3_window[256] = { -+const int16_t ac3_window[256] = { - 4, 7, 12, 16, 21, 28, 34, 42, - 51, 61, 72, 84, 97, 111, 127, 145, - 164, 184, 207, 231, 257, 285, 315, 347, -@@ -144,27 +144,27 @@ static const uint8_t baptab[64]= { - 15, 15, 15, 15, - }; - --static const uint8_t sdecaytab[4]={ -+const uint8_t sdecaytab[4]={ - 0x0f, 0x11, 0x13, 0x15, - }; - --static const uint8_t fdecaytab[4]={ -+const uint8_t fdecaytab[4]={ - 0x3f, 0x53, 0x67, 0x7b, - }; - --static const uint16_t sgaintab[4]= { -+const uint16_t sgaintab[4]= { - 0x540, 0x4d8, 0x478, 0x410, - }; - --static const uint16_t dbkneetab[4]= { -+const uint16_t dbkneetab[4]= { - 0x000, 0x700, 0x900, 0xb00, - }; - --static const uint16_t floortab[8]= { -+const uint16_t floortab[8]= { - 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800, - }; - --static const uint16_t fgaintab[8]= { -+const uint16_t fgaintab[8]= { - 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, - }; - diff --git a/multimedia/ffmpeg/patches/patch-ak b/multimedia/ffmpeg/patches/patch-ak deleted file mode 100644 index c73046a2147..00000000000 --- a/multimedia/ffmpeg/patches/patch-ak +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-ak,v 1.1 2007/08/02 21:48:34 dbj Exp $ - ---- libavcodec/msmpeg4.c.orig 2004-05-25 11:07:24.000000000 -0700 -+++ libavcodec/msmpeg4.c 2007-08-02 11:27:58.000000000 -0700 -@@ -716,7 +716,11 @@ static inline int msmpeg4_pred_dc(MpegEn - necessitate to modify mpegvideo.c. The problem comes from the - fact they decided to store the quantized DC (which would lead - to problems if Q could vary !) */ --#if defined ARCH_X86 && !defined PIC -+/* XXX -+ * i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367) -+ * error: can't find a register in class ?BREG? while reloading ?asm? -+ */ -+#if defined ARCH_X86 && !defined PIC && !defined __APPLE__ - asm volatile( - "movl %3, %%eax \n\t" - "shrl $1, %%eax \n\t" diff --git a/multimedia/ffmpeg/patches/patch-al b/multimedia/ffmpeg/patches/patch-al deleted file mode 100644 index 63e2a8ceeff..00000000000 --- a/multimedia/ffmpeg/patches/patch-al +++ /dev/null @@ -1,52 +0,0 @@ -$NetBSD: patch-al,v 1.1 2008/09/01 00:00:10 tonnerre Exp $ - ---- libavformat/psxstr.c.orig 2004-06-19 05:59:34.000000000 +0200 -+++ libavformat/psxstr.c -@@ -273,12 +273,21 @@ static int str_read_packet(AVFormatConte - int current_sector = LE_16(§or[0x1C]); - int sector_count = LE_16(§or[0x1E]); - int frame_size = LE_32(§or[0x24]); -- int bytes_to_copy; -+ -+ if(!( frame_size>=0 -+ && current_sector < sector_count -+ && sector_count*VIDEO_DATA_CHUNK_SIZE >=frame_size)){ -+ av_log(s, AV_LOG_ERROR, "Invalid parameters %d %d %d\n", current_sector, sector_count, frame_size); -+ return AVERROR_INVALIDDATA; -+ } - // printf("%d %d %d\n",current_sector,sector_count,frame_size); - /* if this is the first sector of the frame, allocate a pkt */ - pkt = &str->tmp_pkt; -- if (current_sector == 0) { -- if (av_new_packet(pkt, frame_size)) -+ if (pkt->size != sector_count*VIDEO_DATA_CHUNK_SIZE){ -+ if(pkt->data) -+ av_log(s, AV_LOG_ERROR, "missmatching sector_count\n"); -+ av_free_packet(pkt); -+ if (av_new_packet(pkt, sector_count*VIDEO_DATA_CHUNK_SIZE)) - return AVERROR_IO; - - pkt->stream_index = -@@ -291,15 +300,15 @@ static int str_read_packet(AVFormatConte - str->pts += (90000 / 15); - } - -- /* load all the constituent chunks in the video packet */ -- bytes_to_copy = frame_size - current_sector*VIDEO_DATA_CHUNK_SIZE; -- if (bytes_to_copy>0) { -- if (bytes_to_copy>VIDEO_DATA_CHUNK_SIZE) bytes_to_copy=VIDEO_DATA_CHUNK_SIZE; -- memcpy(pkt->data + current_sector*VIDEO_DATA_CHUNK_SIZE, -- sector + VIDEO_DATA_HEADER_SIZE, bytes_to_copy); -- } -+ memcpy(pkt->data + current_sector*VIDEO_DATA_CHUNK_SIZE, -+ sector + VIDEO_DATA_HEADER_SIZE, -+ VIDEO_DATA_CHUNK_SIZE); -+ - if (current_sector == sector_count-1) { -+ pkt->size= frame_size; - *ret_pkt = *pkt; -+ pkt->data= NULL; -+ pkt->size= -1; - return 0; - } - diff --git a/multimedia/ffmpeg/patches/patch-an b/multimedia/ffmpeg/patches/patch-an deleted file mode 100644 index 9504783a636..00000000000 --- a/multimedia/ffmpeg/patches/patch-an +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-an,v 1.1 2007/08/02 21:48:34 dbj Exp $ - ---- libavcodec/liba52/resample.c.orig 2003-11-03 10:06:54.000000000 -0800 -+++ libavcodec/liba52/resample.c 2007-08-02 12:37:36.000000000 -0700 -@@ -13,14 +13,14 @@ int (* a52_resample) (float * _f, int16_ - - #include "resample_c.c" - --#ifdef ARCH_X86 -+#ifdef HAVE_MMX - #include "resample_mmx.c" - #endif - - void* a52_resample_init(uint32_t mm_accel,int flags,int chans){ - void* tmp; - --#ifdef ARCH_X86 -+#ifdef HAVE_MMX - if(mm_accel&MM_ACCEL_X86_MMX){ - tmp=a52_resample_MMX(flags,chans); - if(tmp){ diff --git a/multimedia/ffmpeg/patches/patch-ao b/multimedia/ffmpeg/patches/patch-ao deleted file mode 100644 index 8fb3251613c..00000000000 --- a/multimedia/ffmpeg/patches/patch-ao +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ao,v 1.1 2007/08/02 21:48:34 dbj Exp $ - ---- libavformat/tcp.c.orig 2004-06-18 20:59:34.000000000 -0700 -+++ libavformat/tcp.c 2007-08-02 12:51:07.000000000 -0700 -@@ -21,7 +21,7 @@ - #include <sys/types.h> - #include <sys/socket.h> - #include <netinet/in.h> --#if defined(__APPLE__) || defined(__BEOS__) -+#if defined(__BEOS__) - typedef int socklen_t; - #endif - #ifndef __BEOS__ diff --git a/multimedia/ffmpeg/patches/patch-bktr b/multimedia/ffmpeg/patches/patch-bktr new file mode 100644 index 00000000000..0a2fdcc8c92 --- /dev/null +++ b/multimedia/ffmpeg/patches/patch-bktr @@ -0,0 +1,13 @@ +$NetBSD: patch-bktr,v 1.1 2008/09/07 23:39:38 ahoka Exp $ + +--- libavdevice/bktr.c.orig 2008-06-03 18:20:54.000000000 +0200 ++++ libavdevice/bktr.c +@@ -31,7 +31,7 @@ + #elif defined (HAVE_MACHINE_IOCTL_METEOR_H) && defined (HAVE_MACHINE_IOCTL_BT848_H) + # include <machine/ioctl_meteor.h> + # include <machine/ioctl_bt848.h> +-#elif defined (HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H) && defined (HAVE_DEV_VIDEO_METEOR_IOCTL_BT848_H) ++#elif defined (HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H) && defined (HAVE_DEV_VIDEO_BKTR_IOCTL_BT848_H) + # include <dev/video/meteor/ioctl_meteor.h> + # include <dev/video/bktr/ioctl_bt848.h> + #elif HAVE_DEV_IC_BT8XX_H diff --git a/multimedia/ffmpeg/patches/patch-configure b/multimedia/ffmpeg/patches/patch-configure new file mode 100644 index 00000000000..aad8233a5df --- /dev/null +++ b/multimedia/ffmpeg/patches/patch-configure @@ -0,0 +1,21 @@ +$NetBSD: patch-configure,v 1.1 2008/09/07 23:39:38 ahoka Exp $ + +--- configure.orig 2008-07-24 12:53:32.000000000 +0200 ++++ configure +@@ -891,7 +891,7 @@ rtp_muxer_deps="network rtp_protocol" + rtsp_demuxer_deps="sdp_demuxer" + sdp_demuxer_deps="rtp_protocol mpegts_demuxer" + v4l_demuxer_deps="linux_videodev_h" +-v4l2_demuxer_deps="linux_videodev2_h" ++v4l2_demuxer_deps_any="linux_videodev2_h sys_videoio_h" + vfwcap_demuxer_deps="capCreateCaptureWindow" + vfwcap_demuxer_extralibs="-lvfw32" + x11_grab_device_demuxer_deps="x11grab XShmCreateImage" +@@ -1789,6 +1789,7 @@ EOF + + check_header linux/videodev.h + check_header linux/videodev2.h ++check_header sys/videoio.h + + check_func2 "windows.h vfw.h" capCreateCaptureWindow -lvfw32 + diff --git a/multimedia/ffmpeg/patches/patch-r14477 b/multimedia/ffmpeg/patches/patch-r14477 new file mode 100644 index 00000000000..60d3af07294 --- /dev/null +++ b/multimedia/ffmpeg/patches/patch-r14477 @@ -0,0 +1,16 @@ +$NetBSD: patch-r14477,v 1.1 2008/09/07 23:39:38 ahoka Exp $ + +From ffmpeg svn. Remove after upgrading the ffmpeg. + +--- libavformat/avidec.c 2008/07/04 13:05:06 14064 ++++ libavformat/avidec.c 2008/07/30 21:07:54 14477 +@@ -1026,8 +1026,7 @@ + continue; + + // assert(st2->codec->block_align); +- assert(st2->time_base.den == ast2->rate); +- assert(st2->time_base.num == ast2->scale); ++ assert((int64_t)st2->time_base.num*ast2->rate == (int64_t)st2->time_base.den*ast2->scale); + index = av_index_search_timestamp( + st2, + av_rescale(timestamp, st2->time_base.den*(int64_t)st->time_base.num, st->time_base.den * (int64_t)st2->time_base.num), diff --git a/multimedia/ffmpeg/patches/patch-v4l2 b/multimedia/ffmpeg/patches/patch-v4l2 new file mode 100644 index 00000000000..b7a6ef3aade --- /dev/null +++ b/multimedia/ffmpeg/patches/patch-v4l2 @@ -0,0 +1,20 @@ +$NetBSD: patch-v4l2,v 1.1 2008/09/07 23:39:38 ahoka Exp $ + +--- libavdevice/v4l2.c.orig 2008-07-15 22:45:42.000000000 +0200 ++++ libavdevice/v4l2.c +@@ -34,8 +34,13 @@ + #include <sys/ioctl.h> + #include <sys/mman.h> + #include <sys/time.h> +-#include <asm/types.h> +-#include <linux/videodev2.h> ++#if defined(__NetBSD__) || defined(__OpenBSD__) ++# include <sys/types.h> ++# include <sys/videoio.h> ++#else ++# include <asm/types.h> ++# include <linux/videodev2.h> ++#endif + #include <time.h> + + static const int desired_video_buffers = 256; |