summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Pawlik <nelchael@gentoo.org>2006-02-14 11:21:48 +0000
committerKrzysztof Pawlik <nelchael@gentoo.org>2006-02-14 11:21:48 +0000
commit65044261486bf42b220a901877062e6aee6145e4 (patch)
tree23b74c92afb4d0c3ae96e9794f92a222f8c38aa9 /x11-misc
parentStable on x86, bug #112942. (diff)
downloadhistorical-65044261486bf42b220a901877062e6aee6145e4.tar.gz
historical-65044261486bf42b220a901877062e6aee6145e4.tar.bz2
historical-65044261486bf42b220a901877062e6aee6145e4.zip
Re-enabled audio capture, see bug #122592.
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/xvidcap/ChangeLog10
-rw-r--r--x11-misc/xvidcap/Manifest18
-rw-r--r--x11-misc/xvidcap/files/digest-xvidcap-1.1.3-r43
-rw-r--r--x11-misc/xvidcap/files/xvidcap-1.1.3-configure.patch12
-rw-r--r--x11-misc/xvidcap/files/xvidcap-1.1.3-ffmpeg.patch263
-rw-r--r--x11-misc/xvidcap/xvidcap-1.1.3-r4.ebuild75
6 files changed, 377 insertions, 4 deletions
diff --git a/x11-misc/xvidcap/ChangeLog b/x11-misc/xvidcap/ChangeLog
index 1964daab6b11..269e34c2bf6c 100644
--- a/x11-misc/xvidcap/ChangeLog
+++ b/x11-misc/xvidcap/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for x11-misc/xvidcap
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/xvidcap/ChangeLog,v 1.18 2006/02/11 00:20:27 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xvidcap/ChangeLog,v 1.19 2006/02/14 11:21:48 nelchael Exp $
+
+*xvidcap-1.1.3-r4 (14 Feb 2006)
+
+ 14 Feb 2006; Krzysiek Pawlik <nelchael@gentoo.org>
+ +files/xvidcap-1.1.3-configure.patch, +files/xvidcap-1.1.3-ffmpeg.patch,
+ +xvidcap-1.1.3-r4.ebuild:
+ Re-enabled audio capture - patches by Clemens Fruhwirth
+ <clemens@endorphin.org>, see bug #122592.
*xvidcap-1.1.3-r3 (11 Feb 2006)
diff --git a/x11-misc/xvidcap/Manifest b/x11-misc/xvidcap/Manifest
index 2ef1b409b70c..718403b60313 100644
--- a/x11-misc/xvidcap/Manifest
+++ b/x11-misc/xvidcap/Manifest
@@ -1,12 +1,21 @@
-MD5 62c4f704688dcbca3f4acd03c8dfc40d ChangeLog 2374
-RMD160 fed26a20ff1084619a85d14b49a22208a24d969a ChangeLog 2374
-SHA256 c1f0aeaaee727155245a008d1d6b2657bcf8314729164daddd1a9bb7aac1b220 ChangeLog 2374
+MD5 7d010914d33cde80debe13c57c01a0ce ChangeLog 2666
+RMD160 2b3573079cf15a8ac11b0fe2b8e13b5fc0bb64b3 ChangeLog 2666
+SHA256 a0852d8fc6bcc6f4eda2b61e2ee4e1b9c2665ff0595355733fa7a53c13711c03 ChangeLog 2666
MD5 047783d7053abeeba8c83d8590183f23 files/digest-xvidcap-1.1.3-r3 244
RMD160 1f84bd94f681f4899e4cf56421a45ad4c4f0526a files/digest-xvidcap-1.1.3-r3 244
SHA256 1dfe82776b2d19a1c55db1e413f5ae9ea5bf74e2f36c1049df7a0f7145aed759 files/digest-xvidcap-1.1.3-r3 244
+MD5 047783d7053abeeba8c83d8590183f23 files/digest-xvidcap-1.1.3-r4 244
+RMD160 1f84bd94f681f4899e4cf56421a45ad4c4f0526a files/digest-xvidcap-1.1.3-r4 244
+SHA256 1dfe82776b2d19a1c55db1e413f5ae9ea5bf74e2f36c1049df7a0f7145aed759 files/digest-xvidcap-1.1.3-r4 244
MD5 2d4c4432c7e3f9aa7bbd67a806429c07 files/xvidcap-1.1.3-alpha_mask.patch 429
RMD160 12e6fcdc2548b44abf5df895eee58d48ffda6951 files/xvidcap-1.1.3-alpha_mask.patch 429
SHA256 0df34b4351c2ef70d93243ff15feb7608831a6a9841195559d9c096d809eafd0 files/xvidcap-1.1.3-alpha_mask.patch 429
+MD5 c1882a14a3c4a67c4bc06199bbb6db23 files/xvidcap-1.1.3-configure.patch 919
+RMD160 189a581c1a9b694bc91bc346fa36149b1d778987 files/xvidcap-1.1.3-configure.patch 919
+SHA256 e4d281b44dbc56e6bba35a967da85ce86a6693df377377b8a626790c72641d05 files/xvidcap-1.1.3-configure.patch 919
+MD5 6ff5f30ca8c8480a4ffe30b25e690582 files/xvidcap-1.1.3-ffmpeg.patch 11667
+RMD160 547f9ab1df409d40e993cc86f7458bc7b345c2e5 files/xvidcap-1.1.3-ffmpeg.patch 11667
+SHA256 3129454b81b5b89262d6d085c3ada77c65a416d617e21a54907935cd7b4a6071 files/xvidcap-1.1.3-ffmpeg.patch 11667
MD5 093c63bdced794db036ee6ea29df14bd files/xvidcap-1.1.3-new-ffmpeg.patch 2200
RMD160 f69090e799a8807cc5cf8d6681ea512382275484 files/xvidcap-1.1.3-new-ffmpeg.patch 2200
SHA256 2d9b1f76414824ae1f78ae76dcf56d785df887d29ae90664172380ecdae76734 files/xvidcap-1.1.3-new-ffmpeg.patch 2200
@@ -19,3 +28,6 @@ SHA256 8e7de0a7f7c15840474de373a3ce36adcc5dd658b2e4d18366fcb63b964a0826 metadata
MD5 1f9ac29f9b19a1a16f8ff98eca4051e4 xvidcap-1.1.3-r3.ebuild 1442
RMD160 ff1bd9f3b6a3f641e6869c69b8987256302d5363 xvidcap-1.1.3-r3.ebuild 1442
SHA256 3b7e84702ff681dc6ee1fa4e70e3147bd8cfb9275972c75fd5a61511e7fc72f3 xvidcap-1.1.3-r3.ebuild 1442
+MD5 79d61f78c86403aed7c32f1e066966e1 xvidcap-1.1.3-r4.ebuild 1502
+RMD160 89013f155eab620153963a05a6ce6a9cb56d1590 xvidcap-1.1.3-r4.ebuild 1502
+SHA256 16cf6794510b7681ae86f2b708bb1c02979a16228a6896e538a4d6e4e052fc1f xvidcap-1.1.3-r4.ebuild 1502
diff --git a/x11-misc/xvidcap/files/digest-xvidcap-1.1.3-r4 b/x11-misc/xvidcap/files/digest-xvidcap-1.1.3-r4
new file mode 100644
index 000000000000..e37fe8e3fca0
--- /dev/null
+++ b/x11-misc/xvidcap/files/digest-xvidcap-1.1.3-r4
@@ -0,0 +1,3 @@
+MD5 ea896ffd35d6fe6d2abf51b38605f5fd xvidcap-1.1.3.tar.gz 1627036
+RMD160 cc7be360153f192b502ffedc6548cce163a9154c xvidcap-1.1.3.tar.gz 1627036
+SHA256 21909257a46f67f37a6b3eedda5023490bf1e02946ae7c56d4b6f782087013d7 xvidcap-1.1.3.tar.gz 1627036
diff --git a/x11-misc/xvidcap/files/xvidcap-1.1.3-configure.patch b/x11-misc/xvidcap/files/xvidcap-1.1.3-configure.patch
new file mode 100644
index 000000000000..4864124e93fb
--- /dev/null
+++ b/x11-misc/xvidcap/files/xvidcap-1.1.3-configure.patch
@@ -0,0 +1,12 @@
+diff -Nru xvidcap-1.1.3.vanilla/configure.ac xvidcap-1.1.3/configure.ac
+--- xvidcap-1.1.3.vanilla/configure.ac 2004-02-14 15:29:20.000000000 +0100
++++ xvidcap-1.1.3/configure.ac 2006-02-14 11:47:05.000000000 +0100
+@@ -213,7 +213,7 @@
+ #check for audio suport in FFMPEG
+ if ( test x${ac_cv_lib_avformat_avienc_init} = xyes ) ; then
+ test x`(uname -s)` = xSunOS && ac_my_avformat_libs="-lnsl -lsocket"
+- AC_CHECK_LIB_STATIC(avformat, audio_init,[ac_my_have_ffmpeg_audio="1"],[unset ac_cv_lib_avformat_audio_open ; AC_CHECK_LIB(avformat, audio_init,[ac_my_have_ffmpeg_audio="1"],[ac_my_have_ffmpeg_audio="0"],[$ac_my_avformat_libs])],[$ac_my_avformat_libs])
++ AC_CHECK_LIB_STATIC(avformat, audio_init,[ac_my_have_ffmpeg_audio="1"],[unset ac_cv_lib_avformat_audio_init ; AC_CHECK_LIB(avformat, audio_init,[ac_my_have_ffmpeg_audio="1"],[ac_my_have_ffmpeg_audio="0"],[$ac_my_avformat_libs])],[$ac_my_avformat_libs])
+ fi
+
+
diff --git a/x11-misc/xvidcap/files/xvidcap-1.1.3-ffmpeg.patch b/x11-misc/xvidcap/files/xvidcap-1.1.3-ffmpeg.patch
new file mode 100644
index 000000000000..36d390e8d4ff
--- /dev/null
+++ b/x11-misc/xvidcap/files/xvidcap-1.1.3-ffmpeg.patch
@@ -0,0 +1,263 @@
+--- xvidcap-1.1.3/src/xtoffmpeg.c 2004-02-15 20:00:54.000000000 +0100
++++ xtoffmpeg.c 2006-02-12 20:21:13.000000000 +0100
+@@ -164,14 +164,14 @@
+ if (!audio_buf || !audio_out)
+ return; /* Should signal an error ! */
+
+- enc = &ost->st->codec;
++ enc = ost->st->codec;
+
+ // resampling is only used for pipe input here
+ if (ost->audio_resample) {
+ buftmp = audio_buf;
+ size_out = audio_resample (ost->resample,
+ (short *)buftmp, (short *)buf,
+- size / (ist->st->codec.channels * 2));
++ size / (ist->st->codec->channels * 2));
+ size_out = size_out * enc->channels * 2;
+ } else {
+ buftmp = buf;
+@@ -191,13 +191,18 @@
+ ret = avcodec_encode_audio (enc, audio_out, audio_out_size,
+ (short *)audio_buf);
+
+-// audio_pts = (double)au_out_st->st->pts.val * output_file->pts_num / output_file->pts_den;
+-// video_pts = (double)out_st->pts.val * output_file->pts_num / output_file->pts_den;
++ // audio_pts = (double)au_out->st->pts.val * au_out->st->pts.num / au_out->st->pts.den;
++ // video_pts = (double)out->st->pts.val * out->st->pts.num / out->st->pts.den;
+
+ // if ( audio_pts < video_pts && pthread_mutex_trylock (&mp) == 0 ) {
+ if ( pthread_mutex_trylock (&mp) == 0 ) {
+- /* write the compressed frame in the media file */
+- if (av_write_frame (s, ost->st->index, audio_out, ret) != 0) {
++ /* write the compressed frame in the media file */
++ AVPacket _pkt, *pkt = &_pkt;
++ av_init_packet (pkt);
++ pkt->stream_index = ost->st->index;
++ pkt->data = audio_out;
++ pkt->size = ret;
++ if (av_write_frame (output_file, pkt) != 0) {
+ fprintf (stderr, "Error while writing audio frame\n");
+ exit (1);
+ }
+@@ -269,23 +274,22 @@
+ //FIXME: this needs to get more sophisticated for pausing efficiently ...
+ if (job->state == VC_REC ) {
+
+- audio_pts = (double)au_out_st->st->pts.val * output_file->pts_num / output_file->pts_den;
+- video_pts = (double)out_st->pts.val * output_file->pts_num / output_file->pts_den;
++ //audio_pts = (double)au_out_st->st->pts.val * output_file->pts_num / output_file->pts_den;
++ // video_pts = (double)out_st->pts.val * output_file->pts_num / output_file->pts_den;
++ audio_pts = 0; video_pts = 1;
+
+ if ( audio_pts < video_pts ) {
+-
+-
+- /* read a packet from it and output it in the fifo */
+- if (av_read_packet (ic, &pkt) < 0) {
++ /* read a packet from it and output it in the fifo */
++ if (av_read_packet (ic, &pkt) < 0) {
+ fprintf (stderr, "error reading audio packet\n");
+- } else {
++ } else {
+ // printf ("input stream #%d, size=%d:\n", pkt.stream_index, pkt.size);
+ // av_hex_dump(pkt.data, pkt.size);
+- }
+-
+- len = pkt.size;
+- ptr = pkt.data;
+- while (len > 0) {
++ }
++
++ len = pkt.size;
++ ptr = pkt.data;
++ while (len > 0) {
+ /* decode the packet if needed */
+ data_buf = NULL; /* fail safe */
+ data_size = 0;
+@@ -311,8 +315,8 @@
+
+ /* XXX: could avoid copy if PCM 16 bits with same
+ endianness as CPU */
+- retval = avcodec_decode_audio (&au_in_st->st->codec, samples, &data_size,
+- ptr, len);
++ retval = avcodec_decode_audio (au_in_st->st->codec, samples, &data_size,
++ ptr, len);
+ if (retval < 0) {
+ fprintf (stderr, "couldn't decode captured audio packet\n");
+ break;
+@@ -342,11 +346,11 @@
+ au_in_st->frame_decoded = 1;
+
+ do_audio_out (output_file, au_out_st, au_in_st, data_buf, data_size);
+-
+- }
+- // discard packet
+- av_free_packet (&pkt);
+-
++
++ }
++ // discard packet
++ av_free_packet (&pkt);
++
+ } // end if pts ...
+ } // end if VC_REC
+ // get end time
+@@ -682,7 +686,7 @@
+ exit (1);
+ }
+
+- c = &out_st->codec;
++ c = out_st->codec;
+ c->codec_id = transCodec;
+ c->codec_type = CODEC_TYPE_VIDEO;
+
+@@ -696,8 +700,10 @@
+ #endif /* DEBUG */
+
+ /* frames per second */
+- c->frame_rate = job->fps;
+- c->frame_rate_base = 1;
++ /*c->frame_rate = job->fps;
++ c->frame_rate_base = 1;*/
++ c->time_base.den = job->fps * 1000;
++ c->time_base.num = 1000;
+ c->gop_size = 250; /* emit one intra frame every 10 frames */
+ // c->me_method = ME_EPZS;
+ // c->debug = 0x00000FFF;
+@@ -707,10 +713,13 @@
+ */
+ memset (p_fParams, 0, sizeof(*p_fParams));
+ p_fParams->image_format = image_format;
+- p_fParams->frame_rate = out_st->codec.frame_rate;
++ /*p_fParams->frame_rate = out_st->codec.frame_rate;
+ p_fParams->frame_rate_base = out_st->codec.frame_rate_base;
+ p_fParams->width = out_st->codec.width;
+- p_fParams->height = out_st->codec.height;
++ p_fParams->height = out_st->codec.height;*/
++ p_fParams->time_base = out_st->codec->time_base;
++ p_fParams->width = out_st->codec->width;
++ p_fParams->height = out_st->codec->height;
+ if (av_set_parameters (output_file, p_fParams) < 0) {
+ // if (av_set_parameters(output_file, NULL) < 0) {
+ fprintf (stderr, "xtoffmpeg.XImageToFFMPEG(): Invalid encoding parameters ... aborting\n");
+@@ -720,7 +729,8 @@
+ /*
+ * open codec
+ */
+- c = &out_st->codec;
++ c = out_st->codec;
++ c->pix_fmt = PIX_FMT_YUV420P;
+
+ /* find the video encoder */
+ codec = avcodec_find_encoder (c->codec_id);
+@@ -822,7 +832,8 @@
+ fprintf (stderr, "Could not alloc stream\n");
+ exit (1);
+ }
+- au_out_st->st->codec = *au_c;
++
++ au_out_st->st->codec = au_c;
+
+ if (fifo_init (&au_out_st->fifo, 2 * MAX_AUDIO_PACKET_SIZE)) {
+ fprintf (stderr, "Can't initialize fifo for audio recording\n");
+@@ -837,22 +848,22 @@
+ // Once we get support for dubbing from a pipe or a different
+ // file, we might have different sample rates or no of channels
+ // in the input file.....
+- if (au_c->channels == au_in_st->st->codec.channels &&
+- au_c->sample_rate == au_in_st->st->codec.sample_rate) {
++ if (au_c->channels == au_in_st->st->codec->channels &&
++ au_c->sample_rate == au_in_st->st->codec->sample_rate) {
+ au_out_st->audio_resample = 0;
+ } else {
+- if (au_c->channels != au_in_st->st->codec.channels &&
+- au_in_st->st->codec.codec_id == CODEC_ID_AC3) {
++ if (au_c->channels != au_in_st->st->codec->channels &&
++ au_in_st->st->codec->codec_id == CODEC_ID_AC3) {
+ /* Special case for 5:1 AC3 input */
+ /* and mono or stereo output */
+ /* Request specific number of channels */
+- au_in_st->st->codec.channels = au_c->channels;
+- if (au_c->sample_rate == au_in_st->st->codec.sample_rate)
++ au_in_st->st->codec->channels = au_c->channels;
++ if (au_c->sample_rate == au_in_st->st->codec->sample_rate)
+ au_out_st->audio_resample = 0;
+ else {
+ au_out_st->audio_resample = 1;
+- au_out_st->resample = audio_resample_init (au_c->channels, au_in_st->st->codec.channels,
+- au_c->sample_rate, au_in_st->st->codec.sample_rate);
++ au_out_st->resample = audio_resample_init (au_c->channels, au_in_st->st->codec->channels,
++ au_c->sample_rate, au_in_st->st->codec->sample_rate);
+ if(!au_out_st->resample) {
+ printf ("Can't resample. Aborting.\n");
+ exit (1);
+@@ -860,11 +871,11 @@
+ }
+ }
+ /* Request specific number of channels */
+- au_in_st->st->codec.channels = au_c->channels;
++ au_in_st->st->codec->channels = au_c->channels;
+ } else {
+ au_out_st->audio_resample = 1;
+- au_out_st->resample = audio_resample_init (au_c->channels, au_in_st->st->codec.channels,
+- au_c->sample_rate, au_in_st->st->codec.sample_rate);
++ au_out_st->resample = audio_resample_init (au_c->channels, au_in_st->st->codec->channels,
++ au_c->sample_rate, au_in_st->st->codec->sample_rate);
+ if(!au_out_st->resample) {
+ printf ("Can't resample. Aborting.\n");
+ exit (1);
+@@ -876,19 +887,19 @@
+ au_out_st->encoding_needed = 1;
+
+ // open encoder
+- au_codec = avcodec_find_encoder (au_out_st->st->codec.codec_id);
+- if (avcodec_open (&au_out_st->st->codec, au_codec) < 0) {
++ au_codec = avcodec_find_encoder (au_out_st->st->codec->codec_id);
++ if (avcodec_open (au_out_st->st->codec, au_codec) < 0) {
+ fprintf (stderr, "Error while opening codec for output stream\n");
+ exit (1);
+ }
+
+ // open decoder
+- au_codec = avcodec_find_decoder (ic->streams[0]->codec.codec_id);
++ au_codec = avcodec_find_decoder (ic->streams[0]->codec->codec_id);
+ if (!au_codec) {
+ fprintf (stderr, "Unsupported codec (id=%d) for input stream\n");
+ exit (1);
+ }
+- if (avcodec_open (&ic->streams[0]->codec, au_codec) < 0) {
++ if (avcodec_open (ic->streams[0]->codec, au_codec) < 0) {
+ fprintf (stderr, "Error while opening codec for input stream\n");
+ exit (1);
+ }
+@@ -1112,12 +1123,17 @@
+ exit (1);
+ }
+ // the following bit is for synching audio and video streams ...
+- audio_pts = (double)au_out_st->st->pts.val * output_file->pts_num / output_file->pts_den;
+- video_pts = (double)out_st->pts.val * output_file->pts_num / output_file->pts_den;
++ // audio_pts = (double)au_out_st->st->pts.val * output_file->pts_num / output_file->pts_den;
++ // video_pts = (double)out_st->pts.val * output_file->pts_num / output_file->pts_den;
+ }
+ #endif // HAVE_FFMPEG_AUDIO
+ /* write frame to file */
+- av_write_frame (output_file, out_st->index, outbuf, out_size);
++ AVPacket _pkt, *pkt = &_pkt;
++ av_init_packet (pkt);
++ pkt->stream_index = out_st->index;
++ pkt->data = outbuf;
++ pkt->size = out_size;
++ av_write_frame (output_file, pkt);
+ #ifdef HAVE_FFMPEG_AUDIO
+ /* release the mutex */
+ if (job->flags & FLG_AUDIO_WANTED) {
+@@ -1154,7 +1170,7 @@
+ #endif // HAVE_FFMPEG_AUDIO
+
+ if (out_st) {
+- avcodec_close (&out_st->codec);
++ avcodec_close (out_st->codec);
+ out_st = NULL;
+ }
+
diff --git a/x11-misc/xvidcap/xvidcap-1.1.3-r4.ebuild b/x11-misc/xvidcap/xvidcap-1.1.3-r4.ebuild
new file mode 100644
index 000000000000..4b5a22746521
--- /dev/null
+++ b/x11-misc/xvidcap/xvidcap-1.1.3-r4.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xvidcap/xvidcap-1.1.3-r4.ebuild,v 1.1 2006/02/14 11:21:48 nelchael Exp $
+
+inherit eutils autotools
+
+IUSE="gtk"
+
+DESCRIPTION="Screen capture utility enabling you to create videos of your desktop for illustration or documentation purposes."
+HOMEPAGE="http://xvidcap.sourceforge.net/"
+SRC_URI="mirror://sourceforge/xvidcap/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~ppc ~x86"
+LICENSE="GPL-2"
+
+RDEPEND="gtk? ( >=x11-libs/gtk+-2.0.0 )
+ >=media-video/ffmpeg-0.4.9_pre1
+ media-libs/libpng
+ media-libs/jpeg
+ sys-libs/zlib
+ !gtk? (
+ || ( (
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-libs/libXext )
+ virtual/x11 )
+ )"
+
+DEPEND="${RDEPEND}
+ !gtk2? (
+ || ( (
+ x11-proto/xextproto
+ x11-proto/xf86dgaproto
+ x11-proto/videoproto
+ x11-proto/xproto )
+ virtual/x11 )
+ )"
+
+SLOT="0"
+
+src_unpack() {
+
+ unpack "${A}"
+ cd "${S}"
+
+ # Fix bug #62741 and bug #115675:
+ epatch "${FILESDIR}/${P}-ffmpeg.patch"
+
+ # Fix bug #120551:
+ epatch "${FILESDIR}/${P}-alpha_mask.patch"
+
+ # Fix broken configure (bug #122592):
+ epatch "${FILESDIR}/${P}-configure.patch"
+
+ eautoreconf
+
+}
+
+src_compile() {
+
+ econf `use_with gtk gtk2` || die "Configuration failed"
+ emake || die "Compilation failed"
+
+}
+
+src_install() {
+
+ einstall || die "Installation failed"
+
+ # Fix for #58322
+ rm -fr ${D}/usr/share/doc/${PN}_${PV}
+ dodoc NEWS TODO README AUTHORS ChangeLog XVidcap.ad
+
+}