vtk7 is one of the (possiblly the) last blockers for the ffmpeg transition that is in testing and is not marked for autoremoval. The last 7.x upstream release was over 5 years ago. The last vtk7 upload by someone listed in "uploaders" was over 2 years ago. Since then the package has been kept on life-supportby team-uploads and a NMU.
Control: tags -1 upstream confirmed fixed-upstream https://gitlab.kitware.com/vtk/vtk/-/commit/34276346ac379fecbd615322f18de837bd2c9ea2
unfortunately it is not that simple, that upstream fix is for a much newer version of vtk and the code seems to have had major restructuring. I could not find any evidence of a vtk 7 branch in upstreams git repository It seems that if this code is to survive it needs to be ground through by someone with experiance with the code and with ffmpeg. I had a quick go, but it quickly became clear that it was non-triial andeven if I got it to compile I would have no idea how to test it. I've attatched a patch reflecting the state of my development tree at the point I gave up. I have not investigated whether it is feasible to build vtk7 without ffmpeg support. The following source packages or the binaries they produce declare relationships on vtk7 packages that do not have alternatives. depends and/or build-depends: binoculars camitk dune-grid facet-analyser gdcm mayavi2 nifti2dicom openems python-mne siconos vistrails vtk-dicom recommends: debian-science dipy suggests: debian-med In particular gdcm is a key package due to the fact that opencv build-depends on it.
Description: Support ffmpeg 5. This patch is inspired by https://gitlab.kitware.com/vtk/vtk/-/commit/34276346ac379fecbd615322f18de837bd2c9ea2 but practically rewritten due to differences between the two versions. Author: Peter Michael Green <plugw...@debian.org> --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: <vendor|upstream|other>, <url of original patch> Bug: <url in upstream bugtracker> Bug-Debian: https://bugs.debian.org/<bugnumber> Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> Forwarded: <no|not-needed|url proving that it has been forwarded> Reviewed-By: <name and email of someone who approved the patch> Last-Update: 2022-07-21 Index: vtk7-7.1.1+dfsg2.save/CMake/FindFFMPEG.cmake =================================================================== --- vtk7-7.1.1+dfsg2.save.orig/CMake/FindFFMPEG.cmake +++ vtk7-7.1.1+dfsg2.save/CMake/FindFFMPEG.cmake @@ -107,13 +107,14 @@ FFMPEG_FIND(LIBAVFORMAT avformat avforma FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h) FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h) FFMPEG_FIND(LIBAVUTIL avutil avutil.h) +FFMPEG_FIND(LIBSWRESAMPLE swresample swresample.h) FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here. SET(FFMPEG_FOUND "NO") # Note we don't check FFMPEG_LIBSWSCALE_FOUND, FFMPEG_LIBAVDEVICE_FOUND, # and FFMPEG_LIBAVUTIL_FOUND as they are optional. -IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND STDINT_OK) +IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBSWRESAMPLE_FOUND AND STDINT_OK) SET(FFMPEG_FOUND "YES") Index: vtk7-7.1.1+dfsg2.save/IO/FFMPEG/CMakeLists.txt =================================================================== --- vtk7-7.1.1+dfsg2.save.orig/IO/FFMPEG/CMakeLists.txt +++ vtk7-7.1.1+dfsg2.save/IO/FFMPEG/CMakeLists.txt @@ -22,7 +22,7 @@ set_source_files_properties( vtkFFMPEGWr ) set(_ffmpeg_libs ${FFMPEG_LIBAVFORMAT_LIBRARIES} ${FFMPEG_LIBAVCODEC_LIBRARIES} - ${FFMPEG_LIBAVUTIL_LIBRARIES} + ${FFMPEG_LIBAVUTIL_LIBRARIES} ${FFMPEG_LIBSWRESAMPLE_LIBRARIES} ) if(NOT VTK_FFMPEG_HAS_IMG_CONVERT) Index: vtk7-7.1.1+dfsg2.save/Examples/GUI/Qt/SimpleView/CMakeLists.txt =================================================================== --- vtk7-7.1.1+dfsg2.save.orig/Examples/GUI/Qt/SimpleView/CMakeLists.txt +++ vtk7-7.1.1+dfsg2.save/Examples/GUI/Qt/SimpleView/CMakeLists.txt @@ -1,104 +1 @@ -cmake_minimum_required(VERSION 2.8.8) -if(POLICY CMP0020) - cmake_policy(SET CMP0020 NEW) -endif() -if(POLICY CMP0025) - cmake_policy(SET CMP0025 NEW) # CMake 3.0 -endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 NEW) # CMake 3.0 -endif() -if(POLICY CMP0053) - cmake_policy(SET CMP0053 NEW) # CMake 3.1 -endif() -project(SimpleView) -find_package(VTK COMPONENTS - vtkCommonCore - vtkFiltersCore - vtkInfovisCore - vtkInteractionStyle - vtkViewsQt -) -include(${VTK_USE_FILE}) - -if("${VTK_QT_VERSION}" STREQUAL "") - message(FATAL_ERROR "VTK was not built with Qt") -endif() - -# Use the include path and library for Qt that is used by VTK. -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} -) - -# Set your files and resources here -set( Srcs main.cxx SimpleView.cxx ) - -set( Hdrs SimpleView.h ) - -set( MOC_Hdrs SimpleView.h ) - -set( UIs SimpleView.ui ) - -set( QRCs Icons/icons.qrc ) - - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) - -# The rest should just work (sure...) -if(VTK_QT_VERSION VERSION_GREATER "4") - # We have ui files, this will bring in the macro: qt5_wrap_ui - find_package(Qt5 COMPONENTS Widgets REQUIRED QUIET) - qt5_wrap_ui(UI_Srcs ${UIs}) - qt5_add_resources(QRC_Srcs ${QRCs} ) - - source_group("Resources" FILES - ${UIs} - ${QRCs} - ${EXE_ICON} # Not present - ) - - source_group("Generated" FILES - ${UI_Srcs} - ${MOC_Srcs} - ${QRC_Srcs} - ) - - add_executable(SimpleView MACOSX_BUNDLE - ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${QRC_Srcs}) - qt5_use_modules(SimpleView Core Gui Widgets) - target_link_libraries(SimpleView ${VTK_LIBRARIES}) -else() - find_package(Qt4 REQUIRED) - include(${QT_USE_FILE}) - # Use what VTK built with - set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "") - set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "") - set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "") - qt4_wrap_ui(UI_Srcs ${UIs}) - qt4_wrap_cpp(MOC_Srcs ${MOC_Hdrs} ) - qt4_add_resources(QRC_Srcs ${QRCs}) - - source_group("Resources" FILES - ${UIs} - ${QRCs} - ${EXE_ICON} # Not present - ) - - source_group("Generated" FILES - ${UI_Srcs} - ${QRC_Srcs} - ${QRC_Srcs} - ) - - add_definitions(-DQT_GUI_LIBS -DQT_CORE_LIB -DQT3_SUPPORT) - - add_executable(SimpleView MACOSX_BUNDLE - ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${QRC_Srcs}) - target_link_libraries(SimpleView - ${QT_LIBRARIES} - ${VTK_LIBRARIES} - ) -endif() Index: vtk7-7.1.1+dfsg2.save/GUISupport/QtOpenGL/module.cmake =================================================================== --- vtk7-7.1.1+dfsg2.save.orig/GUISupport/QtOpenGL/module.cmake +++ vtk7-7.1.1+dfsg2.save/GUISupport/QtOpenGL/module.cmake @@ -1,17 +1 @@ -if(VTK_RENDERING_BACKEND STREQUAL "OpenGL") - set(_groups GROUPS Qt) -endif() -vtk_module(vtkGUISupportQtOpenGL - ${_groups} - TEST_DEPENDS - vtkTestingCore - vtkTestingRendering - vtkFiltersSources - EXCLUDE_FROM_WRAPPING - DEPENDS - vtkCommonCore - vtkRendering${VTK_RENDERING_BACKEND} - PRIVATE_DEPENDS - vtkGUISupportQt - vtkInteractionStyle - ) \ No newline at end of file + Index: vtk7-7.1.1+dfsg2.save/GUISupport/QtWebkit/module.cmake =================================================================== --- vtk7-7.1.1+dfsg2.save.orig/GUISupport/QtWebkit/module.cmake +++ vtk7-7.1.1+dfsg2.save/GUISupport/QtWebkit/module.cmake @@ -1,16 +1 @@ -vtk_module(vtkGUISupportQtWebkit - TEST_DEPENDS - vtkTestingCore - EXCLUDE_FROM_WRAPPING - DEPENDS - vtkViewsQt - PRIVATE_DEPENDS - vtkCommonCore - vtkCommonDataModel - vtkCommonExecutionModel - vtkFiltersExtraction - vtkFiltersGeneral - vtkFiltersSources - vtkInfovisCore - vtkViewsCore - ) \ No newline at end of file + Index: vtk7-7.1.1+dfsg2.save/IO/FFMPEG/vtkFFMPEGWriter.cxx =================================================================== --- vtk7-7.1.1+dfsg2.save.orig/IO/FFMPEG/vtkFFMPEGWriter.cxx +++ vtk7-7.1.1+dfsg2.save/IO/FFMPEG/vtkFFMPEGWriter.cxx @@ -74,7 +74,7 @@ private: AVFormatContext *avFormatContext; - AVOutputFormat *avOutputFormat; + const AVOutputFormat *avOutputFormat; AVStream *avStream; @@ -130,7 +130,7 @@ int vtkFFMPEGWriterInternal::Start() this->closedFile = 0; //initialize libavcodec, and register all codecs and formats - av_register_all(); + //av_register_all(); // no longer needed since ffmpeg 4 according to https://github.com/leandromoreira/ffmpeg-libav-tutorial/issues/29 //create the format context that wraps all of the media output structures #if LIBAVFORMAT_VERSION_MAJOR >= 52 Index: vtk7-7.1.1+dfsg2.save/Rendering/Qt/module.cmake =================================================================== --- vtk7-7.1.1+dfsg2.save.orig/Rendering/Qt/module.cmake +++ vtk7-7.1.1+dfsg2.save/Rendering/Qt/module.cmake @@ -1,17 +1 @@ -vtk_module(vtkRenderingQt - GROUPS - Qt - TEST_DEPENDS - vtkTestingCore - DEPENDS - vtkCommonCore - vtkCommonExecutionModel - vtkRenderingCore - vtkRenderingLabel - PRIVATE_DEPENDS - vtkCommonDataModel - vtkCommonSystem - vtkFiltersSources - vtkFiltersTexture - vtkGUISupportQt - ) \ No newline at end of file + Index: vtk7-7.1.1+dfsg2.save/Views/Qt/module.cmake =================================================================== --- vtk7-7.1.1+dfsg2.save.orig/Views/Qt/module.cmake +++ vtk7-7.1.1+dfsg2.save/Views/Qt/module.cmake @@ -1,18 +1 @@ -vtk_module(vtkViewsQt - GROUPS - Qt - TEST_DEPENDS - vtkTestingCore - EXCLUDE_FROM_WRAPPING - DEPENDS - vtkCommonCore - vtkGUISupportQt - vtkViewsCore - vtkViewsInfovis - PRIVATE_DEPENDS - vtkCommonDataModel - vtkCommonExecutionModel - vtkFiltersExtraction - vtkFiltersGeneral - vtkInfovisCore - ) \ No newline at end of file +