[packages/vtk] - fix building with ffmpeg 3.x - rel 3

baggins baggins at pld-linux.org
Tue Mar 15 20:59:12 CET 2016


commit 3639b6bc277278efe45ce3f5c308b6c760f03459
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Mar 15 20:58:56 2016 +0100

    - fix building with ffmpeg 3.x
    - rel 3

 ffmpeg3.patch | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 vtk.spec      |  4 +++-
 2 files changed, 52 insertions(+), 1 deletion(-)
---
diff --git a/vtk.spec b/vtk.spec
index 1644718..d273270 100644
--- a/vtk.spec
+++ b/vtk.spec
@@ -16,7 +16,7 @@ Summary:	Toolkit for 3D computer graphics, image processing, and visualization
 Summary(pl.UTF-8):	Zestaw narzędzi do trójwymiarowej grafiki, przetwarzania obrazu i wizualizacji
 Name:		vtk
 Version:	6.3.0
-Release:	2
+Release:	3
 License:	BSD
 Group:		Libraries
 Source0:	http://www.vtk.org/files/release/6.3/VTK-%{version}.tar.gz
@@ -25,6 +25,7 @@ Source1:	http://www.vtk.org/files/release/6.3/VTKData-%{version}.tar.gz
 # Source1-md5:	b164200226805aeb741703a8168afdda
 Patch0:		%{name}-chemistry.patch
 Patch1:		gdal2.patch
+Patch2:		ffmpeg3.patch
 URL:		http://www.vtk.org/
 %{?with_OSMesa:BuildRequires: Mesa-libOSMesa-devel}
 BuildRequires:	OpenGL-GLX-devel
@@ -313,6 +314,7 @@ potrzebne do uruchamiania różnych przykładów z pakietu vtk-examples.
 %setup -q -n VTK-%{version} -b 1
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # Replace relative path ../../../VTKData with destination filesystem path
 grep -Erl '(\.\./)+VTKData' Examples | xargs \
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
new file mode 100644
index 0000000..bd30dfb
--- /dev/null
+++ b/ffmpeg3.patch
@@ -0,0 +1,49 @@
+--- VTK-6.3.0/IO/FFMPEG/vtkFFMPEGWriter.cxx~	2015-09-01 23:41:26.000000000 +0200
++++ VTK-6.3.0/IO/FFMPEG/vtkFFMPEGWriter.cxx	2016-03-15 20:58:02.064844887 +0100
+@@ -191,11 +191,11 @@
+   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
+@@ -280,7 +280,7 @@
+     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,7 +288,7 @@
+     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();
+@@ -349,12 +349,12 @@
+   //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);
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vtk.git/commitdiff/3639b6bc277278efe45ce3f5c308b6c760f03459



More information about the pld-cvs-commit mailing list