diff options
author | 2017-06-17 11:26:05 +0200 | |
---|---|---|
committer | 2017-06-17 11:28:05 +0200 | |
commit | 03d7a29c19acd548611a8cd1f17f01745d1f5f6d (patch) | |
tree | 1455f153c5ae96ffff70281363d57242003d3cde /media-video/kino/files | |
parent | profiles/arch/ia64: package.use.mask: unmask USE=test dev-libs/libgdata-0.16.... (diff) | |
download | gentoo-03d7a29c19acd548611a8cd1f17f01745d1f5f6d.tar.gz gentoo-03d7a29c19acd548611a8cd1f17f01745d1f5f6d.tar.bz2 gentoo-03d7a29c19acd548611a8cd1f17f01745d1f5f6d.zip |
media-video/kino: Fix build with ffmpeg-3 (#539894), drop support for dead gstreamer:0.10
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'media-video/kino/files')
-rw-r--r-- | media-video/kino/files/kino-1.3.4-ffmpeg3.patch | 157 | ||||
-rw-r--r-- | media-video/kino/files/kino-1.3.4-libavcodec-pkg-config.patch | 4 |
2 files changed, 159 insertions, 2 deletions
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-libavcodec-pkg-config.patch b/media-video/kino/files/kino-1.3.4-libavcodec-pkg-config.patch index d6a8953cf00a..c5cd12106f5c 100644 --- 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 @@ -1,5 +1,5 @@ ---- a/kino-1.3.4/configure.in 2009-09-08 02:35:23.000000000 -0400 -+++ b/kino-1.3.4/configure.in 2014-01-27 14:53:01.366063037 -0500 +--- 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 |