Initial check-in of OpenShot Library

This commit is contained in:
Jonathan Thomas
2011-10-11 08:44:27 -05:00
commit 161e8923af
66 changed files with 12842 additions and 0 deletions

597
.cproject Normal file

File diff suppressed because it is too large Load Diff

88
.project Normal file
View File

@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OpenShotLibrary</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/OpenShotLibrary/build}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>false</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

7
.pydevproject Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
</pydev_project>

1
AUTHORS Normal file
View File

@@ -0,0 +1 @@
Jonathan Thomas <jonathan.oomph@gmail.com>

19
CMakeLists.txt Normal file
View File

@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 2.6)
################ ADD CMAKE MODULES ##################
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
################### SETUP PROJECT ###################
project(openshot)
set(PROJECT_VERSION 1.3.0)
message("<< Generating build files for ${PROJECT_NAME} (${PROJECT_VERSION}) >>")
############## PROCESS SUB-DIRECTORIES ##############
add_subdirectory(src)
add_subdirectory(tests)
################### DOCUMENTATION ###################
# Find Doxygen (used for documentation)
include(cmake/Modules/UseDoxygen.cmake)

622
COPYING Normal file

File diff suppressed because it is too large Load Diff

1510
Doxyfile.in Normal file

File diff suppressed because it is too large Load Diff

63
README Normal file
View File

@@ -0,0 +1,63 @@
OpenShot Video Library is a program that creates, modifies, and edits video files.
Copyright (C) 2011 Jonathan Thomas
OpenShot Video Editor is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenShot Video Editor is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenShot Video Editor. If not, see <http://www.gnu.org/licenses/>.
#################
INSTALLATION
#################
Please see /doc/InstallationGuide.pdf for a very detailed
Linux and Windows compiling instruction guide.
#################
WEBSITES
#################
http://www.openshotvideo.com/ (PROJECT WEBSITE and BLOG)
http://launchpad.net/openshot/ (SOURCE CODE, BUG TRACKER, TRANSLATIONS)
http://freshmeat.net/projects/openshot-video-editor/
https://sourceforge.net/projects/openshotvideo/
https://www.ohloh.net/p/openshot-video-editor/
####################
REPORT A BUG
####################
https://bugs.launchpad.net/openshot
####################
TRANSLATIONS
####################
https://translations.launchpad.net/openshot
####################
ASK A QUESTION
####################
https://answers.launchpad.net/openshot

View File

@@ -0,0 +1,124 @@
# - Try to find FFMPEG
# Once done this will define
#
# FFMPEG_FOUND - system has FFMPEG
# FFMPEG_INCLUDE_DIR - the include directory
# FFMPEG_LIBRARY_DIR - the directory containing the libraries
# FFMPEG_LIBRARIES - Link these to use FFMPEG
#
# FindAvformat
FIND_PATH( AVFORMAT_INCLUDE_DIR libavformat/avformat.h
PATHS /usr/include/
/usr/include/ffmpeg/
$ENV{FFMPEGDIR}/include/
$ENV{FFMPEGDIR}/include/ffmpeg/ )
FIND_LIBRARY( AVFORMAT_LIBRARY avformat
PATHS /usr/lib/
/usr/lib/ffmpeg/
$ENV{FFMPEGDIR}/lib/
$ENV{FFMPEGDIR}/lib/ffmpeg/ )
#FindAvcodec
FIND_PATH( AVCODEC_INCLUDE_DIR libavcodec/avcodec.h
PATHS /usr/include/
/usr/include/ffmpeg/
$ENV{FFMPEGDIR}/include/
$ENV{FFMPEGDIR}/include/ffmpeg/ )
FIND_LIBRARY( AVCODEC_LIBRARY avcodec
PATHS /usr/lib/
/usr/lib/ffmpeg/
$ENV{FFMPEGDIR}/lib/
$ENV{FFMPEGDIR}/lib/ffmpeg/ )
#FindAvutil
FIND_PATH( AVUTIL_INCLUDE_DIR libavutil/avutil.h
PATHS /usr/include/
/usr/include/ffmpeg/
$ENV{FFMPEGDIR}/include/
$ENV{FFMPEGDIR}/include/ffmpeg/ )
FIND_LIBRARY( AVUTIL_LIBRARY avutil
PATHS /usr/lib/
/usr/lib/ffmpeg/
$ENV{FFMPEGDIR}/lib/
$ENV{FFMPEGDIR}/lib/ffmpeg/ )
#FindAvdevice
FIND_PATH( AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h
PATHS /usr/include/
/usr/include/ffmpeg/
$ENV{FFMPEGDIR}/include/
$ENV{FFMPEGDIR}/include/ffmpeg/ )
FIND_LIBRARY( AVDEVICE_LIBRARY avdevice
PATHS /usr/lib/
/usr/lib/ffmpeg/
$ENV{FFMPEGDIR}/lib/
$ENV{FFMPEGDIR}/lib/ffmpeg/ )
#FindSwscale
FIND_PATH( SWSCALE_INCLUDE_DIR libswscale/swscale.h
PATHS /usr/include/
/usr/include/ffmpeg/
$ENV{FFMPEGDIR}/include/
$ENV{FFMPEGDIR}/include/ffmpeg/ )
FIND_LIBRARY( SWSCALE_LIBRARY swscale
PATHS /usr/lib/
/usr/lib/ffmpeg/
$ENV{FFMPEGDIR}/lib/
$ENV{FFMPEGDIR}/lib/ffmpeg/ )
SET( FFMPEG_FOUND FALSE )
IF ( AVFORMAT_INCLUDE_DIR AND AVFORMAT_LIBRARY )
SET ( AVFORMAT_FOUND TRUE )
ENDIF ( AVFORMAT_INCLUDE_DIR AND AVFORMAT_LIBRARY )
IF ( AVCODEC_INCLUDE_DIR AND AVCODEC_LIBRARY )
SET ( AVCODEC_FOUND TRUE)
ENDIF ( AVCODEC_INCLUDE_DIR AND AVCODEC_LIBRARY )
IF ( AVUTIL_INCLUDE_DIR AND AVUTIL_LIBRARY )
SET ( AVUTIL_FOUND TRUE )
ENDIF ( AVUTIL_INCLUDE_DIR AND AVUTIL_LIBRARY )
IF ( AVDEVICE_INCLUDE_DIR AND AVDEVICE_LIBRARY )
SET ( AVDEVICE_FOUND TRUE )
ENDIF ( AVDEVICE_INCLUDE_DIR AND AVDEVICE_LIBRARY )
IF ( SWSCALE_INCLUDE_DIR AND SWSCALE_LIBRARY )
SET ( SWSCALE_FOUND TRUE )
ENDIF ( SWSCALE_INCLUDE_DIR AND SWSCALE_LIBRARY )
IF ( AVFORMAT_INCLUDE_DIR OR AVCODEC_INCLUDE_DIR OR AVUTIL_INCLUDE_DIR OR AVDEVICE_FOUND OR SWSCALE_FOUND )
SET ( FFMPEG_FOUND TRUE )
SET ( FFMPEG_INCLUDE_DIR
${AVFORMAT_INCLUDE_DIR}
${AVCODEC_INCLUDE_DIR}
${AVUTIL_INCLUDE_DIR}
${AVDEVICE_INCLUDE_DIR}
${SWSCALE_INCLUDE_DIR} )
SET ( FFMPEG_LIBRARIES
${AVFORMAT_LIBRARY}
${AVCODEC_LIBRARY}
${AVUTIL_LIBRARY}
${AVDEVICE_LIBRARY}
${SWSCALE_LIBRARY} )
ENDIF ( AVFORMAT_INCLUDE_DIR OR AVCODEC_INCLUDE_DIR OR AVUTIL_INCLUDE_DIR OR AVDEVICE_FOUND OR SWSCALE_FOUND )
MARK_AS_ADVANCED(
FFMPEG_LIBRARY_DIR
FFMPEG_INCLUDE_DIR
)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set FFMPEG_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(FFMPEG DEFAULT_MSG
FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,33 @@
# - Try to find Jack Audio Libraries
# libjack; libjackserver;
# Once done this will define
# LIBJACK_FOUND - System has libjack.so
# LIBJACK_INCLUDE_DIRS - The jack.h include directories
# LIBJACK_LIBRARIES - The libraries needed to use jack
find_path(LIBJACK_INCLUDE_DIR jack/jack.h
PATHS /usr/include/
$ENV{JACK_DIR}/include/
$ENV{JACK_DIR}/includes/ )
find_library(LIBJACK_libjack_LIBRARY
NAMES libjack jack
HINTS /usr/lib/
/usr/lib/jack/
$ENV{JACK_DIR}/lib/ )
find_library(LIBJACK_libjackserver_LIBRARY
NAMES libjackserver jackserver
HINTS /usr/lib/
/usr/lib/jack/
$ENV{JACK_DIR}/lib/ )
set(LIBJACK_LIBRARIES ${LIBJACK_libjack_LIBRARY} ${LIBJACK_libjackserver_LIBRARY} )
set(LIBJACK_LIBRARY ${LIBJACK_LIBRARIES})
set(LIBJACK_INCLUDE_DIRS ${LIBJACK_INCLUDE_DIR} )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBJACK_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(LIBJACK DEFAULT_MSG
LIBJACK_LIBRARY LIBJACK_INCLUDE_DIR)

View File

@@ -0,0 +1,57 @@
# - Try to find JUCE Audio Libraries
# libjuce;
# Once done this will define
# LIBJUCE_FOUND - System has libjuce.so
# LIBJUCE_INCLUDE_DIRS - The juce.h include directories
# LIBJUCE_LIBRARIES - The libraries needed to use juce
# Find the base directory of juce includes
find_path(LIBJUCE_BASE_DIR juce_amalgamated.h
PATHS /usr/include/juce/
/usr/local/include/juce/
$ENV{JUCE_DIR}/include/juce/
$ENV{JUCE_DIR}/includes/juce/ )
# Get a list of all header file paths
FILE(GLOB_RECURSE JUCE_HEADER_FILES
${LIBJUCE_BASE_DIR}/*.h
)
# Loop through each header file
FOREACH(HEADER_PATH ${JUCE_HEADER_FILES})
# Get the directory of each header file
get_filename_component(HEADER_DIRECTORY ${HEADER_PATH}
PATH
)
# Append each directory into the HEADER_DIRECTORIES list
LIST(APPEND HEADER_DIRECTORIES ${HEADER_DIRECTORY})
ENDFOREACH(HEADER_PATH)
# Remove duplicates from the header directories list
LIST(REMOVE_DUPLICATES HEADER_DIRECTORIES)
# Find the juce.so / juce.dll library
find_library(LIBJUCE_LIBRARY
NAMES libjuce juce
HINTS /usr/lib/
/usr/lib/juce/
/usr/local/lib/
$ENV{JUCE_DIR}/lib/ )
set(LIBJUCE_LIBRARIES ${LIBJUCE_LIBRARY})
set(LIBJUCE_LIBRARY ${LIBJUCE_LIBRARIES})
#set(LIBJUCE_INCLUDE_DIR ${HEADER_DIRECTORIES} )
#set(LIBJUCE_INCLUDE_DIRS ${LIBJUCE_INCLUDE_DIR} )
# Seems to work fine with just the base dir (rather than all the actual include folders)
set(LIBJUCE_INCLUDE_DIR ${LIBJUCE_BASE_DIR} )
set(LIBJUCE_INCLUDE_DIRS ${LIBJUCE_BASE_DIR} )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBJUCE_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(LIBJUCE DEFAULT_MSG
LIBJUCE_LIBRARY LIBJUCE_INCLUDE_DIR)

View File

@@ -0,0 +1,51 @@
# Locate UNITTEST
# This module defines
# UNITTEST++_LIBRARY
# UNITTEST++_FOUND, if false, do not try to link to gdal
# UNITTEST++_INCLUDE_DIR, where to find the headers
FIND_PATH(UNITTEST++_INCLUDE_DIR UnitTest++.h
${UNITTEST_DIR}/include/unittest++
$ENV{UNITTEST_DIR}/include/unittest++
$ENV{UNITTEST_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/usr/include/unittest++
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment]/include
/usr/freeware/include
)
FIND_LIBRARY(UNITTEST++_LIBRARY
NAMES unittest++
PATHS
${UNITTEST_DIR}/lib
$ENV{UNITTEST_DIR}/lib
$ENV{UNITTEST_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment]/lib
/usr/freeware/lib64
)
SET(UNITTEST++_FOUND "NO")
IF(UNITTEST++_LIBRARY AND UNITTEST++_INCLUDE_DIR)
SET(UNITTEST++_FOUND "YES")
ENDIF(UNITTEST++_LIBRARY AND UNITTEST++_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set UNITTEST++_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(UNITTEST++ DEFAULT_MSG
UNITTEST++_LIBRARY UNITTEST++_INCLUDE_DIR)

View File

@@ -0,0 +1,291 @@
cmake_minimum_required(VERSION 2.8)
FIND_PACKAGE(OpenGL REQUIRED)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
OPTION(JUCE_ASIO_SUPPORT "Build Juce Asio support" OFF)
IF (JUCE_ASIO_SUPPORT)
INCLUDE_DIRECTORIES(../asiosdk2)
ADD_DEFINITIONS(-DJUCE_ASIO)
ENDIF(JUCE_ASIO_SUPPORT)
# Enable stack-unwinding support in c objects on gcc-based platforms.
# Failing to do so will cause your program to be terminated when a png
# or a jpeg exception is thrown on linux or macosx.
IF (CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF (WIN32)
SET(JUCE_PLATFORM_SPECIFIC_DIR src/native/windows )
SET(JUCE_PLATFORM_SPECIFIC_FILE src/native/juce_win32_NativeCode.cpp )
ADD_DEFINITIONS(-DDONT_AUTOLINK_TO_JUCE_LIBRARY)
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -march=i686 ")
SET(JUCE_PLATFORM_SPECIFIC_LIBRARIES
kernel32.lib
user32.lib
shell32.lib
gdi32.lib
vfw32.lib
comdlg32.lib
winmm.lib
wininet.lib
rpcrt4.lib
ole32.lib
advapi32.lib
ws2_32.lib
OpenGL32.lib
GlU32.lib
version.lib
)
ELSE (WIN32)
IF (UNIX)
IF (APPLE)
SET(JUCE_PLATFORM_SPECIFIC_DIR src/native/mac )
SET(JUCE_PLATFORM_SPECIFIC_FILE src/native/juce_mac_NativeCode.mm )
SET(JUCE_PLATFORM_SPECIFIC_LIBRARIES "-framework Carbon -framework Cocoa -framework CoreFoundation -framework CoreAudio -framework CoreMidi -framework IOKit -framework AGL -lobjc")
ELSE (APPLE)
FIND_PACKAGE(X11 REQUIRED)
INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
INCLUDE_DIRECTORIES(/usr/include/freetype2)
ADD_DEFINITIONS(-DLINUX)
SET(JUCE_PLATFORM_SPECIFIC_DIR src/native/linux )
SET(JUCE_PLATFORM_SPECIFIC_FILE src/native/juce_linux_NativeCode.cpp )
SET(JUCE_PLATFORM_SPECIFIC_LIBRARIES ${X11_LIBRARIES} asound freetype Xinerama)
ENDIF(APPLE)
ENDIF(UNIX)
ENDIF(WIN32)
FILE(GLOB JUCE_CORE_SOURCES
src/core/*.cpp
src/core/*.h
)
FILE(GLOB JUCE_CORE_CRYPTOGRAPHY_SOURCES
src/cryptography/*.cpp
src/cryptography/*.h
)
FILE(GLOB JUCE_CORE_CONTAINERS_SOURCES
src/containers/*.cpp
src/containers/*.h
)
FILE(GLOB JUCE_CORE_IO_SOURCES
src/io/*.cpp
src/io/*.h
src/io/files/*.cpp
src/io/files/*.h
src/io/network/*.cpp
src/io/network/*.h
src/io/streams/*.cpp
src/io/streams/*.h
)
FILE(GLOB JUCE_CORE_MATHS_SOURCES
src/maths/*.cpp
src/maths/*.h
)
FILE(GLOB JUCE_CORE_MEMORY_SOURCES
src/memory/*.cpp
src/memory/*.h
)
FILE(GLOB JUCE_CORE_UTILITIES_SOURCES
src/utilities/*.cpp
src/utilities/*.h
)
FILE(GLOB JUCE_CORE_TEXT_SOURCES
src/text/*.cpp
src/text/*.h
)
FILE(GLOB JUCE_CORE_THREADS_SOURCES
src/threads/*.cpp
src/threads/*.h
)
FILE(GLOB JUCE_CORE_SOURCES
juce.h
juce_Config.h
${JUCE_CORE_SOURCES}
${JUCE_CORE_CRYPTOGRAPHY_SOURCES}
${JUCE_CORE_CONTAINERS_SOURCES}
${JUCE_CORE_MATHS_SOURCES}
${JUCE_CORE_MEMORY_SOURCES}
${JUCE_CORE_IO_SOURCES}
${JUCE_CORE_UTILITIES_SOURCES}
${JUCE_CORE_TEXT_SOURCES}
${JUCE_CORE_THREADS_SOURCES}
)
FILE(GLOB JUCE_APP_APPLICATION_SOURCES
src/application/*.cpp
src/application/*.h
)
FILE(GLOB JUCE_APP_AUDIO_SOURCES
src/audio/*.cpp
src/audio/*.h
src/audio/audio_file_formats/*.cpp
src/audio/audio_file_formats/*.h
src/audio/audio_sources/*.cpp
src/audio/audio_sources/*.h
src/audio/devices/*.cpp
src/audio/devices/*.h
src/audio/dsp/*.cpp
src/audio/dsp/*.h
src/audio/plugins/*.cpp
src/audio/plugins/*.h
src/audio/plugins/formats/*.cpp
src/audio/plugins/formats/*.h
src/audio/processors/*.cpp
src/audio/processors/*.h
src/audio/synthetisers/*.cpp
src/audio/synthetisers/*.h
src/audio/midi/*.cpp
src/audio/midi/*.h
)
FILE(GLOB JUCE_APP_EVENTS_SOURCES
src/events/*.cpp
src/events/*.h
)
FILE(GLOB JUCE_APP_GUI_GRAPHICS_SOURCES
src/gui/graphics/colour/*.cpp
src/gui/graphics/colour/*.h
src/gui/graphics/contexts/*.cpp
src/gui/graphics/contexts/*.h
src/gui/graphics/drawables/*.cpp
src/gui/graphics/drawables/*.h
src/gui/graphics/effects/*.cpp
src/gui/graphics/effects/*.h
src/gui/graphics/fonts/*.cpp
src/gui/graphics/fonts/*.h
src/gui/graphics/geometry/*.cpp
src/gui/graphics/geometry/*.h
src/gui/graphics/imaging/*.cpp
src/gui/graphics/imaging/*.h
src/gui/graphics/imaging/image_file_formats/*.cpp
src/gui/graphics/imaging/image_file_formats/*.h
)
FILE(GLOB JUCE_APP_GUI_COMPONENTS_SOURCES
src/gui/components/*.cpp
src/gui/components/*.h
src/gui/components/buttons/*.cpp
src/gui/components/buttons/*.h
src/gui/components/code_editor/*.cpp
src/gui/components/code_editor/*.h
src/gui/components/controls/*.cpp
src/gui/components/controls/*.h
src/gui/components/filebrowser/*.cpp
src/gui/components/filebrowser/*.h
src/gui/components/keyboard/*.cpp
src/gui/components/keyboard/*.h
src/gui/components/layout/*.cpp
src/gui/components/layout/*.h
src/gui/components/lookandfeel/*.cpp
src/gui/components/lookandfeel/*.h
src/gui/components/menus/*.cpp
src/gui/components/menus/*.h
src/gui/components/mouse/*.cpp
src/gui/components/mouse/*.h
src/gui/components/properties/*.cpp
src/gui/components/properties/*.h
src/gui/components/special/*.cpp
src/gui/components/special/*.h
src/gui/components/windows/*.cpp
src/gui/components/windows/*.h
)
FILE(GLOB JUCE_APP_SOURCES
src/juce_app_includes.h
${JUCE_APP_APPLICATION_SOURCES}
${JUCE_APP_AUDIO_SOURCES}
${JUCE_APP_EVENTS_SOURCES}
${JUCE_APP_GUI_GRAPHICS_SOURCES}
${JUCE_APP_GUI_COMPONENTS_SOURCES}
)
FILE(GLOB JUCE_PLATFORM_SOURCES
${JUCE_PLATFORM_SPECIFIC_FILE}
${JUCE_PLATFORM_SPECIFIC_DIR}/*.h
${JUCE_PLATFORM_SPECIFIC_DIR}/*.cpp
${JUCE_PLATFORM_SPECIFIC_DIR}/*.mm
)
SET(JUCE_SOURCES
${JUCE_CORE_SOURCES}
${JUCE_APP_SOURCES}
${JUCE_PLATFORM_SOURCES}
)
SOURCE_GROUP(Headers FILES
juce.h
juce_Config.h
src/juce_app_includes.h
src/juce_DefineMacros.h
src/juce_WithoutMacros.h
)
SOURCE_GROUP(Core/Core FILES ${JUCE_CORE_SOURCES})
SOURCE_GROUP(Core/Crypto FILES ${JUCE_CORE_CRYPTOGRAPHY_SOURCES})
SOURCE_GROUP(Core/Containers FILES ${JUCE_CORE_CONTAINERS_SOURCES})
SOURCE_GROUP(Core/Maths FILES ${JUCE_CORE_MATHS_SOURCES})
SOURCE_GROUP(Core/Memory FILES ${JUCE_CORE_MEMORY_SOURCES})
SOURCE_GROUP(Core/IO FILES ${JUCE_CORE_IO_SOURCES})
SOURCE_GROUP(Core/Utilities FILES ${JUCE_CORE_UTILITIES_SOURCES})
SOURCE_GROUP(Core/Text FILES ${JUCE_CORE_TEXT_SOURCES})
SOURCE_GROUP(Core/Threads FILES ${JUCE_CORE_THREADS_SOURCES})
SOURCE_GROUP(App/Application FILES ${JUCE_APP_APPLICATION_SOURCES})
SOURCE_GROUP(App/Audio FILES ${JUCE_APP_AUDIO_SOURCES})
SOURCE_GROUP(App/Events FILES ${JUCE_APP_EVENTS_SOURCES})
SOURCE_GROUP(App/Gui/Graphics FILES ${JUCE_APP_GUI_GRAPHICS_SOURCES})
SOURCE_GROUP(App/Gui/Components FILES ${JUCE_APP_GUI_COMPONENTS_SOURCES})
SOURCE_GROUP(Platform FILES ${JUCE_PLATFORM_SOURCES})
ADD_LIBRARY(juce SHARED
${JUCE_SOURCES}
)
TARGET_LINK_LIBRARIES(juce
${JUCE_PLATFORM_SPECIFIC_LIBRARIES}
${OPENGL_LIBRARIES}
)
# Install Files
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/juce.h
DESTINATION include/juce)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/juce_Config.h
DESTINATION include/juce)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/juce_amalgamated.h
DESTINATION include/juce)
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src DESTINATION include/juce
FILES_MATCHING PATTERN "*.h")
IF (UNIX)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libjuce.so
DESTINATION lib)
ELSE (UNIX)
IF (WIN32)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libjuce.dll
DESTINATION lib)
ELSE (WIN32)
IF (APPLE)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libjuce.so
DESTINATION lib)
ENDIF(APPLE)
ENDIF(WIN32)
ENDIF(UNIX)

View File

@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 2.8.1)
project(UnitTest++)
# get the main sources
file(GLOB SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/*.cpp src/*.h)
source_group("" FILES ${SRCS})
# get platform specific sources
if (WIN32)
set(PLAT_DIR Win32)
else()
set(PLAT_DIR Posix)
endif(WIN32)
file(GLOB PLAT_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/${PLAT_DIR}/*.cpp src/${PLAT_DIR}/*.h)
source_group(${PLAT_DIR} FILES ${PLAT_SRCS})
# create the lib
add_library(UnitTestPP SHARED ${SRCS} ${PLAT_SRCS})
set_target_properties(UnitTestPP PROPERTIES OUTPUT_NAME UnitTest++)
include_directories(src)
# build the test runner
file(GLOB TEST_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/tests/*.cpp src/tests/*.h)
source_group( "" FILES ${TEST_SRCS})
add_executable(TestUnitTestPP ${TEST_SRCS})
set_target_properties(TestUnitTestPP PROPERTIES OUTPUT_NAME TestUnitTest++)
target_link_libraries(TestUnitTestPP UnitTestPP)
# turn on testing
enable_testing()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -V)
# add the test runner as a test
add_test(NAME TestUnitTestPP COMMAND TestUnitTest++ ${CONFIG_PATH} ${CONFIG_TASKS_PATH} ${SOUND_LOG_PATH})
add_dependencies(check TestUnitTestPP)

View File

@@ -0,0 +1,143 @@
# - Run Doxygen
#
# Adds a doxygen target that runs doxygen to generate the html
# and optionally the LaTeX API documentation.
# The doxygen target is added to the doc target as a dependency.
# i.e.: the API documentation is built with:
# make doc
#
# USAGE: GLOBAL INSTALL
#
# Install it with:
# cmake ./ && sudo make install
# Add the following to the CMakeLists.txt of your project:
# include(UseDoxygen OPTIONAL)
# Optionally copy Doxyfile.in in the directory of CMakeLists.txt and edit it.
#
# USAGE: INCLUDE IN PROJECT
#
# set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
# include(UseDoxygen)
# Add the Doxyfile.in and UseDoxygen.cmake files to the projects source directory.
#
#
# CONFIGURATION
#
# To configure Doxygen you can edit Doxyfile.in and set some variables in cmake.
# Variables you may define are:
# DOXYFILE_SOURCE_DIR - Path where the Doxygen input files are.
# Defaults to the current source directory.
# DOXYFILE_EXTRA_SOURCES - Additional source diretories/files for Doxygen to scan.
# The Paths should be in double quotes and separated by space. e.g.:
# "${CMAKE_CURRENT_BINARY_DIR}/foo.c" "${CMAKE_CURRENT_BINARY_DIR}/bar/"
#
# DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored.
# Defaults to "${CMAKE_CURRENT_BINARY_DIR}/doc".
#
# DOXYFILE_LATEX - ON/OFF; Set to "ON" if you want the LaTeX documentation
# to be built.
# DOXYFILE_LATEX_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where
# the Doxygen LaTeX output is stored. Defaults to "latex".
#
# DOXYFILE_HTML_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where
# the Doxygen html output is stored. Defaults to "html".
#
#
# Copyright (c) 2009, 2010, 2011 Tobias Rautenkranz <tobias@rautenkranz.ch>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
macro(usedoxygen_set_default name value type docstring)
if(NOT DEFINED "${name}")
set("${name}" "${value}" CACHE "${type}" "${docstring}")
endif()
endmacro()
find_package(Doxygen)
if(DOXYGEN_FOUND)
find_file(DOXYFILE_IN "Doxyfile.in"
PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/"
NO_DEFAULT_PATH
DOC "Path to the doxygen configuration template file")
set(DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(DOXYFILE_IN DEFAULT_MSG "DOXYFILE_IN")
endif()
if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND)
usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc"
PATH "Doxygen output directory")
usedoxygen_set_default(DOXYFILE_HTML_DIR "html"
STRING "Doxygen HTML output directory")
usedoxygen_set_default(DOXYFILE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
PATH "Input files source directory")
usedoxygen_set_default(DOXYFILE_EXTRA_SOURCE_DIRS ""
STRING "Additional source files/directories separated by space")
set(DOXYFILE_SOURE_DIRS "\"${DOXYFILE_SOURCE_DIR}\" ${DOXYFILE_EXTRA_SOURCES}")
usedoxygen_set_default(DOXYFILE_LATEX YES BOOL "Generate LaTeX API documentation" OFF)
usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex" STRING "LaTex output directory")
mark_as_advanced(DOXYFILE_OUTPUT_DIR DOXYFILE_HTML_DIR DOXYFILE_LATEX_DIR
DOXYFILE_SOURCE_DIR DOXYFILE_EXTRA_SOURCE_DIRS DOXYFILE_IN)
set_property(DIRECTORY
APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES
"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}")
add_custom_target(doxygen
COMMAND "${DOXYGEN_EXECUTABLE}"
"${DOXYFILE}"
COMMENT "Writing documentation to ${DOXYFILE_OUTPUT_DIR}..."
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
## LaTeX
set(DOXYFILE_PDFLATEX "NO")
set(DOXYFILE_DOT "NO")
set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES
"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
if(DOXYFILE_LATEX STREQUAL "ON")
set(DOXYFILE_GENERATE_LATEX "YES")
find_package(LATEX)
find_program(DOXYFILE_MAKE make)
mark_as_advanced(DOXYFILE_MAKE)
if(LATEX_COMPILER AND MAKEINDEX_COMPILER AND DOXYFILE_MAKE)
if(PDFLATEX_COMPILER)
set(DOXYFILE_PDFLATEX "YES")
endif()
if(DOXYGEN_DOT_EXECUTABLE)
set(DOXYFILE_DOT "YES")
endif()
add_custom_command(TARGET doxygen
POST_BUILD
COMMAND "${DOXYFILE_MAKE}"
COMMENT "Running LaTeX for Doxygen documentation in ${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}..."
WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
else()
set(DOXYGEN_LATEX "NO")
endif()
else()
set(DOXYFILE_GENERATE_LATEX "NO")
endif()
configure_file("${DOXYFILE_IN}" "${DOXYFILE}" @ONLY)
get_target_property(DOC_TARGET doc TYPE)
if(NOT DOC_TARGET)
add_custom_target(doc)
endif()
add_dependencies(doc doxygen)
endif()

3159
doc/InstallationGuide.pdf Normal file

File diff suppressed because one or more lines are too long

540
doc/openshot.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,72 @@
#ifndef OPENSHOT_AUDIOBUFFERSOURCE_H
#define OPENSHOT_AUDIOBUFFERSOURCE_H
/**
* \file
* \brief Header file for AudioBufferSource class
* \author Copyright (c) 2011 Jonathan Thomas
*/
/// Do not include the juce unittest headers, because it collides with unittest++
#define __JUCE_UNITTEST_JUCEHEADER__
#include <iomanip>
#include "juce.h"
using namespace std;
namespace openshot
{
/**
* \brief This class is used to expose an AudioSampleBuffer as an AudioSource in juce.
*
* The juce library cannot play audio directly from an AudioSampleBuffer, so this class exposes
* an AudioSampleBuffer as a AudioSource, so that juce can play the audio.
*/
class AudioBufferSource : public PositionableAudioSource
{
private:
int position;
int start;
bool repeat;
AudioSampleBuffer *buffer;
public:
/// Default constructor
AudioBufferSource(int samples, int channels);
/// Destructor
~AudioBufferSource();
/// Get the next block of audio samples
void getNextAudioBlock (const AudioSourceChannelInfo& info);
/// Prepare to play this audio source
void prepareToPlay(int, double);
/// Release all resources
void releaseResources();
/// Set the next read position of this source
void setNextReadPosition (int newPosition);
/// Get the next read position of this source
int getNextReadPosition() const;
/// Get the total length (in samples) of this audio source
int getTotalLength() const;
/// Determines if this audio source should repeat when it reaches the end
bool isLooping() const;
/// Set if this audio source should repeat when it reaches the end
void setLooping (bool shouldLoop);
/// Add audio samples to a specific channel
void AddAudio(int destChannel, int destStartSample, const float* source, int numSamples, float gainToApplyToSource);
};
}
#endif

63
include/Cache.h Normal file
View File

@@ -0,0 +1,63 @@
#ifndef OPENSHOT_CACHE_H
#define OPENSHOT_CACHE_H
/**
* \file
* \brief Header file for Cache class
* \author Copyright (c) 2011 Jonathan Thomas
*/
#include <map>
#include <queue>
#include "Frame.h"
#include "Exceptions.h"
/// This namespace is the default namespace for all code in the openshot library.
namespace openshot {
/**
* \brief This class is a cache manager for Frame objects. It is used by FileReaders (such as FFmpegReader) to cache
* recently accessed frames.
*
* Due to the high cost of decoding streams, once a frame is decoded, converted to RGB, and a Frame object is created,
* it critical to keep these Frames cached for performance reasons.
*/
class Cache {
private:
int max_frames; ///< This is the max number of frames to cache
map<int, Frame> frames; ///< This map holds the frame number and Frame objects
queue<int> frame_numbers; ///< This queue holds a sequential list of cached Frame numbers
/// Clean up cached frames that exceed the number in our max_frames variable
void CleanUp();
public:
/// Default constructor, max frames to cache is 20
Cache();
/// Constructor that sets the max frames to cache
Cache(int max_frames);
/// Add a Frame to the cache
void Add(int frame_number, Frame frame);
/// Check for the existance of a frame in the cache
bool Exists(int frame_number);
/// Get a frame from the cache
Frame GetFrame(int frame_number);
/// Clear the cache of all frames
void Clear();
/// Display the list of cache and clear the cache (mainly for debugging reasons)
void DisplayAndClear();
/// Count the frames in the queue
int Count();
};
}
#endif

Some files were not shown because too many files have changed in this diff Show More