MantisBT - VTK
View Issue Details
0016001VTK(No Category)public2016-02-16 11:422016-07-06 10:41
Morgulis 
Utkarsh Ayachit 
highminorhave not tried
closedfixed 
 
7.1.0 
TBD
incorrect functionality
0016001: VTK fails to compile with FFmpeg 3.0
ffmpeg 3.0 has recently been released. I am trying to compile VTK 7 and it fails. Here is compilation error:


[10043/22348] Building CXX object IO/FFMPEG/CMakeFiles/vtkIOFFMPEG.dir/vtkFFMPEGWriter.cxx.o
[10044/22348] Tcl Wrapping - generating vtkOggTheoraWriterTcl.cxx
[10045/22348] Building CXX object IO/Movie/CMakeFiles/vtkIOMovieTCL.dir/vtkIOMovieTCLInit.cxx.o
FAILED: /usr/bin/c++ -DVTK_IN_VTK -DvtkIOFFMPEG_EXPORTS -D__STDC_CONSTANT_MACROS -IIO/Movie -I/build/vtk/src/VTK-7.0.0/IO/Movie -ICommon/DataModel -I/build/vtk/src/VTK-7.0.0/Common/DataModel -ICommon/Math -I/build/vtk/src/VTK-7.0.0/Common/Math -ICommon/Core -I/build/vtk/src/VTK-7.0.0/Common/Core -IUtilities/KWSys -I/build/vtk/src/VTK-7.0.0/Utilities/KWSys -ICommon/Misc -I/build/vtk/src/VTK-7.0.0/Common/Misc -ICommon/System -I/build/vtk/src/VTK-7.0.0/Common/System -ICommon/Transforms -I/build/vtk/src/VTK-7.0.0/Common/Transforms -ICommon/ExecutionModel -I/build/vtk/src/VTK-7.0.0/Common/ExecutionModel -IIO/Core -I/build/vtk/src/VTK-7.0.0/IO/Core -IThirdParty/zlib -I/build/vtk/src/VTK-7.0.0/ThirdParty/zlib -IThirdParty/oggtheora -I/build/vtk/src/VTK-7.0.0/ThirdParty/oggtheora -IIO/FFMPEG -I/build/vtk/src/VTK-7.0.0/IO/FFMPEG -D__STDC_CONSTANT_MACROS -O3 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MMD -MT IO/FFMPEG/CMakeFiles/vtkIOFFMPEG.dir/vtkFFMPEGWriter.cxx.o -MF IO/FFMPEG/CMakeFiles/vtkIOFFMPEG.dir/vtkFFMPEGWriter.cxx.o.d -o IO/FFMPEG/CMakeFiles/vtkIOFFMPEG.dir/vtkFFMPEGWriter.cxx.o -c /build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx
/build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx: In member function 'int vtkFFMPEGWriterInternal::Start()':
/build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx:194:18: error: 'PIX_FMT_YUVJ422P' was not declared in this scope
     c->pix_fmt = PIX_FMT_YUVJ422P;
                  ^
/build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx:198:18: error: 'PIX_FMT_BGR24' was not declared in this scope
     c->pix_fmt = PIX_FMT_BGR24;
                  ^
/build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx:277:40: error: 'avcodec_alloc_frame' was not declared in this scope
   this->rgbInput = avcodec_alloc_frame();
                                        ^
/build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx:283:36: error: 'PIX_FMT_RGB24' was not declared in this scope
   int RGBsize = avpicture_get_size(PIX_FMT_RGB24, c->width, c->height);
                                    ^
/build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx: In member function 'int vtkFFMPEGWriterInternal::Write(vtkImageData*)':
/build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx:357:28: error: 'PIX_FMT_RGB24' was not declared in this scope
     cc->width, cc->height, PIX_FMT_RGB24,
                            ^
/build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx: In member function 'int vtkFFMPEGWriterInternal::Start()':
/build/vtk/src/VTK-7.0.0/IO/FFMPEG/vtkFFMPEGWriter.cxx:326:53: warning: ignoring return value of 'int avformat_write_header(AVFormatContext*, AVDictionary**)', declared with attribute warn_unused_result [-Wunused-result]
   avformat_write_header(this->avFormatContext, NULL);
                                                     ^
ninja: build stopped: subcommand failed.
No tags attached.
patch ffmpeg3_compat.patch (2,347) 2016-02-17 17:12
https://www.vtk.org/Bug/file/10045/ffmpeg3_compat.patch
Issue History
2016-02-16 11:42MorgulisNew Issue
2016-02-17 17:12MorgulisNote Added: 0035748
2016-02-17 17:12MorgulisFile Added: ffmpeg3_compat.patch
2016-07-06 10:23Utkarsh AyachitAssigned To => Utkarsh Ayachit
2016-07-06 10:40Utkarsh AyachitNote Added: 0036163
2016-07-06 10:41Utkarsh AyachitStatusbacklog => closed
2016-07-06 10:41Utkarsh AyachitResolutionopen => fixed
2016-07-06 10:41Utkarsh AyachitFixed in Version => 7.1.0

Notes
(0035748)
Morgulis   
2016-02-17 17:12   
Given patch makes ffmpeg3.0 compile errors go away.
(0036163)
Utkarsh Ayachit   
2016-07-06 10:40   
Fixed by https://gitlab.kitware.com/vtk/vtk/commit/ffb53e9b53099cac99b8d0e6021d5a476b9ecf12 [^]