Skip to content

Commit

Permalink
Cleaning up enabling of FFMPEG.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
utkarshayachit committed May 22, 2013
1 parent 29651c8 commit b61e99d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CMake/VTKModules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#ifdef _WIN32
# include "vtkAVIWriter.h"
#else
# ifdef VTK_HAS_FFMPEG_SUPPORT
# ifdef PARAVIEW_ENABLE_FFMPEG
# include "vtkFFMPEGWriter.h"
# endif
#endif
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion vtkPVConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b61e99d

Please sign in to comment.