From 600d5378dadf22b8517d52ac19500594bce4b66d Mon Sep 17 00:00:00 2001 From: root Date: Sun, 13 Nov 2011 23:14:59 +0000 Subject: Sun Nov 13 23:14:59 UTC 2011 --- community/xvidcap/PKGBUILD | 23 ++++++++--- community/xvidcap/ffmpeg-0.8.patch | 82 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 community/xvidcap/ffmpeg-0.8.patch (limited to 'community/xvidcap') diff --git a/community/xvidcap/PKGBUILD b/community/xvidcap/PKGBUILD index 476d1d192..6d68a48a9 100644 --- a/community/xvidcap/PKGBUILD +++ b/community/xvidcap/PKGBUILD @@ -6,7 +6,7 @@ pkgname=xvidcap pkgver=1.1.7 -pkgrel=3 +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') @@ -15,7 +15,8 @@ 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') + 'xvidcap-ffmpeg.patch' + 'ffmpeg-0.8.patch') md5sums=('b39a682d3ef9fcbf424af771936780e2' 'fbde2b076c5ea05723883b87f3ef2a65' 'f18817da1c0dada05fa791ae53193b2c') @@ -24,14 +25,26 @@ build() { cd ${srcdir}/${pkgname}-${pkgver} patch -Np1 -i ${srcdir}/xextproto-7.1.1.patch - patch -Np0 -i ${srcdir}/xvidcap-ffmpeg.patch || return 1 + 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 || return 1 - make prefix=${pkgdir}/usr install || return 1 + 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/xvidcap/ffmpeg-0.8.patch b/community/xvidcap/ffmpeg-0.8.patch new file mode 100644 index 000000000..511333a0f --- /dev/null +++ b/community/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, + _ -- cgit v1.2.3-54-g00ecf