build & install documentation, enable threads support, tweaks
from new maintainer Jacob Meuser
This commit is contained in:
parent
e177182693
commit
63069d7be3
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.11 2004/10/07 06:12:11 jolan Exp $
|
||||
# $OpenBSD: Makefile,v 1.12 2004/10/13 01:38:21 jolan Exp $
|
||||
|
||||
COMMENT= "audio/video converter and streamer with bktr(4) support"
|
||||
DISTNAME= ffmpeg-0.4.9-pre1
|
||||
@ -9,16 +9,19 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ffmpeg/}
|
||||
|
||||
HOMEPAGE= http://ffmpeg.sourceforge.net/
|
||||
|
||||
MAINTAINER= Jacob Meuser <jakemsr@jakemsr.com>
|
||||
|
||||
# GPL
|
||||
PERMIT_DISTFILES_CDROM= "patents"
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
|
||||
BUILD_DEPENDS= ::textproc/texi2html
|
||||
LIB_DEPENDS= SDL.2.0::devel/sdl \
|
||||
a52::audio/liba52 \
|
||||
mp3lame.0.1::audio/lame \
|
||||
vorbis.3.0,vorbisenc.2.0::audio/libvorbis \
|
||||
vorbis.3.0,vorbisenc.2.0::audio/libvorbis
|
||||
|
||||
NO_REGRESS= Yes # Possible to adapt with some work
|
||||
USE_GMAKE= Yes
|
||||
@ -42,6 +45,7 @@ CONFIGURE_ARGS+=${CONFIGURE_SHARED} \
|
||||
--enable-vorbis \
|
||||
--enable-a52bin \
|
||||
--enable-gpl \
|
||||
--enable-pthreads \
|
||||
--disable-debug
|
||||
|
||||
MAKE_ENV+= LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib"
|
||||
@ -55,9 +59,12 @@ post-extract:
|
||||
@cp ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat/
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ffmpeg
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ffmpeg
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${PREFIX}/share/doc/ffmpeg
|
||||
${INSTALL_DATA} ${WRKSRC}/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
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: grab_bsdbktr.c,v 1.3 2004/10/06 01:34:48 jolan Exp $
|
||||
/* $OpenBSD: grab_bsdbktr.c,v 1.4 2004/10/13 01:38:21 jolan Exp $
|
||||
*
|
||||
* FreeBSD video grab interface
|
||||
* Copyright (c) 2002 Steve O'Hara-Smith
|
||||
@ -255,6 +255,7 @@ static int grab_read_header (AVFormatContext *s1, AVFormatParameters *ap)
|
||||
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;
|
||||
@ -271,7 +272,6 @@ static int grab_read_header (AVFormatContext *s1, AVFormatParameters *ap)
|
||||
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"))
|
||||
|
@ -1,11 +1,24 @@
|
||||
$OpenBSD: patch-Makefile,v 1.2 2004/10/07 06:12:11 jolan Exp $
|
||||
--- Makefile.orig Thu Jul 8 06:02:04 2004
|
||||
+++ Makefile Thu Oct 7 00:26:50 2004
|
||||
@@ -7,7 +7,6 @@ include config.mak
|
||||
$OpenBSD: patch-Makefile,v 1.3 2004/10/13 01:38:21 jolan Exp $
|
||||
--- Makefile.orig Thu Jul 8 04:02:04 2004
|
||||
+++ Makefile Wed Oct 6 20:58:34 2004
|
||||
@@ -7,7 +7,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
|
||||
+#LDFLAGS+= -g
|
||||
|
||||
ifeq ($(TARGET_GPROF),yes)
|
||||
CFLAGS+=-p
|
||||
@@ -37,9 +37,10 @@ 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
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VORBIS),yes)
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-configure,v 1.7 2004/10/07 06:12:11 jolan Exp $
|
||||
--- configure.orig Mon Jul 5 13:06:16 2004
|
||||
+++ configure Thu Oct 7 00:38:53 2004
|
||||
$OpenBSD: patch-configure,v 1.8 2004/10/13 01:38:21 jolan Exp $
|
||||
--- configure.orig Mon Jul 5 11:06:16 2004
|
||||
+++ configure Fri Oct 8 17:42:35 2004
|
||||
@@ -232,6 +232,12 @@ make="gmake"
|
||||
CFLAGS="-pthread"
|
||||
LDFLAGS="$LDFLAGS -export-dynamic -pthread"
|
||||
@ -26,3 +26,18 @@ $OpenBSD: patch-configure,v 1.7 2004/10/07 06:12:11 jolan Exp $
|
||||
;;
|
||||
--extra-libs=*) extralibs=${opt#--extra-libs=}
|
||||
;;
|
||||
@@ -1122,8 +1128,12 @@ fi
|
||||
if test "$pthreads" = "yes" ; then
|
||||
echo "HAVE_PTHREADS=yes" >> config.mak
|
||||
echo "#define HAVE_PTHREADS 1" >> $TMPH
|
||||
- if test $targetos != FreeBSD; then
|
||||
- extralibs="$extralibs -lpthread"
|
||||
+ if test $targetos = OpenBSD; then
|
||||
+ extralibs="$extralibs -pthread"
|
||||
+ else
|
||||
+ if test $targetos != FreeBSD; then
|
||||
+ extralibs="$extralibs -lpthread"
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
if test "$sdl" = "yes" ; then
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-libavcodec_Makefile,v 1.7 2004/10/07 06:12:11 jolan Exp $
|
||||
--- libavcodec/Makefile.orig Fri Jun 18 08:11:15 2004
|
||||
+++ libavcodec/Makefile Thu Oct 7 00:28:00 2004
|
||||
$OpenBSD: patch-libavcodec_Makefile,v 1.8 2004/10/13 01:38:21 jolan Exp $
|
||||
--- libavcodec/Makefile.orig Fri Jun 18 06:11:15 2004
|
||||
+++ libavcodec/Makefile Wed Oct 6 20:30:07 2004
|
||||
@@ -177,6 +177,7 @@ OBJS := $(OBJS) $(ASM_OBJS)
|
||||
LIB= $(LIBPREF)avcodec$(LIBSUF)
|
||||
ifeq ($(BUILD_SHARED),yes)
|
||||
@ -9,12 +9,3 @@ $OpenBSD: patch-libavcodec_Makefile,v 1.7 2004/10/07 06:12:11 jolan Exp $
|
||||
endif
|
||||
TESTS= imgresample-test dct-test motion-test fft-test
|
||||
|
||||
@@ -197,7 +198,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) $(LDFLAGS) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
dsputil.o: dsputil.c dsputil.h
|
||||
|
30
graphics/ffmpeg/patches/patch-libavcodec_lcl_c
Normal file
30
graphics/ffmpeg/patches/patch-libavcodec_lcl_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-libavcodec_lcl_c,v 1.1 2004/10/13 01:38:21 jolan Exp $
|
||||
--- libavcodec/lcl.c.orig Tue Jan 13 12:26:44 2004
|
||||
+++ libavcodec/lcl.c Wed Oct 6 21:22:41 2004
|
||||
@@ -287,7 +287,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);
|
||||
}
|
||||
zret = inflateReset(&(c->zstream));
|
||||
@@ -305,7 +305,7 @@ static int decode_frame(AVCodecContext *
|
||||
return -1;
|
||||
}
|
||||
if ((c->decomp_size - mthread_outlen) != (unsigned int)(c->zstream.total_out)) {
|
||||
- av_log(avctx, AV_LOG_ERROR, "Mthread2 decoded size differs (%d != %lu)\n",
|
||||
+ av_log(avctx, AV_LOG_ERROR, "Mthread2 decoded size differs (%d != %lld)\n",
|
||||
c->decomp_size - mthread_outlen, c->zstream.total_out);
|
||||
}
|
||||
} else {
|
||||
@@ -319,7 +319,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);
|
||||
}
|
||||
}
|
12
graphics/ffmpeg/patches/patch-libavcodec_mpeg12_c
Normal file
12
graphics/ffmpeg/patches/patch-libavcodec_mpeg12_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-libavcodec_mpeg12_c,v 1.1 2004/10/13 01:38:21 jolan Exp $
|
||||
--- libavcodec/mpeg12.c.orig Wed Jun 30 16:12:21 2004
|
||||
+++ libavcodec/mpeg12.c Wed Oct 6 20:43:36 2004
|
||||
@@ -2828,7 +2828,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 */
|
@ -1,19 +1,29 @@
|
||||
$OpenBSD: patch-libavformat_audio_c,v 1.1 2004/04/18 00:36:22 jolan Exp $
|
||||
--- libavformat/audio.c.orig 2003-09-28 10:26:40.000000000 -0500
|
||||
+++ libavformat/audio.c 2004-02-24 22:02:33.000000000 -0600
|
||||
@@ -21,7 +21,11 @@
|
||||
$OpenBSD: patch-libavformat_audio_c,v 1.2 2004/10/13 01:38:21 jolan Exp $
|
||||
--- libavformat/audio.c.orig Fri Jun 18 20:59:34 2004
|
||||
+++ libavformat/audio.c Wed Oct 6 22:27:57 2004
|
||||
@@ -21,7 +21,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
+#if defined(__OpenBSD__)
|
||||
+#include <soundcard.h>
|
||||
+#include <sys/audioio.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
|
||||
@@ -43,13 +48,16 @@ typedef struct {
|
||||
|
||||
static int audio_open(AudioData *s, int is_output, const char *audio_device)
|
||||
{
|
||||
+#ifdef __OpenBSD__
|
||||
+ audio_info_t audio_if;
|
||||
+#endif
|
||||
int audio_fd;
|
||||
int tmp, err;
|
||||
char *flip = getenv("AUDIO_FLIP_LEFT");
|
||||
|
||||
/* open linux audio device */
|
||||
if (!audio_device)
|
||||
@ -22,3 +32,26 @@ $OpenBSD: patch-libavformat_audio_c,v 1.1 2004/04/18 00:36:22 jolan Exp $
|
||||
|
||||
if (is_output)
|
||||
audio_fd = open(audio_device, O_WRONLY);
|
||||
@@ -133,6 +141,22 @@ static int audio_open(AudioData *s, int
|
||||
}
|
||||
s->sample_rate = tmp; /* store real sample rate */
|
||||
s->fd = audio_fd;
|
||||
+
|
||||
+#ifdef __OpenBSD__
|
||||
+ AUDIO_INITINFO(&audio_if);
|
||||
+ if (is_output) {
|
||||
+ audio_if.play.pause = 0;
|
||||
+ audio_if.record.pause = 1;
|
||||
+ } else {
|
||||
+ audio_if.play.pause = 1;
|
||||
+ audio_if.record.pause = 0;
|
||||
+ }
|
||||
+ err = ioctl(audio_fd, AUDIO_SETINFO, &audio_if);
|
||||
+ if (err < 0) {
|
||||
+ perror("AUDIO_SETINFO");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.6 2004/10/07 06:12:11 jolan Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.7 2004/10/13 01:38:21 jolan Exp $
|
||||
%%SHARED%%
|
||||
bin/ffmpeg
|
||||
bin/ffplay
|
||||
@ -16,5 +16,14 @@ include/postproc/
|
||||
include/postproc/postprocess.h
|
||||
lib/libavcodec.a
|
||||
lib/libavformat.a
|
||||
@man man/man1/ffmpeg.1
|
||||
@man man/man1/ffplay.1
|
||||
@man man/man1/ffserver.1
|
||||
share/doc/ffmpeg/
|
||||
share/doc/ffmpeg/faq.html
|
||||
share/doc/ffmpeg/ffmpeg-doc.html
|
||||
share/doc/ffmpeg/ffplay-doc.html
|
||||
share/doc/ffmpeg/ffserver-doc.html
|
||||
share/doc/ffmpeg/hooks.html
|
||||
share/examples/ffmpeg/
|
||||
share/examples/ffmpeg/ffserver.conf
|
||||
|
Loading…
x
Reference in New Issue
Block a user