diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 1e0149918..bffdc5688 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -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 "${QM_FILE}\n")
-endforeach()
+foreach (QM_FILE ${OLIVE_QM_FILES})
+ get_filename_component(QM_FILENAME_COMPONENT ${QM_FILE} NAME_WE)
+ string(APPEND QRC_BODY "${QM_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
- $
- $
+ main.cpp
+ $
+ $
)
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
- $
- $
+ render/worker/workermain.cpp
+ $
+ $
)
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 $/Contents/MacOS
- COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/Contents/MacOS/
- COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/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 $ $/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 $/Contents/MacOS
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/Contents/MacOS/
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/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 $ $/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 ()
diff --git a/app/audio/CMakeLists.txt b/app/audio/CMakeLists.txt
index a9b08de04..e4b632c7d 100644
--- a/app/audio/CMakeLists.txt
+++ b/app/audio/CMakeLists.txt
@@ -15,18 +15,18 @@
# along with this program. If not, see .
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
)
diff --git a/app/audio/audiolevelmeter.cpp b/app/audio/audiolevelmeter.cpp
index 68f03d5b5..af85abafb 100644
--- a/app/audio/audiolevelmeter.cpp
+++ b/app/audio/audiolevelmeter.cpp
@@ -57,7 +57,8 @@ AudioLevelMeter::AnalyzeSampleBuffer(const core::SampleBuffer &samples)
square_sum += value * value;
}
- const double mean_square = square_sum / static_cast(sample_count);
+ const double mean_square =
+ square_sum / static_cast(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(total_samples));
+ stats.integrated_lufs =
+ PowerToLufs(total_square / static_cast(total_samples));
return stats;
}
diff --git a/app/audio/audiosynchronizer.cpp b/app/audio/audiosynchronizer.cpp
index 21c1ecb5e..7ce2e9a32 100644
--- a/app/audio/audiosynchronizer.cpp
+++ b/app/audio/audiosynchronizer.cpp
@@ -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(candidate_offset_samples) /
- static_cast(sample_rate));
+ placement.timeline_in = reference_timeline_in +
+ core::rational::fromDouble(
+ static_cast(candidate_offset_samples) /
+ static_cast(sample_rate));
placement.valid = !placement.timeline_in.isNaN();
return placement;
}
diff --git a/app/audio/audiosynchronizer.h b/app/audio/audiosynchronizer.h
index 00dd28629..f32b6665b 100644
--- a/app/audio/audiosynchronizer.h
+++ b/app/audio/audiosynchronizer.h
@@ -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);
};
}
diff --git a/app/audio/audiowaveformsync.cpp b/app/audio/audiowaveformsync.cpp
index 075dd656f..48e30f90d 100644
--- a/app/audio/audiowaveformsync.cpp
+++ b/app/audio/audiowaveformsync.cpp
@@ -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(std::max(0, -lag));
+ const int reference_start =
+ static_cast(std::max(0, -lag));
const int candidate_start = static_cast(std::max(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(window_samples);
+ result.offset_samples = best_lag * static_cast(window_samples);
}
return result;
diff --git a/app/audio/audiowaveformsync.h b/app/audio/audiowaveformsync.h
index 539b17d1c..9aa9ee310 100644
--- a/app/audio/audiowaveformsync.h
+++ b/app/audio/audiowaveformsync.h
@@ -38,8 +38,8 @@ public:
bool valid = false;
};
- static QVector
- ExtractRmsEnvelope(const core::SampleBuffer &samples, size_t window_samples);
+ static QVector ExtractRmsEnvelope(const core::SampleBuffer &samples,
+ size_t window_samples);
static OffsetResult EstimateOffset(const core::SampleBuffer &reference,
const core::SampleBuffer &candidate,
diff --git a/app/cli/CMakeLists.txt b/app/cli/CMakeLists.txt
index c261a3e00..6a21cb3e1 100644
--- a/app/cli/CMakeLists.txt
+++ b/app/cli/CMakeLists.txt
@@ -18,6 +18,6 @@ add_subdirectory(cliprogress)
add_subdirectory(clitask)
set(OLIVE_SOURCES
- ${OLIVE_SOURCES}
- PARENT_SCOPE
+ ${OLIVE_SOURCES}
+ PARENT_SCOPE
)
diff --git a/app/cli/cliprogress/CMakeLists.txt b/app/cli/cliprogress/CMakeLists.txt
index 621c498da..74fbc01ce 100644
--- a/app/cli/cliprogress/CMakeLists.txt
+++ b/app/cli/cliprogress/CMakeLists.txt
@@ -15,8 +15,8 @@
# along with this program. If not, see .
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
)
diff --git a/app/cli/clitask/CMakeLists.txt b/app/cli/clitask/CMakeLists.txt
index 8e5f4782b..75d71fdbe 100644
--- a/app/cli/clitask/CMakeLists.txt
+++ b/app/cli/clitask/CMakeLists.txt
@@ -15,8 +15,8 @@
# along with this program. If not, see .
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
)
diff --git a/app/codec/CMakeLists.txt b/app/codec/CMakeLists.txt
index 5c577e26c..d832c1b0c 100644
--- a/app/codec/CMakeLists.txt
+++ b/app/codec/CMakeLists.txt
@@ -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
)
diff --git a/app/codec/decoder.h b/app/codec/decoder.h
index ee1614be7..8b918b926 100644
--- a/app/codec/decoder.h
+++ b/app/codec/decoder.h
@@ -32,7 +32,7 @@ extern "C" {
#include
#include
- #include "codec/frame.h"
+#include "codec/frame.h"
#include "node/block/block.h"
#include "node/project/footage/footagedescription.h"
#include "render/cancelatom.h"
diff --git a/app/codec/ffmpeg/CMakeLists.txt b/app/codec/ffmpeg/CMakeLists.txt
index 0401fba78..eb713b464 100644
--- a/app/codec/ffmpeg/CMakeLists.txt
+++ b/app/codec/ffmpeg/CMakeLists.txt
@@ -15,10 +15,10 @@
# along with this program. If not, see .
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
)
diff --git a/app/codec/ffmpeg/ffmpegdecoder.cpp b/app/codec/ffmpeg/ffmpegdecoder.cpp
index de971bae4..ef8ce51b1 100644
--- a/app/codec/ffmpeg/ffmpegdecoder.cpp
+++ b/app/codec/ffmpeg/ffmpegdecoder.cpp
@@ -25,11 +25,11 @@ extern "C" {
#include
}
-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(f->format));
+ const AVPixFmtDescriptor *src_desc =
+ av_pix_fmt_desc_get(static_cast(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(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(
+ 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 &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(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;
}
diff --git a/app/codec/ffmpeg/ffmpegdecoder.h b/app/codec/ffmpeg/ffmpegdecoder.h
index 42a44ad6f..0a54492af 100644
--- a/app/codec/ffmpeg/ffmpegdecoder.h
+++ b/app/codec/ffmpeg/ffmpegdecoder.h
@@ -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 &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();
diff --git a/app/codec/oiio/CMakeLists.txt b/app/codec/oiio/CMakeLists.txt
index 33cc8e2bb..4aa2d8f10 100644
--- a/app/codec/oiio/CMakeLists.txt
+++ b/app/codec/oiio/CMakeLists.txt
@@ -15,10 +15,10 @@
# along with this program. If not, see .
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
)
diff --git a/app/codec/oiio/oiiodecoder.cpp b/app/codec/oiio/oiiodecoder.cpp
index 60b2e9c98..76f03fa12 100644
--- a/app/codec/oiio/oiiodecoder.cpp
+++ b/app/codec/oiio/oiiodecoder.cpp
@@ -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;
}
diff --git a/app/codec/oiio/oiiodecoder.h b/app/codec/oiio/oiiodecoder.h
index 4029e173c..662626173 100644
--- a/app/codec/oiio/oiiodecoder.h
+++ b/app/codec/oiio/oiiodecoder.h
@@ -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:
diff --git a/app/codec/proxymanager.cpp b/app/codec/proxymanager.cpp
index 8ddad7bc7..84c09a731 100644
--- a/app/codec/proxymanager.cpp
+++ b/app/codec/proxymanager.cpp
@@ -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));
diff --git a/app/codec/proxymanager.h b/app/codec/proxymanager.h
index ff6cb1a48..0b59925ec 100644
--- a/app/codec/proxymanager.h
+++ b/app/codec/proxymanager.h
@@ -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:
diff --git a/app/codec/timecodemetadata.cpp b/app/codec/timecodemetadata.cpp
index ebaa92088..c884cf3f0 100644
--- a/app/codec/timecodemetadata.cpp
+++ b/app/codec/timecodemetadata.cpp
@@ -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(std::numeric_limits::max());
if (numerator <= rational_limit && denominator <= rational_limit) {
- result.time =
- core::rational(static_cast(numerator),
- static_cast(denominator));
+ result.time = core::rational(static_cast(numerator),
+ static_cast(denominator));
} else {
result.time = core::rational::fromDouble(
static_cast(samples) / static_cast(sample_rate));
diff --git a/app/common/CMakeLists.txt b/app/common/CMakeLists.txt
index e09f1fce6..36c838363 100644
--- a/app/common/CMakeLists.txt
+++ b/app/common/CMakeLists.txt
@@ -16,42 +16,42 @@
# along with this program. If not, see .
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
)
diff --git a/app/common/Current.h b/app/common/Current.h
index 8b6a50914..312b4eb77 100644
--- a/app/common/Current.h
+++ b/app/common/Current.h
@@ -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 cache)
+ void
+ setPluginCache(std::shared_ptr cache)
{
plugin_cache_ = cache;
}
+
private:
static Current current;
olive::VideoParams currentVideoParams_;
@@ -85,6 +87,4 @@ private:
std::shared_ptr plugin_cache_;
};
-
-
#endif //CURRENT_H
diff --git a/app/config/CMakeLists.txt b/app/config/CMakeLists.txt
index 7e1a01dd8..5c841a89c 100644
--- a/app/config/CMakeLists.txt
+++ b/app/config/CMakeLists.txt
@@ -15,8 +15,8 @@
# along with this program. If not, see .
set(OLIVE_SOURCES
- ${OLIVE_SOURCES}
- config/config.h
- config/config.cpp
- PARENT_SCOPE
+ ${OLIVE_SOURCES}
+ config/config.h
+ config/config.cpp
+ PARENT_SCOPE
)
diff --git a/app/config/config.cpp b/app/config/config.cpp
index 750bb9a80..8b248de11 100644
--- a/app/config/config.cpp
+++ b/app/config/config.cpp
@@ -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"),
diff --git a/app/core.cpp b/app/core.cpp
index 45fda3ce9..45e77d3f5 100644
--- a/app/core.cpp
+++ b/app/core.cpp
@@ -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()) {
diff --git a/app/crashhandler/CMakeLists.txt b/app/crashhandler/CMakeLists.txt
index 11b7009d5..ff0b07a68 100644
--- a/app/crashhandler/CMakeLists.txt
+++ b/app/crashhandler/CMakeLists.txt
@@ -16,10 +16,10 @@
# Create crash handler executable
add_executable(
- olive-crashhandler
- crashhandler.cpp
- crashhandler.h
- $
+ olive-crashhandler
+ crashhandler.cpp
+ crashhandler.h
+ $
)
# 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 $ $
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CRASHPAD_LIBRARY_DIRS}/${CRASHPAD_HANDLER} $
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BREAKPAD_BIN_DIR}/${MINIDUMP_STACKWALK} $
- )
-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 $ $
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CRASHPAD_LIBRARY_DIRS}/${CRASHPAD_HANDLER} $
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BREAKPAD_BIN_DIR}/${MINIDUMP_STACKWALK} $
+ )
+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})
diff --git a/app/crashhandler/crashhandler.cpp b/app/crashhandler/crashhandler.cpp
index aac3b3d99..70fa7c42b 100644
--- a/app/crashhandler/crashhandler.cpp
+++ b/app/crashhandler/crashhandler.cpp
@@ -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);
diff --git a/app/dialog/CMakeLists.txt b/app/dialog/CMakeLists.txt
index f5c628f91..adaf11b49 100644
--- a/app/dialog/CMakeLists.txt
+++ b/app/dialog/CMakeLists.txt
@@ -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
)
diff --git a/app/dialog/about/CMakeLists.txt b/app/dialog/about/CMakeLists.txt
index 6a764829f..ba9e54939 100644
--- a/app/dialog/about/CMakeLists.txt
+++ b/app/dialog/about/CMakeLists.txt
@@ -15,11 +15,11 @@
# along with this program. If not, see .
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
)
diff --git a/app/dialog/about/about.cpp b/app/dialog/about/about.cpp
index 8aa38b1de..d13114249 100644
--- a/app/dialog/about/about.cpp
+++ b/app/dialog/about/about.cpp
@@ -66,12 +66,13 @@ AboutDialog::AboutDialog(bool welcome_dialog, QWidget *parent)
"%3
" // Description
"%4
" // Fork notice
"