From: Jean-Baptiste Mardelle Date: Thu, 10 Nov 2011 00:51:53 +0000 (+0100) Subject: Merge branch 'master' into next X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d428e8bbbc881f61872743893518f568401df958;hp=1a02ae1572c28101c7752932d67ed926387bdcd8;p=kdenlive Merge branch 'master' into next --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bcbd3d92..c3db349b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,76 +1,85 @@ project(kdenlive) -set(BASE_VERSION 0.8.3) -set(LIBMLT_REQUIRED_VERSION 0.7.6) +# An odd patch version number means development version, while an even one means +# stable release. An additional number can be used for bugfix-only releases. +set(KDENLIVE_VERSION 0.8.3) + +# Minimum versions of main dependencies. +set(LIBMLT_MIN_VERSION 0.7.6) +set(QT_MIN_VERSION 4.5.0) +set(KDE_MIN_VERSION 4.3.0) -option(RELEASE_BUILD "Remove compilation date from program version (use for stable releases)" OFF) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) -# Search packages used by KDE. -find_package(KDE4 REQUIRED) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99") # To compile kiss_fft -include(KDE4Defaults) -include(MacroLibrary) -include(FindGettext) -include(MacroOptionalAddSubdirectory) -set(catalogname kdenlive) +# To be switched on when releasing. +option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF) -find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL QtScript REQUIRED) -if ( NOT QT_QTOPENGL_FOUND ) - message(FATAL_ERROR "QtOpenGL (most likely called libqt4-opengl-dev) not found.") -else ( NOT QT_QTOPENGL_FOUND ) - message(-- " Found QtOpenGL.") -endif ( NOT QT_QTOPENGL_FOUND ) -find_library(Qt COMPONENTS QtOpenGL QtScript REQUIRED) +# Get current version. +set(VERSION "\"${KDENLIVE_VERSION}\"") +if(NOT RELEASE_BUILD) + if(EXISTS ${PROJECT_SOURCE_DIR}/.git) + # Probably a Git workspace: determine the revision. + find_package(Git) + if(GIT_FOUND) + exec_program(${GIT_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR} + ARGS "describe --tags" + OUTPUT_VARIABLE KDENLIVE_GIT_REVISION + ) + message("Current Kdenlive Git revision is ${KDENLIVE_GIT_REVISION}") + set(VERSION "\"${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})\"") + else(GIT_FOUND) + message("Could not determine the Git revision") + endif(GIT_FOUND) + endif(EXISTS ${PROJECT_SOURCE_DIR}/.git) +endif(NOT RELEASE_BUILD) -add_definitions(${QT_DEFINITIONS}) +include(CheckIncludeFiles) +check_include_files(malloc.h HAVE_MALLOC_H) +check_include_files(pthread.h HAVE_PTHREAD_H) -# Search MLT package. -find_package(LIBMLT REQUIRED) -if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION}) - message(FATAL_ERROR "MLT must be at least version ${LIBMLT_REQUIRED_VERSION}, you have ${LIBMLT_VERSION}\nPlease install recent MLT http://www.mltframework.org") -endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION}) +# Search KDE and dependent packages. +find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED) +include(KDE4Defaults) +include(MacroLibrary) +macro_log_feature(KDE4_FOUND + "KDELibs" + "KDE core libraries" + "http://www.kde.org" + TRUE + ${KDE_MIN_VERSION} +) -find_package(MSGFMT REQUIRED) -find_program(EXTRACTRC_EXECUTABLE extractrc) -find_program(MSGFMT_EXECUTABLE msgfmt) -find_program(MSGMERGE_EXECUTABLE msgmerge) -find_program(XGETTEXT_EXECUTABLE xgettext) +# Find Qt core modules. +find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtCore QtDBus) -# Get current version. -if(RELEASE_BUILD) - set(VERSION "\"${BASE_VERSION}\"") -else(RELEASE_BUILD) - if(EXISTS ${PROJECT_SOURCE_DIR}/.svn) - # Probably a SVN workspace: determine the revision. - find_package(Subversion) - if(Subversion_FOUND) - Subversion_WC_INFO(${PROJECT_SOURCE_DIR} KDENLIVE) - message("Current revision is ${KDENLIVE_WC_REVISION}") - set(VERSION "\"${BASE_VERSION} (rev. ${KDENLIVE_WC_REVISION})\"") - else(Subversion_FOUND) - message("Could not determine the SVN revision") - set(VERSION "\"${BASE_VERSION}\"") - endif(Subversion_FOUND) - else(EXISTS ${PROJECT_SOURCE_DIR}/.svn) - set(VERSION "\"${BASE_VERSION}\"") - endif(EXISTS ${PROJECT_SOURCE_DIR}/.svn) -endif(RELEASE_BUILD) +# Search MLT package. +find_package(LIBMLT ${LIBMLT_MIN_VERSION} REQUIRED) +if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION}) + set(LIBMLT_FOUND FALSE) +endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION}) +macro_log_feature(LIBMLT_FOUND + "MLT" + "Multimedia framework and video playout server for TV broadcasting" + "http://mltframework.org" + TRUE + ${LIBMLT_MIN_VERSION} +) -add_subdirectory(src src/cmake_bindir) -add_subdirectory(renderer renderer/cmake_bindir) -add_subdirectory(thumbnailer thumbnailer/cmake_bindir) -add_subdirectory(plugins) +add_subdirectory(data) +macro_optional_add_subdirectory(doc) add_subdirectory(effects) add_subdirectory(export) add_subdirectory(icons) -add_subdirectory(data) add_subdirectory(lumas) -add_subdirectory(titles) add_subdirectory(man) -add_subdirectory(doc) - -configure_file(${CMAKE_SOURCE_DIR}/kdenlive-config.h.cmake kdenlive-config.h @ONLY) +add_subdirectory(plugins) +macro_optional_add_subdirectory(po) +add_subdirectory(renderer) +add_subdirectory(src) +add_subdirectory(thumbnailer) +add_subdirectory(titles) +macro_display_feature_log() -message("-- C flags are now: " ${CMAKE_C_FLAGS}) +configure_file(kdenlive-config.h.cmake kdenlive-config.h @ONLY) diff --git a/cmake/modules/FindKdeLibs.cmake b/cmake/modules/FindKdeLibs.cmake deleted file mode 100644 index 436cbdb7..00000000 --- a/cmake/modules/FindKdeLibs.cmake +++ /dev/null @@ -1,151 +0,0 @@ -include(FindQt3) -include(FindKDE3) - - -set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" FORCE) - -SET(LIB_SEARCH_PATHES ${KDE3_LIB_DIR} - $ENV{KDEDIR}/lib - /opt/kde/lib - /opt/kde3/lib - /usr/lib - /usr/local/lib -) - -IF (LIB_SUFFIX) - SET(LIB_SEARCH_PATHES - $ENV{KDEDIR}/lib${LIB_SUFFIX} - /opt/kde/lib${LIB_SUFFIX} - /opt/kde3/lib${LIB_SUFFIX} - /usr/lib${LIB_SUFFIX} - /usr/local/lib${LIB_SUFFIX} - ${LIB_SEARCH_PATHES}) -ENDIF (LIB_SUFFIX) - -FIND_LIBRARY(KDE3_UI_LIBRARY NAMES kdeui - PATHS - ${LIB_SEARCH_PATHES} -) - -FIND_LIBRARY(KDE3_PART_LIBRARY NAMES kparts - PATHS - ${LIB_SEARCH_PATHES} -) - -FIND_LIBRARY(KDE3_KIO_LIBRARY NAMES kio - PATHS - ${LIB_SEARCH_PATHES} -) - -FIND_LIBRARY(KDE3_DCOP_LIBRARY NAMES DCOP - PATHS - ${LIB_SEARCH_PATHES} -) - -FIND_LIBRARY(KDE3_WALLET_LIBRARY NAMES kwalletclient - PATHS - ${LIB_SEARCH_PATHES} -) - -FIND_LIBRARY(KDE3_KINIT_KDED_LIBRARY NAMES kdeinit_kded - PATHS - ${LIB_SEARCH_PATHES} -) - -FIND_PROGRAM(KDE3_KDECONFIG_EXECUTABLE NAME kde-config PATHS - $ENV{KDEDIR}/bin - /opt/kde/bin - /opt/kde3/bin -) - -FIND_PROGRAM(MSGFMT - NAMES gmsgfmt msgfmt) - -FIND_PROGRAM(STRIP - NAMES strip) - -FIND_PROGRAM(KDE3_MEINPROC_EXECUTABLE NAME meinproc PATHS - ${KDE3_BIN_INSTALL_DIR} - $ENV{KDEDIR}/bin - /opt/kde/bin - /opt/kde3/bin -) - -IF(KDE3_MEINPROC_EXECUTABLE) - MESSAGE(STATUS "Found meinproc: ${KDE3_MEINPROC_EXECUTABLE}") -ELSE(KDE3_MEINPROC_EXECUTABLE) - MESSAGE(STATUS "Didn't find meinproc!") -ENDIF(KDE3_MEINPROC_EXECUTABLE) - -IF(MSGFMT) - EXECUTE_PROCESS(COMMAND ${MSGFMT} "--version" "2>&1" - OUTPUT_VARIABLE _msgout) - STRING(REGEX MATCH "GNU[\t ]gettext" _isgnu "${_msgout}") - IF (NOT _isgnu) - MESSAGE(STATUS "No gnu msgfmt found!") - SET(MSGFMT ":" CACHE STRING "Msgfmt program") - ELSE(NOT _isgnu) - MESSAGE(STATUS "Found gnu msgfmt: ${MSGFMT}") - ENDIF (NOT _isgnu) -ELSE(MSGFMT) - SET(MSGFMT ":" CACHE STRING "Msgfmt program") -ENDIF(MSGFMT) - -# 'cause my own defines were not good I take them from kde4 trunk -#add some KDE specific stuff -set(SHARE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/share CACHE PATH "Base directory for files which go to share/" FORCE) -set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory for executables and libraries" FORCE) -# -## the following are directories where stuff will be installed to -set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The kde bin install dir (default prefix/bin)" FORCE) -set(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" CACHE PATH "The kde sbin install dir (default prefix/sbin)" FORCE) -set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) -set(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/kde3/libexec" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib/kde3/libexec)" FORCE) -set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde3" CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde3)" FORCE) -set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The subdirectory to the header prefix" FORCE) -set(CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" CACHE PATH "The config file install dir" FORCE) -set(DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" CACHE PATH "The parent directory where applications can install their data" FORCE) -set(HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/HTML" CACHE PATH "The HTML install dir for documentation" FORCE) -set(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" CACHE PATH "The icon install dir (default prefix/share/icons/)" FORCE) -set(KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" CACHE PATH "The install dir for kconfig files" FORCE) -set(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" CACHE PATH "The install dir for translations" FORCE) -set(MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" CACHE PATH "The install dir for the mimetype desktop files" FORCE) -set(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/services" CACHE PATH "The install dir for service (desktop, protocol, ...) files" FORCE) -set(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/servicetypes" CACHE PATH "The install dir for servicestypes desktop files" FORCE) -set(SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" CACHE PATH "The install dir for sound files" FORCE) -set(TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" CACHE PATH "The install dir for templates (Create new file...)" FORCE) -set(WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" CACHE PATH "The install dir for wallpapers" FORCE) -set(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update" CACHE PATH "The kconf_update install dir" FORCE) -# this one shouldn't be used anymore -set(APPLNK_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applnk" CACHE PATH "Is this still used ?" FORCE) -set(AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" CACHE PATH "The install dir for autostart files" FORCE) -set(XDG_APPS_DIR "${SHARE_INSTALL_PREFIX}/applications/kde" CACHE PATH "The XDG apps dir" FORCE) -set(XDG_DIRECTORY_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" CACHE PATH "The XDG directory" FORCE) -set(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "The kde sysconfig install dir (default/etc)" FORCE) -set(MAN_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/man" CACHE PATH "The kde man install dir (default prefix/share/man/)" FORCE) -set(INFO_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/info" CACHE PATH "The kde info install dir (default prefix/info)" FORCE) - - -MACRO(ADD_POFILES packagename) - SET(_gmofiles) - FILE(GLOB _pofiles *.po) - - FOREACH(_current_po ${_pofiles}) - GET_FILENAME_COMPONENT(_name ${_current_po} NAME_WE) - STRING(REGEX REPLACE "^.*/([a-zA-Z]+)(\\.po)" "\\1" _lang "${_current_po}") - SET(_gmofile "${CMAKE_CURRENT_BINARY_DIR}/${_name}.gmo") - ADD_CUSTOM_COMMAND(OUTPUT ${_gmofile} - COMMAND ${MSGFMT} - ARGS "-o" "${_gmofile}" "${_current_po}" - DEPENDS ${_current_po} - ) - SET(_gmofiles ${_gmofiles} ${_gmofile}) - INSTALL(FILES ${_gmofile} - DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_MESSAGES - RENAME ${packagename}.mo) - ENDFOREACH(_current_po ${_pofiles}) - - ADD_CUSTOM_TARGET(translations ALL - DEPENDS ${_gmofiles}) - -ENDMACRO(ADD_POFILES) diff --git a/cmake/modules/FindLIBMLT.cmake b/cmake/modules/FindLIBMLT.cmake index dcae97e0..5f6c2553 100644 --- a/cmake/modules/FindLIBMLT.cmake +++ b/cmake/modules/FindLIBMLT.cmake @@ -3,30 +3,46 @@ # include(FindPkgConfig) -pkg_check_modules(MLT REQUIRED mlt++) +pkg_check_modules(MLT mlt++) add_definitions(-DMLT_PREFIX=\\\"\"${MLT_PREFIX}\"\\\") find_path(LIBMLT_INCLUDE_DIR NAMES framework/mlt.h - PATHS ${MLT_INCLUDEDIR}/mlt ${MLT_PREFIX}/include/mlt /usr/local/include/mlt /usr/include/mlt + PATHS + ${MLT_INCLUDEDIR}/mlt + ${MLT_PREFIX}/include/mlt + /usr/local/include/mlt + /usr/include/mlt NO_DEFAULT_PATH ) find_library(LIBMLT_LIBRARY NAMES mlt - PATHS ${MLT_LIBDIR} ${MLT_PREFIX}/lib /usr/lib /usr/local/lib + PATHS + ${MLT_LIBDIR} + ${MLT_PREFIX}/lib + /usr/local/lib + /usr/lib NO_DEFAULT_PATH ) find_path(LIBMLTPLUS_INCLUDE_DIR NAMES mlt++/Mlt.h - PATHS ${MLT_INCLUDEDIR} ${MLT_PREFIX}/include /usr/local/include /usr/include + PATHS + ${MLT_INCLUDEDIR} + ${MLT_PREFIX}/include + /usr/local/include + /usr/include NO_DEFAULT_PATH ) find_library(LIBMLTPLUS_LIBRARY NAMES mlt++ - PATHS ${MLT_LIBDIR} ${MLT_PREFIX}/lib /usr/lib /usr/local/lib + PATHS + ${MLT_LIBDIR} + ${MLT_PREFIX}/lib + /usr/local/lib + /usr/lib NO_DEFAULT_PATH ) @@ -37,24 +53,20 @@ else(LIBMLT_LIBRARY AND LIBMLT_INCLUDE_DIR) set(LIBMLT_FOUND 0) endif(LIBMLT_LIBRARY AND LIBMLT_INCLUDE_DIR) -if(LIBMLTPLUS_LIBRARY AND LIBMLTPLUS_INCLUDE_DIR) +if(LIBMLT_FOUND AND LIBMLTPLUS_LIBRARY AND LIBMLTPLUS_INCLUDE_DIR) set(LIBMLT_FOUND 1) set(LIBMLTPLUS_LIBRARIES ${LIBMLTPLUS_LIBRARY}) -else(LIBMLTPLUS_LIBRARY AND LIBMLTPLUS_INCLUDE_DIR) +else(LIBMLT_FOUND AND LIBMLTPLUS_LIBRARY AND LIBMLTPLUS_INCLUDE_DIR) set(LIBMLT_FOUND 0) -endif(LIBMLTPLUS_LIBRARY AND LIBMLTPLUS_INCLUDE_DIR) +endif(LIBMLT_FOUND AND LIBMLTPLUS_LIBRARY AND LIBMLTPLUS_INCLUDE_DIR) if(LIBMLT_FOUND) set(LIBMLT_VERSION ${MLT_VERSION}) if(NOT LIBMLT_FIND_QUIETLY) - message(STATUS "MLT install path: ${MLT_PREFIX}") - message(STATUS "MLT includes: ${LIBMLT_INCLUDE_DIR}") - message(STATUS "MLT library: ${LIBMLT_LIBRARY}") - message(STATUS "MLT++ includes: ${LIBMLTPLUS_INCLUDE_DIR}") - message(STATUS "MLT++ library: ${LIBMLTPLUS_LIBRARY}") + message(STATUS "Found MLT++: ${LIBMLTPLUS_LIBRARY}") endif(NOT LIBMLT_FIND_QUIETLY) else(LIBMLT_FOUND) if(LIBMLT_FIND_REQUIRED) - message(FATAL_ERROR "Could not find MLT library") + message(FATAL_ERROR "Could not find MLT++") endif(LIBMLT_FIND_REQUIRED) -endif(LIBMLT_FOUND) \ No newline at end of file +endif(LIBMLT_FOUND) diff --git a/cmake/modules/FindMSGFMT.cmake b/cmake/modules/FindMSGFMT.cmake deleted file mode 100644 index c7cbd577..00000000 --- a/cmake/modules/FindMSGFMT.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# -# Find the msgfmt program -# -# Modified from Rosegarden project -# -# Defined variables: -# MSGFMT_FOUND -# MSGFMT_EXECUTABLE -# -# Macro: -# ADD_TRANSLATIONS -# - -IF(MSGFMT_EXECUTABLE) - SET(MSGFMT_FOUND TRUE) -ELSE(MSGFMT_EXECUTABLE) - FIND_PROGRAM(MSGFMT_EXECUTABLE - NAMES msgfmt gmsgfmt - PATHS /bin /usr/bin /usr/local/bin ) - IF(MSGFMT_EXECUTABLE) - SET(MSGFMT_FOUND TRUE) - ELSE(MSGFMT_EXECUTABLE) - IF(NOT MSGFMT_FIND_QUIETLY) - IF(MSGFMT_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "msgfmt program couldn't be found") - ENDIF(MSGFMT_FIND_REQUIRED) - ENDIF(NOT MSGFMT_FIND_QUIETLY) - ENDIF(MSGFMT_EXECUTABLE) - MARK_AS_ADVANCED(MSGFMT_EXECUTABLE) -ENDIF (MSGFMT_EXECUTABLE) -IF(MSGFMT_FOUND) - MESSAGE(STATUS "Found msgfmt: ${MSGFMT_EXECUTABLE}") -ENDIF(MSGFMT_FOUND) - -MACRO(ADD_TRANSLATIONS _lang) - SET(_outputs) - FOREACH(_file ${ARGN}) - GET_FILENAME_COMPONENT(_file_we ${_file} NAME_WE) - SET(_out "${CMAKE_CURRENT_BINARY_DIR}/${_file_we}.mo") - SET(_in "${CMAKE_CURRENT_SOURCE_DIR}/${_file_we}.po") - ADD_CUSTOM_COMMAND( - OUTPUT ${_out} - COMMAND ${MSGFMT_EXECUTABLE} -o ${_out} ${_in} - DEPENDS ${_in} ) - INSTALL(FILES ${_out} - DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_MESSAGES ) - SET(_outputs ${_outputs} ${_out}) - ENDFOREACH(_file) - ADD_CUSTOM_TARGET(translations ALL DEPENDS ${_outputs}) -ENDMACRO(ADD_TRANSLATIONS) \ No newline at end of file diff --git a/cmake/modules/FindQJSON.cmake b/cmake/modules/FindQJSON.cmake deleted file mode 100644 index a5b5c79a..00000000 --- a/cmake/modules/FindQJSON.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# Find QJSON - JSON handling library for Qt -# Source: http://gitorious.org/libmygpo-qt/libmygpo-qt/blobs/634b150fabdcafddcfb98a9a08cc414d95ae0dbe/cmake/modules/FindQJSON.cmake -# -# This module defines -# QJSON_FOUND - whether the qsjon library was found -# QJSON_LIBRARIES - the qjson library -# QJSON_INCLUDE_DIR - the include path of the qjson library -# - -if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES) - - # Already in cache - set (QJSON_FOUND TRUE) - -else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES) - - if (NOT WIN32) - # use pkg-config to get the values of QJSON_INCLUDE_DIRS - # and QJSON_LIBRARY_DIRS to add as hints to the find commands. - include (FindPkgConfig) - pkg_check_modules (QJSON REQUIRED QJson>=0.5) - endif (NOT WIN32) - - find_library (QJSON_LIBRARIES - NAMES - qjson - PATHS - ${QJSON_LIBRARY_DIRS} - ${LIB_INSTALL_DIR} - ${KDE4_LIB_DIR} - ) - - find_path (QJSON_INCLUDE_DIR - NAMES - parser.h - PATH_SUFFIXES - qjson - PATHS - ${QJSON_INCLUDE_DIRS} - ${INCLUDE_INSTALL_DIR} - ${KDE4_INCLUDE_DIR} - ) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR) - -endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES) diff --git a/cmake/modules/KdenlivePackageMessages.cmake b/cmake/modules/KdenlivePackageMessages.cmake deleted file mode 100644 index 2bf7280c..00000000 --- a/cmake/modules/KdenlivePackageMessages.cmake +++ /dev/null @@ -1,22 +0,0 @@ - - FIND_PROGRAM(XGETTEXT_EXECUTABLE xgettext) - FIND_PROGRAM(FIND_EXECUTABLE find) - FIND_PROGRAM(RM_EXECUTABLE rm) - FIND_PROGRAM(XTRACTRC_EXECUTABLE extractrc) - - SET(KDE_POT_FILE ${KDE3_INCLUDE_DIR}/kde.pot) - - ADD_CUSTOM_TARGET(package-messages - COMMAND $(MAKE) all # first make sure all generated source exists - COMMAND ${RM_EXECUTABLE} -f po/*.gmo - #COMMAND ${XTRACTRC_EXECUTABLE} ${CMAKE_SOURCE_DIR}/kdenlive/*.rc >> ${CMAKE_SOURCE_DIR}/rc.cpp - COMMAND ${XTRACTRC_EXECUTABLE} --tag=name --tag=description --tag=label --context=effectNames ${CMAKE_SOURCE_DIR}/effects/*.xml >> ${CMAKE_SOURCE_DIR}/rc.cpp - COMMAND ${XGETTEXT_EXECUTABLE} -C - -ki18n -ktr2i18n -kI18N_NOOP - -x ${KDE_POT_FILE} - `${FIND_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR} -name \\*.ui -o -name \\*.cpp` - `${FIND_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR} -name \\*.ui -o -name \\*.cpp` - -o ${CMAKE_SOURCE_DIR}/po/kdenlive.pot - COMMAND $(MAKE) translations - # DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kwave/menus.config - ) diff --git a/kdenlive-config.h.cmake b/kdenlive-config.h.cmake index 2f43f50c..328512ef 100644 --- a/kdenlive-config.h.cmake +++ b/kdenlive-config.h.cmake @@ -3,5 +3,8 @@ #cmakedefine VERSION @VERSION@ +#cmakedefine HAVE_MALLOC_H 1 +#cmakedefine HAVE_PTHREAD_H 1 + #endif diff --git a/kdenlive.spec b/kdenlive.spec deleted file mode 100644 index a0723d97..00000000 --- a/kdenlive.spec +++ /dev/null @@ -1,57 +0,0 @@ -Name: kdenlive -Version: 0.7 -Release: 1%{?dist} -Summary: Non-linear video editor - -Group: Applications/Multimedia -License: GPL -URL: http://kdenlive.org/ -Source0: kdenlive-%{version}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: mlt, mlt++, soprano-devel -Requires: kdebase - -%description -Kdenlive is a non-linear video editor for GNU/Linux and FreeBSD, which -supports DV, AVCHD (experimental support) and HDV editing. Kdenlive relies -on several other open source projects, such as FFmpeg and the MLT video -framework. It was designed to answer all needs, from basic video editing to -semi-professional work. - -%prep -%setup -q - - -%build -cmake -DCMAKE_INSTALL_PREFIX=/usr CMakeLists.txt -make %{?_smp_mflags} - - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc - -%{_bindir}/kdenlive - /usr/bin/kdenlive_render - /usr/lib/kde4/westleypreview.so - /usr/share/applications/kde/kdenlive.desktop - /usr/share/config.kcfg/kdenlivesettings.kcfg - /usr/share/icons/oxygen/scalable/mimetypes/application-x-kdenlive.svgz - /usr/share/icons/oxygen/scalable/mimetypes/video-mlt-playlist.svgz - /usr/share/kde4/apps/kdenlive/* - /usr/share/kde4/services/westleypreview.desktop - /usr/share/locale/*/LC_MESSAGES/kdenlive.mo - /usr/share/mime/packages/kdenlive.xml - /usr/share/mime/packages/westley.xml - -%changelog diff --git a/renderer/CMakeLists.txt b/renderer/CMakeLists.txt index c6513b28..79e01f8c 100644 --- a/renderer/CMakeLists.txt +++ b/renderer/CMakeLists.txt @@ -1,29 +1,20 @@ +# Check src/CMakeLists.txt for detailed comments on the contents of this file. - -include_directories ( - ${QDBUS_INCLUDE_DIRS} - ${KDE4_INCLUDES} - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} -) - -LINK_LIBRARIES( -${LIBMLT_LIBRARY} -${LIBMLTPLUS_LIBRARY} -${optional_libs} -) - -set(kdenlive_render_SRCS +set(kdenlive_render_SRCS kdenlive_render.cpp renderjob.cpp ) kde4_add_executable(kdenlive_render ${kdenlive_render_SRCS}) -target_link_libraries(kdenlive_render - ${QT_QTCORE_LIBRARY} - ${QT_QTDBUS_LIBRARY} +include_directories( + ${QT_INCLUDES} ) -install(TARGETS kdenlive_render DESTINATION ${BIN_INSTALL_DIR}) +include(${QT_USE_FILE}) + +target_link_libraries(kdenlive_render + ${QT_LIBRARIES} +) +install(TARGETS kdenlive_render DESTINATION ${BIN_INSTALL_DIR}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 173eabcd..0dd66b43 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,366 +1,363 @@ -add_subdirectory(beziercurve) -add_subdirectory(colorcorrection) -add_subdirectory(kiss_fft) -add_subdirectory(mimetypes) -add_subdirectory(onmonitoritems) -add_subdirectory(rotoscoping) -add_subdirectory(widgets) -add_subdirectory(databackup) - +find_package(OpenGL REQUIRED) +find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtGui QtOpenGL QtScript QtSvg QtXml) +if(APPLE) + find_package(SDL REQUIRED) +endif(APPLE) macro_optional_find_package(Nepomuk) macro_optional_find_package(QJSON) -include_directories( - ${KDE4_INCLUDE_DIR} - ${KDE4_INCLUDE_DIR}/KDE - ${QT_INCLUDES} - ${LIBMLT_INCLUDE_DIR} - ${LIBMLTPLUS_INCLUDE_DIR} - ${QDBUS_INCLUDE_DIRS} - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/src/audioscopes - ${CMAKE_SOURCE_DIR}/src/beziercurve - ${CMAKE_SOURCE_DIR}/src/colorcorrection - ${CMAKE_SOURCE_DIR}/src/kiss_fft - ${CMAKE_SOURCE_DIR}/src/onmonitoritems - ${CMAKE_SOURCE_DIR}/src/onmonitoritems/rotoscoping - ${CMAKE_SOURCE_DIR}/src/widgets -) +option(WITH_V4L "Build capture support with Video4Linux" ON) +option(WITH_JogShuttle "Build Jog/Shuttle support" ON) +if(WITH_V4L) + # This can be changed to support FreeBSD as soon as we move to a newer V4L2 + # header. + check_include_files(linux/ioctl.h HAVE_LINUX_IOCTL_H) + if(HAVE_LINUX_IOCTL_H) + set(BUILD_V4L TRUE) + endif(HAVE_LINUX_IOCTL_H) +endif(WITH_V4L) -if(Nepomuk_FOUND) - include_directories(NEPOMUK_INCLUDES) - set(optional_libs ${NEPOMUK_LIBRARIES}) - add_definitions(-DNEPOMUK) -endif(Nepomuk_FOUND) +if(WITH_JogShuttle) + check_include_files(linux/input.h HAVE_LINUX_INPUT_H) + if(HAVE_LINUX_INPUT_H) + set(BUILD_JogShuttle TRUE) + endif(HAVE_LINUX_INPUT_H) +endif(WITH_JogShuttle) -if(QJSON_FOUND) - include_directories(QJSON_INCLUDE_DIR) - set(optional_libs ${optional_libs} ${QJSON_LIBRARIES}) - add_definitions(-DQJSON) -else(QJSON_FOUND) - message(STATUS "Install QJson to use the rotoscoping filter") -endif(QJSON_FOUND) +macro_log_feature(QT_QTOPENGL_FOUND + "QtOpenGL" + "Qt bindings for the OpenGL library" + "http://qt.nokia.com/products/qt" + TRUE + ${QT_MIN_VERSION} + "QtOpenGL library and headers (most likely called libqt4-opengl and libqt4-opengl-dev)" +) -if(Q_WS_X11) - include_directories(${X11_Xlib_INCLUDE_PATH}) -endif(Q_WS_X11) +macro_log_feature(QT_QTSCRIPT_FOUND + "QtScript" + "Qt module providing core scripting facilities" + "http://qt.nokia.com/products/qt" + TRUE + ${QT_MIN_VERSION} + "QtScript library (most likely called libqt4-script)" +) if(APPLE) - find_package(OpenGL) - set(QT_USE_QTOPENGL TRUE) -else(APPLE) - macro_optional_find_package(OpenGL) + macro_log_feature(SDL_FOUND + "SDL" + "Cross-platform multimedia library" + "http://www.libsdl.org" + TRUE + ) endif(APPLE) - -link_libraries( - ${LIBMLT_LIBRARY} - ${LIBMLTPLUS_LIBRARY} - ${optional_libs} +macro_log_feature(Nepomuk_FOUND + "Nepomuk" + "Support for the Nepomuk semantic desktop system" + "http://nepomuk.semanticdesktop.org" ) -kde4_add_ui_files(kdenlive_UI - widgets/timeline_ui.ui - widgets/recmonitor_ui.ui - widgets/colorclip_ui.ui - widgets/slideshowclip_ui.ui - widgets/configmisc_ui.ui - widgets/configenv_ui.ui - widgets/configtimeline_ui.ui - widgets/configsdl_ui.ui - widgets/configcapture_ui.ui - widgets/configtranscode_ui.ui - widgets/configproject_ui.ui - widgets/effectlist_ui.ui - widgets/effectstack_ui.ui - widgets/profiledialog_ui.ui - widgets/projectsettings_ui.ui - widgets/keyframewidget_ui.ui - widgets/listval_ui.ui - widgets/wipeval_ui.ui - widgets/boolval_ui.ui - widgets/titlewidget_ui.ui - widgets/unicodedialog_ui.ui - widgets/timelinebuttons_ui.ui - widgets/renderwidget_ui.ui - widgets/saveprofile_ui.ui - widgets/transitionsettings_ui.ui - widgets/configjogshuttle_ui.ui - widgets/trackheader_ui.ui - widgets/clipproperties_ui.ui - widgets/markerdialog_ui.ui - widgets/keyframedialog_ui.ui - widgets/clipdurationdialog_ui.ui - widgets/managecaptures_ui.ui - widgets/geometryval_ui.ui - widgets/wizardstandard_ui.ui - widgets/wizardextra_ui.ui - widgets/wizardcapture_ui.ui - widgets/wizardcheck_ui.ui - widgets/wizardmltcheck_ui.ui - widgets/spacerdialog_ui.ui - widgets/addtrack_ui.ui - widgets/dvdwizardvob_ui.ui - widgets/dvdwizardmenu_ui.ui - widgets/dvdwizardstatus_ui.ui - widgets/dvdwizardchapters_ui.ui - widgets/missingclips_ui.ui - widgets/cliptranscode_ui.ui - widgets/templateclip_ui.ui - widgets/keyframeeditor_ui.ui - widgets/tracksconfigdialog_ui.ui - widgets/urlval_ui.ui - widgets/vectorscope_ui.ui - widgets/colorplaneexport_ui.ui - widgets/waveform_ui.ui - widgets/rgbparade_ui.ui - widgets/histogram_ui.ui - widgets/geometrywidget_ui.ui - widgets/stopmotion_ui.ui - widgets/audiospectrum_ui.ui - widgets/spectrogram_ui.ui - widgets/smconfig_ui.ui - widgets/bezierspline_ui.ui - widgets/monitoreditwidget_ui.ui - widgets/archivewidget_ui.ui - widgets/manageencodingprofile_ui.ui - widgets/backupdialog_ui.ui +macro_log_feature(QJSON_FOUND + "QJson" + "Qt-based library that maps JSON data to QVariant objects" + "http://qjson.sourceforge.net" + FALSE + "" + "Required to build the rotoscoping filter" ) -set(kdenlive_SRCS - ${kdenlive_SRCS} - addclipcommand.cpp +add_subdirectory(audioscopes) +add_subdirectory(beziercurve) +add_subdirectory(blackmagic) +add_subdirectory(colorcorrection) +add_subdirectory(colorscopes) +add_subdirectory(commands) +add_subdirectory(databackup) +add_subdirectory(kiss_fft) +add_subdirectory(mimetypes) +add_subdirectory(onmonitoritems) +add_subdirectory(simplekeyframes) +add_subdirectory(stopmotion) + +if(QJSON_FOUND) + add_subdirectory(onmonitoritems/rotoscoping) + add_subdirectory(rotoscoping) +endif(QJSON_FOUND) + +if(BUILD_V4L) + add_subdirectory(v4l) +endif(BUILD_V4L) + +list(APPEND kdenlive_SRCS main.cpp mainwindow.cpp - customruler.cpp - smallruler.cpp - projectlist.cpp - projectitem.cpp - monitor.cpp - gentime.cpp - renderer.cpp - kdenlivedoc.cpp - projectlistview.cpp - trackview.cpp - docclipbase.cpp - timecode.cpp - monitormanager.cpp - headertrack.cpp - customtrackview.cpp + + KoSliderCombo.cpp + abstractclipitem.cpp + abstractgroupitem.cpp + abstractmonitor.cpp + abstractscopewidget.cpp + archivewidget.cpp + audiosignal.cpp + choosecolorwidget.cpp + clipdurationdialog.cpp clipitem.cpp - moveclipcommand.cpp - resizeclipcommand.cpp - razorclipcommand.cpp - addtimelineclipcommand.cpp - addmarkercommand.cpp - kthumb.cpp clipmanager.cpp + clipproperties.cpp + cliptranscode.cpp + colorpickerwidget.cpp + colorplaneexport.cpp + colortools.cpp + complexparameter.cpp + cornerswidget.cpp + customruler.cpp + customtrackscene.cpp + customtrackview.cpp + docclipbase.cpp + documentchecker.cpp + documentvalidator.cpp + doubleparameterwidget.cpp + dragvalue.cpp + dvdwizard.cpp + dvdwizardchapters.cpp + dvdwizardmenu.cpp + dvdwizardvob.cpp effectslist.cpp - initeffects.cpp effectslistview.cpp - addeffectcommand.cpp - editeffectcommand.cpp - moveeffectcommand.cpp - effectstackview.cpp + effectslistwidget.cpp effectstackedit.cpp + effectstackview.cpp + encodingprofilesdialog.cpp + folderprojectitem.cpp + gentime.cpp + geometryval.cpp + geometrywidget.cpp + graphicsscenerectmove.cpp + guide.cpp + headertrack.cpp + initeffects.cpp + kdenlivedoc.cpp + kdenlivesettingsdialog.cpp + keyframeedit.cpp + keyframehelper.cpp + kis_cubic_curve.cpp + kis_curve_widget.cpp + kthumb.cpp + managecapturesdialog.cpp + markerdialog.cpp + mltdevicecapture.cpp + monitor.cpp + monitoreditwidget.cpp + monitormanager.cpp + monitorscene.cpp + noteswidget.cpp parameterplotter.cpp + positionedit.cpp profilesdialog.cpp + projectitem.cpp + projectlist.cpp + projectlistview.cpp projectsettings.cpp - kdenlivesettingsdialog.cpp - complexparameter.cpp - titlewidget.cpp - unicodedialog.cpp - graphicsscenerectmove.cpp - effectslistwidget.cpp - titledocument.cpp - transition.cpp - renderwidget.cpp - abstractclipitem.cpp - transitionsettings.cpp recmonitor.cpp - addtransitioncommand.cpp - edittransitioncommand.cpp - addfoldercommand.cpp - editfoldercommand.cpp - clipproperties.cpp - movetransitioncommand.cpp + renderer.cpp + renderwidget.cpp slideshowclip.cpp - markerdialog.cpp - guide.cpp - editguidecommand.cpp - statusbarmessagelabel.cpp - editkeyframecommand.cpp - clipdurationdialog.cpp - managecapturesdialog.cpp - changespeedcommand.cpp - geometryval.cpp - wizard.cpp - customtrackscene.cpp - abstractgroupitem.cpp - keyframehelper.cpp - editclipcommand.cpp - insertspacecommand.cpp + smallruler.cpp spacerdialog.cpp - addtrackcommand.cpp - movegroupcommand.cpp - dvdwizardvob.cpp - dvdwizardmenu.cpp - dvdwizard.cpp - locktrackcommand.cpp - groupclipscommand.cpp - splitaudiocommand.cpp - changecliptypecommand.cpp - documentchecker.cpp - dvdwizardchapters.cpp - documentvalidator.cpp - cliptranscode.cpp - keyframeedit.cpp - positionedit.cpp - trackdialog.cpp + statusbarmessagelabel.cpp subprojectitem.cpp - folderprojectitem.cpp - addclipcutcommand.cpp - editclipcutcommand.cpp - KoSliderCombo.cpp - kis_cubic_curve.cpp - kis_curve_widget.cpp + timecode.cpp timecodedisplay.cpp + titledocument.cpp + titlewidget.cpp + trackdialog.cpp tracksconfigdialog.cpp - configtrackscommand.cpp - abstractscopewidget.cpp - audioscopes/abstractaudioscopewidget.cpp - audioscopes/audiospectrum.cpp - audioscopes/spectrogram.cpp - audioscopes/ffttools.cpp - rebuildgroupcommand.cpp - colorscopes/abstractgfxscopewidget.cpp - colorscopes/histogram.cpp - colorscopes/rgbparade.cpp - colorscopes/vectorscope.cpp - colorscopes/waveform.cpp - colorplaneexport.cpp - colortools.cpp - colorcorrection/histogramgenerator.cpp - colorcorrection/rgbparadegenerator.cpp - colorcorrection/vectorscopegenerator.cpp - colorcorrection/waveformgenerator.cpp - razorgroupcommand.cpp - colorpickerwidget.cpp - choosecolorwidget.cpp - monitorscene.cpp - geometrywidget.cpp - doubleparameterwidget.cpp - audiosignal.cpp - blackmagic/include/DeckLinkAPIDispatch.cpp - stopmotion/stopmotion.cpp - blackmagic/devices.cpp - onmonitoritems/onmonitorrectitem.cpp - onmonitoritems/onmonitorcornersitem.cpp - cornerswidget.cpp - kiss_fft/_kiss_fft_guts.h - kiss_fft/kiss_fft.c - kiss_fft/tools/kiss_fftr.c - beziercurve/beziersplineeditor.cpp - beziercurve/beziersplinewidget.cpp - beziercurve/bpoint.cpp - beziercurve/cubicbezierspline.cpp - dragvalue.cpp - monitoreditwidget.cpp - simplekeyframes/simpletimelinewidget.cpp - simplekeyframes/simplekeyframewidget.cpp - noteswidget.cpp - archivewidget.cpp - mltdevicecapture.cpp - abstractmonitor.cpp - encodingprofilesdialog.cpp + trackview.cpp + transition.cpp + transitionsettings.cpp + unicodedialog.cpp + wizard.cpp ) -add_definitions(${KDE4_DEFINITIONS}) +kde4_add_ui_files(kdenlive_UIS + widgets/addtrack_ui.ui + widgets/archivewidget_ui.ui + widgets/audiospectrum_ui.ui + widgets/backupdialog_ui.ui + widgets/bezierspline_ui.ui + widgets/boolval_ui.ui + widgets/clipdurationdialog_ui.ui + widgets/clipproperties_ui.ui + widgets/cliptranscode_ui.ui + widgets/colorclip_ui.ui + widgets/colorplaneexport_ui.ui + widgets/configcapture_ui.ui + widgets/configenv_ui.ui + widgets/configjogshuttle_ui.ui + widgets/configmisc_ui.ui + widgets/configproject_ui.ui + widgets/configsdl_ui.ui + widgets/configtimeline_ui.ui + widgets/configtranscode_ui.ui + widgets/dvdwizardchapters_ui.ui + widgets/dvdwizardmenu_ui.ui + widgets/dvdwizardstatus_ui.ui + widgets/dvdwizardvob_ui.ui + widgets/effectlist_ui.ui + widgets/effectstack_ui.ui + widgets/geometryval_ui.ui + widgets/geometrywidget_ui.ui + widgets/histogram_ui.ui + widgets/keyframedialog_ui.ui + widgets/keyframeeditor_ui.ui + widgets/keyframewidget_ui.ui + widgets/listval_ui.ui + widgets/managecaptures_ui.ui + widgets/manageencodingprofile_ui.ui + widgets/markerdialog_ui.ui + widgets/missingclips_ui.ui + widgets/monitoreditwidget_ui.ui + widgets/profiledialog_ui.ui + widgets/projectsettings_ui.ui + widgets/recmonitor_ui.ui + widgets/renderwidget_ui.ui + widgets/rgbparade_ui.ui + widgets/saveprofile_ui.ui + widgets/slideshowclip_ui.ui + widgets/smconfig_ui.ui + widgets/spacerdialog_ui.ui + widgets/spectrogram_ui.ui + widgets/stopmotion_ui.ui + widgets/templateclip_ui.ui + widgets/timeline_ui.ui + widgets/timelinebuttons_ui.ui + widgets/titlewidget_ui.ui + widgets/trackheader_ui.ui + widgets/tracksconfigdialog_ui.ui + widgets/transitionsettings_ui.ui + widgets/unicodedialog_ui.ui + widgets/urlval_ui.ui + widgets/vectorscope_ui.ui + widgets/waveform_ui.ui + widgets/wipeval_ui.ui + widgets/wizardcapture_ui.ui + widgets/wizardcheck_ui.ui + widgets/wizardextra_ui.ui + widgets/wizardmltcheck_ui.ui + widgets/wizardstandard_ui.ui +) -if(CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD") - add_definitions(-DQ_OS_KFREEBSD) -endif(CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD") +if(OPENGL_FOUND) + list(APPEND kdenlive_SRCS videoglwidget.cpp) +endif(OPENGL_FOUND) -if(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE) - add_definitions(-DNO_JOGSHUTTLE) -else(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE) - set(kdenlive_SRCS jogshuttle.cpp jogaction.cpp jogshuttleconfig.cpp ${kdenlive_SRCS}) -endif(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE) +if(BUILD_JogShuttle) + list(APPEND kdenlive_SRCS + jogaction.cpp + jogshuttle.cpp + jogshuttleconfig.cpp + ) +endif(BUILD_JogShuttle) -if(APPLE OR OPENGL_FOUND) - add_definitions(-DUSE_OPEN_GL) - set(kdenlive_SRCS videoglwidget.cpp ${kdenlive_SRCS}) -endif(APPLE OR OPENGL_FOUND) +kde4_add_kcfg_files(kdenlive_SRCS kdenlivesettings.kcfgc) +qt4_add_dbus_adaptor(kdenlive_SRCS + org.kdenlive.MainWindow.xml + mainwindow.h + MainWindow +) +qt4_add_resources(kdenlive_SRCS widgets/resources.qrc) +kde4_add_executable(kdenlive + ${kdenlive_SRCS} + ${kdenlive_UIS} +) -if(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD") - set(kdenlive_SRCS - ${kdenlive_SRCS} - v4l/v4lcapture.cpp - v4l/src.c - ) -endif(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD") +# To compile kiss_fft. +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99") -if(QJSON_FOUND) - set(kdenlive_SRCS - ${kdenlive_SRCS} - onmonitoritems/rotoscoping/bpointitem.cpp - onmonitoritems/rotoscoping/nearestpoint.cpp - onmonitoritems/rotoscoping/splineitem.cpp - rotoscoping/rotowidget.cpp - ) -endif(QJSON_FOUND) +# KDE definitions and include directories *must* always come first, Qt follows +# (to avoid breaking builds when KDE and/or Qt are installed to different +# prefixes). +add_definitions(${KDE4_DEFINITIONS}) -# Add libdl -find_library(DL_LIB NAMES ${CMAKE_DL_LIBS}) -message(STATUS "using dl library: ${DL_LIB}") +include_directories( + ${CMAKE_BINARY_DIR} + ${KDE4_INCLUDES} # Adds Qt include directories too. + ${LIBMLT_INCLUDE_DIR} + ${LIBMLTPLUS_INCLUDE_DIR} +) -kde4_add_kcfg_files(kdenlive_SRCS kdenlivesettings.kcfgc) -qt4_add_dbus_adaptor(kdenlive_SRCS org.kdenlive.MainWindow.xml mainwindow.h MainWindow) -qt4_add_resources(kdenlive_SRCS widgets/resources.qrc) -kde4_add_executable(kdenlive ${kdenlive_SRCS} ${kdenlive_UI}) +# Adds Qt definitions and include directories, and sets QT_LIBRARIES according +# to the components requested in find_package(). +include(${QT_USE_FILE}) if(${KDE_VERSION} VERSION_LESS 4.3.80) - set(KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF2_LIBS}) + set(KDE4_KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF2_LIBS}) else(${KDE_VERSION} VERSION_LESS 4.3.80) - set(KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF3_LIBS}) + set(KDE4_KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF3_LIBS}) endif(${KDE_VERSION} VERSION_LESS 4.3.80) target_link_libraries(kdenlive ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} - ${KNEWSTUFF_LIBS} - ${LIBMLTPLUS_LIBRARY} - ${LIBMLT_LIBRARY} - ${optional_libs} + ${KDE4_KNEWSTUFF_LIBS} ${KDE4_KNOTIFYCONFIG_LIBRARY} ${KDE4_KROSSUI_LIBS} + ${QT_LIBRARIES} + ${LIBMLT_LIBRARY} + ${LIBMLTPLUS_LIBRARY} ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} - ${QT_QTSCRIPT_LIBRARY} ) if(Q_WS_X11) + include_directories(${X11_Xlib_INCLUDE_PATH}) target_link_libraries(kdenlive ${X11_LIBRARIES}) endif(Q_WS_X11) -if(APPLE) - find_package(SDL REQUIRED) - target_link_libraries(kdenlive ${SDL_LIBRARY}) - target_link_libraries(kdenlive ${QT_QTOPENGL_LIBRARY}) +if(OPENGL_FOUND AND QT_QTOPENGL_FOUND) + add_definitions(-DUSE_OPENGL) target_link_libraries(kdenlive ${OPENGL_LIBRARIES}) -else(APPLE) - add_definitions(-DHAVE_V4L2) - if(OPENGL_FOUND) - target_link_libraries(kdenlive ${QT_QTOPENGL_LIBRARY}) - target_link_libraries(kdenlive ${OPENGL_LIBRARIES}) - endif(OPENGL_FOUND) -endif(APPLE) +endif(OPENGL_FOUND AND QT_QTOPENGL_FOUND) + +if(SDL_FOUND) + target_link_libraries(kdenlive ${SDL_LIBRARY}) +endif(SDL_FOUND) + +if(Nepomuk_FOUND) + add_definitions(-DUSE_NEPOMUK) + include_directories(${NEPOMUK_INCLUDES}) + target_link_libraries(kdenlive ${NEPOMUK_LIBRARIES}) +endif(Nepomuk_FOUND) + +if(QJSON_FOUND) + add_definitions(-DUSE_QJSON) + include_directories(${QJSON_INCLUDE_DIR}) + target_link_libraries(kdenlive ${QJSON_LIBRARIES}) +endif(QJSON_FOUND) + +if(BUILD_V4L) + add_definitions(-DUSE_V4L) +endif(BUILD_V4L) + +if(BUILD_JogShuttle) + add_definitions(-DUSE_JOGSHUTTLE) +endif(BUILD_JogShuttle) install(TARGETS kdenlive DESTINATION ${BIN_INSTALL_DIR}) -install(FILES kdenliveui.rc kdenlive.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kdenlive) +install(FILES + kdenliveui.rc + kdenlive.notifyrc + DESTINATION ${DATA_INSTALL_DIR}/kdenlive +) install(FILES kdenlivesettings.kcfg DESTINATION ${KCFG_INSTALL_DIR}) -install(FILES kdenlive.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) +install(FILES + kdenlive_projectprofiles.knsrc + kdenlive_renderprofiles.knsrc + kdenlive_titles.knsrc + kdenlive_wipes.knsrc + kdenlivetranscodingrc + DESTINATION ${CONFIG_INSTALL_DIR} +) kde4_install_icons(${ICON_INSTALL_DIR}) -install(FILES kdenlive_titles.knsrc kdenlive_wipes.knsrc kdenlive_renderprofiles.knsrc kdenlive_projectprofiles.knsrc kdenlivetranscodingrc DESTINATION ${CONFIG_INSTALL_DIR}) +install(FILES kdenlive.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) diff --git a/src/abstractscopewidget.cpp b/src/abstractscopewidget.cpp index 022063d3..0622bd97 100644 --- a/src/abstractscopewidget.cpp +++ b/src/abstractscopewidget.cpp @@ -8,12 +8,11 @@ * (at your option) any later version. * ***************************************************************************/ -#include "qtconcurrentrun.h" - #include "abstractscopewidget.h" #include "renderer.h" #include "monitor.h" +#include #include #include #include diff --git a/src/archivewidget.cpp b/src/archivewidget.cpp index 363781df..db2b9e8d 100644 --- a/src/archivewidget.cpp +++ b/src/archivewidget.cpp @@ -140,9 +140,7 @@ ArchiveWidget::ArchiveWidget(QString projectName, QDomDocument doc, QList = 0x040500 allFonts.removeDuplicates(); -#endif //TODO: fonts diff --git a/src/audioscopes/CMakeLists.txt b/src/audioscopes/CMakeLists.txt index e69de29b..7b8ef2bd 100644 --- a/src/audioscopes/CMakeLists.txt +++ b/src/audioscopes/CMakeLists.txt @@ -0,0 +1,8 @@ +set(kdenlive_SRCS + ${kdenlive_SRCS} + audioscopes/abstractaudioscopewidget.cpp + audioscopes/audiospectrum.cpp + audioscopes/ffttools.cpp + audioscopes/spectrogram.cpp + PARENT_SCOPE +) diff --git a/src/audioscopes/abstractaudioscopewidget.cpp b/src/audioscopes/abstractaudioscopewidget.cpp index 099a8e6e..16b50681 100644 --- a/src/audioscopes/abstractaudioscopewidget.cpp +++ b/src/audioscopes/abstractaudioscopewidget.cpp @@ -8,12 +8,11 @@ * (at your option) any later version. * ***************************************************************************/ -#include "qtconcurrentrun.h" - #include "abstractaudioscopewidget.h" #include "renderer.h" #include "monitor.h" +#include #include #include #include diff --git a/src/audioscopes/audiospectrum.cpp b/src/audioscopes/audiospectrum.cpp index eeb6a53a..be40af7a 100644 --- a/src/audioscopes/audiospectrum.cpp +++ b/src/audioscopes/audiospectrum.cpp @@ -12,7 +12,7 @@ #include "audiospectrum.h" #include "ffttools.h" -#include "tools/kiss_fftr.h" +#include "kiss_fft/tools/kiss_fftr.h" #include #include diff --git a/src/audioscopes/audiospectrum.h b/src/audioscopes/audiospectrum.h index 3f486c24..77308afa 100644 --- a/src/audioscopes/audiospectrum.h +++ b/src/audioscopes/audiospectrum.h @@ -29,7 +29,7 @@ #include "abstractaudioscopewidget.h" #include "ui_audiospectrum_ui.h" -#include "tools/kiss_fftr.h" +#include "kiss_fft/tools/kiss_fftr.h" #include "ffttools.h" class AudioSpectrum_UI; diff --git a/src/audioscopes/ffttools.h b/src/audioscopes/ffttools.h index f71d04aa..26cee848 100644 --- a/src/audioscopes/ffttools.h +++ b/src/audioscopes/ffttools.h @@ -13,7 +13,7 @@ #include #include -#include +#include "kiss_fft/tools/kiss_fftr.h" class FFTTools { diff --git a/src/audiosignal.cpp b/src/audiosignal.cpp index 30471e0b..6ccd2dd5 100644 --- a/src/audiosignal.cpp +++ b/src/audiosignal.cpp @@ -18,7 +18,6 @@ ***************************************************************************/ #include "audiosignal.h" -#include "math.h" #include @@ -29,6 +28,7 @@ #include #include +#include AudioSignal::AudioSignal(QWidget *parent): QWidget(parent) { diff --git a/src/beziercurve/CMakeLists.txt b/src/beziercurve/CMakeLists.txt index 8b137891..625b4044 100644 --- a/src/beziercurve/CMakeLists.txt +++ b/src/beziercurve/CMakeLists.txt @@ -1 +1,8 @@ - +set(kdenlive_SRCS + ${kdenlive_SRCS} + beziercurve/beziersplineeditor.cpp + beziercurve/beziersplinewidget.cpp + beziercurve/bpoint.cpp + beziercurve/cubicbezierspline.cpp + PARENT_SCOPE +) diff --git a/src/blackmagic/CMakeLists.txt b/src/blackmagic/CMakeLists.txt new file mode 100644 index 00000000..5bb17a9d --- /dev/null +++ b/src/blackmagic/CMakeLists.txt @@ -0,0 +1,6 @@ +set(kdenlive_SRCS + ${kdenlive_SRCS} + blackmagic/devices.cpp + blackmagic/include/DeckLinkAPIDispatch.cpp + PARENT_SCOPE +) diff --git a/src/clipitem.cpp b/src/clipitem.cpp index 9f6f0420..cac5eda2 100644 --- a/src/clipitem.cpp +++ b/src/clipitem.cpp @@ -27,7 +27,7 @@ #include "kdenlivesettings.h" #include "kthumb.h" #include "profilesdialog.h" -#ifdef QJSON +#ifdef USE_QJSON #include "rotoscoping/rotowidget.h" #endif @@ -1844,7 +1844,7 @@ QMap ClipItem::adjustEffectsToDuration(int width, int height, if (!effects.contains(i)) effects[i] = effect.cloneNode().toElement(); updateNormalKeyframes(param); -#ifdef QJSON +#ifdef USE_QJSON } else if (type == "roto-spline") { if (!effects.contains(i)) effects[i] = effect.cloneNode().toElement(); diff --git a/src/clipmanager.cpp b/src/clipmanager.cpp index ef169205..4c7db587 100644 --- a/src/clipmanager.cpp +++ b/src/clipmanager.cpp @@ -19,7 +19,7 @@ #include "clipmanager.h" -#include "addclipcommand.h" +#include "commands/addclipcommand.h" #include "kdenlivesettings.h" #include "docclipbase.h" #include "kdenlivedoc.h" diff --git a/src/colorcorrection/CMakeLists.txt b/src/colorcorrection/CMakeLists.txt index e69de29b..78d0fd10 100644 --- a/src/colorcorrection/CMakeLists.txt +++ b/src/colorcorrection/CMakeLists.txt @@ -0,0 +1,8 @@ +set(kdenlive_SRCS + ${kdenlive_SRCS} + colorcorrection/histogramgenerator.cpp + colorcorrection/rgbparadegenerator.cpp + colorcorrection/vectorscopegenerator.cpp + colorcorrection/waveformgenerator.cpp + PARENT_SCOPE +) diff --git a/src/colorscopes/CMakeLists.txt b/src/colorscopes/CMakeLists.txt new file mode 100644 index 00000000..d2df8d08 --- /dev/null +++ b/src/colorscopes/CMakeLists.txt @@ -0,0 +1,9 @@ +set(kdenlive_SRCS + ${kdenlive_SRCS} + colorscopes/abstractgfxscopewidget.cpp + colorscopes/histogram.cpp + colorscopes/rgbparade.cpp + colorscopes/vectorscope.cpp + colorscopes/waveform.cpp + PARENT_SCOPE +) diff --git a/src/colorscopes/abstractgfxscopewidget.cpp b/src/colorscopes/abstractgfxscopewidget.cpp index 370fcb0d..94f90400 100644 --- a/src/colorscopes/abstractgfxscopewidget.cpp +++ b/src/colorscopes/abstractgfxscopewidget.cpp @@ -8,12 +8,11 @@ * (at your option) any later version. * ***************************************************************************/ -#include "qtconcurrentrun.h" - #include "abstractgfxscopewidget.h" #include "renderer.h" #include "monitormanager.h" +#include #include #include #include diff --git a/src/colorscopes/histogram.cpp b/src/colorscopes/histogram.cpp index 9fd9ee8e..9b5915a5 100644 --- a/src/colorscopes/histogram.cpp +++ b/src/colorscopes/histogram.cpp @@ -10,7 +10,7 @@ #include #include -#include "histogramgenerator.h" +#include "colorcorrection/histogramgenerator.h" #include "histogram.h" #include "renderer.h" diff --git a/src/colorscopes/rgbparade.cpp b/src/colorscopes/rgbparade.cpp index 396697fc..18be787a 100644 --- a/src/colorscopes/rgbparade.cpp +++ b/src/colorscopes/rgbparade.cpp @@ -14,7 +14,7 @@ #include #include "renderer.h" #include "rgbparade.h" -#include "rgbparadegenerator.h" +#include "colorcorrection/rgbparadegenerator.h" RGBParade::RGBParade(MonitorManager *manager, QWidget *parent) : AbstractGfxScopeWidget(manager, true, parent) diff --git a/src/colorscopes/vectorscope.cpp b/src/colorscopes/vectorscope.cpp index fc98f1c7..76a6e722 100644 --- a/src/colorscopes/vectorscope.cpp +++ b/src/colorscopes/vectorscope.cpp @@ -22,7 +22,7 @@ #include "colortools.h" #include "renderer.h" #include "vectorscope.h" -#include "vectorscopegenerator.h" +#include "colorcorrection/vectorscopegenerator.h" const float P75 = .75; const unsigned char DEFAULT_Y = 255; diff --git a/src/colorscopes/waveform.cpp b/src/colorscopes/waveform.cpp index bf09234b..f8fec8b1 100644 --- a/src/colorscopes/waveform.cpp +++ b/src/colorscopes/waveform.cpp @@ -19,7 +19,7 @@ #include "renderer.h" #include "waveform.h" -#include "waveformgenerator.h" +#include "colorcorrection/waveformgenerator.h" const QSize Waveform::m_textWidth(35,0); diff --git a/src/commands/CMakeLists.txt b/src/commands/CMakeLists.txt new file mode 100644 index 00000000..e6cf61eb --- /dev/null +++ b/src/commands/CMakeLists.txt @@ -0,0 +1,34 @@ +set(kdenlive_SRCS + ${kdenlive_SRCS} + commands/addclipcommand.cpp + commands/addclipcutcommand.cpp + commands/addeffectcommand.cpp + commands/addfoldercommand.cpp + commands/addmarkercommand.cpp + commands/addtimelineclipcommand.cpp + commands/addtrackcommand.cpp + commands/addtransitioncommand.cpp + commands/changecliptypecommand.cpp + commands/changespeedcommand.cpp + commands/configtrackscommand.cpp + commands/editclipcommand.cpp + commands/editclipcutcommand.cpp + commands/editeffectcommand.cpp + commands/editfoldercommand.cpp + commands/editguidecommand.cpp + commands/editkeyframecommand.cpp + commands/edittransitioncommand.cpp + commands/groupclipscommand.cpp + commands/insertspacecommand.cpp + commands/locktrackcommand.cpp + commands/moveclipcommand.cpp + commands/moveeffectcommand.cpp + commands/movegroupcommand.cpp + commands/movetransitioncommand.cpp + commands/razorclipcommand.cpp + commands/razorgroupcommand.cpp + commands/rebuildgroupcommand.cpp + commands/resizeclipcommand.cpp + commands/splitaudiocommand.cpp + PARENT_SCOPE +) diff --git a/src/addclipcommand.cpp b/src/commands/addclipcommand.cpp similarity index 100% rename from src/addclipcommand.cpp rename to src/commands/addclipcommand.cpp diff --git a/src/addclipcommand.h b/src/commands/addclipcommand.h similarity index 100% rename from src/addclipcommand.h rename to src/commands/addclipcommand.h diff --git a/src/addclipcutcommand.cpp b/src/commands/addclipcutcommand.cpp similarity index 100% rename from src/addclipcutcommand.cpp rename to src/commands/addclipcutcommand.cpp diff --git a/src/addclipcutcommand.h b/src/commands/addclipcutcommand.h similarity index 100% rename from src/addclipcutcommand.h rename to src/commands/addclipcutcommand.h diff --git a/src/addeffectcommand.cpp b/src/commands/addeffectcommand.cpp similarity index 100% rename from src/addeffectcommand.cpp rename to src/commands/addeffectcommand.cpp diff --git a/src/addeffectcommand.h b/src/commands/addeffectcommand.h similarity index 100% rename from src/addeffectcommand.h rename to src/commands/addeffectcommand.h diff --git a/src/addfoldercommand.cpp b/src/commands/addfoldercommand.cpp similarity index 100% rename from src/addfoldercommand.cpp rename to src/commands/addfoldercommand.cpp diff --git a/src/addfoldercommand.h b/src/commands/addfoldercommand.h similarity index 100% rename from src/addfoldercommand.h rename to src/commands/addfoldercommand.h diff --git a/src/addmarkercommand.cpp b/src/commands/addmarkercommand.cpp similarity index 100% rename from src/addmarkercommand.cpp rename to src/commands/addmarkercommand.cpp diff --git a/src/addmarkercommand.h b/src/commands/addmarkercommand.h similarity index 100% rename from src/addmarkercommand.h rename to src/commands/addmarkercommand.h diff --git a/src/addtimelineclipcommand.cpp b/src/commands/addtimelineclipcommand.cpp similarity index 100% rename from src/addtimelineclipcommand.cpp rename to src/commands/addtimelineclipcommand.cpp diff --git a/src/addtimelineclipcommand.h b/src/commands/addtimelineclipcommand.h similarity index 100% rename from src/addtimelineclipcommand.h rename to src/commands/addtimelineclipcommand.h diff --git a/src/addtrackcommand.cpp b/src/commands/addtrackcommand.cpp similarity index 100% rename from src/addtrackcommand.cpp rename to src/commands/addtrackcommand.cpp diff --git a/src/addtrackcommand.h b/src/commands/addtrackcommand.h similarity index 100% rename from src/addtrackcommand.h rename to src/commands/addtrackcommand.h diff --git a/src/addtransitioncommand.cpp b/src/commands/addtransitioncommand.cpp similarity index 100% rename from src/addtransitioncommand.cpp rename to src/commands/addtransitioncommand.cpp diff --git a/src/addtransitioncommand.h b/src/commands/addtransitioncommand.h similarity index 100% rename from src/addtransitioncommand.h rename to src/commands/addtransitioncommand.h diff --git a/src/changecliptypecommand.cpp b/src/commands/changecliptypecommand.cpp similarity index 100% rename from src/changecliptypecommand.cpp rename to src/commands/changecliptypecommand.cpp diff --git a/src/changecliptypecommand.h b/src/commands/changecliptypecommand.h similarity index 100% rename from src/changecliptypecommand.h rename to src/commands/changecliptypecommand.h diff --git a/src/changespeedcommand.cpp b/src/commands/changespeedcommand.cpp similarity index 100% rename from src/changespeedcommand.cpp rename to src/commands/changespeedcommand.cpp diff --git a/src/changespeedcommand.h b/src/commands/changespeedcommand.h similarity index 100% rename from src/changespeedcommand.h rename to src/commands/changespeedcommand.h diff --git a/src/configtrackscommand.cpp b/src/commands/configtrackscommand.cpp similarity index 100% rename from src/configtrackscommand.cpp rename to src/commands/configtrackscommand.cpp diff --git a/src/configtrackscommand.h b/src/commands/configtrackscommand.h similarity index 100% rename from src/configtrackscommand.h rename to src/commands/configtrackscommand.h diff --git a/src/editclipcommand.cpp b/src/commands/editclipcommand.cpp similarity index 100% rename from src/editclipcommand.cpp rename to src/commands/editclipcommand.cpp diff --git a/src/editclipcommand.h b/src/commands/editclipcommand.h similarity index 100% rename from src/editclipcommand.h rename to src/commands/editclipcommand.h diff --git a/src/editclipcutcommand.cpp b/src/commands/editclipcutcommand.cpp similarity index 100% rename from src/editclipcutcommand.cpp rename to src/commands/editclipcutcommand.cpp diff --git a/src/editclipcutcommand.h b/src/commands/editclipcutcommand.h similarity index 100% rename from src/editclipcutcommand.h rename to src/commands/editclipcutcommand.h diff --git a/src/editeffectcommand.cpp b/src/commands/editeffectcommand.cpp similarity index 100% rename from src/editeffectcommand.cpp rename to src/commands/editeffectcommand.cpp diff --git a/src/editeffectcommand.h b/src/commands/editeffectcommand.h similarity index 100% rename from src/editeffectcommand.h rename to src/commands/editeffectcommand.h diff --git a/src/editfoldercommand.cpp b/src/commands/editfoldercommand.cpp similarity index 100% rename from src/editfoldercommand.cpp rename to src/commands/editfoldercommand.cpp diff --git a/src/editfoldercommand.h b/src/commands/editfoldercommand.h similarity index 100% rename from src/editfoldercommand.h rename to src/commands/editfoldercommand.h diff --git a/src/editguidecommand.cpp b/src/commands/editguidecommand.cpp similarity index 100% rename from src/editguidecommand.cpp rename to src/commands/editguidecommand.cpp diff --git a/src/editguidecommand.h b/src/commands/editguidecommand.h similarity index 100% rename from src/editguidecommand.h rename to src/commands/editguidecommand.h diff --git a/src/editkeyframecommand.cpp b/src/commands/editkeyframecommand.cpp similarity index 100% rename from src/editkeyframecommand.cpp rename to src/commands/editkeyframecommand.cpp diff --git a/src/editkeyframecommand.h b/src/commands/editkeyframecommand.h similarity index 100% rename from src/editkeyframecommand.h rename to src/commands/editkeyframecommand.h diff --git a/src/edittransitioncommand.cpp b/src/commands/edittransitioncommand.cpp similarity index 100% rename from src/edittransitioncommand.cpp rename to src/commands/edittransitioncommand.cpp diff --git a/src/edittransitioncommand.h b/src/commands/edittransitioncommand.h similarity index 100% rename from src/edittransitioncommand.h rename to src/commands/edittransitioncommand.h diff --git a/src/groupclipscommand.cpp b/src/commands/groupclipscommand.cpp similarity index 100% rename from src/groupclipscommand.cpp rename to src/commands/groupclipscommand.cpp diff --git a/src/groupclipscommand.h b/src/commands/groupclipscommand.h similarity index 100% rename from src/groupclipscommand.h rename to src/commands/groupclipscommand.h diff --git a/src/insertspacecommand.cpp b/src/commands/insertspacecommand.cpp similarity index 100% rename from src/insertspacecommand.cpp rename to src/commands/insertspacecommand.cpp diff --git a/src/insertspacecommand.h b/src/commands/insertspacecommand.h similarity index 100% rename from src/insertspacecommand.h rename to src/commands/insertspacecommand.h diff --git a/src/locktrackcommand.cpp b/src/commands/locktrackcommand.cpp similarity index 100% rename from src/locktrackcommand.cpp rename to src/commands/locktrackcommand.cpp diff --git a/src/locktrackcommand.h b/src/commands/locktrackcommand.h similarity index 100% rename from src/locktrackcommand.h rename to src/commands/locktrackcommand.h diff --git a/src/moveclipcommand.cpp b/src/commands/moveclipcommand.cpp similarity index 100% rename from src/moveclipcommand.cpp rename to src/commands/moveclipcommand.cpp diff --git a/src/moveclipcommand.h b/src/commands/moveclipcommand.h similarity index 100% rename from src/moveclipcommand.h rename to src/commands/moveclipcommand.h diff --git a/src/moveeffectcommand.cpp b/src/commands/moveeffectcommand.cpp similarity index 100% rename from src/moveeffectcommand.cpp rename to src/commands/moveeffectcommand.cpp diff --git a/src/moveeffectcommand.h b/src/commands/moveeffectcommand.h similarity index 100% rename from src/moveeffectcommand.h rename to src/commands/moveeffectcommand.h diff --git a/src/movegroupcommand.cpp b/src/commands/movegroupcommand.cpp similarity index 100% rename from src/movegroupcommand.cpp rename to src/commands/movegroupcommand.cpp diff --git a/src/movegroupcommand.h b/src/commands/movegroupcommand.h similarity index 100% rename from src/movegroupcommand.h rename to src/commands/movegroupcommand.h diff --git a/src/movetransitioncommand.cpp b/src/commands/movetransitioncommand.cpp similarity index 100% rename from src/movetransitioncommand.cpp rename to src/commands/movetransitioncommand.cpp diff --git a/src/movetransitioncommand.h b/src/commands/movetransitioncommand.h similarity index 100% rename from src/movetransitioncommand.h rename to src/commands/movetransitioncommand.h diff --git a/src/razorclipcommand.cpp b/src/commands/razorclipcommand.cpp similarity index 100% rename from src/razorclipcommand.cpp rename to src/commands/razorclipcommand.cpp diff --git a/src/razorclipcommand.h b/src/commands/razorclipcommand.h similarity index 100% rename from src/razorclipcommand.h rename to src/commands/razorclipcommand.h diff --git a/src/razorgroupcommand.cpp b/src/commands/razorgroupcommand.cpp similarity index 100% rename from src/razorgroupcommand.cpp rename to src/commands/razorgroupcommand.cpp diff --git a/src/razorgroupcommand.h b/src/commands/razorgroupcommand.h similarity index 100% rename from src/razorgroupcommand.h rename to src/commands/razorgroupcommand.h diff --git a/src/rebuildgroupcommand.cpp b/src/commands/rebuildgroupcommand.cpp similarity index 100% rename from src/rebuildgroupcommand.cpp rename to src/commands/rebuildgroupcommand.cpp diff --git a/src/rebuildgroupcommand.h b/src/commands/rebuildgroupcommand.h similarity index 100% rename from src/rebuildgroupcommand.h rename to src/commands/rebuildgroupcommand.h diff --git a/src/resizeclipcommand.cpp b/src/commands/resizeclipcommand.cpp similarity index 100% rename from src/resizeclipcommand.cpp rename to src/commands/resizeclipcommand.cpp diff --git a/src/resizeclipcommand.h b/src/commands/resizeclipcommand.h similarity index 100% rename from src/resizeclipcommand.h rename to src/commands/resizeclipcommand.h diff --git a/src/splitaudiocommand.cpp b/src/commands/splitaudiocommand.cpp similarity index 100% rename from src/splitaudiocommand.cpp rename to src/commands/splitaudiocommand.cpp diff --git a/src/splitaudiocommand.h b/src/commands/splitaudiocommand.h similarity index 100% rename from src/splitaudiocommand.h rename to src/commands/splitaudiocommand.h diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index 052d1efc..f5e7d91a 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -22,20 +22,20 @@ #include "docclipbase.h" #include "clipitem.h" #include "definitions.h" -#include "moveclipcommand.h" -#include "movetransitioncommand.h" -#include "resizeclipcommand.h" -#include "editguidecommand.h" -#include "addtimelineclipcommand.h" -#include "addeffectcommand.h" -#include "editeffectcommand.h" -#include "moveeffectcommand.h" -#include "addtransitioncommand.h" -#include "edittransitioncommand.h" -#include "editkeyframecommand.h" -#include "changespeedcommand.h" -#include "addmarkercommand.h" -#include "razorclipcommand.h" +#include "commands/moveclipcommand.h" +#include "commands/movetransitioncommand.h" +#include "commands/resizeclipcommand.h" +#include "commands/editguidecommand.h" +#include "commands/addtimelineclipcommand.h" +#include "commands/addeffectcommand.h" +#include "commands/editeffectcommand.h" +#include "commands/moveeffectcommand.h" +#include "commands/addtransitioncommand.h" +#include "commands/edittransitioncommand.h" +#include "commands/editkeyframecommand.h" +#include "commands/changespeedcommand.h" +#include "commands/addmarkercommand.h" +#include "commands/razorclipcommand.h" #include "kdenlivesettings.h" #include "transition.h" #include "clipmanager.h" @@ -45,21 +45,21 @@ #include "ui_keyframedialog_ui.h" #include "clipdurationdialog.h" #include "abstractgroupitem.h" -#include "insertspacecommand.h" +#include "commands/insertspacecommand.h" #include "spacerdialog.h" -#include "addtrackcommand.h" -#include "movegroupcommand.h" +#include "commands/addtrackcommand.h" +#include "commands/movegroupcommand.h" #include "ui_addtrack_ui.h" #include "initeffects.h" -#include "locktrackcommand.h" -#include "groupclipscommand.h" -#include "splitaudiocommand.h" -#include "changecliptypecommand.h" +#include "commands/locktrackcommand.h" +#include "commands/groupclipscommand.h" +#include "commands/splitaudiocommand.h" +#include "commands/changecliptypecommand.h" #include "trackdialog.h" #include "tracksconfigdialog.h" -#include "configtrackscommand.h" -#include "rebuildgroupcommand.h" -#include "razorgroupcommand.h" +#include "commands/configtrackscommand.h" +#include "commands/rebuildgroupcommand.h" +#include "commands/razorgroupcommand.h" #include "profilesdialog.h" #include @@ -6420,9 +6420,7 @@ QStringList CustomTrackView::extractTransitionsLumas() if (!luma.isEmpty()) urls << KUrl(luma).path(); } } -#if QT_VERSION >= 0x040500 urls.removeDuplicates(); -#endif return urls; } diff --git a/src/dvdwizardvob.cpp b/src/dvdwizardvob.cpp index 68a2dfa3..ebc4b844 100644 --- a/src/dvdwizardvob.cpp +++ b/src/dvdwizardvob.cpp @@ -68,22 +68,16 @@ DvdWizardVob::DvdWizardVob(const QString &profile, QWidget *parent) : m_view.vobs_list->header()->setResizeMode(1, QHeaderView::Custom); m_view.vobs_list->header()->setResizeMode(2, QHeaderView::Custom); -#if KDE_IS_VERSION(4,2,0) m_capacityBar = new KCapacityBar(KCapacityBar::DrawTextInline, this); QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(m_capacityBar); m_view.size_box->setLayout(layout); -#else - m_view.size_box->setHidden(true); -#endif slotCheckVobList(); } DvdWizardVob::~DvdWizardVob() { -#if KDE_IS_VERSION(4,2,0) delete m_capacityBar; -#endif } @@ -300,7 +294,6 @@ void DvdWizardVob::slotCheckVobList() if (hasItem && m_view.vobs_list->indexOfTopLevelItem(item) == max - 1) m_view.button_down->setEnabled(false); else m_view.button_down->setEnabled(hasItem); -#if KDE_IS_VERSION(4,2,0) qint64 totalSize = 0; for (int i = 0; i < max; i++) { item = m_view.vobs_list->topLevelItem(i); @@ -310,7 +303,6 @@ void DvdWizardVob::slotCheckVobList() qint64 maxSize = (qint64) 47000 * 100000; m_capacityBar->setValue(100 * totalSize / maxSize); m_capacityBar->setText(KIO::convertSize(totalSize)); -#endif } void DvdWizardVob::slotItemUp() diff --git a/src/dvdwizardvob.h b/src/dvdwizardvob.h index 58698cf0..aa024dd8 100644 --- a/src/dvdwizardvob.h +++ b/src/dvdwizardvob.h @@ -24,11 +24,7 @@ #include "ui_dvdwizardvob_ui.h" #include - -#if KDE_IS_VERSION(4,2,0) #include -#endif - #include #include @@ -57,10 +53,7 @@ public: private: Ui::DvdWizardVob_UI m_view; QString m_errorMessage; - -#if KDE_IS_VERSION(4,2,0) KCapacityBar *m_capacityBar; -#endif public slots: void slotAddVobFile(KUrl url = KUrl(), const QString &chapters = QString()); diff --git a/src/effectstackedit.cpp b/src/effectstackedit.cpp index 7253b495..2a956679 100644 --- a/src/effectstackedit.cpp +++ b/src/effectstackedit.cpp @@ -35,7 +35,7 @@ #include "doubleparameterwidget.h" #include "cornerswidget.h" #include "beziercurve/beziersplinewidget.h" -#ifdef QJSON +#ifdef USE_QJSON #include "rotoscoping/rotowidget.h" #endif @@ -457,7 +457,7 @@ void EffectStackEdit::transferParamDesc(const QDomElement &d, ItemInfo info, boo QString depends = pa.attribute("depends"); if (!depends.isEmpty()) meetDependency(paramName, type, EffectsList::parameter(d, depends)); -#ifdef QJSON +#ifdef USE_QJSON } else if (type == "roto-spline") { RotoWidget *roto = new RotoWidget(value, m_monitor, info, m_timecode, this); roto->slotShowScene(!disable); @@ -751,7 +751,7 @@ void EffectStackEdit::collectAllParameters() QString depends = pa.attributes().namedItem("depends").nodeValue(); if (!depends.isEmpty()) meetDependency(paramName, type, EffectsList::parameter(newparam, depends)); -#ifdef QJSON +#ifdef USE_QJSON } else if (type == "roto-spline") { RotoWidget *widget = static_cast(m_valueItems.value(paramName)); setValue = widget->getSpline(); diff --git a/src/kdenlivesettingsdialog.cpp b/src/kdenlivesettingsdialog.cpp index 65ae680f..34297068 100644 --- a/src/kdenlivesettingsdialog.cpp +++ b/src/kdenlivesettingsdialog.cpp @@ -19,7 +19,7 @@ #include "kdenlivesettingsdialog.h" #include "profilesdialog.h" -#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) +#ifdef USE_V4L #include "v4l/v4lcapture.h" #endif #include "blackmagic/devices.h" @@ -43,11 +43,11 @@ #include #include #include -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE #include "jogaction.h" #include "jogshuttleconfig.h" #include -#endif /* NO_JOGSHUTTLE */ +#endif KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap& mappable_actions, QWidget * parent) : @@ -97,7 +97,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap& map QWidget *p4 = new QWidget; m_configCapture.setupUi(p4); -#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) +#ifdef USE_V4L // Video 4 Linux device detection for (int i = 0; i < 10; i++) { @@ -120,18 +120,15 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap& map m_page4 = addPage(p4, i18n("Capture"), "media-record"); m_configCapture.tabWidget->setCurrentIndex(KdenliveSettings::defaultcapture()); -#ifdef Q_WS_MAC +#ifndef USE_V4L m_configCapture.tabWidget->setEnabled(false); m_configCapture.kcfg_defaultcapture->setEnabled(false); - m_configCapture.label->setText(i18n("Capture is not yet available on OS X.")); + m_configCapture.label->setText(i18n("Capture is not yet available on this platform.")); #endif QWidget *p5 = new QWidget; m_configShuttle.setupUi(p5); -#ifdef NO_JOGSHUTTLE - m_configShuttle.kcfg_enableshuttle->hide(); - m_configShuttle.kcfg_enableshuttle->setDisabled(true); -#else +#ifdef USE_JOGSHUTTLE connect(m_configShuttle.kcfg_enableshuttle, SIGNAL(stateChanged(int)), this, SLOT(slotCheckShuttle(int))); connect(m_configShuttle.shuttledevicelist, SIGNAL(activated(int)), this, SLOT(slotUpdateShuttleDevice(int))); slotCheckShuttle(KdenliveSettings::enableshuttle()); @@ -171,13 +168,16 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap& map if (i < actions_map.size()) button->setCurrentIndex(action_pos[actions_map[i]]); } -#endif /* NO_JOGSHUTTLE */ +#else /* ! USE_JOGSHUTTLE */ + m_configShuttle.kcfg_enableshuttle->hide(); + m_configShuttle.kcfg_enableshuttle->setDisabled(true); +#endif /* USE_JOGSHUTTLE */ m_page5 = addPage(p5, i18n("JogShuttle"), "input-mouse"); QWidget *p6 = new QWidget; m_configSdl.setupUi(p6); -#if not defined(Q_WS_MAC) && not defined(USE_OPEN_GL) +#ifndef USE_OPENGL m_configSdl.kcfg_openglmonitors->setHidden(true); #endif @@ -506,7 +506,7 @@ void KdenliveSettingsDialog::slotEditImageApplication() m_configEnv.kcfg_defaultimageapp->setText(service->exec()); } -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE void KdenliveSettingsDialog::slotCheckShuttle(int state) { m_configShuttle.config_group->setEnabled(state); @@ -536,13 +536,13 @@ void KdenliveSettingsDialog::slotUpdateShuttleDevice(int ix) m_configShuttle.kcfg_shuttledevice->setText(device); } -#endif /* NO_JOGSHUTTLE */ +#endif /* USE_JOGSHUTTLE */ void KdenliveSettingsDialog::updateWidgets() { // Revert widgets to last saved state (for example when user pressed "Cancel") // kDebug() << "// // // KCONFIG Revert called"; -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE // revert jog shuttle device if (m_configShuttle.shuttledevicelist->count() > 0) { for (int i = 0; i < m_configShuttle.shuttledevicelist->count(); i++) { @@ -573,7 +573,7 @@ void KdenliveSettingsDialog::updateWidgets() if (i < actions_map.size()) button->setCurrentIndex(action_pos[actions_map[i]]); } -#endif +#endif /* USE_JOGSHUTTLE */ } void KdenliveSettingsDialog::updateSettings() @@ -698,7 +698,7 @@ void KdenliveSettingsDialog::updateSettings() saveTranscodeProfiles(); } -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE m_shuttleModified = false; QStringList actions; @@ -712,10 +712,7 @@ void KdenliveSettingsDialog::updateSettings() KdenliveSettings::setShuttlebuttons(maps); #endif -#if KDE_IS_VERSION(4,3,0) KConfigDialog::settingsChangedSlot(); -#endif - //KConfigDialog::updateSettings(); if (resetProfile) emit doResetProfile(); } @@ -792,7 +789,7 @@ void KdenliveSettingsDialog::slotDeleteTranscode() void KdenliveSettingsDialog::slotShuttleModified() { -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE QStringList actions; actions << "monitor_pause"; // the Job rest position action. foreach (KComboBox* button, m_shuttle_buttons) { @@ -801,17 +798,13 @@ void KdenliveSettingsDialog::slotShuttleModified() QString maps = JogShuttleConfig::actionMap(actions); m_shuttleModified = KdenliveSettings::shuttlebuttons() != maps; #endif -#if KDE_IS_VERSION(4,3,0) KConfigDialog::updateButtons(); -#endif } void KdenliveSettingsDialog::slotDialogModified() { m_modified = true; -#if KDE_IS_VERSION(4,3,0) KConfigDialog::updateButtons(); -#endif } //virtual diff --git a/src/kdenlivesettingsdialog.h b/src/kdenlivesettingsdialog.h index 6334af20..8c01c3fb 100644 --- a/src/kdenlivesettingsdialog.h +++ b/src/kdenlivesettingsdialog.h @@ -53,10 +53,10 @@ protected slots: private slots: void slotUpdateDisplay(); -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE void slotCheckShuttle(int state = 0); void slotUpdateShuttleDevice(int ix = 0); -#endif /* NO_JOGSHUTTLE */ +#endif void slotEditImageApplication(); void slotEditAudioApplication(); void slotEditVideoApplication(); diff --git a/src/kiss_fft/CMakeLists.txt b/src/kiss_fft/CMakeLists.txt index f7c6b56e..51288bf5 100644 --- a/src/kiss_fft/CMakeLists.txt +++ b/src/kiss_fft/CMakeLists.txt @@ -1 +1,7 @@ -add_subdirectory(tools) +set(kdenlive_SRCS + ${kdenlive_SRCS} + kiss_fft/_kiss_fft_guts.h + kiss_fft/kiss_fft.c + kiss_fft/tools/kiss_fftr.c + PARENT_SCOPE +) diff --git a/src/kiss_fft/kiss_fft.h b/src/kiss_fft/kiss_fft.h index 82597e58..8f94b077 100644 --- a/src/kiss_fft/kiss_fft.h +++ b/src/kiss_fft/kiss_fft.h @@ -1,11 +1,13 @@ #ifndef KISS_FFT_H #define KISS_FFT_H +#include "kdenlive-config.h" + #include #include #include #include -#if !defined(__APPLE__) && !defined(__FreeBSD__) +#ifdef HAVE_MALLOC_H #include #endif diff --git a/src/kiss_fft/tools/CMakeLists.txt b/src/kiss_fft/tools/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/kiss_fft/tools/fftutil.c b/src/kiss_fft/tools/fftutil.c index db5a8151..04592279 100644 --- a/src/kiss_fft/tools/fftutil.c +++ b/src/kiss_fft/tools/fftutil.c @@ -18,7 +18,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #include #include -#include "kiss_fft.h" +#include "../kiss_fft.h" #include "kiss_fftndr.h" static diff --git a/src/kiss_fft/tools/kfc.h b/src/kiss_fft/tools/kfc.h index 9b5fd677..321a88a8 100644 --- a/src/kiss_fft/tools/kfc.h +++ b/src/kiss_fft/tools/kfc.h @@ -1,6 +1,6 @@ #ifndef KFC_H #define KFC_H -#include "kiss_fft.h" +#include "../kiss_fft.h" #ifdef __cplusplus extern "C" { diff --git a/src/kiss_fft/tools/kiss_fastfir.c b/src/kiss_fft/tools/kiss_fastfir.c index 1c96216d..dfd7c8c0 100644 --- a/src/kiss_fft/tools/kiss_fastfir.c +++ b/src/kiss_fft/tools/kiss_fastfir.c @@ -12,7 +12,7 @@ Redistribution and use in source and binary forms, with or without modification, THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "_kiss_fft_guts.h" +#include "../_kiss_fft_guts.h" /* diff --git a/src/kiss_fft/tools/kiss_fftnd.c b/src/kiss_fft/tools/kiss_fftnd.c index d6c91243..a1189781 100644 --- a/src/kiss_fft/tools/kiss_fftnd.c +++ b/src/kiss_fft/tools/kiss_fftnd.c @@ -15,7 +15,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */ #include "kiss_fftnd.h" -#include "_kiss_fft_guts.h" +#include "../_kiss_fft_guts.h" struct kiss_fftnd_state{ int dimprod; /* dimsum would be mighty tasty right now */ diff --git a/src/kiss_fft/tools/kiss_fftnd.h b/src/kiss_fft/tools/kiss_fftnd.h index 42e7df5b..ed7a0696 100644 --- a/src/kiss_fft/tools/kiss_fftnd.h +++ b/src/kiss_fft/tools/kiss_fftnd.h @@ -1,7 +1,7 @@ #ifndef KISS_FFTND_H #define KISS_FFTND_H -#include "kiss_fft.h" +#include "../kiss_fft.h" #ifdef __cplusplus extern "C" { diff --git a/src/kiss_fft/tools/kiss_fftndr.c b/src/kiss_fft/tools/kiss_fftndr.c index ba550dd1..b593183a 100644 --- a/src/kiss_fft/tools/kiss_fftndr.c +++ b/src/kiss_fft/tools/kiss_fftndr.c @@ -13,7 +13,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */ #include "kiss_fftndr.h" -#include "_kiss_fft_guts.h" +#include "../_kiss_fft_guts.h" #define MAX(x,y) ( ( (x)<(y) )?(y):(x) ) struct kiss_fftndr_state diff --git a/src/kiss_fft/tools/kiss_fftndr.h b/src/kiss_fft/tools/kiss_fftndr.h index 38ec3ab0..15df6508 100644 --- a/src/kiss_fft/tools/kiss_fftndr.h +++ b/src/kiss_fft/tools/kiss_fftndr.h @@ -1,7 +1,7 @@ #ifndef KISS_NDR_H #define KISS_NDR_H -#include "kiss_fft.h" +#include "../kiss_fft.h" #include "kiss_fftr.h" #include "kiss_fftnd.h" diff --git a/src/kiss_fft/tools/kiss_fftr.c b/src/kiss_fft/tools/kiss_fftr.c index f389770b..a9855534 100644 --- a/src/kiss_fft/tools/kiss_fftr.c +++ b/src/kiss_fft/tools/kiss_fftr.c @@ -13,7 +13,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */ #include "kiss_fftr.h" -#include "_kiss_fft_guts.h" +#include "../_kiss_fft_guts.h" struct kiss_fftr_state{ kiss_fft_cfg substate; diff --git a/src/kiss_fft/tools/kiss_fftr.h b/src/kiss_fft/tools/kiss_fftr.h index 72e5a577..81d8a8ec 100644 --- a/src/kiss_fft/tools/kiss_fftr.h +++ b/src/kiss_fft/tools/kiss_fftr.h @@ -1,7 +1,7 @@ #ifndef KISS_FTR_H #define KISS_FTR_H -#include "kiss_fft.h" +#include "../kiss_fft.h" #ifdef __cplusplus extern "C" { #endif diff --git a/src/kiss_fft/tools/psdpng.c b/src/kiss_fft/tools/psdpng.c index d11a54fd..ef9ff5bc 100644 --- a/src/kiss_fft/tools/psdpng.c +++ b/src/kiss_fft/tools/psdpng.c @@ -19,7 +19,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #include #include -#include "kiss_fft.h" +#include "../kiss_fft.h" #include "kiss_fftr.h" int nfft=1024; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 89039b27..d9f6c403 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -40,14 +40,14 @@ #include "renderwidget.h" #include "renderer.h" #include "audiosignal.h" -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE #include "jogshuttle.h" #include "jogaction.h" #include "jogshuttleconfig.h" -#endif /* NO_JOGSHUTTLE */ +#endif #include "clipproperties.h" #include "wizard.h" -#include "editclipcommand.h" +#include "commands/editclipcommand.h" #include "titlewidget.h" #include "markerdialog.h" #include "clipitem.h" @@ -59,8 +59,8 @@ #include "colorscopes/waveform.h" #include "colorscopes/rgbparade.h" #include "colorscopes/histogram.h" -#include "audiospectrum.h" -#include "spectrogram.h" +#include "audioscopes/audiospectrum.h" +#include "audioscopes/spectrogram.h" #include "archivewidget.h" #include "databackup/backupwidget.h" @@ -99,7 +99,7 @@ #include #include #define KNS3 KNS -#endif /* KDE_IS_VERSION(4,3,80) */ +#endif #include #include #include @@ -143,10 +143,10 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & m_activeTimeline(NULL), m_recMonitor(NULL), m_renderWidget(NULL), -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE m_jogProcess(NULL), m_jogShuttle(NULL), -#endif /* NO_JOGSHUTTLE */ +#endif m_findActivated(false), m_stopmotion(NULL) { @@ -235,7 +235,7 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & connect(m_recMonitor, SIGNAL(addProjectClip(KUrl)), this, SLOT(slotAddProjectClip(KUrl))); connect(m_recMonitor, SIGNAL(addProjectClipList(KUrl::List)), this, SLOT(slotAddProjectClipList(KUrl::List))); connect(m_recMonitor, SIGNAL(showConfigDialog(int, int)), this, SLOT(slotPreferences(int, int))); -#endif +#endif /* ! Q_WS_MAC */ m_monitorManager->initMonitors(m_clipMonitor, m_projectMonitor, m_recMonitor); m_notesDock = new QDockWidget(i18n("Project Notes"), this); @@ -615,9 +615,9 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & m_projectList->slotAddClip(urls); } -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE activateShuttleDevice(); -#endif /* NO_JOGSHUTTLE */ +#endif m_projectListDock->raise(); actionCollection()->addAssociatedWidget(m_clipMonitor->container()); @@ -829,7 +829,7 @@ void MainWindow::slotReloadEffects() m_effectList->reloadEffectList(m_effectsMenu, m_effectActions); } -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE void MainWindow::activateShuttleDevice() { delete m_jogShuttle; @@ -847,7 +847,7 @@ void MainWindow::activateShuttleDevice() connect(m_jogShuttle, SIGNAL(forward(double)), m_monitorManager, SLOT(slotForward(double))); connect(m_jogShuttle, SIGNAL(action(const QString&)), this, SLOT(slotDoAction(const QString&))); } -#endif /* NO_JOGSHUTTLE */ +#endif /* USE_JOGSHUTTLE */ void MainWindow::slotDoAction(const QString& action_name) { @@ -2260,7 +2260,7 @@ void MainWindow::slotEditProjectSettings() if (w->exec() == QDialog::Accepted) { QString profile = w->selectedProfile(); m_activeDocument->setProjectFolder(w->selectedFolder()); -#ifndef Q_WS_MAC +#ifndef Q_WS_MAC m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash)); #endif if (m_renderWidget) m_renderWidget->setDocumentPath(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash)); @@ -2589,7 +2589,7 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) //cha m_activeDocument = doc; m_activeTimeline->updateProjectFps(); m_activeDocument->checkProjectClips(); -#ifndef Q_WS_MAC +#ifndef Q_WS_MAC m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash)); #endif //Update the mouse position display so it will display in DF/NDF format by default based on the project setting. @@ -2656,7 +2656,7 @@ void MainWindow::slotPreferences(int page, int option) void MainWindow::slotUpdateCaptureFolder() { -#ifndef Q_WS_MAC +#ifndef Q_WS_MAC if (m_activeDocument) m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash)); else m_recMonitor->slotUpdateCaptureFolder(KdenliveSettings::defaultprojectfolder()); #endif @@ -2679,9 +2679,9 @@ void MainWindow::updateConfiguration() // Update list of transcoding profiles loadTranscoders(); -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE activateShuttleDevice(); -#endif /* NO_JOGSHUTTLE */ +#endif } @@ -3685,7 +3685,7 @@ int MainWindow::getNewStuff(const QString &configFile) if (entry->status() == KNS::Entry::Installed) kDebug() << "// Installed files: " << entry->installedFiles(); } -#endif /* KDE_IS_VERSION(4,3,80) */ +#endif return entries.size(); } diff --git a/src/mainwindow.h b/src/mainwindow.h index 075132f2..b2232914 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -59,10 +59,10 @@ class Monitor; class RecMonitor; class CustomTrackView; class RenderWidget; -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE class JogShuttle; class JogShuttleAction; -#endif /* NO_JOGSHUTTLE */ +#endif class DocClipBase; class Render; class Transition; @@ -222,10 +222,10 @@ private: RenderWidget *m_renderWidget; -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE JogShuttle *m_jogProcess; JogShuttleAction* m_jogShuttle; -#endif /* NO_JOGSHUTTLE */ +#endif KRecentFilesAction *m_fileOpenRecent; KAction *m_fileRevert; @@ -267,9 +267,9 @@ private: void readOptions(); void saveOptions(); -#ifndef NO_JOGSHUTTLE +#ifdef USE_JOGSHUTTLE void activateShuttleDevice(); -#endif /* NO_JOGSHUTTLE */ +#endif void connectDocumentInfo(KdenliveDoc *doc); void findAhead(); void doOpenFile(const KUrl &url, KAutoSaveFile *stale); diff --git a/src/mltdevicecapture.h b/src/mltdevicecapture.h index 7ba44c2c..ba757335 100644 --- a/src/mltdevicecapture.h +++ b/src/mltdevicecapture.h @@ -26,7 +26,8 @@ #include "gentime.h" #include "definitions.h" #include "abstractmonitor.h" -#include "mlt/framework/mlt_types.h" + +#include #include diff --git a/src/monitor.cpp b/src/monitor.cpp index 7d202c9b..8cfa793f 100644 --- a/src/monitor.cpp +++ b/src/monitor.cpp @@ -155,7 +155,7 @@ Monitor::Monitor(QString name, MonitorManager *manager, QString profile, QWidget createOpenGlWidget(m_videoBox, profile); monitorCreated = true; //m_glWidget->setFixedSize(width, height); -#elif defined (USE_OPEN_GL) +#elif defined(USE_OPENGL) if (KdenliveSettings::openglmonitors()) { monitorCreated = createOpenGlWidget(m_videoBox, profile); } @@ -169,7 +169,7 @@ Monitor::Monitor(QString name, MonitorManager *manager, QString profile, QWidget render = new Render(m_name, (int) m_monitorRefresh->winId(), profile, this); m_monitorRefresh->setRenderer(render); } -#if defined (USE_OPEN_GL) +#ifdef USE_OPENGL else if (m_glWidget) { lay->addWidget(m_glWidget); m_videoBox->setLayout(lay); @@ -229,7 +229,7 @@ const QString Monitor::name() const return m_name; } -#if defined(Q_WS_MAC) || defined(USE_OPEN_GL) +#ifdef USE_OPENGL bool Monitor::createOpenGlWidget(QWidget *parent, const QString profile) { render = new Render(m_name, 0, profile, this); @@ -577,9 +577,7 @@ void Monitor::slotExtractCurrentFrame() KFileDialog *fs = new KFileDialog(KUrl(), "image/png", this); fs->setOperationMode(KFileDialog::Saving); fs->setMode(KFile::File); -#if KDE_IS_VERSION(4,2,0) fs->setConfirmOverwrite(true); -#endif fs->setKeepLocation(true); fs->exec(); QString path = fs->selectedFile(); @@ -915,7 +913,7 @@ void Monitor::slotSwitchMonitorInfo(bool show) if (m_overlay) return; if (m_monitorRefresh == NULL) { // Using OpenGL display -#if defined(Q_WS_MAC) || defined(USE_OPEN_GL) +#ifdef USE_OPENGL if (m_glWidget->layout()) delete m_glWidget->layout(); m_overlay = new Overlay(); connect(m_overlay, SIGNAL(editMarker()), this, SLOT(slotEditMarker())); @@ -995,7 +993,7 @@ void Monitor::slotEffectScene(bool show) if (m_monitorRefresh) { m_monitorRefresh->setVisible(!show); } else { -#if defined(Q_WS_MAC) || defined(USE_OPEN_GL) +#ifdef USE_OPENGL m_glWidget->setVisible(!show); #endif } diff --git a/src/monitor.h b/src/monitor.h index 527935e4..ba949ff0 100644 --- a/src/monitor.h +++ b/src/monitor.h @@ -25,7 +25,7 @@ #include "renderer.h" #include "timecodedisplay.h" #include "abstractmonitor.h" -#if defined(Q_WS_MAC) || defined(USE_OPEN_GL) +#ifdef USE_OPENGL #include "videoglwidget.h" #endif @@ -170,7 +170,7 @@ private: * Necessary because sometimes we get two signals, e.g. we get a clip and we get selected transition = NULL. */ bool m_loopClipTransition; -#if defined(Q_WS_MAC) || defined(USE_OPEN_GL) +#ifdef USE_OPENGL VideoGLWidget *m_glWidget; bool createOpenGlWidget(QWidget *parent, const QString profile); #endif diff --git a/src/onmonitoritems/CMakeLists.txt b/src/onmonitoritems/CMakeLists.txt index 1afa18c3..58ece7c0 100644 --- a/src/onmonitoritems/CMakeLists.txt +++ b/src/onmonitoritems/CMakeLists.txt @@ -1 +1,6 @@ -add_subdirectory(rotoscoping) +set(kdenlive_SRCS + ${kdenlive_SRCS} + onmonitoritems/onmonitorcornersitem.cpp + onmonitoritems/onmonitorrectitem.cpp + PARENT_SCOPE +) diff --git a/src/onmonitoritems/rotoscoping/CMakeLists.txt b/src/onmonitoritems/rotoscoping/CMakeLists.txt index e69de29b..51776fa2 100644 --- a/src/onmonitoritems/rotoscoping/CMakeLists.txt +++ b/src/onmonitoritems/rotoscoping/CMakeLists.txt @@ -0,0 +1,7 @@ +set(kdenlive_SRCS + ${kdenlive_SRCS} + onmonitoritems/rotoscoping/bpointitem.cpp + onmonitoritems/rotoscoping/nearestpoint.cpp + onmonitoritems/rotoscoping/splineitem.cpp + PARENT_SCOPE +) diff --git a/src/onmonitoritems/rotoscoping/bpointitem.h b/src/onmonitoritems/rotoscoping/bpointitem.h index 1a767c57..536182bf 100644 --- a/src/onmonitoritems/rotoscoping/bpointitem.h +++ b/src/onmonitoritems/rotoscoping/bpointitem.h @@ -19,7 +19,7 @@ #ifndef BPOINTITEM_H #define BPOINTITEM_H -#include "bpoint.h" +#include "beziercurve/bpoint.h" #include #include diff --git a/src/projectlist.cpp b/src/projectlist.cpp index 76730ffc..73f91d4f 100644 --- a/src/projectlist.cpp +++ b/src/projectlist.cpp @@ -19,7 +19,7 @@ #include "projectlist.h" #include "projectitem.h" -#include "addfoldercommand.h" +#include "commands/addfoldercommand.h" #include "kdenlivesettings.h" #include "slideshowclip.h" #include "ui_colorclip_ui.h" @@ -33,10 +33,10 @@ #include "projectlistview.h" #include "timecodedisplay.h" #include "profilesdialog.h" -#include "editclipcommand.h" -#include "editclipcutcommand.h" -#include "editfoldercommand.h" -#include "addclipcutcommand.h" +#include "commands/editclipcommand.h" +#include "commands/editclipcutcommand.h" +#include "commands/editfoldercommand.h" +#include "commands/addclipcutcommand.h" #include "ui_templateclip_ui.h" diff --git a/src/projectsettings.cpp b/src/projectsettings.cpp index bce75275..0504ba82 100644 --- a/src/projectsettings.cpp +++ b/src/projectsettings.cpp @@ -298,9 +298,7 @@ void ProjectSettings::slotUpdateFiles(bool cacheOnly) usedSize += clip->fileSize(); } } -#if QT_VERSION >= 0x040500 allFonts.removeDuplicates(); -#endif // Hide unused categories for (int i = 0; i < files_list->topLevelItemCount(); i++) { if (files_list->topLevelItem(i)->childCount() == 0) { diff --git a/src/recmonitor.cpp b/src/recmonitor.cpp index a2b8906a..9ec0c442 100644 --- a/src/recmonitor.cpp +++ b/src/recmonitor.cpp @@ -35,11 +35,7 @@ #include #include #include - -#if KDE_IS_VERSION(4,2,0) #include -#endif - #include #include #include @@ -112,7 +108,6 @@ RecMonitor::RecMonitor(QString name, MonitorManager *manager, QWidget *parent) : m_logger.setFrame(false); //m_logger.setInsertPolicy(QComboBox::InsertAtTop); -#if KDE_IS_VERSION(4,2,0) m_freeSpace = new KCapacityBar(KCapacityBar::DrawTextInline, this); m_freeSpace->setMaximumWidth(150); QFontMetricsF fontMetrics(font()); @@ -122,7 +117,6 @@ RecMonitor::RecMonitor(QString name, MonitorManager *manager, QWidget *parent) : connect(&m_spaceTimer, SIGNAL(timeout()), this, SLOT(slotUpdateFreeSpace())); m_spaceTimer.setInterval(30000); m_spaceTimer.setSingleShot(false); -#endif control_frame_firewire->setLayout(layout); m_displayProcess = new QProcess; @@ -165,9 +159,7 @@ RecMonitor::RecMonitor(QString name, MonitorManager *manager, QWidget *parent) : RecMonitor::~RecMonitor() { -#if KDE_IS_VERSION(4,2,0) m_spaceTimer.stop(); -#endif delete m_captureProcess; delete m_displayProcess; if (m_captureDevice) delete m_captureDevice; @@ -203,10 +195,8 @@ void RecMonitor::slotUpdateCaptureFolder(const QString ¤tProjectFolder) else KMessageBox::information(this, i18n("You need to stop capture before your changes can be applied"), i18n("Capturing")); } else slotVideoDeviceChanged(device_selector->currentIndex()); -#if KDE_IS_VERSION(4,2,0) // update free space info slotUpdateFreeSpace(); -#endif } void RecMonitor::slotVideoDeviceChanged(int ix) @@ -539,9 +529,7 @@ void RecMonitor::slotRecord() m_isCapturing = true; m_didCapture = true; m_captureProcess->write("c\n", 3); -#if KDE_IS_VERSION(4,2,0) m_spaceTimer.start(); -#endif return; } if (m_captureProcess->state() == QProcess::NotRunning) { @@ -792,12 +780,9 @@ void RecMonitor::slotProcessStatus(QProcess::ProcessState status) } m_isCapturing = false; -#if KDE_IS_VERSION(4,2,0) m_spaceTimer.stop(); // update free space info slotUpdateFreeSpace(); -#endif - } else { if (device_selector->currentIndex() != SCREENGRAB) m_stopAction->setEnabled(true); device_selector->setEnabled(false); @@ -860,21 +845,17 @@ void RecMonitor::manageCapturedFiles() // virtual void RecMonitor::mousePressEvent(QMouseEvent * /*event*/) { -#if KDE_IS_VERSION(4,2,0) if (m_freeSpace->underMouse()) slotUpdateFreeSpace(); -#endif } void RecMonitor::slotUpdateFreeSpace() { -#if KDE_IS_VERSION(4,2,0) KDiskFreeSpaceInfo info = KDiskFreeSpaceInfo::freeSpaceInfo(m_capturePath); if (info.isValid() && info.size() > 0) { m_freeSpace->setValue(100 * info.used() / info.size()); m_freeSpace->setText(i18n("Free space: %1", KIO::convertSize(info.available()))); m_freeSpace->update(); } -#endif } void RecMonitor::refreshRecMonitor(bool visible) diff --git a/src/recmonitor.h b/src/recmonitor.h index fe1d90fb..86cb0d97 100644 --- a/src/recmonitor.h +++ b/src/recmonitor.h @@ -40,10 +40,7 @@ #include #include #include - -#if KDE_IS_VERSION(4,2,0) #include -#endif class MonitorManager; class MltDeviceCapture; @@ -76,10 +73,8 @@ private: KComboBox m_logger; QString m_capturePath; -#if KDE_IS_VERSION(4,2,0) KCapacityBar *m_freeSpace; QTimer m_spaceTimer; -#endif KUrl m_captureFile; KIcon m_playIcon; diff --git a/src/renderer.h b/src/renderer.h index 4a1c5a56..34a516ab 100644 --- a/src/renderer.h +++ b/src/renderer.h @@ -32,7 +32,8 @@ #include "gentime.h" #include "definitions.h" #include "abstractmonitor.h" -#include "mlt/framework/mlt_types.h" + +#include #include diff --git a/src/rotoscoping/CMakeLists.txt b/src/rotoscoping/CMakeLists.txt index 8b137891..f38757a1 100644 --- a/src/rotoscoping/CMakeLists.txt +++ b/src/rotoscoping/CMakeLists.txt @@ -1 +1,5 @@ - +set(kdenlive_SRCS + ${kdenlive_SRCS} + rotoscoping/rotowidget.cpp + PARENT_SCOPE +) diff --git a/src/rotoscoping/rotowidget.h b/src/rotoscoping/rotowidget.h index 7a0d2d9f..235bf62b 100644 --- a/src/rotoscoping/rotowidget.h +++ b/src/rotoscoping/rotowidget.h @@ -20,7 +20,7 @@ #define ROTOWIDGET_H #include "definitions.h" -#include "bpoint.h" +#include "beziercurve/bpoint.h" #include "timecode.h" #include diff --git a/src/simplekeyframes/CMakeLists.txt b/src/simplekeyframes/CMakeLists.txt index 8b137891..7aa2ba54 100644 --- a/src/simplekeyframes/CMakeLists.txt +++ b/src/simplekeyframes/CMakeLists.txt @@ -1 +1,6 @@ - +set(kdenlive_SRCS + ${kdenlive_SRCS} + simplekeyframes/simpletimelinewidget.cpp + simplekeyframes/simplekeyframewidget.cpp + PARENT_SCOPE +) diff --git a/src/simplekeyframes/simplekeyframewidget.cpp b/src/simplekeyframes/simplekeyframewidget.cpp index d7774193..20ede65f 100644 --- a/src/simplekeyframes/simplekeyframewidget.cpp +++ b/src/simplekeyframes/simplekeyframewidget.cpp @@ -16,7 +16,7 @@ * along with Kdenlive. If not, see . * ***************************************************************************/ -#include "simplekeyframes/simplekeyframewidget.h" +#include "simplekeyframewidget.h" #include "simpletimelinewidget.h" #include "timecodedisplay.h" diff --git a/src/stopmotion/CMakeLists.txt b/src/stopmotion/CMakeLists.txt new file mode 100644 index 00000000..8cf02617 --- /dev/null +++ b/src/stopmotion/CMakeLists.txt @@ -0,0 +1,5 @@ +set(kdenlive_SRCS + ${kdenlive_SRCS} + stopmotion/stopmotion.cpp + PARENT_SCOPE +) diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp index f76f9c29..f3251fa6 100644 --- a/src/stopmotion/stopmotion.cpp +++ b/src/stopmotion/stopmotion.cpp @@ -16,19 +16,18 @@ ***************************************************************************/ #include "stopmotion.h" -#include "../blackmagic/devices.h" -#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) -#include "../v4l/v4lcapture.h" +#include "blackmagic/devices.h" +#ifdef USE_V4L +#include "v4l/v4lcapture.h" #endif -#include "../slideshowclip.h" -#include "../profilesdialog.h" -#include "../mltdevicecapture.h" -#include "../recmonitor.h" -#include "../monitormanager.h" +#include "slideshowclip.h" +#include "profilesdialog.h" +#include "mltdevicecapture.h" +#include "recmonitor.h" +#include "monitormanager.h" #include "ui_smconfig_ui.h" #include "kdenlivesettings.h" - #include #include #include @@ -257,7 +256,7 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder, // Found a BlackMagic device } if (QFile::exists(KdenliveSettings::video4vdevice())) { -#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) +#ifdef USE_V4L // Video 4 Linux device detection for (int i = 0; i < 10; i++) { QString path = "/dev/video" + QString::number(i); @@ -271,7 +270,7 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder, } } } -#endif +#endif /* USE_V4L */ } connect(capture_device, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDeviceHandler())); @@ -400,7 +399,7 @@ void StopmotionWidget::slotUpdateDeviceHandler() } m_layout->removeWidget(m_frame_preview); if (data == "v4l") { -#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) +#ifdef USE_V4L m_bmCapture = new V4lCaptureHandler(m_layout); m_bmCapture->setDevice(capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 1).toString(), capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 2).toString()); #endif diff --git a/src/titlewidget.cpp b/src/titlewidget.cpp index 0e98ceeb..5a00bd44 100644 --- a/src/titlewidget.cpp +++ b/src/titlewidget.cpp @@ -1800,9 +1800,7 @@ void TitleWidget::saveTitle(KUrl url) KFileDialog *fs = new KFileDialog(KUrl(m_projectTitlePath), "application/x-kdenlivetitle", this); fs->setOperationMode(KFileDialog::Saving); fs->setMode(KFile::File); -#if KDE_IS_VERSION(4,2,0) fs->setConfirmOverwrite(true); -#endif fs->setKeepLocation(true); fs->exec(); url = fs->selectedUrl(); diff --git a/src/trackview.cpp b/src/trackview.cpp index be769d6a..2e62176a 100644 --- a/src/trackview.cpp +++ b/src/trackview.cpp @@ -30,7 +30,7 @@ #include "customtrackview.h" #include "initeffects.h" #include "profilesdialog.h" -#include "configtrackscommand.h" +#include "commands/configtrackscommand.h" #include #include diff --git a/src/v4l/CMakeLists.txt b/src/v4l/CMakeLists.txt new file mode 100644 index 00000000..562763d0 --- /dev/null +++ b/src/v4l/CMakeLists.txt @@ -0,0 +1,6 @@ +set(kdenlive_SRCS + ${kdenlive_SRCS} + v4l/v4lcapture.cpp + v4l/src.c + PARENT_SCOPE +) diff --git a/src/v4l/v4lcapture.h b/src/v4l/v4lcapture.h index 56dbb589..0ca337e6 100644 --- a/src/v4l/v4lcapture.h +++ b/src/v4l/v4lcapture.h @@ -19,9 +19,7 @@ #ifndef __V4LCAPTUREHANDLER_H__ #define __V4LCAPTUREHANDLER_H__ -#ifndef __APPLE__ #include "src.h" -#endif #include #include diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/wizard.cpp b/src/wizard.cpp index 7574901a..39e3708d 100644 --- a/src/wizard.cpp +++ b/src/wizard.cpp @@ -20,7 +20,7 @@ #include "wizard.h" #include "kdenlivesettings.h" #include "profilesdialog.h" -#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) +#ifdef USE_V4L #include "v4l/v4lcapture.h" #endif #include "kdenlive-config.h" @@ -158,7 +158,7 @@ Wizard::Wizard(bool upgrade, QWidget *parent) : void Wizard::slotDetectWebcam() { -#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) +#ifdef USE_V4L m_capture.v4l_devices->blockSignals(true); m_capture.v4l_devices->clear(); @@ -189,7 +189,7 @@ void Wizard::slotDetectWebcam() if (!found) m_capture.v4l_devices->setCurrentIndex(0); } else m_capture.v4l_status->setText(i18n("No device found, plug your webcam and refresh.")); m_capture.v4l_devices->blockSignals(false); -#endif +#endif /* USE_V4L */ } void Wizard::slotUpdateCaptureParameters()