summaryrefslogtreecommitdiff
path: root/community/ffmpegsource
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-02-22 00:04:20 -0800
committerroot <root@rshg054.dnsready.net>2013-02-22 00:04:20 -0800
commit0ab7960ba6a457b7dd3ed5ede0cdb93e816d29a4 (patch)
treecee051ac15f97c74d7b6562c8627e53ff4a45dbe /community/ffmpegsource
parent111b18e76114f1a46a23a979a7872e7fda412601 (diff)
Fri Feb 22 00:04:20 PST 2013
Diffstat (limited to 'community/ffmpegsource')
-rwxr-xr-xcommunity/ffmpegsource/PKGBUILD42
-rwxr-xr-xcommunity/ffmpegsource/autoconf.patch22
-rwxr-xr-xcommunity/ffmpegsource/ffmpeg.patch89
3 files changed, 153 insertions, 0 deletions
diff --git a/community/ffmpegsource/PKGBUILD b/community/ffmpegsource/PKGBUILD
new file mode 100755
index 000000000..e68395e82
--- /dev/null
+++ b/community/ffmpegsource/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id: PKGBUILD 84674 2013-02-21 15:31:17Z alucryd $
+# Maintainer: Maxime Gauduin <alucryd@gmail.com>
+
+pkgname=ffmpegsource
+pkgver=2.17
+pkgrel=9
+pkgdesc="A libav/ffmpeg based source library and Avisynth plugin for easy frame accurate access"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/ffmpegsource/"
+license=('MIT')
+depends=('ffmpeg')
+options=('!libtool')
+source=("http://ffmpegsource.googlecode.com/files/ffms-${pkgver}-src.tar.bz2" 'autoconf.patch' 'ffmpeg.patch')
+sha256sums=('991f7a77982823afdcf0beb8961deddaf7dd0aea949249e51fbf51cb3314643d'
+ '77e5185f91249b8d032958abb142827a5349b06ff1b4fbd4c5c87ccea811273d'
+ 'adc08b58dec29b04be9d9eb2f12c2fa836565d363aafcfc3e785ae4692db6845')
+
+build() {
+ cd "${srcdir}"/ffms-${pkgver}-src
+
+# Patch
+ patch -Np1 -i "${srcdir}"/autoconf.patch
+ patch -Np1 -i "${srcdir}"/ffmpeg.patch
+ mv configure.in configure.ac
+
+# Build
+ ./autogen.sh --prefix=/usr --enable-shared --disable-static
+ make
+}
+
+package() {
+ cd "${srcdir}"/ffms-${pkgver}-src
+
+# Install
+ make DESTDIR="${pkgdir}" install
+
+# License
+ install -dm 755 "${pkgdir}"/usr/share/licenses/ffmpegsource
+ install -m 644 COPYING "${pkgdir}"/usr/share/licenses/ffmpegsource/LICENSE
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/community/ffmpegsource/autoconf.patch b/community/ffmpegsource/autoconf.patch
new file mode 100755
index 000000000..0420ad776
--- /dev/null
+++ b/community/ffmpegsource/autoconf.patch
@@ -0,0 +1,22 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -6,7 +6,7 @@ pkgconfig_DATA = ffms2.pc
+
+ dist_doc_DATA = doc/ffms2-api.html doc/ffms2-changelog.html doc/style.css
+
+-INCLUDES = -I. -I$(top_srcdir)/include -I$(top_srcdir)/src/config @LIBAV_CFLAGS@ @ZLIB_CPPFLAGS@ -include config.h
++AM_CPPFLAGS = -I. -I$(top_srcdir)/include -I$(top_srcdir)/src/config @LIBAV_CFLAGS@ @ZLIB_CPPFLAGS@ -include config.h
+
+ lib_LTLIBRARIES = src/core/libffms2.la
+ src_core_libffms2_la_LIBADD = @LIBAV_LIBS@ @ZLIB_LDFLAGS@ -lz @LTUNDEF@
+--- a/configure.in
++++ b/configure.in
+@@ -30,7 +30,7 @@ if test -z "$CXXFLAGS"; then
+ CXXFLAGS="$OPT_FLAGS"
+ fi
+
+-AM_CONFIG_HEADER([src/config/config.h])
++AC_CONFIG_HEADERS([src/config/config.h])
+ AC_PROG_CC
+ AC_PROG_CXX
+ LT_INIT([static disable-shared])
diff --git a/community/ffmpegsource/ffmpeg.patch b/community/ffmpegsource/ffmpeg.patch
new file mode 100755
index 000000000..71bf6aa2d
--- /dev/null
+++ b/community/ffmpegsource/ffmpeg.patch
@@ -0,0 +1,89 @@
+--- ffms-2.17-src.orig/configure.in
++++ ffms-2.17-src/configure.in
+@@ -135,7 +135,7 @@ AC_DEFUN([TEST_LIBAV],
+ #include <libavcodec/avcodec.h>
+ #include <libswscale/swscale.h>
+ ]],[[
+- avcodec_init();
++ av_register_all();
+ swscale_version();
+ #ifdef FFMS_USE_FFMPEG_COMPAT
+ int bogus = CODEC_ID_G2M;
+--- ffms-2.17-src.orig/include/ffmscompat.h
++++ ffms-2.17-src/include/ffmscompat.h
+@@ -84,6 +84,14 @@
+ # else
+ # define FFMS_CALCULATE_DELAY (CodecContext->has_b_frames + (CodecContext->thread_count - 1))
+ # endif
++# if VERSION_CHECK(LIBAVCODEC_VERSION_INT, <, 54, 25, 0, 54, 51, 100)
++# define FFMS_ID(x) (CODEC_ID_##x)
++# define FFMS_CodecID CodecID
++# else
++# define FFMS_ID(x) (AV_CODEC_ID_##x)
++# define FFMS_CodecID AVCodecID
++# undef CodecID
++# endif
+ #endif
+
+ #ifdef LIBAVUTIL_VERSION_INT
+--- ffms-2.17-src.orig/src/core/codectype.cpp
++++ ffms-2.17-src/src/core/codectype.cpp
+@@ -25,7 +25,7 @@
+
+ typedef struct CodecTags {
+ char str[20];
+- CodecID id;
++ FFMS_CodecID id;
+ } CodecTags;
+
+ static const CodecTags mkv_codec_tags[] = {
+@@ -92,7 +92,7 @@ static const CodecTags mkv_codec_tags[]
+ };
+
+ typedef struct AVCodecTag {
+- enum CodecID id;
++ enum FFMS_CodecID id;
+ unsigned int tag;
+ } AVCodecTag;
+
+@@ -400,7 +400,7 @@ const char *GetLAVCSampleFormatName(AVSa
+ }
+ }
+
+-CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC, unsigned int BitsPerSample) {
++FFMS_CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC, unsigned int BitsPerSample) {
+ /* Look up native codecs */
+ for(int i = 0; mkv_codec_tags[i].id != CODEC_ID_NONE; i++){
+ if(!strncmp(mkv_codec_tags[i].str, Codec,
+@@ -408,7 +408,7 @@ CodecID MatroskaToFFCodecID(char *Codec,
+
+ // Uncompressed and exotic format fixup
+ // This list is incomplete
+- CodecID CID = mkv_codec_tags[i].id;
++ FFMS_CodecID CID = mkv_codec_tags[i].id;
+ switch (CID) {
+ case CODEC_ID_PCM_S16LE:
+ switch (BitsPerSample) {
+--- ffms-2.17-src.orig/src/core/codectype.h
++++ ffms-2.17-src/src/core/codectype.h
+@@ -27,5 +27,5 @@ extern "C" {
+ #include "ffmscompat.h"
+
+ FFMS_TrackType HaaliTrackTypeToFFTrackType(int TT);
+-CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC = 0, unsigned int BitsPerSample = 0);
++FFMS_CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC = 0, unsigned int BitsPerSample = 0);
+ const char *GetLAVCSampleFormatName(AVSampleFormat s);
+--- ffms-2.17-src.orig/src/core/matroskaparser.h
++++ ffms-2.17-src/src/core/matroskaparser.h
+@@ -32,6 +32,11 @@
+ #ifndef MATROSKA_PARSER_H
+ #define MATROSKA_PARSER_H
+
++/* Make sure we undefine CodecID, since libavcodec defines it as AVCodec ID */
++#ifdef CodecID
++#undef CodecID
++#endif
++
+ /* Random notes:
+ *
+ * The parser does not process frame data in any way and does not read it into