update to CVS as of 3/12/06.

relevant portion of the official ChangeLog:

- Fraps FPS1 video decoder
- Snow video encoder/decoder
- Sonic audio encoder/decoder
- Vorbis audio decoder
- Macromedia ADPCM decoder
- Duck TrueMotion 2 video decoder
- support for decoding FLX and DTA extensions in FLIC files
- H.264 custom quantization matrices support
- ffserver fixed, it should now be usable again
- QDM2 audio decoder
- Real Cooker audio decoder
- TrueSpeech audio decoder
- WMA2 audio decoder fixed, now all files should play correctly
- RealAudio 14.4 and 28.8 decoders fixed
- JPEG-LS encoder and decoder
- CamStudio video decoder
- build system improvements
- tabs and trailing whitespace removed from the codebase
- AIFF/AIFF-C audio format, encoding and decoding
- ADTS AAC file reading and writing
- Creative VOC file reading and writing
- American Laser Games multimedia (*.mm) playback system
- Zip Blocks Motion Video decoder
- Improved Theora/VP3 decoder
- True Audio (TTA) decoder
- AVS demuxer and video decoder

also, bktr(4) support has been integrated upstream, and most of the
source patches in the port are no longer necessary.

OK brad@
This commit is contained in:
jakemsr 2006-03-20 05:50:49 +00:00
parent 6b5ef17310
commit cfb61f73b5
20 changed files with 241 additions and 688 deletions

View File

@ -1,105 +1,71 @@
# $OpenBSD: Makefile,v 1.18 2005/12/31 08:45:56 steven Exp $
# $OpenBSD: Makefile,v 1.19 2006/03/20 05:50:49 jakemsr Exp $
COMMENT= "audio/video converter and streamer with bktr(4) support"
DISTNAME= FFMpeg-20050413
PKGNAME= ${DISTNAME:L}
SHARED_LIBS= avcodec 6.0 \
avformat 6.0 \
postproc 6.0
CATEGORIES= graphics x11
MASTER_SITES= http://www.jakemsr.com/
# http://mplayerhq.hu/MPlayer/cvs/
DISTNAME= ffmpeg-cvs-20060312
PKGNAME= ${DISTNAME:S/-cvs//}
SHARED_LIBS= avutil 1.0 \
avcodec 7.0 \
avformat 7.0 \
postproc 7.0
CATEGORIES= graphics multimedia
EXTRACT_SUFX= .tar.bz2
HOMEPAGE= http://www.ffmpeg.org/
HOMEPAGE= http://www.ffmpeg.org/
MAINTAINER= Jacob Meuser <jakemsr@jakemsr.com>
MAINTAINER= Jacob Meuser <jakemsr@openbsd.org>
# GPL
PERMIT_DISTFILES_CDROM= "patents"
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_CDROM= "patents"
PERMIT_PACKAGE_FTP= Yes
WANTLIB= X11 Xext c m ogg ossaudio pthread usbhid z
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
BUILD_DEPENDS= ::textproc/texi2html
LIB_DEPENDS= SDL.2.0::devel/sdl \
a52.0.0::audio/liba52 \
mp3lame.0.1::audio/lame \
vorbis.4.0,vorbisenc.2.0::audio/libvorbis
# only available through CVS
MASTER_SITES= http://www.jakemsr.com/
NO_REGRESS= Yes # Possible to adapt with some work
USE_GMAKE= Yes
USE_X11= Yes
BUILD_DEPENDS= ::textproc/texi2html
LIB_DEPENDS= SDL.4::devel/sdl
WANTLIB= X11 Xext c freetype m pthread ossaudio usbhid z
USE_X11= Yes
USE_GMAKE= Yes
# It's either this or disable mmx so postprocess_template.c will build.
.if ${MACHINE_ARCH} == "i386"
CFLAGS+=-fomit-frame-pointer
.endif
CONFIGURE_STYLE=simple
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include"
CONFIGURE_ARGS+=${CONFIGURE_SHARED} \
--cc=${CC} \
--make=${MAKE_PROGRAM} \
--extra-cflags="-I${LOCALBASE}/include" \
--extra-ldflags="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
--disable-opts \
--enable-a52 \
--enable-pp \
--enable-mp3lame \
--enable-libogg \
--enable-vorbis \
--enable-gpl \
--enable-pthreads \
--disable-debug
CONFIGURE_STYLE= simple
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--cc=${CC} \
--disable-opts \
--enable-a52 \
--enable-pp \
--enable-gpl \
--enable-pthreads \
--disable-debug
MAKE_ENV+= LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib"
MAKE_FLAGS= SLIBSUF=.so \
LIBavcodec_VERSION=$(LIBavcodec_VERSION) \
LIBavformat_VERSION=$(LIBavformat_VERSION) \
LIBpostproc_VERSION=$(LIBpostproc_VERSION)
MAKE_FLAGS= LIBavutil_VERSION=$(LIBavutil_VERSION) \
LIBavcodec_VERSION=$(LIBavcodec_VERSION) \
LIBavformat_VERSION=$(LIBavformat_VERSION) \
LIBpostproc_VERSION=$(LIBpostproc_VERSION)
# shared libpostproc
.if ${MACHINE_ARCH} != "m88k" && ${MACHINE_ARCH} != "vax"
CONFIGURE_ARGS+=--enable-shared-pp
.endif
FAKE_FLAGS= DESTDIR=${WRKINST} \
LDCONFIG=true \
LIBavutil_VERSION=$(LIBavutil_VERSION) \
LIBavcodec_VERSION=$(LIBavcodec_VERSION) \
LIBavformat_VERSION=$(LIBavformat_VERSION) \
LIBpostproc_VERSION=$(LIBpostproc_VERSION)
post-extract:
@cp ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat/
WRKDIST= ${WRKDIR}/ffmpeg
do-install:
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ffmpeg
.for doc in faq ffmpeg-doc ffplay-doc ffserver-doc hooks
${INSTALL_DATA} ${WRKBUILD}/doc/${doc}.html ${PREFIX}/share/doc/ffmpeg
.endfor
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ffmpeg
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${PREFIX}/share/doc/ffmpeg
${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \
${INSTALL_DATA} ${WRKBUILD}/doc/ffserver.conf \
${PREFIX}/share/examples/ffmpeg
${INSTALL_MAN} ${WRKSRC}/doc/*.1 ${PREFIX}/man/man1
${INSTALL_PROGRAM} ${WRKBUILD}/ffmpeg ${PREFIX}/bin/ffmpeg
${INSTALL_PROGRAM} ${WRKBUILD}/ffplay ${PREFIX}/bin/ffplay
${INSTALL_PROGRAM} ${WRKBUILD}/ffserver ${PREFIX}/bin/ffserver
${INSTALL_DATA_DIR} ${PREFIX}/include/ffmpeg
${INSTALL_DATA_DIR} ${PREFIX}/include/postproc
${INSTALL_DATA} ${WRKSRC}/libavcodec/{avcodec,common,rational,mpegaudio}.h \
${PREFIX}/include/ffmpeg
${INSTALL_DATA} ${WRKSRC}/libavformat/{avformat.h,avio.h,rtp.h,rtsp.h,rtspcodes.h} \
${PREFIX}/include/ffmpeg
${INSTALL_DATA} ${WRKBUILD}/libavcodec/libpostproc/postprocess.h \
${PREFIX}/include/postproc
${INSTALL_DATA} ${WRKBUILD}/libavcodec/libavcodec.a \
${WRKBUILD}/libavformat/libavformat.a ${PREFIX}/lib
.if ${MACHINE_ARCH} != "m88k" && ${MACHINE_ARCH} != "vax"
${INSTALL_DATA} \
${WRKBUILD}/libavcodec/libavcodec.so.${LIBavcodec_VERSION} \
${WRKBUILD}/libavformat/libavformat.so.${LIBavformat_VERSION} \
${WRKBUILD}/libavcodec/libpostproc/libpostproc.so.${LIBpostproc_VERSION} \
${PREFIX}/lib
.else
${INSTALL_DATA} ${WRKBUILD}/libavcodec/libpostproc/libpostproc.a \
${PREFIX}/lib
.endif
.include <bsd.port.mk>
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
MD5 (FFMpeg-20050413.tar.bz2) = fbad8626724753343758518994ea72f9
RMD160 (FFMpeg-20050413.tar.bz2) = 3618e592ebe5c5f4bc33e4dd2bbf428984ac8b7f
SHA1 (FFMpeg-20050413.tar.bz2) = 10b1c70453faa092fefc0f4417cfc6ce69e3a813
SIZE (FFMpeg-20050413.tar.bz2) = 1525035
MD5 (ffmpeg-cvs-20060312.tar.gz) = 015c1271ea5cd3f96299230ac99d97b4
RMD160 (ffmpeg-cvs-20060312.tar.gz) = 5be767622750d78a07769a03569a0d271eedc0ba
SHA1 (ffmpeg-cvs-20060312.tar.gz) = 84c70a386a9b5923bfbc7d33a9ba2806c63dd7f5
SIZE (ffmpeg-cvs-20060312.tar.gz) = 2195901

View File

@ -1,329 +0,0 @@
/* $OpenBSD: grab_bsdbktr.c,v 1.5 2005/04/20 16:46:54 naddy Exp $
*
* 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"
#include <dev/ic/bt8xx.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <signal.h>
typedef struct {
int video_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 };
unsigned char *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, int *video_fd, int *tuner_fd, int idev, double frequency)
{
struct meteor_geomet geo;
int h_max;
long ioctl_frequency;
char *arg;
int c;
struct sigaction act,old;
if (idev < 0 || idev > 4)
{
arg = getenv ("BKTR_DEV");
if (arg)
idev = atoi (arg);
if (idev < 0 || idev > 4)
idev = 1;
}
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;
}
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 = (unsigned char *) 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");
}
c = AUDIO_UNMUTE;
if (ioctl(*tuner_fd, BT848_SAUDIO, &c) < 0)
perror("TVTUNER_SAUDIO");
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)) {
usleep (last_frame_time + per_frame + per_frame/8 - curtime);
#if 0
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));
}
#endif
}
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;
av_set_pts_info(st, 48, 1, 1000000); /* 48 bits pts in use */
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;
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,
&(s->video_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;
c = METEOR_CAP_STOP_CONT;
ioctl(s->video_fd, METEORCAPTUR, &c);
close(s->video_fd);
c = AUDIO_MUTE;
ioctl(s->tuner_fd, BT848_SAUDIO, &c);
close(s->tuner_fd);
munmap((caddr_t)video_buf, sizeof(video_buf));
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;
}

View File

@ -1,27 +1,12 @@
$OpenBSD: patch-Makefile,v 1.5 2005/04/20 16:46:54 naddy Exp $
--- Makefile.orig Thu Mar 17 18:13:13 2005
+++ Makefile Wed Apr 13 00:17:45 2005
@@ -7,7 +7,7 @@ include config.mak
VPATH=$(SRC_PATH)
$OpenBSD: patch-Makefile,v 1.6 2006/03/20 05:50:49 jakemsr Exp $
--- Makefile.orig Fri Feb 3 00:31:04 2006
+++ Makefile Mon Feb 6 23:48:43 2006
@@ -59,7 +59,7 @@ endif
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
+#LDFLAGS+= -g
OBJS = ffmpeg.o ffserver.o cmdutils.o $(FFPLAY_O)
SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
-FFLIBS = -L./libavformat -lavformat$(BUILDSUF) -L./libavcodec -lavcodec$(BUILDSUF) -L./libavutil -lavutil$(BUILDSUF)
+FFLIBS = -L./libavformat -lavformat$(BUILDSUF) -L./libavcodec -lavcodec$(BUILDSUF) -L./libavutil -lavutil$(BUILDSUF) -lossaudio -lm -lz -pthread
ifeq ($(TARGET_GPROF),yes)
CFLAGS+=-p
@@ -38,9 +38,14 @@ ifeq ($(BUILD_SHARED),yes)
DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF)
else
DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF)
+endif
+
ifeq ($(CONFIG_MP3LAME),yes)
EXTRALIBS+=-lmp3lame
endif
+
+ifeq ($(CONFIG_AC3),yes)
+EXTRALIBS+=-la52
endif
all: lib $(PROG_G) $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
ifeq ($(CONFIG_LIBOGG),yes)

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-common_mak,v 1.1 2006/03/20 05:50:49 jakemsr Exp $
--- common.mak.orig Tue Feb 28 00:23:24 2006
+++ common.mak Tue Feb 28 00:26:36 2006
@@ -75,12 +75,11 @@ install-lib-shared: $(SLIBNAME)
ifeq ($(CONFIG_WIN32),yes)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
else
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
- $(libdir)/$(SLIBNAME_WITH_VERSION)
- ln -sf $(SLIBNAME_WITH_VERSION) \
- $(libdir)/$(SLIBNAME_WITH_MAJOR)
- ln -sf $(SLIBNAME_WITH_VERSION) \
- $(libdir)/$(SLIBNAME)
+ install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)
+ #ln -sf $(SLIBNAME_WITH_VERSION) \
+ # $(libdir)/$(SLIBNAME_WITH_MAJOR)
+ #ln -sf $(SLIBNAME_WITH_VERSION) \
+ # $(libdir)/$(SLIBNAME)
endif
install-lib-static: $(LIB)

View File

@ -1,52 +1,94 @@
$OpenBSD: patch-configure,v 1.12 2005/04/20 16:46:54 naddy Exp $
--- configure.orig Sat Apr 9 08:32:58 2005
+++ configure Wed Apr 13 00:18:10 2005
@@ -111,8 +111,8 @@ case "$cpu" in
i386|i486|i586|i686|i86pc|BePC)
cpu="x86"
;;
- x86_64)
- if [ "`$cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \
+ amd64|x86_64)
+ if [ "`$cc -dumpmachine | grep amd64 | cut -d- -f1`" = "amd64" -a \
-z "`echo $CFLAGS | grep -- -m32`" ]; then
cpu="x86_64"
else
@@ -266,6 +266,12 @@ make="gmake"
CFLAGS="-pthread"
LDFLAGS="$LDFLAGS -export-dynamic -pthread"
;;
+OpenBSD)
+strip="echo"
+extralibs="$extralibs -lossaudio -pthread"
+source_path="`echo $0 | sed -e 's#/configure##'`"
+SLIBSUF=".so.$SV"
+;;
BSD/OS)
v4l="no"
$OpenBSD: patch-configure,v 1.13 2006/03/20 05:50:49 jakemsr Exp $
--- configure.orig Tue Feb 28 00:11:44 2006
+++ configure Tue Feb 28 00:15:42 2006
@@ -243,7 +243,7 @@ LIBSUF=".a"
LIB='$(LIBPREF)$(NAME)$(LIBSUF)'
SLIBPREF="lib"
SLIBSUF=".so"
-SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF)'
+SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBMAJOR)'
EXESUF=""
@@ -324,10 +324,11 @@ bktr="yes"
audio_oss="yes"
@@ -832,10 +838,10 @@ EOF
dv1394="no"
make="gmake"
+SHFLAGS='-shared'
LIBOBJFLAGS="\$(PIC)"
-LDFLAGS="$LDFLAGS -export-dynamic -pthread"
+LDFLAGS="$LDFLAGS -export-dynamic"
LDCONFIG="ldconfig -m \$(libdir)"
-extralibs="$extralibs -lossaudio"
+extralibs=""
;;
FreeBSD)
v4l="no"
@@ -1015,10 +1016,12 @@ EOF
$cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
fi
-if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then
- echo "error, no memalign() but sse enabled, either disable it or use --enable-memalign-hack"
- exit 1
-fi
+#if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then
+# echo "error, no memalign() but sse enabled, either disable it or use --enable-memalign-hack"
+# exit 1
+#fi
+if false ; then
if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then
echo "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
exit 1
fi
+fi
cat > $TMPC << EOF
#include <time.h>
@@ -1274,9 +1280,6 @@ if test "$pthreads" = "yes" ; then
echo "HAVE_PTHREADS=yes" >> config.mak
echo "#define HAVE_PTHREADS 1" >> $TMPH
echo "#define HAVE_THREADS 1" >> $TMPH
- if test $targetos != FreeBSD; then
- extralibs="$extralibs -lpthread"
- fi
@@ -1046,7 +1049,8 @@ $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lz
# XXX: more tests needed - runtime test
fi
if test "$sdl" = "yes" ; then
echo "CONFIG_SDL=yes" >> config.mak
if test "$zlib" = "yes"; then
-extralibs="$extralibs -lz"
+# extralibs="$extralibs -lz"
+ :
fi
if test "$lzo" = "yes" -a "$gpl" = "yes"; then
@@ -1074,7 +1078,7 @@ int main( void ) { return (lrintf(3.999f
EOF
have_lrintf="no"
-if $cc $CFLAGS $LDFLAGS $extralibs -o $TMPE $TMPC 2> /dev/null ; then
+if $cc $CFLAGS $LDFLAGS -lm -o $TMPE $TMPC 2> /dev/null ; then
have_lrintf="yes"
# allanc@chickenandporn.com: cannot execute cross-compiled
# code on the host. Only execute if not cross-compiling.
@@ -1963,7 +1967,7 @@ Description: FFmpeg utility library
Version: $lavu_version
Requires:
Conflicts:
-Libs: -L\${libdir} -lavutil
+Libs: -L\${libdir} -lavutil -lm
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
EOF
@@ -1994,7 +1998,7 @@ Description: FFmpeg codec library
Version: $lavc_version
Requires: $pkg_requires libavutil = $lavu_version
Conflicts:
-Libs: -L\${libdir} -lavcodec $extralibs
+Libs: -L\${libdir} -lavcodec -lavutil -lm -lz -pthread
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
EOF
@@ -2009,7 +2013,7 @@ Description: FFmpeg codec library
Version: $lavc_version
Requires: $pkg_requires libavutil = $lavu_version
Conflicts:
-Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
+Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} ${extralibs}
Cflags: -I\${includedir}
EOF
@@ -2025,7 +2029,7 @@ Description: FFmpeg container format lib
Version: $lavf_version
Requires: $pkg_requires libavcodec = $lavc_version
Conflicts:
-Libs: -L\${libdir} -lavformat $extralibs
+Libs: -L\${libdir} -lavformat -lavutil -lossaudio -lavcodec -lm -lz -pthread
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
EOF

View File

@ -1,38 +1,24 @@
$OpenBSD: patch-libavcodec_Makefile,v 1.11 2005/12/31 08:45:56 steven Exp $
--- libavcodec/Makefile.orig Sun Apr 3 07:02:08 2005
+++ libavcodec/Makefile Thu Dec 29 08:49:19 2005
@@ -73,11 +73,11 @@ ifeq ($(CONFIG_AC3),yes)
OBJS+= a52dec.o
# using builtin liba52 or runtime linked liba52.so.0
-ifneq ($(CONFIG_A52BIN),yes)
-OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \
- liba52/imdct.o liba52/parse.o liba52/crc.o liba52/resample.o
+#ifneq ($(CONFIG_A52BIN),yes)
+#OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \
+# liba52/imdct.o liba52/parse.o liba52/crc.o liba52/resample.o
+#endif
$OpenBSD: patch-libavcodec_Makefile,v 1.12 2006/03/20 05:50:49 jakemsr Exp $
--- libavcodec/Makefile.orig Tue Feb 28 00:11:44 2006
+++ libavcodec/Makefile Tue Feb 28 00:21:33 2006
@@ -282,7 +282,7 @@ OBJS+= liba52/bit_allocate.o liba52/bits
endif
-endif
endif
-EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
+# EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
# currently using libdts for dts decoding
ifeq ($(CONFIG_DTS),yes)
@@ -207,7 +207,8 @@ OBJS := $(OBJS) $(ASM_OBJS)
@@ -396,9 +396,9 @@ endif
LIB= $(LIBPREF)avcodec$(LIBSUF)
NAME=avcodec
SUBDIR=libavcodec
-LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF)
+LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF).$(LIBavutil_VERSION)
ifeq ($(BUILD_SHARED),yes)
-SLIB= $(SLIBPREF)avcodec$(SLIBSUF)
+SLIB= $(SLIBPREF)avcodec$(SLIBSUF).$(LIBavcodec_VERSION)
+CFLAGS += ${PIC} -DPIC
-LIBVERSION=$(LAVCVERSION)
+LIBVERSION='$(LIBavcodec_VERSION)'
LIBMAJOR=$(LAVCMAJOR)
endif
TESTS= imgresample-test dct-test motion-test fft-test
@@ -231,7 +232,7 @@ ifeq ($(CONFIG_WIN32),yes)
$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
-lib /machine:i386 /def:$(@:.dll=.def)
else
- $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(LDFLAGS)
+ $(CC) $(SHFLAGS) -o $@ $(OBJS) $(AMREXTRALIBS) $(LDFLAGS)
endif
dsputil.o: dsputil.c dsputil.h

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libavcodec_h263dec_c,v 1.2 2004/10/07 06:12:11 jolan Exp $
--- libavcodec/h263dec.c.orig Sat Jun 26 04:52:16 2004
+++ libavcodec/h263dec.c Thu Oct 7 00:17:28 2004
@@ -30,6 +30,8 @@
//#define DEBUG
//#define PRINT_FRAME_TIME
+int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s);
+
int ff_h263_decode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-libavcodec_lcl_c,v 1.2 2005/02/09 23:41:43 naddy Exp $
--- libavcodec/lcl.c.orig Sun Jan 23 10:09:06 2005
+++ libavcodec/lcl.c Fri Jan 28 00:15:49 2005
@@ -297,7 +297,7 @@ static int decode_frame(AVCodecContext *
return -1;
}
if (mthread_outlen != (unsigned int)(c->zstream.total_out)) {
- av_log(avctx, AV_LOG_ERROR, "Mthread1 decoded size differs (%u != %lu)\n",
+ av_log(avctx, AV_LOG_ERROR, "Mthread1 decoded size differs (%u != %lld)\n",
mthread_outlen, c->zstream.total_out);
return -1;
}
@@ -331,7 +331,7 @@ static int decode_frame(AVCodecContext *
return -1;
}
if (c->decomp_size != (unsigned int)(c->zstream.total_out)) {
- av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %lu)\n",
+ av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %lld)\n",
c->decomp_size, c->zstream.total_out);
return -1;
}

View File

@ -1,22 +1,12 @@
$OpenBSD: patch-libavcodec_libpostproc_Makefile,v 1.3 2005/12/31 08:45:56 steven Exp $
--- libavcodec/libpostproc/Makefile.orig Wed Mar 23 15:10:22 2005
+++ libavcodec/libpostproc/Makefile Thu Dec 29 08:50:12 2005
@@ -4,7 +4,7 @@ include ../../config.mak
VPATH=$(SRC_PATH)/libavcodec/libpostproc
ifeq ($(SHARED_PP),yes)
-SPPLIB = $(SLIBPREF)postproc$(SLIBSUF)
+SPPLIB = $(SLIBPREF)postproc$(SLIBSUF).$(LIBpostproc_VERSION)
SPPVERSION = 0.0.1
endif
PPLIB = $(LIBPREF)postproc$(LIBSUF)
@@ -40,8 +40,7 @@ postprocess_pic.o: postprocess.c
$(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
$(SPPLIB): $(SPPOBJS)
- $(CC) -shared -Wl,-soname,$(SPPLIB).0 \
- -o $(SPPLIB) $(SPPOBJS)
+ $(CC) -shared -o $(SPPLIB) $(SPPOBJS)
$OpenBSD: patch-libavcodec_libpostproc_Makefile,v 1.4 2006/03/20 05:50:49 jakemsr Exp $
--- libavcodec/libpostproc/Makefile.orig Tue Feb 28 00:11:51 2006
+++ libavcodec/libpostproc/Makefile Tue Feb 28 00:15:42 2006
@@ -7,7 +7,7 @@ incdir=$(prefix)/include/postproc
NAME=postproc
SUBDIR=libavcodec/libpostproc
ifeq ($(BUILD_SHARED),yes)
-LIBVERSION=$(SPPVERSION)
+LIBVERSION='$(LIBpostproc_VERSION)'
LIBMAJOR=$(SPPMAJOR)
endif
$(PPLIB): $(PPOBJS)

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-libavcodec_libpostproc_postprocess_c,v 1.2 2004/10/07 06:12:11 jolan Exp $
--- libavcodec/libpostproc/postprocess.c.orig Sat Jun 5 17:23:55 2004
+++ libavcodec/libpostproc/postprocess.c Thu Oct 7 00:17:28 2004
@@ -76,9 +76,9 @@ try to unroll inner for(x=0 ... loop to
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_MALLOC_H
+/*#ifdef HAVE_MALLOC_H
#include <malloc.h>
-#endif
+#endif*/
//#undef HAVE_MMX2
//#define HAVE_3DNOW
//#undef HAVE_MMX

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-libavcodec_mem_c,v 1.1.1.1 2003/07/19 18:16:34 jolan Exp $
--- libavcodec/mem.c.orig Thu Mar 6 05:32:02 2003
+++ libavcodec/mem.c Wed Jul 16 20:11:37 2003
@@ -29,9 +29,10 @@
#undef free
#undef realloc
-#ifdef HAVE_MALLOC_H
+/*#ifdef HAVE_MALLOC_H
#include <malloc.h>
-#endif
+#endif*/
+#include <stdlib.h>
/* you can redefine av_malloc and av_free in your project to use your
memory allocator. You do not need to suppress this file because the

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libavcodec_mpeg12_c,v 1.3 2005/04/20 16:46:54 naddy Exp $
--- libavcodec/mpeg12.c.orig Mon Apr 4 04:25:44 2005
+++ libavcodec/mpeg12.c Tue Apr 12 23:06:00 2005
@@ -3008,7 +3008,7 @@ static int mpeg_decode_frame(AVCodecCont
input_size = buf_end - buf_ptr;
if(avctx->debug & FF_DEBUG_STARTCODE){
- av_log(avctx, AV_LOG_DEBUG, "%3X at %zd left %d\n", start_code, buf_ptr-buf, input_size);
+ av_log(avctx, AV_LOG_DEBUG, "%3X at %d left %d\n", start_code, buf_ptr-buf, input_size);
}
/* prepare data for next start code */

View File

@ -1,32 +1,21 @@
$OpenBSD: patch-libavformat_Makefile,v 1.10 2005/12/31 08:45:56 steven Exp $
--- libavformat/Makefile.orig Sat Apr 9 17:32:58 2005
+++ libavformat/Makefile Thu Dec 29 09:07:41 2005
@@ -37,7 +37,7 @@ OBJS+= avio.o aviobuf.o file.o
OBJS+= framehook.o
ifeq ($(CONFIG_VIDEO4LINUX),yes)
-OBJS+= grab.o
+OBJS+= grab_bsdbktr.o
$OpenBSD: patch-libavformat_Makefile,v 1.11 2006/03/20 05:50:49 jakemsr Exp $
--- libavformat/Makefile.orig Tue Feb 28 00:11:51 2006
+++ libavformat/Makefile Tue Feb 28 00:18:50 2006
@@ -66,7 +66,7 @@ ifeq ($(CONFIG_AUDIO_OSS),yes)
OBJS+= audio.o
endif
ifeq ($(CONFIG_DV1394),yes)
@@ -75,8 +75,8 @@ endif
-EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF) -lavcodec$(BUILDSUF) -L../libavcodec
+# EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF) -lavcodec$(BUILDSUF) -L../libavcodec
LIB= $(LIBPREF)avformat$(LIBSUF)
ifeq ($(CONFIG_AUDIO_BEOS),yes)
CPPOBJS+= beosaudio.o
@@ -93,7 +93,7 @@ endif
NAME=avformat
SUBDIR=libavformat
ifeq ($(BUILD_SHARED),yes)
-SLIB= $(SLIBPREF)avformat$(SLIBSUF)
-
+SLIB= $(SLIBPREF)avformat$(SLIBSUF).$(LIBavformat_VERSION)
+CFLAGS += ${PIC} -DPIC
AVCLIBS+=-lavcodec -L../libavcodec
ifeq ($(CONFIG_MP3LAME),yes)
AVCLIBS+=-lmp3lame
@@ -97,7 +97,7 @@ ifeq ($(CONFIG_WIN32),yes)
$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
-lib /machine:i386 /def:$(@:.dll=.def)
else
- $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
+ $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(LDFLAGS)
-LIBVERSION=$(LAVFVERSION)
+LIBVERSION='$(LIBavformat_VERSION)'
LIBMAJOR=$(LAVFMAJOR)
endif
depend: $(SRCS)

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-libavformat_audio_c,v 1.3 2005/04/20 16:46:54 naddy Exp $
--- libavformat/audio.c.orig Fri Jun 18 20:59:34 2004
+++ libavformat/audio.c Thu Apr 14 23:01:52 2005
@@ -21,7 +21,11 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#if defined(__OpenBSD__)
+#include <soundcard.h>
+#else
#include <sys/soundcard.h>
+#endif
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -49,7 +53,7 @@ static int audio_open(AudioData *s, int
/* open linux audio device */
if (!audio_device)
- audio_device = "/dev/dsp";
+ audio_device = "/dev/audio";
if (is_output)
audio_fd = open(audio_device, O_WRONLY);

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-libavformat_avformat_h,v 1.3 2003/11/04 07:50:19 jolan Exp $
--- libavformat/avformat.h.orig 2003-09-28 10:26:40.000000000 -0500
+++ libavformat/avformat.h 2003-11-03 22:20:14.000000000 -0600
@@ -19,6 +19,11 @@ extern "C" {
/* packet functions */
+#ifndef int64_t_C
+#define int64_t_C(c) (c ## LL)
+#define uint64_t_C(c) (c ## ULL)
+#endif
+
#ifndef MAXINT64
#define MAXINT64 int64_t_C(0x7fffffffffffffff)
#endif

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libavutil_Makefile,v 1.1 2006/03/20 05:50:49 jakemsr Exp $
--- libavutil/Makefile.orig Tue Feb 28 00:11:52 2006
+++ libavutil/Makefile Tue Feb 28 00:15:42 2006
@@ -26,7 +26,7 @@ endif
NAME=avutil
SUBDIR = libavutil
ifeq ($(BUILD_SHARED),yes)
-LIBVERSION=$(LAVUVERSION)
+LIBVERSION='$(LIBavutil_VERSION)'
LIBMAJOR=$(LAVUMAJOR)
endif

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-vhook_ppm_c,v 1.3 2005/04/20 16:46:54 naddy Exp $
--- vhook/ppm.c.orig Thu Feb 24 14:07:10 2005
+++ vhook/ppm.c Tue Apr 12 23:06:00 2005
@@ -75,7 +75,7 @@ rwpipe *rwpipe_open( int argc, char *arg
close( output[ 0 ] );
close( output[ 1 ] );
- execl("/bin/sh", "sh", "-c", command, NULL );
+ execl("/bin/sh", "sh", "-c", command, (void *)NULL );
exit( 255 );
}
else

View File

@ -1,4 +1,10 @@
@comment $OpenBSD: PFRAG.shared,v 1.12 2005/12/31 08:45:56 steven Exp $
@comment $OpenBSD: PFRAG.shared,v 1.13 2006/03/20 05:50:49 jakemsr Exp $
@lib lib/libavcodec.so.${LIBavcodec_VERSION}
@lib lib/libavformat.so.${LIBavformat_VERSION}
@lib lib/libavutil.so.${LIBavutil_VERSION}
@lib lib/libpostproc.so.${LIBpostproc_VERSION}
lib/vhook/drawtext.so
lib/vhook/fish.so
lib/vhook/null.so
lib/vhook/ppm.so
lib/vhook/watermark.so

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.8 2005/02/09 23:41:43 naddy Exp $
@comment $OpenBSD: PLIST,v 1.9 2006/03/20 05:50:49 jakemsr Exp $
%%SHARED%%
bin/ffmpeg
bin/ffplay
@ -7,8 +7,12 @@ include/ffmpeg/
include/ffmpeg/avcodec.h
include/ffmpeg/avformat.h
include/ffmpeg/avio.h
include/ffmpeg/avutil.h
include/ffmpeg/common.h
include/ffmpeg/mpegaudio.h
include/ffmpeg/dsputil.h
include/ffmpeg/integer.h
include/ffmpeg/intfloat_readwrite.h
include/ffmpeg/mathematics.h
include/ffmpeg/rational.h
include/ffmpeg/rtp.h
include/ffmpeg/rtsp.h
@ -17,6 +21,14 @@ include/postproc/
include/postproc/postprocess.h
lib/libavcodec.a
lib/libavformat.a
lib/libavutil.a
lib/libpostproc.a
lib/pkgconfig/
lib/pkgconfig/libavcodec.pc
lib/pkgconfig/libavformat.pc
lib/pkgconfig/libavutil.pc
lib/pkgconfig/libpostproc.pc
lib/vhook/
@man man/man1/ffmpeg.1
@man man/man1/ffplay.1
@man man/man1/ffserver.1