[arch-commits] Commit in vtk/trunk (PKGBUILD ffmpeg3_compat.patch)
Anatol Pomozov
anatolik at archlinux.org
Wed Feb 17 22:52:54 UTC 2016
Date: Wednesday, February 17, 2016 @ 23:52:54
Author: anatolik
Revision: 162138
FFmpeg 3.0 rebuild
https://www.archlinux.org/todo/ffmpeg-30-rebuild/
Added:
vtk/trunk/ffmpeg3_compat.patch
Modified:
vtk/trunk/PKGBUILD
----------------------+
PKGBUILD | 12 +++++----
ffmpeg3_compat.patch | 62 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 69 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-02-17 22:50:00 UTC (rev 162137)
+++ PKGBUILD 2016-02-17 22:52:54 UTC (rev 162138)
@@ -6,7 +6,7 @@
pkgname=vtk
pkgver=7.0.0
_majorver=7.0
-pkgrel=1
+pkgrel=2
pkgdesc='A software system for 3D computer graphics, image processing, and visualization'
arch=('i686' 'x86_64')
url='http://www.vtk.org/'
@@ -33,18 +33,20 @@
"http://www.vtk.org/files/release/${_majorver}/VTKData-${pkgver}.tar.gz"
"http://www.vtk.org/files/release/${_majorver}/VTKLargeData-${pkgver}.tar.gz"
# https://github.com/Kitware/VTK/pull/21
- gdal2.patch)
+ gdal2.patch
+ ffmpeg3_compat.patch)
options=(staticlibs)
sha1sums=('7719fac36b36965eaf5076542166ba49bbe7afbb'
'1bbaa642a3e3676a58a08c956df73645326c2859'
'8d16a1fba15e4eb95c03fe97937488ddcdd7fbd0'
- 'c60610e7c8cf0ad93d7c02cbf8a20fc415f59b3e')
+ 'c60610e7c8cf0ad93d7c02cbf8a20fc415f59b3e'
+ 'a78177f8dd6dedd9ad189fa12730ec53c7d02508')
prepare() {
cd "${srcdir}"/VTK-$pkgver
- # fix compilation errors:
- patch -Np1 -i "${srcdir}"/gdal2.patch
+ patch -p1 < ../ffmpeg3_compat.patch # http://www.vtk.org/Bug/view.php?id=16001
+ patch -p1 < ../gdal2.patch
sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
Added: ffmpeg3_compat.patch
===================================================================
--- ffmpeg3_compat.patch (rev 0)
+++ ffmpeg3_compat.patch 2016-02-17 22:52:54 UTC (rev 162138)
@@ -0,0 +1,62 @@
+diff --git a/IO/FFMPEG/vtkFFMPEGWriter.cxx b/IO/FFMPEG/vtkFFMPEGWriter.cxx
+index d3fd421..294b421 100644
+--- a/IO/FFMPEG/vtkFFMPEGWriter.cxx
++++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx
+@@ -191,11 +191,11 @@ int vtkFFMPEGWriterInternal::Start()
+ c->height = this->Dim[1];
+ if (this->Writer->GetCompression())
+ {
+- c->pix_fmt = PIX_FMT_YUVJ422P;
++ c->pix_fmt = AV_PIX_FMT_YUVJ422P;
+ }
+ else
+ {
+- c->pix_fmt = PIX_FMT_BGR24;
++ c->pix_fmt = AV_PIX_FMT_BGR24;
+ }
+
+ //to do playback at actual recorded rate, this will need more work see also below
+@@ -274,13 +274,13 @@ int vtkFFMPEGWriterInternal::Start()
+ #endif
+
+ //for the output of the writer's input...
+- this->rgbInput = avcodec_alloc_frame();
++ this->rgbInput = av_frame_alloc();
+ if (!this->rgbInput)
+ {
+ vtkGenericWarningMacro (<< "Could not make rgbInput avframe." );
+ return 0;
+ }
+- int RGBsize = avpicture_get_size(PIX_FMT_RGB24, c->width, c->height);
++ int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height);
+ unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize);
+ if (!rgb)
+ {
+@@ -288,10 +288,10 @@ int vtkFFMPEGWriterInternal::Start()
+ return 0;
+ }
+ //The rgb buffer should get deleted when this->rgbInput is.
+- avpicture_fill((AVPicture *)this->rgbInput, rgb, PIX_FMT_RGB24, c->width, c->height);
++ avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height);
+
+ //and for the output to the codec's input.
+- this->yuvOutput = avcodec_alloc_frame();
++ this->yuvOutput = av_frame_alloc();
+ if (!this->yuvOutput)
+ {
+ vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." );
+@@ -349,12 +349,12 @@ int vtkFFMPEGWriterInternal::Write(vtkImageData *id)
+ //convert that to YUV for input to the codec
+ #ifdef VTK_FFMPEG_HAS_IMG_CONVERT
+ img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt,
+- (AVPicture *)this->rgbInput, PIX_FMT_RGB24,
++ (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24,
+ cc->width, cc->height);
+ #else
+ //convert that to YUV for input to the codec
+ SwsContext* convert_ctx = sws_getContext(
+- cc->width, cc->height, PIX_FMT_RGB24,
++ cc->width, cc->height, AV_PIX_FMT_RGB24,
+ cc->width, cc->height, cc->pix_fmt,
+ SWS_BICUBIC, NULL, NULL, NULL);
+
More information about the arch-commits
mailing list