summaryrefslogtreecommitdiff
path: root/media-video/kino
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-video/kino
reinit the tree, so we can have metadata
Diffstat (limited to 'media-video/kino')
-rw-r--r--media-video/kino/Manifest11
-rw-r--r--media-video/kino/files/kino-1.3.4-ffmpeg3.patch157
-rw-r--r--media-video/kino/files/kino-1.3.4-libav-0.7.patch60
-rw-r--r--media-video/kino/files/kino-1.3.4-libav-0.8.patch57
-rw-r--r--media-video/kino/files/kino-1.3.4-libavcodec-pkg-config.patch11
-rw-r--r--media-video/kino/files/kino-1.3.4-v4l1.patch22
-rw-r--r--media-video/kino/kino-1.3.4-r1.ebuild105
-rw-r--r--media-video/kino/kino-1.3.4.ebuild107
-rw-r--r--media-video/kino/metadata.xml14
9 files changed, 544 insertions, 0 deletions
diff --git a/media-video/kino/Manifest b/media-video/kino/Manifest
new file mode 100644
index 000000000000..00507dd37c7a
--- /dev/null
+++ b/media-video/kino/Manifest
@@ -0,0 +1,11 @@
+AUX kino-1.3.4-ffmpeg3.patch 6804 SHA256 9a263aae48b4b3d1d16a81584bf27870c2496d28564396f745fb22b0c6c7551c SHA512 d6ba42d70a907887a866c195946a130fcfff63c8caacf68e8de13fe4d43d4e1898df38fbea5afdb498aade03d14822f0c6f1a9b8308729041e1319acd8c2a0bf WHIRLPOOL 3918dcbf5cc8d4125dedc8a115c7f0085d7b79de513cdb058c45211db90d4244e1ca74b4c27b3429e4fa0b2de1e701a5b2fe38a6777e9a8cc459375d0931d64c
+AUX kino-1.3.4-libav-0.7.patch 2001 SHA256 8397b6ca5abd86683a3998d6b283875cd49de64c99a79478549d01b518af0c3d SHA512 f4e52546b3451684add1ce5d539b1630d476e0a6889da0f7b3d827cab0ba5d7dc1b5febaea735188886fdf7f8012402c8aa6baa73aa6ae7ae204e035df33394a WHIRLPOOL 259370caead517108f318676b15f199884b69392730b1c447c101c597b6be42eadf4fc99055031d34f777dcd77fdd2b7a57d5e6c3f8f7c17cdc435bf3cee697e
+AUX kino-1.3.4-libav-0.8.patch 2622 SHA256 a3774d953a9a00df766129e4b8a8c7baf3bf6fd98df6c3e9f4a30c159035d4e1 SHA512 736eeb8f6902704166f48975581ebf2eb9e9edc6da8883d49e5f3710679988da57d796b5a926f27282d88584451ff03983402de66a4a707171674ad2de63d4d4 WHIRLPOOL 0c576267b21488809047f6d12cc37144bb84d2f73859d80bb8febab3061685f18592fe7864b4c0977d32bec01bdaf6720e38f470a3bc4f610202110f50a92668
+AUX kino-1.3.4-libavcodec-pkg-config.patch 451 SHA256 38656f8ccf7bb01e6e1adc8b9e9b53b635a9adfd7b4519bedc33cf53d8779b2a SHA512 4351560f26ea47f3122ac5a44bea48eae48b8efcc6ca10e72adb31ff5c535ed17e7324444bd03a29482351c3100b07a4305f092c687f18d56f813839332f5847 WHIRLPOOL d673e4c820df77e9d25d4e05089b2041e019cd819b03ffe46b04e3682892c7ff49bb6eaa40e7b7e17fb0a9546e7c3ad53660d5db80ddb85912f6f2ea5452580f
+AUX kino-1.3.4-v4l1.patch 635 SHA256 1987582a359314203a3c56982e640d9f26baf53c7c78655e2f47f510c3f2fb06 SHA512 840b9549aa4fa639a090ffdf2e4a65b8b37e5b8c8fd7f13eacb599b6659b0a6c1a435da5f3fbb7ca2b81ce5e2759ef49267af93864aff0426e61eb63d3aede77 WHIRLPOOL 0bf4205b96fef2ba93014f42545d9bbbb2dec29f840d87caefcc4bc29987c5712e95790cb9dfa7b7698a5f7d78a6e28be4f36dc441497f08ce0875eb70d03f67
+DIST kino-1.3.4.tar.gz 11090771 SHA256 114d046d76ad9980180e28ababd3c58a457cc9211d693705ce03a90a66011a08 SHA512 065695e6115f3f994ed89ebf52e64c4b8da100f7a973a8c686fd7e7377104b838968800c6a8e31913fd5e2be568076c60d588b840e51da3d082841546a53fc32 WHIRLPOOL 9d7ecc79d23dd8d8c4c0b64da2cd425f48305a81da6b6ae6acb2cad1f4b78fb9ade26ef0e8d36c560aa5f6340fb7221ac7ff3f08b1fecfcdea7d0b7d9614c034
+EBUILD kino-1.3.4-r1.ebuild 2893 SHA256 77ee3e174f9fa5391c30411be75c211ebb00c1672789b9a4c8a5fe080211bcd9 SHA512 33d51922bc141cc8937c75af230b1ef0e6b29a26870a31bea885d7d0ac6812d61cdf06720100638770b2f22f92966652b3c651745e9f83568ca30590dddc87f3 WHIRLPOOL bd33494c29eaf19b91c4d4caae4b86b20f9d68ec7e769dc8d975dd4234a0a59daf433f0415350204f9d93aa4b86f41065ae20ea3be3744687fdde1a4a8cda763
+EBUILD kino-1.3.4.ebuild 3401 SHA256 14639c7ec8c32e466183c20dbfbbcd25339471182591cf976a45af728dc28ac3 SHA512 7eac2bfb55dc38e725d77557c7310cb98bdbc8d94ca9dbf3f8041eda9a0e33e2b5ef139acd73dd3d10db534227172aeb788ff585ce57fca7bb8a72f8aea06f10 WHIRLPOOL 0228011af564c357b441ebbea41a65de42536f4b8c5c65d1b1adec4d4c9d716821c67785fb1fe17d6101aca5e42577886b3ed841623a5b9495bc84b56bae114a
+MISC ChangeLog 2695 SHA256 7a7a68e50465b414c490393b63e6af6bf7194e3200b232379575bd698ec3261d SHA512 4b41a31ef8788d6379d314c40556d26eda7904674e600a1e65ee312a484015dc1095dc124f4aa78b6261f6b8e0259d3b83a35149b2ebe507b81e4d92111a9e40 WHIRLPOOL 37e9095bc45c5941db769dcad5342704c98f2d939f0e71d148922951120e430a28b7756ece98cc4fcd7c1b6e5f8fef31c283e29420f81d75b5d5ffe5f8c5b520
+MISC ChangeLog-2015 16953 SHA256 dde390d15b3ce9654d8cccc4e1037fb6e048f3d5c031cc9adc0afcb2a6f7696f SHA512 586d31a7f8591b8610b5760cd41bc002bc56211c0b4cdd86293f76ce24ed332088792e331d1945930cc0fcb7604cbdd36c29791708f8c99326d81561a3789429 WHIRLPOOL 02dc3d2fe486d676596dede36ebf7970f1fa84361acde3e830f23e31f25f701819bdb75b52635e7f2f5165410852f7ac8419080792f5f475f9f62e71ebd4648b
+MISC metadata.xml 439 SHA256 b62b35b679d8958b4e390f12e87085725dd60ba2c43da55bc092755a59ed62e7 SHA512 b6c464f30ce0e75cad151021288fbf2e2fa360a978b707108eb39e23bb15d3d91212abbb23fa181c97959bd80ce519e4f26bf59c6a22a99ab19bc5051a0746a4 WHIRLPOOL 265d3bf3f2a1468baa96797bac1b1770027813e72333192d9c582103546445906895a790474b1698f9b5c0bf5e470dd93e5cd4ed00438561f4da887b553af9e4
diff --git a/media-video/kino/files/kino-1.3.4-ffmpeg3.patch b/media-video/kino/files/kino-1.3.4-ffmpeg3.patch
new file mode 100644
index 000000000000..57849d74e5c9
--- /dev/null
+++ b/media-video/kino/files/kino-1.3.4-ffmpeg3.patch
@@ -0,0 +1,157 @@
+--- ./src.orig/frame.cc 2016-12-18 12:25:48.480275083 -0600
++++ ./src/frame.cc 2016-12-18 12:54:17.800740672 -0600
+@@ -103,7 +103,7 @@
+ av_register_all();
+ libavcodec = avcodec_alloc_context3(NULL);
+ avcodec_open2( libavcodec,
+- avcodec_find_decoder( CODEC_ID_DVVIDEO ), NULL );
++ avcodec_find_decoder( AV_CODEC_ID_DVVIDEO ), NULL );
+ pthread_mutex_unlock( &avcodec_mutex );
+ data = ( unsigned char* ) av_mallocz( 144000 );
+ #if defined(HAVE_SWSCALE)
+@@ -1060,7 +1060,7 @@
+ int Frame::ExtractRGB( void * rgb )
+ {
+ #if defined(HAVE_LIBAVCODEC)
+- AVFrame *frame = avcodec_alloc_frame();
++ AVFrame *frame = av_frame_alloc();
+ AVPicture dest;
+ int got_picture;
+
+@@ -1072,17 +1072,17 @@
+ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+ if ( got_picture )
+ {
+- avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), PIX_FMT_RGB24, GetWidth(), GetHeight() );
++ avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), AV_PIX_FMT_RGB24, GetWidth(), GetHeight() );
+ #if defined(HAVE_SWSCALE)
+ if ( !imgConvertRgbCtx )
+ imgConvertRgbCtx = sws_getContext( libavcodec->width, libavcodec->height, libavcodec->pix_fmt,
+- GetWidth(), GetHeight(), PIX_FMT_RGB24, SWS_FAST_BILINEAR, NULL, NULL, NULL );
++ GetWidth(), GetHeight(), AV_PIX_FMT_RGB24, SWS_FAST_BILINEAR, NULL, NULL, NULL );
+ sws_scale( imgConvertRgbCtx, frame->data, frame->linesize, 0, libavcodec->height, dest.data, dest.linesize );
+ #else
+- img_convert( &dest, PIX_FMT_RGB24, reinterpret_cast<AVPicture*>( frame ), libavcodec->pix_fmt, GetWidth(), GetHeight() );
++ img_convert( &dest, AV_PIX_FMT_RGB24, reinterpret_cast<AVPicture*>( frame ), libavcodec->pix_fmt, GetWidth(), GetHeight() );
+ #endif
+ }
+- av_free( frame );
++ av_frame_free( &frame );
+ #else
+ unsigned char *pixels[ 3 ];
+ int pitches[ 3 ];
+@@ -1125,7 +1125,7 @@
+ int Frame::ExtractYUV( void *yuv )
+ {
+ #if defined(HAVE_LIBAVCODEC)
+- AVFrame *frame = avcodec_alloc_frame();;
++ AVFrame *frame = av_frame_alloc();;
+ AVPicture output;
+ int got_picture;
+
+@@ -1137,14 +1137,14 @@
+ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+ if ( got_picture )
+ {
+- avpicture_fill( &output, static_cast<uint8_t*>( yuv ), PIX_FMT_YUV422, GetWidth(), GetHeight() );
++ avpicture_fill( &output, static_cast<uint8_t*>( yuv ), AV_PIX_FMT_YUYV422, GetWidth(), GetHeight() );
+ #if defined(HAVE_SWSCALE)
+ if ( !imgConvertYuvCtx )
+ imgConvertYuvCtx = sws_getContext( libavcodec->width, libavcodec->height, libavcodec->pix_fmt,
+- GetWidth(), GetHeight(), PIX_FMT_YUV422, SWS_FAST_BILINEAR, NULL, NULL, NULL );
++ GetWidth(), GetHeight(), AV_PIX_FMT_YUYV422, SWS_FAST_BILINEAR, NULL, NULL, NULL );
+ sws_scale( imgConvertYuvCtx, frame->data, frame->linesize, 0, libavcodec->height, output.data, output.linesize );
+ #else
+- img_convert( &output, PIX_FMT_YUV422, (AVPicture *)frame, libavcodec->pix_fmt, GetWidth(), GetHeight() );
++ img_convert( &output, AV_PIX_FMT_YUYV422, (AVPicture *)frame, libavcodec->pix_fmt, GetWidth(), GetHeight() );
+ #endif
+ }
+ av_free( frame );
+@@ -1164,7 +1164,7 @@
+ int Frame::ExtractYUV420( uint8_t *yuv, uint8_t *output[ 3 ] )
+ {
+ #if defined(HAVE_LIBAVCODEC)
+- AVFrame *frame = avcodec_alloc_frame();
++ AVFrame *frame = av_frame_alloc();
+ int got_picture;
+
+ AVPacket pkt;
+@@ -1176,7 +1176,7 @@
+
+ int width = GetWidth(), height = GetHeight();
+
+- if ( libavcodec->pix_fmt == PIX_FMT_YUV420P ) // PAL
++ if ( libavcodec->pix_fmt == AV_PIX_FMT_YUV420P ) // PAL
+ {
+ int h2 = height / 2;
+ int w2 = width / 2;
+@@ -1204,7 +1204,7 @@
+ }
+ }
+ }
+- else // libavcodec.pix_fmt == PIX_FMT_YUV411P // NTSC
++ else // libavcodec.pix_fmt == AV_PIX_FMT_YUV411P // NTSC
+ {
+ int w4 = width / 4;
+
+@@ -1341,7 +1341,7 @@
+ avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
+ AVStream* vst = avformat_new_stream( avformatEncoder, NULL );
+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+- vst->codec->codec_id = CODEC_ID_DVVIDEO;
++ vst->codec->codec_id = AV_CODEC_ID_DVVIDEO;
+ vst->codec->bit_rate = 25000000;
+ vst->start_time = 0;
+ AVCodecContext *avcodecEncoder = vst->codec;
+@@ -1366,14 +1366,14 @@
+ #endif
+ avcodecEncoder->thread_count = 2;
+ avcodecEncoder->time_base= isPAL ? ( AVRational ){ 1, 25 } : ( AVRational ){ 1001, 30000 };
+- avcodecEncoder->pix_fmt = isPAL ? PIX_FMT_YUV420P : PIX_FMT_YUV411P;
++ avcodecEncoder->pix_fmt = isPAL ? AV_PIX_FMT_YUV420P : AV_PIX_FMT_YUV411P;
+ avcodecEncoder->flags |= CODEC_FLAG_INTERLACED_DCT;
+- avcodec_open2( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ), NULL );
++ avcodec_open2( avcodecEncoder, avcodec_find_encoder( AV_CODEC_ID_DVVIDEO ), NULL );
+ av_new_packet( &avpacketEncoder, 144000 );
+ tempImage = ( uint8_t* ) av_malloc(
+ avpicture_get_size( avcodecEncoder->pix_fmt, avcodecEncoder->width, avcodecEncoder->height ) );
+ #if defined(HAVE_SWSCALE)
+- imgConvertEncoderCtx = sws_getContext( avcodecEncoder->width, avcodecEncoder->height, PIX_FMT_RGB24,
++ imgConvertEncoderCtx = sws_getContext( avcodecEncoder->width, avcodecEncoder->height, AV_PIX_FMT_RGB24,
+ avcodecEncoder->width, avcodecEncoder->height, avcodecEncoder->pix_fmt, SWS_FAST_BILINEAR, NULL, NULL, NULL);
+ #endif
+ }
+@@ -1452,8 +1452,8 @@
+ if ( CreateEncoder( IsPAL(), IsWide() ) )
+ {
+ #if defined(HAVE_LIBAVCODEC)
+- AVFrame *input = avcodec_alloc_frame();
+- AVFrame *output = avcodec_alloc_frame();
++ AVFrame *input = av_frame_alloc();
++ AVFrame *output = av_frame_alloc();
+
+ if ( input && output )
+ {
+@@ -1464,16 +1464,19 @@
+
+ // Convert color space
+ avpicture_fill( ( AVPicture* )output, tempImage, avcodecEncoder->pix_fmt, width, height );
+- avpicture_fill( ( AVPicture* )input, rgb, PIX_FMT_RGB24, width, height );
++ avpicture_fill( ( AVPicture* )input, rgb, AV_PIX_FMT_RGB24, width, height );
+ #if defined(HAVE_SWSCALE)
+ sws_scale( imgConvertEncoderCtx, input->data, input->linesize, 0, height,
+ output->data, output->linesize);
+ #else
+- img_convert( ( AVPicture* )output, avcodecEncoder->pix_fmt, ( AVPicture* )input, PIX_FMT_RGB24, width, height );
++ img_convert( ( AVPicture* )output, avcodecEncoder->pix_fmt, ( AVPicture* )input, AV_PIX_FMT_RGB24, width, height );
+ #endif
+
+ // Encode
+- bytesInFrame = avcodec_encode_video( avcodecEncoder, avpacketEncoder.data, size, output );
++
++ // bytesInFrame = avcodec_encode_video( avcodecEncoder, avpacketEncoder.data, size, output );
++ int got_packet;
++ bytesInFrame = avcodec_encode_video2( avcodecEncoder, &avpacketEncoder, output, &got_packet );
+ avformatEncoder->pb = avio_alloc_context(data, bytesInFrame, 0, NULL, NULL, NULL, NULL);
+ avpacketEncoder.size = bytesInFrame;
+ if ( !isEncoderHeaderWritten )
diff --git a/media-video/kino/files/kino-1.3.4-libav-0.7.patch b/media-video/kino/files/kino-1.3.4-libav-0.7.patch
new file mode 100644
index 000000000000..65c5bc38276d
--- /dev/null
+++ b/media-video/kino/files/kino-1.3.4-libav-0.7.patch
@@ -0,0 +1,60 @@
+--- kino-1.3.4.orig/src/frame.cc 2011-07-17 14:54:59.089481638 +0200
++++ kino-1.3.4/src/frame.cc 2011-07-17 15:09:23.199481714 +0200
+@@ -1063,7 +1063,12 @@
+ AVPicture dest;
+ int got_picture;
+
+- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
++ AVPacket pkt;
++ av_init_packet(&pkt);
++ pkt.data = data;
++ pkt.size = GetFrameSize();
++
++ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+ if ( got_picture )
+ {
+ avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), PIX_FMT_RGB24, GetWidth(), GetHeight() );
+@@ -1123,7 +1128,12 @@
+ AVPicture output;
+ int got_picture;
+
+- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
++ AVPacket pkt;
++ av_init_packet(&pkt);
++ pkt.data = data;
++ pkt.size = GetFrameSize();
++
++ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+ if ( got_picture )
+ {
+ avpicture_fill( &output, static_cast<uint8_t*>( yuv ), PIX_FMT_YUV422, GetWidth(), GetHeight() );
+@@ -1156,7 +1166,12 @@
+ AVFrame *frame = avcodec_alloc_frame();
+ int got_picture;
+
+- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
++ AVPacket pkt;
++ av_init_packet(&pkt);
++ pkt.data = data;
++ pkt.size = GetFrameSize();
++
++ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+
+ int width = GetWidth(), height = GetHeight();
+
+@@ -1319,12 +1334,12 @@
+ #if defined(HAVE_LIBAVCODEC)
+ if ( avformatEncoder == NULL )
+ {
+- avformatEncoder = av_alloc_format_context();
++ avformatEncoder = avformat_alloc_context();
+ if ( avformatEncoder )
+ {
+- avformatEncoder->oformat = guess_format( "dv", NULL, NULL );
++ avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
+ AVStream* vst = av_new_stream( avformatEncoder, 0 );
+- vst->codec->codec_type = CODEC_TYPE_VIDEO;
++ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+ vst->codec->codec_id = CODEC_ID_DVVIDEO;
+ vst->codec->bit_rate = 25000000;
+ vst->start_time = 0;
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/files/kino-1.3.4-libavcodec-pkg-config.patch b/media-video/kino/files/kino-1.3.4-libavcodec-pkg-config.patch
new file mode 100644
index 000000000000..c5cd12106f5c
--- /dev/null
+++ b/media-video/kino/files/kino-1.3.4-libavcodec-pkg-config.patch
@@ -0,0 +1,11 @@
+--- a/configure.in 2009-09-08 02:35:23.000000000 -0400
++++ b/configure.in 2014-01-27 14:53:01.366063037 -0500
+@@ -221,7 +221,7 @@
+ if (test "x$avcodec_include" != x) || (test "x$avcodec_lib" != x) ; then
+ local_legacy_ffmpeg_test
+ else
+- PKG_CHECK_MODULES(AVCODEC, libavformat,
++ PKG_CHECK_MODULES(AVCODEC, [libavcodec libavformat libavutil],
+ [
+ AC_DEFINE(HAVE_LIBAVCODEC, 1, [Enable FFMPEG libavcodec])
+ AC_SUBST(AVCODEC_LIBS)
diff --git a/media-video/kino/files/kino-1.3.4-v4l1.patch b/media-video/kino/files/kino-1.3.4-v4l1.patch
new file mode 100644
index 000000000000..c6757743cd7e
--- /dev/null
+++ b/media-video/kino/files/kino-1.3.4-v4l1.patch
@@ -0,0 +1,22 @@
+--- kino-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:20:37.161004916 +0400
++++ kino-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:21:57.302377529 +0400
+@@ -26,7 +26,7 @@
+ #include <sys/mman.h>
+ #include <sys/time.h>
+ #define _LINUX_TIME_H 1
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+ #include <time.h>
+
+ typedef struct {
+--- kino-1.3.3.orig/src/v4l.h 2011-05-17 02:20:38.896969666 +0400
++++ kino-1.3.3.orig/src/v4l.h 2011-05-17 02:21:39.922730395 +0400
+@@ -40,7 +40,7 @@
+
+ #define _DEVICE_H_
+ #define _LINUX_TIME_H
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+
+ #include "displayer.h"
+
diff --git a/media-video/kino/kino-1.3.4-r1.ebuild b/media-video/kino/kino-1.3.4-r1.ebuild
new file mode 100644
index 000000000000..5ff6142d3d3b
--- /dev/null
+++ b/media-video/kino/kino-1.3.4-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools ltprune udev
+
+DESCRIPTION="Kino is a non-linear DV editor for GNU/Linux"
+HOMEPAGE="http://www.kinodv.org/"
+SRC_URI="mirror://sourceforge/kino/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="alsa dvdr gpac lame libav quicktime sox vorbis"
+
+# Optional dependency on cinelerra-cvs (as a replacement for libquicktime)
+# dropped because kino may run with it but won't build anymore.
+
+CDEPEND="
+ >=x11-libs/gtk+-2.6.0:2
+ >=gnome-base/libglade-2.5.0
+ >=dev-libs/glib-2:2
+ x11-libs/libXv
+ dev-libs/libxml2:2
+ media-libs/audiofile
+ >=sys-libs/libraw1394-1.0.0
+ >=sys-libs/libavc1394-0.4.1
+ >=media-libs/libdv-0.103
+ media-libs/libsamplerate
+ media-libs/libiec61883
+ media-libs/libv4l:0=
+ alsa? ( >=media-libs/alsa-lib-1.0.9 )
+ !libav? ( >=media-video/ffmpeg-3:0= )
+ libav? ( media-video/libav:0= )
+ quicktime? ( >=media-libs/libquicktime-0.9.5 )
+"
+DEPEND="${CDEPEND}
+ dev-util/intltool
+"
+RDEPEND="${CDEPEND}
+ media-video/mjpegtools
+ media-sound/rawrec
+ dvdr? ( media-video/dvdauthor
+ app-cdr/dvd+rw-tools )
+ gpac? ( media-video/gpac )
+ lame? ( media-sound/lame )
+ sox? ( media-sound/sox )
+ vorbis? ( media-sound/vorbis-tools )
+"
+
+src_prepare() {
+ default
+
+ # Deactivating automagic alsa configuration, bug #134725
+ if ! use alsa ; then
+ sed -i -e "s:HAVE_ALSA 1:HAVE_ALSA 0:" configure || die
+ fi
+
+ # Fix bug #169590
+ # https://sourceforge.net/tracker/?func=detail&aid=3304495&group_id=14103&atid=314103
+ sed -i \
+ -e '/\$(LIBQUICKTIME_LIBS) \\/d' \
+ -e '/^[[:space:]]*\$(SRC_LIBS)/ a\
+ \$(LIBQUICKTIME_LIBS) \\' \
+ src/Makefile.in || die
+
+ # Fix test failure discovered in bug #193947
+ # https://sourceforge.net/tracker/?func=detail&aid=3304499&group_id=14103&atid=314103
+ sed -i -e '$a\
+\
+ffmpeg/libavcodec/ps2/idct_mmi.c\
+ffmpeg/libavcodec/sparc/dsputil_vis.c\
+ffmpeg/libavcodec/sparc/vis.h\
+ffmpeg/libavutil/bswap.h\
+ffmpeg/libswscale/yuv2rgb_template.c\
+src/export.h\
+src/message.cc\
+src/page_bttv.cc' po/POTFILES.in || die
+
+ sed -i -e 's:^#include <quicktime.h>:#include <lqt/quicktime.h>:' src/filehandler.h || die
+ eapply "${FILESDIR}/${P}-v4l1.patch"
+ eapply "${FILESDIR}/${P}-libav-0.7.patch"
+ eapply "${FILESDIR}/${P}-libav-0.8.patch"
+ eapply "${FILESDIR}/${P}-libavcodec-pkg-config.patch"
+ eapply "${FILESDIR}/${P}-ffmpeg3.patch"
+
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-local-ffmpeg \
+ $(use_enable quicktime) \
+ $(use_with sparc dv1394) \
+ --with-udev-rules-dir="$(get_udevdir)"/rules.d \
+ CPPFLAGS="-I${ROOT}usr/include/libavcodec -I${ROOT}usr/include/libavformat -I${ROOT}usr/include/libswscale"
+}
+
+src_install() {
+ default
+ mv "${ED}/$(get_udevdir)"/rules.d/{,99-}kino.rules
+ fowners root:root -R /usr/share/kino/help #177378
+ prune_libtool_files --all #385361
+}
diff --git a/media-video/kino/kino-1.3.4.ebuild b/media-video/kino/kino-1.3.4.ebuild
new file mode 100644
index 000000000000..8f4d4bfa586f
--- /dev/null
+++ b/media-video/kino/kino-1.3.4.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils udev
+
+DESCRIPTION="Kino is a non-linear DV editor for GNU/Linux"
+HOMEPAGE="http://www.kinodv.org/"
+SRC_URI="mirror://sourceforge/kino/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+IUSE="alsa dvdr gpac lame gstreamer quicktime sox vorbis"
+
+# This ebuild would benefit a lot of USE dependencies but that has to wait for
+# EAPI 2. The usual fix is to issue built_with_use checks but in that particu-
+# lar case it would make the ebuild rather complicated to write and maintain
+# (certain features can be enabled in various different ways). Also it would
+# also force the emerge process to stop a bit too often for users not to comp-
+# lain. Thus, if you need features like theora, x264, xvid and maybe others,
+# make sure you activate the required support where it should be (ffmpeg, mostly).
+
+# Optional dependency on cinelerra-cvs (as a replacement for libquicktime)
+# dropped because kino may run with it but won't build anymore.
+
+CDEPEND=">=x11-libs/gtk+-2.6.0:2
+ >=gnome-base/libglade-2.5.0
+ >=dev-libs/glib-2:2
+ x11-libs/libXv
+ dev-libs/libxml2:2
+ media-libs/audiofile
+ >=sys-libs/libraw1394-1.0.0
+ >=sys-libs/libavc1394-0.4.1
+ >=media-libs/libdv-0.103
+ media-libs/libsamplerate
+ media-libs/libiec61883
+ media-libs/libv4l
+ alsa? ( >=media-libs/alsa-lib-1.0.9 )
+ virtual/ffmpeg
+ quicktime? ( >=media-libs/libquicktime-0.9.5 )"
+DEPEND="${CDEPEND}
+ dev-util/intltool"
+RDEPEND="${CDEPEND}
+ media-video/mjpegtools
+ media-sound/rawrec
+ dvdr? ( media-video/dvdauthor
+ app-cdr/dvd+rw-tools )
+ gpac? ( media-video/gpac )
+ lame? ( media-sound/lame )
+ gstreamer? ( media-libs/gst-plugins-base:0.10 )
+ sox? ( media-sound/sox )
+ vorbis? ( media-sound/vorbis-tools )"
+
+DOCS="AUTHORS BUGS ChangeLog NEWS README* TODO"
+
+src_prepare() {
+ # Deactivating automagic alsa configuration, bug #134725
+ if ! use alsa ; then
+ sed -i -e "s:HAVE_ALSA 1:HAVE_ALSA 0:" configure || die
+ fi
+
+ # Fix bug #169590
+ # https://sourceforge.net/tracker/?func=detail&aid=3304495&group_id=14103&atid=314103
+ sed -i \
+ -e '/\$(LIBQUICKTIME_LIBS) \\/d' \
+ -e '/^[[:space:]]*\$(SRC_LIBS)/ a\
+ \$(LIBQUICKTIME_LIBS) \\' \
+ src/Makefile.in || die
+
+ # Fix test failure discovered in bug #193947
+ # https://sourceforge.net/tracker/?func=detail&aid=3304499&group_id=14103&atid=314103
+ sed -i -e '$a\
+\
+ffmpeg/libavcodec/ps2/idct_mmi.c\
+ffmpeg/libavcodec/sparc/dsputil_vis.c\
+ffmpeg/libavcodec/sparc/vis.h\
+ffmpeg/libavutil/bswap.h\
+ffmpeg/libswscale/yuv2rgb_template.c\
+src/export.h\
+src/message.cc\
+src/page_bttv.cc' po/POTFILES.in || die
+
+ sed -i -e 's:^#include <quicktime.h>:#include <lqt/quicktime.h>:' src/filehandler.h || die
+ epatch "${FILESDIR}/${P}-v4l1.patch"
+ epatch "${FILESDIR}/${P}-libav-0.7.patch"
+ epatch "${FILESDIR}/${P}-libav-0.8.patch"
+ epatch "${FILESDIR}/${P}-libavcodec-pkg-config.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-local-ffmpeg \
+ $(use_enable quicktime) \
+ $(use_with sparc dv1394) \
+ --with-udev-rules-dir="$(get_udevdir)"/rules.d \
+ CPPFLAGS="-I${ROOT}usr/include/libavcodec -I${ROOT}usr/include/libavformat -I${ROOT}usr/include/libswscale"
+}
+
+src_install() {
+ default
+ mv "${ED}/$(get_udevdir)"/rules.d/{,99-}kino.rules
+ fowners root:root -R /usr/share/kino/help #177378
+ prune_libtool_files --all #385361
+}
diff --git a/media-video/kino/metadata.xml b/media-video/kino/metadata.xml
new file mode 100644
index 000000000000..b66baaf03b71
--- /dev/null
+++ b/media-video/kino/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>media-video@gentoo.org</email>
+ <name>Gentoo Video project</name>
+ </maintainer>
+ <use>
+ <flag name="gpac">Enable GPAC support when exporting to 3GPP format</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">kino</remote-id>
+ </upstream>
+</pkgmetadata>