rebuilt without libmpeg4ip and with libmp4v2 >= 2.0.0 [release 2.7-4mamba;Sat Mar 15 2014]

This commit is contained in:
Silvan Calarco 2024-01-05 22:12:34 +01:00
parent a68bf63c8e
commit 2f76e46790
6 changed files with 365 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# faad2
FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, completely written from scratch.

12
faad2-2.5-mp4ff.patch Normal file
View File

@ -0,0 +1,12 @@
--- faad2/common/mp4ff/Makefile.am.orig 2006-05-07 20:09:00.000000000 +0200
+++ faad2/common/mp4ff/Makefile.am 2007-05-13 20:23:27.000000000 +0200
@@ -1,6 +1,7 @@
-noinst_LTLIBRARIES = libmp4ff.la
+lib_LTLIBRARIES = libmp4ff.la
-libmp4ff_la_CFLAGS = -DUSE_TAGGING=1
+include_HEADERS = mp4ff.h mp4ff_int_types.h
+libmp4ff_la_CFLAGS = -DUSE_TAGGING=1 -fpic
libmp4ff_la_SOURCES = mp4ff.c mp4atom.c mp4meta.c mp4sample.c mp4util.c \
mp4tagupdate.c mp4ff.h mp4ffint.h mp4ff_int_types.h \

52
faad2-2.5-no_bmp.patch Normal file
View File

@ -0,0 +1,52 @@
--- faad2/plugins/xmms/src/Makefile.am.bmp 2006-08-13 14:22:26.529280312 -0400
+++ faad2/plugins/xmms/src/Makefile.am 2006-08-13 14:22:30.489267425 -0400
@@ -1,12 +1,6 @@
-if HAVE_BMP
-libdir=$(shell pkg-config --variable=input-plugin-dir bmp)
-local_CFLAGS=$(shell pkg-config --cflags bmp)
-local_LDFLAGS=$(shell pkg-config --libs bmp)
-else
local_CFLAGS=`$(XMMS_CONFIG) --cflags` -Wall
local_LDFLAGS=`$(XMMS_CONFIG) --libs`
libdir = `$(XMMS_CONFIG) --input-plugin-dir`
-endif #HAVE_BMP
lib_LTLIBRARIES = libmp4.la
libmp4_la_CFLAGS = $(local_CFLAGS) -Wall \
--- faad2/plugins/Makefile.am.bmp 2006-08-07 14:47:45.000000000 -0400
+++ faad2/plugins/Makefile.am 2006-08-13 14:20:07.449733244 -0400
@@ -7,11 +7,5 @@
else
if HAVE_XMMS
SUBDIRS = xmms
-else
-if HAVE_BMP
-SUBDIRS = bmp
-else
-SUBDIRS =
-endif #HAVE_BMP
endif #HAVE_XMMS
endif #HAVE_MPEG4IP_PLUG
--- faad2/configure.in.bmp 2006-08-13 14:20:07.439733277 -0400
+++ faad2/configure.in 2006-08-13 14:20:07.449733244 -0400
@@ -29,8 +29,6 @@
AC_ARG_WITH(xmms,[ --with-xmms compile XMMS-1 plugin],
WITHXMMS=$withval, WITHXMMS=no)
-AC_ARG_WITH(bmp,[ --with-bmp compile beep media player plugin],
- [WITHBMP=$withval;WITHXMMS=$withval], [WITHBMP=no])
AC_ARG_WITH(drm,[ --with-drm compile libfaad with DRM support],
WITHDRM=$withval, WITHDRM=no)
@@ -114,11 +112,6 @@
AM_CONDITIONAL(HAVE_XMMS, false)
fi
-if test x$WITHBMP = xyes; then
- AC_DEFINE([HAVE_BMP], 1, [User wants beep media player plugin built])
- AM_CONDITIONAL([HAVE_XMMS], true)
- AM_CONDITIONAL([HAVE_BMP], true)
-fi
if test x$WITHDRM = xyes; then
AC_DEFINE(DRM, 1, [Define if you want to use libfaad together with Digital Radio Mondiale (DRM)])

View File

@ -0,0 +1,12 @@
diff -Nru faad2-2.7.orig/configure.in faad2-2.7/configure.in
--- faad2-2.7.orig/configure.in 2012-08-14 00:34:27.511698696 +0200
+++ faad2-2.7/configure.in 2012-08-14 00:35:14.019256277 +0200
@@ -122,6 +122,8 @@
AM_CONDITIONAL(HAVE_MPEG4IP_PLUG, false)
if test x$WITHMPEG4IP = xyes; then
if test x$external_mp4v2 = xyes; then
+ MPEG4IP_PLAYER_PLUGIN_DIR=`mpeg4ip-config --player-plugin-dir`
+ AC_SUBST(MPEG4IP_PLAYER_PLUGIN_DIR)
AM_CONDITIONAL(HAVE_MPEG4IP_PLUG, true)
AC_MSG_NOTICE("Building MPEG4IP plugin")
else

103
faad2-2.7-mpeg4ip.patch Normal file
View File

@ -0,0 +1,103 @@
diff -ru faad2-2.7.orig/plugins/mpeg4ip/faad2.cpp faad2-2.7/plugins/mpeg4ip/faad2.cpp
--- faad2-2.7.orig/plugins/mpeg4ip/faad2.cpp 2004-08-20 10:30:53.000000000 +0200
+++ faad2-2.7/plugins/mpeg4ip/faad2.cpp 2009-07-12 19:23:11.000000000 +0200
@@ -35,7 +35,9 @@
/*
* Create CAACodec class
*/
-static codec_data_t *aac_codec_create (const char *compressor,
+static codec_data_t *aac_codec_create (
+ const char *stream_type,
+ const char *compressor,
int type,
int profile,
format_list_t *media_fmt,
@@ -67,7 +69,7 @@
// This is not necessarilly right - it is, for the most part, but
// we should be reading the fmtp statement, and looking at the config.
// (like we do below in the userdata section...
- aac->m_freq = media_fmt->rtpmap->clock_rate;
+ aac->m_freq = media_fmt->rtpmap_clock_rate;
fmtp = parse_fmtp_for_mpeg4(media_fmt->fmt_param, vft->log_msg);
if (fmtp != NULL) {
userdata = fmtp->config_binary;
@@ -148,7 +150,7 @@
* Decode task call for FAAC
*/
static int aac_decode (codec_data_t *ptr,
- uint64_t ts,
+ frame_timestamp_t *ts,
int from_rtp,
int *sync_frame,
uint8_t *buffer,
@@ -163,15 +165,15 @@
if (aac->m_record_sync_time) {
aac->m_current_frame = 0;
aac->m_record_sync_time = 0;
- aac->m_current_time = ts;
- aac->m_last_rtp_ts = ts;
+ aac->m_current_time = ts->msec_timestamp;
+ aac->m_last_rtp_ts = ts->msec_timestamp;
} else {
- if (aac->m_last_rtp_ts == ts) {
+ if (aac->m_last_rtp_ts == ts->msec_timestamp) {
aac->m_current_time += aac->m_msec_per_frame;
aac->m_current_frame++;
} else {
- aac->m_last_rtp_ts = ts;
- aac->m_current_time = ts;
+ aac->m_last_rtp_ts = ts->msec_timestamp;
+ aac->m_current_time = ts->msec_timestamp;
aac->m_current_frame = 0;
}
@@ -239,7 +241,7 @@
aac->m_chans,
(audio_format_t)AUDIO_S16SYS,
aac->m_output_frame_size);
- uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr);
+ uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr, aac->m_freq, aac->m_current_time);
aac->m_audio_inited = 1;
}
/*
@@ -281,6 +283,7 @@
};
static int aac_codec_check (lib_message_func_t message,
+ const char *stream_time,
const char *compressor,
int type,
int profile,
@@ -307,9 +310,8 @@
}
}
if (fptr != NULL &&
- fptr->rtpmap != NULL &&
- fptr->rtpmap->encode_name != NULL) {
- if (strcasecmp(fptr->rtpmap->encode_name, "mpeg4-generic") != 0) {
+ fptr->rtpmap_name != NULL) {
+ if (strcasecmp(fptr->rtpmap_name, "mpeg4-generic") != 0) {
return -1;
}
if (userdata == NULL) {
@@ -322,7 +324,7 @@
}
if (userdata != NULL) {
mpeg4_audio_config_t audio_config;
- decode_mpeg4_audio_config(userdata, userdata_size, &audio_config);
+ decode_mpeg4_audio_config(userdata, userdata_size, &audio_config, false);
message(LOG_DEBUG, "aac", "audio type is %d", audio_config.audio_object_type);
if (fmtp != NULL) free_fmtp_parse(fmtp);
diff -ru faad2-2.7.orig/plugins/mpeg4ip/faad2.h faad2-2.7/plugins/mpeg4ip/faad2.h
--- faad2-2.7.orig/plugins/mpeg4ip/faad2.h 2004-01-05 15:05:12.000000000 +0100
+++ faad2-2.7/plugins/mpeg4ip/faad2.h 2009-07-12 19:26:18.000000000 +0200
@@ -81,7 +81,7 @@
int aac_file_next_frame(codec_data_t *ifptr,
uint8_t **buffer,
- uint64_t *ts);
+ frame_timestamp_t *ts);
int aac_file_eof(codec_data_t *ifptr);
void aac_file_used_for_frame(codec_data_t *ifptr,

184
faad2.spec Normal file
View File

@ -0,0 +1,184 @@
%define libname lib%{name}
Name: faad2
Version: 2.7
Release: 4mamba
Epoch: 1
Summary: Freeware Advanced Audio Decoder 2
Group: Applications/Multimedia
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.audiocoding.com/
Source: http://downloads.sourceforge.net/faac/faad2-%{version}.tar.gz
Patch1: %{name}-2.5-no_bmp.patch
Patch2: %{name}-2.5-mp4ff.patch
Patch3: %{name}-2.7-mpeg4ip.patch
Patch4: %{name}-2.7-mpeg4ip-configure.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libX11-devel
BuildRequires: libXau-devel
BuildRequires: libXdmcp-devel
BuildRequires: libXext-devel
BuildRequires: libglib1-devel
BuildRequires: libgtk1-devel
BuildRequires: libxcb-devel
%if "%{stage1}" != "1"
BuildRequires: libxmms-devel
%endif
## AUTOBUILDREQ-END
BuildRequires: hd2u
BuildRequires: autoconf
BuildRequires: libz-devel
BuildRequires: libsndfile-devel >= 1.0.0
BuildRequires: libid3-devel
BuildRequires: libmp4v2-devel >= 2.0.0
BuildConflicts: libmpeg4ip-devel
Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, completely written from scratch.
%package -n %{libname}
Summary: A library for decoding MPEG2/4 AAC
Group: System/Libraries
%description -n %{libname}
FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, completely written from scratch.
%package -n xmms-aac
Summary: An AAC plugin for the XMMS player
Group: Applications/Multimedia
Requires: xmms
Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
Provides: %{libname}-xmms-aac = %{?epoch:%epoch:}%{version}-%{release}
%description -n xmms-aac
This xmms plugin reads AAC files with and without ID3 tags (version 2.x).
AAC files are MPEG2 or MPEG4 files that can be found in MPEG4 audio files (.mp4).
MPEG4 files with AAC inside can be read by RealPlayer or Quicktime.
%package -n mpeg4ip-aac
Summary: An AAC plugin for mpeg4ip player
Group: Applications/Multimedia
Requires: mpeg4ip
Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
Provides: %{libname}-mpeg4ip-plugin = %{?epoch:%epoch:}%{version}-%{release}
%description -n mpeg4ip-aac
This mpeg4ip player plugin reads AAC files.
AAC files are MPEG2 or MPEG4 files that can be found in MPEG4 audio files (.mp4).
MPEG4 files with AAC inside can be read by RealPlayer or Quicktime.
%package -n %{libname}-devel
Summary: Static libraries and headers for %{libname}
Group: Development/Libraries
Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: %{name}-devel
%description -n %{libname}-devel
FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, completely written from scratch.
This package contains static libraries and header files need for development.
%prep
%setup -q
dos2unix configure.in
#%patch1 -p1
#%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
autoreconf -vif
%configure \
--with-mp4v2 \
%if "%{stage1}" != "1"
--with-xmms
%endif
# --with-drm
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files
%defattr(-, root, root)
%{_bindir}/*
%{_mandir}/manm/faad.man.gz
%files -n %{libname}
%defattr(-, root, root)
%{_libdir}/*.so.*
%doc AUTHORS COPYING
%files -n %{libname}-devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/*.so
%doc ChangeLog NEWS README TODO
%if "%{stage1}" != "1"
%files -n xmms-aac
%defattr(-, root, root)
%{_libdir}/xmms/Input/*.a
%{_libdir}/xmms/Input/*.la
%{_libdir}/xmms/Input/*.so
%doc plugins/xmms/{AUTHORS,NEWS,README,TODO}
#%files -n mpeg4ip-aac
#%defattr(-, root, root)
#%{_libdir}/mp4player_plugin/faad2_plugin.*
%endif
%changelog
* Sat Mar 15 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7-4mamba
- rebuilt without libmpeg4ip and with libmp4v2 >= 2.0.0
* Tue Aug 14 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7-3mamba
- remove the option --with-drm (https://github.com/PromyLOPh/pianobar/issues/282); tested with totem and mp4 file
* Tue Jul 14 2009 Automatic Build System <autodist@mambasoft.it> 2.7-2mamba
- automatic rebuild by autodist
* Thu Jul 09 2009 Automatic Build System <autodist@mambasoft.it> 2.7-1mamba
- update to 2.7
* Sun May 13 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 2.5-1mamba
- fixed xmms plugin compilation
- fixed mpeg4ip plugin compilation
- added faad2 package
* Fri Jan 26 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.cvs20070126-1qilnx
- update to version 2.5 by autospec
- FIXME: removed mpeg4ip plugin due to build problems
* Wed May 24 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0-3qilnx
- remove build of libmp4v2 provided and maintained by the mpeg4ip project
- added mpeg4ip plugin package
- enabled drm support
- removed xmms plugin (currently requires internal build of libmp4v2)
* Sat Oct 02 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.0-2qilnx
- specfile fixed and modified to match QiLinux standards
- library name modified (was faad2)
- added a patch to compile libfaad2 with gcc-3.4
* Mon Sep 13 2004 Matteo Bernasconi <voyagernm@virgilio.it> 2.0-1qilnx
- first build