[arch-commits] Commit in vtk/trunk (PKGBUILD ffmpeg-2.4.diff)
Andrzej Giniewicz
aginiewicz at archlinux.org
Tue Sep 16 20:16:09 UTC 2014
Date: Tuesday, September 16, 2014 @ 22:16:08
Author: aginiewicz
Revision: 119060
upgpkg: vtk 5.10.1-13
todo: ffmpeg 2.4 rebuild
Added:
vtk/trunk/ffmpeg-2.4.diff
Modified:
vtk/trunk/PKGBUILD
-----------------+
PKGBUILD | 6 +++--
ffmpeg-2.4.diff | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-09-16 17:41:24 UTC (rev 119059)
+++ PKGBUILD 2014-09-16 20:16:08 UTC (rev 119060)
@@ -12,7 +12,7 @@
pkgname=vtk
pkgver=5.10.1
-pkgrel=12
+pkgrel=13
pkgdesc='A software system for 3D computer graphics, image processing, and visualization.'
arch=('i686' 'x86_64')
url='http://www.vtk.org/'
@@ -26,7 +26,7 @@
'graphviz: drawing tools')
source=("http://www.vtk.org/files/release/${pkgver:0:4}/vtk-${pkgver}.tar.gz"
"http://www.vtk.org/files/release/${pkgver:0:4}/vtkdata-${pkgver}.tar.gz"
- ffmpeg-0.8.diff ffmpeg-0.11.diff ffmpeg-2.0.diff
+ ffmpeg-0.8.diff ffmpeg-0.11.diff ffmpeg-2.0.diff ffmpeg-2.4.diff
tcl-8.6.diff python-destdir.diff freetype.diff)
md5sums=('264b0052e65bd6571a84727113508789'
'b6355063264cd56bcd1396c92f6ca59a'
@@ -33,6 +33,7 @@
'e992321c9d1def6034d0fa6607b40c5a'
'81922ea61989e5591135f233a0400694'
'4ff5668957336709dcd096fbac102558'
+ '731e870919314d7512a6586210e79165'
'a804a9f034e24ef1a8b28542c15ce1a1'
'f7aba715bcc10de93a6ecf1cd6b0c560'
'1e45b3664b395c70017ff46d3370c84d')
@@ -44,6 +45,7 @@
patch -Np1 -i "${srcdir}/ffmpeg-0.8.diff"
patch -Np1 -i "${srcdir}/ffmpeg-0.11.diff"
patch -Np1 -i "${srcdir}/ffmpeg-2.0.diff"
+ patch -Np1 -i "${srcdir}/ffmpeg-2.4.diff"
patch -Np1 -i "${srcdir}/tcl-8.6.diff"
patch -Np1 -i "${srcdir}/python-destdir.diff"
patch -Np1 -i "${srcdir}/freetype.diff"
Added: ffmpeg-2.4.diff
===================================================================
--- ffmpeg-2.4.diff (rev 0)
+++ ffmpeg-2.4.diff 2014-09-16 20:16:08 UTC (rev 119060)
@@ -0,0 +1,59 @@
+diff -rupN VTK5.10.1.orig/IO/vtkFFMPEGWriter.cxx VTK5.10.1/IO/vtkFFMPEGWriter.cxx
+--- VTK5.10.1.orig/IO/vtkFFMPEGWriter.cxx 2014-09-16 21:06:54.681786419 +0200
++++ VTK5.10.1/IO/vtkFFMPEGWriter.cxx 2014-09-16 21:36:23.589177218 +0200
+@@ -140,12 +140,13 @@ int vtkFFMPEGWriterInternal::Start()
+ strcpy(this->avFormatContext->filename, this->Writer->GetFileName());
+
+ //create a stream for that file
+- this->avStream = av_new_stream(this->avFormatContext, 0);
++ this->avStream = avformat_new_stream(this->avFormatContext, NULL);
+ if (!this->avStream)
+ {
+ vtkGenericWarningMacro (<< "Could not create video stream.");
+ return 0;
+ }
++ this->avStream->id = 0;
+
+ //Set up the codec.
+ AVCodecContext *c = this->avStream->codec;
+@@ -217,7 +218,7 @@ int vtkFFMPEGWriterInternal::Start()
+ }
+
+ //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." );
+@@ -234,7 +235,7 @@ int vtkFFMPEGWriterInternal::Start()
+ avpicture_fill((AVPicture *)this->rgbInput, rgb, 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." );
+@@ -314,12 +315,17 @@ int vtkFFMPEGWriterInternal::Write(vtkIm
+ }
+ #endif
+
+-
+ //run the encoder
+- int toAdd = avcodec_encode_video(cc,
+- this->codecBuf,
+- this->codecBufSize,
+- this->yuvOutput);
++ AVPacket avpacket;
++ int got_packet;
++ av_init_packet(&avpacket);
++ avpacket.data = this->codecBuf;
++ avpacket.size = this->codecBufSize;
++ int toAdd = avcodec_encode_video2(cc,
++ &avpacket,
++ this->yuvOutput,
++ &got_packet);
++ if (!toAdd && got_packet) toAdd = avpacket.size;
+
+ //dump the compressed result to file
+ if (toAdd)
More information about the arch-commits
mailing list