summaryrefslogtreecommitdiff
path: root/multimedia/kino
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2013-10-19 16:43:32 +0000
committerWilliam Grzybowski <wg@FreeBSD.org>2013-10-19 16:43:32 +0000
commit3624ddf181da71b2f213d44844a13f92e7088879 (patch)
tree69155a2473ecd42904d8ae76e85c62fefb67950b /multimedia/kino
parent- Rename patch files (diff)
multimedia/ffmpeg: update to 2.0.1
- Update main ffmpeg port to 2.0.1 - Bump and update dependent ports when necessary (API change) Approved by: portmgr (bapt)
Notes
Notes: svn path=/head/; revision=330909
Diffstat (limited to 'multimedia/kino')
-rw-r--r--multimedia/kino/Makefile2
-rw-r--r--multimedia/kino/files/patch-libav760
-rw-r--r--multimedia/kino/files/patch-libav857
3 files changed, 118 insertions, 1 deletions
diff --git a/multimedia/kino/Makefile b/multimedia/kino/Makefile
index be1cc988ad96..5cd621419164 100644
--- a/multimedia/kino/Makefile
+++ b/multimedia/kino/Makefile
@@ -51,7 +51,7 @@ PLIST_SUB+= FFMPEG_KINO=""
.else
CONFIGURE_ARGS+= --disable-local-ffmpeg
PLIST_SUB+= FFMPEG_KINO="@comment "
-LIB_DEPENDS+= avcodec.1:${PORTSDIR}/multimedia/ffmpeg
+LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
.endif
.include <bsd.port.mk>
diff --git a/multimedia/kino/files/patch-libav7 b/multimedia/kino/files/patch-libav7
new file mode 100644
index 000000000000..d7ebbdcd562b
--- /dev/null
+++ b/multimedia/kino/files/patch-libav7
@@ -0,0 +1,60 @@
+--- src/frame.cc.orig 2011-07-17 14:54:59.089481638 +0200
++++ 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/multimedia/kino/files/patch-libav8 b/multimedia/kino/files/patch-libav8
new file mode 100644
index 000000000000..06ae38659e1b
--- /dev/null
+++ b/multimedia/kino/files/patch-libav8
@@ -0,0 +1,57 @@
+--- src/frame.cc.orig 2012-05-14 19:55:42.153772418 -0700
++++ 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