From 37f5e4dfbf398cf70a83855c7252c03b236b7dc6 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Tue, 27 Apr 2021 16:19:31 -0400 Subject: [PATCH 1/5] Settings: Support LIBOPENSHOT_DEBUG envvar - Setting LIBOPENSHOT_DEBUG to any value in the process environment activates debug logging to stderr. --- src/Settings.cpp | 9 ++++++--- src/Settings.h | 14 +------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/Settings.cpp b/src/Settings.cpp index cfbe2e2c..688eaae3 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -28,14 +28,14 @@ * along with OpenShot Library. If not, see . */ +#include // For std::getenv + #include "Settings.h" -using namespace std; using namespace openshot; - // Global reference to Settings -Settings *Settings::m_pInstance = NULL; +Settings *Settings::m_pInstance = nullptr; // Create or Get an instance of the settings singleton Settings *Settings::Instance() @@ -53,6 +53,9 @@ Settings *Settings::Instance() m_pInstance->HW_EN_DEVICE_SET = 0; m_pInstance->PLAYBACK_AUDIO_DEVICE_NAME = ""; m_pInstance->DEBUG_TO_STDERR = false; + auto env_debug = std::getenv("LIBOPENSHOT_DEBUG"); + if (env_debug != nullptr) + m_pInstance->DEBUG_TO_STDERR = true; } return m_pInstance; diff --git a/src/Settings.h b/src/Settings.h index 36ba2917..e21822a0 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -31,19 +31,7 @@ #ifndef OPENSHOT_SETTINGS_H #define OPENSHOT_SETTINGS_H - -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include - namespace openshot { @@ -118,7 +106,7 @@ namespace openshot { /// The current install path of OpenShot (needs to be set when using Timeline(path), since certain /// paths depend on the location of OpenShot transitions and files) std::string PATH_OPENSHOT_INSTALL = ""; - + /// Whether to dump ZeroMQ debug messages to stderr bool DEBUG_TO_STDERR = false; From 266455c6a2fdf48abcff9c643309de4c2809bc7d Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 14 May 2021 21:56:18 -0400 Subject: [PATCH 2/5] Settings: Unit test LIBOPENSHOT_DEBUG envvar --- tests/CMakeLists.txt | 17 +++++++++++++++++ tests/Settings.cpp | 13 +++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6c5c6d51..f519856b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -24,6 +24,11 @@ # along with OpenShot Library. If not, see . ################################################################################ +# Allow spaces in test names +if(POLICY CMP0110) + cmake_policy(SET CMP0110 NEW) +endif() + # Test media path, used by unit tests for input data file(TO_NATIVE_PATH "${PROJECT_SOURCE_DIR}/examples/" TEST_MEDIA_PATH) @@ -103,6 +108,18 @@ foreach(tname ${OPENSHOT_TESTS}) list(APPEND CATCH2_TEST_TARGETS openshot-${tname}-test) list(APPEND CATCH2_TEST_NAMES ${tname}) endforeach() +# Add an additional special-case test, for an envvar-dependent setting +add_test(NAME [=["Settings:Debug logging (enabled)"]=] + COMMAND + openshot-Settings-test "[environment]" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) +set_tests_properties([=["Settings:Debug logging (enabled)"]=] + PROPERTIES + LABELS Settings + ENVIRONMENT "LIBOPENSHOT_DEBUG=1" +) + # Export target list for coverage use set(UNIT_TEST_TARGETS ${CATCH2_TEST_TARGETS} PARENT_SCOPE) set(UNIT_TEST_NAMES ${CATCH2_TEST_NAMES} PARENT_SCOPE) diff --git a/tests/Settings.cpp b/tests/Settings.cpp index e974ffd4..13239819 100644 --- a/tests/Settings.cpp +++ b/tests/Settings.cpp @@ -34,7 +34,7 @@ using namespace openshot; -TEST_CASE( "Default_Constructor", "[libopenshot][settings]" ) +TEST_CASE( "Constructor", "[libopenshot][settings]" ) { // Create an empty color Settings *s = Settings::Instance(); @@ -43,7 +43,7 @@ TEST_CASE( "Default_Constructor", "[libopenshot][settings]" ) CHECK_FALSE(s->HIGH_QUALITY_SCALING); } -TEST_CASE( "Change_Settings", "[libopenshot][settings]" ) +TEST_CASE( "Change settings", "[libopenshot][settings]" ) { // Create an empty color Settings *s = Settings::Instance(); @@ -56,3 +56,12 @@ TEST_CASE( "Change_Settings", "[libopenshot][settings]" ) CHECK(Settings::Instance()->OMP_THREADS == 8); CHECK(Settings::Instance()->HIGH_QUALITY_SCALING == true); } + +TEST_CASE( "Debug logging", "[libopenshot][settings][environment]") +{ + // Check the environment + auto envvar = std::getenv("LIBOPENSHOT_DEBUG"); + const auto is_enabled = bool(envvar != nullptr); + + CHECK(Settings::Instance()->DEBUG_TO_STDERR == is_enabled); +} From 97c25300a6242a18d22f537c4555788439be3b1d Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 14 May 2021 22:49:51 -0400 Subject: [PATCH 3/5] CMake: VERBOSE_TESTS option (default off) --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d191757a..3ca96ed9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,7 @@ option(DISABLE_BUNDLED_JSONCPP "Don't fall back to bundled JsonCpp" OFF) option(ENABLE_IWYU "Enable 'Include What You Use' scanner (CMake 3.3+)" OFF) option(ENABLE_PARALLEL_CTEST "Run CTest using multiple processors" ON) +option(VERBOSE_TESTS "Run CTest with maximum verbosity" OFF) option(ENABLE_COVERAGE "Scan test coverage using gcov and report" OFF) option(ENABLE_DOCS "Build API documentation (requires Doxygen)" ON) @@ -187,9 +188,12 @@ if(BUILD_TESTING) ProcessorCount(CPU_COUNT) if(CPU_COUNT GREATER 1) add_feature_info("Parallel tests" TRUE "Unit tests can use ${CPU_COUNT} processors") - set(CTEST_OPTIONS "-j${CPU_COUNT}") + list(APPEND CTEST_OPTIONS "-j${CPU_COUNT}") endif() endif() + if(VERBOSE_TESTS) + list(APPEND CTEST_OPTIONS "-VV") + endif() add_subdirectory(tests) endif() add_feature_info("Unit tests" ${BUILD_TESTING} "Compile unit tests for library functions") From 441cb186f6617425e5f8c89e33a512ac49411698 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Tue, 18 May 2021 14:25:36 -0500 Subject: [PATCH 4/5] Refactor of global timeline effects, to address a regression with global/timeline Mask/Transitions no longer working correctly. This was caused by an optimization that broke the general behavior of the global transitions. --- src/Clip.cpp | 36 +++++++++++++++++++++++++++++++++--- src/Clip.h | 29 ++++++++++++++++++++++------- src/Timeline.cpp | 20 ++++++++++---------- src/Timeline.h | 8 ++++---- src/TimelineBase.h | 17 +++++++++++++++++ 5 files changed, 86 insertions(+), 24 deletions(-) diff --git a/src/Clip.cpp b/src/Clip.cpp index a57b2836..794f8874 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -335,15 +335,36 @@ std::shared_ptr Clip::GetFrame(int64_t frame_number) // Get the original frame and pass it to GetFrame overload std::shared_ptr original_frame = GetOrCreateFrame(frame_number); - return GetFrame(original_frame, frame_number); + return GetFrame(original_frame, frame_number, NULL); } else // Throw error if reader not initialized throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method."); } -// Use an existing openshot::Frame object and draw this Clip's frame onto it +// Create an openshot::Frame object for a specific frame number of this reader. std::shared_ptr Clip::GetFrame(std::shared_ptr background_frame, int64_t frame_number) +{ + // Check for open reader (or throw exception) + if (!is_open) + throw ReaderClosed("The Clip is closed. Call Open() before calling this method."); + + if (reader) + { + // Adjust out of bounds frame number + frame_number = adjust_frame_number_minimum(frame_number); + + // Get the original frame and pass it to GetFrame overload + std::shared_ptr original_frame = GetOrCreateFrame(frame_number); + return GetFrame(original_frame, frame_number, NULL); + } + else + // Throw error if reader not initialized + throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method."); +} + +// Use an existing openshot::Frame object and draw this Clip's frame onto it +std::shared_ptr Clip::GetFrame(std::shared_ptr background_frame, int64_t frame_number, openshot::TimelineInfoStruct* options) { // Check for open reader (or throw exception) if (!is_open) @@ -367,9 +388,18 @@ std::shared_ptr Clip::GetFrame(std::shared_ptr backgroun // TODO: Handle variable # of samples, since this resamples audio for different speeds (only when time curve is set) get_time_mapped_frame(original_frame, new_frame_number); - // Apply effects to the frame (if any) + // Apply local effects to the frame (if any) apply_effects(original_frame); + // Apply global timeline effects (i.e. transitions & masks... if any) + if (timeline != NULL && options != NULL) { + if (options->is_top_clip) { + // Apply global timeline effects (only to top clip... if overlapping) + Timeline* timeline_instance = (Timeline*) timeline; + original_frame = timeline_instance->apply_effects(original_frame, options->timeline_frame_number, Layer()); + } + } + // Apply keyframe / transforms apply_keyframes(original_frame, background_frame->GetImage()); diff --git a/src/Clip.h b/src/Clip.h index 818d8f7c..adb168bd 100644 --- a/src/Clip.h +++ b/src/Clip.h @@ -214,25 +214,40 @@ namespace openshot { /// Look up an effect by ID openshot::EffectBase* GetEffect(const std::string& id); - /// @brief Get an openshot::Frame object for a specific frame number of this timeline. The image size and number + /// @brief Get an openshot::Frame object for a specific frame number of this clip. The image size and number /// of samples match the source reader. /// /// @returns A new openshot::Frame object - /// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline. + /// @param frame_number The frame number (starting at 1) of the clip std::shared_ptr GetFrame(int64_t frame_number) override; - /// @brief Get an openshot::Frame object for a specific frame number of this timeline. The image size and number - /// of samples can be customized to match the Timeline, or any custom output. Extra samples will be moved to the - /// next Frame. Missing samples will be moved from the next Frame. + /// @brief Get an openshot::Frame object for a specific frame number of this clip. The image size and number + /// of samples match the background_frame passed in and the timeline (if available). /// /// A new openshot::Frame objects is returned, based on a copy from the source image, with all keyframes and clip effects - /// rendered. + /// rendered/rasterized. /// /// @returns The modified openshot::Frame object /// @param background_frame The frame object to use as a background canvas (i.e. an existing Timeline openshot::Frame instance) - /// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline. + /// @param frame_number The frame number (starting at 1) of the clip. The image size and number + /// of samples match the background_frame passed in and the timeline (if available) std::shared_ptr GetFrame(std::shared_ptr background_frame, int64_t frame_number); + /// @brief Get an openshot::Frame object for a specific frame number of this clip. The image size and number + /// of samples match the background_frame passed in and the timeline (if available). + /// + /// A new openshot::Frame objects is returned, based on a copy from the source image, with all keyframes and clip effects + /// rendered/rasterized. + /// + /// @returns The modified openshot::Frame object + /// @param background_frame The frame object to use as a background canvas (i.e. an existing Timeline openshot::Frame instance) + /// @param frame_number The frame number (starting at 1) of the clip on the timeline. The image size and number + /// of samples match the timeline. + /// @param options The openshot::TimelineInfoStruct pointer, with more details about this specific timeline clip, + /// such as, if it's a top clip, and what the absolute timeline frame number is. This info is used to apply global + /// transitions and masks, if needed. + std::shared_ptr GetFrame(std::shared_ptr background_frame, int64_t frame_number, openshot::TimelineInfoStruct* options); + /// Open the internal reader void Open() override; diff --git a/src/Timeline.cpp b/src/Timeline.cpp index e48b94c7..c038ee1d 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -444,7 +444,7 @@ std::shared_ptr Timeline::apply_effects(std::shared_ptr frame, int } // Get or generate a blank frame -std::shared_ptr Timeline::GetOrCreateFrame(std::shared_ptr background_frame, Clip* clip, int64_t number) +std::shared_ptr Timeline::GetOrCreateFrame(std::shared_ptr background_frame, Clip* clip, int64_t number, openshot::TimelineInfoStruct* options) { std::shared_ptr new_frame; @@ -456,7 +456,7 @@ std::shared_ptr Timeline::GetOrCreateFrame(std::shared_ptr backgro ZmqLogger::Instance()->AppendDebugMethod("Timeline::GetOrCreateFrame (from reader)", "number", number, "samples_in_frame", samples_in_frame); // Attempt to get a frame (but this could fail if a reader has just been closed) - new_frame = std::shared_ptr(clip->GetFrame(background_frame, number)); + new_frame = std::shared_ptr(clip->GetFrame(background_frame, number, options)); // Return real frame return new_frame; @@ -477,9 +477,15 @@ std::shared_ptr Timeline::GetOrCreateFrame(std::shared_ptr backgro // Process a new layer of video or audio void Timeline::add_layer(std::shared_ptr new_frame, Clip* source_clip, int64_t clip_frame_number, int64_t timeline_frame_number, bool is_top_clip, float max_volume) { - // Get the clip's frame, composited on top of the current timeline frame + // Create timeline options (with details about this current frame request) + TimelineInfoStruct* options = new TimelineInfoStruct(); + options->timeline_frame_number = timeline_frame_number; + options->is_top_clip = is_top_clip; + + // Get the clip's frame, composited on top of the current timeline frame std::shared_ptr source_frame; - source_frame = GetOrCreateFrame(new_frame, source_clip, clip_frame_number); + source_frame = GetOrCreateFrame(new_frame, source_clip, clip_frame_number, options); + delete options; // No frame found... so bail if (!source_frame) @@ -488,12 +494,6 @@ void Timeline::add_layer(std::shared_ptr new_frame, Clip* source_clip, in // Debug output ZmqLogger::Instance()->AppendDebugMethod("Timeline::add_layer", "new_frame->number", new_frame->number, "clip_frame_number", clip_frame_number, "timeline_frame_number", timeline_frame_number); - /* Apply effects to the source frame (if any). If multiple clips are overlapping, only process the - * effects on the top clip. */ - if (is_top_clip) { - source_frame = apply_effects(source_frame, timeline_frame_number, source_clip->Layer()); - } - /* COPY AUDIO - with correct volume */ if (source_clip->Reader()->info.has_audio) { // Debug output diff --git a/src/Timeline.h b/src/Timeline.h index e1c819e6..6329eb12 100644 --- a/src/Timeline.h +++ b/src/Timeline.h @@ -198,10 +198,7 @@ namespace openshot { std::vector find_intersecting_clips(int64_t requested_frame, int number_of_frames, bool include); /// Get a clip's frame or generate a blank frame - std::shared_ptr GetOrCreateFrame(std::shared_ptr background_frame, openshot::Clip* clip, int64_t number); - - /// Apply effects to the source frame (if any) - std::shared_ptr apply_effects(std::shared_ptr frame, int64_t timeline_frame_number, int layer); + std::shared_ptr GetOrCreateFrame(std::shared_ptr background_frame, openshot::Clip* clip, int64_t number, openshot::TimelineInfoStruct* options); /// Compare 2 floating point numbers for equality bool isEqual(double a, double b); @@ -249,6 +246,9 @@ namespace openshot { /// @param effect Add an effect to the timeline. An effect can modify the audio or video of an openshot::Frame. void AddEffect(openshot::EffectBase* effect); + /// Apply global/timeline effects to the source frame (if any) + std::shared_ptr apply_effects(std::shared_ptr frame, int64_t timeline_frame_number, int layer); + /// Apply the timeline's framerate and samplerate to all clips void ApplyMapperToClips(); diff --git a/src/TimelineBase.h b/src/TimelineBase.h index af6a65a2..307c18c2 100644 --- a/src/TimelineBase.h +++ b/src/TimelineBase.h @@ -31,8 +31,25 @@ #ifndef OPENSHOT_TIMELINE_BASE_H #define OPENSHOT_TIMELINE_BASE_H +#include + namespace openshot { + /** + * @brief This struct contains info about the current Timeline clip instance + * + * When the Timeline requests an openshot::Frame instance from a Clip, it passes + * this struct along, with some additional details from the Timeline, such as the absolute + * timeline frame number requested, and if this clip is above or below overlapping clips, etc... + * This info can help determine if a Clip should apply global effects from the Timeline, such + * as a global Transition/Mask effect. + */ + struct TimelineInfoStruct + { + int64_t timeline_frame_number; ///< The absolute frame number from the timeline we are requesting + bool is_top_clip; ///< Is clip on top (if overlapping another clip) + }; + /** * @brief This class represents a timeline (used for building generic timeline implementations) */ From a505f875d1763cd1ca358bdc2c33d4ff86bc29fc Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 20 May 2021 13:15:13 -0500 Subject: [PATCH 5/5] Refactoring timeline_frame_number out of apply_layer() and TimelineInfoStruct, we already have this data in scope (on the background frame instance) --- src/Clip.cpp | 4 ++-- src/Clip.h | 4 +--- src/Timeline.cpp | 11 +++++------ src/Timeline.h | 2 +- src/TimelineBase.h | 8 +++----- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/Clip.cpp b/src/Clip.cpp index 794f8874..92fff2c3 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -394,9 +394,9 @@ std::shared_ptr Clip::GetFrame(std::shared_ptr backgroun // Apply global timeline effects (i.e. transitions & masks... if any) if (timeline != NULL && options != NULL) { if (options->is_top_clip) { - // Apply global timeline effects (only to top clip... if overlapping) + // Apply global timeline effects (only to top clip... if overlapping, pass in timeline frame number) Timeline* timeline_instance = (Timeline*) timeline; - original_frame = timeline_instance->apply_effects(original_frame, options->timeline_frame_number, Layer()); + original_frame = timeline_instance->apply_effects(original_frame, background_frame->number, Layer()); } } diff --git a/src/Clip.h b/src/Clip.h index adb168bd..5014bcc7 100644 --- a/src/Clip.h +++ b/src/Clip.h @@ -164,7 +164,6 @@ namespace openshot { void reverse_buffer(juce::AudioSampleBuffer* buffer); - public: openshot::GravityType gravity; ///< The gravity of a clip determines where it snaps to its parent openshot::ScaleType scale; ///< The scale determines how a clip should be resized to fit its parent @@ -244,8 +243,7 @@ namespace openshot { /// @param frame_number The frame number (starting at 1) of the clip on the timeline. The image size and number /// of samples match the timeline. /// @param options The openshot::TimelineInfoStruct pointer, with more details about this specific timeline clip, - /// such as, if it's a top clip, and what the absolute timeline frame number is. This info is used to apply global - /// transitions and masks, if needed. + /// such as, if it's a top clip. This info is used to apply global transitions and masks, if needed. std::shared_ptr GetFrame(std::shared_ptr background_frame, int64_t frame_number, openshot::TimelineInfoStruct* options); /// Open the internal reader diff --git a/src/Timeline.cpp b/src/Timeline.cpp index c038ee1d..f7e5f440 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -475,11 +475,10 @@ std::shared_ptr Timeline::GetOrCreateFrame(std::shared_ptr backgro } // Process a new layer of video or audio -void Timeline::add_layer(std::shared_ptr new_frame, Clip* source_clip, int64_t clip_frame_number, int64_t timeline_frame_number, bool is_top_clip, float max_volume) +void Timeline::add_layer(std::shared_ptr new_frame, Clip* source_clip, int64_t clip_frame_number, bool is_top_clip, float max_volume) { // Create timeline options (with details about this current frame request) TimelineInfoStruct* options = new TimelineInfoStruct(); - options->timeline_frame_number = timeline_frame_number; options->is_top_clip = is_top_clip; // Get the clip's frame, composited on top of the current timeline frame @@ -492,12 +491,12 @@ void Timeline::add_layer(std::shared_ptr new_frame, Clip* source_clip, in return; // Debug output - ZmqLogger::Instance()->AppendDebugMethod("Timeline::add_layer", "new_frame->number", new_frame->number, "clip_frame_number", clip_frame_number, "timeline_frame_number", timeline_frame_number); + ZmqLogger::Instance()->AppendDebugMethod("Timeline::add_layer", "new_frame->number", new_frame->number, "clip_frame_number", clip_frame_number); /* COPY AUDIO - with correct volume */ if (source_clip->Reader()->info.has_audio) { // Debug output - ZmqLogger::Instance()->AppendDebugMethod("Timeline::add_layer (Copy Audio)", "source_clip->Reader()->info.has_audio", source_clip->Reader()->info.has_audio, "source_frame->GetAudioChannelsCount()", source_frame->GetAudioChannelsCount(), "info.channels", info.channels, "clip_frame_number", clip_frame_number, "timeline_frame_number", timeline_frame_number); + ZmqLogger::Instance()->AppendDebugMethod("Timeline::add_layer (Copy Audio)", "source_clip->Reader()->info.has_audio", source_clip->Reader()->info.has_audio, "source_frame->GetAudioChannelsCount()", source_frame->GetAudioChannelsCount(), "info.channels", info.channels, "clip_frame_number", clip_frame_number); if (source_frame->GetAudioChannelsCount() == info.channels && source_clip->has_audio.GetInt(clip_frame_number) != 0) for (int channel = 0; channel < source_frame->GetAudioChannelsCount(); channel++) @@ -550,7 +549,7 @@ void Timeline::add_layer(std::shared_ptr new_frame, Clip* source_clip, in } else // Debug output - ZmqLogger::Instance()->AppendDebugMethod("Timeline::add_layer (No Audio Copied - Wrong # of Channels)", "source_clip->Reader()->info.has_audio", source_clip->Reader()->info.has_audio, "source_frame->GetAudioChannelsCount()", source_frame->GetAudioChannelsCount(), "info.channels", info.channels, "clip_frame_number", clip_frame_number, "timeline_frame_number", timeline_frame_number); + ZmqLogger::Instance()->AppendDebugMethod("Timeline::add_layer (No Audio Copied - Wrong # of Channels)", "source_clip->Reader()->info.has_audio", source_clip->Reader()->info.has_audio, "source_frame->GetAudioChannelsCount()", source_frame->GetAudioChannelsCount(), "info.channels", info.channels, "clip_frame_number", clip_frame_number); } // Debug output @@ -753,7 +752,7 @@ std::shared_ptr Timeline::GetFrame(int64_t requested_frame) ZmqLogger::Instance()->AppendDebugMethod("Timeline::GetFrame (Calculate clip's frame #)", "clip->Position()", clip->Position(), "clip->Start()", clip->Start(), "info.fps.ToFloat()", info.fps.ToFloat(), "clip_frame_number", clip_frame_number); // Add clip's frame as layer - add_layer(new_frame, clip, clip_frame_number, requested_frame, is_top_clip, max_volume); + add_layer(new_frame, clip, clip_frame_number, is_top_clip, max_volume); } else { // Debug output diff --git a/src/Timeline.h b/src/Timeline.h index 6329eb12..3b3b49c3 100644 --- a/src/Timeline.h +++ b/src/Timeline.h @@ -175,7 +175,7 @@ namespace openshot { int max_concurrent_frames; ///< Max concurrent frames to process at one time /// Process a new layer of video or audio - void add_layer(std::shared_ptr new_frame, openshot::Clip* source_clip, int64_t clip_frame_number, int64_t timeline_frame_number, bool is_top_clip, float max_volume); + void add_layer(std::shared_ptr new_frame, openshot::Clip* source_clip, int64_t clip_frame_number, bool is_top_clip, float max_volume); /// Apply a FrameMapper to a clip which matches the settings of this timeline void apply_mapper_to_clip(openshot::Clip* clip); diff --git a/src/TimelineBase.h b/src/TimelineBase.h index 307c18c2..6a8d0762 100644 --- a/src/TimelineBase.h +++ b/src/TimelineBase.h @@ -39,14 +39,12 @@ namespace openshot { * @brief This struct contains info about the current Timeline clip instance * * When the Timeline requests an openshot::Frame instance from a Clip, it passes - * this struct along, with some additional details from the Timeline, such as the absolute - * timeline frame number requested, and if this clip is above or below overlapping clips, etc... - * This info can help determine if a Clip should apply global effects from the Timeline, such - * as a global Transition/Mask effect. + * this struct along, with some additional details from the Timeline, such as if this clip is + * above or below overlapping clips, etc... This info can help determine if a Clip should apply + * global effects from the Timeline, such as a global Transition/Mask effect. */ struct TimelineInfoStruct { - int64_t timeline_frame_number; ///< The absolute frame number from the timeline we are requesting bool is_top_clip; ///< Is clip on top (if overlapping another clip) };