diff options
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | ffmpeg-0.8.patch | 82 | ||||
-rw-r--r-- | neomorphs.patch | 23 | ||||
-rw-r--r-- | xextproto-7.1.1.patch | 11 | ||||
-rw-r--r-- | xvidcap-ffmpeg.patch | 105 |
6 files changed, 302 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..47c8c7e626a1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = xvidcap + pkgdesc = A small tool to capture things going on on an X-Windows display to either individual frames or an MPEG video + pkgver = 1.1.7 + pkgrel = 7 + url = http://xvidcap.sourceforge.net/ + arch = i686 + arch = x86_64 + license = GPL + makedepends = rarian + depends = dbus-glib + depends = lame + depends = libxmu + depends = libglade + depends = ffmpeg + source = http://downloads.sourceforge.net/xvidcap/xvidcap-1.1.7.tar.gz + source = xextproto-7.1.1.patch + source = xvidcap-ffmpeg.patch + source = neomorphs.patch + source = ffmpeg-0.8.patch + md5sums = b39a682d3ef9fcbf424af771936780e2 + md5sums = fbde2b076c5ea05723883b87f3ef2a65 + md5sums = f18817da1c0dada05fa791ae53193b2c + md5sums = 73533c0dd38c4d4de748417e6b6c7b38 + md5sums = 6e4dfab56b877362757092f55ad6b337 + +pkgname = xvidcap + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3ea1864b5531 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Christian Krause ("wookietreiber") <kizkizzbangbang@googlemail.com> + +# Contributor: der_FeniX <derfenix at derfenix dot com> +# Contributor: Thorsten Töpper <atsutane at freethoughts dot de> +# Contributor: Andrea Scarpino <andrea@archlinux.org> +# Contributor: red_over_blue, Abaddon <kukububu@go2.pl> +# Contributor: damir <damir@archlinux.org> + +pkgname=xvidcap +pkgver=1.1.7 +pkgrel=7 +pkgdesc="A small tool to capture things going on on an X-Windows display to either individual frames or an MPEG video" +arch=('i686' 'x86_64') +license=('GPL') +url="http://xvidcap.sourceforge.net/" +depends=('dbus-glib' 'lame' 'libxmu' 'libglade' 'ffmpeg') +makedepends=('rarian') +source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz" + "xextproto-7.1.1.patch" + "xvidcap-ffmpeg.patch" + "neomorphs.patch" + "ffmpeg-0.8.patch") +md5sums=('b39a682d3ef9fcbf424af771936780e2' + 'fbde2b076c5ea05723883b87f3ef2a65' + 'f18817da1c0dada05fa791ae53193b2c' + '73533c0dd38c4d4de748417e6b6c7b38' + '6e4dfab56b877362757092f55ad6b337') + +prepare() { + cd $srcdir/$pkgname-$pkgver + + patch -Np1 -i $srcdir/xextproto-7.1.1.patch + patch -Np0 -i $srcdir/xvidcap-ffmpeg.patch + patch -Np1 -i $srcdir/ffmpeg-0.8.patch + patch -Np1 -i $srcdir/neomorphs.patch +} + +build() { + cd $srcdir/$pkgname-$pkgver + + ./configure --prefix=/usr \ + --with-x \ + --with-gtk2 \ + --enable-libmp3lame \ + --without-forced-embedded-ffmpeg + + make +} + +package() { + cd $srcdir/$pkgname-$pkgver + + make prefix=$pkgdir/usr install +} diff --git a/ffmpeg-0.8.patch b/ffmpeg-0.8.patch new file mode 100644 index 000000000000..511333a0ffd9 --- /dev/null +++ b/ffmpeg-0.8.patch @@ -0,0 +1,82 @@ +diff -aur xvidcap-1.1.7/src/xtoffmpeg.c xvidcap-1.1.7.new/src/xtoffmpeg.c +--- xvidcap-1.1.7/src/xtoffmpeg.c 2008-05-25 22:01:54.000000000 +0000 ++++ xvidcap-1.1.7.new/src/xtoffmpeg.c 2011-10-31 20:41:08.259171263 +0000 +@@ -361,7 +361,7 @@ + } + // put sample parameters + au_c->codec_id = xvc_audio_codecs[job->au_targetCodec].ffmpeg_id; +- au_c->codec_type = CODEC_TYPE_AUDIO; ++ au_c->codec_type = AVMEDIA_TYPE_AUDIO; + au_c->bit_rate = target->sndsize; + au_c->sample_rate = target->sndrate; + au_c->channels = target->sndchannels; +@@ -567,7 +567,7 @@ + av_rescale_q (enc->coded_frame->pts, enc->time_base, + ost->st->time_base); + } +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + pkt.stream_index = ost->st->index; + + pkt.data = audio_out; +@@ -627,7 +627,7 @@ + pkt.pts = + av_rescale_q (enc->coded_frame->pts, enc->time_base, + ost->st->time_base); +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + av_interleaved_write_frame (s, &pkt); + } + +@@ -681,7 +681,7 @@ + if (ret <= 0) { + ret = avcodec_encode_audio (enc, bit_buffer, bit_buffer_size, NULL); + } +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + + if (samples) { + av_free (samples); +@@ -905,7 +905,7 @@ + ost->time_base); + } + if (enc->coded_frame->key_frame) +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + } + + pkt.stream_index = ost->index; +@@ -1157,7 +1157,7 @@ + } + + st->codec->codec_id = codec_id; +- st->codec->codec_type = CODEC_TYPE_VIDEO; ++ st->codec->codec_type = AVMEDIA_TYPE_VIDEO; + + // find the video encoder + codec = avcodec_find_encoder (st->codec->codec_id); +@@ -1439,13 +1439,13 @@ + // guess AVOutputFormat + if (job->target >= CAP_MF) + file_oformat = +- guess_format (xvc_formats[job->target].ffmpeg_name, NULL, NULL); ++ av_guess_format (xvc_formats[job->target].ffmpeg_name, NULL, NULL); + else { + char tmp_fn[30]; + + snprintf (tmp_fn, 29, "test-%%d.%s", + xvc_formats[job->target].extensions[0]); +- file_oformat = guess_format (NULL, tmp_fn, NULL); ++ file_oformat = av_guess_format (NULL, tmp_fn, NULL); + } + if (!file_oformat) { + fprintf (stderr, +@@ -1466,7 +1466,7 @@ + #endif // DEBUG + + // prepare AVFormatContext +- output_file = av_alloc_format_context (); ++ output_file = avformat_alloc_context(); + if (!output_file) { + fprintf (stderr, + _ diff --git a/neomorphs.patch b/neomorphs.patch new file mode 100644 index 000000000000..d885bd7b8c84 --- /dev/null +++ b/neomorphs.patch @@ -0,0 +1,23 @@ +diff -Naur xvidcap-1.1.7i-src/configure xvidcap-1.1.7/configure +--- xvidcap-1.1.7-src/configure 2008-07-09 09:28:25.000000000 +0200 ++++ xvidcap-1.1.7/configure 2012-07-08 13:19:46.702518044 +0200 +@@ -11,6 +11,8 @@ + ## M4sh Initialization. ## + ## --------------------- ## + ++LIBS="$LIBS -lX11 -lz -lXext" ++ + # Be more Bourne compatible + DUALCASE=1; export DUALCASE # for MKS sh + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +diff -Naur xvidcap-1.1.7-src/src/xvidcap-client-bindings.h xvidcap-1.1.7/src/xvidcap-client-bindings.h +--- xvidcap-1.1.7-src/src/xvidcap-client-bindings.h 2008-07-12 17:14:00.000000000 +0200 ++++ xvidcap-1.1.7/src/xvidcap-client-bindings.h 2012-07-08 13:20:07.339183772 +0200 +@@ -1,7 +1,6 @@ + /* Generated by dbus-binding-tool; do not edit! */ + +-#include <glib/gtypes.h> +-#include <glib/gerror.h> ++#include <glib.h> + #include <dbus/dbus-glib.h> + diff --git a/xextproto-7.1.1.patch b/xextproto-7.1.1.patch new file mode 100644 index 000000000000..b65da0ee7ce1 --- /dev/null +++ b/xextproto-7.1.1.patch @@ -0,0 +1,11 @@ +--- xvidcap-1.1.7/src/capture.c.orig 2008-05-26 02:01:53.000000000 +0400 ++++ xvidcap-1.1.7/src/capture.c 2009-12-12 00:12:31.368260518 +0300 +@@ -65,7 +65,7 @@ + #include <sys/ipc.h> + #include <sys/shm.h> + #include <X11/extensions/XShm.h> +-#include <X11/extensions/shmstr.h> ++#include <X11/extensions/shmproto.h> + #ifndef SOLARIS + #include <X11/extensions/extutil.h> + #endif // SOLARIS diff --git a/xvidcap-ffmpeg.patch b/xvidcap-ffmpeg.patch new file mode 100644 index 000000000000..3a74bf508bc8 --- /dev/null +++ b/xvidcap-ffmpeg.patch @@ -0,0 +1,105 @@ +Index: src/codecs.c +=================================================================== +--- src/codecs.c (revision 319) ++++ src/codecs.c (working copy) +@@ -43,8 +43,8 @@ + #include <locale.h> + + #ifdef USE_FFMPEG +-#include <ffmpeg/avcodec.h> +-#include <ffmpeg/avformat.h> ++#include <libavcodec/avcodec.h> ++#include <libavformat/avformat.h> + #endif // USE_FFMPEG + + #include "app_data.h" +Index: src/xtoffmpeg.c +=================================================================== +--- src/xtoffmpeg.c (revision 319) ++++ src/xtoffmpeg.c (working copy) +@@ -56,13 +56,13 @@ + #include "xvidcap-intl.h" + + // ffmpeg stuff +-#include <ffmpeg/avcodec.h> +-#include <ffmpeg/avformat.h> +-#include <ffmpeg/avdevice.h> ++#include <libavcodec/avcodec.h> ++#include <libavformat/avformat.h> ++#include <libavdevice/avdevice.h> + //#include <ffmpeg/dsputil.h> +-#include <ffmpeg/swscale.h> +-#include <ffmpeg/rgb2rgb.h> +-#include <ffmpeg/fifo.h> ++#include <libswscale/swscale.h> ++#include <libavutil/pixfmt.h> ++#include <libavutil/fifo.h> + #define swscale_isRGB(x) ((x)==PIX_FMT_BGR32 || (x)==PIX_FMT_RGB24 \ + || (x)==PIX_FMT_RGB565 || (x)==PIX_FMT_RGB555 \ + || (x)==PIX_FMT_RGB8 || (x)==PIX_FMT_RGB4 \ +@@ -96,9 +96,10 @@ + || (x)==PIX_FMT_YUVJ420P || (x)==PIX_FMT_YUVJ422P \ + || (x)==PIX_FMT_YUVJ444P) + +-#define PIX_FMT_ARGB32 PIX_FMT_RGBA32 /* this is just my personal +- * convenience */ ++#define PIX_FMT_ARGB32 PIX_FMT_RGB32 /* this is just my personal ++ * convenience */ + ++ + /* + * file globals + */ +@@ -1248,7 +1249,11 @@ + st->codec->flags |= CODEC_FLAG2_FAST; + // there is no trellis quantiser in libav* for mjpeg + if (st->codec->codec_id != CODEC_ID_MJPEG) ++#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) + st->codec->flags |= CODEC_FLAG_TRELLIS_QUANT; ++#else ++ st->codec->trellis = 1; ++#endif + st->codec->flags &= ~CODEC_FLAG_OBMC; + // some formats want stream headers to be seperate + if (oc->oformat->flags & AVFMT_GLOBALHEADER) +@@ -1498,11 +1503,10 @@ + // add the video stream and initialize the codecs + // + // prepare stream +- out_st = +- add_video_stream (output_file, image, +- (input_pixfmt == +- PIX_FMT_PAL8 ? PIX_FMT_RGB24 : input_pixfmt), +- xvc_codecs[job->targetCodec].ffmpeg_id, job); ++ fprintf(stderr, "The current pixfmt is %d, but the choosen one is %d\n", input_pixfmt, (input_pixfmt == PIX_FMT_PAL8 ? PIX_FMT_RGB24 : input_pixfmt)); ++ out_st = add_video_stream (output_file, image, ++ (input_pixfmt == PIX_FMT_PAL8 ? PIX_FMT_RGB24 : input_pixfmt), ++ xvc_codecs[job->targetCodec].ffmpeg_id, job); + + // FIXME: set params + // memset (p_fParams, 0, sizeof(*p_fParams)); +Index: src/main.c +=================================================================== +--- src/main.c (revision 319) ++++ src/main.c (working copy) +@@ -45,7 +45,7 @@ + #include <locale.h> + + #ifdef USE_FFMPEG +-#include <ffmpeg/avcodec.h> ++#include <libavcodec/avcodec.h> + #endif // USE_FFMPEG + + #include "control.h" +@@ -217,9 +217,6 @@ + + if (app) + xvc_appdata_free (app); +-#ifdef USE_FFMPEG +- av_free_static (); +-#endif + } + + /** + + |