mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
added community/gpac
This commit is contained in:
parent
b254bf0cec
commit
63f8e6b815
2 changed files with 95 additions and 0 deletions
58
community/gpac/PKGBUILD
Normal file
58
community/gpac/PKGBUILD
Normal file
|
@ -0,0 +1,58 @@
|
|||
# $Id$
|
||||
# Maintainer: Eric Bélanger <eric@archlinux.org>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - use PIC with armv7
|
||||
|
||||
pkgname=gpac
|
||||
pkgver=4288
|
||||
pkgrel=3
|
||||
pkgdesc="A multimedia framework based on the MPEG-4 Systems standard"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://gpac.sourceforge.net"
|
||||
license=('LGPL')
|
||||
depends=('ffmpeg' 'libjpeg' 'libpng' 'glu' 'libxv')
|
||||
makedepends=('jack' 'a52dec' 'freetype2' 'faad2' 'libmad' 'mesa')
|
||||
optdepends=('jack: for jack support' 'a52dec: for A52 support'
|
||||
'faad2: for AAC support' 'libmad: for mp3 support')
|
||||
options=('staticlibs' '!makeflags')
|
||||
source=(ftp://ftp.archlinux.org/other/community/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig} gpac-ffmpeg.patch)
|
||||
sha1sums=('6ba29de672b6e4260e510e0e16d5bc0ab09cabb6'
|
||||
'SKIP'
|
||||
'63f59ab745c57bf7d242e942e30a4e6c7a1236b0')
|
||||
|
||||
# source PKGBUILD && mksource
|
||||
mksource() {
|
||||
[[ -x /usr/bin/svn ]] || (echo "svn not found. Install subversion." && return 1)
|
||||
_svnver=${pkgver}
|
||||
_svntrunk="svn://svn.code.sf.net/p/gpac/code/trunk/gpac"
|
||||
_svnmod="$pkgname-${pkgver}"
|
||||
mkdir ${pkgname}-${pkgver}
|
||||
pushd ${pkgname}-${pkgver}
|
||||
svn co $_svntrunk --config-dir ./ -r $_svnver $_svnmod
|
||||
revision="$(svnversion ${pkgname}-${pkgver})"
|
||||
echo "#define GPAC_SVN_REVISION \"$revision\"" > ${pkgname}-${pkgver}/include/gpac/revision.h
|
||||
find . -depth -type d -name .svn -exec rm -rf {} \;
|
||||
tar -cJf ../${pkgname}-${pkgver}.tar.xz ${pkgname}-${pkgver}/*
|
||||
popd
|
||||
rm -r ${pkgname}-${pkgver}
|
||||
gpg --detach-sign --use-agent -u ${GPGKEY} ${pkgname}-${pkgver}.tar.xz
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
patch -p0 -i "${srcdir}/gpac-ffmpeg.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
[[ $CARCH == 'armv7h' ]] && CONFIG='--enable-pic'
|
||||
./configure --prefix=/usr --mandir=/usr/share/man --X11-path=/usr --use-js=no $CONFIG
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
make DESTDIR="${pkgdir}" install install-lib
|
||||
}
|
37
community/gpac/gpac-ffmpeg.patch
Normal file
37
community/gpac/gpac-ffmpeg.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
--- modules/ffmpeg_in/ffmpeg_decode.c 2013-03-11 21:43:22.000000000 -0400
|
||||
+++ modules/ffmpeg_in/ffmpeg_decode.c 2013-07-11 23:38:15.108181474 -0400
|
||||
@@ -38,7 +38,9 @@
|
||||
#undef USE_AVCODEC2
|
||||
#endif
|
||||
|
||||
-#if (LIBAVCODEC_VERSION_MAJOR >= 54) && (LIBAVCODEC_VERSION_MINOR >= 35)
|
||||
+#if (LIBAVCODEC_VERSION_MAJOR >= 55)
|
||||
+#define USE_AVCTX3
|
||||
+#elif (LIBAVCODEC_VERSION_MAJOR >= 54) && (LIBAVCODEC_VERSION_MINOR >= 35)
|
||||
#define USE_AVCTX3
|
||||
#endif
|
||||
|
||||
@@ -625,10 +628,11 @@
|
||||
if (ffd->frame_start>inBufferLength) ffd->frame_start = 0;
|
||||
|
||||
redecode:
|
||||
- gotpic = AVCODEC_MAX_AUDIO_FRAME_SIZE;
|
||||
#ifdef USE_AVCODEC2
|
||||
+ gotpic = 192000;
|
||||
len = avcodec_decode_audio3(ctx, (short *)ffd->audio_buf, &gotpic, &pkt);
|
||||
#else
|
||||
+ gotpic = AVCODEC_MAX_AUDIO_FRAME_SIZE;
|
||||
len = avcodec_decode_audio2(ctx, (short *)ffd->audio_buf, &gotpic, inBuffer + ffd->frame_start, inBufferLength - ffd->frame_start);
|
||||
#endif
|
||||
if (len<0) { ffd->frame_start = 0; return GF_NON_COMPLIANT_BITSTREAM; }
|
||||
--- modules/ffmpeg_in/ffmpeg_in.h 2013-03-11 21:43:22.000000000 -0400
|
||||
+++ modules/ffmpeg_in/ffmpeg_in.h 2013-07-11 23:38:15.108181474 -0400
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
/*for audio packed frames*/
|
||||
u32 frame_start;
|
||||
- char audio_buf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
|
||||
+ char audio_buf[192000];
|
||||
Bool check_h264_isma;
|
||||
|
||||
u32 base_ES_ID;
|
Loading…
Reference in a new issue