format: reformatting files
This commit is contained in:
+214
-214
@@ -17,8 +17,8 @@
|
||||
|
||||
# Set Olive sources and resources
|
||||
set(OLIVE_SOURCES
|
||||
core.h
|
||||
core.cpp
|
||||
core.h
|
||||
core.cpp
|
||||
)
|
||||
|
||||
#set(OLIVE_RESOURCES)
|
||||
@@ -47,15 +47,15 @@ add_subdirectory(window)
|
||||
qt_add_translation(OLIVE_QM_FILES ${OLIVE_TS_FILES})
|
||||
|
||||
set(QRC_BODY "")
|
||||
foreach(QM_FILE ${OLIVE_QM_FILES})
|
||||
get_filename_component(QM_FILENAME_COMPONENT ${QM_FILE} NAME_WE)
|
||||
string(APPEND QRC_BODY "<file alias=\"${QM_FILENAME_COMPONENT}\">${QM_FILE}</file>\n")
|
||||
endforeach()
|
||||
foreach (QM_FILE ${OLIVE_QM_FILES})
|
||||
get_filename_component(QM_FILENAME_COMPONENT ${QM_FILE} NAME_WE)
|
||||
string(APPEND QRC_BODY "<file alias=\"${QM_FILENAME_COMPONENT}\">${QM_FILE}</file>\n")
|
||||
endforeach ()
|
||||
configure_file(ts/translations.qrc.in ts/translations.qrc @ONLY)
|
||||
|
||||
set(OLIVE_RESOURCES
|
||||
${OLIVE_RESOURCES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ts/translations.qrc
|
||||
${OLIVE_RESOURCES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ts/translations.qrc
|
||||
render/job/pluginjob.cpp
|
||||
render/job/pluginjob.h
|
||||
widget/nodeparamview/nodeparambutton.cpp
|
||||
@@ -64,18 +64,18 @@ set(OLIVE_RESOURCES
|
||||
|
||||
# Add version object
|
||||
add_library(olive-version-obj
|
||||
OBJECT
|
||||
version.cpp
|
||||
version.h
|
||||
OBJECT
|
||||
version.cpp
|
||||
version.h
|
||||
)
|
||||
target_link_libraries(olive-version-obj PRIVATE Qt${QT_VERSION_MAJOR}::Core)
|
||||
target_compile_options(olive-version-obj PRIVATE -DAPPVERSION="${PROJECT_VERSION}" -DAPPVERSIONLONG="${PROJECT_LONG_VERSION}" )
|
||||
target_compile_options(olive-version-obj PRIVATE -DAPPVERSION="${PROJECT_VERSION}" -DAPPVERSIONLONG="${PROJECT_LONG_VERSION}")
|
||||
|
||||
# Add main library
|
||||
add_library(libolive-editor
|
||||
OBJECT
|
||||
${OLIVE_SOURCES}
|
||||
${OLIVE_RESOURCES}
|
||||
OBJECT
|
||||
${OLIVE_SOURCES}
|
||||
${OLIVE_RESOURCES}
|
||||
)
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(pluginSupport)
|
||||
@@ -89,164 +89,164 @@ set_target_properties(libolive-editor PROPERTIES PREFIX "")
|
||||
|
||||
option(OAK_ENABLE_DYNAMIC_RENDER_BACKEND "Build and use the dynamic render backend adapter" ON)
|
||||
if (OAK_ENABLE_DYNAMIC_RENDER_BACKEND)
|
||||
set_target_properties(libolive-editor PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
target_compile_definitions(libolive-editor PRIVATE OAK_ENABLE_DYNAMIC_RENDER_BACKEND)
|
||||
set_target_properties(libolive-editor PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
target_compile_definitions(libolive-editor PRIVATE OAK_ENABLE_DYNAMIC_RENDER_BACKEND)
|
||||
|
||||
foreach(target olivecore kddockwidgets)
|
||||
if (TARGET ${target})
|
||||
set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
endforeach()
|
||||
foreach (target olivecore kddockwidgets)
|
||||
if (TARGET ${target})
|
||||
set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
# Render core library: the minimal set of code required by the OpenGL/Vulkan backend
|
||||
# libraries. Keeping this separate from libolive-editor prevents the backends from
|
||||
# dragging in editor-wide state (project, task, cache, UI, etc.).
|
||||
add_library(libolive-rendercore STATIC
|
||||
common/avframeptr.h
|
||||
common/define.h
|
||||
common/filefunctions.cpp
|
||||
common/filefunctions.h
|
||||
common/qtutils.cpp
|
||||
common/qtutils.h
|
||||
common/xmlutils.cpp
|
||||
common/xmlutils.h
|
||||
node/param.cpp
|
||||
node/param.h
|
||||
node/splitvalue.h
|
||||
node/value.cpp
|
||||
node/value.h
|
||||
node/valuedatabase.cpp
|
||||
node/valuedatabase.h
|
||||
render/backend/dynamicrenderer.cpp
|
||||
render/backend/dynamicrenderer.h
|
||||
render/backend/renderbackend_c.h
|
||||
render/job/acceleratedjob.cpp
|
||||
render/job/acceleratedjob.h
|
||||
render/job/shaderjob.h
|
||||
render/renderer.cpp
|
||||
render/renderer.h
|
||||
render/shadercode.h
|
||||
render/texture.cpp
|
||||
render/texture.h
|
||||
render/videoparams.cpp
|
||||
render/videoparams.h
|
||||
)
|
||||
set_target_properties(libolive-rendercore PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
target_include_directories(libolive-rendercore PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/app
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/include
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/HostSupport/include
|
||||
${OLIVE_INCLUDE_DIRS}
|
||||
)
|
||||
target_link_libraries(libolive-rendercore PUBLIC ${OLIVE_LIBRARIES} OfxHost)
|
||||
target_compile_definitions(libolive-rendercore PUBLIC ${OLIVE_DEFINITIONS})
|
||||
target_compile_options(libolive-rendercore PUBLIC ${OLIVE_COMPILE_OPTIONS})
|
||||
|
||||
add_library(oakgl SHARED
|
||||
render/opengl/openglbackend_c.cpp
|
||||
render/opengl/openglrenderer.cpp
|
||||
render/opengl/openglrenderer.h
|
||||
)
|
||||
target_link_libraries(oakgl PRIVATE libolive-rendercore)
|
||||
target_compile_definitions(oakgl PRIVATE OAK_RENDER_BACKEND_PLUGIN)
|
||||
set_target_properties(oakgl PROPERTIES
|
||||
OUTPUT_NAME oakgl
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
if(WIN32)
|
||||
set_target_properties(oakgl PROPERTIES PREFIX "")
|
||||
endif()
|
||||
install(TARGETS oakgl
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(Vulkan_FOUND)
|
||||
add_library(oakvulkan SHARED
|
||||
render/vulkan/vulkanbackend_c.cpp
|
||||
render/vulkan/vulkanrenderer.cpp
|
||||
render/vulkan/vulkanrenderer.h
|
||||
# Render core library: the minimal set of code required by the OpenGL/Vulkan backend
|
||||
# libraries. Keeping this separate from libolive-editor prevents the backends from
|
||||
# dragging in editor-wide state (project, task, cache, UI, etc.).
|
||||
add_library(libolive-rendercore STATIC
|
||||
common/avframeptr.h
|
||||
common/define.h
|
||||
common/filefunctions.cpp
|
||||
common/filefunctions.h
|
||||
common/qtutils.cpp
|
||||
common/qtutils.h
|
||||
common/xmlutils.cpp
|
||||
common/xmlutils.h
|
||||
node/param.cpp
|
||||
node/param.h
|
||||
node/splitvalue.h
|
||||
node/value.cpp
|
||||
node/value.h
|
||||
node/valuedatabase.cpp
|
||||
node/valuedatabase.h
|
||||
render/backend/dynamicrenderer.cpp
|
||||
render/backend/dynamicrenderer.h
|
||||
render/backend/renderbackend_c.h
|
||||
render/job/acceleratedjob.cpp
|
||||
render/job/acceleratedjob.h
|
||||
render/job/shaderjob.h
|
||||
render/renderer.cpp
|
||||
render/renderer.h
|
||||
render/shadercode.h
|
||||
render/texture.cpp
|
||||
render/texture.h
|
||||
render/videoparams.cpp
|
||||
render/videoparams.h
|
||||
)
|
||||
target_link_libraries(oakvulkan PRIVATE libolive-rendercore)
|
||||
target_link_libraries(oakvulkan PRIVATE Vulkan::Vulkan)
|
||||
target_compile_definitions(oakvulkan PRIVATE OAK_HAS_VULKAN)
|
||||
if(SHADERC_FOUND)
|
||||
target_link_libraries(oakvulkan PRIVATE ${SHADERC_LIBRARIES})
|
||||
target_include_directories(oakvulkan PRIVATE ${SHADERC_INCLUDE_DIRS})
|
||||
target_compile_definitions(oakvulkan PRIVATE OAK_HAS_SHADERC)
|
||||
endif()
|
||||
set_target_properties(oakvulkan PROPERTIES
|
||||
OUTPUT_NAME oakvulkan
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
set_target_properties(libolive-rendercore PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
target_include_directories(libolive-rendercore PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/app
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/include
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/HostSupport/include
|
||||
${OLIVE_INCLUDE_DIRS}
|
||||
)
|
||||
if(WIN32)
|
||||
set_target_properties(oakvulkan PROPERTIES PREFIX "")
|
||||
endif()
|
||||
install(TARGETS oakvulkan
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
target_link_libraries(libolive-rendercore PUBLIC ${OLIVE_LIBRARIES} OfxHost)
|
||||
target_compile_definitions(libolive-rendercore PUBLIC ${OLIVE_DEFINITIONS})
|
||||
target_compile_options(libolive-rendercore PUBLIC ${OLIVE_COMPILE_OPTIONS})
|
||||
|
||||
add_library(oakgl SHARED
|
||||
render/opengl/openglbackend_c.cpp
|
||||
render/opengl/openglrenderer.cpp
|
||||
render/opengl/openglrenderer.h
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
target_link_libraries(oakgl PRIVATE libolive-rendercore)
|
||||
target_compile_definitions(oakgl PRIVATE OAK_RENDER_BACKEND_PLUGIN)
|
||||
set_target_properties(oakgl PROPERTIES
|
||||
OUTPUT_NAME oakgl
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
if (WIN32)
|
||||
set_target_properties(oakgl PROPERTIES PREFIX "")
|
||||
endif ()
|
||||
install(TARGETS oakgl
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if (Vulkan_FOUND)
|
||||
add_library(oakvulkan SHARED
|
||||
render/vulkan/vulkanbackend_c.cpp
|
||||
render/vulkan/vulkanrenderer.cpp
|
||||
render/vulkan/vulkanrenderer.h
|
||||
)
|
||||
target_link_libraries(oakvulkan PRIVATE libolive-rendercore)
|
||||
target_link_libraries(oakvulkan PRIVATE Vulkan::Vulkan)
|
||||
target_compile_definitions(oakvulkan PRIVATE OAK_HAS_VULKAN)
|
||||
if (SHADERC_FOUND)
|
||||
target_link_libraries(oakvulkan PRIVATE ${SHADERC_LIBRARIES})
|
||||
target_include_directories(oakvulkan PRIVATE ${SHADERC_INCLUDE_DIRS})
|
||||
target_compile_definitions(oakvulkan PRIVATE OAK_HAS_SHADERC)
|
||||
endif ()
|
||||
set_target_properties(oakvulkan PROPERTIES
|
||||
OUTPUT_NAME oakvulkan
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
if (WIN32)
|
||||
set_target_properties(oakvulkan PROPERTIES PREFIX "")
|
||||
endif ()
|
||||
install(TARGETS oakvulkan
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
add_library(oakgl-cabi-check OBJECT
|
||||
render/opengl/openglbackend_c.cpp
|
||||
render/opengl/openglbackend_c.cpp
|
||||
)
|
||||
target_include_directories(oakgl-cabi-check PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/app
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/include
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/HostSupport/include
|
||||
${OLIVE_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}/app
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/include
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/HostSupport/include
|
||||
${OLIVE_INCLUDE_DIRS}
|
||||
)
|
||||
target_link_libraries(oakgl-cabi-check PRIVATE ${OLIVE_LIBRARIES} OfxHost)
|
||||
target_compile_definitions(oakgl-cabi-check PRIVATE ${OLIVE_DEFINITIONS})
|
||||
target_compile_options(oakgl-cabi-check PRIVATE ${OLIVE_COMPILE_OPTIONS})
|
||||
|
||||
if(Vulkan_FOUND)
|
||||
add_library(oakvulkan-cabi-check OBJECT
|
||||
render/vulkan/vulkanbackend_c.cpp
|
||||
render/vulkan/vulkanrenderer.cpp
|
||||
render/vulkan/vulkanrenderer.h
|
||||
)
|
||||
target_include_directories(oakvulkan-cabi-check PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/app
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/include
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/HostSupport/include
|
||||
${OLIVE_INCLUDE_DIRS}
|
||||
)
|
||||
target_link_libraries(oakvulkan-cabi-check PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets)
|
||||
target_link_libraries(oakvulkan-cabi-check PRIVATE Vulkan::Vulkan)
|
||||
target_compile_definitions(oakvulkan-cabi-check PRIVATE OAK_HAS_VULKAN)
|
||||
if(SHADERC_FOUND)
|
||||
target_link_libraries(oakvulkan-cabi-check PRIVATE ${SHADERC_LIBRARIES})
|
||||
target_include_directories(oakvulkan-cabi-check PRIVATE ${SHADERC_INCLUDE_DIRS})
|
||||
target_compile_definitions(oakvulkan-cabi-check PRIVATE OAK_HAS_SHADERC)
|
||||
endif()
|
||||
target_compile_definitions(oakvulkan-cabi-check PRIVATE ${OLIVE_DEFINITIONS})
|
||||
target_compile_options(oakvulkan-cabi-check PRIVATE ${OLIVE_COMPILE_OPTIONS})
|
||||
endif()
|
||||
if (Vulkan_FOUND)
|
||||
add_library(oakvulkan-cabi-check OBJECT
|
||||
render/vulkan/vulkanbackend_c.cpp
|
||||
render/vulkan/vulkanrenderer.cpp
|
||||
render/vulkan/vulkanrenderer.h
|
||||
)
|
||||
target_include_directories(oakvulkan-cabi-check PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/app
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/include
|
||||
${CMAKE_SOURCE_DIR}/third_party/openfx/HostSupport/include
|
||||
${OLIVE_INCLUDE_DIRS}
|
||||
)
|
||||
target_link_libraries(oakvulkan-cabi-check PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets)
|
||||
target_link_libraries(oakvulkan-cabi-check PRIVATE Vulkan::Vulkan)
|
||||
target_compile_definitions(oakvulkan-cabi-check PRIVATE OAK_HAS_VULKAN)
|
||||
if (SHADERC_FOUND)
|
||||
target_link_libraries(oakvulkan-cabi-check PRIVATE ${SHADERC_LIBRARIES})
|
||||
target_include_directories(oakvulkan-cabi-check PRIVATE ${SHADERC_INCLUDE_DIRS})
|
||||
target_compile_definitions(oakvulkan-cabi-check PRIVATE OAK_HAS_SHADERC)
|
||||
endif ()
|
||||
target_compile_definitions(oakvulkan-cabi-check PRIVATE ${OLIVE_DEFINITIONS})
|
||||
target_compile_options(oakvulkan-cabi-check PRIVATE ${OLIVE_COMPILE_OPTIONS})
|
||||
endif ()
|
||||
|
||||
# Add application
|
||||
add_executable(olive-editor
|
||||
main.cpp
|
||||
$<TARGET_OBJECTS:libolive-editor>
|
||||
$<TARGET_OBJECTS:olive-version-obj>
|
||||
main.cpp
|
||||
$<TARGET_OBJECTS:libolive-editor>
|
||||
$<TARGET_OBJECTS:olive-version-obj>
|
||||
)
|
||||
target_include_directories(olive-editor PUBLIC pluginSupport)
|
||||
target_link_libraries(olive-editor PUBLIC OfxHost)
|
||||
add_dependencies(olive-editor oakgl-cabi-check)
|
||||
if (OAK_ENABLE_DYNAMIC_RENDER_BACKEND)
|
||||
add_dependencies(olive-editor oakgl)
|
||||
if (TARGET oakvulkan)
|
||||
add_dependencies(olive-editor oakvulkan)
|
||||
endif()
|
||||
endif()
|
||||
add_dependencies(olive-editor oakgl)
|
||||
if (TARGET oakvulkan)
|
||||
add_dependencies(olive-editor oakvulkan)
|
||||
endif ()
|
||||
endif ()
|
||||
# Ensure the render worker is always built together with the editor on every platform.
|
||||
add_dependencies(olive-editor olive-render-worker)
|
||||
|
||||
@@ -258,79 +258,79 @@ set_target_properties(olive-editor PROPERTIES OUTPUT_NAME "oak-editor")
|
||||
# currently the full OLIVE_LIBRARIES for simplicity; trimming UI-only dependencies is a later-phase
|
||||
# cleanup (see render-process-isolation plan).
|
||||
add_executable(olive-render-worker
|
||||
render/worker/workermain.cpp
|
||||
$<TARGET_OBJECTS:libolive-editor>
|
||||
$<TARGET_OBJECTS:olive-version-obj>
|
||||
render/worker/workermain.cpp
|
||||
$<TARGET_OBJECTS:libolive-editor>
|
||||
$<TARGET_OBJECTS:olive-version-obj>
|
||||
)
|
||||
set_target_properties(olive-render-worker PROPERTIES OUTPUT_NAME "oak-render-worker")
|
||||
if (APPLE)
|
||||
target_sources(olive-render-worker PRIVATE render/worker/workermain_mac.mm)
|
||||
target_link_libraries(olive-render-worker PRIVATE "-framework Cocoa")
|
||||
endif()
|
||||
target_sources(olive-render-worker PRIVATE render/worker/workermain_mac.mm)
|
||||
target_link_libraries(olive-render-worker PRIVATE "-framework Cocoa")
|
||||
endif ()
|
||||
target_include_directories(olive-render-worker PUBLIC pluginSupport)
|
||||
target_link_libraries(olive-render-worker PUBLIC OfxHost)
|
||||
if (OAK_ENABLE_DYNAMIC_RENDER_BACKEND)
|
||||
target_compile_definitions(olive-render-worker PRIVATE OAK_ENABLE_DYNAMIC_RENDER_BACKEND)
|
||||
add_dependencies(olive-render-worker oakgl)
|
||||
if (TARGET oakvulkan)
|
||||
add_dependencies(olive-render-worker oakvulkan)
|
||||
endif()
|
||||
endif()
|
||||
target_compile_definitions(olive-render-worker PRIVATE OAK_ENABLE_DYNAMIC_RENDER_BACKEND)
|
||||
add_dependencies(olive-render-worker oakgl)
|
||||
if (TARGET oakvulkan)
|
||||
add_dependencies(olive-render-worker oakvulkan)
|
||||
endif ()
|
||||
endif ()
|
||||
# Create docs if doxygen was found
|
||||
if(DOXYGEN_FOUND)
|
||||
set(DOXYGEN_PROJECT_NAME "Oak Video Editor")
|
||||
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/docs")
|
||||
set(DOXYGEN_EXTRACT_ALL "YES")
|
||||
set(DOXYGEN_EXTRACT_PRIVATE "YES")
|
||||
doxygen_add_docs(docs ALL ${OLIVE_SOURCES})
|
||||
endif()
|
||||
if (DOXYGEN_FOUND)
|
||||
set(DOXYGEN_PROJECT_NAME "Oak Video Editor")
|
||||
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/docs")
|
||||
set(DOXYGEN_EXTRACT_ALL "YES")
|
||||
set(DOXYGEN_EXTRACT_PRIVATE "YES")
|
||||
doxygen_add_docs(docs ALL ${OLIVE_SOURCES})
|
||||
endif ()
|
||||
|
||||
# Platform-specific deployment preferences
|
||||
if (WIN32)
|
||||
# Set Windows application icon
|
||||
target_sources(olive-editor PRIVATE packaging/windows/resources.rc)
|
||||
# Set Windows application icon
|
||||
target_sources(olive-editor PRIVATE packaging/windows/resources.rc)
|
||||
|
||||
# Preserve folder structure in visual studio
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${OLIVE_SOURCES})
|
||||
# Preserve folder structure in visual studio
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${OLIVE_SOURCES})
|
||||
|
||||
elseif(APPLE)
|
||||
# Set Mac application icon
|
||||
set(OLIVE_ICON packaging/macos/oak.icns)
|
||||
target_sources(olive-editor PRIVATE ${OLIVE_ICON})
|
||||
elseif (APPLE)
|
||||
# Set Mac application icon
|
||||
set(OLIVE_ICON packaging/macos/oak.icns)
|
||||
target_sources(olive-editor PRIVATE ${OLIVE_ICON})
|
||||
|
||||
# Set Mac bundle properties
|
||||
set_target_properties(olive-editor PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/packaging/macos/MacOSXBundleInfo.plist.in
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER org.oakvideoeditor.Oak
|
||||
MACOSX_BUNDLE_ICON_FILE oak.icns
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "Oak Video Editor"
|
||||
MACOSX_BUNDLE_INFO_STRING "Oak Video Editor ${PROJECT_LONG_VERSION}"
|
||||
MACOSX_BUNDLE_COPYRIGHT "©2018-2021 Olive Studios LLC and others. Fork maintained by Oak Video Editor Team."
|
||||
RESOURCE "${OLIVE_ICON}"
|
||||
OUTPUT_NAME "Oak"
|
||||
)
|
||||
|
||||
# Copy the render worker and dynamic render backends into the app bundle.
|
||||
# They are looked up in QCoreApplication::applicationDirPath(), which on
|
||||
# macOS points to Oak.app/Contents/MacOS.
|
||||
add_custom_command(TARGET olive-editor POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_BUNDLE_DIR:olive-editor>/Contents/MacOS
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:olive-render-worker> $<TARGET_BUNDLE_DIR:olive-editor>/Contents/MacOS/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:oakgl> $<TARGET_BUNDLE_DIR:olive-editor>/Contents/MacOS/
|
||||
COMMENT "Copying oak-render-worker and render backends into Oak.app"
|
||||
)
|
||||
if (TARGET oakvulkan)
|
||||
add_custom_command(TARGET olive-editor POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:oakvulkan> $<TARGET_BUNDLE_DIR:olive-editor>/Contents/MacOS/
|
||||
# Set Mac bundle properties
|
||||
set_target_properties(olive-editor PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/packaging/macos/MacOSXBundleInfo.plist.in
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER org.oakvideoeditor.Oak
|
||||
MACOSX_BUNDLE_ICON_FILE oak.icns
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "Oak Video Editor"
|
||||
MACOSX_BUNDLE_INFO_STRING "Oak Video Editor ${PROJECT_LONG_VERSION}"
|
||||
MACOSX_BUNDLE_COPYRIGHT "©2018-2021 Olive Studios LLC and others. Fork maintained by Oak Video Editor Team."
|
||||
RESOURCE "${OLIVE_ICON}"
|
||||
OUTPUT_NAME "Oak"
|
||||
)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
# Set Linux-specific properties for application
|
||||
install(TARGETS olive-editor RUNTIME DESTINATION bin)
|
||||
endif()
|
||||
|
||||
# Copy the render worker and dynamic render backends into the app bundle.
|
||||
# They are looked up in QCoreApplication::applicationDirPath(), which on
|
||||
# macOS points to Oak.app/Contents/MacOS.
|
||||
add_custom_command(TARGET olive-editor POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_BUNDLE_DIR:olive-editor>/Contents/MacOS
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:olive-render-worker> $<TARGET_BUNDLE_DIR:olive-editor>/Contents/MacOS/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:oakgl> $<TARGET_BUNDLE_DIR:olive-editor>/Contents/MacOS/
|
||||
COMMENT "Copying oak-render-worker and render backends into Oak.app"
|
||||
)
|
||||
if (TARGET oakvulkan)
|
||||
add_custom_command(TARGET olive-editor POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:oakvulkan> $<TARGET_BUNDLE_DIR:olive-editor>/Contents/MacOS/
|
||||
)
|
||||
endif ()
|
||||
elseif (UNIX)
|
||||
# Set Linux-specific properties for application
|
||||
install(TARGETS olive-editor RUNTIME DESTINATION bin)
|
||||
endif ()
|
||||
|
||||
# Set link libraries
|
||||
target_link_libraries(olive-editor PRIVATE ${OLIVE_LIBRARIES})
|
||||
@@ -354,10 +354,10 @@ target_include_directories(olive-render-worker PRIVATE ${OLIVE_INCLUDE_DIRS})
|
||||
|
||||
# Install the render worker alongside the editor on Linux.
|
||||
if (UNIX AND NOT APPLE)
|
||||
install(TARGETS olive-render-worker RUNTIME DESTINATION bin)
|
||||
endif()
|
||||
install(TARGETS olive-render-worker RUNTIME DESTINATION bin)
|
||||
endif ()
|
||||
|
||||
# Add crash handler
|
||||
if (GoogleCrashpad_FOUND AND Qt${QT_VERSION_MAJOR}Network_FOUND)
|
||||
add_subdirectory(crashhandler)
|
||||
endif()
|
||||
add_subdirectory(crashhandler)
|
||||
endif ()
|
||||
|
||||
+14
-14
@@ -15,18 +15,18 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
audio/audiolevelmeter.cpp
|
||||
audio/audiolevelmeter.h
|
||||
audio/audiosynchronizer.cpp
|
||||
audio/audiosynchronizer.h
|
||||
audio/audiowaveformsync.cpp
|
||||
audio/audiowaveformsync.h
|
||||
audio/audiomanager.cpp
|
||||
audio/audiomanager.h
|
||||
audio/audioprocessor.cpp
|
||||
audio/audioprocessor.h
|
||||
audio/audiovisualwaveform.cpp
|
||||
audio/audiovisualwaveform.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
audio/audiolevelmeter.cpp
|
||||
audio/audiolevelmeter.h
|
||||
audio/audiosynchronizer.cpp
|
||||
audio/audiosynchronizer.h
|
||||
audio/audiowaveformsync.cpp
|
||||
audio/audiowaveformsync.h
|
||||
audio/audiomanager.cpp
|
||||
audio/audiomanager.h
|
||||
audio/audioprocessor.cpp
|
||||
audio/audioprocessor.h
|
||||
audio/audiovisualwaveform.cpp
|
||||
audio/audiovisualwaveform.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -57,7 +57,8 @@ AudioLevelMeter::AnalyzeSampleBuffer(const core::SampleBuffer &samples)
|
||||
square_sum += value * value;
|
||||
}
|
||||
|
||||
const double mean_square = square_sum / static_cast<double>(sample_count);
|
||||
const double mean_square =
|
||||
square_sum / static_cast<double>(sample_count);
|
||||
const double rms = std::sqrt(mean_square);
|
||||
|
||||
ChannelStats channel_stats;
|
||||
@@ -74,8 +75,8 @@ AudioLevelMeter::AnalyzeSampleBuffer(const core::SampleBuffer &samples)
|
||||
}
|
||||
|
||||
stats.silence = qFuzzyIsNull(stats.max_peak_linear);
|
||||
stats.integrated_lufs = PowerToLufs(
|
||||
total_square / static_cast<double>(total_samples));
|
||||
stats.integrated_lufs =
|
||||
PowerToLufs(total_square / static_cast<double>(total_samples));
|
||||
|
||||
return stats;
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@ AudioSynchronizer::Placement AudioSynchronizer::PlaceBySourceTime(
|
||||
const core::rational &reference_timeline_in)
|
||||
{
|
||||
Placement placement;
|
||||
if (!reference.has_source_start_time ||
|
||||
!candidate.has_source_start_time ||
|
||||
if (!reference.has_source_start_time || !candidate.has_source_start_time ||
|
||||
reference.source_start_time.isNaN() ||
|
||||
candidate.source_start_time.isNaN()) {
|
||||
return placement;
|
||||
@@ -55,10 +54,10 @@ AudioSynchronizer::Placement AudioSynchronizer::PlaceByWaveformOffset(
|
||||
return placement;
|
||||
}
|
||||
|
||||
placement.timeline_in =
|
||||
reference_timeline_in +
|
||||
core::rational::fromDouble(static_cast<double>(candidate_offset_samples) /
|
||||
static_cast<double>(sample_rate));
|
||||
placement.timeline_in = reference_timeline_in +
|
||||
core::rational::fromDouble(
|
||||
static_cast<double>(candidate_offset_samples) /
|
||||
static_cast<double>(sample_rate));
|
||||
placement.valid = !placement.timeline_in.isNaN();
|
||||
return placement;
|
||||
}
|
||||
|
||||
@@ -41,13 +41,13 @@ public:
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
static Placement PlaceBySourceTime(const SourceClip &reference,
|
||||
const SourceClip &candidate,
|
||||
const core::rational &reference_timeline_in);
|
||||
static Placement
|
||||
PlaceBySourceTime(const SourceClip &reference, const SourceClip &candidate,
|
||||
const core::rational &reference_timeline_in);
|
||||
|
||||
static Placement PlaceByWaveformOffset(
|
||||
const core::rational &reference_timeline_in,
|
||||
int64_t candidate_offset_samples, int sample_rate);
|
||||
static Placement
|
||||
PlaceByWaveformOffset(const core::rational &reference_timeline_in,
|
||||
int64_t candidate_offset_samples, int sample_rate);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -96,7 +96,8 @@ AudioWaveformSync::OffsetResult AudioWaveformSync::EstimateEnvelopeOffset(
|
||||
int64_t best_lag = 0;
|
||||
|
||||
for (int64_t lag = -max_offset_windows; lag <= max_offset_windows; lag++) {
|
||||
const int reference_start = static_cast<int>(std::max<int64_t>(0, -lag));
|
||||
const int reference_start =
|
||||
static_cast<int>(std::max<int64_t>(0, -lag));
|
||||
const int candidate_start = static_cast<int>(std::max<int64_t>(0, lag));
|
||||
const int overlap = std::min(reference.size() - reference_start,
|
||||
candidate.size() - candidate_start);
|
||||
@@ -142,8 +143,7 @@ AudioWaveformSync::OffsetResult AudioWaveformSync::EstimateEnvelopeOffset(
|
||||
if (best_score > -2.0) {
|
||||
result.valid = true;
|
||||
result.confidence = std::max(0.0, best_score);
|
||||
result.offset_samples =
|
||||
best_lag * static_cast<int64_t>(window_samples);
|
||||
result.offset_samples = best_lag * static_cast<int64_t>(window_samples);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -38,8 +38,8 @@ public:
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
static QVector<double>
|
||||
ExtractRmsEnvelope(const core::SampleBuffer &samples, size_t window_samples);
|
||||
static QVector<double> ExtractRmsEnvelope(const core::SampleBuffer &samples,
|
||||
size_t window_samples);
|
||||
|
||||
static OffsetResult EstimateOffset(const core::SampleBuffer &reference,
|
||||
const core::SampleBuffer &candidate,
|
||||
|
||||
@@ -18,6 +18,6 @@ add_subdirectory(cliprogress)
|
||||
add_subdirectory(clitask)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
cli/cliprogress/cliprogressdialog.h
|
||||
cli/cliprogress/cliprogressdialog.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
cli/cliprogress/cliprogressdialog.h
|
||||
cli/cliprogress/cliprogressdialog.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
cli/clitask/clitaskdialog.h
|
||||
cli/clitask/clitaskdialog.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
cli/clitask/clitaskdialog.h
|
||||
cli/clitask/clitaskdialog.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
+20
-20
@@ -18,24 +18,24 @@ add_subdirectory(ffmpeg)
|
||||
add_subdirectory(oiio)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
codec/conformmanager.cpp
|
||||
codec/conformmanager.h
|
||||
codec/decoder.cpp
|
||||
codec/decoder.h
|
||||
codec/encoder.cpp
|
||||
codec/encoder.h
|
||||
codec/exportcodec.cpp
|
||||
codec/exportcodec.h
|
||||
codec/exportformat.cpp
|
||||
codec/exportformat.h
|
||||
codec/frame.cpp
|
||||
codec/frame.h
|
||||
codec/planarfiledevice.cpp
|
||||
codec/planarfiledevice.h
|
||||
codec/proxymanager.cpp
|
||||
codec/proxymanager.h
|
||||
codec/timecodemetadata.cpp
|
||||
codec/timecodemetadata.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
codec/conformmanager.cpp
|
||||
codec/conformmanager.h
|
||||
codec/decoder.cpp
|
||||
codec/decoder.h
|
||||
codec/encoder.cpp
|
||||
codec/encoder.h
|
||||
codec/exportcodec.cpp
|
||||
codec/exportcodec.h
|
||||
codec/exportformat.cpp
|
||||
codec/exportformat.h
|
||||
codec/frame.cpp
|
||||
codec/frame.h
|
||||
codec/planarfiledevice.cpp
|
||||
codec/planarfiledevice.h
|
||||
codec/proxymanager.cpp
|
||||
codec/proxymanager.h
|
||||
codec/timecodemetadata.cpp
|
||||
codec/timecodemetadata.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ extern "C" {
|
||||
#include <QWaitCondition>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "codec/frame.h"
|
||||
#include "codec/frame.h"
|
||||
#include "node/block/block.h"
|
||||
#include "node/project/footage/footagedescription.h"
|
||||
#include "render/cancelatom.h"
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
codec/ffmpeg/ffmpegdecoder.cpp
|
||||
codec/ffmpeg/ffmpegdecoder.h
|
||||
codec/ffmpeg/ffmpegencoder.cpp
|
||||
codec/ffmpeg/ffmpegencoder.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
codec/ffmpeg/ffmpegdecoder.cpp
|
||||
codec/ffmpeg/ffmpegdecoder.h
|
||||
codec/ffmpeg/ffmpegencoder.cpp
|
||||
codec/ffmpeg/ffmpegencoder.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
+127
-110
@@ -25,11 +25,11 @@ extern "C" {
|
||||
#include <libavutil/pixdesc.h>
|
||||
}
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
static FramePtr CopyPackedAVFrameToFrame(const AVFramePtr &src,
|
||||
PixelFormat format,
|
||||
int channel_count,
|
||||
PixelFormat format, int channel_count,
|
||||
const rational ×tamp)
|
||||
{
|
||||
if (!src || !src->data[0]) {
|
||||
@@ -48,8 +48,7 @@ static FramePtr CopyPackedAVFrameToFrame(const AVFramePtr &src,
|
||||
VideoParams::GetBytesPerPixel(format, channel_count);
|
||||
for (int y = 0; y < frame->height(); y++) {
|
||||
memcpy(frame->data() + y * frame->linesize_bytes(),
|
||||
src->data[0] + y * src->linesize[0],
|
||||
size_t(row_bytes));
|
||||
src->data[0] + y * src->linesize[0], size_t(row_bytes));
|
||||
}
|
||||
|
||||
return frame;
|
||||
@@ -97,7 +96,8 @@ namespace olive
|
||||
QVariant Yuv2RgbShader;
|
||||
QVariant DeinterlaceShader;
|
||||
|
||||
namespace {
|
||||
namespace
|
||||
{
|
||||
|
||||
constexpr int64_t kAnalyzeDurationUs = 5000000;
|
||||
constexpr int64_t kProbeSizeBytes = 20000000;
|
||||
@@ -133,8 +133,9 @@ void DiscardSubtitleStreams(AVFormatContext *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
TimecodeMetadata::SourceTime ExtractSourceStartTime(
|
||||
AVDictionary *metadata, const rational &timebase, int sample_rate)
|
||||
TimecodeMetadata::SourceTime ExtractSourceStartTime(AVDictionary *metadata,
|
||||
const rational &timebase,
|
||||
int sample_rate)
|
||||
{
|
||||
if (!metadata) {
|
||||
return TimecodeMetadata::SourceTime();
|
||||
@@ -423,7 +424,7 @@ TexturePtr FFmpegDecoder::RetrieveVideoInternal(const RetrieveVideoParams &p)
|
||||
|
||||
// Perform any CPU processing required
|
||||
AVFramePtr ptr = PreProcessFrame(f, p);
|
||||
f=std::move(ptr);
|
||||
f = std::move(ptr);
|
||||
if (!f) {
|
||||
qWarning() << "PreProcessFrame failed";
|
||||
return nullptr;
|
||||
@@ -458,14 +459,15 @@ FramePtr FFmpegDecoder::RetrieveVideoFrameInternal(const RetrieveVideoParams &p)
|
||||
AVFramePtr dest = CreateAVFramePtr();
|
||||
dest->width = f->width;
|
||||
dest->height = f->height;
|
||||
dest->format = p.maximum_format == PixelFormat::U8
|
||||
? AV_PIX_FMT_RGBA
|
||||
: AV_PIX_FMT_RGBA64;
|
||||
dest->format = p.maximum_format == PixelFormat::U8 ? AV_PIX_FMT_RGBA :
|
||||
AV_PIX_FMT_RGBA64;
|
||||
dest->color_range = f->color_range;
|
||||
dest->colorspace = f->colorspace;
|
||||
if (p.divider > 1) {
|
||||
dest->width = VideoParams::GetScaledDimension(dest->width, p.divider);
|
||||
dest->height = VideoParams::GetScaledDimension(dest->height, p.divider);
|
||||
dest->width =
|
||||
VideoParams::GetScaledDimension(dest->width, p.divider);
|
||||
dest->height =
|
||||
VideoParams::GetScaledDimension(dest->height, p.divider);
|
||||
}
|
||||
|
||||
int r = av_frame_get_buffer(dest.get(), 0);
|
||||
@@ -504,8 +506,8 @@ FramePtr FFmpegDecoder::RetrieveVideoFrameInternal(const RetrieveVideoParams &p)
|
||||
// zero-initializes the destination, leaving alpha at 0. The color
|
||||
// management shader later multiplies RGB by alpha, producing black.
|
||||
// Ensure alpha is opaque for source formats that have no alpha.
|
||||
const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(
|
||||
static_cast<AVPixelFormat>(f->format));
|
||||
const AVPixFmtDescriptor *src_desc =
|
||||
av_pix_fmt_desc_get(static_cast<AVPixelFormat>(f->format));
|
||||
if (src_desc && !(src_desc->flags & AV_PIX_FMT_FLAG_ALPHA)) {
|
||||
const int bpc = (dest->format == AV_PIX_FMT_RGBA) ? 1 : 2;
|
||||
const int stride = dest->linesize[0];
|
||||
@@ -522,11 +524,10 @@ FramePtr FFmpegDecoder::RetrieveVideoFrameInternal(const RetrieveVideoParams &p)
|
||||
}
|
||||
|
||||
return CopyPackedAVFrameToFrame(dest,
|
||||
dest->format == AV_PIX_FMT_RGBA
|
||||
? PixelFormat::U8
|
||||
: PixelFormat::U16,
|
||||
VideoParams::kRGBAChannelCount,
|
||||
p.time);
|
||||
dest->format == AV_PIX_FMT_RGBA ?
|
||||
PixelFormat::U8 :
|
||||
PixelFormat::U16,
|
||||
VideoParams::kRGBAChannelCount, p.time);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
@@ -580,7 +581,8 @@ FootageDescription FFmpegDecoder::Probe(const QString &filename,
|
||||
AVFormatContext *fmt_ctx = nullptr;
|
||||
AVDictionary *format_opts = nullptr;
|
||||
ApplyFormatOpenOptions(&format_opts);
|
||||
error_code = avformat_open_input(&fmt_ctx, filename_c, nullptr, &format_opts);
|
||||
error_code =
|
||||
avformat_open_input(&fmt_ctx, filename_c, nullptr, &format_opts);
|
||||
av_dict_free(&format_opts);
|
||||
TuneFormatContext(fmt_ctx);
|
||||
DiscardSubtitleStreams(fmt_ctx);
|
||||
@@ -591,9 +593,8 @@ FootageDescription FFmpegDecoder::Probe(const QString &filename,
|
||||
avformat_find_stream_info(fmt_ctx, nullptr);
|
||||
|
||||
int64_t footage_duration = fmt_ctx->duration;
|
||||
TimecodeMetadata::SourceTime source_start_time =
|
||||
ExtractSourceStartTime(fmt_ctx->metadata, rational(1, AV_TIME_BASE),
|
||||
0);
|
||||
TimecodeMetadata::SourceTime source_start_time = ExtractSourceStartTime(
|
||||
fmt_ctx->metadata, rational(1, AV_TIME_BASE), 0);
|
||||
|
||||
bool duration_guessed_from_bitrate =
|
||||
(fmt_ctx->duration_estimation_method ==
|
||||
@@ -625,78 +626,87 @@ FootageDescription FFmpegDecoder::Probe(const QString &filename,
|
||||
avstream->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE)) {
|
||||
if (avstream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
{
|
||||
// Read at least two frames to get more information about this video stream
|
||||
AVPacket *pkt = av_packet_alloc();
|
||||
AVFrame *frame = av_frame_alloc();
|
||||
// Read at least two frames to get more information about this video stream
|
||||
AVPacket *pkt = av_packet_alloc();
|
||||
AVFrame *frame = av_frame_alloc();
|
||||
|
||||
VideoParams::Interlacing interlacing = VideoParams::kInterlaceNone;
|
||||
AVRational pixel_aspect_ratio = {1, 1};
|
||||
AVRational frame_rate = avstream->avg_frame_rate;
|
||||
AVPixelFormat compatible_pix_fmt =
|
||||
FFmpegUtils::GetCompatiblePixelFormat(
|
||||
static_cast<AVPixelFormat>(avstream->codecpar->format));
|
||||
bool image_is_still = false;
|
||||
VideoParams::Interlacing interlacing =
|
||||
VideoParams::kInterlaceNone;
|
||||
AVRational pixel_aspect_ratio = { 1, 1 };
|
||||
AVRational frame_rate = avstream->avg_frame_rate;
|
||||
AVPixelFormat compatible_pix_fmt =
|
||||
FFmpegUtils::GetCompatiblePixelFormat(
|
||||
static_cast<AVPixelFormat>(
|
||||
avstream->codecpar->format));
|
||||
bool image_is_still = false;
|
||||
|
||||
{
|
||||
Instance instance;
|
||||
if (instance.Open(filename_c, avstream->index) != 0)
|
||||
goto cleanup;
|
||||
{
|
||||
Instance instance;
|
||||
if (instance.Open(filename_c, avstream->index) != 0)
|
||||
goto cleanup;
|
||||
|
||||
AVCodecContext *avctx = instance.codec_ctx();
|
||||
interlacing = FFmpegFieldOrderToOlive(avctx->field_order);
|
||||
AVCodecContext *avctx = instance.codec_ctx();
|
||||
interlacing =
|
||||
FFmpegFieldOrderToOlive(avctx->field_order);
|
||||
|
||||
if (instance.GetFrame(pkt, frame) >= 0) {
|
||||
pixel_aspect_ratio =
|
||||
av_guess_sample_aspect_ratio(instance.fmt_ctx(),
|
||||
instance.avstream(), frame);
|
||||
frame_rate =
|
||||
av_guess_frame_rate(instance.fmt_ctx(),
|
||||
instance.avstream(), frame);
|
||||
}
|
||||
if (instance.GetFrame(pkt, frame) >= 0) {
|
||||
pixel_aspect_ratio =
|
||||
av_guess_sample_aspect_ratio(
|
||||
instance.fmt_ctx(), instance.avstream(),
|
||||
frame);
|
||||
frame_rate = av_guess_frame_rate(
|
||||
instance.fmt_ctx(), instance.avstream(),
|
||||
frame);
|
||||
}
|
||||
|
||||
int ret = instance.GetFrame(pkt, frame);
|
||||
if (ret == AVERROR_EOF) {
|
||||
image_is_still = true;
|
||||
} else if (avstream->duration == AV_NOPTS_VALUE ||
|
||||
duration_guessed_from_bitrate) {
|
||||
int64_t last_ts = frame->best_effort_timestamp;
|
||||
while (instance.GetFrame(pkt, frame) >= 0 &&
|
||||
(!cancelled || !cancelled->IsCancelled()))
|
||||
last_ts = frame->best_effort_timestamp;
|
||||
avstream->duration = last_ts;
|
||||
}
|
||||
int ret = instance.GetFrame(pkt, frame);
|
||||
if (ret == AVERROR_EOF) {
|
||||
image_is_still = true;
|
||||
} else if (avstream->duration == AV_NOPTS_VALUE ||
|
||||
duration_guessed_from_bitrate) {
|
||||
int64_t last_ts = frame->best_effort_timestamp;
|
||||
while (
|
||||
instance.GetFrame(pkt, frame) >= 0 &&
|
||||
(!cancelled || !cancelled->IsCancelled()))
|
||||
last_ts = frame->best_effort_timestamp;
|
||||
avstream->duration = last_ts;
|
||||
}
|
||||
|
||||
instance.Close();
|
||||
}
|
||||
instance.Close();
|
||||
}
|
||||
|
||||
cleanup:
|
||||
av_frame_free(&frame);
|
||||
av_packet_free(&pkt);
|
||||
cleanup:
|
||||
av_frame_free(&frame);
|
||||
av_packet_free(&pkt);
|
||||
|
||||
VideoParams stream;
|
||||
stream.set_stream_index(i);
|
||||
stream.set_width(avstream->codecpar->width);
|
||||
stream.set_height(avstream->codecpar->height);
|
||||
stream.set_video_type(image_is_still ? VideoParams::kVideoTypeStill
|
||||
: VideoParams::kVideoTypeVideo);
|
||||
stream.set_format(GetNativePixelFormat(compatible_pix_fmt));
|
||||
stream.set_channel_count(GetNativeChannelCount(compatible_pix_fmt));
|
||||
stream.set_interlacing(interlacing); // <-- 已正确填充
|
||||
stream.set_pixel_aspect_ratio(pixel_aspect_ratio);
|
||||
stream.set_frame_rate(frame_rate);
|
||||
stream.set_start_time(avstream->start_time);
|
||||
stream.set_time_base(avstream->time_base);
|
||||
stream.set_duration(avstream->duration);
|
||||
stream.set_color_range(avstream->codecpar->color_range == AVCOL_RANGE_JPEG
|
||||
? VideoParams::kColorRangeFull
|
||||
: VideoParams::kColorRangeLimited);
|
||||
stream.set_premultiplied_alpha(false);
|
||||
VideoParams stream;
|
||||
stream.set_stream_index(i);
|
||||
stream.set_width(avstream->codecpar->width);
|
||||
stream.set_height(avstream->codecpar->height);
|
||||
stream.set_video_type(image_is_still ?
|
||||
VideoParams::kVideoTypeStill :
|
||||
VideoParams::kVideoTypeVideo);
|
||||
stream.set_format(
|
||||
GetNativePixelFormat(compatible_pix_fmt));
|
||||
stream.set_channel_count(
|
||||
GetNativeChannelCount(compatible_pix_fmt));
|
||||
stream.set_interlacing(interlacing); // <-- 已正确填充
|
||||
stream.set_pixel_aspect_ratio(pixel_aspect_ratio);
|
||||
stream.set_frame_rate(frame_rate);
|
||||
stream.set_start_time(avstream->start_time);
|
||||
stream.set_time_base(avstream->time_base);
|
||||
stream.set_duration(avstream->duration);
|
||||
stream.set_color_range(
|
||||
avstream->codecpar->color_range ==
|
||||
AVCOL_RANGE_JPEG ?
|
||||
VideoParams::kColorRangeFull :
|
||||
VideoParams::kColorRangeLimited);
|
||||
stream.set_premultiplied_alpha(false);
|
||||
|
||||
desc.AddVideoStream(stream);
|
||||
image_is_still ? still_streams++ : video_streams++;
|
||||
desc.AddVideoStream(stream);
|
||||
image_is_still ? still_streams++ : video_streams++;
|
||||
}
|
||||
|
||||
|
||||
} else if (avstream->codecpar->codec_type ==
|
||||
AVMEDIA_TYPE_AUDIO) {
|
||||
// Create an audio stream object
|
||||
@@ -837,7 +847,7 @@ bool FFmpegDecoder::ConformAudioInternal(const QVector<QString> &filenames,
|
||||
}
|
||||
// Create resampling context
|
||||
AVChannelLayout layout = params.channel_layout();
|
||||
SwrContext *resampler=NULL;
|
||||
SwrContext *resampler = NULL;
|
||||
swr_alloc_set_opts2(
|
||||
&resampler, &layout,
|
||||
FFmpegUtils::GetFFmpegSampleFormat(params.format()),
|
||||
@@ -1270,14 +1280,14 @@ AVFramePtr FFmpegDecoder::RetrieveFrame(const rational &time,
|
||||
|
||||
AVFramePtr FFmpegDecoder::TransferHardwareFrame(AVFramePtr f)
|
||||
{
|
||||
if (!instance_.hwaccel_enabled() ||
|
||||
f->format != instance_.hw_pix_fmt()) {
|
||||
if (!instance_.hwaccel_enabled() || f->format != instance_.hw_pix_fmt()) {
|
||||
return f;
|
||||
}
|
||||
|
||||
AVFrame *sw_frame = av_frame_alloc();
|
||||
if (!sw_frame) {
|
||||
qCritical() << "Failed to allocate software frame for hardware transfer";
|
||||
qCritical()
|
||||
<< "Failed to allocate software frame for hardware transfer";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -1291,8 +1301,9 @@ AVFramePtr FFmpegDecoder::TransferHardwareFrame(AVFramePtr f)
|
||||
|
||||
ret = av_frame_copy_props(sw_frame, f.get());
|
||||
if (ret < 0) {
|
||||
qWarning() << "Failed to copy frame properties during hardware transfer:"
|
||||
<< FFmpegError(ret);
|
||||
qWarning()
|
||||
<< "Failed to copy frame properties during hardware transfer:"
|
||||
<< FFmpegError(ret);
|
||||
}
|
||||
|
||||
return CreateAVFramePtr(sw_frame);
|
||||
@@ -1372,7 +1383,8 @@ bool FFmpegDecoder::Instance::Open(const char *filename, int stream_index)
|
||||
// Open file in a format context
|
||||
AVDictionary *format_opts = nullptr;
|
||||
ApplyFormatOpenOptions(&format_opts);
|
||||
int error_code = avformat_open_input(&fmt_ctx_, filename, nullptr, &format_opts);
|
||||
int error_code =
|
||||
avformat_open_input(&fmt_ctx_, filename, nullptr, &format_opts);
|
||||
av_dict_free(&format_opts);
|
||||
TuneFormatContext(fmt_ctx_);
|
||||
DiscardSubtitleStreams(fmt_ctx_);
|
||||
@@ -1420,7 +1432,7 @@ bool FFmpegDecoder::Instance::Open(const char *filename, int stream_index)
|
||||
// Handle failure to copy parameters
|
||||
if (error_code < 0) {
|
||||
qCritical()
|
||||
<< "Failed to copy parameters from AVStream to AVCodecContext";
|
||||
<< "Failed to copy parameters from AVStream to AVCodecContext";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1437,13 +1449,14 @@ bool FFmpegDecoder::Instance::Open(const char *filename, int stream_index)
|
||||
error_code = avcodec_open2(codec_ctx_, codec, &opts_);
|
||||
if (error_code == 0) {
|
||||
hwaccel_enabled_ = true;
|
||||
qDebug() << "Hardware decoding enabled for" << filename
|
||||
<< "using" << av_hwdevice_get_type_name(hw_device_type_)
|
||||
qDebug() << "Hardware decoding enabled for" << filename << "using"
|
||||
<< av_hwdevice_get_type_name(hw_device_type_)
|
||||
<< "pixel format" << av_get_pix_fmt_name(hw_pix_fmt_);
|
||||
return true;
|
||||
}
|
||||
|
||||
qWarning() << "Failed to open hardware codec, falling back to software decoding:";
|
||||
qWarning()
|
||||
<< "Failed to open hardware codec, falling back to software decoding:";
|
||||
char buf[512];
|
||||
av_strerror(error_code, buf, 512);
|
||||
qWarning() << FFmpegError(error_code) << buf;
|
||||
@@ -1454,11 +1467,13 @@ bool FFmpegDecoder::Instance::Open(const char *filename, int stream_index)
|
||||
|
||||
codec_ctx_ = avcodec_alloc_context3(codec);
|
||||
if (codec_ctx_ == nullptr) {
|
||||
qCritical() << "Failed to allocate codec context for software fallback";
|
||||
qCritical()
|
||||
<< "Failed to allocate codec context for software fallback";
|
||||
return false;
|
||||
}
|
||||
|
||||
error_code = avcodec_parameters_to_context(codec_ctx_, avstream_->codecpar);
|
||||
error_code =
|
||||
avcodec_parameters_to_context(codec_ctx_, avstream_->codecpar);
|
||||
if (error_code < 0) {
|
||||
qCritical()
|
||||
<< "Failed to copy parameters from AVStream to AVCodecContext";
|
||||
@@ -1494,25 +1509,26 @@ AVHWDeviceType FFmpegDecoder::Instance::ChooseHardwareDevice()
|
||||
}
|
||||
}
|
||||
#elif defined(Q_OS_WIN)
|
||||
for (AVHWDeviceType type : { AV_HWDEVICE_TYPE_D3D11VA, AV_HWDEVICE_TYPE_DXVA2,
|
||||
AV_HWDEVICE_TYPE_CUDA }) {
|
||||
for (AVHWDeviceType type :
|
||||
{ AV_HWDEVICE_TYPE_D3D11VA, AV_HWDEVICE_TYPE_DXVA2,
|
||||
AV_HWDEVICE_TYPE_CUDA }) {
|
||||
if (av_hwdevice_find_type_by_name(av_hwdevice_get_type_name(type)) !=
|
||||
AV_HWDEVICE_TYPE_NONE) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
#elif defined(Q_OS_MACOS)
|
||||
if (av_hwdevice_find_type_by_name(
|
||||
av_hwdevice_get_type_name(AV_HWDEVICE_TYPE_VIDEOTOOLBOX)) !=
|
||||
AV_HWDEVICE_TYPE_NONE) {
|
||||
if (av_hwdevice_find_type_by_name(av_hwdevice_get_type_name(
|
||||
AV_HWDEVICE_TYPE_VIDEOTOOLBOX)) != AV_HWDEVICE_TYPE_NONE) {
|
||||
return AV_HWDEVICE_TYPE_VIDEOTOOLBOX;
|
||||
}
|
||||
#endif
|
||||
return AV_HWDEVICE_TYPE_NONE;
|
||||
}
|
||||
|
||||
AVPixelFormat FFmpegDecoder::Instance::GetHardwareFormat(
|
||||
AVCodecContext *ctx, const AVPixelFormat *pix_fmts)
|
||||
AVPixelFormat
|
||||
FFmpegDecoder::Instance::GetHardwareFormat(AVCodecContext *ctx,
|
||||
const AVPixelFormat *pix_fmts)
|
||||
{
|
||||
const Instance *inst = static_cast<const Instance *>(ctx->opaque);
|
||||
for (const AVPixelFormat *p = pix_fmts; *p != AV_PIX_FMT_NONE; p++) {
|
||||
@@ -1521,7 +1537,8 @@ AVPixelFormat FFmpegDecoder::Instance::GetHardwareFormat(
|
||||
}
|
||||
}
|
||||
|
||||
qWarning() << "Hardware pixel format not supported by decoder, using first software format";
|
||||
qWarning()
|
||||
<< "Hardware pixel format not supported by decoder, using first software format";
|
||||
return pix_fmts[0];
|
||||
}
|
||||
|
||||
@@ -1547,9 +1564,9 @@ bool FFmpegDecoder::Instance::InitHardwareAcceleration(const AVCodec *codec)
|
||||
}
|
||||
|
||||
if (hw_pix_fmt_ == AV_PIX_FMT_NONE) {
|
||||
qDebug() << "Codec" << codec->id
|
||||
<< "does not support hardware device type"
|
||||
<< av_hwdevice_get_type_name(device_type);
|
||||
qDebug()
|
||||
<< "Codec" << codec->id << "does not support hardware device type"
|
||||
<< av_hwdevice_get_type_name(device_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,8 @@ protected:
|
||||
virtual bool OpenInternal() override;
|
||||
virtual TexturePtr
|
||||
RetrieveVideoInternal(const RetrieveVideoParams &p) override;
|
||||
virtual FramePtr RetrieveVideoFrameInternal(const RetrieveVideoParams &p) override;
|
||||
virtual FramePtr
|
||||
RetrieveVideoFrameInternal(const RetrieveVideoParams &p) override;
|
||||
virtual bool ConformAudioInternal(const QVector<QString> &filenames,
|
||||
const AudioParams ¶ms,
|
||||
CancelAtom *cancelled) override;
|
||||
@@ -145,7 +146,7 @@ private:
|
||||
private:
|
||||
static AVHWDeviceType ChooseHardwareDevice();
|
||||
static AVPixelFormat GetHardwareFormat(AVCodecContext *ctx,
|
||||
const AVPixelFormat *pix_fmts);
|
||||
const AVPixelFormat *pix_fmts);
|
||||
|
||||
bool InitHardwareAcceleration(const AVCodec *codec);
|
||||
void CleanupHardwareAcceleration();
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
codec/oiio/oiiodecoder.cpp
|
||||
codec/oiio/oiiodecoder.h
|
||||
codec/oiio/oiioencoder.cpp
|
||||
codec/oiio/oiioencoder.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
codec/oiio/oiiodecoder.cpp
|
||||
codec/oiio/oiiodecoder.h
|
||||
codec/oiio/oiioencoder.cpp
|
||||
codec/oiio/oiioencoder.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -185,7 +185,8 @@ FramePtr OIIODecoder::RetrieveVideoFrameInternal(const RetrieveVideoParams &p)
|
||||
if (!frame->allocate()) {
|
||||
return nullptr;
|
||||
}
|
||||
memcpy(frame->data(), buffer_.const_data(), size_t(buffer_.allocated_size()));
|
||||
memcpy(frame->data(), buffer_.const_data(),
|
||||
size_t(buffer_.allocated_size()));
|
||||
return frame;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@ protected:
|
||||
virtual bool OpenInternal() override;
|
||||
virtual TexturePtr
|
||||
RetrieveVideoInternal(const RetrieveVideoParams &p) override;
|
||||
virtual FramePtr RetrieveVideoFrameInternal(const RetrieveVideoParams &p) override;
|
||||
virtual FramePtr
|
||||
RetrieveVideoFrameInternal(const RetrieveVideoParams &p) override;
|
||||
virtual void CloseInternal() override;
|
||||
|
||||
private:
|
||||
|
||||
+13
-15
@@ -52,14 +52,12 @@ QString ProxyManager::GetProxyFilename(const QString &cache_path,
|
||||
const QString proxy_dir = GetProxyDirectory(cache_path);
|
||||
const QString extension =
|
||||
params.extension.isEmpty() ? QStringLiteral("mp4") : params.extension;
|
||||
const QString filename = QStringLiteral("%1-%2.%3x%4.v%5.%6")
|
||||
.arg(FileFunctions::GetUniqueFileIdentifier(
|
||||
source_filename),
|
||||
QString::number(stream_index),
|
||||
QString::number(params.width),
|
||||
QString::number(params.height),
|
||||
QString::number(params.version),
|
||||
extension);
|
||||
const QString filename =
|
||||
QStringLiteral("%1-%2.%3x%4.v%5.%6")
|
||||
.arg(FileFunctions::GetUniqueFileIdentifier(source_filename),
|
||||
QString::number(stream_index), QString::number(params.width),
|
||||
QString::number(params.height),
|
||||
QString::number(params.version), extension);
|
||||
|
||||
return QDir(proxy_dir).filePath(filename);
|
||||
}
|
||||
@@ -119,9 +117,10 @@ ProxyManager::ProxyStateFromString(const QString &state)
|
||||
return kProxyMissing;
|
||||
}
|
||||
|
||||
ProxyManager::Proxy ProxyManager::GetOrStartProxy(
|
||||
const QString &cache_path, const QString &source_filename,
|
||||
int stream_index, const ProxyParams ¶ms)
|
||||
ProxyManager::Proxy
|
||||
ProxyManager::GetOrStartProxy(const QString &cache_path,
|
||||
const QString &source_filename, int stream_index,
|
||||
const ProxyParams ¶ms)
|
||||
{
|
||||
QMutexLocker locker(&mutex_);
|
||||
|
||||
@@ -145,10 +144,9 @@ ProxyManager::Proxy ProxyManager::GetOrStartProxy(
|
||||
}
|
||||
|
||||
const QString working_filename = GetWorkingProxyFilename(filename);
|
||||
ProxyTask *task = new ProxyTask(source_filename, stream_index, params,
|
||||
working_filename);
|
||||
connect(task, &Task::Finished, this,
|
||||
&ProxyManager::ProxyTaskFinished);
|
||||
ProxyTask *task =
|
||||
new ProxyTask(source_filename, stream_index, params, working_filename);
|
||||
connect(task, &Task::Finished, this, &ProxyManager::ProxyTaskFinished);
|
||||
task->moveToThread(TaskManager::instance()->thread());
|
||||
QMetaObject::invokeMethod(TaskManager::instance(), "AddTask",
|
||||
Qt::QueuedConnection, Q_ARG(Task *, task));
|
||||
|
||||
@@ -90,8 +90,7 @@ public:
|
||||
static ProxyState ProxyStateFromString(const QString &state);
|
||||
|
||||
Proxy GetOrStartProxy(const QString &cache_path,
|
||||
const QString &source_filename,
|
||||
int stream_index,
|
||||
const QString &source_filename, int stream_index,
|
||||
const ProxyParams ¶ms);
|
||||
|
||||
signals:
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
namespace olive
|
||||
{
|
||||
|
||||
TimecodeMetadata::SourceTime TimecodeMetadata::FromTimecodeString(
|
||||
const QString &timecode, const core::rational &timebase)
|
||||
TimecodeMetadata::SourceTime
|
||||
TimecodeMetadata::FromTimecodeString(const QString &timecode,
|
||||
const core::rational &timebase)
|
||||
{
|
||||
SourceTime result;
|
||||
const QString trimmed = timecode.trimmed();
|
||||
@@ -39,8 +40,8 @@ TimecodeMetadata::SourceTime TimecodeMetadata::FromTimecodeString(
|
||||
|
||||
bool ok = false;
|
||||
const core::Timecode::Display display =
|
||||
trimmed.contains(';') ? core::Timecode::kTimecodeDropFrame
|
||||
: core::Timecode::kTimecodeNonDropFrame;
|
||||
trimmed.contains(';') ? core::Timecode::kTimecodeDropFrame :
|
||||
core::Timecode::kTimecodeNonDropFrame;
|
||||
result.time = core::Timecode::timecode_to_time(trimmed.toStdString(),
|
||||
timebase, display, &ok);
|
||||
result.valid = ok;
|
||||
@@ -50,8 +51,9 @@ TimecodeMetadata::SourceTime TimecodeMetadata::FromTimecodeString(
|
||||
return result;
|
||||
}
|
||||
|
||||
TimecodeMetadata::SourceTime TimecodeMetadata::FromBwfTimeReference(
|
||||
const QString &time_reference, int sample_rate)
|
||||
TimecodeMetadata::SourceTime
|
||||
TimecodeMetadata::FromBwfTimeReference(const QString &time_reference,
|
||||
int sample_rate)
|
||||
{
|
||||
SourceTime result;
|
||||
if (sample_rate <= 0) {
|
||||
@@ -73,9 +75,8 @@ TimecodeMetadata::SourceTime TimecodeMetadata::FromBwfTimeReference(
|
||||
const qulonglong rational_limit =
|
||||
static_cast<qulonglong>(std::numeric_limits<int>::max());
|
||||
if (numerator <= rational_limit && denominator <= rational_limit) {
|
||||
result.time =
|
||||
core::rational(static_cast<int>(numerator),
|
||||
static_cast<int>(denominator));
|
||||
result.time = core::rational(static_cast<int>(numerator),
|
||||
static_cast<int>(denominator));
|
||||
} else {
|
||||
result.time = core::rational::fromDouble(
|
||||
static_cast<double>(samples) / static_cast<double>(sample_rate));
|
||||
|
||||
+38
-38
@@ -16,42 +16,42 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
target_sources(libolive-editor PRIVATE
|
||||
cancelableobject.h
|
||||
channellayout.h
|
||||
commandlineparser.cpp
|
||||
commandlineparser.h
|
||||
crashpadinterface.cpp
|
||||
crashpadinterface.h
|
||||
crashpadutils.h
|
||||
Current.cpp
|
||||
Current.h
|
||||
debug.cpp
|
||||
debug.h
|
||||
decibel.h
|
||||
define.h
|
||||
ffmpegutils.cpp
|
||||
ffmpegutils.h
|
||||
filefunctions.cpp
|
||||
filefunctions.h
|
||||
html.cpp
|
||||
html.h
|
||||
jobtime.cpp
|
||||
jobtime.h
|
||||
lerp.h
|
||||
memorypool.h
|
||||
ocioutils.cpp
|
||||
ocioutils.h
|
||||
oiioutils.cpp
|
||||
oiioutils.h
|
||||
otioutils.h
|
||||
qtutils.cpp
|
||||
qtutils.h
|
||||
range.h
|
||||
ratiodialog.cpp
|
||||
ratiodialog.h
|
||||
threadsafemap.h
|
||||
tohex.h
|
||||
util.h
|
||||
xmlutils.cpp
|
||||
xmlutils.h
|
||||
cancelableobject.h
|
||||
channellayout.h
|
||||
commandlineparser.cpp
|
||||
commandlineparser.h
|
||||
crashpadinterface.cpp
|
||||
crashpadinterface.h
|
||||
crashpadutils.h
|
||||
Current.cpp
|
||||
Current.h
|
||||
debug.cpp
|
||||
debug.h
|
||||
decibel.h
|
||||
define.h
|
||||
ffmpegutils.cpp
|
||||
ffmpegutils.h
|
||||
filefunctions.cpp
|
||||
filefunctions.h
|
||||
html.cpp
|
||||
html.h
|
||||
jobtime.cpp
|
||||
jobtime.h
|
||||
lerp.h
|
||||
memorypool.h
|
||||
ocioutils.cpp
|
||||
ocioutils.h
|
||||
oiioutils.cpp
|
||||
oiioutils.h
|
||||
otioutils.h
|
||||
qtutils.cpp
|
||||
qtutils.h
|
||||
range.h
|
||||
ratiodialog.cpp
|
||||
ratiodialog.h
|
||||
threadsafemap.h
|
||||
tohex.h
|
||||
util.h
|
||||
xmlutils.cpp
|
||||
xmlutils.h
|
||||
)
|
||||
|
||||
+10
-10
@@ -25,31 +25,31 @@
|
||||
|
||||
class Current {
|
||||
public:
|
||||
static Current& getInstance()
|
||||
static Current &getInstance()
|
||||
{
|
||||
return current;
|
||||
}
|
||||
olive::VideoParams& currentVideoParams()
|
||||
olive::VideoParams ¤tVideoParams()
|
||||
{
|
||||
return currentVideoParams_;
|
||||
}
|
||||
olive::AudioParams& currentAudioParams()
|
||||
olive::AudioParams ¤tAudioParams()
|
||||
{
|
||||
return currentAudioParams_;
|
||||
}
|
||||
void setCurrentVideoParams(olive::VideoParams& params)
|
||||
void setCurrentVideoParams(olive::VideoParams ¶ms)
|
||||
{
|
||||
currentVideoParams_ = params;
|
||||
}
|
||||
void setCurrentAudioParams(olive::AudioParams& params)
|
||||
void setCurrentAudioParams(olive::AudioParams ¶ms)
|
||||
{
|
||||
currentAudioParams_ = params;
|
||||
}
|
||||
void setCurrentVideoParams(olive::VideoParams&& params)
|
||||
void setCurrentVideoParams(olive::VideoParams &¶ms)
|
||||
{
|
||||
currentVideoParams_ = params;
|
||||
}
|
||||
void setCurrentAudioParams(olive::AudioParams&& params)
|
||||
void setCurrentAudioParams(olive::AudioParams &¶ms)
|
||||
{
|
||||
currentAudioParams_ = params;
|
||||
}
|
||||
@@ -73,10 +73,12 @@ public:
|
||||
return plugin_cache_;
|
||||
}
|
||||
|
||||
void setPluginCache(std::shared_ptr<OFX::Host::ImageEffect::PluginCache> cache)
|
||||
void
|
||||
setPluginCache(std::shared_ptr<OFX::Host::ImageEffect::PluginCache> cache)
|
||||
{
|
||||
plugin_cache_ = cache;
|
||||
}
|
||||
|
||||
private:
|
||||
static Current current;
|
||||
olive::VideoParams currentVideoParams_;
|
||||
@@ -85,6 +87,4 @@ private:
|
||||
std::shared_ptr<OFX::Host::ImageEffect::PluginCache> plugin_cache_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //CURRENT_H
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
config/config.h
|
||||
config/config.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
config/config.h
|
||||
config/config.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -341,8 +341,8 @@ void Config::Load()
|
||||
// Config::Load() is called before Core (and therefore the main window)
|
||||
// is constructed, so we cannot use Core::instance()->main_window() as
|
||||
// the message box parent. Passing nullptr creates a top-level dialog.
|
||||
QWidget *parent = Core::instance() ? Core::instance()->main_window()
|
||||
: nullptr;
|
||||
QWidget *parent = Core::instance() ? Core::instance()->main_window() :
|
||||
nullptr;
|
||||
QMessageBox::critical(
|
||||
parent,
|
||||
QCoreApplication::translate("Config", "Error loading settings"),
|
||||
|
||||
+23
-23
@@ -80,37 +80,37 @@
|
||||
#include "widget/menu/menushared.h"
|
||||
#include "window/mainwindow/mainwindow.h"
|
||||
|
||||
namespace {
|
||||
namespace
|
||||
{
|
||||
|
||||
QStringList FootageVideoExtensions()
|
||||
{
|
||||
return QStringList{
|
||||
QStringLiteral("mp4"), QStringLiteral("mov"), QStringLiteral("m4v"),
|
||||
QStringLiteral("avi"), QStringLiteral("mpg"), QStringLiteral("mpeg"),
|
||||
QStringLiteral("m2ts"), QStringLiteral("mts"), QStringLiteral("ts"),
|
||||
QStringLiteral("webm"), QStringLiteral("wmv"), QStringLiteral("flv"),
|
||||
QStringLiteral("3gp"), QStringLiteral("3g2"), QStringLiteral("mxf")
|
||||
QStringLiteral("mp4"), QStringLiteral("mov"), QStringLiteral("m4v"),
|
||||
QStringLiteral("avi"), QStringLiteral("mpg"), QStringLiteral("mpeg"),
|
||||
QStringLiteral("m2ts"), QStringLiteral("mts"), QStringLiteral("ts"),
|
||||
QStringLiteral("webm"), QStringLiteral("wmv"), QStringLiteral("flv"),
|
||||
QStringLiteral("3gp"), QStringLiteral("3g2"), QStringLiteral("mxf")
|
||||
};
|
||||
}
|
||||
|
||||
QStringList FootageAudioExtensions()
|
||||
{
|
||||
return QStringList{
|
||||
QStringLiteral("wav"), QStringLiteral("mp3"), QStringLiteral("flac"),
|
||||
QStringLiteral("aac"), QStringLiteral("ogg"), QStringLiteral("opus"),
|
||||
QStringLiteral("m4a"), QStringLiteral("alac"), QStringLiteral("aif"),
|
||||
QStringLiteral("aiff"), QStringLiteral("aifc"), QStringLiteral("wma")
|
||||
};
|
||||
return QStringList{ QStringLiteral("wav"), QStringLiteral("mp3"),
|
||||
QStringLiteral("flac"), QStringLiteral("aac"),
|
||||
QStringLiteral("ogg"), QStringLiteral("opus"),
|
||||
QStringLiteral("m4a"), QStringLiteral("alac"),
|
||||
QStringLiteral("aif"), QStringLiteral("aiff"),
|
||||
QStringLiteral("aifc"), QStringLiteral("wma") };
|
||||
}
|
||||
|
||||
QStringList FootageImageExtensions()
|
||||
{
|
||||
return QStringList{
|
||||
QStringLiteral("png"), QStringLiteral("jpg"), QStringLiteral("jpeg"),
|
||||
QStringLiteral("tif"), QStringLiteral("tiff"), QStringLiteral("bmp"),
|
||||
QStringLiteral("gif"), QStringLiteral("exr"), QStringLiteral("dpx"),
|
||||
QStringLiteral("webp")
|
||||
};
|
||||
return QStringList{ QStringLiteral("png"), QStringLiteral("jpg"),
|
||||
QStringLiteral("jpeg"), QStringLiteral("tif"),
|
||||
QStringLiteral("tiff"), QStringLiteral("bmp"),
|
||||
QStringLiteral("gif"), QStringLiteral("exr"),
|
||||
QStringLiteral("dpx"), QStringLiteral("webp") };
|
||||
}
|
||||
|
||||
QString BuildFootageFilterGroup(const QString &label,
|
||||
@@ -122,8 +122,8 @@ QString BuildFootageFilterGroup(const QString &label,
|
||||
patterns.append(QStringLiteral("*.%1").arg(ext));
|
||||
}
|
||||
|
||||
return QStringLiteral("%1 (%2)")
|
||||
.arg(label, patterns.join(QLatin1Char(' ')));
|
||||
return QStringLiteral("%1 (%2)").arg(label,
|
||||
patterns.join(QLatin1Char(' ')));
|
||||
}
|
||||
|
||||
QString BuildFootageFileDialogFilter()
|
||||
@@ -457,9 +457,9 @@ void Core::DialogAboutShow()
|
||||
void Core::DialogImportShow()
|
||||
{
|
||||
// Open dialog for user to select files
|
||||
QStringList files = QFileDialog::getOpenFileNames(
|
||||
main_window_, tr("Import footage..."), QString(),
|
||||
FootageFileDialogFilter());
|
||||
QStringList files =
|
||||
QFileDialog::getOpenFileNames(main_window_, tr("Import footage..."),
|
||||
QString(), FootageFileDialogFilter());
|
||||
|
||||
// Check if the user actually selected files to import
|
||||
if (!files.isEmpty()) {
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
# Create crash handler executable
|
||||
add_executable(
|
||||
olive-crashhandler
|
||||
crashhandler.cpp
|
||||
crashhandler.h
|
||||
$<TARGET_OBJECTS:olive-version-obj>
|
||||
olive-crashhandler
|
||||
crashhandler.cpp
|
||||
crashhandler.h
|
||||
$<TARGET_OBJECTS:olive-version-obj>
|
||||
)
|
||||
|
||||
# Rename the generated binary to oak-crashhandler so it matches the Oak branding.
|
||||
@@ -27,42 +27,42 @@ set_target_properties(olive-crashhandler PROPERTIES OUTPUT_NAME "oak-crashhandle
|
||||
|
||||
# Disable console appearing on crash handler dialog
|
||||
set_target_properties(olive-crashhandler PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
WIN32_EXECUTABLE TRUE
|
||||
)
|
||||
|
||||
# Set crash handler includes
|
||||
target_include_directories(
|
||||
olive-crashhandler
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/app
|
||||
${CRASHPAD_INCLUDE_DIRS}
|
||||
olive-crashhandler
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/app
|
||||
${CRASHPAD_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Set crash handler libs
|
||||
target_link_libraries(
|
||||
olive-crashhandler
|
||||
PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
${CRASHPAD_LIBRARIES}
|
||||
olive-crashhandler
|
||||
PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
${CRASHPAD_LIBRARIES}
|
||||
)
|
||||
|
||||
set(CRASHPAD_HANDLER "crashpad_handler${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
set(MINIDUMP_STACKWALK "minidump_stackwalk${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
|
||||
if(APPLE)
|
||||
# Move crash handler executables inside Mac app bundle
|
||||
add_custom_command(TARGET olive-crashhandler POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:olive-crashhandler> $<TARGET_FILE_DIR:olive-editor>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CRASHPAD_LIBRARY_DIRS}/${CRASHPAD_HANDLER} $<TARGET_FILE_DIR:olive-editor>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BREAKPAD_BIN_DIR}/${MINIDUMP_STACKWALK} $<TARGET_FILE_DIR:olive-editor>
|
||||
)
|
||||
elseif(UNIX)
|
||||
install(TARGETS olive-crashhandler RUNTIME DESTINATION bin)
|
||||
install(PROGRAMS ${CRASHPAD_LIBRARY_DIRS}/${CRASHPAD_HANDLER} DESTINATION bin)
|
||||
install(PROGRAMS ${BREAKPAD_BIN_DIR}/${MINIDUMP_STACKWALK} DESTINATION bin)
|
||||
endif()
|
||||
if (APPLE)
|
||||
# Move crash handler executables inside Mac app bundle
|
||||
add_custom_command(TARGET olive-crashhandler POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:olive-crashhandler> $<TARGET_FILE_DIR:olive-editor>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CRASHPAD_LIBRARY_DIRS}/${CRASHPAD_HANDLER} $<TARGET_FILE_DIR:olive-editor>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BREAKPAD_BIN_DIR}/${MINIDUMP_STACKWALK} $<TARGET_FILE_DIR:olive-editor>
|
||||
)
|
||||
elseif (UNIX)
|
||||
install(TARGETS olive-crashhandler RUNTIME DESTINATION bin)
|
||||
install(PROGRAMS ${CRASHPAD_LIBRARY_DIRS}/${CRASHPAD_HANDLER} DESTINATION bin)
|
||||
install(PROGRAMS ${BREAKPAD_BIN_DIR}/${MINIDUMP_STACKWALK} DESTINATION bin)
|
||||
endif ()
|
||||
|
||||
target_compile_definitions(olive-crashhandler PRIVATE ${OLIVE_DEFINITIONS})
|
||||
|
||||
@@ -54,9 +54,9 @@ CrashHandlerDialog::CrashHandlerDialog(const QString &report_path)
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
|
||||
layout->addWidget(new QLabel(
|
||||
tr("We're sorry, Oak Video Editor has crashed. Please help us fix it by "
|
||||
"sending an error report.")));
|
||||
layout->addWidget(new QLabel(tr(
|
||||
"We're sorry, Oak Video Editor has crashed. Please help us fix it by "
|
||||
"sending an error report.")));
|
||||
|
||||
QSplitter *splitter = new QSplitter(Qt::Vertical);
|
||||
splitter->setChildrenCollapsible(false);
|
||||
|
||||
@@ -25,9 +25,9 @@ add_subdirectory(footageproperties)
|
||||
add_subdirectory(footagerelink)
|
||||
add_subdirectory(keyframeproperties)
|
||||
add_subdirectory(markerproperties)
|
||||
if(OpenTimelineIO_FOUND)
|
||||
add_subdirectory(otioproperties)
|
||||
endif()
|
||||
if (OpenTimelineIO_FOUND)
|
||||
add_subdirectory(otioproperties)
|
||||
endif ()
|
||||
add_subdirectory(preferences)
|
||||
add_subdirectory(progress)
|
||||
add_subdirectory(projectproperties)
|
||||
@@ -38,6 +38,6 @@ add_subdirectory(task)
|
||||
add_subdirectory(text)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/about/about.cpp
|
||||
dialog/about/about.h
|
||||
dialog/about/patreon.h
|
||||
dialog/about/scrollinglabel.cpp
|
||||
dialog/about/scrollinglabel.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/about/about.cpp
|
||||
dialog/about/about.h
|
||||
dialog/about/patreon.h
|
||||
dialog/about/scrollinglabel.cpp
|
||||
dialog/about/scrollinglabel.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -66,12 +66,13 @@ AboutDialog::AboutDialog(bool welcome_dialog, QWidget *parent)
|
||||
"<p>%3</p>" // Description
|
||||
"<p>%4</p>" // Fork notice
|
||||
"</body></html>")
|
||||
.arg(QApplication::applicationName(),
|
||||
QApplication::applicationVersion(),
|
||||
tr("Oak Video Editor is a free open source non-linear video editor. "
|
||||
"This software is licensed under the GNU GPL Version 3."),
|
||||
tr("This project is a fork of "
|
||||
"<a href=\"https://github.com/olive-editor/olive\">Olive Video Editor</a>.")));
|
||||
.arg(
|
||||
QApplication::applicationName(),
|
||||
QApplication::applicationVersion(),
|
||||
tr("Oak Video Editor is a free open source non-linear video editor. "
|
||||
"This software is licensed under the GNU GPL Version 3."),
|
||||
tr("This project is a fork of "
|
||||
"<a href=\"https://github.com/olive-editor/olive\">Olive Video Editor</a>.")));
|
||||
|
||||
// Set text formatting
|
||||
label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||
|
||||
@@ -57,7 +57,7 @@ url = 'https://www.patreon.com/api/oauth2/v2/campaigns/1478705/members?include=c
|
||||
name_list = ''
|
||||
|
||||
while True:
|
||||
member_data = requests.get(url, headers = {"authorization": "Bearer " + os.environ.get('PATREON_KEY')})
|
||||
member_data = requests.get(url, headers={"authorization": "Bearer " + os.environ.get('PATREON_KEY')})
|
||||
member_data_decoded = json.loads(member_data.text)
|
||||
|
||||
for member in member_data_decoded["data"]:
|
||||
@@ -68,16 +68,17 @@ while True:
|
||||
name = member["attributes"]["full_name"]
|
||||
name_list += " QStringLiteral(\""
|
||||
name_list += name.translate(str.maketrans({
|
||||
"\"": "\\\"",
|
||||
"\\": "\\\\"
|
||||
}))
|
||||
"\"": "\\\"",
|
||||
"\\": "\\\\"
|
||||
}))
|
||||
name_list += "\")"
|
||||
|
||||
if "links" in member_data_decoded:
|
||||
url = member_data_decoded["links"]["next"]
|
||||
url = member_data_decoded["links"]["next"]
|
||||
else:
|
||||
break
|
||||
break
|
||||
|
||||
text_file = open("patreon.h", "w", encoding="utf-8")
|
||||
text_file.write("#ifndef PATREON_H\n#define PATREON_H\n\n#include <QStringList>\n\nQStringList patrons = {\n%s\n};\n\n#endif // PATREON_H\n" % name_list)
|
||||
text_file.write(
|
||||
"#ifndef PATREON_H\n#define PATREON_H\n\n#include <QStringList>\n\nQStringList patrons = {\n%s\n};\n\n#endif // PATREON_H\n" % name_list)
|
||||
text_file.close()
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/actionsearch/actionsearch.h
|
||||
dialog/actionsearch/actionsearch.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/actionsearch/actionsearch.h
|
||||
dialog/actionsearch/actionsearch.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/autorecovery/autorecoverydialog.h
|
||||
dialog/autorecovery/autorecoverydialog.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/autorecovery/autorecoverydialog.h
|
||||
dialog/autorecovery/autorecoverydialog.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/color/colordialog.h
|
||||
dialog/color/colordialog.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/color/colordialog.h
|
||||
dialog/color/colordialog.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/configbase/configdialogbase.cpp
|
||||
dialog/configbase/configdialogbase.h
|
||||
dialog/configbase/configdialogbasetab.cpp
|
||||
dialog/configbase/configdialogbasetab.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/configbase/configdialogbase.cpp
|
||||
dialog/configbase/configdialogbase.h
|
||||
dialog/configbase/configdialogbasetab.cpp
|
||||
dialog/configbase/configdialogbasetab.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/diskcache/diskcachedialog.h
|
||||
dialog/diskcache/diskcachedialog.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/diskcache/diskcachedialog.h
|
||||
dialog/diskcache/diskcachedialog.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
|
||||
@@ -17,20 +17,20 @@
|
||||
add_subdirectory(codec)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/export/export.cpp
|
||||
dialog/export/export.h
|
||||
dialog/export/exportadvancedvideodialog.cpp
|
||||
dialog/export/exportadvancedvideodialog.h
|
||||
dialog/export/exportaudiotab.cpp
|
||||
dialog/export/exportaudiotab.h
|
||||
dialog/export/exportformatcombobox.cpp
|
||||
dialog/export/exportformatcombobox.h
|
||||
dialog/export/exportsavepresetdialog.cpp
|
||||
dialog/export/exportsavepresetdialog.h
|
||||
dialog/export/exportsubtitlestab.cpp
|
||||
dialog/export/exportsubtitlestab.h
|
||||
dialog/export/exportvideotab.cpp
|
||||
dialog/export/exportvideotab.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/export/export.cpp
|
||||
dialog/export/export.h
|
||||
dialog/export/exportadvancedvideodialog.cpp
|
||||
dialog/export/exportadvancedvideodialog.h
|
||||
dialog/export/exportaudiotab.cpp
|
||||
dialog/export/exportaudiotab.h
|
||||
dialog/export/exportformatcombobox.cpp
|
||||
dialog/export/exportformatcombobox.h
|
||||
dialog/export/exportsavepresetdialog.cpp
|
||||
dialog/export/exportsavepresetdialog.h
|
||||
dialog/export/exportsubtitlestab.cpp
|
||||
dialog/export/exportsubtitlestab.h
|
||||
dialog/export/exportvideotab.cpp
|
||||
dialog/export/exportvideotab.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/export/codec/av1section.cpp
|
||||
dialog/export/codec/av1section.h
|
||||
dialog/export/codec/cineformsection.cpp
|
||||
dialog/export/codec/cineformsection.h
|
||||
dialog/export/codec/codecsection.cpp
|
||||
dialog/export/codec/codecsection.h
|
||||
dialog/export/codec/codecstack.cpp
|
||||
dialog/export/codec/codecstack.h
|
||||
dialog/export/codec/h264section.cpp
|
||||
dialog/export/codec/h264section.h
|
||||
dialog/export/codec/imagesection.cpp
|
||||
dialog/export/codec/imagesection.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/export/codec/av1section.cpp
|
||||
dialog/export/codec/av1section.h
|
||||
dialog/export/codec/cineformsection.cpp
|
||||
dialog/export/codec/cineformsection.h
|
||||
dialog/export/codec/codecsection.cpp
|
||||
dialog/export/codec/codecsection.h
|
||||
dialog/export/codec/codecstack.cpp
|
||||
dialog/export/codec/codecstack.h
|
||||
dialog/export/codec/h264section.cpp
|
||||
dialog/export/codec/h264section.h
|
||||
dialog/export/codec/imagesection.cpp
|
||||
dialog/export/codec/imagesection.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
add_subdirectory(streamproperties)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/footageproperties/footageproperties.cpp
|
||||
dialog/footageproperties/footageproperties.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/footageproperties/footageproperties.cpp
|
||||
dialog/footageproperties/footageproperties.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/footageproperties/streamproperties/streamproperties.h
|
||||
dialog/footageproperties/streamproperties/streamproperties.cpp
|
||||
dialog/footageproperties/streamproperties/audiostreamproperties.h
|
||||
dialog/footageproperties/streamproperties/audiostreamproperties.cpp
|
||||
dialog/footageproperties/streamproperties/videostreamproperties.h
|
||||
dialog/footageproperties/streamproperties/videostreamproperties.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/footageproperties/streamproperties/streamproperties.h
|
||||
dialog/footageproperties/streamproperties/streamproperties.cpp
|
||||
dialog/footageproperties/streamproperties/audiostreamproperties.h
|
||||
dialog/footageproperties/streamproperties/audiostreamproperties.cpp
|
||||
dialog/footageproperties/streamproperties/videostreamproperties.h
|
||||
dialog/footageproperties/streamproperties/videostreamproperties.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/footagerelink/footagerelinkdialog.h
|
||||
dialog/footagerelink/footagerelinkdialog.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/footagerelink/footagerelinkdialog.h
|
||||
dialog/footagerelink/footagerelinkdialog.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/keyframeproperties/keyframeproperties.h
|
||||
dialog/keyframeproperties/keyframeproperties.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/keyframeproperties/keyframeproperties.h
|
||||
dialog/keyframeproperties/keyframeproperties.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/markerproperties/markerpropertiesdialog.h
|
||||
dialog/markerproperties/markerpropertiesdialog.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/markerproperties/markerpropertiesdialog.h
|
||||
dialog/markerproperties/markerpropertiesdialog.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/otioproperties/otiopropertiesdialog.h
|
||||
dialog/otioproperties/otiopropertiesdialog.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/otioproperties/otiopropertiesdialog.h
|
||||
dialog/otioproperties/otiopropertiesdialog.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
add_subdirectory(tabs)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/preferences/keysequenceeditor.h
|
||||
dialog/preferences/keysequenceeditor.cpp
|
||||
dialog/preferences/preferences.h
|
||||
dialog/preferences/preferences.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/preferences/keysequenceeditor.h
|
||||
dialog/preferences/keysequenceeditor.cpp
|
||||
dialog/preferences/preferences.h
|
||||
dialog/preferences/preferences.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -46,16 +46,19 @@ PreferencesDialog::PreferencesDialog(MainWindow *main_window, int start_tab)
|
||||
AddTab(new PreferencesGeneralTab(), tr("General"));
|
||||
AddTab(new PreferencesAppearanceTab(), tr("Appearance"));
|
||||
AddTab(new PreferencesAudioTab(), tr("Audio"));
|
||||
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryTimeline),
|
||||
tr("Timeline"));
|
||||
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryPlayback),
|
||||
tr("Playback"));
|
||||
AddTab(
|
||||
new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryTimeline),
|
||||
tr("Timeline"));
|
||||
AddTab(
|
||||
new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryPlayback),
|
||||
tr("Playback"));
|
||||
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryProject),
|
||||
tr("Project"));
|
||||
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryNodes),
|
||||
tr("Nodes"));
|
||||
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryRendering),
|
||||
tr("Rendering"));
|
||||
AddTab(
|
||||
new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryRendering),
|
||||
tr("Rendering"));
|
||||
AddTab(new PreferencesDiskTab(), tr("Disk"));
|
||||
AddTab(new PreferencesKeyboardTab(main_window), tr("Keyboard"));
|
||||
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/preferences/tabs/preferencesgeneraltab.h
|
||||
dialog/preferences/tabs/preferencesgeneraltab.cpp
|
||||
dialog/preferences/tabs/preferencesbehaviortab.h
|
||||
dialog/preferences/tabs/preferencesbehaviortab.cpp
|
||||
dialog/preferences/tabs/preferencesdisktab.h
|
||||
dialog/preferences/tabs/preferencesdisktab.cpp
|
||||
dialog/preferences/tabs/preferencesappearancetab.h
|
||||
dialog/preferences/tabs/preferencesappearancetab.cpp
|
||||
dialog/preferences/tabs/preferencesaudiotab.h
|
||||
dialog/preferences/tabs/preferencesaudiotab.cpp
|
||||
dialog/preferences/tabs/preferenceskeyboardtab.h
|
||||
dialog/preferences/tabs/preferenceskeyboardtab.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/preferences/tabs/preferencesgeneraltab.h
|
||||
dialog/preferences/tabs/preferencesgeneraltab.cpp
|
||||
dialog/preferences/tabs/preferencesbehaviortab.h
|
||||
dialog/preferences/tabs/preferencesbehaviortab.cpp
|
||||
dialog/preferences/tabs/preferencesdisktab.h
|
||||
dialog/preferences/tabs/preferencesdisktab.cpp
|
||||
dialog/preferences/tabs/preferencesappearancetab.h
|
||||
dialog/preferences/tabs/preferencesappearancetab.cpp
|
||||
dialog/preferences/tabs/preferencesaudiotab.h
|
||||
dialog/preferences/tabs/preferencesaudiotab.cpp
|
||||
dialog/preferences/tabs/preferenceskeyboardtab.h
|
||||
dialog/preferences/tabs/preferenceskeyboardtab.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -40,8 +40,7 @@ PreferencesBehaviorTab::PreferencesBehaviorTab(Category category)
|
||||
AddItems({
|
||||
{ tr("Auto-Seek to Imported Clips"),
|
||||
QStringLiteral("EnableSeekToImport") },
|
||||
{ tr("Edit Tool Also Seeks"),
|
||||
QStringLiteral("EditToolAlsoSeeks") },
|
||||
{ tr("Edit Tool Also Seeks"), QStringLiteral("EditToolAlsoSeeks") },
|
||||
{ tr("Edit Tool Selects Links"),
|
||||
QStringLiteral("EditToolSelectsLinks") },
|
||||
{ tr("Enable Drag Files to Timeline"),
|
||||
@@ -83,8 +82,7 @@ PreferencesBehaviorTab::PreferencesBehaviorTab(Category category)
|
||||
});
|
||||
break;
|
||||
|
||||
case kCategoryRendering:
|
||||
{
|
||||
case kCategoryRendering: {
|
||||
QLabel *backend_label = new QLabel(tr("Graphics Backend"));
|
||||
backend_label->setToolTip(
|
||||
tr("Selects the graphics API Oak should request on next launch. "
|
||||
@@ -94,17 +92,16 @@ PreferencesBehaviorTab::PreferencesBehaviorTab(Category category)
|
||||
|
||||
graphics_backend_combobox_ = new QComboBox();
|
||||
graphics_backend_combobox_->addItem(tr("OpenGL"),
|
||||
QStringLiteral("opengl"));
|
||||
QStringLiteral("opengl"));
|
||||
graphics_backend_combobox_->addItem(tr("Vulkan (experimental)"),
|
||||
QStringLiteral("vulkan"));
|
||||
QStringLiteral("vulkan"));
|
||||
const QString current_backend =
|
||||
OLIVE_CONFIG("GraphicsBackend").toString().toLower();
|
||||
const int backend_index = graphics_backend_combobox_->findData(
|
||||
current_backend.isEmpty() ? QStringLiteral("opengl")
|
||||
: current_backend);
|
||||
graphics_backend_combobox_->setCurrentIndex(backend_index >= 0
|
||||
? backend_index
|
||||
: 0);
|
||||
current_backend.isEmpty() ? QStringLiteral("opengl") :
|
||||
current_backend);
|
||||
graphics_backend_combobox_->setCurrentIndex(
|
||||
backend_index >= 0 ? backend_index : 0);
|
||||
|
||||
QHBoxLayout *backend_layout = new QHBoxLayout();
|
||||
backend_layout->addWidget(backend_label);
|
||||
|
||||
@@ -49,7 +49,8 @@ public:
|
||||
|
||||
static QString BehaviorPrefTr(const char *text)
|
||||
{
|
||||
return QCoreApplication::translate("olive::PreferencesBehaviorTab", text);
|
||||
return QCoreApplication::translate("olive::PreferencesBehaviorTab",
|
||||
text);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -105,16 +105,14 @@ PreferencesDiskTab::PreferencesDiskTab()
|
||||
proxy_width_slider_ = new IntegerSlider();
|
||||
proxy_width_slider_->SetMinimum(160);
|
||||
proxy_width_slider_->SetMaximum(4096);
|
||||
proxy_width_slider_->SetValue(
|
||||
OLIVE_CONFIG("ProxyWidth").value<int>());
|
||||
proxy_width_slider_->SetValue(OLIVE_CONFIG("ProxyWidth").value<int>());
|
||||
proxy_layout->addWidget(proxy_width_slider_, proxy_row, 1);
|
||||
|
||||
proxy_layout->addWidget(new QLabel(tr("Proxy Height:")), proxy_row, 2);
|
||||
proxy_height_slider_ = new IntegerSlider();
|
||||
proxy_height_slider_->SetMinimum(120);
|
||||
proxy_height_slider_->SetMaximum(2160);
|
||||
proxy_height_slider_->SetValue(
|
||||
OLIVE_CONFIG("ProxyHeight").value<int>());
|
||||
proxy_height_slider_->SetValue(OLIVE_CONFIG("ProxyHeight").value<int>());
|
||||
proxy_layout->addWidget(proxy_height_slider_, proxy_row, 3);
|
||||
|
||||
proxy_row++;
|
||||
@@ -123,28 +121,22 @@ PreferencesDiskTab::PreferencesDiskTab()
|
||||
proxy_crf_slider_ = new IntegerSlider();
|
||||
proxy_crf_slider_->SetMinimum(0);
|
||||
proxy_crf_slider_->SetMaximum(51);
|
||||
proxy_crf_slider_->SetValue(
|
||||
OLIVE_CONFIG("ProxyCRF").value<int>());
|
||||
proxy_crf_slider_->SetValue(OLIVE_CONFIG("ProxyCRF").value<int>());
|
||||
proxy_layout->addWidget(proxy_crf_slider_, proxy_row, 1);
|
||||
|
||||
proxy_layout->addWidget(new QLabel(tr("Proxy Preset:")), proxy_row, 2);
|
||||
proxy_preset_combo_ = new QComboBox();
|
||||
const QStringList presets = {
|
||||
QStringLiteral("ultrafast"),
|
||||
QStringLiteral("superfast"),
|
||||
QStringLiteral("veryfast"),
|
||||
QStringLiteral("faster"),
|
||||
QStringLiteral("fast"),
|
||||
QStringLiteral("medium"),
|
||||
QStringLiteral("slow"),
|
||||
QStringLiteral("slower"),
|
||||
QStringLiteral("ultrafast"), QStringLiteral("superfast"),
|
||||
QStringLiteral("veryfast"), QStringLiteral("faster"),
|
||||
QStringLiteral("fast"), QStringLiteral("medium"),
|
||||
QStringLiteral("slow"), QStringLiteral("slower"),
|
||||
QStringLiteral("veryslow"),
|
||||
};
|
||||
for (const QString &preset : presets) {
|
||||
proxy_preset_combo_->addItem(preset);
|
||||
}
|
||||
proxy_preset_combo_->setCurrentText(
|
||||
OLIVE_CONFIG("ProxyPreset").toString());
|
||||
proxy_preset_combo_->setCurrentText(OLIVE_CONFIG("ProxyPreset").toString());
|
||||
proxy_layout->addWidget(proxy_preset_combo_, proxy_row, 3);
|
||||
|
||||
outer_layout->addStretch();
|
||||
@@ -185,8 +177,10 @@ void PreferencesDiskTab::Accept(MultiUndoCommand *command)
|
||||
OLIVE_CONFIG("DiskCacheAhead") = QVariant::fromValue(
|
||||
rational::fromDouble(cache_ahead_slider_->GetValue()));
|
||||
|
||||
OLIVE_CONFIG("ProxyWidth") = static_cast<int>(proxy_width_slider_->GetValue());
|
||||
OLIVE_CONFIG("ProxyHeight") = static_cast<int>(proxy_height_slider_->GetValue());
|
||||
OLIVE_CONFIG("ProxyWidth") =
|
||||
static_cast<int>(proxy_width_slider_->GetValue());
|
||||
OLIVE_CONFIG("ProxyHeight") =
|
||||
static_cast<int>(proxy_height_slider_->GetValue());
|
||||
OLIVE_CONFIG("ProxyCRF") = static_cast<int>(proxy_crf_slider_->GetValue());
|
||||
OLIVE_CONFIG("ProxyPreset") = proxy_preset_combo_->currentText();
|
||||
}
|
||||
|
||||
@@ -169,21 +169,25 @@ PreferencesGeneralTab::PreferencesGeneralTab()
|
||||
}
|
||||
|
||||
{
|
||||
QGroupBox *behavior_groupbox = new QGroupBox(PreferencesBehaviorTab::BehaviorPrefTr("Behavior"));
|
||||
QGroupBox *behavior_groupbox =
|
||||
new QGroupBox(PreferencesBehaviorTab::BehaviorPrefTr("Behavior"));
|
||||
QVBoxLayout *behavior_layout = new QVBoxLayout(behavior_groupbox);
|
||||
layout->addWidget(behavior_groupbox);
|
||||
|
||||
hover_focus_ = new QCheckBox(PreferencesBehaviorTab::BehaviorPrefTr("Enable hover focus"));
|
||||
hover_focus_ = new QCheckBox(
|
||||
PreferencesBehaviorTab::BehaviorPrefTr("Enable hover focus"));
|
||||
hover_focus_->setToolTip(PreferencesBehaviorTab::BehaviorPrefTr(
|
||||
"Panels will be considered focused when the mouse cursor is over them without having to click them."));
|
||||
hover_focus_->setChecked(OLIVE_CONFIG("HoverFocus").toBool());
|
||||
behavior_layout->addWidget(hover_focus_);
|
||||
|
||||
slider_ladder_ = new QCheckBox(PreferencesBehaviorTab::BehaviorPrefTr("Enable slider ladder"));
|
||||
slider_ladder_ = new QCheckBox(
|
||||
PreferencesBehaviorTab::BehaviorPrefTr("Enable slider ladder"));
|
||||
slider_ladder_->setChecked(OLIVE_CONFIG("UseSliderLadders").toBool());
|
||||
behavior_layout->addWidget(slider_ladder_);
|
||||
|
||||
scroll_zooms_ = new QCheckBox(PreferencesBehaviorTab::BehaviorPrefTr("Scrolling zooms by default"));
|
||||
scroll_zooms_ = new QCheckBox(PreferencesBehaviorTab::BehaviorPrefTr(
|
||||
"Scrolling zooms by default"));
|
||||
scroll_zooms_->setToolTip(PreferencesBehaviorTab::BehaviorPrefTr(
|
||||
"By default, scrolling will move the view around, and holding Ctrl/Cmd will make it zoom instead. "
|
||||
"Enabling this will switch those, scrolling will zoom by default, and holding Ctrl/Cmd will move the view instead."));
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/progress/progress.h
|
||||
dialog/progress/progress.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/progress/progress.h
|
||||
dialog/progress/progress.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/projectproperties/projectproperties.h
|
||||
dialog/projectproperties/projectproperties.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/projectproperties/projectproperties.h
|
||||
dialog/projectproperties/projectproperties.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/rendercancel/rendercancel.h
|
||||
dialog/rendercancel/rendercancel.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/rendercancel/rendercancel.h
|
||||
dialog/rendercancel/rendercancel.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/sequence/presetmanager.h
|
||||
dialog/sequence/sequence.h
|
||||
dialog/sequence/sequence.cpp
|
||||
dialog/sequence/sequencedialogparametertab.h
|
||||
dialog/sequence/sequencedialogparametertab.cpp
|
||||
dialog/sequence/sequencedialogpresettab.h
|
||||
dialog/sequence/sequencedialogpresettab.cpp
|
||||
dialog/sequence/sequencepreset.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/sequence/presetmanager.h
|
||||
dialog/sequence/sequence.h
|
||||
dialog/sequence/sequence.cpp
|
||||
dialog/sequence/sequencedialogparametertab.h
|
||||
dialog/sequence/sequencedialogparametertab.cpp
|
||||
dialog/sequence/sequencedialogpresettab.h
|
||||
dialog/sequence/sequencedialogpresettab.cpp
|
||||
dialog/sequence/sequencepreset.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/speedduration/speeddurationdialog.cpp
|
||||
dialog/speedduration/speeddurationdialog.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/speedduration/speeddurationdialog.cpp
|
||||
dialog/speedduration/speeddurationdialog.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/task/task.h
|
||||
dialog/task/task.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/task/task.h
|
||||
dialog/task/task.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/text/text.h
|
||||
dialog/text/text.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
dialog/text/text.h
|
||||
dialog/text/text.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
|
||||
+6
-8
@@ -148,7 +148,6 @@ int decompress_project(const QString &project)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
// Set up debug handler
|
||||
qInstallMessageHandler(olive::DebugHandler);
|
||||
|
||||
@@ -229,8 +228,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
auto no_plugin = parser.AddOption(
|
||||
{ QStringLiteral("-no-plugin") },
|
||||
QCoreApplication::translate("main", "Don't load plugins")
|
||||
);
|
||||
QCoreApplication::translate("main", "Don't load plugins"));
|
||||
|
||||
// Qt options re-implemented (add to this as necessary)
|
||||
//
|
||||
@@ -352,13 +350,13 @@ int main(int argc, char *argv[])
|
||||
olive::Config::Current()[QStringLiteral("GraphicsBackend")]
|
||||
.toString()
|
||||
.toLower();
|
||||
qputenv("QSG_RHI_BACKEND",
|
||||
graphics_backend == QStringLiteral("vulkan")
|
||||
? QByteArrayLiteral("vulkan")
|
||||
: QByteArrayLiteral("opengl"));
|
||||
qputenv("QSG_RHI_BACKEND", graphics_backend == QStringLiteral("vulkan") ?
|
||||
QByteArrayLiteral("vulkan") :
|
||||
QByteArrayLiteral("opengl"));
|
||||
|
||||
if (auto *gui_app = qobject_cast<QGuiApplication *>(a.get())) {
|
||||
gui_app->setWindowIcon(QIcon(QStringLiteral(":/graphics/oak-logo.png")));
|
||||
gui_app->setWindowIcon(
|
||||
QIcon(QStringLiteral(":/graphics/oak-logo.png")));
|
||||
}
|
||||
|
||||
if (load_plugins) {
|
||||
|
||||
+27
-27
@@ -33,31 +33,31 @@ add_subdirectory(project)
|
||||
add_subdirectory(time)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/factory.cpp
|
||||
node/factory.h
|
||||
node/globals.cpp
|
||||
node/globals.h
|
||||
node/inputdragger.cpp
|
||||
node/inputdragger.h
|
||||
node/inputimmediate.cpp
|
||||
node/inputimmediate.h
|
||||
node/keyframe.cpp
|
||||
node/keyframe.h
|
||||
node/node.cpp
|
||||
node/node.h
|
||||
node/nodeundo.cpp
|
||||
node/nodeundo.h
|
||||
node/param.cpp
|
||||
node/param.h
|
||||
node/project.cpp
|
||||
node/project.h
|
||||
node/splitvalue.h
|
||||
node/traverser.cpp
|
||||
node/traverser.h
|
||||
node/value.cpp
|
||||
node/value.h
|
||||
node/valuedatabase.cpp
|
||||
node/valuedatabase.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/factory.cpp
|
||||
node/factory.h
|
||||
node/globals.cpp
|
||||
node/globals.h
|
||||
node/inputdragger.cpp
|
||||
node/inputdragger.h
|
||||
node/inputimmediate.cpp
|
||||
node/inputimmediate.h
|
||||
node/keyframe.cpp
|
||||
node/keyframe.h
|
||||
node/node.cpp
|
||||
node/node.h
|
||||
node/nodeundo.cpp
|
||||
node/nodeundo.h
|
||||
node/param.cpp
|
||||
node/param.h
|
||||
node/project.cpp
|
||||
node/project.h
|
||||
node/splitvalue.h
|
||||
node/traverser.cpp
|
||||
node/traverser.h
|
||||
node/value.cpp
|
||||
node/value.h
|
||||
node/valuedatabase.cpp
|
||||
node/valuedatabase.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -18,6 +18,6 @@ add_subdirectory(pan)
|
||||
add_subdirectory(volume)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/audio/pan/pan.h
|
||||
node/audio/pan/pan.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/audio/pan/pan.h
|
||||
node/audio/pan/pan.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/audio/volume/volume.h
|
||||
node/audio/volume/volume.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/audio/volume/volume.h
|
||||
node/audio/volume/volume.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -20,8 +20,8 @@ add_subdirectory(subtitle)
|
||||
add_subdirectory(transition)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/block/block.h
|
||||
node/block/block.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/block/block.h
|
||||
node/block/block.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/block/clip/clip.h
|
||||
node/block/clip/clip.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/block/clip/clip.h
|
||||
node/block/clip/clip.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/block/gap/gap.h
|
||||
node/block/gap/gap.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/block/gap/gap.h
|
||||
node/block/gap/gap.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/block/subtitle/subtitle.cpp
|
||||
node/block/subtitle/subtitle.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/block/subtitle/subtitle.cpp
|
||||
node/block/subtitle/subtitle.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -18,8 +18,8 @@ add_subdirectory(crossdissolve)
|
||||
add_subdirectory(diptocolor)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/block/transition/transition.h
|
||||
node/block/transition/transition.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/block/transition/transition.h
|
||||
node/block/transition/transition.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/block/transition/crossdissolve/crossdissolvetransition.h
|
||||
node/block/transition/crossdissolve/crossdissolvetransition.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/block/transition/crossdissolve/crossdissolvetransition.h
|
||||
node/block/transition/crossdissolve/crossdissolvetransition.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/block/transition/diptocolor/diptocolortransition.h
|
||||
node/block/transition/diptocolor/diptocolortransition.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/block/transition/diptocolor/diptocolortransition.h
|
||||
node/block/transition/diptocolor/diptocolortransition.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -22,6 +22,6 @@ add_subdirectory(ociolut)
|
||||
add_subdirectory(threewaycolor)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/color/colormanager/colormanager.cpp
|
||||
node/color/colormanager/colormanager.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/color/colormanager/colormanager.cpp
|
||||
node/color/colormanager/colormanager.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/color/displaytransform/displaytransform.cpp
|
||||
node/color/displaytransform/displaytransform.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/color/displaytransform/displaytransform.cpp
|
||||
node/color/displaytransform/displaytransform.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/color/ociobase/ociobase.cpp
|
||||
node/color/ociobase/ociobase.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/color/ociobase/ociobase.cpp
|
||||
node/color/ociobase/ociobase.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/color/ociogradingtransformlinear/ociogradingtransformlinear.cpp
|
||||
node/color/ociogradingtransformlinear/ociogradingtransformlinear.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/color/ociogradingtransformlinear/ociogradingtransformlinear.cpp
|
||||
node/color/ociogradingtransformlinear/ociogradingtransformlinear.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
# (at your option) any later version.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/color/ociolut/ociolut.cpp
|
||||
node/color/ociolut/ociolut.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/color/ociolut/ociolut.cpp
|
||||
node/color/ociolut/ociolut.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -37,7 +37,8 @@ const QString OCIOLutNode::kDirectionInput = QStringLiteral("lut_dir_in");
|
||||
|
||||
#define super OCIOBaseNode
|
||||
|
||||
namespace {
|
||||
namespace
|
||||
{
|
||||
|
||||
bool IsSupportedLutExtension(const QString &suffix)
|
||||
{
|
||||
@@ -47,7 +48,8 @@ bool IsSupportedLutExtension(const QString &suffix)
|
||||
|
||||
bool IsMainProcess()
|
||||
{
|
||||
return qobject_cast<QApplication *>(QCoreApplication::instance()) != nullptr;
|
||||
return qobject_cast<QApplication *>(QCoreApplication::instance()) !=
|
||||
nullptr;
|
||||
}
|
||||
|
||||
int ReadDirectionInput(const Node *node)
|
||||
@@ -245,9 +247,8 @@ bool OCIOLutNode::CreateProcessorFromInputs() const
|
||||
|
||||
ColorProcessorPtr processor;
|
||||
try {
|
||||
const bool forward =
|
||||
static_cast<ColorProcessor::Direction>(direction) ==
|
||||
ColorProcessor::kNormal;
|
||||
const bool forward = static_cast<ColorProcessor::Direction>(
|
||||
direction) == ColorProcessor::kNormal;
|
||||
qDebug() << "OCIOLutNode: creating processor for" << path
|
||||
<< "direction=" << direction
|
||||
<< "ocio_dir=" << (forward ? "FORWARD" : "INVERSE")
|
||||
@@ -256,10 +257,11 @@ bool OCIOLutNode::CreateProcessorFromInputs() const
|
||||
OCIO::FileTransformRcPtr transform = OCIO::FileTransform::Create();
|
||||
transform->setSrc(path.toUtf8().constData());
|
||||
transform->setInterpolation(OCIO::INTERP_LINEAR);
|
||||
transform->setDirection(
|
||||
forward ? OCIO::TRANSFORM_DIR_FORWARD : OCIO::TRANSFORM_DIR_INVERSE);
|
||||
transform->setDirection(forward ? OCIO::TRANSFORM_DIR_FORWARD :
|
||||
OCIO::TRANSFORM_DIR_INVERSE);
|
||||
|
||||
processor = ColorProcessor::Create(manager()->GetConfig()->getProcessor(transform));
|
||||
processor = ColorProcessor::Create(
|
||||
manager()->GetConfig()->getProcessor(transform));
|
||||
} catch (const std::exception &e) {
|
||||
qWarning() << "OCIO LUT processor error:" << e.what();
|
||||
processor = nullptr;
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
virtual void Retranslate() override;
|
||||
virtual void InputValueChangedEvent(const QString &input,
|
||||
int element) override;
|
||||
int element) override;
|
||||
virtual void Value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
NodeValueTable *table) const override;
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/color/threewaycolor/threewaycolor.h
|
||||
node/color/threewaycolor/threewaycolor.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/color/threewaycolor/threewaycolor.h
|
||||
node/color/threewaycolor/threewaycolor.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -87,8 +87,7 @@ void ThreeWayColorNode::Retranslate()
|
||||
SetInputName(kHighlightsAmountInput, tr("Highlights Amount"));
|
||||
}
|
||||
|
||||
ShaderCode
|
||||
ThreeWayColorNode::GetShaderCode(const ShaderRequest &request) const
|
||||
ShaderCode ThreeWayColorNode::GetShaderCode(const ShaderRequest &request) const
|
||||
{
|
||||
Q_UNUSED(request)
|
||||
return ShaderCode(
|
||||
|
||||
@@ -25,6 +25,6 @@ add_subdirectory(transform)
|
||||
add_subdirectory(wave)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/cornerpin/cornerpindistortnode.cpp
|
||||
node/distort/cornerpin/cornerpindistortnode.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/cornerpin/cornerpindistortnode.cpp
|
||||
node/distort/cornerpin/cornerpindistortnode.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/crop/cropdistortnode.cpp
|
||||
node/distort/crop/cropdistortnode.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/crop/cropdistortnode.cpp
|
||||
node/distort/crop/cropdistortnode.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/flip/flipdistortnode.cpp
|
||||
node/distort/flip/flipdistortnode.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/flip/flipdistortnode.cpp
|
||||
node/distort/flip/flipdistortnode.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/mask/mask.cpp
|
||||
node/distort/mask/mask.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/mask/mask.cpp
|
||||
node/distort/mask/mask.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/ripple/rippledistortnode.cpp
|
||||
node/distort/ripple/rippledistortnode.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/ripple/rippledistortnode.cpp
|
||||
node/distort/ripple/rippledistortnode.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/swirl/swirldistortnode.cpp
|
||||
node/distort/swirl/swirldistortnode.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/swirl/swirldistortnode.cpp
|
||||
node/distort/swirl/swirldistortnode.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/tile/tiledistortnode.cpp
|
||||
node/distort/tile/tiledistortnode.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/tile/tiledistortnode.cpp
|
||||
node/distort/tile/tiledistortnode.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/transform/transformdistortnode.cpp
|
||||
node/distort/transform/transformdistortnode.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/transform/transformdistortnode.cpp
|
||||
node/distort/transform/transformdistortnode.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/wave/wavedistortnode.cpp
|
||||
node/distort/wave/wavedistortnode.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/distort/wave/wavedistortnode.cpp
|
||||
node/distort/wave/wavedistortnode.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
add_subdirectory(opacity)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/effect/opacity/opacityeffect.cpp
|
||||
node/effect/opacity/opacityeffect.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/effect/opacity/opacityeffect.cpp
|
||||
node/effect/opacity/opacityeffect.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -94,7 +94,6 @@ void NodeFactory::Initialize()
|
||||
}
|
||||
|
||||
RegisterPluginNodes();
|
||||
|
||||
}
|
||||
|
||||
void NodeFactory::Destroy()
|
||||
@@ -151,8 +150,7 @@ Menu *NodeFactory::CreateMenu(QWidget *parent, bool create_none_item,
|
||||
// Determine final destination (support secondary grouping)
|
||||
Menu *destination = top_menu;
|
||||
QString sub = n->SubCategory();
|
||||
if (!sub.isEmpty() &&
|
||||
n->Category().contains(Node::kCategoryOpenFX)) {
|
||||
if (!sub.isEmpty() && n->Category().contains(Node::kCategoryOpenFX)) {
|
||||
QList<QAction *> sub_actions = top_menu->actions();
|
||||
foreach (QAction *action, sub_actions) {
|
||||
if (action->menu() && action->menu()->title() == sub) {
|
||||
@@ -249,16 +247,15 @@ void NodeFactory::RegisterPluginNodes()
|
||||
continue;
|
||||
}
|
||||
|
||||
const QString plugin_id = QString::fromStdString(
|
||||
image_effect->getIdentifier());
|
||||
const QString plugin_id =
|
||||
QString::fromStdString(image_effect->getIdentifier());
|
||||
if (existing_ids.contains(plugin_id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto &contexts = image_effect->getContexts();
|
||||
if (contexts.empty()) {
|
||||
qWarning() << "Skipping OFX plugin with no contexts:"
|
||||
<< plugin_id;
|
||||
qWarning() << "Skipping OFX plugin with no contexts:" << plugin_id;
|
||||
continue;
|
||||
}
|
||||
std::string context = kOfxImageEffectContextFilter;
|
||||
|
||||
@@ -20,6 +20,6 @@ add_subdirectory(mosaic)
|
||||
add_subdirectory(stroke)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/filter/blur/blur.h
|
||||
node/filter/blur/blur.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
node/filter/blur/blur.h
|
||||
node/filter/blur/blur.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user