From b61e99df05347575ca5fa3bf380056a8ae2ceb3e Mon Sep 17 00:00:00 2001 From: Utkarsh Ayachit Date: Wed, 22 May 2013 14:29:28 -0400 Subject: [PATCH 1/3] Cleaning up enabling of FFMPEG. FFMPEG support was not getting enabled due to buggy logic. Cleaned that up. Now, when PARAVIEW_ENABLE_FFMPEG is ON, we require VTK's FFMPEG support modules and enable *.avi support. This replaces VTK_HAS_FFMPEG_SUPPORT with PARAVIEW_ENABLE_FFMPEG in vtkPVConfig.h. Change-Id: I047f1143857468542a448d90a0dc58b1be8a0d1a --- CMake/VTKModules.cmake | 4 ++-- CMakeLists.txt | 4 ---- ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx | 2 +- .../ServerManager/Default/vtkSMAnimationSceneImageWriter.cxx | 4 ++-- vtkPVConfig.h.in | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/CMake/VTKModules.cmake b/CMake/VTKModules.cmake index 74e6133e8ce..a7596d9cd93 100644 --- a/CMake/VTKModules.cmake +++ b/CMake/VTKModules.cmake @@ -351,11 +351,11 @@ if (PARAVIEW_ENABLE_PYTHON) endif() if (PARAVIEW_ENABLE_FFMPEG) - list(APPEND extra_depends vtkIOFFMPEG) + list(APPEND _vtk_modules vtkIOFFMPEG) endif() if (NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^XL$") - list(APPEND extra_depends vtkoggtheora) + list(APPEND _vtk_modules vtkoggtheora) endif() # Any module can import this file and add DEPENDS or COMPILE_DEPENDS on this diff --git a/CMakeLists.txt b/CMakeLists.txt index e204c35f661..a2bd5b1eb6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -517,10 +517,6 @@ mark_as_advanced( # FIXME: VTK_HAS_* variables need to be removed, it's not wise to enable # ParaView components based on if something was enabled in VTK or not. set (VTK_HAS_OGGTHEORA_SUPPORT FALSE) -set (VTK_HAS_FFMPEG_SUPPORT FALSE) -if (TARGET vtkIOFFMPEG AND PARAVIEW_ENABLE_FFMPEG) - set (VTK_HAS_FFMPEG_SUPPORT TRUE) -endif() if (TARGET vtkoggtheora) set (VTK_HAS_OGGTHEORA_SUPPORT TRUE) endif() diff --git a/ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx b/ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx index 51a7228a956..2851cdcca71 100644 --- a/ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx +++ b/ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx @@ -51,7 +51,7 @@ vtkPVServerInformation::vtkPVServerInformation() #if defined(_WIN32) this->AVISupport = 1; #else -# if defined(VTK_HAS_FFMPEG_SUPPORT) +# if defined(PARAVIEW_ENABLE_FFMPEG) this->AVISupport = 1; # endif #endif diff --git a/ParaViewCore/ServerManager/Default/vtkSMAnimationSceneImageWriter.cxx b/ParaViewCore/ServerManager/Default/vtkSMAnimationSceneImageWriter.cxx index 7902667226f..f62bb86e051 100644 --- a/ParaViewCore/ServerManager/Default/vtkSMAnimationSceneImageWriter.cxx +++ b/ParaViewCore/ServerManager/Default/vtkSMAnimationSceneImageWriter.cxx @@ -45,7 +45,7 @@ #ifdef _WIN32 # include "vtkAVIWriter.h" #else -# ifdef VTK_HAS_FFMPEG_SUPPORT +# ifdef PARAVIEW_ENABLE_FFMPEG # include "vtkFFMPEGWriter.h" # endif #endif @@ -345,7 +345,7 @@ bool vtkSMAnimationSceneImageWriter::CreateWriter() mwriter = avi; } #else -# ifdef VTK_HAS_FFMPEG_SUPPORT +# ifdef PARAVIEW_ENABLE_FFMPEG else if (extension == ".avi") { vtkFFMPEGWriter *aviwriter = vtkFFMPEGWriter::New(); diff --git a/vtkPVConfig.h.in b/vtkPVConfig.h.in index 94c1c9a893b..370ee3eb88a 100644 --- a/vtkPVConfig.h.in +++ b/vtkPVConfig.h.in @@ -88,7 +88,7 @@ // and double to string #define DEFAULT_DOUBLE_PRECISION_VALUE 16 -#cmakedefine VTK_HAS_FFMPEG_SUPPORT +#cmakedefine PARAVIEW_ENABLE_FFMPEG #cmakedefine VTK_HAS_OGGTHEORA_SUPPORT #cmakedefine PARAVIEW_USE_PISTON From 6230007db27edc8c5fa93897d2351c6f7611b880 Mon Sep 17 00:00:00 2001 From: Utkarsh Ayachit Date: Wed, 22 May 2013 15:17:31 -0400 Subject: [PATCH 2/3] Cleanup OggTheora support. ParaView wasn't detecting that OggTheora was enabled when using system-oggtheora since we were checking for the present of a target which is only created when not using system OggTheora. This fixes that issue. Change-Id: I643cb2bd1c18b9abc0e695c856b6786970a0ea5f --- CMake/VTKModules.cmake | 4 ---- CMakeLists.txt | 7 ------- .../Core/vtkPVServerInformation.cxx | 17 +++++++++++++---- .../Default/vtkSMAnimationSceneImageWriter.cxx | 1 + VTK | 2 +- vtkPVConfig.h.in | 1 - 6 files changed, 15 insertions(+), 17 deletions(-) diff --git a/CMake/VTKModules.cmake b/CMake/VTKModules.cmake index a7596d9cd93..d2c176598a1 100644 --- a/CMake/VTKModules.cmake +++ b/CMake/VTKModules.cmake @@ -354,10 +354,6 @@ if (PARAVIEW_ENABLE_FFMPEG) list(APPEND _vtk_modules vtkIOFFMPEG) endif() -if (NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^XL$") - list(APPEND _vtk_modules vtkoggtheora) -endif() - # Any module can import this file and add DEPENDS or COMPILE_DEPENDS on this # list of modules to ensure that these are enabled when the corresponding module # is enabled. diff --git a/CMakeLists.txt b/CMakeLists.txt index a2bd5b1eb6d..08b8f6a3a43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -514,13 +514,6 @@ mark_as_advanced( # Based on state of VTK modules, set up some variables that paraview needs to # compile optional code. -# FIXME: VTK_HAS_* variables need to be removed, it's not wise to enable -# ParaView components based on if something was enabled in VTK or not. -set (VTK_HAS_OGGTHEORA_SUPPORT FALSE) -if (TARGET vtkoggtheora) - set (VTK_HAS_OGGTHEORA_SUPPORT TRUE) -endif() - configure_file( ${ParaView_SOURCE_DIR}/vtkPVConfig.h.in ${ParaView_BINARY_DIR}/vtkPVConfig.h diff --git a/ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx b/ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx index 2851cdcca71..ac38c3144aa 100644 --- a/ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx +++ b/ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx @@ -25,6 +25,17 @@ #include "vtkPVSession.h" #include "vtkCompositeMultiProcessController.h" +// ------------------------ +// NOTE for OGVSupport +// ------------------------ +// Ideally, we should include vtkIOMovieConfigure to determine if OGGTHEORA +// support has been enabled. However, this module cannot depend on vtkIOMovie +// (for Catalyst builds). Also, since vtkOggTheoraWriter is used in +// vtkPVServerManagerDefault module which adds a hard dependency on vtkIOMovie +// module, that can indeed check is OGGTHEORA support is available. So it's +// reasonably safe to assume OGGTHEORA is always enabled here. +// #include "vtkIOMovieConfigure.h" + vtkStandardNewMacro(vtkPVServerInformation); //---------------------------------------------------------------------------- @@ -55,11 +66,9 @@ vtkPVServerInformation::vtkPVServerInformation() this->AVISupport = 1; # endif #endif -#if defined(VTK_HAS_OGGTHEORA_SUPPORT) + + // Refer to note at the top of this file abount OGVSupport. this->OGVSupport = 1; -#else - this->OGVSupport = 0; -#endif this->RenderModuleName = NULL; this->MachinesInternals = new vtkPVServerOptionsInternals; diff --git a/ParaViewCore/ServerManager/Default/vtkSMAnimationSceneImageWriter.cxx b/ParaViewCore/ServerManager/Default/vtkSMAnimationSceneImageWriter.cxx index f62bb86e051..57b692ef0e6 100644 --- a/ParaViewCore/ServerManager/Default/vtkSMAnimationSceneImageWriter.cxx +++ b/ParaViewCore/ServerManager/Default/vtkSMAnimationSceneImageWriter.cxx @@ -50,6 +50,7 @@ # endif #endif +#include "vtkIOMovieConfigure.h" // for VTK_HAS_OGGTHEORA_SUPPORT #ifdef VTK_HAS_OGGTHEORA_SUPPORT # include "vtkOggTheoraWriter.h" #endif diff --git a/VTK b/VTK index 443af9faa8b..227749cb70a 160000 --- a/VTK +++ b/VTK @@ -1 +1 @@ -Subproject commit 443af9faa8b05b41e627014647b2b5e34ef6e864 +Subproject commit 227749cb70ab5478b2e6514546d3cd6d8e007dba diff --git a/vtkPVConfig.h.in b/vtkPVConfig.h.in index 370ee3eb88a..551452c7884 100644 --- a/vtkPVConfig.h.in +++ b/vtkPVConfig.h.in @@ -89,7 +89,6 @@ #define DEFAULT_DOUBLE_PRECISION_VALUE 16 #cmakedefine PARAVIEW_ENABLE_FFMPEG -#cmakedefine VTK_HAS_OGGTHEORA_SUPPORT #cmakedefine PARAVIEW_USE_PISTON From ff234a2e5faf27c1ec4fbefc7da9fe9d1c228824 Mon Sep 17 00:00:00 2001 From: Utkarsh Ayachit Date: Thu, 23 May 2013 10:09:05 -0400 Subject: [PATCH 3/3] Fix FFMPEG module dependencies. vtkPVServerManagerDefault needs to depend on vtkIOFFMPEG. Fixed that. Also removing the now redundant dependency on vtkIOFFMPEG in VTKModules.cmake. Change-Id: I6ce71ca0d4b1a0cca02924da1b6fd7d0f0511793 --- CMake/VTKModules.cmake | 4 ---- ParaViewCore/ServerManager/Default/module.cmake | 9 ++++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CMake/VTKModules.cmake b/CMake/VTKModules.cmake index d2c176598a1..e970804beeb 100644 --- a/CMake/VTKModules.cmake +++ b/CMake/VTKModules.cmake @@ -350,10 +350,6 @@ if (PARAVIEW_ENABLE_PYTHON) list (APPEND _vtk_modules vtkRenderingMatplotlib) endif() -if (PARAVIEW_ENABLE_FFMPEG) - list(APPEND _vtk_modules vtkIOFFMPEG) -endif() - # Any module can import this file and add DEPENDS or COMPILE_DEPENDS on this # list of modules to ensure that these are enabled when the corresponding module # is enabled. diff --git a/ParaViewCore/ServerManager/Default/module.cmake b/ParaViewCore/ServerManager/Default/module.cmake index 4cfcf5d3762..af806b4a4bf 100644 --- a/ParaViewCore/ServerManager/Default/module.cmake +++ b/ParaViewCore/ServerManager/Default/module.cmake @@ -1,3 +1,9 @@ +# If FFMPEG support is enabled, we need to depend on FFMPEG. +set (__extra_dependencies) +if (PARAVIEW_ENABLE_FFMPEG) + list(APPEND __extra_dependencies vtkIOFFMPEG) +endif() + vtk_module(vtkPVServerManagerDefault DEPENDS vtkIOMovie @@ -6,9 +12,10 @@ vtk_module(vtkPVServerManagerDefault vtkPVServerManagerRendering vtkRenderingVolumeOpenGL vtkTestingRendering + ${__extra_dependencies} TEST_DEPENDS vtkPVServerManagerApplication TEST_LABELS PARAVIEW ) -unset(extra_depends) +unset(__extra_dependencies)