Skip to content

Commit

Permalink
Merge topic 'fix_ffmpeg_support'
Browse files Browse the repository at this point in the history
ff234a2 Fix FFMPEG module dependencies.
6230007 Cleanup OggTheora support.
b61e99d Cleaning up enabling of FFMPEG.
  • Loading branch information
utkarshayachit authored and kwrobot committed May 24, 2013
2 parents 66ca300 + ff234a2 commit 35601ff
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 30 deletions.
8 changes: 0 additions & 8 deletions CMake/VTKModules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,6 @@ if (PARAVIEW_ENABLE_PYTHON)
list (APPEND _vtk_modules vtkRenderingMatplotlib)
endif()

if (PARAVIEW_ENABLE_FFMPEG)
list(APPEND extra_depends vtkIOFFMPEG)
endif()

if (NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^XL$")
list(APPEND extra_depends 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.
Expand Down
11 changes: 0 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -514,17 +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)
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()

configure_file(
${ParaView_SOURCE_DIR}/vtkPVConfig.h.in
${ParaView_BINARY_DIR}/vtkPVConfig.h
Expand Down
19 changes: 14 additions & 5 deletions ParaViewCore/ClientServerCore/Core/vtkPVServerInformation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

//----------------------------------------------------------------------------
Expand All @@ -51,15 +62,13 @@ 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
#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;
Expand Down
9 changes: 8 additions & 1 deletion ParaViewCore/ServerManager/Default/module.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -6,9 +12,10 @@ vtk_module(vtkPVServerManagerDefault
vtkPVServerManagerRendering
vtkRenderingVolumeOpenGL
vtkTestingRendering
${__extra_dependencies}
TEST_DEPENDS
vtkPVServerManagerApplication
TEST_LABELS
PARAVIEW
)
unset(extra_depends)
unset(__extra_dependencies)
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@
#ifdef _WIN32
# include "vtkAVIWriter.h"
#else
# ifdef VTK_HAS_FFMPEG_SUPPORT
# ifdef PARAVIEW_ENABLE_FFMPEG
# include "vtkFFMPEGWriter.h"
# endif
#endif

#include "vtkIOMovieConfigure.h" // for VTK_HAS_OGGTHEORA_SUPPORT
#ifdef VTK_HAS_OGGTHEORA_SUPPORT
# include "vtkOggTheoraWriter.h"
#endif
Expand Down Expand Up @@ -345,7 +346,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 VTK
Submodule VTK updated from 443af9 to 227749
3 changes: 1 addition & 2 deletions vtkPVConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@
// and double to string
#define DEFAULT_DOUBLE_PRECISION_VALUE 16

#cmakedefine VTK_HAS_FFMPEG_SUPPORT
#cmakedefine VTK_HAS_OGGTHEORA_SUPPORT
#cmakedefine PARAVIEW_ENABLE_FFMPEG

#cmakedefine PARAVIEW_USE_PISTON

Expand Down

0 comments on commit 35601ff

Please sign in to comment.