summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-05-15 03:47:53 +0000
committerLuca Barbato <lu_zero@gentoo.org>2012-05-15 03:47:53 +0000
commitcd007eaaeb897fe70b83528ad7571f535b829b6d (patch)
tree1aaeda036ae81796f130a0b728ac985f528cbedf /media-video
parentunmask ocamlopt, bug 340607 (diff)
downloadgentoo-2-cd007eaaeb897fe70b83528ad7571f535b829b6d.tar.gz
gentoo-2-cd007eaaeb897fe70b83528ad7571f535b829b6d.tar.bz2
gentoo-2-cd007eaaeb897fe70b83528ad7571f535b829b6d.zip
Update support to libav-0.8 api
(Portage version: 2.2.0_alpha103/cvs/Linux x86_64)
Diffstat (limited to 'media-video')
-rw-r--r--media-video/kino/ChangeLog8
-rw-r--r--media-video/kino/files/kino-1.3.4-libav-0.8.patch57
-rw-r--r--media-video/kino/kino-1.3.4.ebuild5
3 files changed, 66 insertions, 4 deletions
diff --git a/media-video/kino/ChangeLog b/media-video/kino/ChangeLog
index 381e8668d48b..145f376e317c 100644
--- a/media-video/kino/ChangeLog
+++ b/media-video/kino/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-video/kino
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/kino/ChangeLog,v 1.129 2011/11/15 10:35:46 lu_zero Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/kino/ChangeLog,v 1.130 2012/05/15 03:47:52 lu_zero Exp $
+
+ 15 May 2012; Luca Barbato <lu_zero@gentoo.org> kino-1.3.4.ebuild,
+ +files/kino-1.3.4-libav-0.8.patch:
+ Update support to libav-0.8 api
15 Nov 2011; Luca Barbato <lu_zero@gentoo.org> kino-1.3.4.ebuild,
+files/kino-1.3.4-libav-0.7.patch:
diff --git a/media-video/kino/files/kino-1.3.4-libav-0.8.patch b/media-video/kino/files/kino-1.3.4-libav-0.8.patch
new file mode 100644
index 000000000000..f98cbda0bc49
--- /dev/null
+++ b/media-video/kino/files/kino-1.3.4-libav-0.8.patch
@@ -0,0 +1,57 @@
+--- kino-1.3.4.orig/src/frame.cc 2012-05-14 19:55:42.153772418 -0700
++++ kino-1.3.4/src/frame.cc 2012-05-14 20:28:34.448838653 -0700
+@@ -101,8 +101,9 @@
+ #if defined(HAVE_LIBAVCODEC)
+ pthread_mutex_lock( &avcodec_mutex );
+ av_register_all();
+- libavcodec = avcodec_alloc_context();
+- avcodec_open( libavcodec, avcodec_find_decoder( CODEC_ID_DVVIDEO ) );
++ libavcodec = avcodec_alloc_context3(NULL);
++ avcodec_open2( libavcodec,
++ avcodec_find_decoder( CODEC_ID_DVVIDEO ), NULL );
+ pthread_mutex_unlock( &avcodec_mutex );
+ data = ( unsigned char* ) av_mallocz( 144000 );
+ #if defined(HAVE_SWSCALE)
+@@ -1338,7 +1339,7 @@
+ if ( avformatEncoder )
+ {
+ avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
+- AVStream* vst = av_new_stream( avformatEncoder, 0 );
++ AVStream* vst = avformat_new_stream( avformatEncoder, NULL );
+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+ vst->codec->codec_id = CODEC_ID_DVVIDEO;
+ vst->codec->bit_rate = 25000000;
+@@ -1364,12 +1365,10 @@
+ vst->sample_aspect_ratio = avcodecEncoder->sample_aspect_ratio;
+ #endif
+ avcodecEncoder->thread_count = 2;
+- avcodec_thread_init( avcodecEncoder, avcodecEncoder->thread_count );
+ avcodecEncoder->time_base= isPAL ? ( AVRational ){ 1, 25 } : ( AVRational ){ 1001, 30000 };
+ avcodecEncoder->pix_fmt = isPAL ? PIX_FMT_YUV420P : PIX_FMT_YUV411P;
+ avcodecEncoder->flags |= CODEC_FLAG_INTERLACED_DCT;
+- av_set_parameters( avformatEncoder, NULL );
+- avcodec_open( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ) );
++ avcodec_open2( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ), NULL );
+ av_new_packet( &avpacketEncoder, 144000 );
+ tempImage = ( uint8_t* ) av_malloc(
+ avpicture_get_size( avcodecEncoder->pix_fmt, avcodecEncoder->width, avcodecEncoder->height ) );
+@@ -1475,16 +1474,16 @@
+
+ // Encode
+ bytesInFrame = avcodec_encode_video( avcodecEncoder, avpacketEncoder.data, size, output );
+- url_open_buf( &avformatEncoder->pb, data, bytesInFrame, URL_WRONLY );
++ avformatEncoder->pb = avio_alloc_context(data, bytesInFrame, 0, NULL, NULL, NULL, NULL);
+ avpacketEncoder.size = bytesInFrame;
+ if ( !isEncoderHeaderWritten )
+ {
+- av_write_header( avformatEncoder );
++ avformat_write_header( avformatEncoder, NULL );
+ isEncoderHeaderWritten = true;
+ }
+ av_write_frame( avformatEncoder, &avpacketEncoder );
+ #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
+- url_close_buf( avformatEncoder->pb );
++ avio_close( avformatEncoder->pb );
+ #else
+ url_close_buf( &avformatEncoder->pb );
+ #endif
diff --git a/media-video/kino/kino-1.3.4.ebuild b/media-video/kino/kino-1.3.4.ebuild
index b0179a8fa214..5807a5c25ba0 100644
--- a/media-video/kino/kino-1.3.4.ebuild
+++ b/media-video/kino/kino-1.3.4.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/kino/kino-1.3.4.ebuild,v 1.6 2011/11/15 10:35:46 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/kino/kino-1.3.4.ebuild,v 1.7 2012/05/15 03:47:52 lu_zero Exp $
EAPI="4"
@@ -85,6 +85,7 @@ src/page_bttv.cc' po/POTFILES.in || die "sed failed"
src/filehandler.h || die "sed failed"
epatch "${FILESDIR}/${P}-v4l1.patch"
epatch "${FILESDIR}/${P}-libav-0.7.patch"
+ epatch "${FILESDIR}/${P}-libav-0.8.patch"
}
src_configure() {