- simpler faad related patching

- bump PKGNAME

ok brad@
This commit is contained in:
jakemsr 2008-09-15 22:11:42 +00:00
parent d47f33c8b5
commit 32e8a1e508
5 changed files with 45 additions and 220 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.39 2008/08/31 00:35:08 brad Exp $
# $OpenBSD: Makefile,v 1.40 2008/09/15 22:11:42 jakemsr Exp $
SHARED_ONLY= Yes
@ -9,7 +9,7 @@ COMMENT-jack= jackd audio output module for xine-lib
V= 1.1.15
DISTNAME= xine-lib-${V}
PKGNAME-main= ${DISTNAME}p1
PKGNAME-main= ${DISTNAME}p2
PKGNAME-esd= xine-lib-esd-${V}
PKGNAME-arts= xine-lib-arts-${V}
PKGNAME-jack= xine-lib-jack-${V}
@ -51,7 +51,7 @@ LIB_DEPENDS-main= ${LIB_DEPENDS} \
a52::audio/liba52 \
avcodec.>=7,postproc.>=7::graphics/ffmpeg \
dvdnav.>=5::multimedia/libdvdnav \
faad.>=1::audio/faad \
faad.>=2::audio/faad \
mad.>=2::audio/libmad \
mng.>=3::graphics/libmng \
ogg.>=5::audio/libogg \

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-configure,v 1.18 2008/08/20 01:54:01 brad Exp $
$OpenBSD: patch-configure,v 1.19 2008/09/15 22:11:42 jakemsr Exp $
--- configure.orig Thu Aug 14 17:18:56 2008
+++ configure Thu Aug 14 19:04:37 2008
@@ -24654,6 +24654,9 @@ _ACEOF
@ -72,65 +72,6 @@ $OpenBSD: patch-configure,v 1.18 2008/08/20 01:54:01 brad Exp $
else
{ echo "$as_me:$LINENO: result: *** All libmng dependent parts will be disabled ***" >&5
echo "${ECHO_T}*** All libmng dependent parts will be disabled ***" >&6; }
@@ -45513,13 +45516,13 @@ if test "x$enable_faad" = "xno"; then
{ echo "$as_me:$LINENO: result: faad support disabled" >&5
echo "${ECHO_T}faad support disabled" >&6; }
elif test "x$with_external_libfaad" != "xno"; then
- { echo "$as_me:$LINENO: checking for NeAACDecInit in -lfaad" >&5
-echo $ECHO_N "checking for NeAACDecInit in -lfaad... $ECHO_C" >&6; }
-if test "${ac_cv_lib_faad_NeAACDecInit+set}" = set; then
+ { echo "$as_me:$LINENO: checking for faacDecInit in -lfaad" >&5
+echo $ECHO_N "checking for faacDecInit in -lfaad... $ECHO_C" >&6; }
+if test "${ac_cv_lib_faad_faacDecInit+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfaad $LIBS"
+LIBS="-lfaad -lm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -45533,11 +45536,11 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus
extern "C"
#endif
-char NeAACDecInit ();
+char faacDecInit ();
int
main ()
{
-return NeAACDecInit ();
+return faacDecInit ();
;
return 0;
}
@@ -45560,21 +45563,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
- ac_cv_lib_faad_NeAACDecInit=yes
+ ac_cv_lib_faad_faacDecInit=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_faad_NeAACDecInit=no
+ ac_cv_lib_faad_faacDecInit=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_faad_NeAACDecInit" >&5
-echo "${ECHO_T}$ac_cv_lib_faad_NeAACDecInit" >&6; }
-if test $ac_cv_lib_faad_NeAACDecInit = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_faad_faacDecInit" >&5
+echo "${ECHO_T}$ac_cv_lib_faad_faacDecInit" >&6; }
+if test $ac_cv_lib_faad_faacDecInit = yes; then
have_faad=yes
fi
@@ -50533,7 +50536,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF

View File

@ -1,135 +0,0 @@
$OpenBSD: patch-src_libfaad_xine_faad_decoder_c,v 1.3 2008/08/20 01:54:01 brad Exp $
--- src/libfaad/xine_faad_decoder.c.orig Wed Aug 13 12:26:38 2008
+++ src/libfaad/xine_faad_decoder.c Thu Aug 14 18:48:40 2008
@@ -56,26 +56,26 @@ typedef struct faad_decoder_s {
xine_stream_t *stream;
/* faad2 stuff */
- NeAACDecHandle faac_dec;
- NeAACDecConfigurationPtr faac_cfg;
- NeAACDecFrameInfo faac_finfo;
+ faacDecHandle faac_dec;
+ faacDecConfigurationPtr faac_cfg;
+ faacDecFrameInfo faac_finfo;
int faac_failed;
int raw_mode;
- unsigned char *buf;
- int size;
+ uint8_t *buf;
+ uint32_t size;
int rec_audio_src_size;
int max_audio_src_size;
int pts;
- unsigned char *dec_config;
- int dec_config_size;
+ uint8_t *dec_config;
+ uint32_t dec_config_size;
uint32_t rate;
int bits_per_sample;
- unsigned char num_channels;
- int sbr;
+ uint8_t num_channels;
+ uint8_t sbr;
uint32_t ao_cap_mode;
int output_open;
@@ -126,33 +126,33 @@ static void faad_meta_info_set ( faad_decoder_t *this
static int faad_open_dec( faad_decoder_t *this ) {
int used;
- this->faac_dec = NeAACDecOpen();
+ this->faac_dec = faacDecOpen();
if( !this->faac_dec ) {
xprintf( this->stream->xine, XINE_VERBOSITY_LOG,
- _("libfaad: libfaad NeAACDecOpen() failed.\n"));
+ _("libfaad: libfaad faacDecOpen() failed.\n"));
this->faac_failed++;
} else {
if( this->dec_config ) {
- used = NeAACDecInit2(this->faac_dec, this->dec_config, this->dec_config_size,
+ used = faacDecInit2(this->faac_dec, this->dec_config, this->dec_config_size,
&this->rate, &this->num_channels);
if( used < 0 ) {
xprintf( this->stream->xine, XINE_VERBOSITY_LOG,
- _("libfaad: libfaad NeAACDecInit2 failed.\n"));
+ _("libfaad: libfaad faacDecInit2 failed.\n"));
this->faac_failed++;
} else
- lprintf( "NeAACDecInit2 returned rate=%"PRId32" channels=%d\n",
+ lprintf( "faacDecInit2 returned rate=%"PRId32" channels=%d\n",
this->rate, this->num_channels );
} else {
- used = NeAACDecInit(this->faac_dec, this->buf, this->size,
+ used = faacDecInit(this->faac_dec, this->buf, this->size,
&this->rate, &this->num_channels);
if( used < 0 ) {
xprintf ( this->stream->xine, XINE_VERBOSITY_LOG,
- _("libfaad: libfaad NeAACDecInit failed.\n"));
+ _("libfaad: libfaad faacDecInit failed.\n"));
this->faac_failed++;
} else {
- lprintf( "NeAACDecInit() returned rate=%"PRId32" channels=%d (used=%d)\n",
+ lprintf( "faacDecInit() returned rate=%"PRId32" channels=%d (used=%d)\n",
this->rate, this->num_channels, used);
this->size -= used;
@@ -166,7 +166,7 @@ static int faad_open_dec( faad_decoder_t *this ) {
if( this->faac_failed ) {
if( this->faac_dec ) {
- NeAACDecClose( this->faac_dec );
+ faacDecClose( this->faac_dec );
this->faac_dec = NULL;
}
_x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
@@ -190,9 +190,9 @@ static int faad_open_output( faad_decoder_t *this ) {
this->ao_cap_mode = AO_CAP_MODE_5_1CHANNEL;
break;
} else {
- this->faac_cfg = NeAACDecGetCurrentConfiguration(this->faac_dec);
+ this->faac_cfg = faacDecGetCurrentConfiguration(this->faac_dec);
this->faac_cfg->downMatrix = 1;
- NeAACDecSetConfiguration(this->faac_dec, this->faac_cfg);
+ faacDecSetConfiguration(this->faac_dec, this->faac_cfg);
this->num_channels = 2;
}
case 2:
@@ -215,7 +215,7 @@ static void faad_decode_audio ( faad_decoder_t *this,
uint8_t *sample_buffer;
uint8_t *inbuf;
audio_buffer_t *audio_buffer;
- int sample_size = this->size;
+ uint32_t sample_size = this->size;
if( !this->faac_dec )
return;
@@ -224,12 +224,12 @@ static void faad_decode_audio ( faad_decoder_t *this,
while( (!this->raw_mode && end_frame && this->size >= 10) ||
(this->raw_mode && this->size >= this->rec_audio_src_size) ) {
- sample_buffer = NeAACDecDecode(this->faac_dec,
+ sample_buffer = faacDecDecode(this->faac_dec,
&this->faac_finfo, inbuf, sample_size);
if( !sample_buffer ) {
xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
- "libfaad: %s\n", NeAACDecGetErrorMessage(this->faac_finfo.error));
+ "libfaad: %s\n", faacDecGetErrorMessage(this->faac_finfo.error));
used = 1;
} else {
used = this->faac_finfo.bytesconsumed;
@@ -409,7 +409,7 @@ static void faad_dispose (audio_decoder_t *this_gen) {
this->dec_config_size = 0;
if( this->faac_dec )
- NeAACDecClose(this->faac_dec);
+ faacDecClose(this->faac_dec);
this->faac_dec = NULL;
this->faac_failed = 0;

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.76 2008/09/05 01:01:00 brad Exp $
# $OpenBSD: Makefile,v 1.77 2008/09/15 22:14:23 jakemsr Exp $
SHARED_ONLY= Yes
@ -6,7 +6,7 @@ COMMENT-main= videolan client; multimedia player
V= 0.8.6i
DISTNAME= vlc-${V}
PKGNAME-main= ${DISTNAME}p1
PKGNAME-main= ${DISTNAME}p2
CATEGORIES= x11
MASTER_SITES= http://download.videolan.org/pub/videolan/vlc/${V}/
@ -30,6 +30,7 @@ LIB_DEPENDS-main=${LIB_DEPENDS} \
mad.>=2.1::audio/libmad \
mpeg2::graphics/libmpeg2 \
avcodec.>=9.0,avformat.>=9.0,postproc.>=9.0,avutil.>=3.0::graphics/ffmpeg \
faad.>=2::audio/faad \
fribidi::devel/fribidi \
a52::audio/liba52 \
theora.>=1::multimedia/libtheora \
@ -47,7 +48,7 @@ RUN_DEPENDS= :desktop-file-utils-*:devel/desktop-file-utils
WANTLIB-main= ICE SM X11 Xext Xinerama Xv Xxf86vm c freetype m ncurses \
pthread stdc++ usbhid z Xau Xdmcp Xrandr Xrender \
SDL jpeg tiff bz2 faad ogg vorbis vorbisenc faac mp3lame
SDL jpeg tiff bz2 ogg vorbis vorbisenc faac mp3lame
CONFIGURE_STYLE=autoconf
AUTOCONF_VERSION=2.61

View File

@ -1,21 +1,39 @@
$OpenBSD: patch-modules_codec_faad_c,v 1.4 2008/04/04 00:53:01 jakemsr Exp $
--- modules/codec/faad.c.orig Mon Mar 31 15:15:33 2008
+++ modules/codec/faad.c Thu Apr 3 03:35:55 2008
@@ -359,6 +359,9 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, b
p_dec->fmt_out.audio.i_rate = frame.samplerate;
p_dec->fmt_out.audio.i_channels = frame.channels;
$OpenBSD: patch-modules_codec_faad_c,v 1.5 2008/09/15 22:14:23 jakemsr Exp $
--- modules/codec/faad.c.orig Tue Jul 8 13:59:23 2008
+++ modules/codec/faad.c Sat Sep 6 15:16:11 2008
@@ -150,7 +150,7 @@ static int Open( vlc_object_t *p_this )
if( p_dec->fmt_in.i_extra > 0 )
{
/* We have a decoder config so init the handle */
- unsigned long i_rate;
+ unsigned int i_rate;
unsigned char i_channels;
+#if 0
+XXX: faad needs to be updated to 2.5?
+
/* Adjust stream info when dealing with SBR/PS */
if( (p_sys->b_sbr != frame.sbr || p_sys->b_ps != frame.ps) &&
p_dec->p_parent->i_object_type == VLC_OBJECT_INPUT )
@@ -383,6 +386,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, b
}
p_sys->b_sbr = frame.sbr; p_sys->b_ps = frame.ps;
}
+#endif
if( faacDecInit2( p_sys->hfaad, p_dec->fmt_in.p_extra,
@@ -253,7 +253,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, b
if( p_dec->fmt_out.audio.i_rate == 0 && p_dec->fmt_in.i_extra > 0 )
{
/* We have a decoder config so init the handle */
- unsigned long i_rate;
+ unsigned int i_rate;
unsigned char i_channels;
/* Convert frame.channel_position to our own channel values */
p_dec->fmt_out.audio.i_physical_channels = 0;
if( faacDecInit2( p_sys->hfaad, p_dec->fmt_in.p_extra,
@@ -268,7 +268,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, b
if( p_dec->fmt_out.audio.i_rate == 0 && p_sys->i_buffer )
{
- unsigned long i_rate;
+ unsigned int i_rate;
unsigned char i_channels;
/* Init faad with the first frame */
@@ -368,7 +368,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, b
const char *psz_ext = (frame.sbr && frame.ps) ? "SBR+PS" :
frame.sbr ? "SBR" : "PS";
- msg_Dbg( p_dec, "AAC %s (channels: %u, samplerate: %lu)",
+ msg_Dbg( p_dec, "AAC %s (channels: %u, samplerate: %u)",
psz_ext, frame.channels, frame.samplerate );
if( asprintf( &psz_cat, _("Stream %d"), p_dec->fmt_in.i_id ) != -1 )