Skip to content

Commit 10d676b

Browse files
committed
initial commit
0 parents  commit 10d676b

File tree

166 files changed

+60560
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+60560
-0
lines changed

CMakeLists.txt

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2+
3+
#--build type-------------------------------------------------------------------
4+
PROJECT(OpenDCP)
5+
SET(CMAKE_BUILD_TYPE Release)
6+
STRING(TOLOWER ${PROJECT_NAME} PACKAGE_NAME)
7+
#-------------------------------------------------------------------------------
8+
9+
#--version----------------------------------------------------------------------
10+
SET(VERSION_MAJOR 0)
11+
SET(VERSION_MINOR 28)
12+
SET(VERSION_BUILD 0)
13+
SET(OPENDCP_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD})
14+
SET(OPENDCP_NAME ${PROJECT_NAME})
15+
SET(OPENDCP_COPYRIGHT "(c) 2010-2013 Terrence Meiczinger. All rights reserved.")
16+
SET(OPENDCP_LICENSE "The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.")
17+
SET(OPENDCP_URL "http://www.opendcp.org")
18+
#-------------------------------------------------------------------------------
19+
20+
#--options----------------------------------------------------------------------
21+
OPTION(OPENDCP_VERSION "Set version" ${OPENDCP_VERSION})
22+
OPTION(ENABLE_XMLSEC "Enable XML digital singatures and security features" ON)
23+
OPTION(ENABLE_OPENMP "Enable OPENMP multithreading" ON)
24+
OPTION(ENABLE_GUI "Enable GUI compiling" ON)
25+
OPTION(ENABLE_DEBUG "Enable debug symbols" OFF)
26+
OPTION(GENERATE_LANGUAGE_FILES "Generate Translation files" OFF)
27+
OPTION(RPM "Create RPM package" OFF)
28+
OPTION(DEB "Create DEB package" OFF)
29+
#-------------------------------------------------------------------------------
30+
31+
#--check 32 or 64-bit-----------------------------------------------------------
32+
IF(CMAKE_SIZEOF_VOID_P MATCHES "8")
33+
SET(HOST_ARCH x86_64)
34+
ELSE()
35+
SET(HOST_ARCH i686)
36+
ENDIF()
37+
SET(TARGET_ARCH ${HOST_ARCH})
38+
#-------------------------------------------------------------------------------
39+
40+
#--set optional packages--------------------------------------------------------
41+
IF(ENABLE_XMLSEC)
42+
ADD_DEFINITIONS(-DXMLSEC)
43+
ADD_DEFINITIONS(-DLIBXML_STATIC)
44+
ADD_DEFINITIONS(-DLIBXSLT_STATIC)
45+
ADD_DEFINITIONS(-DXMLSEC_STATIC)
46+
ENDIF()
47+
48+
IF(ENABLE_OPENMP)
49+
ADD_DEFINITIONS(-DOPENMP)
50+
SET(OPENMP -fopenmp)
51+
ENDIF()
52+
53+
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
54+
#-------------------------------------------------------------------------------
55+
56+
#--cmake options----------------------------------------------------------------
57+
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
58+
#-------------------------------------------------------------------------------
59+
60+
#--set base compiler flags------------------------------------------------------
61+
IF(ENABLE_DEBUG)
62+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g}")
63+
ENDIF()
64+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -O3 ${OPENMP}")
65+
SET(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
66+
#-------------------------------------------------------------------------------
67+
68+
#--build paths------------------------------------------------------------------
69+
INCLUDE_DIRECTORIES(${OPENDCP_INCLUDE_DIR}/libopendcp
70+
${PROJECT_BINARY_DIR}/libopendcp/include
71+
${PROJECT_SOURCE_DIR}/libopendcp
72+
${PROJECT_SOURCE_DIR}/libopendcp/codecs
73+
${PROJECT_SOURCE_DIR}/libasdcp
74+
)
75+
SET(OPENDCP_LIB opendcp-lib)
76+
SET(ASDCP_LIBRARIES opendcp-asdcp opendcp-kumu)
77+
#-------------------------------------------------------------------------------
78+
79+
#--contrib paths----------------------------------------------------------------
80+
SET(PREFIX ${PROJECT_BINARY_DIR}/contrib)
81+
SET(PREFIX_ARG --prefix=${PREFIX})
82+
#-------------------------------------------------------------------------------
83+
84+
#--inlcude os specific----------------------------------------------------------
85+
IF (APPLE)
86+
INCLUDE("toolchains/osx.cmake")
87+
ELSEIF(WIN32)
88+
INCLUDE("toolchains/win32.cmake")
89+
ELSE()
90+
INCLUDE("toolchains/linux.cmake")
91+
ENDIF()
92+
#-------------------------------------------------------------------------------
93+
94+
MESSAGE(STATUS)
95+
MESSAGE(STATUS "================================================================================")
96+
MESSAGE(STATUS "OpenDCP Version ${OPENDCP_VERSION} CMake - ${CMAKE_SYSTEM_NAME} (${TARGET_ARCH})")
97+
MESSAGE(STATUS "================================================================================")
98+
99+
#--add source directories-------------------------------------------------------
100+
ADD_SUBDIRECTORY(contrib)
101+
ADD_SUBDIRECTORY(libasdcp)
102+
ADD_SUBDIRECTORY(libopendcp)
103+
ADD_SUBDIRECTORY(cli)
104+
IF(ENABLE_GUI)
105+
ADD_SUBDIRECTORY(gui)
106+
ENDIF()
107+
#-------------------------------------------------------------------------------
108+
109+
#--build packages---------------------------------------------------------------
110+
ADD_SUBDIRECTORY(packages)
111+
#-------------------------------------------------------------------------------
112+
113+
#--upload packages--------------------------------------------------------------
114+
ADD_SUBDIRECTORY(upload)
115+
#-------------------------------------------------------------------------------

CMakeModules/FindASDCP.cmake

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# - Try to find libASDCP
2+
# Once done, this will define
3+
#
4+
# ASDCP_FOUND - system has asdcplib
5+
# ASDCP_INCLUDE_DIRS - the asdcplib include directories
6+
# ASDCP_LIBRARIES - link these to use asdcplib
7+
8+
9+
# Include dir
10+
find_path(ASDCP_INCLUDE_DIR
11+
NAMES AS_DCP.h
12+
)
13+
14+
find_path(KUMU_INCLUDE_DIR
15+
NAMES KM_error.h
16+
)
17+
18+
# Finally the library itself
19+
find_library(ASDCP_LIBRARY
20+
NAMES asdcp
21+
)
22+
find_library(KUMU_LIBRARY
23+
NAMES kumu
24+
)
25+
26+
INCLUDE(FindPackageHandleStandardArgs)
27+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASDCP DEFAULT_MSG ASDCP_LIBRARY ASDCP_INCLUDE_DIR)
28+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(KUMU DEFAULT_MSG KUMU_LIBRARY KUMU_INCLUDE_DIR)
29+
30+
IF(ASDCP_FOUND AND KUMU_FOUND)
31+
SET(ASDCP_LIBRARIES ${ASDCP_LIBRARY} ${KUMU_LIBRARY})
32+
ENDIF(ASDCP_FOUND AND KUMU_FOUND)

CMakeModules/FindLibXml2.cmake

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# - Try to find LibXml2
2+
# Once done this will define
3+
#
4+
# LIBXML2_FOUND - System has LibXml2
5+
# LIBXML2_INCLUDE_DIR - The LibXml2 include directory
6+
# LIBXML2_LIBRARIES - The libraries needed to use LibXml2
7+
# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
8+
# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
9+
10+
# Copyright (c) 2006, Alexander Neundorf, <[email protected]>
11+
#
12+
# Redistribution and use is allowed according to the terms of the BSD license.
13+
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
14+
15+
16+
IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
17+
# in cache already
18+
SET(LibXml2_FIND_QUIETLY TRUE)
19+
ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
20+
21+
IF (NOT WIN32)
22+
# use pkg-config to get the directories and then use these values
23+
# in the FIND_PATH() and FIND_LIBRARY() calls
24+
FIND_PACKAGE(PkgConfig)
25+
PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
26+
SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
27+
ENDIF (NOT WIN32)
28+
29+
FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
30+
HINTS
31+
${PC_LIBXML_INCLUDEDIR}
32+
${PC_LIBXML_INCLUDE_DIRS}
33+
PATH_SUFFIXES libxml2
34+
)
35+
36+
FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
37+
HINTS
38+
${PC_LIBXML_LIBDIR}
39+
${PC_LIBXML_LIBRARY_DIRS}
40+
PATH_SUFFIXES
41+
x86_64-linux-gnu
42+
i386-linux-gnu
43+
44+
)
45+
46+
FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
47+
# for backwards compat. with KDE 4.0.x:
48+
SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
49+
50+
INCLUDE(FindPackageHandleStandardArgs)
51+
52+
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
53+
# all listed variables are TRUE
54+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
55+
56+
MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)

CMakeModules/FindOpenJPEG.cmake

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# - Try to find libOPENJPEG
2+
# Once done, this will define
3+
#
4+
# OPENJPEG_FOUND - system has asdcplib
5+
# OPENJPEG_INCLUDE_DIRS - the asdcplib include directories
6+
# OPENJPEG_LIBRARIES - link these to use asdcplib
7+
8+
# Include dir
9+
FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h
10+
/usr/local/include/openjpeg
11+
/usr/local/include
12+
/usr/include/openjpeg
13+
/usr/include/openjpeg-1.5
14+
/usr/include
15+
)
16+
17+
SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg)
18+
FIND_LIBRARY(OPENJPEG_LIBRARY
19+
NAMES ${OPENJPEG_NAMES}
20+
PATHS /usr/lib /usr/local/lib
21+
)
22+
23+
IF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
24+
SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY})
25+
SET(OPENJPEG_FOUND "YES")
26+
ELSE (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
27+
SET(OPENJPEG_FOUND "NO")
28+
ENDIF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
29+
30+
31+
IF (OPENJPEG_FOUND)
32+
IF (NOT OPENJPEG_FIND_QUIETLY)
33+
MESSAGE(STATUS "Found OpenJPEG: ${OPENJPEG_LIBRARIES}")
34+
ENDIF (NOT OPENJPEG_FIND_QUIETLY)
35+
ELSE (OPENJPEG_FOUND)
36+
IF (OPENJPEG_FIND_REQUIRED)
37+
MESSAGE(FATAL_ERROR "Could not find OpenJPEG library")
38+
ENDIF (OPENJPEG_FIND_REQUIRED)
39+
ENDIF (OPENJPEG_FOUND)
40+
41+
# Deprecated declarations.
42+
SET (NATIVE_OPENJPEG_INCLUDE_PATH ${OPENJPEG_INCLUDE_DIR} )
43+
GET_FILENAME_COMPONENT (NATIVE_OPENJPEG_LIB_PATH ${OPENJPEG_LIBRARY} PATH)

CMakeModules/FindXMLSec.cmake

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Find the LibXMLSec digital siginature library
2+
#
3+
# XMLSEC1_FOUND - System has LibXMLSec
4+
# XMLSEC1_INCLUDE_DIR - The LibXMLSec include directory
5+
# XMLSEC1_LIBRARIES - The libraries needed to use LibXMLSec
6+
# XMLSEC1_DEFINITIONS - Compiler switches required for using LibXMLSec
7+
#=============================================================================
8+
9+
# use pkg-config to get the directories and then use these values
10+
# in the FIND_PATH() and FIND_LIBRARY() calls
11+
FIND_PACKAGE(PkgConfig)
12+
PKG_CHECK_MODULES(PC_XMLSEC1 xmlsec1 QUIET)
13+
PKG_CHECK_MODULES(PC_XMLSEC1-OPENSSL xmlsec1-openssl QUIET)
14+
SET(XMLSEC1_DEFINITIONS ${PC_XMLSEC1_CFLAGS_OTHER})
15+
SET(XMLSEC1-OPENSSL_DEFINITIONS ${PC_XMLSEC1-OPENSSL_CFLAGS_OTHER})
16+
17+
FIND_PATH(XMLSEC1_INCLUDE_DIR NAMES xmlsec/xmlsec.h
18+
HINTS
19+
${PC_XMLSEC1_INCLUDEDIR}
20+
${PC_XMLSEC1_INCLUDE_DIRS}
21+
PATH_SUFFIXES xmlsec1
22+
)
23+
24+
FIND_PATH(XMLSEC1-OPENSSL_INCLUDE_DIR NAMES xmlsec/openssl/crypto.h
25+
HINTS
26+
${PC_XMLSEC1-OPENSSL_INCLUDEDIR}
27+
${PC_XMLSEC1-OPENSSL_INCLUDE_DIRS}
28+
PATH_SUFFIXES xmlsec1
29+
)
30+
31+
FIND_LIBRARY(XMLSEC1_LIBRARIES NAMES xmlsec1
32+
HINTS
33+
${PC_XMLSEC1_LIBDIR}
34+
${PC_XMLSEC1_LIBRARY_DIRS}
35+
)
36+
37+
FIND_LIBRARY(XMLSEC1-OPENSSL_LIBRARIES NAMES xmlsec1-openssl
38+
HINTS
39+
${PC_XMLSEC1_LIBDIR}
40+
${PC_XMLSEC1_LIBRARY_DIRS}
41+
)
42+
43+
# handle the QUIETLY and REQUIRED arguments and set XMLSEC1_FOUND to TRUE if
44+
# all listed variables are TRUE
45+
INCLUDE(FindPackageHandleStandardArgs)
46+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXMLSec DEFAULT_MSG XMLSEC1_LIBRARIES XMLSEC1-OPENSSL_LIBRARIES XMLSEC1_INCLUDE_DIR XMLSEC1-OPENSSL_INCLUDE_DIR)
47+
MARK_AS_ADVANCED(XMLSEC1_INCLUDE_DIR XMLSEC1-OPENSSL_INCLUDE_DIR XMLSEC1_LIBRARIES XMLSEC1-OPENSSL_LIBRARIES )

COMPILE.txt

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
OpenDCP
2+
------------
3+
This program builds the XML files for Digital Cinema Packages.
4+
5+
Requirements
6+
------------
7+
The program requires the following libraries. The versions listed are the ones tested with OpenDCP.
8+
Other versions may work, except where indicated.
9+
10+
Library Version Tested Minimum Required Website
11+
------- -------------- ---------------- -------
12+
AS-DCP File Access Library** 1.8.41 1.7.40 http://www.cinecert.com/asdcplib
13+
OpenSSL 0.9.8 0.9.8 http://www.openssl.org/docs/crypto/crypto.html
14+
LibXML2* 2.7.8 2.7.8 http://xmlsoft.org
15+
LibXSLT* 1.1.26 1.1.26 http://xmlsoft.org
16+
LibXMLSec* 1.2.16 1.2.16 http://www.aleksey.com/xmlsec
17+
LibTIFF 3.9.4 http://www.libtiff.org
18+
~ OpenJPEG** 1.4.0 1.3 http://www.openjpeg.org
19+
QT4*** 4.8.0 4.7.0 http://qt.nokia.com
20+
21+
* Optional, if you want XML signatures
22+
** OpenDCP .20 uses locally compile version of these libraries
23+
*** Optional, if you want to compile the GUI
24+
25+
Mac OS X and many linux distributions already have OpenSSL (libcrypto) installed.
26+
27+
Cmake
28+
------------
29+
CMake is used to build this application. You may need to install CMake.
30+
Most linux distributions have CMake installed or have it available through the package manager.
31+
On Mac OSX and Windows, CMake is easily installed from http://www.cmake.org/
32+
33+
Compile
34+
------------
35+
It is recommended you perform an out-of-source build. This will prevent cluttering the source directory.
36+
This can be performed from anywhere, just give cmake the path to the root directory of the OpenDCP source.
37+
38+
For example, if the OpenDCP source is in /home/opendcp, but you want to build in /home/opendcp-build
39+
40+
$ cd /home/opendcp-build
41+
$ cmake /home/opendcp/
42+
43+
By default XMLSEC libraries are enabled, but to simplify compiling you can disable it.
44+
45+
$ cmake -DENABLE_XMLSEC=OFF /home/opendcp
46+
47+
If you wish to compile the GUI (see note below), enable the GUI flag
48+
49+
$ cmake -DENABLE_GUI=ON /home/opendcp
50+
51+
Once cmake completes, you should have the necessary make files. To compile issue the make command.
52+
53+
$ make
54+
55+
You should end up with opendcp_xml, opendcp_xml, opendc_xml_verify (if XMLSEC enabled) opendcp_j2k
56+
in the cli directory of the build tree.
57+
58+
GUI
59+
------------
60+
If you wish to compile the GUI, you will need install QT4 development and runtime
61+
libraries (4.7 or higher). On Linux you can usually install this through the package manager.
62+
Otherwise, you can download it from http://qt.nokia.com/.
63+
64+
GUI compiling is enabled by default, to disable it pass -DENABLE_GUI=OFF to cmake.
65+
66+
Install
67+
------------
68+
You can install OpenDCP so you can invoke the command from anywhere. The behavior of where
69+
the binaries are installed varies between OSes.
70+
71+
# make install
72+
73+
Packages
74+
------------
75+
You can also create package/installers. Windows and OSX are detected automatically,
76+
but when compiling under linux you need to specify whether you want DEB or RPMS. This
77+
is done by passing -DRPM=ON or -DDEB=ON during the initial cmake.
78+
79+
To then build the package:
80+
81+
# make package

CONTRIBUTIONS.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
There have been many people who have helped with OpenDCP in various ways.
2+
This is by no means a complete list. It is ever growing, but for now...
3+
4+
Wolfgang Woehl
5+
Yuri Mamaev
6+
Luca Trisciani
7+
Stephen van Vuuren
8+
Chris Young
9+
Andrew Hunter
10+
11+
Translations:
12+
French - Gérald Maruccia
13+
Spanish - Petter Brox

0 commit comments

Comments
 (0)