diff options
author | Alexis Ballier <aballier@gentoo.org> | 2011-04-27 18:08:01 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2011-04-27 18:08:01 +0000 |
commit | 3806402ba5777aa62d28bf00f229ea320b28c2af (patch) | |
tree | a768d31d424f635e32920924ea9958be9adadef8 /media-video/cinelerra | |
parent | Marked ~m68k-mint, bug #364787 (diff) | |
download | gentoo-2-3806402ba5777aa62d28bf00f229ea320b28c2af.tar.gz gentoo-2-3806402ba5777aa62d28bf00f229ea320b28c2af.tar.bz2 gentoo-2-3806402ba5777aa62d28bf00f229ea320b28c2af.zip |
fix build with latest linux headers (ie: drop v4l1 support), bug #361709; fix build with ffmpeg/libav trunk, convert to virtual/ffmpeg
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
Diffstat (limited to 'media-video/cinelerra')
-rw-r--r-- | media-video/cinelerra/ChangeLog | 9 | ||||
-rw-r--r-- | media-video/cinelerra/cinelerra-20101104.ebuild | 8 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-ffmpeg.patch | 76 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-v4l1_removal.patch | 125 |
4 files changed, 213 insertions, 5 deletions
diff --git a/media-video/cinelerra/ChangeLog b/media-video/cinelerra/ChangeLog index 869d31ebae3b..92743394f5fd 100644 --- a/media-video/cinelerra/ChangeLog +++ b/media-video/cinelerra/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-video/cinelerra -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra/ChangeLog,v 1.46 2010/11/04 00:24:46 ssuominen Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra/ChangeLog,v 1.47 2011/04/27 18:08:01 aballier Exp $ + + 27 Apr 2011; Alexis Ballier <aballier@gentoo.org> cinelerra-20101104.ebuild, + +files/cinelerra-ffmpeg.patch, +files/cinelerra-v4l1_removal.patch: + fix build with latest linux headers (ie: drop v4l1 support), bug #361709; fix + build with ffmpeg/libav trunk, convert to virtual/ffmpeg *cinelerra-20101104 (04 Nov 2010) diff --git a/media-video/cinelerra/cinelerra-20101104.ebuild b/media-video/cinelerra/cinelerra-20101104.ebuild index f097524484b8..c8a8025dae82 100644 --- a/media-video/cinelerra/cinelerra-20101104.ebuild +++ b/media-video/cinelerra/cinelerra-20101104.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra/cinelerra-20101104.ebuild,v 1.3 2010/11/04 11:56:44 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra/cinelerra-20101104.ebuild,v 1.4 2011/04/27 18:08:01 aballier Exp $ EAPI=3 inherit autotools eutils multilib flag-o-matic @@ -21,7 +21,7 @@ RDEPEND=">=media-libs/libpng-1.4.0 media-libs/a52dec media-libs/libsndfile media-libs/tiff - media-video/ffmpeg + virtual/ffmpeg media-sound/lame >=sci-libs/fftw-3.0.1 media-libs/x264 @@ -49,6 +49,8 @@ DEPEND="${RDEPEND} mmx? ( dev-lang/nasm )" src_prepare() { + epatch "${FILESDIR}/${PN}-v4l1_removal.patch" \ + "${FILESDIR}/${PN}-ffmpeg.patch" AT_M4DIR="m4" eautoreconf } diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg.patch b/media-video/cinelerra/files/cinelerra-ffmpeg.patch new file mode 100644 index 000000000000..6f7962fb1a54 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-ffmpeg.patch @@ -0,0 +1,76 @@ +Fix build with ffmpeg/libav trunk / 0.7 + +Index: cinelerra-20101104/cinelerra/ffmpeg.C +=================================================================== +--- cinelerra-20101104.orig/cinelerra/ffmpeg.C ++++ cinelerra-20101104/cinelerra/ffmpeg.C +@@ -364,12 +364,15 @@ int FFMPEG::decode(uint8_t *data, long d + + // NOTE: frame must already have data space allocated + ++ AVPacket pkt; + got_picture = 0; +- int length = avcodec_decode_video(context, ++ av_init_packet( &pkt ); ++ pkt.data = data; ++ pkt.size = data_size; ++ int length = avcodec_decode_video2(context, + picture, + &got_picture, +- data, +- data_size); ++ &pkt); + + if (length < 0) { + printf("FFMPEG::decode error decoding frame\n"); +Index: cinelerra-20101104/quicktime/qtffmpeg.c +=================================================================== +--- cinelerra-20101104.orig/quicktime/qtffmpeg.c ++++ cinelerra-20101104/quicktime/qtffmpeg.c +@@ -181,6 +181,7 @@ static int decode_wrapper(quicktime_t *f + + if(!result) + { ++ AVPacket pkt; + + + // No way to determine if there was an error based on nonzero status. +@@ -189,11 +190,13 @@ static int decode_wrapper(quicktime_t *f + ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_NONREF /* AVDISCARD_BIDIR */; + else + ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_DEFAULT; +- result = avcodec_decode_video(ffmpeg->decoder_context[current_field], ++ av_init_packet( &pkt ); ++ pkt.data = ffmpeg->work_buffer; ++ pkt.size = bytes + header_bytes; ++ result = avcodec_decode_video2(ffmpeg->decoder_context[current_field], + &ffmpeg->picture[current_field], + &got_picture, +- ffmpeg->work_buffer, +- bytes + header_bytes); ++ &pkt); + + + +Index: cinelerra-20101104/quicktime/wma.c +=================================================================== +--- cinelerra-20101104.orig/quicktime/wma.c ++++ cinelerra-20101104/quicktime/wma.c +@@ -195,11 +195,14 @@ printf("decode 2 %x %llx %llx\n", chunk_ + chunk_size); + #else + bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE; +- result = avcodec_decode_audio2(codec->decoder_context, ++ AVPacket pkt; ++ av_init_packet( &pkt ); ++ pkt.data = codec->packet_buffer; ++ pkt.size = chunk_size; ++ result = avcodec_decode_audio3(codec->decoder_context, + (int16_t*)(codec->work_buffer + codec->output_size * sample_size), + &bytes_decoded, +- codec->packet_buffer, +- chunk_size); ++ &pkt); + #endif + + pthread_mutex_unlock(&ffmpeg_lock); diff --git a/media-video/cinelerra/files/cinelerra-v4l1_removal.patch b/media-video/cinelerra/files/cinelerra-v4l1_removal.patch new file mode 100644 index 000000000000..9df4004fe158 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-v4l1_removal.patch @@ -0,0 +1,125 @@ +http://bugs.cinelerra.org/ticket/949 +https://bugs.gentoo.org/show_bug.cgi?id=361709 + +diff -Nru cinelerra.orig//cinelerra/channelpicker.C cinelerra/cinelerra/channelpicker.C +--- cinelerra.orig//cinelerra/channelpicker.C 2010-11-24 18:18:03.000000000 -0500 ++++ cinelerra/cinelerra/channelpicker.C 2011-02-17 13:31:30.147880002 -0500 +@@ -39,7 +39,7 @@ + #include "recordgui.h" + #include "recordmonitor.h" + #include "theme.h" +-#include "vdevicebuz.h" ++//#include "vdevicebuz.h" + #include "vdeviceprefs.h" + #include "videodevice.h" + +@@ -280,7 +280,7 @@ + // printf("PrefsChannelPicker::PrefsChannelPicker 1\n"); + this->mwindow = mwindow; + this->prefs = prefs; +- VDeviceBUZ::get_inputs(&input_sources); ++// VDeviceBUZ::get_inputs(&input_sources); + } + + PrefsChannelPicker::~PrefsChannelPicker() +diff -Nru cinelerra.orig//cinelerra/Makefile.am cinelerra/cinelerra/Makefile.am +--- cinelerra.orig//cinelerra/Makefile.am 2010-11-24 18:18:03.000000000 -0500 ++++ cinelerra/cinelerra/Makefile.am 2011-02-17 13:31:30.147880002 -0500 +@@ -305,10 +305,8 @@ + vattachmentpoint.C \ + vautomation.C \ + vdevicebase.C \ +- vdevicebuz.C \ + vdevicedvb.C \ + vdeviceprefs.C \ +- vdevicev4l.C \ + vdevicev4l2.C \ + vdevicev4l2jpeg.C \ + vdevicex11.C \ +diff -Nru cinelerra.orig//cinelerra/reversemake cinelerra/cinelerra/reversemake +--- cinelerra.orig//cinelerra/reversemake 2010-11-24 18:18:03.000000000 -0500 ++++ cinelerra/cinelerra/reversemake 2011-02-17 13:31:30.151880002 -0500 +@@ -32,10 +32,8 @@ + make $OBJDIR/vedits.o + make $OBJDIR/vedit.o + make $OBJDIR/vdevicex11.o +-make $OBJDIR/vdevicev4l.o + make $OBJDIR/vdeviceprefs.o + make $OBJDIR/vdevicelml.o +-make $OBJDIR/vdevicebuz.o + make $OBJDIR/vdevicebase.o + make $OBJDIR/vdevice1394.o + make $OBJDIR/vautomation.o +diff -Nru cinelerra.orig//cinelerra/videodevice.C cinelerra/cinelerra/videodevice.C +--- cinelerra.orig//cinelerra/videodevice.C 2010-11-24 18:18:03.000000000 -0500 ++++ cinelerra/cinelerra/videodevice.C 2011-02-17 13:41:53.239880001 -0500 +@@ -39,9 +39,9 @@ + #ifdef HAVE_FIREWIRE + #include "vdevice1394.h" + #endif +-#include "vdevicebuz.h" ++//#include "vdevicebuz.h" + #include "vdevicedvb.h" +-#include "vdevicev4l.h" ++//#include "vdevicev4l.h" + #include "vdevicev4l2.h" + #include "vdevicev4l2jpeg.h" + #include "vdevicex11.h" +@@ -203,7 +203,6 @@ + result = input_base->open_input(); + break; + +- + #ifdef HAVE_VIDEO4LINUX2 + case VIDEO4LINUX2: + new_device_base(); +@@ -250,8 +249,8 @@ + { + switch(in_config->driver) + { +- case VIDEO4LINUX: +- return input_base = new VDeviceV4L(this); ++ //case VIDEO4LINUX: ++ // return input_base = new VDeviceV4L(this); + + #ifdef HAVE_VIDEO4LINUX2 + case VIDEO4LINUX2: +@@ -264,8 +263,8 @@ + case SCREENCAPTURE: + return input_base = new VDeviceX11(this, 0); + +- case CAPTURE_BUZ: +- return input_base = new VDeviceBUZ(this); ++ //case CAPTURE_BUZ: ++ // return input_base = new VDeviceBUZ(this); + + #ifdef HAVE_FIREWIRE + case CAPTURE_FIREWIRE: +@@ -662,9 +661,9 @@ + //printf("VideoDevice::open_output 1 %d\n", out_config->driver); + switch(out_config->driver) + { +- case PLAYBACK_BUZ: +- output_base = new VDeviceBUZ(this); +- break; ++ //case PLAYBACK_BUZ: ++ // output_base = new VDeviceBUZ(this); ++ // break; + case PLAYBACK_X11: + case PLAYBACK_X11_XV: + case PLAYBACK_X11_GL: +diff -Nru cinelerra.orig//cinelerra/videodevice.h cinelerra/cinelerra/videodevice.h +--- cinelerra.orig//cinelerra/videodevice.h 2010-11-24 18:18:03.000000000 -0500 ++++ cinelerra/cinelerra/videodevice.h 2011-02-17 13:31:30.167880002 -0500 +@@ -40,9 +40,9 @@ + #include "thread.h" + #include "picture.inc" + #include "vdevicebase.inc" +-#include "vdevicebuz.inc" ++//#include "vdevicebuz.inc" + #include "vdevicelml.inc" +-#include "vdevicev4l.inc" ++//#include "vdevicev4l.inc" + #include "vdevicex11.inc" + #include "videoconfig.inc" + #include "videowindow.inc" |