- add support for x264

- regen patches while here

"go for it" naddy@
This commit is contained in:
ajacoutot 2007-04-08 17:33:39 +00:00
parent 803ba42b08
commit ddf8a134fa
10 changed files with 77 additions and 41 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.114 2007/04/05 16:20:02 kili Exp $
# $OpenBSD: Makefile,v 1.115 2007/04/08 17:33:39 ajacoutot Exp $
# May not be hard to add more.
ONLY_FOR_ARCHS= amd64 i386 powerpc sparc64 arm
@ -7,7 +7,7 @@ COMMENT= "Movie player supporting MPEG, DivX, AVI, ASF, MOV & more"
DISTNAME= MPlayer-1.0pre8
DIST_SUBDIR= mplayer
PKGNAME= ${DISTNAME:L}p9
PKGNAME= ${DISTNAME:L}p10
CATEGORIES= x11
EXTRACT_SUFX= .tar.bz2
@ -47,7 +47,8 @@ LIB_DEPENDS= png::graphics/png \
speex::audio/speex \
mpcdec::audio/libmpcdec \
ogg.>=5::audio/libogg \
xvidcore::multimedia/xvidcore
xvidcore::multimedia/xvidcore \
x264::multimedia/x264
BUILD_DEPENDS= :rtunes->=0.6:audio/rtunes
@ -75,6 +76,7 @@ CONFIGURE_ARGS+=--disable-alsa \
--enable-menu \
--enable-iconv \
--enable-cdparanoia \
--enable-x264 \
--with-extraincdir=${LOCALBASE}/include/libpng:${LOCALBASE}/include \
--with-extralibdir=${LOCALBASE}/lib \
--confdir=${CONFDIR} \

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-Makefile,v 1.12 2006/07/19 21:40:47 robert Exp $
--- Makefile.orig Sun Jun 11 20:35:47 2006
+++ Makefile Thu Jul 6 00:08:11 2006
@@ -426,7 +426,7 @@ LIBS_MENCODER = libmpcodecs/libmpencoder
$OpenBSD: patch-Makefile,v 1.13 2007/04/08 17:33:39 ajacoutot Exp $
--- Makefile.orig Sun Apr 8 10:17:01 2007
+++ Makefile Sun Apr 8 10:17:01 2007
@@ -429,7 +429,7 @@ LIBS_MENCODER = libmpcodecs/libmpencoders.a \
$(LIBC_LIB) \
$(PRG_MENCODER): $(MENCODER_DEP)
@ -10,7 +10,7 @@ $OpenBSD: patch-Makefile,v 1.12 2006/07/19 21:40:47 robert Exp $
endif
codecs.conf.h: $(PRG_CFG) etc/codecs.conf
@@ -485,8 +485,6 @@ ifeq ($(GUI),yes)
@@ -488,8 +488,6 @@ ifeq ($(GUI),yes)
@$(INSTALL) -d $(prefix)/share/applications
$(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/mplayer.desktop
endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-TOOLS_subfont-c_subfont_c,v 1.4 2005/05/27 04:31:51 pvalchev Exp $
--- TOOLS/subfont-c/subfont.c.orig Sat Aug 28 14:53:01 2004
+++ TOOLS/subfont-c/subfont.c Sun May 8 13:15:57 2005
@@ -831,6 +831,18 @@ unsigned gmatrix(unsigned *m, int r, int
$OpenBSD: patch-TOOLS_subfont-c_subfont_c,v 1.5 2007/04/08 17:33:39 ajacoutot Exp $
--- TOOLS/subfont-c/subfont.c.orig Sun Jun 11 20:35:45 2006
+++ TOOLS/subfont-c/subfont.c Sun Apr 8 10:17:01 2007
@@ -831,6 +831,18 @@ unsigned gmatrix(unsigned *m, int r, int w, double con
}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-libavcodec_bitstream_h,v 1.2 2006/07/19 21:40:47 robert Exp $
$OpenBSD: patch-libavcodec_bitstream_h,v 1.3 2007/04/08 17:33:39 ajacoutot Exp $
--- libavcodec/bitstream.h.orig Sun Jun 11 20:35:48 2006
+++ libavcodec/bitstream.h Thu Jul 6 00:08:11 2006
@@ -374,7 +374,7 @@ for examples see get_bits, show_bits, sk
+++ libavcodec/bitstream.h Sun Apr 8 10:17:01 2007
@@ -374,7 +374,7 @@ for examples see get_bits, show_bits, skip_bits, get_v
static inline int unaligned32_be(const void *v)
{

View File

@ -0,0 +1,34 @@
$OpenBSD: patch-libmpcodecs_ve_x264_c,v 1.1 2007/04/08 17:33:39 ajacoutot Exp $
--- libmpcodecs/ve_x264.c.orig Sun Apr 8 10:17:32 2007
+++ libmpcodecs/ve_x264.c Sun Apr 8 10:13:03 2007
@@ -208,7 +208,7 @@ m_option_t x264encopts_conf[] = {
};
static int parse_cqm(const char *str, uint8_t *cqm, int length,
- h264_module_t *mod, char *matrix_name) {
+ h264_module_t *mod, const char *matrix_name) {
int i;
if (!str) return 0;
for (i = 0; i < length; i++) {
@@ -247,8 +247,11 @@ static int config(struct vf_instance_s* vf, int width,
mod->param.i_deblocking_filter_beta = deblockbeta;
mod->param.b_cabac = cabac;
+ mod->param.rc.i_rc_method = X264_RC_CQP;
mod->param.rc.i_qp_constant = qp_constant;
- mod->param.rc.i_rf_constant = rf_constant;
+ if(rf_constant > 0)
+ mod->param.rc.i_rc_method = X264_RC_CRF;
+ mod->param.rc.f_rf_constant = rf_constant;
if(qp_min > qp_constant)
qp_min = qp_constant;
if(qp_max < qp_constant)
@@ -275,7 +278,7 @@ static int config(struct vf_instance_s* vf, int width,
"VBV requires both vbv_maxrate and vbv_bufsize.\n");
return 0;
}
- mod->param.rc.b_cbr = 1;
+ mod->param.rc.i_rc_method = X264_RC_ABR;
mod->param.rc.i_bitrate = bitrate;
mod->param.rc.f_rate_tolerance = ratetol;
mod->param.rc.i_vbv_max_bitrate = vbv_maxrate;

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-libmpdemux_realrtsp_asmrp_c,v 1.1 2007/01/02 09:01:58 robert Exp $
--- libmpdemux/realrtsp/asmrp.c.orig Mon Jan 1 14:46:36 2007
+++ libmpdemux/realrtsp/asmrp.c Mon Jan 1 14:47:35 2007
$OpenBSD: patch-libmpdemux_realrtsp_asmrp_c,v 1.2 2007/04/08 17:33:39 ajacoutot Exp $
--- libmpdemux/realrtsp/asmrp.c.orig Sun Jun 11 20:35:46 2006
+++ libmpdemux/realrtsp/asmrp.c Sun Apr 8 10:17:01 2007
@@ -40,6 +40,7 @@
#include <stdlib.h>
#include <stdio.h>
@ -9,7 +9,7 @@ $OpenBSD: patch-libmpdemux_realrtsp_asmrp_c,v 1.1 2007/01/02 09:01:58 robert Exp
/*
#define LOG
@@ -645,8 +646,10 @@ static int asmrp_eval (asmrp_t *p, int *
@@ -645,8 +646,10 @@ static int asmrp_eval (asmrp_t *p, int *matches) {
#ifdef LOG
printf ("rule #%d is true\n", rule_num);
#endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-libmpdemux_realrtsp_real_c,v 1.2 2007/01/02 09:01:58 robert Exp $
--- libmpdemux/realrtsp/real.c.orig Mon Jan 1 14:49:12 2007
+++ libmpdemux/realrtsp/real.c Mon Jan 1 14:49:37 2007
@@ -528,7 +528,7 @@ rmff_header_t *real_parse_sdp(char *data
$OpenBSD: patch-libmpdemux_realrtsp_real_c,v 1.3 2007/04/08 17:33:39 ajacoutot Exp $
--- libmpdemux/realrtsp/real.c.orig Sun Jun 11 20:35:46 2006
+++ libmpdemux/realrtsp/real.c Sun Apr 8 10:17:01 2007
@@ -528,7 +528,7 @@ rmff_header_t *real_parse_sdp(char *data, char **strea
int j=0;
int n;
char b[64];

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-libmpdemux_tvi_bsdbt848_c,v 1.2 2006/07/19 21:40:47 robert Exp $
$OpenBSD: patch-libmpdemux_tvi_bsdbt848_c,v 1.3 2007/04/08 17:33:39 ajacoutot Exp $
--- libmpdemux/tvi_bsdbt848.c.orig Sun Jun 11 20:35:46 2006
+++ libmpdemux/tvi_bsdbt848.c Thu Jul 6 00:08:12 2006
+++ libmpdemux/tvi_bsdbt848.c Sun Apr 8 10:17:02 2007
@@ -40,9 +40,12 @@
#include <string.h>
@ -78,7 +78,7 @@ $OpenBSD: patch-libmpdemux_tvi_bsdbt848_c,v 1.2 2006/07/19 21:40:47 robert Exp $
static void processframe(int signal)
{
@@ -212,6 +242,19 @@ static int control(priv_t *priv, int cmd
@@ -212,6 +242,19 @@ static int control(priv_t *priv, int cmd, void *arg)
return(TVI_CONTROL_TRUE);
}
@ -98,7 +98,7 @@ $OpenBSD: patch-libmpdemux_tvi_bsdbt848_c,v 1.2 2006/07/19 21:40:47 robert Exp $
case TVI_CONTROL_TUN_GET_TUNER:
case TVI_CONTROL_TUN_SET_TUNER:
@@ -219,23 +262,24 @@ static int control(priv_t *priv, int cmd
@@ -219,23 +262,24 @@ static int control(priv_t *priv, int cmd, void *arg)
case TVI_CONTROL_SPC_GET_INPUT:
{
@ -127,7 +127,7 @@ $OpenBSD: patch-libmpdemux_tvi_bsdbt848_c,v 1.2 2006/07/19 21:40:47 robert Exp $
return(0);
}
@@ -261,8 +305,15 @@ static int control(priv_t *priv, int cmd
@@ -261,8 +305,15 @@ static int control(priv_t *priv, int cmd, void *arg)
case TVI_CONTROL_AUD_SET_SAMPLERATE:
{
int dspspeed = (int)*(void **)arg;
@ -206,7 +206,7 @@ $OpenBSD: patch-libmpdemux_tvi_bsdbt848_c,v 1.2 2006/07/19 21:40:47 robert Exp $
priv->dspbytesread = 0;
priv->dsprate = priv->dspspeed * priv->dspsamplesize/8*(priv->dspstereo+1);
priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/priv->fps *
@@ -597,6 +673,31 @@ if((priv->dspfd = open (priv->dspdev, O_
@@ -597,6 +673,31 @@ if((priv->dspfd = open (priv->dspdev, O_RDONLY, 0)) <
marg = (256 << 16) | 12;
@ -263,7 +263,7 @@ $OpenBSD: patch-libmpdemux_tvi_bsdbt848_c,v 1.2 2006/07/19 21:40:47 robert Exp $
if(priv->videoready == FALSE) return(0);
@@ -680,6 +785,15 @@ if(ioctl(priv->btfd, METEORCAPTUR, &marg
@@ -680,6 +785,15 @@ if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 )
close(priv->btfd);
close(priv->dspfd);
@ -279,7 +279,7 @@ $OpenBSD: patch-libmpdemux_tvi_bsdbt848_c,v 1.2 2006/07/19 21:40:47 robert Exp $
priv->dspfd = -1;
priv->btfd = -1;
@@ -802,13 +916,13 @@ return(priv->dspbytesread * 1.0 / priv->
@@ -802,13 +916,13 @@ return(priv->dspbytesread * 1.0 / priv->dsprate);
static int get_audio_framesize(priv_t *priv)
{
int bytesavail;
@ -295,7 +295,7 @@ $OpenBSD: patch-libmpdemux_tvi_bsdbt848_c,v 1.2 2006/07/19 21:40:47 robert Exp $
if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0)
{
perror("AUDIO_GETINFO");
@@ -827,24 +941,28 @@ if(ioctl(priv->dspfd, FIONREAD, &bytesav
@@ -827,24 +941,28 @@ if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0)
/* When mencoder wants audio data, it wants data..
it won't go do anything else until it gets it :( */

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-mp3lib_layer2_c,v 1.2 2005/05/09 12:24:38 biorn Exp $
--- mp3lib/layer2.c.orig Sat Apr 16 00:21:34 2005
+++ mp3lib/layer2.c Wed Apr 20 06:35:55 2005
@@ -294,6 +294,11 @@ static int do_layer2(struct frame *fr,in
$OpenBSD: patch-mp3lib_layer2_c,v 1.3 2007/04/08 17:33:39 ajacoutot Exp $
--- mp3lib/layer2.c.orig Sun Jun 11 20:35:43 2006
+++ mp3lib/layer2.c Sun Apr 8 10:17:02 2007
@@ -294,6 +294,11 @@ static int do_layer2(struct frame *fr,int outmode)
fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ?
(fr->mode_ext<<2)+4 : fr->II_sblimit;

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-mplayer_c,v 1.4 2006/07/19 21:40:47 robert Exp $
$OpenBSD: patch-mplayer_c,v 1.5 2007/04/08 17:33:39 ajacoutot Exp $
--- mplayer.c.orig Sun Jun 11 20:35:47 2006
+++ mplayer.c Thu Jul 6 00:08:12 2006
+++ mplayer.c Sun Apr 8 10:17:02 2007
@@ -614,7 +614,7 @@ static void exit_sighandler(int x){
gdb_pid = fork();
mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forked...\n");
@ -10,7 +10,7 @@ $OpenBSD: patch-mplayer_c,v 1.4 2006/07/19 21:40:47 robert Exp $
mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't start gdb\n");
} else if (gdb_pid < 0)
mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't fork\n");
@@ -4527,7 +4527,7 @@ if (stream->type==STREAMTYPE_DVDNAV && d
@@ -4527,7 +4527,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
{
#ifdef USE_SUB
if (sh_video) {
@ -19,7 +19,7 @@ $OpenBSD: patch-mplayer_c,v 1.4 2006/07/19 21:40:47 robert Exp $
}
#endif
} break;
@@ -4548,11 +4548,11 @@ if (stream->type==STREAMTYPE_DVDNAV && d
@@ -4548,11 +4548,11 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
case MP_CMD_GET_VO_FULLSCREEN : {
if(video_out && vo_config_count)
@ -33,7 +33,7 @@ $OpenBSD: patch-mplayer_c,v 1.4 2006/07/19 21:40:47 robert Exp $
} break;
case MP_CMD_GET_TIME_POS : {
float pos = 0;
@@ -4570,7 +4570,7 @@ if (stream->type==STREAMTYPE_DVDNAV && d
@@ -4570,7 +4570,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
case MP_CMD_RUN : {
#ifndef __MINGW32__
if(!fork()) {