summaryrefslogtreecommitdiff
path: root/community-testing/xvidcap
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-11-06 23:15:07 +0000
committerroot <root@rshg054.dnsready.net>2011-11-06 23:15:07 +0000
commita4d309341dbcd3c28ee68e818c1d5ef54114adf8 (patch)
treed8b088a03f5cb2b56b2b7508933b4efcfd67f0b2 /community-testing/xvidcap
parent82fd7f658509afe9737e14e8d1ee9fefe13c9d1f (diff)
Sun Nov 6 23:15:07 UTC 2011
Diffstat (limited to 'community-testing/xvidcap')
-rw-r--r--community-testing/xvidcap/PKGBUILD50
-rw-r--r--community-testing/xvidcap/ffmpeg-0.8.patch82
-rw-r--r--community-testing/xvidcap/xextproto-7.1.1.patch11
-rw-r--r--community-testing/xvidcap/xvidcap-ffmpeg.patch105
4 files changed, 248 insertions, 0 deletions
diff --git a/community-testing/xvidcap/PKGBUILD b/community-testing/xvidcap/PKGBUILD
new file mode 100644
index 000000000..6d68a48a9
--- /dev/null
+++ b/community-testing/xvidcap/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 63169 2010-01-15 14:58:38Z giovanni $
+# Maintainer: 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=4
+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' 'dbus')
+makedepends=('perlxml' 'rarian')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ 'xextproto-7.1.1.patch'
+ 'xvidcap-ffmpeg.patch'
+ 'ffmpeg-0.8.patch')
+md5sums=('b39a682d3ef9fcbf424af771936780e2'
+ 'fbde2b076c5ea05723883b87f3ef2a65'
+ 'f18817da1c0dada05fa791ae53193b2c')
+
+build() {
+ 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
+
+ ./configure --prefix=/usr \
+ --with-x \
+ --with-gtk2 \
+ --enable-libmp3lame \
+ --without-forced-embedded-ffmpeg
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make prefix=${pkgdir}/usr install
+}
+md5sums=('b39a682d3ef9fcbf424af771936780e2'
+ 'fbde2b076c5ea05723883b87f3ef2a65'
+ 'f18817da1c0dada05fa791ae53193b2c'
+ '36ead5f0345ae776601d49c1c90cb101')
+md5sums=('b39a682d3ef9fcbf424af771936780e2'
+ 'fbde2b076c5ea05723883b87f3ef2a65'
+ 'f18817da1c0dada05fa791ae53193b2c'
+ '6e4dfab56b877362757092f55ad6b337')
diff --git a/community-testing/xvidcap/ffmpeg-0.8.patch b/community-testing/xvidcap/ffmpeg-0.8.patch
new file mode 100644
index 000000000..511333a0f
--- /dev/null
+++ b/community-testing/xvidcap/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/community-testing/xvidcap/xextproto-7.1.1.patch b/community-testing/xvidcap/xextproto-7.1.1.patch
new file mode 100644
index 000000000..b65da0ee7
--- /dev/null
+++ b/community-testing/xvidcap/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/community-testing/xvidcap/xvidcap-ffmpeg.patch b/community-testing/xvidcap/xvidcap-ffmpeg.patch
new file mode 100644
index 000000000..3a74bf508
--- /dev/null
+++ b/community-testing/xvidcap/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
+ }
+
+ /**
+
+