From 4133f675de894a59d80fb2cdbe5044d407a988e5 Mon Sep 17 00:00:00 2001 From: Wasim Afser <46491838+wasimafser@users.noreply.github.com> Date: Fri, 14 May 2021 17:38:03 +0530 Subject: [PATCH 001/114] fix cmake instructions using '-d' argument --- doc/INSTALL-MAC.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/INSTALL-MAC.md b/doc/INSTALL-MAC.md index ac0c7f7c..5bc9b521 100644 --- a/doc/INSTALL-MAC.md +++ b/doc/INSTALL-MAC.md @@ -155,10 +155,10 @@ few additional steps to manually build and install it. Launch a terminal and ent cd [libopenshot-audio repo folder] mkdir build cd build -cmake -d -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ../ (CLang must be used due to GNU incompatible Objective-C code in some of the Apple frameworks) +cmake --debug-output -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ../ (CLang must be used due to GNU incompatible Objective-C code in some of the Apple frameworks) make make install -./src/openshot-audio-test-sound (This should play a test sound) +./src/openshot-audio-demo (This should play a test sound) ``` ## Mac Build Instructions (libopenshot) @@ -168,7 +168,7 @@ Run the following commands to build libopenshot: $ cd [libopenshot repo folder] $ mkdir build $ cd build -$ cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc48/bin/g++-4.8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc48/bin/gcc-4.8 -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.4.2/ -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.3/include/python3.3m/ -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.3/lib/libpython3.3.dylib -DPython_FRAMEWORKS=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/ ../ -D"CMAKE_BUILD_TYPE:STRING=Debug" +$ cmake --debug-output -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc48/bin/g++-4.8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc48/bin/gcc-4.8 -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.4.2/ -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.3/include/python3.3m/ -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.3/lib/libpython3.3.dylib -DPython_FRAMEWORKS=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/ ../ -D"CMAKE_BUILD_TYPE:STRING=Debug" ``` The extra arguments on the cmake command make sure the compiler will be gcc4.8 and that cmake From f443c99194f5fd7fc9bc3e5c04054d7560d98314 Mon Sep 17 00:00:00 2001 From: Wasim Afser <46491838+wasimafser@users.noreply.github.com> Date: Sun, 16 May 2021 10:14:27 +0530 Subject: [PATCH 002/114] merge suggestions from ferdnyc * change code snippets to have a copy-paste friendly syntax * use clang++/clang for building libopenshot * use location provided by brew using --cellar --- doc/INSTALL-MAC.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/INSTALL-MAC.md b/doc/INSTALL-MAC.md index 5bc9b521..8418ee1d 100644 --- a/doc/INSTALL-MAC.md +++ b/doc/INSTALL-MAC.md @@ -151,11 +151,12 @@ brew install zeromq Since libopenshot-audio is not available in a Homebrew or MacPorts package, we need to go through a few additional steps to manually build and install it. Launch a terminal and enter: -``` +```zsh cd [libopenshot-audio repo folder] mkdir build cd build -cmake --debug-output -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ../ (CLang must be used due to GNU incompatible Objective-C code in some of the Apple frameworks) +# (CLang must be used due to GNU incompatible Objective-C code in some of the Apple frameworks) +cmake --debug-output -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ../ make make install ./src/openshot-audio-demo (This should play a test sound) @@ -164,11 +165,11 @@ make install ## Mac Build Instructions (libopenshot) Run the following commands to build libopenshot: -``` -$ cd [libopenshot repo folder] -$ mkdir build -$ cd build -$ cmake --debug-output -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc48/bin/g++-4.8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc48/bin/gcc-4.8 -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.4.2/ -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.3/include/python3.3m/ -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.3/lib/libpython3.3.dylib -DPython_FRAMEWORKS=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/ ../ -D"CMAKE_BUILD_TYPE:STRING=Debug" +```zsh +cd [libopenshot repo folder] +mkdir build +cd build +cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_PREFIX_PATH="$(brew --cellar qt5)/" -DPython_FRAMEWORKS="$(brew --cellar python3)//Frameworks/Python.framework/" ../ -D"CMAKE_BUILD_TYPE:STRING=Debug" ``` The extra arguments on the cmake command make sure the compiler will be gcc4.8 and that cmake From 2257aec524130659a5ea4aca7dbe086128b2e02b Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 10 Jun 2021 08:00:30 -0400 Subject: [PATCH 003/114] Timeline/Base: Fix Clips() inheritance --- src/Timeline.cpp | 22 +++++++++++----------- src/Timeline.h | 6 +++--- src/TimelineBase.cpp | 14 ++------------ src/TimelineBase.h | 6 +++++- 4 files changed, 21 insertions(+), 27 deletions(-) diff --git a/src/Timeline.cpp b/src/Timeline.cpp index c2aea38d..aea9595c 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -88,9 +88,9 @@ Timeline::Timeline(int width, int height, Fraction fps, int sample_rate, int cha } // Delegating constructor that copies parameters from a provided ReaderInfo -Timeline::Timeline(const ReaderInfo info) : - Timeline::Timeline(info.width, info.height, info.fps, info.sample_rate, - info.channels, info.channel_layout) {}; +Timeline::Timeline(const ReaderInfo info) : Timeline::Timeline( + info.width, info.height, info.fps, info.sample_rate, + info.channels, info.channel_layout) {} // Constructor for the timeline (which loads a JSON structure from a file path, and initializes a timeline) Timeline::Timeline(const std::string& projectPath, bool convert_absolute_paths) : @@ -243,7 +243,7 @@ Timeline::~Timeline() { } } -// Add to the tracked_objects map a pointer to a tracked object (TrackedObjectBBox) +// Add to the tracked_objects map a pointer to a tracked object (TrackedObjectBBox) void Timeline::AddTrackedObject(std::shared_ptr trackedObject){ // Search for the tracked object on the map @@ -252,7 +252,7 @@ void Timeline::AddTrackedObject(std::shared_ptr tra if (iterator != tracked_objects.end()){ // Tracked object's id already present on the map, overwrite it iterator->second = trackedObject; - } + } else{ // Tracked object's id not present -> insert it on the map tracked_objects[trackedObject->Id()] = trackedObject; @@ -275,7 +275,7 @@ std::shared_ptr Timeline::GetTrackedObject(std::str else { // Id not found, return a null pointer return nullptr; - } + } } // Return the ID's of the tracked objects as a list of strings @@ -322,7 +322,7 @@ std::string Timeline::GetTrackedObjectValues(std::string id, int64_t frame_numbe trackedObjectJson["x2"] = x2; trackedObjectJson["y2"] = y2; trackedObjectJson["rotation"] = rotation; - + } else { BBox box = trackedObject->BoxVec.begin()->second; float x1 = box.cx - (box.width/2); @@ -346,7 +346,7 @@ std::string Timeline::GetTrackedObjectValues(std::string id, int64_t frame_numbe trackedObjectJson["x2"] = 0; trackedObjectJson["y2"] = 0; trackedObjectJson["rotation"] = 0; - } + } return trackedObjectJson.toStyledString(); } @@ -444,7 +444,7 @@ std::list Timeline::ClipEffects() const { // Loop through all clips for (const auto& clip : clips) { - + // Get the clip's list of effects std::list clipEffectsList = clip->Effects(); @@ -1063,7 +1063,7 @@ void Timeline::SetJsonValue(const Json::Value root) { // When a clip is attached to an object, it searches for the object // on it's parent timeline. Setting the parent timeline of the clip here // allows attaching it to an object when exporting the project (because) - // the exporter script initializes the clip and it's effects + // the exporter script initializes the clip and it's effects // before setting it's parent timeline. c->ParentTimeline(this); @@ -1533,4 +1533,4 @@ void Timeline::SetMaxSize(int width, int height) { // Update timeline cache size final_cache->SetMaxBytesFromInfo(max_concurrent_frames * 4, preview_width, preview_height, info.sample_rate, info.channels); -} \ No newline at end of file +} diff --git a/src/Timeline.h b/src/Timeline.h index 3a696bfa..65d79289 100644 --- a/src/Timeline.h +++ b/src/Timeline.h @@ -181,7 +181,7 @@ namespace openshot { int max_concurrent_frames; ///< Max concurrent frames to process at one time std::map> tracked_objects; ///< map of TrackedObjectBBoxes and their IDs - + /// 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, bool is_top_clip, float max_volume); @@ -246,7 +246,7 @@ namespace openshot { virtual ~Timeline(); - /// Add to the tracked_objects map a pointer to a tracked object (TrackedObjectBBox) + /// Add to the tracked_objects map a pointer to a tracked object (TrackedObjectBBox) void AddTrackedObject(std::shared_ptr trackedObject); /// Return tracked object pointer by it's id std::shared_ptr GetTrackedObject(std::string id) const; @@ -281,7 +281,7 @@ namespace openshot { void ClearAllCache(); /// Return a list of clips on the timeline - std::list Clips() { return clips; }; + std::list Clips() override { return clips; }; /// Look up a single clip by ID openshot::Clip* GetClip(const std::string& id); diff --git a/src/TimelineBase.cpp b/src/TimelineBase.cpp index 120de01b..12157c52 100644 --- a/src/TimelineBase.cpp +++ b/src/TimelineBase.cpp @@ -34,16 +34,6 @@ using namespace openshot; /// Constructor for the base timeline TimelineBase::TimelineBase() -{ - // Init preview size (default) - preview_width = 1920; - preview_height = 1080; -} + : preview_width(1920), + preview_height(1080) { } -/* This function will be overloaded in the Timeline class passing no arguments -* so we'll be able to access the Timeline::Clips() function from a pointer object of -* the TimelineBase class -*/ -void TimelineBase::Clips(int test){ - return; -} \ No newline at end of file diff --git a/src/TimelineBase.h b/src/TimelineBase.h index 0fc70c74..271383ea 100644 --- a/src/TimelineBase.h +++ b/src/TimelineBase.h @@ -32,9 +32,13 @@ #define OPENSHOT_TIMELINE_BASE_H #include +#include namespace openshot { + // Forward decl + class Clip; + /** * @brief This struct contains info about the current Timeline clip instance * @@ -63,7 +67,7 @@ namespace openshot { /// This function will be overloaded in the Timeline class passing no arguments /// so we'll be able to access the Timeline::Clips() function from a pointer object of /// the TimelineBase class - virtual void Clips(int test); + virtual std::list Clips() = 0; }; } From cd12edac5aee98d867c60969c97a4a5f5bc40bb8 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 10 Jun 2021 08:01:16 -0400 Subject: [PATCH 004/114] tests/Timeline: Test TimelineBase::Clips() --- tests/Timeline.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/Timeline.cpp b/tests/Timeline.cpp index 255727c6..29c1f305 100644 --- a/tests/Timeline.cpp +++ b/tests/Timeline.cpp @@ -271,6 +271,33 @@ TEST_CASE( "Clip order", "[libopenshot][timeline]" ) t.Close(); } +TEST_CASE( "TimelineBase", "[libopenshot][timeline]" ) +{ + // Create a timeline + Timeline t(640, 480, Fraction(30, 1), 44100, 2, LAYOUT_STEREO); + + // Add some clips out of order + std::stringstream path; + path << TEST_MEDIA_PATH << "front3.png"; + Clip clip1(path.str()); + clip1.Layer(1); + t.AddClip(&clip1); + + Clip clip2(path.str()); + clip2.Layer(0); + t.AddClip(&clip2); + + // Verify that the list of clips can be accessed + // through the Clips() method of a TimelineBase* + TimelineBase* base = &t; + auto l = base->Clips(); + CHECK(l.size() == 2); + auto find1 = std::find(l.begin(), l.end(), &clip1); + auto find2 = std::find(l.begin(), l.end(), &clip2); + CHECK(find1 != l.end()); + CHECK(find2 != l.end()); +} + TEST_CASE( "Effect order", "[libopenshot][timeline]" ) { From 2a90aa09a93c62c4b1eeb059cf13f55c12b1fa53 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 19 Apr 2021 20:38:03 -0400 Subject: [PATCH 005/114] ReaderBase: Make DisplayInfo testable - The function now takes a pointer to the output stream it will write to. The _default_ for that argument is a pointer to std::cout. - Any unit tests which wish to test the functionality can capture the output by passing an alternate buffer: std::stringstream output; reader.DisplayInfo(&output); CHECK(output.str() == "Expected output"); --- src/ReaderBase.cpp | 86 ++++++++++++++++++++++-------------------- src/ReaderBase.h | 8 ++-- tests/FFmpegReader.cpp | 46 ++++++++++++++++++---- tests/ReaderBase.cpp | 2 +- 4 files changed, 88 insertions(+), 54 deletions(-) diff --git a/src/ReaderBase.cpp b/src/ReaderBase.cpp index 127fefbe..63b5cada 100644 --- a/src/ReaderBase.cpp +++ b/src/ReaderBase.cpp @@ -28,8 +28,14 @@ * along with OpenShot Library. If not, see . */ +#include +#include +#include + #include "ReaderBase.h" +#include "Json.h" + using namespace openshot; /// Constructor for the base reader, where many things are initialized. @@ -67,49 +73,49 @@ ReaderBase::ReaderBase() } // Display file information -void ReaderBase::DisplayInfo() { - std::cout << std::fixed << std::setprecision(2) << std::boolalpha; - std::cout << "----------------------------" << std::endl; - std::cout << "----- File Information -----" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "--> Has Video: " << info.has_video << std::endl; - std::cout << "--> Has Audio: " << info.has_audio << std::endl; - std::cout << "--> Has Single Image: " << info.has_single_image << std::endl; - std::cout << "--> Duration: " << info.duration << " Seconds" << std::endl; - std::cout << "--> File Size: " << double(info.file_size) / 1024 / 1024 << " MB" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "----- Video Attributes -----" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "--> Width: " << info.width << std::endl; - std::cout << "--> Height: " << info.height << std::endl; - std::cout << "--> Pixel Format: " << info.pixel_format << std::endl; - std::cout << "--> Frames Per Second: " << info.fps.ToDouble() << " (" << info.fps.num << "/" << info.fps.den << ")" << std::endl; - std::cout << "--> Video Bit Rate: " << info.video_bit_rate/1000 << " kb/s" << std::endl; - std::cout << "--> Pixel Ratio: " << info.pixel_ratio.ToDouble() << " (" << info.pixel_ratio.num << "/" << info.pixel_ratio.den << ")" << std::endl; - std::cout << "--> Display Aspect Ratio: " << info.display_ratio.ToDouble() << " (" << info.display_ratio.num << "/" << info.display_ratio.den << ")" << std::endl; - std::cout << "--> Video Codec: " << info.vcodec << std::endl; - std::cout << "--> Video Length: " << info.video_length << " Frames" << std::endl; - std::cout << "--> Video Stream Index: " << info.video_stream_index << std::endl; - std::cout << "--> Video Timebase: " << info.video_timebase.ToDouble() << " (" << info.video_timebase.num << "/" << info.video_timebase.den << ")" << std::endl; - std::cout << "--> Interlaced: " << info.interlaced_frame << std::endl; - std::cout << "--> Interlaced: Top Field First: " << info.top_field_first << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "----- Audio Attributes -----" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "--> Audio Codec: " << info.acodec << std::endl; - std::cout << "--> Audio Bit Rate: " << info.audio_bit_rate/1000 << " kb/s" << std::endl; - std::cout << "--> Sample Rate: " << info.sample_rate << " Hz" << std::endl; - std::cout << "--> # of Channels: " << info.channels << std::endl; - std::cout << "--> Channel Layout: " << info.channel_layout << std::endl; - std::cout << "--> Audio Stream Index: " << info.audio_stream_index << std::endl; - std::cout << "--> Audio Timebase: " << info.audio_timebase.ToDouble() << " (" << info.audio_timebase.num << "/" << info.audio_timebase.den << ")" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "--------- Metadata ---------" << std::endl; - std::cout << "----------------------------" << std::endl; +void ReaderBase::DisplayInfo(std::ostream* out) { + *out << std::fixed << std::setprecision(2) << std::boolalpha; + *out << "----------------------------" << std::endl; + *out << "----- File Information -----" << std::endl; + *out << "----------------------------" << std::endl; + *out << "--> Has Video: " << info.has_video << std::endl; + *out << "--> Has Audio: " << info.has_audio << std::endl; + *out << "--> Has Single Image: " << info.has_single_image << std::endl; + *out << "--> Duration: " << info.duration << " Seconds" << std::endl; + *out << "--> File Size: " << double(info.file_size) / 1024 / 1024 << " MB" << std::endl; + *out << "----------------------------" << std::endl; + *out << "----- Video Attributes -----" << std::endl; + *out << "----------------------------" << std::endl; + *out << "--> Width: " << info.width << std::endl; + *out << "--> Height: " << info.height << std::endl; + *out << "--> Pixel Format: " << info.pixel_format << std::endl; + *out << "--> Frames Per Second: " << info.fps.ToDouble() << " (" << info.fps.num << "/" << info.fps.den << ")" << std::endl; + *out << "--> Video Bit Rate: " << info.video_bit_rate/1000 << " kb/s" << std::endl; + *out << "--> Pixel Ratio: " << info.pixel_ratio.ToDouble() << " (" << info.pixel_ratio.num << "/" << info.pixel_ratio.den << ")" << std::endl; + *out << "--> Display Aspect Ratio: " << info.display_ratio.ToDouble() << " (" << info.display_ratio.num << "/" << info.display_ratio.den << ")" << std::endl; + *out << "--> Video Codec: " << info.vcodec << std::endl; + *out << "--> Video Length: " << info.video_length << " Frames" << std::endl; + *out << "--> Video Stream Index: " << info.video_stream_index << std::endl; + *out << "--> Video Timebase: " << info.video_timebase.ToDouble() << " (" << info.video_timebase.num << "/" << info.video_timebase.den << ")" << std::endl; + *out << "--> Interlaced: " << info.interlaced_frame << std::endl; + *out << "--> Interlaced: Top Field First: " << info.top_field_first << std::endl; + *out << "----------------------------" << std::endl; + *out << "----- Audio Attributes -----" << std::endl; + *out << "----------------------------" << std::endl; + *out << "--> Audio Codec: " << info.acodec << std::endl; + *out << "--> Audio Bit Rate: " << info.audio_bit_rate/1000 << " kb/s" << std::endl; + *out << "--> Sample Rate: " << info.sample_rate << " Hz" << std::endl; + *out << "--> # of Channels: " << info.channels << std::endl; + *out << "--> Channel Layout: " << info.channel_layout << std::endl; + *out << "--> Audio Stream Index: " << info.audio_stream_index << std::endl; + *out << "--> Audio Timebase: " << info.audio_timebase.ToDouble() << " (" << info.audio_timebase.num << "/" << info.audio_timebase.den << ")" << std::endl; + *out << "----------------------------" << std::endl; + *out << "--------- Metadata ---------" << std::endl; + *out << "----------------------------" << std::endl; // Iterate through metadata for (auto it : info.metadata) - std::cout << "--> " << it.first << ": " << it.second << std::endl; + *out << "--> " << it.first << ": " << it.second << std::endl; } // Generate Json::Value for this object diff --git a/src/ReaderBase.h b/src/ReaderBase.h index 7b7847a8..4d2d3afa 100644 --- a/src/ReaderBase.h +++ b/src/ReaderBase.h @@ -31,11 +31,9 @@ #ifndef OPENSHOT_READER_BASE_H #define OPENSHOT_READER_BASE_H -#include -#include #include -#include -#include +#include + #include "CacheMemory.h" #include "ChannelLayouts.h" #include "ClipBase.h" @@ -120,7 +118,7 @@ namespace openshot virtual void Close() = 0; /// Display file information in the standard output stream (stdout) - void DisplayInfo(); + void DisplayInfo(std::ostream* out=&std::cout); /// Get the cache object used by this reader (note: not all readers use cache) virtual openshot::CacheBase* GetCache() = 0; diff --git a/tests/FFmpegReader.cpp b/tests/FFmpegReader.cpp index 217d601c..7911487a 100644 --- a/tests/FFmpegReader.cpp +++ b/tests/FFmpegReader.cpp @@ -39,7 +39,6 @@ #include "Timeline.h" #include "Json.h" -using namespace std; using namespace openshot; TEST_CASE( "Invalid_Path", "[libopenshot][ffmpegreader]" ) @@ -51,7 +50,7 @@ TEST_CASE( "Invalid_Path", "[libopenshot][ffmpegreader]" ) TEST_CASE( "GetFrame_Before_Opening", "[libopenshot][ffmpegreader]" ) { // Create a reader - stringstream path; + std::stringstream path; path << TEST_MEDIA_PATH << "piano.wav"; FFmpegReader r(path.str()); @@ -62,7 +61,7 @@ TEST_CASE( "GetFrame_Before_Opening", "[libopenshot][ffmpegreader]" ) TEST_CASE( "Check_Audio_File", "[libopenshot][ffmpegreader]" ) { // Create a reader - stringstream path; + std::stringstream path; path << TEST_MEDIA_PATH << "piano.wav"; FFmpegReader r(path.str()); r.Open(); @@ -92,7 +91,7 @@ TEST_CASE( "Check_Audio_File", "[libopenshot][ffmpegreader]" ) TEST_CASE( "Check_Video_File", "[libopenshot][ffmpegreader]" ) { // Create a reader - stringstream path; + std::stringstream path; path << TEST_MEDIA_PATH << "test.mp4"; FFmpegReader r(path.str()); r.Open(); @@ -138,7 +137,7 @@ TEST_CASE( "Check_Video_File", "[libopenshot][ffmpegreader]" ) TEST_CASE( "Seek", "[libopenshot][ffmpegreader]" ) { // Create a reader - stringstream path; + std::stringstream path; path << TEST_MEDIA_PATH << "sintel_trailer-720p.mp4"; FFmpegReader r(path.str()); r.Open(); @@ -195,7 +194,7 @@ TEST_CASE( "Seek", "[libopenshot][ffmpegreader]" ) TEST_CASE( "Frame_Rate", "[libopenshot][ffmpegreader]" ) { // Create a reader - stringstream path; + std::stringstream path; path << TEST_MEDIA_PATH << "sintel_trailer-720p.mp4"; FFmpegReader r(path.str()); r.Open(); @@ -211,7 +210,7 @@ TEST_CASE( "Frame_Rate", "[libopenshot][ffmpegreader]" ) TEST_CASE( "Multiple_Open_and_Close", "[libopenshot][ffmpegreader]" ) { // Create a reader - stringstream path; + std::stringstream path; path << TEST_MEDIA_PATH << "sintel_trailer-720p.mp4"; FFmpegReader r(path.str()); r.Open(); @@ -247,7 +246,7 @@ TEST_CASE( "Multiple_Open_and_Close", "[libopenshot][ffmpegreader]" ) TEST_CASE( "verify parent Timeline", "[libopenshot][ffmpegreader]" ) { // Create a reader - stringstream path; + std::stringstream path; path << TEST_MEDIA_PATH << "sintel_trailer-720p.mp4"; FFmpegReader r(path.str()); r.Open(); @@ -273,3 +272,34 @@ TEST_CASE( "verify parent Timeline", "[libopenshot][ffmpegreader]" ) CHECK(r.GetFrame(1)->GetImage()->width() == 640); CHECK(r.GetFrame(1)->GetImage()->height() == 360); } + +TEST_CASE( "DisplayInfo", "[libopenshot][clip]" ) +{ + // Create a reader + std::stringstream path; + path << TEST_MEDIA_PATH << "sintel_trailer-720p.mp4"; + FFmpegReader r(path.str()); + r.Open(); + + std::string expected(R"(---------------------------- +----- File Information ----- +---------------------------- +--> Has Video: true +--> Has Audio: true +--> Has Single Image: false +--> Duration: 51.95 Seconds +--> File Size: 7.26 MB +---------------------------- +----- Video Attributes ----- +---------------------------- +--> Width: 1280 +--> Height: 720)"); + + // Store the DisplayInfo() text in 'output' + std::stringstream output; + r.DisplayInfo(&output); + + // Compare a [0, expected.size()) substring of output to expected + auto compare_value = output.str().compare(0, expected.size(), expected); + CHECK(compare_value == 0); +} diff --git a/tests/ReaderBase.cpp b/tests/ReaderBase.cpp index 94880e00..d071d36d 100644 --- a/tests/ReaderBase.cpp +++ b/tests/ReaderBase.cpp @@ -42,7 +42,7 @@ using namespace openshot; // Since it is not possible to instantiate an abstract class, this test creates // a new derived class, in order to test the base class file info struct. -TEST_CASE( "ReaderBase_Derived_Class", "[libopenshot][readerbase]" ) +TEST_CASE( "derived class", "[libopenshot][readerbase]" ) { // Create a new derived class from type ReaderBase class TestReader : public ReaderBase From 9d79b394c4835c57d372a695efa4cbe974f44767 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 19 Apr 2021 20:57:47 -0400 Subject: [PATCH 006/114] Make remaining print functions testable --- src/Color.cpp | 2 ++ src/EffectBase.cpp | 23 ++++++++------ src/EffectBase.h | 2 +- src/FrameMapper.cpp | 18 +++++++++-- src/FrameMapper.h | 4 +-- src/KeyFrame.cpp | 22 ++++++------- src/KeyFrame.h | 6 ++-- src/WriterBase.cpp | 77 +++++++++++++++++++++++---------------------- src/WriterBase.h | 4 +-- 9 files changed, 89 insertions(+), 69 deletions(-) diff --git a/src/Color.cpp b/src/Color.cpp index e848f1f7..c877cbd4 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -28,6 +28,8 @@ * along with OpenShot Library. If not, see . */ +#include + #include "Color.h" #include "Exceptions.h" diff --git a/src/EffectBase.cpp b/src/EffectBase.cpp index b75a0820..a475c7eb 100644 --- a/src/EffectBase.cpp +++ b/src/EffectBase.cpp @@ -28,6 +28,9 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "EffectBase.h" #include "Exceptions.h" @@ -57,16 +60,16 @@ void EffectBase::InitEffectInfo() } // Display file information -void EffectBase::DisplayInfo() { - std::cout << std::fixed << std::setprecision(2) << std::boolalpha; - std::cout << "----------------------------" << std::endl; - std::cout << "----- Effect Information -----" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "--> Name: " << info.name << std::endl; - std::cout << "--> Description: " << info.description << std::endl; - std::cout << "--> Has Video: " << info.has_video << std::endl; - std::cout << "--> Has Audio: " << info.has_audio << std::endl; - std::cout << "----------------------------" << std::endl; +void EffectBase::DisplayInfo(std::ostream* out) { + *out << std::fixed << std::setprecision(2) << std::boolalpha; + *out << "----------------------------" << std::endl; + *out << "----- Effect Information -----" << std::endl; + *out << "----------------------------" << std::endl; + *out << "--> Name: " << info.name << std::endl; + *out << "--> Description: " << info.description << std::endl; + *out << "--> Has Video: " << info.has_video << std::endl; + *out << "--> Has Audio: " << info.has_audio << std::endl; + *out << "----------------------------" << std::endl; } // Constrain a color value from 0 to 255 diff --git a/src/EffectBase.h b/src/EffectBase.h index dc78a7c9..05936500 100644 --- a/src/EffectBase.h +++ b/src/EffectBase.h @@ -87,7 +87,7 @@ namespace openshot EffectInfoStruct info; /// Display effect information in the standard output stream (stdout) - void DisplayInfo(); + void DisplayInfo(std::ostream* out=&std::cout); /// Constrain a color value from 0 to 255 int constrain(int color_value); diff --git a/src/FrameMapper.cpp b/src/FrameMapper.cpp index 0e3b0272..832f794a 100644 --- a/src/FrameMapper.cpp +++ b/src/FrameMapper.cpp @@ -28,6 +28,10 @@ * along with OpenShot Library. If not, see . */ +#include +#include +#include + #include "FrameMapper.h" #include "Exceptions.h" #include "Clip.h" @@ -611,7 +615,7 @@ std::shared_ptr FrameMapper::GetFrame(int64_t requested_frame) return final_cache.GetFrame(requested_frame); } -void FrameMapper::PrintMapping() +void FrameMapper::PrintMapping(std::ostream* out) { // Check if mappings are dirty (and need to be recalculated) if (is_dirty) @@ -622,8 +626,16 @@ void FrameMapper::PrintMapping() for (float map = 1; map <= frames.size(); map++) { MappedFrame frame = frames[map - 1]; - cout << "Target frame #: " << map << " mapped to original frame #:\t(" << frame.Odd.Frame << " odd, " << frame.Even.Frame << " even)" << endl; - cout << " - Audio samples mapped to frame " << frame.Samples.frame_start << ":" << frame.Samples.sample_start << " to frame " << frame.Samples.frame_end << ":" << frame.Samples.sample_end << endl; + *out << "Target frame #: " << map + << " mapped to original frame #:\t(" + << frame.Odd.Frame << " odd, " + << frame.Even.Frame << " even)" << std::endl; + + *out << " - Audio samples mapped to frame " + << frame.Samples.frame_start << ":" + << frame.Samples.sample_start << " to frame " + << frame.Samples.frame_end << ":" + << frame.Samples.sample_end << endl; } } diff --git a/src/FrameMapper.h b/src/FrameMapper.h index 62615cfb..813c644f 100644 --- a/src/FrameMapper.h +++ b/src/FrameMapper.h @@ -33,9 +33,9 @@ #include #include -#include #include #include + #include "CacheMemory.h" #include "ReaderBase.h" #include "Frame.h" @@ -211,7 +211,7 @@ namespace openshot void Open() override; /// Print all of the original frames and which new frames they map to - void PrintMapping(); + void PrintMapping(std::ostream* out=&std::cout); /// Get the current reader ReaderBase* Reader(); diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index 4107f2de..ef8b045e 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -28,9 +28,6 @@ * along with OpenShot Library. If not, see . */ -#include "KeyFrame.h" -#include "Exceptions.h" - #include #include #include @@ -38,6 +35,9 @@ #include // For std::cout #include // For std::setprecision +#include "KeyFrame.h" +#include "Exceptions.h" + using namespace std; using namespace openshot; @@ -559,21 +559,21 @@ void Keyframe::UpdatePoint(int64_t index, Point p) { AddPoint(p); } -void Keyframe::PrintPoints() const { - cout << fixed << setprecision(4); +void Keyframe::PrintPoints(std::ostream* out) const { + *out << std::fixed << std::setprecision(4); for (std::vector::const_iterator it = Points.begin(); it != Points.end(); it++) { Point p = *it; - cout << p.co.X << "\t" << p.co.Y << endl; + *out << p.co.X << "\t" << p.co.Y << std::endl; } } -void Keyframe::PrintValues() const { - cout << fixed << setprecision(4); - cout << "Frame Number (X)\tValue (Y)\tIs Increasing\tRepeat Numerator\tRepeat Denominator\tDelta (Y Difference)\n"; +void Keyframe::PrintValues(std::ostream* out) const { + *out << std::fixed << std::setprecision(4); + *out << "Frame Number (X)\tValue (Y)\tIs Increasing\tRepeat Numerator\tRepeat Denominator\tDelta (Y Difference)\n"; for (int64_t i = 1; i < GetLength(); ++i) { - cout << i << "\t" << GetValue(i) << "\t" << IsIncreasing(i) << "\t" ; - cout << GetRepeatFraction(i).num << "\t" << GetRepeatFraction(i).den << "\t" << GetDelta(i) << "\n"; + *out << i << "\t" << GetValue(i) << "\t" << IsIncreasing(i) << "\t" ; + *out << GetRepeatFraction(i).num << "\t" << GetRepeatFraction(i).den << "\t" << GetDelta(i) << "\n"; } } diff --git a/src/KeyFrame.h b/src/KeyFrame.h index 6da34cac..45624dd2 100644 --- a/src/KeyFrame.h +++ b/src/KeyFrame.h @@ -31,7 +31,7 @@ #ifndef OPENSHOT_KEYFRAME_H #define OPENSHOT_KEYFRAME_H -#include +#include #include #include "Fraction.h" @@ -160,10 +160,10 @@ namespace openshot { void UpdatePoint(int64_t index, Point p); /// Print a list of points - void PrintPoints() const; + void PrintPoints(std::ostream* out=&std::cout) const; /// Print just the Y value of the point's primary coordinate - void PrintValues() const; + void PrintValues(std::ostream* out=&std::cout) const; }; diff --git a/src/WriterBase.cpp b/src/WriterBase.cpp index fff93988..8faab981 100644 --- a/src/WriterBase.cpp +++ b/src/WriterBase.cpp @@ -28,6 +28,9 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "WriterBase.h" #include "Exceptions.h" @@ -100,43 +103,43 @@ void WriterBase::CopyReaderInfo(ReaderBase* reader) } // Display file information -void WriterBase::DisplayInfo() { - std::cout << std::fixed << std::setprecision(2) << std::boolalpha; - std::cout << "----------------------------" << std::endl; - std::cout << "----- File Information -----" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "--> Has Video: " << info.has_video << std::endl; - std::cout << "--> Has Audio: " << info.has_audio << std::endl; - std::cout << "--> Has Single Image: " << info.has_single_image << std::endl; - std::cout << "--> Duration: " << info.duration << " Seconds" << std::endl; - std::cout << "--> File Size: " << double(info.file_size) / 1024 / 1024 << " MB" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "----- Video Attributes -----" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "--> Width: " << info.width << std::endl; - std::cout << "--> Height: " << info.height << std::endl; - std::cout << "--> Pixel Format: " << info.pixel_format << std::endl; - std::cout << "--> Frames Per Second: " << info.fps.ToDouble() << " (" << info.fps.num << "/" << info.fps.den << ")" << std::endl; - std::cout << "--> Video Bit Rate: " << info.video_bit_rate/1000 << " kb/s" << std::endl; - std::cout << "--> Pixel Ratio: " << info.pixel_ratio.ToDouble() << " (" << info.pixel_ratio.num << "/" << info.pixel_ratio.den << ")" << std::endl; - std::cout << "--> Display Aspect Ratio: " << info.display_ratio.ToDouble() << " (" << info.display_ratio.num << "/" << info.display_ratio.den << ")" << std::endl; - std::cout << "--> Video Codec: " << info.vcodec << std::endl; - std::cout << "--> Video Length: " << info.video_length << " Frames" << std::endl; - std::cout << "--> Video Stream Index: " << info.video_stream_index << std::endl; - std::cout << "--> Video Timebase: " << info.video_timebase.ToDouble() << " (" << info.video_timebase.num << "/" << info.video_timebase.den << ")" << std::endl; - std::cout << "--> Interlaced: " << info.interlaced_frame << std::endl; - std::cout << "--> Interlaced: Top Field First: " << info.top_field_first << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "----- Audio Attributes -----" << std::endl; - std::cout << "----------------------------" << std::endl; - std::cout << "--> Audio Codec: " << info.acodec << std::endl; - std::cout << "--> Audio Bit Rate: " << info.audio_bit_rate/1000 << " kb/s" << std::endl; - std::cout << "--> Sample Rate: " << info.sample_rate << " Hz" << std::endl; - std::cout << "--> # of Channels: " << info.channels << std::endl; - std::cout << "--> Channel Layout: " << info.channel_layout << std::endl; - std::cout << "--> Audio Stream Index: " << info.audio_stream_index << std::endl; - std::cout << "--> Audio Timebase: " << info.audio_timebase.ToDouble() << " (" << info.audio_timebase.num << "/" << info.audio_timebase.den << ")" << std::endl; - std::cout << "----------------------------" << std::endl; +void WriterBase::DisplayInfo(std::ostream* out) { + *out << std::fixed << std::setprecision(2) << std::boolalpha; + *out << "----------------------------" << std::endl; + *out << "----- File Information -----" << std::endl; + *out << "----------------------------" << std::endl; + *out << "--> Has Video: " << info.has_video << std::endl; + *out << "--> Has Audio: " << info.has_audio << std::endl; + *out << "--> Has Single Image: " << info.has_single_image << std::endl; + *out << "--> Duration: " << info.duration << " Seconds" << std::endl; + *out << "--> File Size: " << double(info.file_size) / 1024 / 1024 << " MB" << std::endl; + *out << "----------------------------" << std::endl; + *out << "----- Video Attributes -----" << std::endl; + *out << "----------------------------" << std::endl; + *out << "--> Width: " << info.width << std::endl; + *out << "--> Height: " << info.height << std::endl; + *out << "--> Pixel Format: " << info.pixel_format << std::endl; + *out << "--> Frames Per Second: " << info.fps.ToDouble() << " (" << info.fps.num << "/" << info.fps.den << ")" << std::endl; + *out << "--> Video Bit Rate: " << info.video_bit_rate/1000 << " kb/s" << std::endl; + *out << "--> Pixel Ratio: " << info.pixel_ratio.ToDouble() << " (" << info.pixel_ratio.num << "/" << info.pixel_ratio.den << ")" << std::endl; + *out << "--> Display Aspect Ratio: " << info.display_ratio.ToDouble() << " (" << info.display_ratio.num << "/" << info.display_ratio.den << ")" << std::endl; + *out << "--> Video Codec: " << info.vcodec << std::endl; + *out << "--> Video Length: " << info.video_length << " Frames" << std::endl; + *out << "--> Video Stream Index: " << info.video_stream_index << std::endl; + *out << "--> Video Timebase: " << info.video_timebase.ToDouble() << " (" << info.video_timebase.num << "/" << info.video_timebase.den << ")" << std::endl; + *out << "--> Interlaced: " << info.interlaced_frame << std::endl; + *out << "--> Interlaced: Top Field First: " << info.top_field_first << std::endl; + *out << "----------------------------" << std::endl; + *out << "----- Audio Attributes -----" << std::endl; + *out << "----------------------------" << std::endl; + *out << "--> Audio Codec: " << info.acodec << std::endl; + *out << "--> Audio Bit Rate: " << info.audio_bit_rate/1000 << " kb/s" << std::endl; + *out << "--> Sample Rate: " << info.sample_rate << " Hz" << std::endl; + *out << "--> # of Channels: " << info.channels << std::endl; + *out << "--> Channel Layout: " << info.channel_layout << std::endl; + *out << "--> Audio Stream Index: " << info.audio_stream_index << std::endl; + *out << "--> Audio Timebase: " << info.audio_timebase.ToDouble() << " (" << info.audio_timebase.num << "/" << info.audio_timebase.den << ")" << std::endl; + *out << "----------------------------" << std::endl; } // Generate JSON string of this object diff --git a/src/WriterBase.h b/src/WriterBase.h index d18f329d..3939ca6e 100644 --- a/src/WriterBase.h +++ b/src/WriterBase.h @@ -32,7 +32,7 @@ #define OPENSHOT_WRITER_BASE_H #include -#include + #include "ChannelLayouts.h" #include "Fraction.h" #include "Frame.h" @@ -113,7 +113,7 @@ namespace openshot void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object /// Display file information in the standard output stream (stdout) - void DisplayInfo(); + void DisplayInfo(std::ostream* out=&std::cout); /// Open the writer (and start initializing streams) virtual void Open() = 0; From aac42a7a0c108c46aa8883eb2f94cd434dc5ecd3 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 5 May 2021 12:51:48 -0400 Subject: [PATCH 007/114] tests/FrameMapper: Add PrintMapping() test --- tests/FrameMapper.cpp | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/tests/FrameMapper.cpp b/tests/FrameMapper.cpp index 20ca76e8..fc1f70d4 100644 --- a/tests/FrameMapper.cpp +++ b/tests/FrameMapper.cpp @@ -191,7 +191,7 @@ TEST_CASE( "30_fps_to_24_fps_Pulldown_None", "[libopenshot][framemapper]" ) TEST_CASE( "resample_audio_48000_to_41000", "[libopenshot][framemapper]" ) { - // Create a reader: 24 fps, 2 channels, 48000 sample rate + // Create a reader std::stringstream path; path << TEST_MEDIA_PATH << "sintel_trailer-720p.mp4"; FFmpegReader r(path.str()); @@ -619,6 +619,42 @@ TEST_CASE( "Distribute samples", "[libopenshot][framemapper]" ) { } // for rates } +TEST_CASE( "PrintMapping", "[libopenshot][framemapper]" ) +{ + const std::string expected( + R"(Target frame #: 1 mapped to original frame #: (1 odd, 1 even) + - Audio samples mapped to frame 1:0 to frame 1:1599 +Target frame #: 2 mapped to original frame #: (2 odd, 2 even) + - Audio samples mapped to frame 1:1600 to frame 2:1199 +Target frame #: 3 mapped to original frame #: (2 odd, 3 even) + - Audio samples mapped to frame 2:1200 to frame 3:799 +Target frame #: 4 mapped to original frame #: (3 odd, 4 even) + - Audio samples mapped to frame 3:800 to frame 4:399 +Target frame #: 5 mapped to original frame #: (4 odd, 4 even) + - Audio samples mapped to frame 4:400 to frame 4:1999 +Target frame #: 6 mapped to original frame #: (5 odd, 5 even) + - Audio samples mapped to frame 5:0 to frame 5:1599 +Target frame #: 7 mapped to original frame #: (6 odd, 6 even) + - Audio samples mapped to frame 5:1600 to frame 6:1199 +Target frame #: 8 mapped to original frame #: (6 odd, 7 even) + - Audio samples mapped to frame 6:1200 to frame 7:799 +Target frame #: 9 mapped to original frame #: (7 odd, 8 even) + - Audio samples mapped to frame 7:800 to frame 8:399 +Target frame #: 10 mapped to original frame #: (8 odd, 8 even) + - Audio samples mapped to frame 8:400 to frame 8:1999)"); + + DummyReader r(Fraction(24,1), 720, 480, 48000, 2, 5.0); + // Create mapping 24 fps and 30 fps + FrameMapper mapping( + &r, Fraction(30, 1), PULLDOWN_CLASSIC, 48000, 2, LAYOUT_STEREO); + std::stringstream mapping_out; + mapping.PrintMapping(&mapping_out); + + // Compare a [0, expected.size()) substring of output to expected + auto compare_value = mapping_out.str().compare(0, expected.size(), expected); + CHECK(compare_value == 0); +} + TEST_CASE( "Json", "[libopenshot][framemapper]" ) { DummyReader r(Fraction(30,1), 1280, 720, 48000, 2, 5.0); From 528919027cad09196514b887027fc1a002d3e000 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 7 May 2021 23:05:16 -0400 Subject: [PATCH 008/114] Code formatting --- src/FrameMapper.cpp | 115 +++++++++++++++++++++++++++++------------ tests/FFmpegReader.cpp | 2 +- 2 files changed, 82 insertions(+), 35 deletions(-) diff --git a/src/FrameMapper.cpp b/src/FrameMapper.cpp index 832f794a..dde65ddf 100644 --- a/src/FrameMapper.cpp +++ b/src/FrameMapper.cpp @@ -521,7 +521,7 @@ std::shared_ptr FrameMapper::GetFrame(int64_t requested_frame) copy_samples.sample_end += EXTRA_INPUT_SAMPLES; int samples_per_end_frame = Frame::GetSamplesPerFrame(copy_samples.frame_end, original, - reader->info.sample_rate, reader->info.channels); + reader->info.sample_rate, reader->info.channels); if (copy_samples.sample_end >= samples_per_end_frame) { // check for wrapping @@ -537,7 +537,7 @@ std::shared_ptr FrameMapper::GetFrame(int64_t requested_frame) copy_samples.sample_start += EXTRA_INPUT_SAMPLES; int samples_per_start_frame = Frame::GetSamplesPerFrame(copy_samples.frame_start, original, - reader->info.sample_rate, reader->info.channels); + reader->info.sample_rate, reader->info.channels); if (copy_samples.sample_start >= samples_per_start_frame) { // check for wrapping @@ -628,14 +628,14 @@ void FrameMapper::PrintMapping(std::ostream* out) MappedFrame frame = frames[map - 1]; *out << "Target frame #: " << map << " mapped to original frame #:\t(" - << frame.Odd.Frame << " odd, " - << frame.Even.Frame << " even)" << std::endl; + << frame.Odd.Frame << " odd, " + << frame.Even.Frame << " even)" << std::endl; *out << " - Audio samples mapped to frame " << frame.Samples.frame_start << ":" - << frame.Samples.sample_start << " to frame " - << frame.Samples.frame_end << ":" - << frame.Samples.sample_end << endl; + << frame.Samples.sample_start << " to frame " + << frame.Samples.frame_end << ":" + << frame.Samples.sample_end << endl; } } @@ -745,7 +745,14 @@ void FrameMapper::SetJsonValue(const Json::Value root) { // Change frame rate or audio mapping details void FrameMapper::ChangeMapping(Fraction target_fps, PulldownType target_pulldown, int target_sample_rate, int target_channels, ChannelLayout target_channel_layout) { - ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ChangeMapping", "target_fps.num", target_fps.num, "target_fps.den", target_fps.den, "target_pulldown", target_pulldown, "target_sample_rate", target_sample_rate, "target_channels", target_channels, "target_channel_layout", target_channel_layout); + ZmqLogger::Instance()->AppendDebugMethod( + "FrameMapper::ChangeMapping", + "target_fps.num", target_fps.num, + "target_fps.den", target_fps.den, + "target_pulldown", target_pulldown, + "target_sample_rate", target_sample_rate, + "target_channels", target_channels, + "target_channel_layout", target_channel_layout); // Mark as dirty is_dirty = true; @@ -791,7 +798,13 @@ void FrameMapper::ResampleMappedAudio(std::shared_ptr frame, int64_t orig int samples_in_frame = frame->GetAudioSamplesCount(); ChannelLayout channel_layout_in_frame = frame->ChannelsLayout(); - ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ResampleMappedAudio", "frame->number", frame->number, "original_frame_number", original_frame_number, "channels_in_frame", channels_in_frame, "samples_in_frame", samples_in_frame, "sample_rate_in_frame", sample_rate_in_frame); + ZmqLogger::Instance()->AppendDebugMethod( + "FrameMapper::ResampleMappedAudio", + "frame->number", frame->number, + "original_frame_number", original_frame_number, + "channels_in_frame", channels_in_frame, + "samples_in_frame", samples_in_frame, + "sample_rate_in_frame", sample_rate_in_frame); // Get audio sample array float* frame_samples_float = NULL; @@ -827,7 +840,14 @@ void FrameMapper::ResampleMappedAudio(std::shared_ptr frame, int64_t orig delete[] frame_samples_float; frame_samples_float = NULL; - ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ResampleMappedAudio (got sample data from frame)", "frame->number", frame->number, "total_frame_samples", total_frame_samples, "target channels", info.channels, "channels_in_frame", channels_in_frame, "target sample_rate", info.sample_rate, "samples_in_frame", samples_in_frame); + ZmqLogger::Instance()->AppendDebugMethod( + "FrameMapper::ResampleMappedAudio (got sample data from frame)", + "frame->number", frame->number, + "total_frame_samples", total_frame_samples, + "target channels", info.channels, + "channels_in_frame", channels_in_frame, + "target sample_rate", info.sample_rate, + "samples_in_frame", samples_in_frame); // Create input frame (and allocate arrays) @@ -835,8 +855,10 @@ void FrameMapper::ResampleMappedAudio(std::shared_ptr frame, int64_t orig AV_RESET_FRAME(audio_frame); audio_frame->nb_samples = total_frame_samples / channels_in_frame; - int error_code = avcodec_fill_audio_frame(audio_frame, channels_in_frame, AV_SAMPLE_FMT_S16, (uint8_t *) frame_samples, - audio_frame->nb_samples * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) * channels_in_frame, 1); + int buf_size = audio_frame->nb_samples * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) * channels_in_frame; + int error_code = avcodec_fill_audio_frame( + audio_frame, channels_in_frame, AV_SAMPLE_FMT_S16, + (uint8_t *) frame_samples, buf_size, 1); if (error_code < 0) { @@ -847,7 +869,14 @@ void FrameMapper::ResampleMappedAudio(std::shared_ptr frame, int64_t orig // Update total samples & input frame size (due to bigger or smaller data types) total_frame_samples = Frame::GetSamplesPerFrame(AdjustFrameNumber(frame->number), target, info.sample_rate, info.channels); - ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ResampleMappedAudio (adjust # of samples)", "total_frame_samples", total_frame_samples, "info.sample_rate", info.sample_rate, "sample_rate_in_frame", sample_rate_in_frame, "info.channels", info.channels, "channels_in_frame", channels_in_frame, "original_frame_number", original_frame_number); + ZmqLogger::Instance()->AppendDebugMethod( + "FrameMapper::ResampleMappedAudio (adjust # of samples)", + "total_frame_samples", total_frame_samples, + "info.sample_rate", info.sample_rate, + "sample_rate_in_frame", sample_rate_in_frame, + "info.channels", info.channels, + "channels_in_frame", channels_in_frame, + "original_frame_number", original_frame_number); // Create output frame (and allocate arrays) AVFrame *audio_converted = AV_ALLOCATE_FRAME(); @@ -855,32 +884,39 @@ void FrameMapper::ResampleMappedAudio(std::shared_ptr frame, int64_t orig audio_converted->nb_samples = total_frame_samples; av_samples_alloc(audio_converted->data, audio_converted->linesize, info.channels, total_frame_samples, AV_SAMPLE_FMT_S16, 0); - ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ResampleMappedAudio (preparing for resample)", "in_sample_fmt", AV_SAMPLE_FMT_S16, "out_sample_fmt", AV_SAMPLE_FMT_S16, "in_sample_rate", sample_rate_in_frame, "out_sample_rate", info.sample_rate, "in_channels", channels_in_frame, "out_channels", info.channels); + ZmqLogger::Instance()->AppendDebugMethod( + "FrameMapper::ResampleMappedAudio (preparing for resample)", + "in_sample_fmt", AV_SAMPLE_FMT_S16, + "out_sample_fmt", AV_SAMPLE_FMT_S16, + "in_sample_rate", sample_rate_in_frame, + "out_sample_rate", info.sample_rate, + "in_channels", channels_in_frame, + "out_channels", info.channels); int nb_samples = 0; // setup resample context if (!avr) { avr = SWR_ALLOC(); - av_opt_set_int(avr, "in_channel_layout", channel_layout_in_frame, 0); - av_opt_set_int(avr, "out_channel_layout", info.channel_layout, 0); - av_opt_set_int(avr, "in_sample_fmt", AV_SAMPLE_FMT_S16, 0); - av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); - av_opt_set_int(avr, "in_sample_rate", sample_rate_in_frame, 0); - av_opt_set_int(avr, "out_sample_rate", info.sample_rate, 0); - av_opt_set_int(avr, "in_channels", channels_in_frame, 0); - av_opt_set_int(avr, "out_channels", info.channels, 0); + av_opt_set_int(avr, "in_channel_layout", channel_layout_in_frame, 0); + av_opt_set_int(avr, "out_channel_layout", info.channel_layout, 0); + av_opt_set_int(avr, "in_sample_fmt", AV_SAMPLE_FMT_S16, 0); + av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); + av_opt_set_int(avr, "in_sample_rate", sample_rate_in_frame, 0); + av_opt_set_int(avr, "out_sample_rate", info.sample_rate, 0); + av_opt_set_int(avr, "in_channels", channels_in_frame, 0); + av_opt_set_int(avr, "out_channels", info.channels, 0); SWR_INIT(avr); } // Convert audio samples - nb_samples = SWR_CONVERT(avr, // audio resample context - audio_converted->data, // output data pointers - audio_converted->linesize[0], // output plane size, in bytes. (0 if unknown) - audio_converted->nb_samples, // maximum number of samples that the output buffer can hold - audio_frame->data, // input data pointers - audio_frame->linesize[0], // input plane size, in bytes (0 if unknown) - audio_frame->nb_samples); // number of input samples to convert + nb_samples = SWR_CONVERT(avr, // audio resample context + audio_converted->data, // output data pointers + audio_converted->linesize[0], // output plane size, in bytes. (0 if unknown) + audio_converted->nb_samples, // maximum number of samples that the output buffer can hold + audio_frame->data, // input data pointers + audio_frame->linesize[0], // input plane size, in bytes (0 if unknown) + audio_frame->nb_samples); // number of input samples to convert // Create a new array (to hold all resampled S16 audio samples) int16_t* resampled_samples = new int16_t[(nb_samples * info.channels)]; @@ -899,7 +935,14 @@ void FrameMapper::ResampleMappedAudio(std::shared_ptr frame, int64_t orig int channel_buffer_size = nb_samples; frame->ResizeAudio(info.channels, channel_buffer_size, info.sample_rate, info.channel_layout); - ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ResampleMappedAudio (Audio successfully resampled)", "nb_samples", nb_samples, "total_frame_samples", total_frame_samples, "info.sample_rate", info.sample_rate, "channels_in_frame", channels_in_frame, "info.channels", info.channels, "info.channel_layout", info.channel_layout); + ZmqLogger::Instance()->AppendDebugMethod( + "FrameMapper::ResampleMappedAudio (Audio successfully resampled)", + "nb_samples", nb_samples, + "total_frame_samples", total_frame_samples, + "info.sample_rate", info.sample_rate, + "channels_in_frame", channels_in_frame, + "info.channels", info.channels, + "info.channel_layout", info.channel_layout); // Array of floats (to hold samples for each channel) float *channel_buffer = new float[channel_buffer_size]; @@ -939,7 +982,10 @@ void FrameMapper::ResampleMappedAudio(std::shared_ptr frame, int64_t orig // Add samples to frame for this channel frame->AddAudio(true, channel_filter, 0, channel_buffer, position, 1.0f); - ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ResampleMappedAudio (Add audio to channel)", "number of samples", position, "channel_filter", channel_filter); + ZmqLogger::Instance()->AppendDebugMethod( + "FrameMapper::ResampleMappedAudio (Add audio to channel)", + "number of samples", position, + "channel_filter", channel_filter); } // Update frame's audio meta data @@ -967,9 +1013,10 @@ int64_t FrameMapper::AdjustFrameNumber(int64_t clip_frame_number) { start = parent->Start(); } - // Adjust start frame and position based on parent clip. This prevents ensures the same - // frame # is used by mapped readers and clips, when calculating samples per frame. Thus, - // this prevents gaps and mismatches in # of samples. + // Adjust start frame and position based on parent clip. + // This ensures the same frame # is used by mapped readers and clips, + // when calculating samples per frame. + // Thus, this prevents gaps and mismatches in # of samples. int64_t clip_start_frame = (start * info.fps.ToDouble()) + 1; int64_t clip_start_position = round(position * info.fps.ToDouble()) + 1; int64_t frame_number = clip_frame_number + clip_start_position - clip_start_frame; diff --git a/tests/FFmpegReader.cpp b/tests/FFmpegReader.cpp index 7911487a..747ae0e2 100644 --- a/tests/FFmpegReader.cpp +++ b/tests/FFmpegReader.cpp @@ -273,7 +273,7 @@ TEST_CASE( "verify parent Timeline", "[libopenshot][ffmpegreader]" ) CHECK(r.GetFrame(1)->GetImage()->height() == 360); } -TEST_CASE( "DisplayInfo", "[libopenshot][clip]" ) +TEST_CASE( "DisplayInfo", "[libopenshot][ffmpegreader]" ) { // Create a reader std::stringstream path; From 70ea2659d8bdcd20d9bd37a651f62f0ddf3b2fd5 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 7 May 2021 23:27:57 -0400 Subject: [PATCH 009/114] tests/FFmpegWriter: Add DisplayInfo test --- tests/FFmpegWriter.cpp | 77 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/tests/FFmpegWriter.cpp b/tests/FFmpegWriter.cpp index 059bbb4d..adb555b2 100644 --- a/tests/FFmpegWriter.cpp +++ b/tests/FFmpegWriter.cpp @@ -45,7 +45,7 @@ using namespace openshot; TEST_CASE( "Webm", "[libopenshot][ffmpegwriter]" ) { // Reader - stringstream path; + std::stringstream path; path << TEST_MEDIA_PATH << "sintel_trailer-720p.mp4"; FFmpegReader r(path.str()); r.Open(); @@ -92,7 +92,7 @@ TEST_CASE( "Webm", "[libopenshot][ffmpegwriter]" ) TEST_CASE( "Options_Overloads", "[libopenshot][ffmpegwriter]" ) { // Reader - stringstream path; + std::stringstream path; path << TEST_MEDIA_PATH << "sintel_trailer-720p.mp4"; FFmpegReader r(path.str()); r.Open(); @@ -129,3 +129,76 @@ TEST_CASE( "Options_Overloads", "[libopenshot][ffmpegwriter]" ) CHECK_FALSE(r1.info.interlaced_frame); CHECK(r1.info.top_field_first == true); } + + +TEST_CASE( "DisplayInfo", "[libopenshot][ffmpegwriter]" ) +{ + // Reader + std::stringstream path; + path << TEST_MEDIA_PATH << "sintel_trailer-720p.mp4"; + FFmpegReader r(path.str()); + r.Open(); + + /* WRITER ---------------- */ + FFmpegWriter w("output1.webm"); + + // Set options + w.SetAudioOptions(true, "libvorbis", 44100, 2, LAYOUT_STEREO, 188000); + w.SetVideoOptions( + true, "libvpx", + Fraction(24,1), + 1280, 720, + Fraction(1,1), + false, false, + 30000000); + + // Open writer + w.Open(); + + std::string expected( + R"(---------------------------- +----- File Information ----- +---------------------------- +--> Has Video: true +--> Has Audio: true +--> Has Single Image: false +--> Duration: 0.00 Seconds +--> File Size: 0.00 MB +---------------------------- +----- Video Attributes ----- +---------------------------- +--> Width: 1280 +--> Height: 720 +--> Pixel Format: -1 +--> Frames Per Second: 24.00 (24/1) +--> Video Bit Rate: 30000 kb/s +--> Pixel Ratio: 1.00 (1/1) +--> Display Aspect Ratio: 1.78 (16/9) +--> Video Codec: libvpx +--> Video Length: 0 Frames +--> Video Stream Index: -1 +--> Video Timebase: 0.04 (1/24) +--> Interlaced: false +--> Interlaced: Top Field First: false +---------------------------- +----- Audio Attributes ----- +---------------------------- +--> Audio Codec: libvorbis +--> Audio Bit Rate: 188 kb/s +--> Sample Rate: 44100 Hz +--> # of Channels: 2 +--> Channel Layout: 3 +--> Audio Stream Index: -1 +--> Audio Timebase: 1.00 (1/1) +----------------------------)"); + + // Store the DisplayInfo() text in 'output' + std::stringstream output; + w.DisplayInfo(&output); + + w.Close(); + + // Compare a [0, expected.size()) substring of output to expected + auto compare_value = output.str().compare(0, expected.size(), expected); + CHECK(compare_value == 0); +} From bf80251a493b28d6c83643e7735a65ca142aa70a Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 27 Nov 2020 00:33:52 -0500 Subject: [PATCH 010/114] Add operator<< for Coordinate, Fraction, Point --- src/Coordinate.h | 12 ++++++++++++ src/Fraction.h | 13 +++++++++++-- src/Point.h | 25 +++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/Coordinate.h b/src/Coordinate.h index 0a3ba978..f2b8b5fb 100644 --- a/src/Coordinate.h +++ b/src/Coordinate.h @@ -75,6 +75,18 @@ namespace openshot { void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object }; + /// Stream output operator for openshot::Coordinate + template + std::basic_ostream& + operator<<(std::basic_ostream& o, const openshot::Coordinate& co) { + std::basic_ostringstream s; + s.flags(o.flags()); + s.imbue(o.getloc()); + s.precision(o.precision()); + s << "(" << co.X << ", " << co.Y << ")"; + return o << s.str(); + }; + } #endif diff --git a/src/Fraction.h b/src/Fraction.h index fb36e88b..a09db625 100644 --- a/src/Fraction.h +++ b/src/Fraction.h @@ -84,7 +84,16 @@ namespace openshot { Fraction Reciprocal() const; }; - + // Stream output operator for openshot::Fraction + template + std::basic_ostream& + operator<<(std::basic_ostream& o, const openshot::Fraction& frac) { + std::basic_ostringstream s; + s.flags(o.flags()); + s.imbue(o.getloc()); + s.precision(o.precision()); + s << "Fraction(" << frac.num << ", " << frac.den << ")"; + return o << s.str(); + }; } - #endif diff --git a/src/Point.h b/src/Point.h index 1795c469..2602fb9f 100644 --- a/src/Point.h +++ b/src/Point.h @@ -126,6 +126,31 @@ namespace openshot }; + // Stream output operator for openshot::Point + template + std::basic_ostream& + operator<<(std::basic_ostream& o, const openshot::Point& p) { + std::basic_ostringstream s; + s.flags(o.flags()); + s.imbue(o.getloc()); + s.precision(o.precision()); + s << "co" << p.co; + switch(p.interpolation) { + case(openshot::LINEAR): + s << " interpolation(LINEAR)"; + break; + case(openshot::CONSTANT): + s << " interpolation(CONSTANT)"; + break; + case(openshot::BEZIER): + s << " interpolation(BEZIER)" + << " handle_left" << p.handle_left + << " handle_right" << p.handle_right; + break; + } + return o << s.str(); + }; + } #endif From 032ca616dcb152e253fa2256201832b1a04a064f Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 27 Nov 2020 00:34:59 -0500 Subject: [PATCH 011/114] Tests: test << for Coordinate, Fraction, Point --- tests/Fraction.cpp | 13 +++++++++++++ tests/Point.cpp | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/tests/Fraction.cpp b/tests/Fraction.cpp index 8736abaf..57d37a79 100644 --- a/tests/Fraction.cpp +++ b/tests/Fraction.cpp @@ -32,6 +32,10 @@ #include "Fraction.h" +#include +#include +#include + using namespace std; using namespace openshot; @@ -148,3 +152,12 @@ TEST_CASE( "Reciprocal", "[libopenshot][fraction]" ) CHECK(f1.ToFloat() == Approx(1.77777f).margin(0.00001)); CHECK(f1.ToDouble() == Approx(1.77777f).margin(0.00001)); } + +TEST_CASE( "Operator ostream", "[libopenshot][fraction]" ) +{ + std::stringstream output; + openshot::Fraction f3(30000, 1001); + + output << f3; + CHECK(output.str() == "Fraction(30000, 1001)"); +} diff --git a/tests/Point.cpp b/tests/Point.cpp index 6d53f65b..f4e7792b 100644 --- a/tests/Point.cpp +++ b/tests/Point.cpp @@ -188,3 +188,26 @@ TEST_CASE( "SetJson", "[libopenshot][point]" ) CHECK(p1.handle_type == openshot::HandleType::MANUAL); CHECK(p1.interpolation == openshot::InterpolationType::CONSTANT); } + + +TEST_CASE( "Operator ostream", "[libopenshot][point]" ) +{ + openshot::Coordinate c1(10, 5); + + std::stringstream output1; + openshot::Point p1(c1, openshot::InterpolationType::LINEAR); + output1 << p1; + CHECK(output1.str() == "co(10, 5) interpolation(LINEAR)"); + + std::stringstream output2; + openshot::Point p2(c1, openshot::InterpolationType::CONSTANT); + output2 << p2; + CHECK(output2.str() == "co(10, 5) interpolation(CONSTANT)"); + + std::stringstream output3; + openshot::Point p3(c1, openshot::InterpolationType::BEZIER); + output3 << p3; + CHECK( + output3.str() == + "co(10, 5) interpolation(BEZIER) handle_left(0.5, 1) handle_right(0.5, 0)"); +} From f6013666de2802c4d2af1c27799ba5a3ba8a0c99 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 11 Jun 2021 05:30:38 -0400 Subject: [PATCH 012/114] KeyFrame: New PrintPoints() and PrintValues() --- src/KeyFrame.cpp | 67 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index ef8b045e..e25f4d7c 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -28,16 +28,18 @@ * along with OpenShot Library. If not, see . */ -#include -#include -#include -#include // For assert() -#include // For std::cout -#include // For std::setprecision - #include "KeyFrame.h" #include "Exceptions.h" +#include // For std::lower_bound, std::move_backward +#include // For std::less, std::less_equal, etc… +#include // For std::swap +#include // For std::accumulate +#include // For assert() +#include // For fabs, round +#include // For std::cout +#include // For std::setprecision + using namespace std; using namespace openshot; @@ -560,21 +562,50 @@ void Keyframe::UpdatePoint(int64_t index, Point p) { } void Keyframe::PrintPoints(std::ostream* out) const { - *out << std::fixed << std::setprecision(4); - for (std::vector::const_iterator it = Points.begin(); it != Points.end(); it++) { - Point p = *it; - *out << p.co.X << "\t" << p.co.Y << std::endl; - } + *out << std::right << std::setprecision(4) << std::setfill(' '); + for (const auto& p : Points) { + *out << std::defaultfloat + << std::setw(6) << p.co.X + << std::setw(14) << std::fixed << p.co.Y + << '\n'; + } + *out << std::flush; } void Keyframe::PrintValues(std::ostream* out) const { - *out << std::fixed << std::setprecision(4); - *out << "Frame Number (X)\tValue (Y)\tIs Increasing\tRepeat Numerator\tRepeat Denominator\tDelta (Y Difference)\n"; + // Column widths + std::vector w{10, 12, 8, 11, 19}; - for (int64_t i = 1; i < GetLength(); ++i) { - *out << i << "\t" << GetValue(i) << "\t" << IsIncreasing(i) << "\t" ; - *out << GetRepeatFraction(i).num << "\t" << GetRepeatFraction(i).den << "\t" << GetDelta(i) << "\n"; - } + *out << std::right << std::setfill(' ') << std::boolalpha + << std::setprecision(4); + // Headings + *out << "│" + << std::setw(w[0]) << "Frame# (X)" << " │" + << std::setw(w[1]) << "Y Value" << " │" + << std::setw(w[2]) << "Delta Y" << " │ " + << std::setw(w[3]) << "Increasing?" << " │ " + << std::setw(w[4]) << std::left << "Repeat Fraction" << std::right + << "│\n"; + // Divider + *out << "├───────────" + << "┼─────────────" + << "┼─────────" + << "┼─────────────" + << "┼────────────────────┤\n"; + + for (int64_t i = 1; i < GetLength(); ++i) { + *out << "│" + << std::setw(w[0]-2) << std::defaultfloat << i + << (Contains(Point(i, 1)) ? " *" : " ") << " │" + << std::setw(w[1]) << std::fixed << GetValue(i) << " │" + << std::setw(w[2]) << std::defaultfloat << std::showpos + << GetDelta(i) << " │ " << std::noshowpos + << std::setw(w[3]) << IsIncreasing(i) << " │ " + << std::setw(w[4]) << std::left << GetRepeatFraction(i) + << std::right << "│\n"; + } + *out << " * = Keyframe point (non-interpolated)\n"; + *out << std::flush; } From 6a1579edd0d8e7bd0588ccd43a56d8fa2f52a16b Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 11 Jun 2021 05:49:42 -0400 Subject: [PATCH 013/114] tests/KeyFrame: Tests for Print__() methods --- tests/KeyFrame.cpp | 71 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/tests/KeyFrame.cpp b/tests/KeyFrame.cpp index 599c973f..3f186729 100644 --- a/tests/KeyFrame.cpp +++ b/tests/KeyFrame.cpp @@ -516,6 +516,75 @@ TEST_CASE( "std::vector constructor", "[libopenshot][keyframe]" ) CHECK(k1.GetValue(10) == Approx(30.0f).margin(0.0001)); } +TEST_CASE( "PrintPoints", "[libopenshot][keyframe]" ) +{ + std::vector points{ + Point(1, 10), + Point(225, 397), + Point(430, -153.4), + Point(999, 12345.678) + }; + Keyframe k1(points); + + std::stringstream output; + k1.PrintPoints(&output); + + const std::string expected = +R"( 1 10.0000 + 225 397.0000 + 430 -153.4000 + 999 12345.6777)"; + + // Ensure the two strings are equal up to the limits of 'expected' + CHECK(output.str().compare(0, expected.size(), expected) == 0); +} + +TEST_CASE( "PrintValues", "[libopenshot][keyframe]" ) +{ + std::vector points{ + Point(1, 10), + Point(225, 397), + Point(430, -153.4), + Point(999, 12345.678) + }; + Keyframe k1(points); + + std::stringstream output; + k1.PrintValues(&output); + + const std::string expected = +R"(│Frame# (X) │ Y Value │ Delta Y │ Increasing? │ Repeat Fraction │ +├───────────┼─────────────┼─────────┼─────────────┼────────────────────┤ +│ 1 * │ 10.0000 │ +10 │ true │ Fraction(1, 7) │ +│ 2 │ 10.0104 │ +0 │ true │ Fraction(2, 7) │ +│ 3 │ 10.0414 │ +0 │ true │ Fraction(3, 7) │ +│ 4 │ 10.0942 │ +0 │ true │ Fraction(4, 7) │ +│ 5 │ 10.1665 │ +0 │ true │ Fraction(5, 7) │ +│ 6 │ 10.2633 │ +0 │ true │ Fraction(6, 7) │ +│ 7 │ 10.3794 │ +0 │ true │ Fraction(7, 7) │ +│ 8 │ 10.5193 │ +1 │ true │ Fraction(1, 5) │ +│ 9 │ 10.6807 │ +0 │ true │ Fraction(2, 5) │ +│ 10 │ 10.8636 │ +0 │ true │ Fraction(3, 5) │ +│ 11 │ 11.0719 │ +0 │ true │ Fraction(4, 5) │ +│ 12 │ 11.3021 │ +0 │ true │ Fraction(5, 5) │ +│ 13 │ 11.5542 │ +1 │ true │ Fraction(1, 4) │ +│ 14 │ 11.8334 │ +0 │ true │ Fraction(2, 4) │ +│ 15 │ 12.1349 │ +0 │ true │ Fraction(3, 4) │ +│ 16 │ 12.4587 │ +0 │ true │ Fraction(4, 4) │ +│ 17 │ 12.8111 │ +1 │ true │ Fraction(1, 2) │ +│ 18 │ 13.1863 │ +0 │ true │ Fraction(2, 2) │ +│ 19 │ 13.5840 │ +1 │ true │ Fraction(1, 3) │ +│ 20 │ 14.0121 │ +0 │ true │ Fraction(2, 3) │ +│ 21 │ 14.4632 │ +0 │ true │ Fraction(3, 3) │ +│ 22 │ 14.9460 │ +1 │ true │ Fraction(1, 2) │ +│ 23 │ 15.4522 │ +0 │ true │ Fraction(2, 2) │ +│ 24 │ 15.9818 │ +1 │ true │ Fraction(1, 1) │ +│ 25 │ 16.5446 │ +1 │ true │ Fraction(1, 2) │)"; + + // Ensure the two strings are equal up to the limits of 'expected' + CHECK(output.str().compare(0, expected.size(), expected) == 0); +} + #ifdef USE_OPENCV TEST_CASE( "TrackedObjectBBox init", "[libopenshot][keyframe]" ) { @@ -735,4 +804,4 @@ TEST_CASE( "GetBoxValues", "[libopenshot][keyframe]" ) CHECK(boxValues["h"] == 20.0); CHECK(boxValues["ang"] == 30.0); } -#endif \ No newline at end of file +#endif From 21519f3bc3974cd4e6783390819742f93c234660 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 2 Jul 2021 20:39:30 -0400 Subject: [PATCH 014/114] Coordinate.h: Fix indentation, docs --- src/Coordinate.h | 90 +++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/src/Coordinate.h b/src/Coordinate.h index f2b8b5fb..881b9807 100644 --- a/src/Coordinate.h +++ b/src/Coordinate.h @@ -37,55 +37,57 @@ namespace openshot { - /** - * @brief This class represents a Cartesian coordinate (X, Y) used in the Keyframe animation system. - * - * Animation involves the changing (i.e. interpolation) of numbers over time. A series of Coordinate - * objects allows us to plot a specific curve or line used during interpolation. In other words, it helps us - * control how a number changes over time (quickly or slowly). - * - * Please see the following Example Code: - * \code - * Coordinate c1(2,4); - * assert(c1.X == 2.0f); - * assert(c1.Y == 4.0f); - * \endcode - */ - class Coordinate { - public: - double X; ///< The X value of the coordinate (usually representing the frame #) - double Y; ///< The Y value of the coordinate (usually representing the value of the property being animated) +/** + * @brief A Cartesian coordinate (X, Y) used in the Keyframe animation system. + * + * Animation involves the changing (i.e. interpolation) of numbers over time. + * A series of Coordinate objects allows us to plot a specific curve or line + * used during interpolation. In other words, it helps us control how a + * value changes over time — whether it's increasing or decreasing + * (the direction of the slope) and how quickly (the steepness of the curve). + * + * Please see the following Example Code: + * \code + * Coordinate c1(2,4); + * assert(c1.X == 2.0f); + * assert(c1.Y == 4.0f); + * \endcode + */ +class Coordinate { +public: + double X; ///< The X value of the coordinate (usually representing the frame #) + double Y; ///< The Y value of the coordinate (usually representing the value of the property being animated) - /// The default constructor, which defaults to (0,0) - Coordinate(); + /// The default constructor, which defaults to (0,0) + Coordinate(); - /// @brief Constructor which also sets the X and Y - /// @param x The X coordinate (usually representing the frame #) - /// @param y The Y coordinate (usually representing the value of the property being animated) - Coordinate(double x, double y); + /// @brief Constructor which also sets the X and Y + /// @param x The X coordinate (usually representing the frame #) + /// @param y The Y coordinate (usually representing the value of the property being animated) + Coordinate(double x, double y); - /// @brief Constructor which accepts a std::pair tuple for {X, Y} - /// @param co A std::pair tuple containing (X, Y) - Coordinate(const std::pair& co); + /// @brief Constructor which accepts a std::pair tuple for {X, Y} + /// @param co A std::pair tuple containing (X, Y) + Coordinate(const std::pair& co); - // Get and Set JSON methods - std::string Json() const; ///< Generate JSON string of this object - Json::Value JsonValue() const; ///< Generate Json::Value for this object - void SetJson(const std::string value); ///< Load JSON string into this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object - }; + // Get and Set JSON methods + std::string Json() const; ///< Generate JSON string of this object + Json::Value JsonValue() const; ///< Generate Json::Value for this object + void SetJson(const std::string value); ///< Load JSON string into this object + void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object +}; - /// Stream output operator for openshot::Coordinate - template - std::basic_ostream& - operator<<(std::basic_ostream& o, const openshot::Coordinate& co) { - std::basic_ostringstream s; - s.flags(o.flags()); - s.imbue(o.getloc()); - s.precision(o.precision()); - s << "(" << co.X << ", " << co.Y << ")"; - return o << s.str(); - }; +/// Stream output operator for openshot::Coordinate +template +std::basic_ostream& +operator<<(std::basic_ostream& o, const openshot::Coordinate& co) { + std::basic_ostringstream s; + s.flags(o.flags()); + s.imbue(o.getloc()); + s.precision(o.precision()); + s << "(" << co.X << ", " << co.Y << ")"; + return o << s.str(); +}; } From b3c43166fa81ea5211a54a56b87af307c416fada Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 2 Jul 2021 20:41:04 -0400 Subject: [PATCH 015/114] Fraction.h: Fix indentation --- src/Fraction.h | 93 +++++++++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/src/Fraction.h b/src/Fraction.h index a09db625..32064969 100644 --- a/src/Fraction.h +++ b/src/Fraction.h @@ -38,62 +38,63 @@ namespace openshot { - /** - * @brief This class represents a fraction - * - * Fractions are often used in video editing to represent ratios and rates, for example: - * pixel ratios, frames per second, timebase, and other common ratios. Fractions are preferred - * over decimals due to their increased precision. - */ - class Fraction { - public: - int num; /// pair); + /// Constructor that accepts a (num, den) pair + Fraction(std::pair pair); - /// Constructor that takes a vector of length 2 (containing {num, den}) - Fraction(std::vector vector); + /// Constructor that takes a vector of length 2 (containing {num, den}) + Fraction(std::vector vector); - /// Constructor that takes a key-value mapping (keys: 'num'. 'den') - Fraction(std::map mapping); + /// Constructor that takes a key-value mapping (keys: 'num'. 'den') + Fraction(std::map mapping); - /// Calculate the greatest common denominator - int GreatestCommonDenominator(); + /// Calculate the greatest common denominator + int GreatestCommonDenominator(); - /// Reduce this fraction (i.e. 640/480 = 4/3) - void Reduce(); + /// Reduce this fraction (i.e. 640/480 = 4/3) + void Reduce(); - /// Return this fraction as a float (i.e. 1/2 = 0.5) - float ToFloat(); + /// Return this fraction as a float (i.e. 1/2 = 0.5) + float ToFloat(); - /// Return this fraction as a double (i.e. 1/2 = 0.5) - double ToDouble() const; + /// Return this fraction as a double (i.e. 1/2 = 0.5) + double ToDouble() const; - /// Return a rounded integer of the fraction (for example 30000/1001 returns 30) - int ToInt(); + /// Return a rounded integer of the fraction (for example 30000/1001 returns 30) + int ToInt(); - /// Return the reciprocal as a Fraction - Fraction Reciprocal() const; - }; + /// Return the reciprocal as a Fraction + Fraction Reciprocal() const; +}; - // Stream output operator for openshot::Fraction - template - std::basic_ostream& - operator<<(std::basic_ostream& o, const openshot::Fraction& frac) { - std::basic_ostringstream s; - s.flags(o.flags()); - s.imbue(o.getloc()); - s.precision(o.precision()); - s << "Fraction(" << frac.num << ", " << frac.den << ")"; - return o << s.str(); - }; -} +// Stream output operator for openshot::Fraction +template +std::basic_ostream& +operator<<(std::basic_ostream& o, const openshot::Fraction& frac) { + std::basic_ostringstream s; + s.flags(o.flags()); + s.imbue(o.getloc()); + s.precision(o.precision()); + s << "Fraction(" << frac.num << ", " << frac.den << ")"; + return o << s.str(); +}; + +} // namespace openshot #endif From 584e075f678efa1fbbabccc32f7df7da70d707e6 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 2 Jul 2021 21:03:26 -0400 Subject: [PATCH 016/114] Point: Rethink stream formatting --- src/Point.h | 196 ++++++++++++++++++++++++------------------------ tests/Point.cpp | 24 +++--- 2 files changed, 108 insertions(+), 112 deletions(-) diff --git a/src/Point.h b/src/Point.h index 2602fb9f..48ebea45 100644 --- a/src/Point.h +++ b/src/Point.h @@ -37,120 +37,118 @@ namespace openshot { - /** - * @brief This controls how a Keyframe uses this point to interpolate between two points. - * - * Bezier is a smooth curve. Linear is a straight line. Constant is a jump from the - * previous point to this one. - */ - enum InterpolationType { - BEZIER, ///< Bezier curves are quadratic curves, which create a smooth curve. - LINEAR, ///< Linear curves are angular, straight lines between two points. - CONSTANT ///< Constant curves jump from their previous position to a new one (with no interpolation). - }; +/** + * @brief This controls how a Keyframe uses this point to interpolate between two points. + * + * Bezier is a smooth curve. Linear is a straight line. Constant is a jump from the + * previous point to this one. + */ +enum InterpolationType { + BEZIER, ///< Bezier curves are quadratic curves, which create a smooth curve. + LINEAR, ///< Linear curves are angular, straight lines between two points. + CONSTANT ///< Constant curves jump from their previous position to a new one (with no interpolation). +}; - /** - * @brief When BEZIER interpolation is used, the point's left and right handles are used - * to influence the direction of the curve. - * - * AUTO will try and adjust the handles automatically, to achieve the smoothest curves. - * MANUAL will leave the handles alone, making it the responsibility of the user to set them. - */ - enum HandleType { - AUTO, ///< Automatically adjust the handles to achieve the smoothest curve - MANUAL ///< Do not automatically adjust handles (set them manually) - }; +/** + * @brief When BEZIER interpolation is used, the point's left and right handles are used + * to influence the direction of the curve. + * + * AUTO will try and adjust the handles automatically, to achieve the smoothest curves. + * MANUAL will leave the handles alone, making it the responsibility of the user to set them. + */ +enum HandleType { + AUTO, ///< Automatically adjust the handles to achieve the smoothest curve + MANUAL ///< Do not automatically adjust handles (set them manually) +}; - /** - * @brief A Point is the basic building block of a key-frame curve. - * - * Points have a primary coordinate and a left and right handle coordinate. - * The handles are used to influence the direction of the curve as it - * moves between the primary coordinate and the next primary coordinate when the - * interpolation mode is BEZIER. When using LINEAR or CONSTANT, the handles are - * ignored. - * - * Please see the following Example Code: - * \code - * Coordinate c1(3,9); - * Point p1(c1, BEZIER); - * assert(c1.X == 3); - * assert(c1.Y == 9); - * - * \endcode - */ - class Point { - public: - Coordinate co; ///< This is the primary coordinate - Coordinate handle_left; ///< This is the left handle coordinate (in percentages from 0 to 1) - Coordinate handle_right; ///< This is the right handle coordinate (in percentages from 0 to 1) - InterpolationType interpolation; ///< This is the interpolation mode - HandleType handle_type; ///< This is the handle mode +/** + * @brief A Point is the basic building block of a key-frame curve. + * + * Points have a primary coordinate and a left and right handle coordinate. + * The handles are used to influence the direction of the curve as it + * moves between the primary coordinate and the next primary coordinate when the + * interpolation mode is BEZIER. When using LINEAR or CONSTANT, the handles are + * ignored. + * + * Please see the following Example Code: + * \code + * Coordinate c1(3,9); + * Point p1(c1, BEZIER); + * assert(c1.X == 3); + * assert(c1.Y == 9); + * + * \endcode + */ +class Point { +public: + Coordinate co; ///< This is the primary coordinate + Coordinate handle_left; ///< This is the left handle coordinate (in percentages from 0 to 1) + Coordinate handle_right; ///< This is the right handle coordinate (in percentages from 0 to 1) + InterpolationType interpolation; ///< This is the interpolation mode + HandleType handle_type; ///< This is the handle mode - /// Default constructor (defaults to 1,0) - Point(); + /// Default constructor (defaults to 1,0) + Point(); - /// Constructor which creates a single coordinate at X=1 - Point(float y); + /// Constructor which creates a single coordinate at X=1 + Point(float y); - /// Constructor which also creates a Point and sets the X and Y of the Point. - Point(float x, float y); + /// Constructor which also creates a Point and sets the X and Y of the Point. + Point(float x, float y); - /// Constructor which also creates a Point and sets the X,Y, and interpolation of the Point. - Point(float x, float y, InterpolationType interpolation); + /// Constructor which also creates a Point and sets the X,Y, and interpolation of the Point. + Point(float x, float y, InterpolationType interpolation); - /// Constructor which takes a coordinate - Point(const Coordinate& co); + /// Constructor which takes a coordinate + Point(const Coordinate& co); - /// Constructor which takes a coordinate and interpolation mode - Point(const Coordinate& co, InterpolationType interpolation); + /// Constructor which takes a coordinate and interpolation mode + Point(const Coordinate& co, InterpolationType interpolation); - /// Constructor which takes a coordinate, interpolation mode, and handle type - Point(const Coordinate& co, InterpolationType interpolation, HandleType handle_type); + /// Constructor which takes a coordinate, interpolation mode, and handle type + Point(const Coordinate& co, InterpolationType interpolation, HandleType handle_type); - /// Set the left and right handles to a percent of the primary coordinate (0 to 1) - /// Defaults to a smooth curve (Ease in and out) - void Initialize_Handles(); + /// Set the left and right handles to a percent of the primary coordinate (0 to 1) + /// Defaults to a smooth curve (Ease in and out) + void Initialize_Handles(); - /// Set the left handle to a percent of the primary coordinate (0 to 1) - void Initialize_LeftHandle(float x, float y); + /// Set the left handle to a percent of the primary coordinate (0 to 1) + void Initialize_LeftHandle(float x, float y); - /// Set the right handle to a percent of the primary coordinate (0 to 1) - void Initialize_RightHandle(float x, float y); + /// Set the right handle to a percent of the primary coordinate (0 to 1) + void Initialize_RightHandle(float x, float y); - // Get and Set JSON methods - std::string Json() const; ///< Generate JSON string of this object - Json::Value JsonValue() const; ///< Generate Json::Value for this object - void SetJson(const std::string value); ///< Load JSON string into this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + // Get and Set JSON methods + std::string Json() const; ///< Generate JSON string of this object + Json::Value JsonValue() const; ///< Generate Json::Value for this object + void SetJson(const std::string value); ///< Load JSON string into this object + void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object - }; +}; - // Stream output operator for openshot::Point - template - std::basic_ostream& - operator<<(std::basic_ostream& o, const openshot::Point& p) { - std::basic_ostringstream s; - s.flags(o.flags()); - s.imbue(o.getloc()); - s.precision(o.precision()); - s << "co" << p.co; - switch(p.interpolation) { - case(openshot::LINEAR): - s << " interpolation(LINEAR)"; - break; - case(openshot::CONSTANT): - s << " interpolation(CONSTANT)"; - break; - case(openshot::BEZIER): - s << " interpolation(BEZIER)" - << " handle_left" << p.handle_left - << " handle_right" << p.handle_right; - break; - } - return o << s.str(); - }; +// Stream output operator for openshot::Point +template +std::basic_ostream& +operator<<(std::basic_ostream& o, const openshot::Point& p) { + std::basic_ostringstream s; + s.flags(o.flags()); + s.imbue(o.getloc()); + s.precision(o.precision()); + s << "co" << p.co; + switch(p.interpolation) { + case(InterpolationType::LINEAR): + s << " LINEAR"; + break; + case(InterpolationType::CONSTANT): + s << " CONSTANT"; + break; + case(InterpolationType::BEZIER): + s << " BEZIER[L" << p.handle_left << ",R" << p.handle_right << ']'; + break; + } + return o << s.str(); +}; -} +} // namespace openshot #endif diff --git a/tests/Point.cpp b/tests/Point.cpp index f4e7792b..57cff7c7 100644 --- a/tests/Point.cpp +++ b/tests/Point.cpp @@ -52,7 +52,7 @@ TEST_CASE( "default constructor", "[libopenshot][point]" ) CHECK(p.interpolation == openshot::InterpolationType::BEZIER); CHECK(p.handle_type == openshot::HandleType::AUTO); } -TEST_CASE( "XY constructor", "[libopenshot][point]" ) +TEST_CASE( "x,y ctor", "[libopenshot][point]" ) { // Create a point with X and Y values openshot::Point p1(2,9); @@ -62,7 +62,7 @@ TEST_CASE( "XY constructor", "[libopenshot][point]" ) CHECK(p1.interpolation == openshot::InterpolationType::BEZIER); } -TEST_CASE( "std::pair constructor", "[libopenshot][point]" ) +TEST_CASE( "std::pair ctor", "[libopenshot][point]" ) { // Create a point from a std::pair std::pair coordinates(22, 5); @@ -72,7 +72,7 @@ TEST_CASE( "std::pair constructor", "[libopenshot][point]" ) CHECK(p1.co.Y == Approx(5.0f).margin(0.00001)); } -TEST_CASE( "constructor from Coordinate", "[libopenshot][point]" ) +TEST_CASE( "Coordinate ctor", "[libopenshot][point]" ) { // Create a point with a coordinate openshot::Coordinate c1(3,7); @@ -83,7 +83,7 @@ TEST_CASE( "constructor from Coordinate", "[libopenshot][point]" ) CHECK(p1.interpolation == openshot::InterpolationType::BEZIER); } -TEST_CASE( "constructor from Coordinate, LINEAR", "[libopenshot][point]" ) +TEST_CASE( "Coordinate ctor, LINEAR", "[libopenshot][point]" ) { // Create a point with a coordinate and interpolation openshot::Coordinate c1(3,9); @@ -95,7 +95,7 @@ TEST_CASE( "constructor from Coordinate, LINEAR", "[libopenshot][point]" ) CHECK(p1.interpolation == openshot::InterpolationType::LINEAR); } -TEST_CASE( "constructor from Coordinate, BEZIER", "[libopenshot][point]" ) +TEST_CASE( "Coordinate ctor, BEZIER", "[libopenshot][point]" ) { // Create a point with a coordinate and interpolation openshot::Coordinate c1(3,9); @@ -107,7 +107,7 @@ TEST_CASE( "constructor from Coordinate, BEZIER", "[libopenshot][point]" ) CHECK(p1.interpolation == openshot::InterpolationType::BEZIER); } -TEST_CASE( "constructor from Coordinate, CONSTANT", "[libopenshot][point]" ) +TEST_CASE( "Coordinate ctor, CONSTANT", "[libopenshot][point]" ) { // Create a point with a coordinate and interpolation openshot::Coordinate c1(2,8); @@ -119,7 +119,7 @@ TEST_CASE( "constructor from Coordinate, CONSTANT", "[libopenshot][point]" ) CHECK(p1.interpolation == openshot::InterpolationType::CONSTANT); } -TEST_CASE( "constructor from Coordinate, BEZIER+AUTO", "[libopenshot][point]" ) +TEST_CASE( "Coordinate ctor, BEZIER+AUTO", "[libopenshot][point]" ) { // Create a point with a coordinate and interpolation openshot::Coordinate c1(3,9); @@ -133,7 +133,7 @@ TEST_CASE( "constructor from Coordinate, BEZIER+AUTO", "[libopenshot][point]" ) CHECK(p1.handle_type == openshot::HandleType::AUTO); } -TEST_CASE( "constructor from Coordinate, BEZIER+MANUAL", "[libopenshot][point]" ) +TEST_CASE( "Coordinate ctor, BEZIER+MANUAL", "[libopenshot][point]" ) { // Create a point with a coordinate and interpolation openshot::Coordinate c1(3,9); @@ -197,17 +197,15 @@ TEST_CASE( "Operator ostream", "[libopenshot][point]" ) std::stringstream output1; openshot::Point p1(c1, openshot::InterpolationType::LINEAR); output1 << p1; - CHECK(output1.str() == "co(10, 5) interpolation(LINEAR)"); + CHECK(output1.str() == "co(10, 5) LINEAR"); std::stringstream output2; openshot::Point p2(c1, openshot::InterpolationType::CONSTANT); output2 << p2; - CHECK(output2.str() == "co(10, 5) interpolation(CONSTANT)"); + CHECK(output2.str() == "co(10, 5) CONSTANT"); std::stringstream output3; openshot::Point p3(c1, openshot::InterpolationType::BEZIER); output3 << p3; - CHECK( - output3.str() == - "co(10, 5) interpolation(BEZIER) handle_left(0.5, 1) handle_right(0.5, 0)"); + CHECK(output3.str() == "co(10, 5) BEZIER[L(0.5, 1),R(0.5, 0)]"); } From b39ff359ad9c546572128a284207e8c6353155da Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 12 Jul 2021 22:47:43 -0400 Subject: [PATCH 017/114] Exceptions: Add py_message() for Python - Most exceptions are now based on two new base classes, FileExceptionBase and FrameExceptionBase. - All exception classes now export a `py_message()` method (inherited or defined) which constructs a message for Python that includes **all** arguments to the exception, not just the why() text. - Python's exception handling is updated to catch openshot::ExceptionBase and display py_message() instead of why() - (I didn't modify why() because it returns char*; py_message() returns a std::string.) --- bindings/python/openshot.i | 3 + src/Exceptions.h | 146 +++++++++++++++++++++++-------------- 2 files changed, 96 insertions(+), 53 deletions(-) diff --git a/bindings/python/openshot.i b/bindings/python/openshot.i index 6f3f61c4..476af032 100644 --- a/bindings/python/openshot.i +++ b/bindings/python/openshot.i @@ -131,6 +131,9 @@ try { $action } + catch (openshot::ExceptionBase &e) { + SWIG_exception_fail(SWIG_RuntimeError, e.py_message().c_str()); + } catch (std::exception &e) { SWIG_exception_fail(SWIG_RuntimeError, e.what()); } diff --git a/src/Exceptions.h b/src/Exceptions.h index de0ba64e..8ab3301f 100644 --- a/src/Exceptions.h +++ b/src/Exceptions.h @@ -32,6 +32,7 @@ #define OPENSHOT_EXCEPTIONS_H #include +#include namespace openshot { @@ -52,13 +53,49 @@ namespace openshot { // return custom message return m_message.c_str(); } + virtual std::string py_message() const { + // return complete message for Python exception handling + return m_message; + } }; + class FrameExceptionBase : public ExceptionBase + { + public: + int64_t frame_number; + FrameExceptionBase(std::string message, int64_t frame_number=-1) + : ExceptionBase(message), frame_number(frame_number) { } + virtual std::string py_message() const override { + // return complete message for Python exception handling + std::string out_msg(m_message + + (frame_number > 0 + ? " at frame " + std::to_string(frame_number) + : "")); + return out_msg; + } + }; + + + class FileExceptionBase : public ExceptionBase + { + public: + std::string file_path; + FileExceptionBase(std::string message, std::string file_path="") + : ExceptionBase(message), file_path(file_path) { } + virtual std::string py_message() const override { + // return complete message for Python exception handling + std::string out_msg(m_message + + (file_path != "" + ? " for file " + file_path + : "")); + return out_msg; + } + }; + /// Exception when a required chunk is missing - class ChunkNotFound : public ExceptionBase + class ChunkNotFound : public FrameExceptionBase { public: - int64_t frame_number; int64_t chunk_number; int64_t chunk_frame; /** @@ -70,7 +107,7 @@ namespace openshot { * @param chunk_frame The chunk frame */ ChunkNotFound(std::string message, int64_t frame_number, int64_t chunk_number, int64_t chunk_frame) - : ExceptionBase(message), frame_number(frame_number), chunk_number(chunk_number), chunk_frame(chunk_frame) { } + : FrameExceptionBase(message, frame_number), chunk_number(chunk_number), chunk_frame(chunk_frame) { } virtual ~ChunkNotFound() noexcept {} }; @@ -90,58 +127,54 @@ namespace openshot { }; /// Exception when decoding audio packet - class ErrorDecodingAudio : public ExceptionBase + class ErrorDecodingAudio : public FrameExceptionBase { public: - int64_t frame_number; /** * @brief Constructor * * @param message A message to accompany the exception * @param frame_number The frame number being processed */ - ErrorDecodingAudio(std::string message, int64_t frame_number) - : ExceptionBase(message), frame_number(frame_number) { } + ErrorDecodingAudio(std::string message, int64_t frame_number=-1) + : FrameExceptionBase(message, frame_number) { } virtual ~ErrorDecodingAudio() noexcept {} }; /// Exception when encoding audio packet - class ErrorEncodingAudio : public ExceptionBase + class ErrorEncodingAudio : public FrameExceptionBase { public: - int64_t frame_number; /** * @brief Constructor * * @param message A message to accompany the exception * @param frame_number The frame number being processed */ - ErrorEncodingAudio(std::string message, int64_t frame_number) - : ExceptionBase(message), frame_number(frame_number) { } + ErrorEncodingAudio(std::string message, int64_t frame_number=-1) + : FrameExceptionBase(message, frame_number) { } virtual ~ErrorEncodingAudio() noexcept {} }; /// Exception when encoding audio packet - class ErrorEncodingVideo : public ExceptionBase + class ErrorEncodingVideo : public FrameExceptionBase { public: - int64_t frame_number; /** * @brief Constructor * * @param message A message to accompany the exception * @param frame_number The frame number being processed */ - ErrorEncodingVideo(std::string message, int64_t frame_number) - : ExceptionBase(message), frame_number(frame_number) { } + ErrorEncodingVideo(std::string message, int64_t frame_number=-1) + : FrameExceptionBase(message, frame_number) { } virtual ~ErrorEncodingVideo() noexcept {} }; /// Exception when an invalid # of audio channels are detected - class InvalidChannels : public ExceptionBase + class InvalidChannels : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -149,15 +182,14 @@ namespace openshot { * @param file_path (optional) The input file being processed */ InvalidChannels(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~InvalidChannels() noexcept {} }; /// Exception when no valid codec is found for a file - class InvalidCodec : public ExceptionBase + class InvalidCodec : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -165,15 +197,14 @@ namespace openshot { * @param file_path (optional) The input file being processed */ InvalidCodec(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~InvalidCodec() noexcept {} }; /// Exception for files that can not be found or opened - class InvalidFile : public ExceptionBase + class InvalidFile : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -181,15 +212,14 @@ namespace openshot { * @param file_path The input file being processed */ InvalidFile(std::string message, std::string file_path) - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~InvalidFile() noexcept {} }; /// Exception when no valid format is found for a file - class InvalidFormat : public ExceptionBase + class InvalidFormat : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -197,15 +227,14 @@ namespace openshot { * @param file_path (optional) The input file being processed */ InvalidFormat(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~InvalidFormat() noexcept {} }; /// Exception for invalid JSON - class InvalidJSON : public ExceptionBase + class InvalidJSON : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -213,15 +242,14 @@ namespace openshot { * @param file_path (optional) The input file being processed */ InvalidJSON(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~InvalidJSON() noexcept {} }; /// Exception when invalid encoding options are used - class InvalidOptions : public ExceptionBase + class InvalidOptions : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -229,15 +257,14 @@ namespace openshot { * @param file_path (optional) The input file being processed */ InvalidOptions(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~InvalidOptions() noexcept {} }; /// Exception when invalid sample rate is detected during encoding - class InvalidSampleRate : public ExceptionBase + class InvalidSampleRate : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -245,7 +272,7 @@ namespace openshot { * @param file_path (optional) The input file being processed */ InvalidSampleRate(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~InvalidSampleRate() noexcept {} }; @@ -263,13 +290,19 @@ namespace openshot { InvalidJSONKey(std::string message, std::string json) : ExceptionBase(message), json(json) { } virtual ~InvalidJSONKey() noexcept {} + std::string py_message() const override { + std::string out_msg = m_message + + " for JSON data " + + (json.size() > 100 ? " (abbreviated): " : ": ") + + json.substr(0, 99); + return out_msg; + } }; /// Exception when no streams are found in the file - class NoStreamsFound : public ExceptionBase + class NoStreamsFound : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -277,7 +310,7 @@ namespace openshot { * @param file_path (optional) The input file being processed */ NoStreamsFound(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~NoStreamsFound() noexcept {} }; @@ -297,6 +330,12 @@ namespace openshot { OutOfBoundsFrame(std::string message, int64_t frame_requested, int64_t max_frames) : ExceptionBase(message), FrameRequested(frame_requested), MaxFrames(max_frames) { } virtual ~OutOfBoundsFrame() noexcept {} + std::string py_message() const override { + std::string out_msg(m_message + + " Frame requested: " + std::to_string(FrameRequested) + + " Max frames: " + std::to_string(MaxFrames)); + return out_msg; + } }; /// Exception for an out of bounds key-frame point. @@ -315,13 +354,18 @@ namespace openshot { OutOfBoundsPoint(std::string message, int point_requested, int max_points) : ExceptionBase(message), PointRequested(point_requested), MaxPoints(max_points) { } virtual ~OutOfBoundsPoint() noexcept {} + std::string py_message() const override { + std::string out_msg(m_message + + " Point requested: " + std::to_string(PointRequested) + + " Max point: " + std::to_string(MaxPoints)); + return out_msg; + } }; /// Exception when memory could not be allocated - class OutOfMemory : public ExceptionBase + class OutOfMemory : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -329,15 +373,14 @@ namespace openshot { * @param file_path (optional) The input file being processed */ OutOfMemory(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~OutOfMemory() noexcept {} }; /// Exception when a reader is closed, and a frame is requested - class ReaderClosed : public ExceptionBase + class ReaderClosed : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -345,15 +388,14 @@ namespace openshot { * @param file_path (optional) The input file being processed */ ReaderClosed(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~ReaderClosed() noexcept {} }; /// Exception when resample fails - class ResampleError : public ExceptionBase + class ResampleError : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -361,7 +403,7 @@ namespace openshot { * @param file_path (optional) The input file being processed */ ResampleError(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~ResampleError() noexcept {} }; @@ -371,10 +413,9 @@ namespace openshot { /// Exception when too many seek attempts happen class __attribute__ ((deprecated(TMS_DEP_MSG))) - TooManySeeks : public ExceptionBase + TooManySeeks : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -387,10 +428,9 @@ namespace openshot { #endif /// Exception when a writer is closed, and a frame is requested - class WriterClosed : public ExceptionBase + class WriterClosed : public FileExceptionBase { public: - std::string file_path; /** * @brief Constructor * @@ -398,7 +438,7 @@ namespace openshot { * @param file_path (optional) The output file being written */ WriterClosed(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } + : FileExceptionBase(message, file_path) { } virtual ~WriterClosed() noexcept {} }; } From 369555b4b013f8871a9140470c9e6dfe2d9c6927 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 9 Aug 2021 09:54:59 -0400 Subject: [PATCH 018/114] Fix pedantic warnings (unnecessary ;s) --- src/Coordinate.cpp | 6 +++--- src/Coordinate.h | 2 +- src/FFmpegUtilities.h | 2 +- src/Fraction.cpp | 11 +++++------ src/Fraction.h | 2 +- src/Frame.cpp | 8 ++++---- src/Point.cpp | 12 ++++++------ src/Point.h | 2 +- 8 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/Coordinate.cpp b/src/Coordinate.cpp index 6a4abb21..d2a2ed3c 100644 --- a/src/Coordinate.cpp +++ b/src/Coordinate.cpp @@ -34,14 +34,14 @@ using namespace openshot; // Default constructor for a coordinate, delegating to the full signature -Coordinate::Coordinate() : Coordinate::Coordinate(0, 0) {}; +Coordinate::Coordinate() : Coordinate::Coordinate(0, 0) {} // Constructor which also allows the user to set the X and Y -Coordinate::Coordinate(double x, double y) : X(x), Y(y) {}; +Coordinate::Coordinate(double x, double y) : X(x), Y(y) {} // Constructor which accepts a std::pair for (X, Y) Coordinate::Coordinate(const std::pair& co) - : X(co.first), Y(co.second) {}; + : X(co.first), Y(co.second) {} // Generate JSON string of this object std::string Coordinate::Json() const { diff --git a/src/Coordinate.h b/src/Coordinate.h index 881b9807..d4576cd2 100644 --- a/src/Coordinate.h +++ b/src/Coordinate.h @@ -87,7 +87,7 @@ operator<<(std::basic_ostream& o, const openshot::Coordinate& co) s.precision(o.precision()); s << "(" << co.X << ", " << co.Y << ")"; return o << s.str(); -}; +} } diff --git a/src/FFmpegUtilities.h b/src/FFmpegUtilities.h index fe46a212..7579f11f 100644 --- a/src/FFmpegUtilities.h +++ b/src/FFmpegUtilities.h @@ -127,7 +127,7 @@ #endif // Does ffmpeg pixel format contain an alpha channel? - inline static const bool ffmpeg_has_alpha(PixelFormat pix_fmt) { + inline static bool ffmpeg_has_alpha(PixelFormat pix_fmt) { const AVPixFmtDescriptor *fmt_desc = av_pix_fmt_desc_get(pix_fmt); return bool(fmt_desc->flags & AV_PIX_FMT_FLAG_ALPHA); } diff --git a/src/Fraction.cpp b/src/Fraction.cpp index d4898326..cb13c393 100644 --- a/src/Fraction.cpp +++ b/src/Fraction.cpp @@ -34,21 +34,20 @@ using namespace openshot; // Delegating constructors -Fraction::Fraction() : Fraction::Fraction(1, 1) {}; +Fraction::Fraction() : Fraction::Fraction(1, 1) {} Fraction::Fraction(std::pair pair) - : Fraction::Fraction(pair.first, pair.second) {}; + : Fraction::Fraction(pair.first, pair.second) {} Fraction::Fraction(std::map mapping) - : Fraction::Fraction(mapping["num"], mapping["den"]) {}; + : Fraction::Fraction(mapping["num"], mapping["den"]) {} Fraction::Fraction(std::vector vector) - : Fraction::Fraction(vector[0], vector[1]) {}; + : Fraction::Fraction(vector[0], vector[1]) {} // Full constructor Fraction::Fraction(int num, int den) : - num(num), den(den) { -} + num(num), den(den) {} // Return this fraction as a float (i.e. 1/2 = 0.5) float Fraction::ToFloat() { diff --git a/src/Fraction.h b/src/Fraction.h index 32064969..3033cb92 100644 --- a/src/Fraction.h +++ b/src/Fraction.h @@ -94,7 +94,7 @@ operator<<(std::basic_ostream& o, const openshot::Fraction& frac) s.precision(o.precision()); s << "Fraction(" << frac.num << ", " << frac.den << ")"; return o << s.str(); -}; +} } // namespace openshot #endif diff --git a/src/Frame.cpp b/src/Frame.cpp index 244b065f..aed38777 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -66,15 +66,15 @@ Frame::Frame(int64_t number, int width, int height, std::string color, int sampl } // Delegating Constructor - blank frame -Frame::Frame() : Frame::Frame(1, 1, 1, "#000000", 0, 2) {}; +Frame::Frame() : Frame::Frame(1, 1, 1, "#000000", 0, 2) {} // Delegating Constructor - image only Frame::Frame(int64_t number, int width, int height, std::string color) - : Frame::Frame(number, width, height, color, 0, 2) {}; + : Frame::Frame(number, width, height, color, 0, 2) {} // Delegating Constructor - audio only Frame::Frame(int64_t number, int samples, int channels) - : Frame::Frame(number, 1, 1, "#000000", samples, channels) {}; + : Frame::Frame(number, 1, 1, "#000000", samples, channels) {} // Copy constructor @@ -918,7 +918,7 @@ cv::Mat Frame::Qimage2mat( std::shared_ptr& qimage) { cv::mixChannels( &mat, 1, &mat2, 1, from_to, 3 ); cv::cvtColor(mat2, mat2, cv::COLOR_RGB2BGR); return mat2; -}; +} // Get pointer to OpenCV image object cv::Mat Frame::GetImageCV() diff --git a/src/Point.cpp b/src/Point.cpp index 44b6883f..b11aa7ce 100644 --- a/src/Point.cpp +++ b/src/Point.cpp @@ -35,24 +35,24 @@ using namespace std; using namespace openshot; // Default constructor -Point::Point() : Point::Point(Coordinate(1, 0), BEZIER, AUTO) {}; +Point::Point() : Point::Point(Coordinate(1, 0), BEZIER, AUTO) {} // Constructor which creates a single coordinate at X=1 -Point::Point(float y) : Point::Point(Coordinate(1, y), CONSTANT, AUTO) {}; +Point::Point(float y) : Point::Point(Coordinate(1, y), CONSTANT, AUTO) {} // Constructor which creates a Bezier curve with point at (x, y) -Point::Point(float x, float y) : Point::Point(Coordinate(x, y), BEZIER, AUTO) {}; +Point::Point(float x, float y) : Point::Point(Coordinate(x, y), BEZIER, AUTO) {} // Constructor which also creates a Point, setting X,Y, and interpolation. Point::Point(float x, float y, InterpolationType interpolation) - : Point::Point(Coordinate(x, y), interpolation, AUTO) {}; + : Point::Point(Coordinate(x, y), interpolation, AUTO) {} // Direct Coordinate-accepting constructors -Point::Point(const Coordinate& co) : Point::Point(co, BEZIER, AUTO) {}; +Point::Point(const Coordinate& co) : Point::Point(co, BEZIER, AUTO) {} Point::Point(const Coordinate& co, InterpolationType interpolation) - : Point::Point(co, interpolation, AUTO) {}; + : Point::Point(co, interpolation, AUTO) {} Point::Point(const Coordinate& co, InterpolationType interpolation, HandleType handle_type) : co(co), interpolation(interpolation), handle_type(handle_type) { diff --git a/src/Point.h b/src/Point.h index 48ebea45..118e6d39 100644 --- a/src/Point.h +++ b/src/Point.h @@ -147,7 +147,7 @@ operator<<(std::basic_ostream& o, const openshot::Point& p) { break; } return o << s.str(); -}; +} } // namespace openshot From 29b6810c32b71d35ca256f67a563882fdc366ce2 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 9 Aug 2021 10:00:58 -0400 Subject: [PATCH 019/114] Init members in initializer lists --- src/AudioReaderSource.cpp | 22 +++++++++++++--------- src/ClipBase.h | 16 +++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/AudioReaderSource.cpp b/src/AudioReaderSource.cpp index acd69deb..19fbb6ca 100644 --- a/src/AudioReaderSource.cpp +++ b/src/AudioReaderSource.cpp @@ -35,21 +35,25 @@ using namespace std; using namespace openshot; // Constructor that reads samples from a reader -AudioReaderSource::AudioReaderSource(ReaderBase *audio_reader, int64_t starting_frame_number, int buffer_size) - : reader(audio_reader), frame_number(starting_frame_number), - size(buffer_size), position(0), frame_position(0), estimated_frame(0), speed(1) { - - // Initialize an audio buffer (based on reader) - buffer = new juce::AudioSampleBuffer(reader->info.channels, size); - - // initialize the audio samples to zero (silence) +AudioReaderSource::AudioReaderSource( + ReaderBase *audio_reader, int64_t starting_frame_number, int buffer_size +) : + position(0), + size(buffer_size), + buffer(new juce::AudioSampleBuffer(audio_reader->info.channels, buffer_size)), + speed(1), + reader(audio_reader), + frame_number(starting_frame_number), + frame_position(0), + estimated_frame(0) +{ + // Zero the buffer contents buffer->clear(); } // Destructor AudioReaderSource::~AudioReaderSource() { - // Clear and delete the buffer delete buffer; buffer = NULL; } diff --git a/src/ClipBase.h b/src/ClipBase.h index c38b9790..2f138a5c 100644 --- a/src/ClipBase.h +++ b/src/ClipBase.h @@ -68,15 +68,13 @@ namespace openshot { CacheMemory cache; /// Constructor for the base clip - ClipBase() { - // Initialize values - position = 0.0; - layer = 0; - start = 0.0; - end = 0.0; - previous_properties = ""; - timeline = NULL; - }; + ClipBase() : + position(0.0), + layer(0), + start(0.0), + end(0.0), + previous_properties(""), + timeline(nullptr) {} // Compare a clip using the Position() property bool operator< ( ClipBase& a) { return (Position() < a.Position()); } From 73b009d38f678ca77a1b1564e1f2492b8ff1fed7 Mon Sep 17 00:00:00 2001 From: Jackson Date: Thu, 19 Aug 2021 15:40:39 -0500 Subject: [PATCH 020/114] Update Version to 0.2.6 SO 20 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fd0cb15..a36eed24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,8 +40,8 @@ For more information, please visit . set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") ################ PROJECT VERSION #################### -set(PROJECT_VERSION_FULL "0.2.5-dev3") -set(PROJECT_SO_VERSION 19) +set(PROJECT_VERSION_FULL "0.2.6") +set(PROJECT_SO_VERSION 20) # Remove the dash and anything following, to get the #.#.# version for project() STRING(REGEX REPLACE "\-.*$" "" VERSION_NUM "${PROJECT_VERSION_FULL}") From 928c37bc6e5285f8b2f55492d6ad0329faca5ddf Mon Sep 17 00:00:00 2001 From: Jackson Date: Mon, 23 Aug 2021 15:50:58 -0500 Subject: [PATCH 021/114] set default crop border to 0 --- src/effects/Crop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/effects/Crop.cpp b/src/effects/Crop.cpp index bf89b257..8644c3d6 100644 --- a/src/effects/Crop.cpp +++ b/src/effects/Crop.cpp @@ -34,7 +34,7 @@ using namespace openshot; /// Blank constructor, useful when using Json to load the effect properties -Crop::Crop() : left(0.1), top(0.1), right(0.1), bottom(0.1) { +Crop::Crop() : left(0.0), top(0.0), right(0.0), bottom(0.0) { // Init effect properties init_effect_details(); } From 569b5918d0a29afd767ab30a7b9ccee01afb8811 Mon Sep 17 00:00:00 2001 From: Jackson Date: Wed, 25 Aug 2021 11:34:52 -0500 Subject: [PATCH 022/114] Merge master 0.2.6 into develop --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a36eed24..ebd98c7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ For more information, please visit . set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") ################ PROJECT VERSION #################### -set(PROJECT_VERSION_FULL "0.2.6") +set(PROJECT_VERSION_FULL "0.2.6-dev") set(PROJECT_SO_VERSION 20) # Remove the dash and anything following, to get the #.#.# version for project() From f9e5db6c9bd6d418229684d9d3a4b2fa75fd6bfc Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Fri, 3 Sep 2021 15:44:21 -0500 Subject: [PATCH 023/114] Adding an X and Y offset to the current crop effect, to better support previous clip crop parameters (for migrating crop options from OpenShot 2.5.1 to OpenShot 2.6). Also refactoring the crop effect, to actually copy the pixels into a new image buffer. --- src/effects/Crop.cpp | 90 ++++++++++++++++++++++++++++++++------------ src/effects/Crop.h | 3 +- 2 files changed, 67 insertions(+), 26 deletions(-) diff --git a/src/effects/Crop.cpp b/src/effects/Crop.cpp index 8644c3d6..8ae943cf 100644 --- a/src/effects/Crop.cpp +++ b/src/effects/Crop.cpp @@ -1,6 +1,6 @@ /** * @file - * @brief Source file for Crop effect class + * @brief Source file for Crop effect class (cropping any side, with x/y offsets) * @author Jonathan Thomas * * @ref License @@ -34,14 +34,14 @@ using namespace openshot; /// Blank constructor, useful when using Json to load the effect properties -Crop::Crop() : left(0.0), top(0.0), right(0.0), bottom(0.0) { +Crop::Crop() : left(0.0), top(0.0), right(0.0), bottom(0.0), x(0.0), y(0.0) { // Init effect properties init_effect_details(); } // Default constructor Crop::Crop(Keyframe left, Keyframe top, Keyframe right, Keyframe bottom) : - left(left), top(top), right(right), bottom(bottom) + left(left), top(top), right(right), bottom(bottom), x(0.0), y(0.0) { // Init effect properties init_effect_details(); @@ -68,10 +68,10 @@ std::shared_ptr Crop::GetFrame(std::shared_ptr // Get the frame's image std::shared_ptr frame_image = frame->GetImage(); - // Get transparent color (and create small transparent image) - auto tempColor = std::make_shared( - frame_image->width(), 1, QImage::Format_RGBA8888_Premultiplied); - tempColor->fill(QColor(QString::fromStdString("transparent"))); + // Get transparent color target image (which will become the cropped image) + auto cropped_image = std::make_shared( + frame_image->width(), frame_image->height(), QImage::Format_RGBA8888_Premultiplied); + cropped_image->fill(QColor(QString::fromStdString("transparent"))); // Get current keyframe values double left_value = left.GetValue(frame_number); @@ -79,37 +79,69 @@ std::shared_ptr Crop::GetFrame(std::shared_ptr double right_value = right.GetValue(frame_number); double bottom_value = bottom.GetValue(frame_number); + // Get the current shift amount (if any... to slide the image around in the cropped area) + double x_shift = x.GetValue(frame_number); + double y_shift = y.GetValue(frame_number); + // Get pixel array pointers unsigned char *pixels = (unsigned char *) frame_image->bits(); - unsigned char *color_pixels = (unsigned char *) tempColor->bits(); + unsigned char *cropped_pixels = (unsigned char *) cropped_image->bits(); // Get pixels sizes of all crop sides int top_bar_height = top_value * frame_image->height(); int bottom_bar_height = bottom_value * frame_image->height(); int left_bar_width = left_value * frame_image->width(); int right_bar_width = right_value * frame_image->width(); + int column_offset = x_shift * frame_image->width(); + int row_offset = y_shift * frame_image->height(); - // Loop through rows + // Image copy variables + int image_width = frame_image->width(); + int src_start = left_bar_width; + int dst_start = left_bar_width; + int copy_length = frame_image->width() - right_bar_width - left_bar_width; + + // Adjust for x offset + int copy_offset = 0; + + if (column_offset < 0) { + // dest to the right + src_start += column_offset; + if (src_start < 0) { + int diff = 0 - src_start; // how far under 0 are we? + src_start = 0; + dst_start += diff; + copy_offset = -diff; + } else { + copy_offset = 0; + } + + } else { + // dest to the left + src_start += column_offset; + if (image_width - src_start >= copy_length) { + // We have plenty pixels, use original copy-length + copy_offset = 0; + } else { + // We don't have enough pixels, shorten copy-length + copy_offset = (image_width - src_start) - copy_length; + } + } + + // Loop through rows of pixels for (int row = 0; row < frame_image->height(); row++) { - - // Top & Bottom Crop - if ((top_bar_height > 0.0 && row <= top_bar_height) || (bottom_bar_height > 0.0 && row >= frame_image->height() - bottom_bar_height)) { - memcpy(&pixels[row * frame_image->width() * 4], color_pixels, sizeof(char) * frame_image->width() * 4); - } else { - // Left Crop - if (left_bar_width > 0.0) { - memcpy(&pixels[row * frame_image->width() * 4], color_pixels, sizeof(char) * left_bar_width * 4); - } - - // Right Crop - if (right_bar_width > 0.0) { - memcpy(&pixels[((row * frame_image->width()) + (frame_image->width() - right_bar_width)) * 4], color_pixels, sizeof(char) * right_bar_width * 4); - } + int adjusted_row = row + row_offset; + // Is this row visible? + if (adjusted_row >= top_bar_height && adjusted_row < (frame_image->height() - bottom_bar_height) && (copy_length + copy_offset > 0)) { + // Copy image (row by row, with offsets for x and y offset, and src/dst starting points for column filtering) + memcpy(&cropped_pixels[((adjusted_row * frame_image->width()) + dst_start) * 4], + &pixels[((row * frame_image->width()) + src_start) * 4], + sizeof(char) * (copy_length + copy_offset) * 4); } } - // Cleanup colors and arrays - tempColor.reset(); + // Set frame image + frame->AddImage(cropped_image); // return the modified frame return frame; @@ -132,6 +164,8 @@ Json::Value Crop::JsonValue() const { root["top"] = top.JsonValue(); root["right"] = right.JsonValue(); root["bottom"] = bottom.JsonValue(); + root["x"] = x.JsonValue(); + root["y"] = y.JsonValue(); // return JsonValue return root; @@ -169,6 +203,10 @@ void Crop::SetJsonValue(const Json::Value root) { right.SetJsonValue(root["right"]); if (!root["bottom"].isNull()) bottom.SetJsonValue(root["bottom"]); + if (!root["x"].isNull()) + x.SetJsonValue(root["x"]); + if (!root["y"].isNull()) + y.SetJsonValue(root["y"]); } // Get all properties for a specific frame @@ -188,6 +226,8 @@ std::string Crop::PropertiesJSON(int64_t requested_frame) const { root["top"] = add_property_json("Top Size", top.GetValue(requested_frame), "float", "", &top, 0.0, 1.0, false, requested_frame); root["right"] = add_property_json("Right Size", right.GetValue(requested_frame), "float", "", &right, 0.0, 1.0, false, requested_frame); root["bottom"] = add_property_json("Bottom Size", bottom.GetValue(requested_frame), "float", "", &bottom, 0.0, 1.0, false, requested_frame); + root["x"] = add_property_json("X Offset", x.GetValue(requested_frame), "float", "", &x, -1.0, 1.0, false, requested_frame); + root["y"] = add_property_json("Y Offset", y.GetValue(requested_frame), "float", "", &y, -1.0, 1.0, false, requested_frame); // Set the parent effect which properties this effect will inherit root["parent_effect_id"] = add_property_json("Parent", 0.0, "string", info.parent_effect_id, NULL, -1, -1, false, requested_frame); diff --git a/src/effects/Crop.h b/src/effects/Crop.h index f43f549c..a09c1257 100644 --- a/src/effects/Crop.h +++ b/src/effects/Crop.h @@ -60,11 +60,12 @@ namespace openshot public: - Color color; ///< Color of bars Keyframe left; ///< Size of left bar Keyframe top; ///< Size of top bar Keyframe right; ///< Size of right bar Keyframe bottom; ///< Size of bottom bar + Keyframe x; ///< X-offset + Keyframe y; ///< Y-offset /// Blank constructor, useful when using Json to load the effect properties Crop(); From 5f91ddc39b101aa876eb7c107f6c2bc96c768bec Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Fri, 3 Sep 2021 17:45:28 -0500 Subject: [PATCH 024/114] Reversing y_offset direction to match previous OpenShot crop behavior --- src/effects/Crop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/effects/Crop.cpp b/src/effects/Crop.cpp index 8ae943cf..5ef78520 100644 --- a/src/effects/Crop.cpp +++ b/src/effects/Crop.cpp @@ -130,7 +130,7 @@ std::shared_ptr Crop::GetFrame(std::shared_ptr // Loop through rows of pixels for (int row = 0; row < frame_image->height(); row++) { - int adjusted_row = row + row_offset; + int adjusted_row = row - row_offset; // Is this row visible? if (adjusted_row >= top_bar_height && adjusted_row < (frame_image->height() - bottom_bar_height) && (copy_length + copy_offset > 0)) { // Copy image (row by row, with offsets for x and y offset, and src/dst starting points for column filtering) From 82498b267d2e2e4f1aab15ebb50c107d19a8096b Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Sat, 4 Sep 2021 17:45:40 -0500 Subject: [PATCH 025/114] Bumping version to 0.2.7, SO 20 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebd98c7c..3eb27179 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,8 +40,8 @@ For more information, please visit . set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") ################ PROJECT VERSION #################### -set(PROJECT_VERSION_FULL "0.2.6-dev") -set(PROJECT_SO_VERSION 20) +set(PROJECT_VERSION_FULL "0.2.7") +set(PROJECT_SO_VERSION 21) # Remove the dash and anything following, to get the #.#.# version for project() STRING(REGEX REPLACE "\-.*$" "" VERSION_NUM "${PROJECT_VERSION_FULL}") From 4106f1f0a85be3d284ab80ed2d457c6f6b319f7a Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Sat, 4 Sep 2021 17:45:40 -0500 Subject: [PATCH 026/114] Bumping version to 0.2.7, SO 21 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebd98c7c..3eb27179 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,8 +40,8 @@ For more information, please visit . set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") ################ PROJECT VERSION #################### -set(PROJECT_VERSION_FULL "0.2.6-dev") -set(PROJECT_SO_VERSION 20) +set(PROJECT_VERSION_FULL "0.2.7") +set(PROJECT_SO_VERSION 21) # Remove the dash and anything following, to get the #.#.# version for project() STRING(REGEX REPLACE "\-.*$" "" VERSION_NUM "${PROJECT_VERSION_FULL}") From 003d44d7d769d0a30dd617b1c036f220349a9595 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 6 Sep 2021 17:59:46 -0400 Subject: [PATCH 027/114] CVTracker: Clean up spacing --- src/CVTracker.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/CVTracker.cpp b/src/CVTracker.cpp index b4fb85ea..3d6b87c3 100644 --- a/src/CVTracker.cpp +++ b/src/CVTracker.cpp @@ -207,7 +207,7 @@ cv::Rect2d CVTracker::filter_box_jitter(size_t frameId){ float curr_box_height = bbox.height; // keep the last width and height if the difference is less than 1% float threshold = 0.01; - + cv::Rect2d filtered_box = bbox; if(std::abs(1-(curr_box_width/last_box_width)) <= threshold){ filtered_box.width = last_box_width; @@ -299,13 +299,13 @@ void CVTracker::SetJson(const std::string value) { // Load Json::Value into this object void CVTracker::SetJsonValue(const Json::Value root) { - // Set data from Json (if key is found) - if (!root["protobuf_data_path"].isNull()){ - protobuf_data_path = (root["protobuf_data_path"].asString()); - } + // Set data from Json (if key is found) + if (!root["protobuf_data_path"].isNull()){ + protobuf_data_path = (root["protobuf_data_path"].asString()); + } if (!root["tracker-type"].isNull()){ - trackerType = (root["tracker-type"].asString()); - } + trackerType = (root["tracker-type"].asString()); + } if (!root["region"].isNull()){ double x = root["region"]["normalized_x"].asDouble(); From 31bfdf0e7c8c637d7ef17873c778b14bedc0cd49 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 6 Sep 2021 18:00:13 -0400 Subject: [PATCH 028/114] Fix CVTracker test for OpenCV 4.5.2+ --- tests/CVTracker.cpp | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/tests/CVTracker.cpp b/tests/CVTracker.cpp index bb447065..62a82a04 100644 --- a/tests/CVTracker.cpp +++ b/tests/CVTracker.cpp @@ -73,10 +73,10 @@ TEST_CASE( "Track_Video", "[libopenshot][opencv][tracker]" ) int height = ((float)fd.y2*360) - y; // Compare if tracked data is equal to pre-tested ones - CHECK(x >= 255); CHECK(x <= 257); - CHECK(y >= 133); CHECK(y <= 135); - CHECK(width >= 179); CHECK(width <= 181); - CHECK(height >= 165); CHECK(height <= 168); + CHECK(x == Approx(256).margin(1)); + CHECK(y == Approx(134).margin(1)); + CHECK(width == Approx(180).margin(1)); + CHECK(height == Approx(166).margin(2)); } @@ -95,10 +95,15 @@ TEST_CASE( "SaveLoad_Protobuf", "[libopenshot][opencv][tracker]" ) { "protobuf_data_path": "kcf_tracker.data", "tracker-type": "KCF", - "region": {"x": 294, "y": 102, "width": 180, "height": 166, "first-frame": 1} + "region": { + "normalized_x": 0.46, + "normalized_y": 0.28, + "normalized_width": 0.28, + "normalized_height": 0.46, + "first-frame": 1 + } } )proto"; - // Create first tracker CVTracker kcfTracker_1(json_data, tracker_pc); @@ -120,7 +125,13 @@ TEST_CASE( "SaveLoad_Protobuf", "[libopenshot][opencv][tracker]" ) { "protobuf_data_path": "kcf_tracker.data", "tracker_type": "", - "region": {"x": -1, "y": -1, "width": -1, "height": -1, "first-frame": 1} + "region": { + "normalized_x": 0.1, + "normalized_y": 0.1, + "normalized_width": 0.5, + "normalized_height": 0.5, + "first-frame": 1 + } } )proto"; // Create second tracker @@ -138,8 +149,9 @@ TEST_CASE( "SaveLoad_Protobuf", "[libopenshot][opencv][tracker]" ) float height_2 = fd_2.y2 - y_2; // Compare first tracker data with second tracker data - CHECK((int)(x_1 * 640) == (int)(x_2 * 640)); - CHECK((int)(y_1 * 360) == (int)(y_2 * 360)); - CHECK((int)(width_1 * 640) == (int)(width_2 * 640)); - CHECK((int)(height_1 * 360) == (int)(height_2 * 360)); + CHECK(x_1 == Approx(x_2).margin(0.01)); + CHECK(y_1 == Approx(y_2).margin(0.01)); + CHECK(width_1 == Approx(width_2).margin(0.01)); + CHECK(height_1 == Approx(height_2).margin(0.01)); + } From 01d40b22fb10d87adb3e7c1e972fa1f845c62a7a Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 8 Sep 2021 12:35:32 -0400 Subject: [PATCH 029/114] CVTracker: Add some error-case unit tests --- tests/CVTracker.cpp | 56 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/tests/CVTracker.cpp b/tests/CVTracker.cpp index 62a82a04..8415ecef 100644 --- a/tests/CVTracker.cpp +++ b/tests/CVTracker.cpp @@ -40,8 +40,46 @@ using namespace openshot; -// Just for the tracker constructor, it won't be used -ProcessingController tracker_pc; +TEST_CASE( "initialization", "[libopenshot][opencv][tracker]" ) +{ + std::string bad_json = R"proto( + } + [1, 2, 3, "a"] + } )proto"; + ProcessingController badPC; + CVTracker* badTracker; + CHECK_THROWS_AS( + badTracker = new CVTracker(bad_json, badPC), + openshot::InvalidJSON + ); + + std::string json1 = R"proto( + { + "tracker-type": "KCF" + } )proto"; + + ProcessingController pc1; + CVTracker tracker1(json1, pc1); + CHECK(pc1.GetError() == true); + CHECK(pc1.GetErrorMessage() == "No initial bounding box selected"); + + std::string json2 = R"proto( + { + "tracker-type": "KCF", + "region": { + "normalized_x": 0.459375, + "normalized_y": 0.28333, + "normalized_width": -0.28125, + "normalized_height": -0.461111 + } + } )proto"; + + // Create tracker + ProcessingController pc2; + CVTracker tracker2(json2, pc2); + CHECK(pc2.GetError() == true); + CHECK(pc2.GetErrorMessage() == "No first-frame"); +} TEST_CASE( "Track_Video", "[libopenshot][opencv][tracker]" ) { @@ -57,10 +95,17 @@ TEST_CASE( "Track_Video", "[libopenshot][opencv][tracker]" ) { "protobuf_data_path": "kcf_tracker.data", "tracker-type": "KCF", - "region": {"normalized_x": 0.459375, "normalized_y": 0.28333, "normalized_width": 0.28125, "normalized_height": 0.461111, "first-frame": 1} + "region": { + "normalized_x": 0.459375, + "normalized_y": 0.28333, + "normalized_width": 0.28125, + "normalized_height": 0.461111, + "first-frame": 1 + } } )proto"; // Create tracker + ProcessingController tracker_pc; CVTracker kcfTracker(json_data, tracker_pc); // Track clip for frames 0-20 @@ -105,6 +150,7 @@ TEST_CASE( "SaveLoad_Protobuf", "[libopenshot][opencv][tracker]" ) } )proto"; // Create first tracker + ProcessingController tracker_pc; CVTracker kcfTracker_1(json_data, tracker_pc); // Track clip for frames 0-20 @@ -128,8 +174,8 @@ TEST_CASE( "SaveLoad_Protobuf", "[libopenshot][opencv][tracker]" ) "region": { "normalized_x": 0.1, "normalized_y": 0.1, - "normalized_width": 0.5, - "normalized_height": 0.5, + "normalized_width": -0.5, + "normalized_height": -0.5, "first-frame": 1 } } )proto"; From aee95d3bacbfc458337df1d88665e3e3279426cd Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 8 Sep 2021 12:35:57 -0400 Subject: [PATCH 030/114] CVTracker: Fix bug in JSON error handling --- src/CVTracker.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/CVTracker.cpp b/src/CVTracker.cpp index 3d6b87c3..b3891674 100644 --- a/src/CVTracker.cpp +++ b/src/CVTracker.cpp @@ -314,20 +314,22 @@ void CVTracker::SetJsonValue(const Json::Value root) { double h = root["region"]["normalized_height"].asDouble(); cv::Rect2d prev_bbox(x,y,w,h); bbox = prev_bbox; + + if (!root["region"]["first-frame"].isNull()){ + start = root["region"]["first-frame"].asInt64(); + json_interval = true; + } + else{ + processingController->SetError(true, "No first-frame"); + error = true; + } + } else{ processingController->SetError(true, "No initial bounding box selected"); error = true; } - if (!root["region"]["first-frame"].isNull()){ - start = root["region"]["first-frame"].asInt64(); - json_interval = true; - } - else{ - processingController->SetError(true, "No first-frame"); - error = true; - } } /* From fea43bdd8ad8bf2f02550f3f898a235b26ad67f3 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Wed, 8 Sep 2021 17:47:10 -0400 Subject: [PATCH 031/114] CI: Build audio lib & cache (#727) * CI: Build audio lib & cache * Also key audio cache on CMakeLists.txt hash * Exclude audio sources from coverage --- .github/workflows/ci.yml | 32 +++++++++++++++++++++++++++----- CMakeLists.txt | 1 + 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94db6047..50cd44c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,11 +13,17 @@ jobs: steps: - uses: actions/checkout@v2 - # Work around a codecov issue detecting commit SHAs - # see: https://community.codecov.io/t/issue-detecting-commit-sha-please-run-actions-checkout-with-fetch-depth-1-or-set-to-0/2571 with: + # Work around a codecov issue detecting commit SHAs + # see: https://community.codecov.io/t/issue-detecting-commit-sha-please-run-actions-checkout-with-fetch-depth-1-or-set-to-0/2571 fetch-depth: 0 + - name: Checkout OpenShotAudio + uses: actions/checkout@v2 + with: + repository: OpenShot/libopenshot-audio + path: audio + - uses: haya14busa/action-cond@v1 id: coverage with: @@ -28,12 +34,11 @@ jobs: - name: Install dependencies shell: bash run: | - sudo add-apt-repository ppa:openshot.developers/libopenshot-daily sudo apt update sudo apt remove libzmq5 # See actions/virtual-environments#3317 sudo apt install \ cmake swig doxygen graphviz curl lcov \ - libopenshot-audio-dev libasound2-dev \ + libasound2-dev \ qtbase5-dev qtbase5-dev-tools \ libfdk-aac-dev libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libpostproc-dev libswresample-dev \ libzmq3-dev libmagick++-dev \ @@ -43,13 +48,30 @@ jobs: wget https://launchpad.net/ubuntu/+archive/primary/+files/catch2_2.13.0-1_all.deb sudo dpkg -i catch2_2.13.0-1_all.deb + - uses: actions/cache@v2 + id: cache + with: + path: audio/build + key: audio-${{ matrix.os }}-${{ matrix.compiler }}-${{ hashFiles('audio/CMakeLists.txt') }} + + - name: Build OpenShotAudio (if not cached) + if: steps.cache.outputs.cache-hit != 'true' + shell: bash + run: | + pushd audio + if [ ! -d build ]; then + mkdir build + cmake -B build -S . + fi + cmake --build build + popd - name: Build libopenshot shell: bash run: | mkdir build pushd build - cmake -B . -S .. -DCMAKE_INSTALL_PREFIX:PATH="dist" -DCMAKE_BUILD_TYPE="Debug" "${{ steps.coverage.outputs.value }}" + cmake -B . -S .. -DCMAKE_INSTALL_PREFIX:PATH="dist" -DCMAKE_BUILD_TYPE="Debug" -DOpenShotAudio_ROOT="../audio/build" "${{ steps.coverage.outputs.value }}" cmake --build . -- VERBOSE=1 popd diff --git a/CMakeLists.txt b/CMakeLists.txt index ebd98c7c..6db2c2be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,6 +212,7 @@ if (ENABLE_COVERAGE AND DEFINED UNIT_TEST_TARGETS) "examples/*" "${CMAKE_CURRENT_BINARY_DIR}/bindings/*" "${CMAKE_CURRENT_BINARY_DIR}/src/*_autogen/*" + "audio/*" ) setup_target_for_coverage_lcov( NAME coverage From 2dbb8d53133ec474a0b564046e744fe5843daf18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Sep 2021 17:47:51 -0400 Subject: [PATCH 032/114] Bump codecov/codecov-action from 2.0.2 to 2.0.3 (#722) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.2 to 2.0.3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v2.0.2...v2.0.3) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50cd44c9..1ca60297 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: cmake --build . --target install -- VERBOSE=1 popd - - uses: codecov/codecov-action@v2.0.2 + - uses: codecov/codecov-action@v2.0.3 if: ${{ matrix.compiler == 'clang' }} with: file: build/coverage.info From cc41c5514cbeafd5f2af01519b0844d2403fd9f0 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Fri, 10 Sep 2021 18:32:22 -0500 Subject: [PATCH 033/114] Bump version for dev --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b948de0d..721ac085 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ For more information, please visit . set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") ################ PROJECT VERSION #################### -set(PROJECT_VERSION_FULL "0.2.7") +set(PROJECT_VERSION_FULL "0.2.7-dev") set(PROJECT_SO_VERSION 21) # Remove the dash and anything following, to get the #.#.# version for project() From ed1c4f4bca2f362584cd6ffb3e5c22cf57d5cee9 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 11 Sep 2021 22:42:59 -0400 Subject: [PATCH 034/114] ChromaKey: Minimal unit testing --- tests/CMakeLists.txt | 2 ++ tests/ChromaKey.cpp | 85 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 tests/ChromaKey.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 822c4362..ee49f4e8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,6 +64,8 @@ set(OPENSHOT_TESTS ReaderBase Settings Timeline + # Effects + ChromaKey ) # ImageMagick related test files diff --git a/tests/ChromaKey.cpp b/tests/ChromaKey.cpp new file mode 100644 index 00000000..df7442ef --- /dev/null +++ b/tests/ChromaKey.cpp @@ -0,0 +1,85 @@ +/** + * @file + * @brief Unit tests for openshot::ChromaKey effect + * @author Jonathan Thomas + * @author FeRD (Frank Dana) + * + * @ref License + */ + +/* LICENSE + * + * Copyright (c) 2008-2021 OpenShot Studios, LLC + * . This file is part of + * OpenShot Library (libopenshot), an open-source project dedicated to + * delivering high quality video editing and animation solutions to the + * world. For more information visit . + * + * OpenShot Library (libopenshot) is free software: you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * OpenShot Library (libopenshot) is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with OpenShot Library. If not, see . + */ + +#include +#include + +#include + +#include "Frame.h" +#include "effects/ChromaKey.h" + +#include +#include + +using namespace openshot; + +TEST_CASE( "basic keying", "[libopenshot][effect][chromakey]" ) +{ + // solid green frame + auto f = std::make_shared(1, 1280, 720, "#00ff00"); + + // Create a ChromaKey effect to key on solid green ± 5 values + openshot::Color key(0, 255, 0, 255); + openshot::Keyframe fuzz(5); + openshot::ChromaKey e(key, fuzz); + + auto f_out = e.GetFrame(f, 1); + std::shared_ptr i = f_out->GetImage(); + + // Check color fill (should be transparent) + QColor pix = i->pixelColor(10, 10); + CHECK(pix.red() == 0); + CHECK(pix.green() == 0); + CHECK(pix.blue() == 0); + CHECK(pix.alpha() == 0); +} + +TEST_CASE( "threshold", "[libopenshot][effect][chromakey]" ) +{ + auto frame = std::make_shared(1, 1280, 720, "#00cc00"); + + // Create a ChromaKey effect to key on solid green ± 5 values + openshot::Color key(0, 255, 0, 255); + openshot::Keyframe fuzz(5); + openshot::ChromaKey e(key, fuzz); + + auto frame_out = e.GetFrame(frame, 1); + std::shared_ptr i = frame_out->GetImage(); + + // Output should be the same, no ChromaKey + QColor pix_e = i->pixelColor(10, 10); + CHECK(pix_e.red() == 0); + CHECK(pix_e.green() == 204); + CHECK(pix_e.blue() == 0); + CHECK(pix_e.alpha() == 255); +} + From 62b7370b0239d4359d9efec8b7733474bb37423d Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Thu, 16 Sep 2021 12:34:05 -0400 Subject: [PATCH 035/114] Add explicit QtSvg dependency (#731) * Add explicit QtSvg dependency * Add QtSvg to CI dependencies --- .github/workflows/ci.yml | 2 +- src/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ca60297..367fc48c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: sudo apt install \ cmake swig doxygen graphviz curl lcov \ libasound2-dev \ - qtbase5-dev qtbase5-dev-tools \ + qtbase5-dev qtbase5-dev-tools libqt5svg5-dev \ libfdk-aac-dev libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libpostproc-dev libswresample-dev \ libzmq3-dev libmagick++-dev \ libopencv-dev libprotobuf-dev protobuf-compiler diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 15a7bcc8..e43c1c3a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -284,7 +284,7 @@ endif () ################# QT5 ################### # Find QT5 libraries -set(_qt_components Core Gui Widgets) +set(_qt_components Core Gui Widgets Svg) find_package(Qt5 COMPONENTS ${_qt_components} REQUIRED) foreach(_qt_comp IN LISTS _qt_components) From a76925f383ea17a414675bf65e692ec5b66c2abf Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 16 Sep 2021 20:41:31 -0400 Subject: [PATCH 036/114] Rewrite Crop effect using QPainter --- src/effects/Crop.cpp | 100 ++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 58 deletions(-) diff --git a/src/effects/Crop.cpp b/src/effects/Crop.cpp index 5ef78520..27a909d7 100644 --- a/src/effects/Crop.cpp +++ b/src/effects/Crop.cpp @@ -30,6 +30,13 @@ #include "Crop.h" #include "Exceptions.h" +#include "KeyFrame.h" + +#include +#include +#include +#include +#include using namespace openshot; @@ -68,80 +75,57 @@ std::shared_ptr Crop::GetFrame(std::shared_ptr // Get the frame's image std::shared_ptr frame_image = frame->GetImage(); - // Get transparent color target image (which will become the cropped image) - auto cropped_image = std::make_shared( - frame_image->width(), frame_image->height(), QImage::Format_RGBA8888_Premultiplied); - cropped_image->fill(QColor(QString::fromStdString("transparent"))); - // Get current keyframe values double left_value = left.GetValue(frame_number); double top_value = top.GetValue(frame_number); double right_value = right.GetValue(frame_number); double bottom_value = bottom.GetValue(frame_number); - // Get the current shift amount (if any... to slide the image around in the cropped area) + // Get the current shift amount double x_shift = x.GetValue(frame_number); double y_shift = y.GetValue(frame_number); - // Get pixel array pointers - unsigned char *pixels = (unsigned char *) frame_image->bits(); - unsigned char *cropped_pixels = (unsigned char *) cropped_image->bits(); + QSize sz = frame_image->size(); - // Get pixels sizes of all crop sides - int top_bar_height = top_value * frame_image->height(); - int bottom_bar_height = bottom_value * frame_image->height(); - int left_bar_width = left_value * frame_image->width(); - int right_bar_width = right_value * frame_image->width(); - int column_offset = x_shift * frame_image->width(); - int row_offset = y_shift * frame_image->height(); + // Compute destination rectangle to paint into + QRectF paint_r( + left_value * sz.width(), top_value * sz.height(), + std::max(0.0, 1.0 - left_value - right_value) * sz.width(), + std::max(0.0, 1.0 - top_value - bottom_value) * sz.height()); - // Image copy variables - int image_width = frame_image->width(); - int src_start = left_bar_width; - int dst_start = left_bar_width; - int copy_length = frame_image->width() - right_bar_width - left_bar_width; + // Copy rectangle is destination translated by offsets + QRectF copy_r = paint_r; + copy_r.translate(x_shift * sz.width(), y_shift * sz.height()); - // Adjust for x offset - int copy_offset = 0; - - if (column_offset < 0) { - // dest to the right - src_start += column_offset; - if (src_start < 0) { - int diff = 0 - src_start; // how far under 0 are we? - src_start = 0; - dst_start += diff; - copy_offset = -diff; - } else { - copy_offset = 0; - } - - } else { - // dest to the left - src_start += column_offset; - if (image_width - src_start >= copy_length) { - // We have plenty pixels, use original copy-length - copy_offset = 0; - } else { - // We don't have enough pixels, shorten copy-length - copy_offset = (image_width - src_start) - copy_length; - } + // Constrain offset copy rect to stay within image borders + if (copy_r.left() < 0) { + paint_r.setLeft(paint_r.left() - copy_r.left()); + copy_r.setLeft(0); + } + if (copy_r.right() > sz.width()) { + paint_r.setRight(paint_r.right() - (copy_r.right() - sz.width())); + copy_r.setRight(sz.width()); + } + if (copy_r.top() < 0) { + paint_r.setTop(paint_r.top() - copy_r.top()); + copy_r.setTop(0); + } + if (copy_r.bottom() > sz.height()) { + paint_r.setBottom(paint_r.bottom() - (copy_r.bottom() - sz.height())); + copy_r.setBottom(sz.height()); } - // Loop through rows of pixels - for (int row = 0; row < frame_image->height(); row++) { - int adjusted_row = row - row_offset; - // Is this row visible? - if (adjusted_row >= top_bar_height && adjusted_row < (frame_image->height() - bottom_bar_height) && (copy_length + copy_offset > 0)) { - // Copy image (row by row, with offsets for x and y offset, and src/dst starting points for column filtering) - memcpy(&cropped_pixels[((adjusted_row * frame_image->width()) + dst_start) * 4], - &pixels[((row * frame_image->width()) + src_start) * 4], - sizeof(char) * (copy_length + copy_offset) * 4); - } - } + QImage cropped(sz, QImage::Format_RGBA8888_Premultiplied); + cropped.fill(Qt::transparent); + + const QImage src(*frame_image); + + QPainter p(&cropped); + p.drawImage(paint_r, src, copy_r); + p.end(); // Set frame image - frame->AddImage(cropped_image); + frame->AddImage(std::make_shared(cropped.copy())); // return the modified frame return frame; From 03d49410e91851fb9d2c5766780ba73741ef9c07 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 18 Sep 2021 04:13:29 -0400 Subject: [PATCH 037/114] Crop: Extend ctor with optional x, y args - The four-Keyframe constructor is now a 6-Keyframe constructor - Optional x and y Keyframe arguments both have a default value of 0.0 --- src/effects/Crop.cpp | 15 +++++++-------- src/effects/Crop.h | 13 ++++++++++--- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/effects/Crop.cpp b/src/effects/Crop.cpp index 27a909d7..0b0788ac 100644 --- a/src/effects/Crop.cpp +++ b/src/effects/Crop.cpp @@ -40,15 +40,14 @@ using namespace openshot; -/// Blank constructor, useful when using Json to load the effect properties -Crop::Crop() : left(0.0), top(0.0), right(0.0), bottom(0.0), x(0.0), y(0.0) { - // Init effect properties - init_effect_details(); -} +/// Default constructor, useful when using Json to load the effect properties +Crop::Crop() : Crop::Crop(0.0, 0.0, 0.0, 0.0, 0.0, 0.0) {} -// Default constructor -Crop::Crop(Keyframe left, Keyframe top, Keyframe right, Keyframe bottom) : - left(left), top(top), right(right), bottom(bottom), x(0.0), y(0.0) +Crop::Crop( + Keyframe left, Keyframe top, + Keyframe right, Keyframe bottom, + Keyframe x, Keyframe y) : + left(left), top(top), right(right), bottom(bottom), x(x), y(y) { // Init effect properties init_effect_details(); diff --git a/src/effects/Crop.h b/src/effects/Crop.h index a09c1257..77ba6251 100644 --- a/src/effects/Crop.h +++ b/src/effects/Crop.h @@ -76,7 +76,10 @@ namespace openshot /// @param top The curve to adjust the top bar size (between 0 and 1) /// @param right The curve to adjust the right bar size (between 0 and 1) /// @param bottom The curve to adjust the bottom bar size (between 0 and 1) - Crop(Keyframe left, Keyframe top, Keyframe right, Keyframe bottom); + /// @param x x-offset of original image in output frame (-1.0 - 1.0) + /// @param y y-offset of original image in output frame (-1.0 - 1.0) + Crop(Keyframe left, Keyframe top, Keyframe right, Keyframe bottom, + Keyframe x=0.0, Keyframe y=0.0); /// @brief This method is required for all derived classes of ClipBase, and returns a /// new openshot::Frame object. All Clip keyframes and effects are resolved into @@ -84,7 +87,10 @@ namespace openshot /// /// @returns A new openshot::Frame object /// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline. - std::shared_ptr GetFrame(int64_t frame_number) override { return GetFrame(std::make_shared(), frame_number); } + std::shared_ptr + GetFrame(int64_t frame_number) override { + return GetFrame(std::make_shared(), frame_number); + } /// @brief This method is required for all derived classes of ClipBase, and returns a /// modified openshot::Frame object @@ -95,7 +101,8 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the clip or effect applied to it /// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; + std::shared_ptr + GetFrame(std::shared_ptr frame, int64_t frame_number) override; // Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object From ab60286ae80524040d2e9dec9768416364cf1909 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 18 Sep 2021 04:14:17 -0400 Subject: [PATCH 038/114] Crop effect: Add unit tests --- tests/CMakeLists.txt | 2 + tests/Crop.cpp | 164 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 tests/Crop.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 822c4362..11c731e6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,6 +64,8 @@ set(OPENSHOT_TESTS ReaderBase Settings Timeline + # Effects + Crop ) # ImageMagick related test files diff --git a/tests/Crop.cpp b/tests/Crop.cpp new file mode 100644 index 00000000..b06ca49b --- /dev/null +++ b/tests/Crop.cpp @@ -0,0 +1,164 @@ +/** + * @file + * @brief Unit tests for openshot::Crop effect + * @author Jonathan Thomas + * @author FeRD (Frank Dana) + * + * @ref License + */ + +/* LICENSE + * + * Copyright (c) 2008-2021 OpenShot Studios, LLC + * . This file is part of + * OpenShot Library (libopenshot), an open-source project dedicated to + * delivering high quality video editing and animation solutions to the + * world. For more information visit . + * + * OpenShot Library (libopenshot) is free software: you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * OpenShot Library (libopenshot) is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with OpenShot Library. If not, see . + */ + +#include + +#include + +#include "Frame.h" +#include "effects/Crop.h" + +#include +#include +#include +#include + +TEST_CASE( "default constructor", "[libopenshot][effect][crop]" ) +{ + // solid green frame + auto f = std::make_shared(1, 1280, 720, "#00ff00"); + + // Default constructor should have no cropping + openshot::Crop e; + + auto f_out = e.GetFrame(f, 1); + std::shared_ptr i = f_out->GetImage(); + + // Check pixels near edges (should all be green) + std::vector pixels { + i->pixelColor(400, 2), + i->pixelColor(1279, 500), + i->pixelColor(800, 718), + i->pixelColor(1, 200) + }; + + QColor green{Qt::green}; + CHECK(pixels[0] == green); + CHECK(pixels[1] == green); + CHECK(pixels[2] == green); + CHECK(pixels[3] == green); +} + +TEST_CASE( "basic cropping", "[libopenshot][effect][crop]" ) +{ + auto frame = std::make_shared(1, 1280, 720, "#00ff00"); + + // Crop 10% off the input frame on all four sides + openshot::Keyframe left(0.1); + openshot::Keyframe top(0.1); + openshot::Keyframe right(0.1); + openshot::Keyframe bottom(0.1); + openshot::Crop e(left, top, right, bottom); + + auto frame_out = e.GetFrame(frame, 1); + std::shared_ptr i = frame_out->GetImage(); + + QSize sz(1280, 720); + CHECK(i->size() == sz); + + // Green inside the crop region, transparent outside + QColor green{Qt::green}; + QColor trans{Qt::transparent}; + + QColor center_pixel = i->pixelColor(640, 360); + CHECK(center_pixel == green); + + std::vector edge_pixels { + i->pixelColor(50, 200), + i->pixelColor(400, 20), + i->pixelColor(1250, 500), + i->pixelColor(800, 715) + }; + CHECK(edge_pixels[0] == trans); + CHECK(edge_pixels[1] == trans); + CHECK(edge_pixels[2] == trans); + CHECK(edge_pixels[3] == trans); +} + +TEST_CASE( "region collapsing", "[libopenshot][effect][crop]" ) +{ + auto frame = std::make_shared(1, 1920, 1080, "#ff00ff"); + + // Crop 50% off left and right sides (== crop out entire image) + openshot::Keyframe left(0.4); + openshot::Keyframe right(0.6); + openshot::Keyframe none(0.0); + openshot::Crop e(left, none, right, none); + + auto frame_out = e.GetFrame(frame, 1); + auto i = frame_out->GetImage(); + + // Only true if all pixels have been cropped away (as expected) + CHECK(i->allGray()); +} + +TEST_CASE( "x/y offsets", "[libopenshot][effect][crop]" ) +{ + auto frame = std::make_shared(1, 1280, 720, "#ff0000"); + auto frame_img = frame->GetImage(); + QImage img(*frame_img); + + // Make input frame left-half red, right-half blue + QPainter p(&img); + p.fillRect(QRect(640, 0, 640, 720), Qt::blue); + p.end(); + + frame->AddImage(std::make_shared(img)); + + // Crop 20% off all four sides, and shift the source window x +33⅓ % + openshot::Keyframe sides(0.2); + openshot::Keyframe x(0.3); + openshot::Crop e(sides, sides, sides, sides, x); + + auto frame_out = e.GetFrame(frame, 1); + std::shared_ptr i = frame_out->GetImage(); + + // Entire cropped region should be blue (due to x-offset), and will be + // off-center (due to being only 50% wide instead of 60%) + QColor blue{Qt::blue}; + QColor trans{Qt::transparent}; + + std::vector edge_pixels { + i->pixelColor(258, 146), + i->pixelColor(894, 146), + i->pixelColor(894, 574), + i->pixelColor(258, 574) + }; + CHECK(edge_pixels[0] == blue); + CHECK(edge_pixels[1] == blue); + CHECK(edge_pixels[2] == blue); + CHECK(edge_pixels[3] == blue); + + // This pixel would normally be inside the cropping. + // The x-offset moves it outside of the source image area, + // so it becomes a transparent pixel + CHECK(i->pixelColor(900, 360) == trans); +} From 42e7049e6d6e0b980e58454b5263cf81ed7eb50b Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 18 Sep 2021 04:16:30 -0400 Subject: [PATCH 039/114] Cleanup includes to reflect actual dependencies --- src/AudioReaderSource.cpp | 4 ++++ src/AudioReaderSource.h | 2 +- src/CacheBase.h | 6 ++++-- src/CacheDisk.cpp | 2 ++ src/CacheDisk.h | 4 +++- src/CacheMemory.cpp | 1 + src/CacheMemory.h | 3 ++- src/ChunkReader.h | 6 +++--- src/DummyReader.cpp | 1 + src/ImageReader.cpp | 1 + src/Qt/VideoCacheThread.h | 1 + src/QtHtmlReader.cpp | 2 ++ src/QtImageReader.cpp | 11 ++++++----- src/QtImageReader.h | 9 ++++----- src/QtTextReader.cpp | 2 ++ src/QtTextReader.h | 7 ++----- src/ReaderBase.cpp | 2 ++ src/ReaderBase.h | 23 ++++++++++------------- src/TextReader.cpp | 1 + src/effects/Caption.cpp | 2 ++ tests/CacheDisk.cpp | 1 + tests/CacheMemory.cpp | 1 + 22 files changed, 56 insertions(+), 36 deletions(-) diff --git a/src/AudioReaderSource.cpp b/src/AudioReaderSource.cpp index acd69deb..dba9f704 100644 --- a/src/AudioReaderSource.cpp +++ b/src/AudioReaderSource.cpp @@ -30,6 +30,10 @@ #include "AudioReaderSource.h" #include "Exceptions.h" +#include "Frame.h" +#include "ZmqLogger.h" + +#include using namespace std; using namespace openshot; diff --git a/src/AudioReaderSource.h b/src/AudioReaderSource.h index 2b0cc0ea..35d570f2 100644 --- a/src/AudioReaderSource.h +++ b/src/AudioReaderSource.h @@ -31,8 +31,8 @@ #ifndef OPENSHOT_AUDIOREADERSOURCE_H #define OPENSHOT_AUDIOREADERSOURCE_H -#include #include "ReaderBase.h" + #include /// This namespace is the default namespace for all code in the openshot library diff --git a/src/CacheBase.h b/src/CacheBase.h index b0a64f45..769a3405 100644 --- a/src/CacheBase.h +++ b/src/CacheBase.h @@ -32,11 +32,13 @@ #define OPENSHOT_CACHE_BASE_H #include -#include -#include "Frame.h" + #include "Json.h" +#include + namespace openshot { + class Frame; /** * @brief All cache managers in libopenshot are based on this CacheBase class diff --git a/src/CacheDisk.cpp b/src/CacheDisk.cpp index 6d1241ed..ec3e481b 100644 --- a/src/CacheDisk.cpp +++ b/src/CacheDisk.cpp @@ -30,7 +30,9 @@ #include "CacheDisk.h" #include "Exceptions.h" +#include "Frame.h" #include "QtUtilities.h" + #include #include #include diff --git a/src/CacheDisk.h b/src/CacheDisk.h index 764497b7..a071e21b 100644 --- a/src/CacheDisk.h +++ b/src/CacheDisk.h @@ -34,11 +34,13 @@ #include #include #include + #include "CacheBase.h" -#include "Frame.h" + #include namespace openshot { + class Frame; /** * @brief This class is a disk-based cache manager for Frame objects. diff --git a/src/CacheMemory.cpp b/src/CacheMemory.cpp index 62dc9957..04194d76 100644 --- a/src/CacheMemory.cpp +++ b/src/CacheMemory.cpp @@ -30,6 +30,7 @@ #include "CacheMemory.h" #include "Exceptions.h" +#include "Frame.h" using namespace std; using namespace openshot; diff --git a/src/CacheMemory.h b/src/CacheMemory.h index c693cb66..27bb0b9a 100644 --- a/src/CacheMemory.h +++ b/src/CacheMemory.h @@ -34,10 +34,11 @@ #include #include #include + #include "CacheBase.h" -#include "Frame.h" namespace openshot { + class Frame; /** * @brief This class is a memory-based cache manager for Frame objects. diff --git a/src/ChunkReader.h b/src/ChunkReader.h index 775e20d2..004cfa39 100644 --- a/src/ChunkReader.h +++ b/src/ChunkReader.h @@ -31,16 +31,16 @@ #ifndef OPENSHOT_CHUNK_READER_H #define OPENSHOT_CHUNK_READER_H -#include "ReaderBase.h" #include #include -#include "Frame.h" +#include "ReaderBase.h" #include "Json.h" #include "CacheMemory.h" namespace openshot { + class Frame; /** * @brief This struct holds the location of a frame within a chunk. @@ -137,7 +137,7 @@ namespace openshot void SetChunkSize(int64_t new_size) { chunk_size = new_size; }; /// Get the cache object used by this reader (always return NULL for this reader) - openshot::CacheMemory* GetCache() override { return NULL; }; + openshot::CacheMemory* GetCache() override { return nullptr; }; /// @brief Get an openshot::Frame object for a specific frame number of this reader. /// @returns The requested frame (containing the image and audio) diff --git a/src/DummyReader.cpp b/src/DummyReader.cpp index e6c5fce1..40966929 100644 --- a/src/DummyReader.cpp +++ b/src/DummyReader.cpp @@ -30,6 +30,7 @@ #include "DummyReader.h" #include "Exceptions.h" +#include "Frame.h" using namespace openshot; diff --git a/src/ImageReader.cpp b/src/ImageReader.cpp index a4c21b80..9a6d3be2 100644 --- a/src/ImageReader.cpp +++ b/src/ImageReader.cpp @@ -33,6 +33,7 @@ #include "ImageReader.h" #include "Exceptions.h" +#include "Frame.h" using namespace openshot; diff --git a/src/Qt/VideoCacheThread.h b/src/Qt/VideoCacheThread.h index 1ab3b193..3e73495a 100644 --- a/src/Qt/VideoCacheThread.h +++ b/src/Qt/VideoCacheThread.h @@ -34,6 +34,7 @@ #include "../OpenMPUtilities.h" #include "../ReaderBase.h" #include "../RendererBase.h" +#include "../CacheBase.h" namespace openshot { diff --git a/src/QtHtmlReader.cpp b/src/QtHtmlReader.cpp index f14bcfa0..340d4b39 100644 --- a/src/QtHtmlReader.cpp +++ b/src/QtHtmlReader.cpp @@ -32,6 +32,8 @@ #include "QtHtmlReader.h" #include "Exceptions.h" +#include "Frame.h" + #include #include #include diff --git a/src/QtImageReader.cpp b/src/QtImageReader.cpp index 1800a0f2..8e640475 100644 --- a/src/QtImageReader.cpp +++ b/src/QtImageReader.cpp @@ -34,11 +34,12 @@ #include "Clip.h" #include "CacheMemory.h" #include "Timeline.h" -#include -#include -#include -#include -#include + +#include +#include +#include +#include +#include #if USE_RESVG == 1 // If defined and found in CMake, utilize the libresvg for parsing diff --git a/src/QtImageReader.h b/src/QtImageReader.h index 687e85e1..452cad51 100644 --- a/src/QtImageReader.h +++ b/src/QtImageReader.h @@ -31,15 +31,14 @@ #ifndef OPENSHOT_QIMAGE_READER_H #define OPENSHOT_QIMAGE_READER_H -#include -#include -#include -#include -#include #include #include "ReaderBase.h" +#include +#include +#include + namespace openshot { // Forward decl diff --git a/src/QtTextReader.cpp b/src/QtTextReader.cpp index 00627e1c..804e3410 100644 --- a/src/QtTextReader.cpp +++ b/src/QtTextReader.cpp @@ -32,6 +32,8 @@ #include "QtTextReader.h" #include "Exceptions.h" +#include "Frame.h" + #include #include diff --git a/src/QtTextReader.h b/src/QtTextReader.h index db4c73fb..ca360ef6 100644 --- a/src/QtTextReader.h +++ b/src/QtTextReader.h @@ -35,15 +35,12 @@ #include "ReaderBase.h" -#include -#include -#include -#include -#include #include + #include "CacheMemory.h" #include "Enums.h" +#include class QImage; diff --git a/src/ReaderBase.cpp b/src/ReaderBase.cpp index 127fefbe..4926349f 100644 --- a/src/ReaderBase.cpp +++ b/src/ReaderBase.cpp @@ -29,6 +29,8 @@ */ #include "ReaderBase.h" +#include "ClipBase.h" +#include "Frame.h" using namespace openshot; diff --git a/src/ReaderBase.h b/src/ReaderBase.h index 7b7847a8..4bb5e71c 100644 --- a/src/ReaderBase.h +++ b/src/ReaderBase.h @@ -31,26 +31,23 @@ #ifndef OPENSHOT_READER_BASE_H #define OPENSHOT_READER_BASE_H -#include -#include +#include #include -#include -#include -#include "CacheMemory.h" +#include +#include + #include "ChannelLayouts.h" -#include "ClipBase.h" #include "Fraction.h" -#include "Frame.h" #include "Json.h" -#include "ZmqLogger.h" -#include -#include -#include -#include -#include + +#include namespace openshot { + class ClipBase; + class CacheBase; + class Frame; + /** * @brief This struct contains info about a media file, such as height, width, frames per second, etc... * diff --git a/src/TextReader.cpp b/src/TextReader.cpp index 9ef8142f..8f246bef 100644 --- a/src/TextReader.cpp +++ b/src/TextReader.cpp @@ -33,6 +33,7 @@ #include "TextReader.h" #include "Exceptions.h" +#include "Frame.h" using namespace openshot; diff --git a/src/effects/Caption.cpp b/src/effects/Caption.cpp index 8d9bec92..0412dc3f 100644 --- a/src/effects/Caption.cpp +++ b/src/effects/Caption.cpp @@ -38,6 +38,8 @@ #include #include #include +#include +#include using namespace openshot; diff --git a/tests/CacheDisk.cpp b/tests/CacheDisk.cpp index 01df3f6e..c83234f6 100644 --- a/tests/CacheDisk.cpp +++ b/tests/CacheDisk.cpp @@ -34,6 +34,7 @@ #include #include "CacheDisk.h" +#include "Frame.h" #include "Json.h" using namespace openshot; diff --git a/tests/CacheMemory.cpp b/tests/CacheMemory.cpp index 9b8e5442..baefe021 100644 --- a/tests/CacheMemory.cpp +++ b/tests/CacheMemory.cpp @@ -34,6 +34,7 @@ #include #include "CacheMemory.h" +#include "Frame.h" #include "Json.h" using namespace openshot; From eff61c8492c6d83368fa8e16905349f862cfed5e Mon Sep 17 00:00:00 2001 From: Troy Rollo Date: Sun, 22 Aug 2021 00:06:09 +1000 Subject: [PATCH 040/114] Add support for more Chroma Key methods --- cmake/Modules/Findbabl.cmake | 48 +++++++ src/CMakeLists.txt | 16 +++ src/OpenShotVersion.h.in | 1 + src/effects/ChromaKey.cpp | 256 ++++++++++++++++++++++++++++++++--- src/effects/ChromaKey.h | 24 +++- 5 files changed, 326 insertions(+), 19 deletions(-) create mode 100644 cmake/Modules/Findbabl.cmake diff --git a/cmake/Modules/Findbabl.cmake b/cmake/Modules/Findbabl.cmake new file mode 100644 index 00000000..d91c30ce --- /dev/null +++ b/cmake/Modules/Findbabl.cmake @@ -0,0 +1,48 @@ +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON) +find_package(PkgConfig) +pkg_check_modules(PC_BABL QUIET babl) + +set(babl_VERSION ${PC_BABL_VERSION}) + +find_path(babl_INCLUDE_DIR + NAMES babl/babl.h + HINTS + ${babl_DIR}/include + ${PC_BABL_INCLUDE_DIRS} + DOC "babl include dir" +) + +find_library(babl_LIBRARY + NAMES babl-0.1 + HINTS + ${babl_DIR}/lib + ${PC_BABL_LIBDIR} + ${PC_BABL_LIBRARY_DIRS} + DOC "babl library" +) + +set ( babl_LIBRARIES ${babl_LIBRARY} ) +set ( babl_INCLUDE_DIRS ${babl_INCLUDE_DIR} ) + +if (babl_INCLUDE_DIRS AND babl_LIBRARIES) + set(babl_FOUND TRUE) +endif() + +if(babl_FOUND AND NOT TARGET babl_lib) + add_library(babl_lib UNKNOWN IMPORTED) + + set_property(TARGET babl_lib PROPERTY + INTERFACE_INCLUDE_DIRECTORIES ${babl_INCLUDE_DIR}) + set_property(TARGET babl_lib PROPERTY + IMPORTED_LOCATION ${babl_LIBRARY}) +endif() + +include ( FindPackageHandleStandardArgs ) +# handle the QUIETLY and REQUIRED arguments and set babl_FOUND to TRUE +# if all listed variables are TRUE +find_package_handle_standard_args(babl + REQUIRED_VARS + babl_INCLUDE_DIR + babl_LIBRARY + VERSION_VAR + babl_VERSION) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 15a7bcc8..5a8ac1f1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -400,6 +400,22 @@ if (TARGET cppzmq) target_link_libraries(openshot PUBLIC cppzmq) endif() +### +### Babl +### + +# Find babl library for colourspace conversion (used for advanced chroma keying +find_package(babl) + +if (babl_FOUND) + set(HAVE_BABL TRUE CACHE BOOL "Building with babl support" FORCE) + mark_as_advanced(HAVE_BABL) +endif() + +if (TARGET babl_lib) + target_link_libraries(openshot PUBLIC babl_lib) +endif () + ### ### Resvg, the Rust SVG library ### diff --git a/src/OpenShotVersion.h.in b/src/OpenShotVersion.h.in index b6f41890..5c85d7ff 100644 --- a/src/OpenShotVersion.h.in +++ b/src/OpenShotVersion.h.in @@ -48,6 +48,7 @@ #cmakedefine AVFORMAT_VERSION_STR "@AVFORMAT_VERSION_STR@" #cmakedefine AVUTIL_VERSION_STR "@AVUTIL_VERSION_STR@" #cmakedefine OPENCV_VERSION_STR "@OPENCV_VERSION_STR@" +#cmakedefine01 HAVE_BABL #cmakedefine01 HAVE_IMAGEMAGICK #cmakedefine01 HAVE_RESVG #cmakedefine01 HAVE_OPENCV diff --git a/src/effects/ChromaKey.cpp b/src/effects/ChromaKey.cpp index 7eb4aa34..5a08fdf2 100644 --- a/src/effects/ChromaKey.cpp +++ b/src/effects/ChromaKey.cpp @@ -30,11 +30,14 @@ #include "ChromaKey.h" #include "Exceptions.h" +#if HAVE_BABL +#include +#endif using namespace openshot; /// Blank constructor, useful when using Json to load the effect properties -ChromaKey::ChromaKey() : fuzz(5.0) { +ChromaKey::ChromaKey() : fuzz(5.0), method(0) { // Init default color color = Color(); @@ -45,7 +48,16 @@ ChromaKey::ChromaKey() : fuzz(5.0) { // Default constructor, which takes an openshot::Color object and a 'fuzz' factor, which // is used to determine how similar colored pixels are matched. The higher the fuzz, the // more colors are matched. -ChromaKey::ChromaKey(Color color, Keyframe fuzz) : color(color), fuzz(fuzz) +ChromaKey::ChromaKey(Color color, Keyframe fuzz) : color(color), fuzz(fuzz), method(0) +{ + // Init effect properties + init_effect_details(); +} + +/// New constructor, which takes an openshot::Color object, a 'fuzz' factor, and a numeric +/// keying method, which is used together with the fuzz factor to determine how similar +/// colored pixels are matched. The higher the fuzz, the more colors are matched. +ChromaKey::ChromaKey(Color color, Keyframe fuzz, int method) : color(color), fuzz(fuzz), method(method) { // Init effect properties init_effect_details(); @@ -79,28 +91,224 @@ std::shared_ptr ChromaKey::GetFrame(std::shared_ptr image = frame->GetImage(); unsigned char *pixels = (unsigned char *) image->bits(); + int pixelcount = image->width() * image->height(); + +#if HAVE_BABL + if (method != CHROMAKEY_METHOD_BASIC) + { + static bool need_init = true; + + + if (need_init) + { + babl_init(); + need_init = false; + } + + Babl const *rgb = babl_format("RGBA u8"); + Babl const *format = 0; + Babl const *fish = 0; + + switch(method) + { + case CHROMAKEY_METHOD_HSV_H: + case CHROMAKEY_METHOD_HSV_S: + case CHROMAKEY_METHOD_HSV_V: + format = babl_format("HSV float"); + break; + + case CHROMAKEY_METHOD_CIE_LCH_L: + case CHROMAKEY_METHOD_CIE_LCH_C: + case CHROMAKEY_METHOD_CIE_LCH_H: + format = babl_format("CIE LCH(ab) float"); + break; + + case CHROMAKEY_METHOD_CIE_DISTANCE: + format = babl_format("CIE Lab u8"); + break; + } + + if (rgb && format && (fish = babl_fish(rgb, format)) != 0) + { + int idx = 0; + unsigned char mask_in[4]; + union { float f[4]; unsigned char u[4]; } mask; + + pixelbuf.resize(pixelcount * sizeof(float) * 3); + + float const *pf = (float *) pixelbuf.data(); + unsigned char const *pc = pixelbuf.data(); + int pixel; + + mask_in[0] = mask_R; + mask_in[1] = mask_G; + mask_in[2] = mask_B; + mask_in[3] = 255; + babl_process(fish, mask_in, &mask, 1); + + babl_process(fish, pixels, pixelbuf.data(), pixelcount); + + switch(method) + { + case CHROMAKEY_METHOD_HSV_H: + for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + { + float tmp = fabs(pf[0] - mask.f[0]); + + tmp = fabs(pf[0] - mask.f[0]); + if (tmp > 0.5) + tmp = 1.0 - tmp; + if (tmp * 500 <= threshold) + pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + } + break; + + case CHROMAKEY_METHOD_HSV_S: + for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + { + if (fabs(pf[1] - mask.f[1]) * 255 <= threshold) + pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + } + break; + + case CHROMAKEY_METHOD_HSV_V: + for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + { + if (fabs((pf[2] - mask.f[2]) * 255) <= threshold) + pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + } + break; + + case CHROMAKEY_METHOD_CIE_LCH_L: + for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + { + if (fabs(pf[0] - mask.f[0]) <= threshold) + pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + } + break; + + case CHROMAKEY_METHOD_CIE_LCH_C: + for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + { + if (fabs(pf[1] - mask.f[1]) <= threshold) + pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + } + break; + + case CHROMAKEY_METHOD_CIE_LCH_H: + for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + { + float tmp = fabs(pf[2] - mask.f[2]); + + if (tmp > 180.0) + tmp = 360.0 - tmp; + if (tmp <= threshold) + pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + } + break; + + case CHROMAKEY_METHOD_CIE_DISTANCE: + { + float KL = 1.0; + float KC = 1.0; + float KH = 1.0; + float pi = 4 * atan(1); + + float L1 = ((float) mask.u[0]) / 2.55; + float a1 = mask.u[1] - 127; + float b1 = mask.u[2] - 127; + float C1 = sqrt(a1 * a1 + b1 * b1); + + for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pc += 3) + { + float L2 = ((float) pc[0]) / 2.55; + float a2 = pc[1] - 127; + float b2 = pc[2] - 127; + float C2 = sqrt(a2 * a2 + b2 * b2); + + float delta_L_prime = L2 - L1; + float L_bar = (L1 + L2) / 2; + float C_bar = (C1 + C2) / 2; + + float a_prime_multiplier = 1 + 0.5 * (1 - sqrt(C_bar / (C_bar + 25))); + float a1_prime = a1 * a_prime_multiplier; + float a2_prime = a2 * a_prime_multiplier; + + float C1_prime = sqrt(a1_prime * a1_prime + b1 * b1); + float C2_prime = sqrt(a2_prime * a2_prime + b2 * b2); + float C_prime_bar = (C1_prime + C2_prime) / 2; + float delta_C_prime = C2_prime - C1_prime; + + float h1_prime = atan2(b1, a1_prime) * 180 / pi; + float h2_prime = atan2(b2, a2_prime) * 180 / pi; + + float delta_h_prime = h2_prime - h1_prime; + double H_prime_bar = (C1_prime != 0 && C2_prime != 0) ? (h1_prime + h2_prime) / 2 : (h1_prime + h2_prime); + + if (delta_h_prime < -180) + { + delta_h_prime += 360; + if (H_prime_bar < 180) + H_prime_bar += 180; + else + H_prime_bar -= 180; + } + else if (delta_h_prime > 180) + { + delta_h_prime -= 360; + if (H_prime_bar < 180) + H_prime_bar += 180; + else + H_prime_bar -= 180; + } + + float delta_H_prime = 2 * sqrt(C1_prime * C2_prime) * sin(delta_h_prime * pi / 360); + + float T = 1 + - 0.17 * cos((H_prime_bar - 30) * pi / 180) + + 0.24 * cos(H_prime_bar * pi / 90) + + 0.32 * cos((3 * H_prime_bar + 6) * pi / 180) + - 0.20 * cos((4 * H_prime_bar - 64) * pi / 180); + + float SL = 1 + 0.015 * square(L_bar - 50) / sqrt(20 + square(L_bar - 50)); + float SC = 1 + 0.045 * C_prime_bar; + float SH = 1 + 0.015 * C_prime_bar * T; + float RT = -2 * sqrt(C_prime_bar / (C_prime_bar + 25)) * sin(pi / 3 * exp(-square((H_prime_bar - 275) / 25))); + float delta_E = sqrt(square(delta_L_prime / KL / SL) + + square(delta_C_prime / KC / SC) + + square(delta_h_prime / KH / SH) + + RT * delta_C_prime / KC / SC * delta_H_prime / KH / SH); + if (delta_E < threshold) + pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + } + } + break; + } + + return frame; + } + } +#endif + // Loop through pixels - for (int pixel = 0, byte_index=0; pixel < image->width() * image->height(); pixel++, byte_index+=4) + for (int pixel = 0; pixel < pixelcount; pixel++, pixels += 4) { // Get the RGB values from the pixel // Remove the premultiplied alpha values from R,G,B - float A = float(pixels[byte_index + 3]); - unsigned char R = (pixels[byte_index] / A) * 255.0; - unsigned char G = (pixels[byte_index + 1] / A) * 255.0; - unsigned char B = (pixels[byte_index + 2] / A) * 255.0; + float A = float(pixels[3]); + unsigned char R = (pixels[0] / A) * 255.0; + unsigned char G = (pixels[1] / A) * 255.0; + unsigned char B = (pixels[2] / A) * 255.0; - // Get distance between mask color and pixel color - long distance = Color::GetDistance((long)R, (long)G, (long)B, mask_R, mask_G, mask_B); + // Get distance between mask color and pixel color + long distance = Color::GetDistance((long)R, (long)G, (long)B, mask_R, mask_G, mask_B); - if (distance <= threshold) { - // MATCHED - Make pixel transparent - // Due to premultiplied alpha, we must also zero out - // the individual color channels (or else artifacts are left behind) - pixels[byte_index] = 0; - pixels[byte_index + 1] = 0; - pixels[byte_index + 2] = 0; - pixels[byte_index + 3] = 0; - } + if (distance <= threshold) { + // MATCHED - Make pixel transparent + // Due to premultiplied alpha, we must also zero out + // the individual color channels (or else artifacts are left behind) + pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + } } // return the modified frame @@ -122,6 +330,7 @@ Json::Value ChromaKey::JsonValue() const { root["type"] = info.class_name; root["color"] = color.JsonValue(); root["fuzz"] = fuzz.JsonValue(); + root["keymethod"] = method; // return JsonValue return root; @@ -155,6 +364,8 @@ void ChromaKey::SetJsonValue(const Json::Value root) { color.SetJsonValue(root["color"]); if (!root["fuzz"].isNull()) fuzz.SetJsonValue(root["fuzz"]); + if (!root["keymethod"].isNull()) + method = root["keymethod"].asInt(); } // Get all properties for a specific frame @@ -175,6 +386,15 @@ std::string ChromaKey::PropertiesJSON(int64_t requested_frame) const { root["color"]["blue"] = add_property_json("Blue", color.blue.GetValue(requested_frame), "float", "", &color.blue, 0, 255, false, requested_frame); root["color"]["green"] = add_property_json("Green", color.green.GetValue(requested_frame), "float", "", &color.green, 0, 255, false, requested_frame); root["fuzz"] = add_property_json("Fuzz", fuzz.GetValue(requested_frame), "float", "", &fuzz, 0, 125, false, requested_frame); + root["keymethod"] = add_property_json("Key Method", method, "int", "", NULL, 0, CHROMAKEY_METHOD_LAST, false, requested_frame); + root["keymethod"]["choices"].append(add_property_choice_json("Basic keying", 0, method)); + root["keymethod"]["choices"].append(add_property_choice_json("HSV hue", 1, method)); + root["keymethod"]["choices"].append(add_property_choice_json("HSV saturation", 2, method)); + root["keymethod"]["choices"].append(add_property_choice_json("HSV value", 3, method)); + root["keymethod"]["choices"].append(add_property_choice_json("LCH luminosity", 4, method)); + root["keymethod"]["choices"].append(add_property_choice_json("LCH chroma", 5, method)); + root["keymethod"]["choices"].append(add_property_choice_json("LCH hue", 6, method)); + root["keymethod"]["choices"].append(add_property_choice_json("CIE Distance", 7, method)); // Set the parent effect which properties this effect will inherit root["parent_effect_id"] = add_property_json("Parent", 0.0, "string", info.parent_effect_id, NULL, -1, -1, false, requested_frame); diff --git a/src/effects/ChromaKey.h b/src/effects/ChromaKey.h index f66f1309..e5cbf64f 100644 --- a/src/effects/ChromaKey.h +++ b/src/effects/ChromaKey.h @@ -41,11 +41,21 @@ #include #include +#define CHROMAKEY_METHOD_BASIC 0 +#define CHROMAKEY_METHOD_HSV_H 1 +#define CHROMAKEY_METHOD_HSV_S 2 +#define CHROMAKEY_METHOD_HSV_V 3 +#define CHROMAKEY_METHOD_CIE_LCH_L 4 +#define CHROMAKEY_METHOD_CIE_LCH_C 5 +#define CHROMAKEY_METHOD_CIE_LCH_H 6 +#define CHROMAKEY_METHOD_CIE_DISTANCE 7 +#define CHROMAKEY_METHOD_LAST 7 + namespace openshot { /** - * @brief This class uses the ImageMagick++ libraries, to remove (i.e. key out) a color (i.e. greenscreen) + * @brief This class removes (i.e. keys out) a color (i.e. greenscreen) * * The greenscreen / bluescreen effect replaces matching colors in the video image with * transparent pixels, revealing lower layers in the timeline. @@ -55,6 +65,9 @@ namespace openshot private: Color color; Keyframe fuzz; + int method; + + mutable std::vector pixelbuf; /// Init effect settings void init_effect_details(); @@ -72,6 +85,15 @@ namespace openshot /// @param fuzz The fuzz factor (or threshold) ChromaKey(Color color, Keyframe fuzz); + /// New constructor, which takes an openshot::Color object, a 'fuzz' factor, and a numeric + /// keying method, which is used together with the fuzz factor to determine how similar + /// colored pixels are matched. The higher the fuzz, the more colors are matched. + /// + /// @param color The color to match + /// @param fuzz The fuzz factor (or threshold) + /// @param method The keying method + ChromaKey(Color color, Keyframe fuzz, int method); + /// @brief This method is required for all derived classes of ClipBase, and returns a /// new openshot::Frame object. All Clip keyframes and effects are resolved into /// pixels. From c52b2c1cee85ac805529ead5d1b1f1e5cd9c291a Mon Sep 17 00:00:00 2001 From: Troy Rollo Date: Sun, 19 Sep 2021 10:24:52 +1000 Subject: [PATCH 041/114] Use int for temporaries where possible in CIE distance calculations. --- src/effects/ChromaKey.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/effects/ChromaKey.cpp b/src/effects/ChromaKey.cpp index 5a08fdf2..77ecd7e9 100644 --- a/src/effects/ChromaKey.cpp +++ b/src/effects/ChromaKey.cpp @@ -222,8 +222,8 @@ std::shared_ptr ChromaKey::GetFrame(std::shared_ptr Date: Sun, 19 Sep 2021 23:57:36 +1000 Subject: [PATCH 042/114] Improve new Chroma Key options. Includes code amendments as requested upstream, improved accuracy, new keying methods and the addition of a secondary halo threshhold (pixels in the halo threshold get an alpha between zero and one). --- cmake/Modules/Findbabl.cmake | 28 +- src/CMakeLists.txt | 1 + src/Enums.h | 18 +- src/effects/ChromaKey.cpp | 516 +++++++++++++++++++++++++---------- src/effects/ChromaKey.h | 52 ++-- 5 files changed, 440 insertions(+), 175 deletions(-) diff --git a/cmake/Modules/Findbabl.cmake b/cmake/Modules/Findbabl.cmake index d91c30ce..c302f52e 100644 --- a/cmake/Modules/Findbabl.cmake +++ b/cmake/Modules/Findbabl.cmake @@ -1,6 +1,22 @@ -set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON) +function(_babl_GET_VERSION _header) + file(STRINGS "${_header}" _version_defs + REGEX "^[ \t]*#define[ \t]+BABL_[A-Z]+_VERSION.*") + if(_version_defs) + string(REGEX REPLACE + ".*BABL_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" + babl_MAJOR "${_version_defs}") + string(REGEX REPLACE + ".*BABL_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" + babl_MINOR "${_version_defs}") + string(REGEX REPLACE + ".*BABL_MICRO_VERSION[ \t]+([0-9]+).*" "\\1" + babl_PATCH "${_version_defs}") + set(babl_VERSION "${babl_MAJOR}.${babl_MINOR}.${babl_PATCH}" PARENT_SCOPE) + endif() +endfunction() + find_package(PkgConfig) -pkg_check_modules(PC_BABL QUIET babl) +pkg_check_modules(PC_BABL babl) set(babl_VERSION ${PC_BABL_VERSION}) @@ -14,6 +30,7 @@ find_path(babl_INCLUDE_DIR find_library(babl_LIBRARY NAMES babl-0.1 + SUFFIXES babl-0.1 HINTS ${babl_DIR}/lib ${PC_BABL_LIBDIR} @@ -24,6 +41,13 @@ find_library(babl_LIBRARY set ( babl_LIBRARIES ${babl_LIBRARY} ) set ( babl_INCLUDE_DIRS ${babl_INCLUDE_DIR} ) +if(babl_INCLUDE_DIR AND NOT babl_VERSION) + set(_version_hdr "${babl_INCLUDE_DIR}/babl/babl-version.h") + if(EXISTS "${_version_hdr}") + _babl_GET_VERSION("${_version_hdr}") + endif() +endif() + if (babl_INCLUDE_DIRS AND babl_LIBRARIES) set(babl_FOUND TRUE) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5a8ac1f1..5f3a823c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -413,6 +413,7 @@ if (babl_FOUND) endif() if (TARGET babl_lib) + target_compile_definitions(openshot PUBLIC USE_BABL=1) target_link_libraries(openshot PUBLIC babl_lib) endif () diff --git a/src/Enums.h b/src/Enums.h index 601b2de9..4737429a 100644 --- a/src/Enums.h +++ b/src/Enums.h @@ -132,6 +132,22 @@ namespace openshot HANN, HAMMING, }; - + + /// This enumeration determines the algorithm used by the ChromaKey filter + enum ChromaKeyMethod + { + CHROMAKEY_BASIC, ///< Length of difference between RGB vectors + CHROMAKEY_HSVL_H, ///< Difference between HSV/HSL hues + CHROMAKEY_HSV_S, ///< Difference between HSV saturations + CHROMAKEY_HSL_S, ///< Difference between HSL saturations + CHROMAKEY_HSV_V, ///< Difference between HSV values + CHROMAKEY_HSL_L, ///< Difference between HSL luminances + CHROMAKEY_CIE_LCH_L, ///< Difference between CIE LCH(ab) luminousities + CHROMAKEY_CIE_LCH_C, ///< Difference between CIE LCH(ab) chromas + CHROMAKEY_CIE_LCH_H, ///< Difference between CIE LCH(ab) hues + CHROMAKEY_CIE_DISTANCE, ///< CIEDE2000 perceptual difference + CHROMAKEY_YCBCR, ///< YCbCr vector difference of CbCr + CHROMAKEY_LAST_METHOD = CHROMAKEY_YCBCR + }; } #endif diff --git a/src/effects/ChromaKey.cpp b/src/effects/ChromaKey.cpp index 77ecd7e9..d5becd6e 100644 --- a/src/effects/ChromaKey.cpp +++ b/src/effects/ChromaKey.cpp @@ -2,6 +2,7 @@ * @file * @brief Source file for ChromaKey class * @author Jonathan Thomas + * @author Troy Rollo * * @ref License */ @@ -30,14 +31,15 @@ #include "ChromaKey.h" #include "Exceptions.h" -#if HAVE_BABL +#if USE_BABL #include #endif +#include using namespace openshot; /// Blank constructor, useful when using Json to load the effect properties -ChromaKey::ChromaKey() : fuzz(5.0), method(0) { +ChromaKey::ChromaKey() : fuzz(5.0), halo(0), method(CHROMAKEY_BASIC) { // Init default color color = Color(); @@ -45,19 +47,10 @@ ChromaKey::ChromaKey() : fuzz(5.0), method(0) { init_effect_details(); } -// Default constructor, which takes an openshot::Color object and a 'fuzz' factor, which -// is used to determine how similar colored pixels are matched. The higher the fuzz, the -// more colors are matched. -ChromaKey::ChromaKey(Color color, Keyframe fuzz) : color(color), fuzz(fuzz), method(0) -{ - // Init effect properties - init_effect_details(); -} - -/// New constructor, which takes an openshot::Color object, a 'fuzz' factor, and a numeric -/// keying method, which is used together with the fuzz factor to determine how similar -/// colored pixels are matched. The higher the fuzz, the more colors are matched. -ChromaKey::ChromaKey(Color color, Keyframe fuzz, int method) : color(color), fuzz(fuzz), method(method) +// Standard constructor, which takes an openshot::Color object, a 'fuzz' factor, +// an optional halo distance and an optional keying method. +ChromaKey::ChromaKey(Color color, Keyframe fuzz, Keyframe halo, ChromaKeyMethod method) : + color(color), fuzz(fuzz), halo(halo), method(method) { // Init effect properties init_effect_details(); @@ -79,66 +72,126 @@ void ChromaKey::init_effect_details() // This method is required for all derived classes of EffectBase, and returns a // modified openshot::Frame object +// +// Because a frame's QImage is always in Format_RGB8888_Premultiplied, we do not +// need to muck about with QRgb and its helper functions, qRed, QGreen, QBlue and +// qAlpha, and indeed doing so will get wrong results on almost every platform +// when we operate on the pixel buffers instead of calling the pixel methods in +// QImage. QRgb is always in the form 0xAARRGGBB, but treating the pixel buffer +// as an array of QRgb will yield values of the form 0xAABBGGRR on little endian +// systems and 0xRRGGBBAA on big endian systems. +// +// We need to operate on the pixel buffers here because doing this all pixel by +// pixel is be horribly slow, especially with keying methods other than basic. +// The babl conversion functions are very slow if iterating over pixels and every +// effort should be made to do babl conversions in blocks of as many pixels as +// can be done at once. +// +// The default keying method tries to ascertain the original pixel color by +// dividing the red, green and blue channels by the alpha (and multiplying by +// 255). The other methods do not do this for several reasons: +// +// 1. The calculation will not necessarily return the original value, because +// the premultiplication of alpha using unsigned 8 bit integers loses +// accuracy at the least significant bit. Even an alpha of 0xfe means that +// we are left with only 255 values to start with and cannot regain the full +// 256 values that could have been in the input. At an alpha of 0x7f the +// entire least significant bit has been lost, and at an alpho of 0x3f the +// two entire least significant bits have been lost. Chroma keying is very +// sensitive to these losses of precision so if the alpha has been applied +// already at anything other than 0xff and 0x00, we are already screwed and +// this calculation will not help. +// +// 2. The calculation used for the default method seems to be wrong anyway as +// it always rounds down rather than to the nearest whole number. +// +// 3. As mentioned above, babl conversion functions are very slow when iterating +// over individual pixels. We would have to convert the entire input buffer +// in one go to avoid this. It just does not seem worth it given the loss +// of accuracy we already have. +// +// 4. It is difficult to see how it could make sense to apply chroma keying +// after other non-chroma-key effects. The purpose is to remove an unwanted +// background in the input stream, rather than removing some calculated +// value that is the output of another effect. std::shared_ptr ChromaKey::GetFrame(std::shared_ptr frame, int64_t frame_number) { - // Determine the current HSL (Hue, Saturation, Lightness) for the Chrome int threshold = fuzz.GetInt(frame_number); + int halothreshold = halo.GetInt(frame_number); long mask_R = color.red.GetInt(frame_number); long mask_G = color.green.GetInt(frame_number); long mask_B = color.blue.GetInt(frame_number); - // Get source image's pixels + // Get source image std::shared_ptr image = frame->GetImage(); - unsigned char *pixels = (unsigned char *) image->bits(); - int pixelcount = image->width() * image->height(); + int width = image->width(); + int height = image->height(); -#if HAVE_BABL - if (method != CHROMAKEY_METHOD_BASIC) + int pixelcount = width * height; + +#if USE_BABL + if (method > CHROMAKEY_BASIC && method <= CHROMAKEY_LAST_METHOD) { static bool need_init = true; - if (need_init) { babl_init(); need_init = false; } - Babl const *rgb = babl_format("RGBA u8"); + Babl const *rgb = babl_format("R'G'B'A u8"); Babl const *format = 0; Babl const *fish = 0; + std::vector pixelbuf; + int rowwidth = 0; switch(method) { - case CHROMAKEY_METHOD_HSV_H: - case CHROMAKEY_METHOD_HSV_S: - case CHROMAKEY_METHOD_HSV_V: + case CHROMAKEY_HSVL_H: + case CHROMAKEY_HSV_S: + case CHROMAKEY_HSV_V: format = babl_format("HSV float"); + rowwidth = width * sizeof(float) * 3; break; - case CHROMAKEY_METHOD_CIE_LCH_L: - case CHROMAKEY_METHOD_CIE_LCH_C: - case CHROMAKEY_METHOD_CIE_LCH_H: + case CHROMAKEY_HSL_S: + case CHROMAKEY_HSL_L: + format = babl_format("HSL float"); + rowwidth = width * sizeof(float) * 3; + break; + + case CHROMAKEY_CIE_LCH_L: + case CHROMAKEY_CIE_LCH_C: + case CHROMAKEY_CIE_LCH_H: format = babl_format("CIE LCH(ab) float"); + rowwidth = width * sizeof(float) * 3; break; - case CHROMAKEY_METHOD_CIE_DISTANCE: + case CHROMAKEY_CIE_DISTANCE: format = babl_format("CIE Lab u8"); + rowwidth = width * 3; + break; + + case CHROMAKEY_YCBCR: + format = babl_format("Y'CbCr u8"); + rowwidth = width * 3; + break; + + case CHROMAKEY_BASIC: break; } + pixelbuf.resize(rowwidth * height); + if (rgb && format && (fish = babl_fish(rgb, format)) != 0) { int idx = 0; unsigned char mask_in[4]; union { float f[4]; unsigned char u[4]; } mask; - - pixelbuf.resize(pixelcount * sizeof(float) * 3); - float const *pf = (float *) pixelbuf.data(); unsigned char const *pc = pixelbuf.data(); - int pixel; mask_in[0] = mask_R; mask_in[1] = mask_G; @@ -146,68 +199,211 @@ std::shared_ptr ChromaKey::GetFrame(std::shared_ptrbytesPerLine() == width * 4) + { + // Because babl_process is expensive to call, but efficient + // with long sequences of pixels, attempt to convert the + // entire buffer at once if we can + babl_process(fish, image->bits(), pixelbuf.data(), pixelcount); + } + else + { + unsigned char *rowdata = pixelbuf.data(); + + for (int y = 0; y < height; ++y, rowdata += rowwidth) + babl_process(fish, image->scanLine(y), rowdata, width); + } switch(method) { - case CHROMAKEY_METHOD_HSV_H: - for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + case CHROMAKEY_HSVL_H: + for (int y = 0; y < height; ++y) { - float tmp = fabs(pf[0] - mask.f[0]); + unsigned char *pixel = image->scanLine(y); - tmp = fabs(pf[0] - mask.f[0]); - if (tmp > 0.5) - tmp = 1.0 - tmp; - if (tmp * 500 <= threshold) - pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + for (int x = 0; x < width; ++x, pixel += 4, pf += 3) + { + float tmp = fabs(pf[0] - mask.f[0]); + + if (tmp > 0.5) + tmp = 1.0 - tmp; + tmp *= 500; + if (tmp <= threshold) + { + pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0; + } + else if (tmp <= threshold + halothreshold) + { + float alphamult = (tmp - threshold) / halothreshold; + + pixel[0] *= alphamult; + pixel[1] *= alphamult; + pixel[2] *= alphamult; + pixel[3] *= alphamult; + } + } } break; - case CHROMAKEY_METHOD_HSV_S: - for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + case CHROMAKEY_HSV_S: + case CHROMAKEY_HSL_S: + for (int y = 0; y < height; ++y) { - if (fabs(pf[1] - mask.f[1]) * 255 <= threshold) - pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + unsigned char *pixel = image->scanLine(y); + + for (int x = 0; x < width; ++x, pixel += 4, pf += 3) + { + float tmp = fabs(pf[1] - mask.f[1]) * 255; + + if (tmp <= threshold) + { + pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0; + } + else if (tmp <= threshold + halothreshold) + { + float alphamult = (tmp - threshold) / halothreshold; + + pixel[0] *= alphamult; + pixel[1] *= alphamult; + pixel[2] *= alphamult; + pixel[3] *= alphamult; + } + } } break; - case CHROMAKEY_METHOD_HSV_V: - for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + case CHROMAKEY_HSV_V: + case CHROMAKEY_HSL_L: + for (int y = 0; y < height; ++y) { - if (fabs((pf[2] - mask.f[2]) * 255) <= threshold) - pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + unsigned char *pixel = image->scanLine(y); + + for (int x = 0; x < width; ++x, pixel += 4, pf += 3) + { + float tmp = fabs(pf[2] - mask.f[2]) * 255; + + if (tmp <= threshold) + { + pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0; + } + else if (tmp <= threshold + halothreshold) + { + float alphamult = (tmp - threshold) / halothreshold; + + pixel[0] *= alphamult; + pixel[1] *= alphamult; + pixel[2] *= alphamult; + pixel[3] *= alphamult; + } + } } break; - case CHROMAKEY_METHOD_CIE_LCH_L: - for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + case CHROMAKEY_YCBCR: + for (int y = 0; y < height; ++y) { - if (fabs(pf[0] - mask.f[0]) <= threshold) - pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + unsigned char *pixel = image->scanLine(y); + + for (int x = 0; x < width; ++x, pixel += 4, pc += 3) + { + int db = (int) pc[1] - mask.u[1]; + int dr = (int) pc[2] - mask.u[2]; + float tmp = sqrt(db * db + dr * dr); + + if (tmp <= threshold) + { + pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0; + } + else if (tmp <= threshold + halothreshold) + { + float alphamult = (tmp - threshold) / halothreshold; + + pixel[0] *= alphamult; + pixel[1] *= alphamult; + pixel[2] *= alphamult; + pixel[3] *= alphamult; + } + } } break; - case CHROMAKEY_METHOD_CIE_LCH_C: - for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + case CHROMAKEY_CIE_LCH_L: + for (int y = 0; y < height; ++y) { - if (fabs(pf[1] - mask.f[1]) <= threshold) - pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + unsigned char *pixel = image->scanLine(y); + + for (int x = 0; x < width; ++x, pixel += 4, pf += 3) + { + float tmp = fabs(pf[0] - mask.f[0]); + + if (tmp <= threshold) + { + pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0; + } + else if (tmp <= threshold + halothreshold) + { + float alphamult = (tmp - threshold) / halothreshold; + + pixel[0] *= alphamult; + pixel[1] *= alphamult; + pixel[2] *= alphamult; + pixel[3] *= alphamult; + } + } } break; - case CHROMAKEY_METHOD_CIE_LCH_H: - for (pixel = 0; pixel < pixelcount; pixel++, pixels += 4, pf += 3) + case CHROMAKEY_CIE_LCH_C: + for (int y = 0; y < height; ++y) { - float tmp = fabs(pf[2] - mask.f[2]); + unsigned char *pixel = image->scanLine(y); - if (tmp > 180.0) - tmp = 360.0 - tmp; - if (tmp <= threshold) - pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + for (int x = 0; x < width; ++x, pixel += 4, pf += 3) + { + float tmp = fabs(pf[1] - mask.f[1]) <= threshold; + + if (tmp <= threshold) + { + pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0; + } + else if (tmp <= threshold + halothreshold) + { + float alphamult = (tmp - threshold) / halothreshold; + + pixel[0] *= alphamult; + pixel[1] *= alphamult; + pixel[2] *= alphamult; + pixel[3] *= alphamult; + } + } } break; - case CHROMAKEY_METHOD_CIE_DISTANCE: + case CHROMAKEY_CIE_LCH_H: + for (int y = 0; y < height; ++y) + { + unsigned char *pixel = image->scanLine(y); + + for (int x = 0; x < width; ++x, pixel += 4, pf += 3) + { + // Hues in LCH(ab) are an angle on a color wheel. + // We are tring to find the angular distance + // between the two angles. It can never be more + // than 180 degrees - if it is, there is a closer + // angle that can be calculated by going in the + // other diretion, which can be found by + // subtracting the angle we have from 360. + float tmp = fabs(pf[2] - mask.f[2]); + + if (tmp > 180.0) + tmp = 360.0 - tmp; + if (tmp <= threshold) + pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0; + } + } + break; + + case CHROMAKEY_CIE_DISTANCE: { float KL = 1.0; float KC = 1.0; @@ -219,67 +415,83 @@ std::shared_ptr ChromaKey::GetFrame(std::shared_ptrscanLine(y); - float delta_L_prime = L2 - L1; - float L_bar = (L1 + L2) / 2; - float C_bar = (C1 + C2) / 2; - - float a_prime_multiplier = 1 + 0.5 * (1 - sqrt(C_bar / (C_bar + 25))); - float a1_prime = a1 * a_prime_multiplier; - float a2_prime = a2 * a_prime_multiplier; - - float C1_prime = sqrt(a1_prime * a1_prime + b1 * b1); - float C2_prime = sqrt(a2_prime * a2_prime + b2 * b2); - float C_prime_bar = (C1_prime + C2_prime) / 2; - float delta_C_prime = C2_prime - C1_prime; - - float h1_prime = atan2(b1, a1_prime) * 180 / pi; - float h2_prime = atan2(b2, a2_prime) * 180 / pi; - - float delta_h_prime = h2_prime - h1_prime; - double H_prime_bar = (C1_prime != 0 && C2_prime != 0) ? (h1_prime + h2_prime) / 2 : (h1_prime + h2_prime); - - if (delta_h_prime < -180) + for (int x = 0; x < width; ++x, pixel += 4, pc += 3) { - delta_h_prime += 360; - if (H_prime_bar < 180) - H_prime_bar += 180; - else - H_prime_bar -= 180; + float L2 = ((float) pc[0]) / 2.55; + int a2 = pc[1] - 127; + int b2 = pc[2] - 127; + float C2 = sqrt(a2 * a2 + b2 * b2); + + float delta_L_prime = L2 - L1; + float L_bar = (L1 + L2) / 2; + float C_bar = (C1 + C2) / 2; + + float a_prime_multiplier = 1 + 0.5 * (1 - sqrt(C_bar / (C_bar + 25))); + float a1_prime = a1 * a_prime_multiplier; + float a2_prime = a2 * a_prime_multiplier; + + float C1_prime = sqrt(a1_prime * a1_prime + b1 * b1); + float C2_prime = sqrt(a2_prime * a2_prime + b2 * b2); + float C_prime_bar = (C1_prime + C2_prime) / 2; + float delta_C_prime = C2_prime - C1_prime; + + float h1_prime = atan2(b1, a1_prime) * 180 / pi; + float h2_prime = atan2(b2, a2_prime) * 180 / pi; + + float delta_h_prime = h2_prime - h1_prime; + double H_prime_bar = (C1_prime != 0 && C2_prime != 0) ? (h1_prime + h2_prime) / 2 : (h1_prime + h2_prime); + + if (delta_h_prime < -180) + { + delta_h_prime += 360; + if (H_prime_bar < 180) + H_prime_bar += 180; + else + H_prime_bar -= 180; + } + else if (delta_h_prime > 180) + { + delta_h_prime -= 360; + if (H_prime_bar < 180) + H_prime_bar += 180; + else + H_prime_bar -= 180; + } + + float delta_H_prime = 2 * sqrt(C1_prime * C2_prime) * sin(delta_h_prime * pi / 360); + + float T = 1 + - 0.17 * cos((H_prime_bar - 30) * pi / 180) + + 0.24 * cos(H_prime_bar * pi / 90) + + 0.32 * cos((3 * H_prime_bar + 6) * pi / 180) + - 0.20 * cos((4 * H_prime_bar - 64) * pi / 180); + + float SL = 1 + 0.015 * square(L_bar - 50) / sqrt(20 + square(L_bar - 50)); + float SC = 1 + 0.045 * C_prime_bar; + float SH = 1 + 0.015 * C_prime_bar * T; + float RT = -2 * sqrt(C_prime_bar / (C_prime_bar + 25)) * sin(pi / 3 * exp(-square((H_prime_bar - 275) / 25))); + float delta_E = sqrt(square(delta_L_prime / KL / SL) + + square(delta_C_prime / KC / SC) + + square(delta_h_prime / KH / SH) + + RT * delta_C_prime / KC / SC * delta_H_prime / KH / SH); + if (delta_E <= threshold) + { + pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0; + } + else if (delta_E <= threshold + halothreshold) + { + float alphamult = (delta_E - threshold) / halothreshold; + + pixel[0] *= alphamult; + pixel[1] *= alphamult; + pixel[2] *= alphamult; + pixel[3] *= alphamult; + } } - else if (delta_h_prime > 180) - { - delta_h_prime -= 360; - if (H_prime_bar < 180) - H_prime_bar += 180; - else - H_prime_bar -= 180; - } - - float delta_H_prime = 2 * sqrt(C1_prime * C2_prime) * sin(delta_h_prime * pi / 360); - - float T = 1 - - 0.17 * cos((H_prime_bar - 30) * pi / 180) - + 0.24 * cos(H_prime_bar * pi / 90) - + 0.32 * cos((3 * H_prime_bar + 6) * pi / 180) - - 0.20 * cos((4 * H_prime_bar - 64) * pi / 180); - - float SL = 1 + 0.015 * square(L_bar - 50) / sqrt(20 + square(L_bar - 50)); - float SC = 1 + 0.045 * C_prime_bar; - float SH = 1 + 0.015 * C_prime_bar * T; - float RT = -2 * sqrt(C_prime_bar / (C_prime_bar + 25)) * sin(pi / 3 * exp(-square((H_prime_bar - 275) / 25))); - float delta_E = sqrt(square(delta_L_prime / KL / SL) - + square(delta_C_prime / KC / SC) - + square(delta_h_prime / KH / SH) - + RT * delta_C_prime / KC / SC * delta_H_prime / KH / SH); - if (delta_E < threshold) - pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; } } break; @@ -291,23 +503,26 @@ std::shared_ptr ChromaKey::GetFrame(std::shared_ptrscanLine(y); - // Get distance between mask color and pixel color - long distance = Color::GetDistance((long)R, (long)G, (long)B, mask_R, mask_G, mask_B); + for (int x = 0; x < width; ++x, pixel += 4) + { + float A = pixel[3]; + unsigned char R = (pixel[0] / A) * 255.0; + unsigned char G = (pixel[1] / A) * 255.0; + unsigned char B = (pixel[2] / A) * 255.0; - if (distance <= threshold) { - // MATCHED - Make pixel transparent - // Due to premultiplied alpha, we must also zero out - // the individual color channels (or else artifacts are left behind) - pixels[0] = pixels[1] = pixels[2] = pixels[3] = 0; + // Get distance between mask color and pixel color + long distance = Color::GetDistance((long)R, (long)G, (long)B, mask_R, mask_G, mask_B); + + if (distance <= threshold) { + // MATCHED - Make pixel transparent + // Due to premultiplied alpha, we must also zero out + // the individual color channels (or else artifacts are left behind) + pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0; + } } } @@ -330,6 +545,7 @@ Json::Value ChromaKey::JsonValue() const { root["type"] = info.class_name; root["color"] = color.JsonValue(); root["fuzz"] = fuzz.JsonValue(); + root["halo"] = halo.JsonValue(); root["keymethod"] = method; // return JsonValue @@ -364,8 +580,10 @@ void ChromaKey::SetJsonValue(const Json::Value root) { color.SetJsonValue(root["color"]); if (!root["fuzz"].isNull()) fuzz.SetJsonValue(root["fuzz"]); + if (!root["halo"].isNull()) + halo.SetJsonValue(root["halo"]); if (!root["keymethod"].isNull()) - method = root["keymethod"].asInt(); + method = (ChromaKeyMethod) root["keymethod"].asInt(); } // Get all properties for a specific frame @@ -385,16 +603,20 @@ std::string ChromaKey::PropertiesJSON(int64_t requested_frame) const { root["color"]["red"] = add_property_json("Red", color.red.GetValue(requested_frame), "float", "", &color.red, 0, 255, false, requested_frame); root["color"]["blue"] = add_property_json("Blue", color.blue.GetValue(requested_frame), "float", "", &color.blue, 0, 255, false, requested_frame); root["color"]["green"] = add_property_json("Green", color.green.GetValue(requested_frame), "float", "", &color.green, 0, 255, false, requested_frame); - root["fuzz"] = add_property_json("Fuzz", fuzz.GetValue(requested_frame), "float", "", &fuzz, 0, 125, false, requested_frame); - root["keymethod"] = add_property_json("Key Method", method, "int", "", NULL, 0, CHROMAKEY_METHOD_LAST, false, requested_frame); + root["fuzz"] = add_property_json("Threshold", fuzz.GetValue(requested_frame), "float", "", &fuzz, 0, 125, false, requested_frame); + root["halo"] = add_property_json("Halo", halo.GetValue(requested_frame), "float", "", &halo, 0, 125, false, requested_frame); + root["keymethod"] = add_property_json("Key Method", method, "int", "", NULL, 0, CHROMAKEY_LAST_METHOD, false, requested_frame); root["keymethod"]["choices"].append(add_property_choice_json("Basic keying", 0, method)); - root["keymethod"]["choices"].append(add_property_choice_json("HSV hue", 1, method)); + root["keymethod"]["choices"].append(add_property_choice_json("HSV/HSL hue", 1, method)); root["keymethod"]["choices"].append(add_property_choice_json("HSV saturation", 2, method)); - root["keymethod"]["choices"].append(add_property_choice_json("HSV value", 3, method)); - root["keymethod"]["choices"].append(add_property_choice_json("LCH luminosity", 4, method)); - root["keymethod"]["choices"].append(add_property_choice_json("LCH chroma", 5, method)); - root["keymethod"]["choices"].append(add_property_choice_json("LCH hue", 6, method)); - root["keymethod"]["choices"].append(add_property_choice_json("CIE Distance", 7, method)); + root["keymethod"]["choices"].append(add_property_choice_json("HSL saturation", 3, method)); + root["keymethod"]["choices"].append(add_property_choice_json("HSV value", 4, method)); + root["keymethod"]["choices"].append(add_property_choice_json("HSL luminance", 5, method)); + root["keymethod"]["choices"].append(add_property_choice_json("LCH luminosity", 6, method)); + root["keymethod"]["choices"].append(add_property_choice_json("LCH chroma", 7, method)); + root["keymethod"]["choices"].append(add_property_choice_json("LCH hue", 8, method)); + root["keymethod"]["choices"].append(add_property_choice_json("CIE Distance", 9, method)); + root["keymethod"]["choices"].append(add_property_choice_json("Cb,Cr vector", 10, method)); // Set the parent effect which properties this effect will inherit root["parent_effect_id"] = add_property_json("Parent", 0.0, "string", info.parent_effect_id, NULL, -1, -1, false, requested_frame); diff --git a/src/effects/ChromaKey.h b/src/effects/ChromaKey.h index e5cbf64f..d45a9728 100644 --- a/src/effects/ChromaKey.h +++ b/src/effects/ChromaKey.h @@ -37,20 +37,11 @@ #include "../Frame.h" #include "../Exceptions.h" #include "../KeyFrame.h" +#include "../Enums.h" #include #include -#define CHROMAKEY_METHOD_BASIC 0 -#define CHROMAKEY_METHOD_HSV_H 1 -#define CHROMAKEY_METHOD_HSV_S 2 -#define CHROMAKEY_METHOD_HSV_V 3 -#define CHROMAKEY_METHOD_CIE_LCH_L 4 -#define CHROMAKEY_METHOD_CIE_LCH_C 5 -#define CHROMAKEY_METHOD_CIE_LCH_H 6 -#define CHROMAKEY_METHOD_CIE_DISTANCE 7 -#define CHROMAKEY_METHOD_LAST 7 - namespace openshot { @@ -65,9 +56,8 @@ namespace openshot private: Color color; Keyframe fuzz; - int method; - - mutable std::vector pixelbuf; + Keyframe halo; + ChromaKeyMethod method; /// Init effect settings void init_effect_details(); @@ -77,22 +67,34 @@ namespace openshot /// Blank constructor, useful when using Json to load the effect properties ChromaKey(); - /// Default constructor, which takes an openshot::Color object and a 'fuzz' factor, which - /// is used to determine how similar colored pixels are matched. The higher the fuzz, the - /// more colors are matched. - /// - /// @param color The color to match - /// @param fuzz The fuzz factor (or threshold) - ChromaKey(Color color, Keyframe fuzz); - - /// New constructor, which takes an openshot::Color object, a 'fuzz' factor, and a numeric - /// keying method, which is used together with the fuzz factor to determine how similar - /// colored pixels are matched. The higher the fuzz, the more colors are matched. + /// @brief Constructor specifying the key color, keying method and distance. + /// + /// Standard constructor, which takes an openshot::Color object, a 'fuzz' factor, + /// an optional halo threshold and an optional keying method. + /// + /// The keying method determines the algorithm to use to determine the distance + /// between the key color and the pixel color. The default keying method, + /// CHROMAKEY_BASIC, treates each of the R,G,B values as a vector and calculates + /// the length of the difference between those vectors. + /// + /// Pixels that are less than "fuzz" distance from the key color are eliminated + /// by setting their alpha values to zero. + /// + /// If halo is non-zero, pixels that are withing the halo distance of the fuzz + /// distance are given an alpha value that increases with the distance from the + /// fuzz boundary. + /// + /// Pixels that are at least as far as fuzz+halo from the key color are foreground + /// pixels and are left intact. + /// + /// The default method attempts to undo the premultiplication of alpha to find the original + /// color of a pixel. The other methods take the color as is (with alpha premultiplied). /// /// @param color The color to match /// @param fuzz The fuzz factor (or threshold) + /// @param halo The additional threshold for halo elimination. /// @param method The keying method - ChromaKey(Color color, Keyframe fuzz, int method); + ChromaKey(Color color, Keyframe fuzz, Keyframe halo = 0.0, ChromaKeyMethod method = CHROMAKEY_BASIC); /// @brief This method is required for all derived classes of ClipBase, and returns a /// new openshot::Frame object. All Clip keyframes and effects are resolved into From 69640d104b79d8840b317300d9171f462718e3c3 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 20 Sep 2021 02:28:20 -0400 Subject: [PATCH 043/114] Compare QColor values directly - An overload of operator<< supplied in the test file allows Catch2 to output values for failed comparisons. --- tests/ChromaKey.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tests/ChromaKey.cpp b/tests/ChromaKey.cpp index df7442ef..275fc527 100644 --- a/tests/ChromaKey.cpp +++ b/tests/ChromaKey.cpp @@ -32,14 +32,22 @@ #include #include -#include - #include "Frame.h" #include "effects/ChromaKey.h" #include #include +// Stream output formatter for QColor, needed so Catch2 can display +// values when CHECK(qcolor1 == qcolor2) comparisons fail +std::ostream& operator << ( std::ostream& os, QColor const& value ) { + os << "QColor(" << value.red() << ", " << value.green() << ", " + << value.blue() << ", " << value.alpha() << ")"; + return os; +} + +#include + using namespace openshot; TEST_CASE( "basic keying", "[libopenshot][effect][chromakey]" ) @@ -57,10 +65,8 @@ TEST_CASE( "basic keying", "[libopenshot][effect][chromakey]" ) // Check color fill (should be transparent) QColor pix = i->pixelColor(10, 10); - CHECK(pix.red() == 0); - CHECK(pix.green() == 0); - CHECK(pix.blue() == 0); - CHECK(pix.alpha() == 0); + QColor trans{Qt::transparent}; + CHECK(pix == trans); } TEST_CASE( "threshold", "[libopenshot][effect][chromakey]" ) @@ -77,9 +83,7 @@ TEST_CASE( "threshold", "[libopenshot][effect][chromakey]" ) // Output should be the same, no ChromaKey QColor pix_e = i->pixelColor(10, 10); - CHECK(pix_e.red() == 0); - CHECK(pix_e.green() == 204); - CHECK(pix_e.blue() == 0); - CHECK(pix_e.alpha() == 255); + QColor expected(0, 204, 0, 255); + CHECK(pix_e == expected); } From e45d798c903e690037a1897cf7262630a571a098 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 10 Jun 2021 16:32:53 -0400 Subject: [PATCH 044/114] Revert final_cache size breakage Reverting the "Adjusting Timeline final_cache to match the video caching thread max_frames, so one doesn't clobber the other." part of a previous commit. Setting the cache size in SetMaxSize() ignores OpenShot's cache preferences. It prevents using a cache larger than the preview buffer, which is often a desirable thing. This partially reverts commit 0c4e1bcce4d8cbdc1edc752fe3339acf94ac8eb1. --- src/Timeline.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Timeline.cpp b/src/Timeline.cpp index c2aea38d..8bed50cf 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -80,11 +80,12 @@ Timeline::Timeline(int width, int height, Fraction fps, int sample_rate, int cha info.acodec = "openshot::timeline"; info.vcodec = "openshot::timeline"; - // Init cache - final_cache = new CacheMemory(); - // Init max image size SetMaxSize(info.width, info.height); + + // Init cache + final_cache = new CacheMemory(); + final_cache->SetMaxBytesFromInfo(max_concurrent_frames * 4, info.width, info.height, info.sample_rate, info.channels); } // Delegating constructor that copies parameters from a provided ReaderInfo @@ -95,7 +96,7 @@ Timeline::Timeline(const ReaderInfo info) : // Constructor for the timeline (which loads a JSON structure from a file path, and initializes a timeline) Timeline::Timeline(const std::string& projectPath, bool convert_absolute_paths) : is_open(false), auto_map_clips(true), managed_cache(true), path(projectPath), - max_concurrent_frames(OPEN_MP_NUM_PROCESSORS) { + max_concurrent_frames(OPEN_MP_NUM_PROCESSORS) { // Create CrashHandler and Attach (incase of errors) CrashHandler::Instance(); @@ -212,11 +213,12 @@ Timeline::Timeline(const std::string& projectPath, bool convert_absolute_paths) info.has_video = true; info.has_audio = true; - // Init cache - final_cache = new CacheMemory(); - // Init max image size SetMaxSize(info.width, info.height); + + // Init cache + final_cache = new CacheMemory(); + final_cache->SetMaxBytesFromInfo(max_concurrent_frames * 4, info.width, info.height, info.sample_rate, info.channels); } Timeline::~Timeline() { @@ -1064,7 +1066,7 @@ void Timeline::SetJsonValue(const Json::Value root) { // on it's parent timeline. Setting the parent timeline of the clip here // allows attaching it to an object when exporting the project (because) // the exporter script initializes the clip and it's effects - // before setting it's parent timeline. + // before setting its parent timeline. c->ParentTimeline(this); // Load Json into Clip @@ -1530,7 +1532,4 @@ void Timeline::SetMaxSize(int width, int height) { // Update preview settings preview_width = display_ratio_size.width(); preview_height = display_ratio_size.height(); - - // Update timeline cache size - final_cache->SetMaxBytesFromInfo(max_concurrent_frames * 4, preview_width, preview_height, info.sample_rate, info.channels); -} \ No newline at end of file +} From 3df837944b18eb001ba015fe666b7f80e5f4161a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Sep 2021 21:11:48 -0400 Subject: [PATCH 045/114] Bump codecov/codecov-action from 2.0.3 to 2.1.0 (#733) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.3 to 2.1.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v2.0.3...v2.1.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 367fc48c..91bf3f2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: cmake --build . --target install -- VERBOSE=1 popd - - uses: codecov/codecov-action@v2.0.3 + - uses: codecov/codecov-action@v2.1.0 if: ${{ matrix.compiler == 'clang' }} with: file: build/coverage.info From d41c482cb21fe22cb310622441d6304eb87b1a1f Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Wed, 22 Sep 2021 01:37:58 -0400 Subject: [PATCH 046/114] CI: Fix Clang builds, coverage (#736) --- .github/workflows/ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91bf3f2b..ea7c3ff1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,12 @@ jobs: strategy: matrix: os: [ubuntu-18.04, ubuntu-20.04] - compiler: [gcc, clang] + compiler: + - { cc: gcc, cpp: g++ } + - { cc: clang, cpp: clang++ } env: - CC: ${{ matrix.compiler }} + CC: ${{ matrix.compiler.cc }} + CXX: ${{ matrix.compiler.cpp }} CODECOV_TOKEN: 'dc94d508-39d3-4369-b1c6-321749f96f7c' steps: @@ -27,7 +30,7 @@ jobs: - uses: haya14busa/action-cond@v1 id: coverage with: - cond: ${{ matrix.compiler == 'clang' }} + cond: ${{ matrix.compiler.cc == 'gcc' }} if_true: "-DENABLE_COVERAGE:BOOL=1" if_false: "-DENABLE_COVERAGE:BOOL=0" @@ -52,7 +55,7 @@ jobs: id: cache with: path: audio/build - key: audio-${{ matrix.os }}-${{ matrix.compiler }}-${{ hashFiles('audio/CMakeLists.txt') }} + key: audio-${{ matrix.os }}-${{ matrix.compiler.cpp }}-${{ hashFiles('audio/CMakeLists.txt') }} - name: Build OpenShotAudio (if not cached) if: steps.cache.outputs.cache-hit != 'true' @@ -90,6 +93,6 @@ jobs: popd - uses: codecov/codecov-action@v2.1.0 - if: ${{ matrix.compiler == 'clang' }} + if: ${{ matrix.compiler.cc == 'gcc' }} with: file: build/coverage.info From c128b6caf164f514c4a651811f6d0ab7f33bb72c Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Wed, 22 Sep 2021 16:09:20 -0500 Subject: [PATCH 047/114] Protecting a caption effect with no Clip (i.e. effect added directly to timeline) --- src/effects/Caption.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/effects/Caption.cpp b/src/effects/Caption.cpp index 8d9bec92..a19b8e2d 100644 --- a/src/effects/Caption.cpp +++ b/src/effects/Caption.cpp @@ -129,7 +129,7 @@ std::shared_ptr Caption::GetFrame(std::shared_ptrParentTimeline() != NULL) { + if (clip && clip->ParentTimeline() != NULL) { timeline = (Timeline*) clip->ParentTimeline(); } else if (this->ParentTimeline() != NULL) { timeline = (Timeline*) this->ParentTimeline(); From d4d200f14bf789e6a2a9b8fb0ba59b7f015b3b76 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Thu, 23 Sep 2021 03:03:08 -0400 Subject: [PATCH 048/114] CMake: Set -DDEBUG for debug builds (#739) --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 721ac085..9ed9de68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,6 +99,12 @@ if(ENABLE_TESTS) set(BUILD_TESTING ${ENABLE_TESTS}) endif() +### JUCE requires one of -DDEBUG or -DNDEBUG set on the +### compile command line. CMake automatically sets -DNDEBUG +### on all non-debug configs, so we'll just add -DDEBUG to +### the debug build flags +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") + #### Work around a GCC < 9 bug with handling of _Pragma() in macros #### See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55578 if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND From 88d3011455ae0779f39ab676223dc85bf2b5e3a5 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Mon, 27 Sep 2021 07:14:48 -0400 Subject: [PATCH 049/114] Unit tests: Use == to compare strings (#741) When there's a mismatch, Catch2 will output the contents of both strings rather than a meaningless .compare() numeric value. --- tests/FFmpegReader.cpp | 3 +-- tests/FFmpegWriter.cpp | 3 +-- tests/FrameMapper.cpp | 3 +-- tests/KeyFrame.cpp | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/FFmpegReader.cpp b/tests/FFmpegReader.cpp index 747ae0e2..c5696b76 100644 --- a/tests/FFmpegReader.cpp +++ b/tests/FFmpegReader.cpp @@ -300,6 +300,5 @@ TEST_CASE( "DisplayInfo", "[libopenshot][ffmpegreader]" ) r.DisplayInfo(&output); // Compare a [0, expected.size()) substring of output to expected - auto compare_value = output.str().compare(0, expected.size(), expected); - CHECK(compare_value == 0); + CHECK(output.str().substr(0, expected.size()) == expected); } diff --git a/tests/FFmpegWriter.cpp b/tests/FFmpegWriter.cpp index adb555b2..6a9a0211 100644 --- a/tests/FFmpegWriter.cpp +++ b/tests/FFmpegWriter.cpp @@ -199,6 +199,5 @@ TEST_CASE( "DisplayInfo", "[libopenshot][ffmpegwriter]" ) w.Close(); // Compare a [0, expected.size()) substring of output to expected - auto compare_value = output.str().compare(0, expected.size(), expected); - CHECK(compare_value == 0); + CHECK(output.str().substr(0, expected.size()) == expected); } diff --git a/tests/FrameMapper.cpp b/tests/FrameMapper.cpp index fc1f70d4..7553345b 100644 --- a/tests/FrameMapper.cpp +++ b/tests/FrameMapper.cpp @@ -651,8 +651,7 @@ Target frame #: 10 mapped to original frame #: (8 odd, 8 even) mapping.PrintMapping(&mapping_out); // Compare a [0, expected.size()) substring of output to expected - auto compare_value = mapping_out.str().compare(0, expected.size(), expected); - CHECK(compare_value == 0); + CHECK(mapping_out.str().substr(0, expected.size()) == expected); } TEST_CASE( "Json", "[libopenshot][framemapper]" ) diff --git a/tests/KeyFrame.cpp b/tests/KeyFrame.cpp index 3f186729..7b5ec149 100644 --- a/tests/KeyFrame.cpp +++ b/tests/KeyFrame.cpp @@ -536,7 +536,7 @@ R"( 1 10.0000 999 12345.6777)"; // Ensure the two strings are equal up to the limits of 'expected' - CHECK(output.str().compare(0, expected.size(), expected) == 0); + CHECK(output.str().substr(0, expected.size()) == expected); } TEST_CASE( "PrintValues", "[libopenshot][keyframe]" ) @@ -582,7 +582,7 @@ R"(│Frame# (X) │ Y Value │ Delta Y │ Increasing? │ Repeat Fraction │ 25 │ 16.5446 │ +1 │ true │ Fraction(1, 2) │)"; // Ensure the two strings are equal up to the limits of 'expected' - CHECK(output.str().compare(0, expected.size(), expected) == 0); + CHECK(output.str().substr(0, expected.size()) == expected); } #ifdef USE_OPENCV From e2e3a54c0278e552df1451c0f10dd8956705d7e2 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Mon, 27 Sep 2021 11:08:12 -0400 Subject: [PATCH 050/114] Don't use right-aligned std::boolalpha (#742) Turns out, macOS's libc++ doesn't apply fill padding / alignment the same way other libs do. (Known issue due to ambiguity in the standard.) https://timsong-cpp.github.io/lwg-issues/2703 --- src/KeyFrame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index e25f4d7c..d5229a64 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -576,8 +576,7 @@ void Keyframe::PrintValues(std::ostream* out) const { // Column widths std::vector w{10, 12, 8, 11, 19}; - *out << std::right << std::setfill(' ') << std::boolalpha - << std::setprecision(4); + *out << std::right << std::setfill(' ') << std::setprecision(4); // Headings *out << "│" << std::setw(w[0]) << "Frame# (X)" << " │" @@ -600,7 +599,8 @@ void Keyframe::PrintValues(std::ostream* out) const { << std::setw(w[1]) << std::fixed << GetValue(i) << " │" << std::setw(w[2]) << std::defaultfloat << std::showpos << GetDelta(i) << " │ " << std::noshowpos - << std::setw(w[3]) << IsIncreasing(i) << " │ " + << std::setw(w[3]) + << (IsIncreasing(i) ? "true" : "false") << " │ " << std::setw(w[4]) << std::left << GetRepeatFraction(i) << std::right << "│\n"; } From 3d18347e71f36b3daf58c88756ddbf41b385706f Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Mon, 27 Sep 2021 20:36:56 -0400 Subject: [PATCH 051/114] Protect values against integer overflow (#743) When the code multiplies integer values in an rvalue context before it's stored in a larger type, the on-the-fly math is stored as int. The value can overflow before it reaches the wider memory space. To prevent this, we explicitly cast the result of the arithmetic to the destination type. Issues flagged by GitHub CodeQL. --- src/DummyReader.cpp | 2 +- src/FFmpegReader.cpp | 8 +++++++- src/FFmpegWriter.cpp | 34 +++++++++++++++++++++++----------- src/Frame.cpp | 6 ++++-- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/src/DummyReader.cpp b/src/DummyReader.cpp index e6c5fce1..d8d7d694 100644 --- a/src/DummyReader.cpp +++ b/src/DummyReader.cpp @@ -38,7 +38,7 @@ void DummyReader::init(Fraction fps, int width, int height, int sample_rate, int // Set key info settings info.has_audio = false; info.has_video = true; - info.file_size = width * height * sizeof(int); + info.file_size = static_cast(width * height * sizeof(int)); info.vcodec = "raw"; info.fps = fps; info.width = width; diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index c1eaa748..c5c72a63 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -1535,7 +1535,13 @@ void FFmpegReader::ProcessAudioPacket(int64_t requested_frame, int64_t target_fr audio_frame->nb_samples); // number of input samples to convert // Copy audio samples over original samples - memcpy(audio_buf, audio_converted->data[0], audio_converted->nb_samples * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) * info.channels); + memcpy(audio_buf, + audio_converted->data[0], + static_cast( + audio_converted->nb_samples + * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) + * info.channels) + ); // Deallocate resample buffer SWR_CLOSE(avr); diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp index 8707756c..33c6da82 100644 --- a/src/FFmpegWriter.cpp +++ b/src/FFmpegWriter.cpp @@ -1672,7 +1672,10 @@ void FFmpegWriter::write_audio_packets(bool is_final) { ); // Copy audio samples over original samples - memcpy(all_resampled_samples, audio_converted->data[0], nb_samples * info.channels * av_get_bytes_per_sample(output_sample_fmt)); + memcpy(all_resampled_samples, audio_converted->data[0], + static_cast( + nb_samples * info.channels + * av_get_bytes_per_sample(output_sample_fmt))); // Remove converted audio av_freep(&(audio_frame->data[0])); @@ -1706,7 +1709,8 @@ void FFmpegWriter::write_audio_packets(bool is_final) { av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) ) ), all_resampled_samples + samples_position, - diff * av_get_bytes_per_sample(output_sample_fmt) + static_cast( + diff * av_get_bytes_per_sample(output_sample_fmt)) ); // Increment counters @@ -1760,7 +1764,10 @@ void FFmpegWriter::write_audio_packets(bool is_final) { ); // Copy audio into buffer for frame - memcpy(final_samples_planar, samples, audio_frame->nb_samples * info.channels * av_get_bytes_per_sample(output_sample_fmt)); + memcpy(final_samples_planar, samples, + static_cast( + audio_frame->nb_samples * info.channels + * av_get_bytes_per_sample(output_sample_fmt))); // Fill input frame with sample data avcodec_fill_audio_frame(audio_frame, info.channels, output_sample_fmt, @@ -1786,10 +1793,13 @@ void FFmpegWriter::write_audio_packets(bool is_final) { ); // Copy audio samples over original samples - if (nb_samples > 0) { - memcpy(samples, frame_final->data[0], - nb_samples * av_get_bytes_per_sample(audio_codec_ctx->sample_fmt) * info.channels); - } + const auto copy_length = static_cast( + nb_samples + * av_get_bytes_per_sample(audio_codec_ctx->sample_fmt) + * info.channels); + + if (nb_samples > 0) + memcpy(samples, frame_final->data[0], copy_length); // deallocate AVFrame av_freep(&(audio_frame->data[0])); @@ -1800,11 +1810,13 @@ void FFmpegWriter::write_audio_packets(bool is_final) { } else { // Create a new array - final_samples = (int16_t *) av_malloc( - sizeof(int16_t) * audio_input_position + const auto buf_size = static_cast( + audio_input_position * (av_get_bytes_per_sample(audio_codec_ctx->sample_fmt) / - av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) ) - ); + av_get_bytes_per_sample(AV_SAMPLE_FMT_S16)) + ); + final_samples = reinterpret_cast( + av_malloc(sizeof(int16_t) * buf_size)); // Copy audio into buffer for frame memcpy(final_samples, samples, diff --git a/src/Frame.cpp b/src/Frame.cpp index aed38777..28c04eef 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -438,8 +438,10 @@ juce::AudioSampleBuffer *Frame::GetAudioSampleBuffer() int64_t Frame::GetBytes() { int64_t total_bytes = 0; - if (image) - total_bytes += (width * height * sizeof(char) * 4); + if (image) { + total_bytes += static_cast( + width * height * sizeof(char) * 4); + } if (audio) { // approximate audio size (sample rate / 24 fps) total_bytes += (sample_rate / 24.0) * sizeof(float); From ac956f05f171e1484fac88b238f5ad9d6810f863 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Wed, 29 Sep 2021 01:36:51 -0400 Subject: [PATCH 052/114] CI: Add Windows and macOS builds, unit testing (#734) - Switch to Windows lld for linking (faster) - Exclude generated protobuf sources from coverage - When setting EXE, SHARED linker flags, also set MODULE - Windows clang++ builds are disabled (libopenshot-audio breaks) - Coverage collection is disabled on macOS and Windows (path issues) --- .github/workflows/ci.yml | 230 ++++++++++++++++++++++++++------------- CMakeLists.txt | 1 + 2 files changed, 154 insertions(+), 77 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea7c3ff1..a7c8bab8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,98 +1,174 @@ name: libopenshot CI Build on: [push, pull_request] + jobs: build: - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.sys.os }} strategy: matrix: - os: [ubuntu-18.04, ubuntu-20.04] + sys: + - { os: ubuntu-18.04, shell: bash } + - { os: ubuntu-latest, shell: bash } + - { os: macos-latest, shell: bash } + - { os: windows-latest, shell: 'msys2 {0}' } compiler: - - { cc: gcc, cpp: g++ } - - { cc: clang, cpp: clang++ } + - { cc: gcc, cxx: g++ } + - { cc: clang, cxx: clang++ } + exclude: + # Windows clang isn't being our friend, + # JUCE seems to think it can use _get_tzname there + # (it can't) + - sys: { os: windows-latest, shell: 'msys2 {0}' } + compiler: { cc: clang, cxx: clang++ } + defaults: + run: + shell: "${{ matrix.sys.shell }}" env: CC: ${{ matrix.compiler.cc }} - CXX: ${{ matrix.compiler.cpp }} + CXX: ${{ matrix.compiler.cxx }} CODECOV_TOKEN: 'dc94d508-39d3-4369-b1c6-321749f96f7c' steps: - - uses: actions/checkout@v2 - with: - # Work around a codecov issue detecting commit SHAs - # see: https://community.codecov.io/t/issue-detecting-commit-sha-please-run-actions-checkout-with-fetch-depth-1-or-set-to-0/2571 - fetch-depth: 0 + - uses: actions/checkout@v2 + with: + # Work around a codecov issue detecting commit SHAs + # see: https://community.codecov.io/t/issue-detecting-commit-sha-please-run-actions-checkout-with-fetch-depth-1-or-set-to-0/2571 + fetch-depth: 0 - - name: Checkout OpenShotAudio - uses: actions/checkout@v2 - with: - repository: OpenShot/libopenshot-audio - path: audio + - name: Checkout OpenShotAudio + uses: actions/checkout@v2 + with: + repository: OpenShot/libopenshot-audio + path: audio - - uses: haya14busa/action-cond@v1 - id: coverage - with: - cond: ${{ matrix.compiler.cc == 'gcc' }} - if_true: "-DENABLE_COVERAGE:BOOL=1" - if_false: "-DENABLE_COVERAGE:BOOL=0" + - uses: haya14busa/action-cond@v1 + id: generator + with: + cond: ${{ runner.os == 'Windows' }} + if_true: "MinGW Makefiles" + if_false: "Unix Makefiles" - - name: Install dependencies - shell: bash - run: | - sudo apt update - sudo apt remove libzmq5 # See actions/virtual-environments#3317 - sudo apt install \ - cmake swig doxygen graphviz curl lcov \ - libasound2-dev \ - qtbase5-dev qtbase5-dev-tools libqt5svg5-dev \ - libfdk-aac-dev libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libpostproc-dev libswresample-dev \ - libzmq3-dev libmagick++-dev \ - libopencv-dev libprotobuf-dev protobuf-compiler - # Install catch2 package from Ubuntu 20.10, since for some reason - # even 20.04 only has Catch 1.12.1 available. - wget https://launchpad.net/ubuntu/+archive/primary/+files/catch2_2.13.0-1_all.deb - sudo dpkg -i catch2_2.13.0-1_all.deb + - uses: haya14busa/action-cond@v1 + id: coverage + with: + cond: ${{ matrix.compiler.cc == 'gcc' && runner.os == 'linux' }} + if_true: "-DENABLE_COVERAGE:BOOL=1" - - uses: actions/cache@v2 - id: cache - with: - path: audio/build - key: audio-${{ matrix.os }}-${{ matrix.compiler.cpp }}-${{ hashFiles('audio/CMakeLists.txt') }} + - name: Install Linux dependencies + if: ${{ runner.os == 'linux' }} + run: | + sudo apt update + sudo apt remove libzmq5 # See actions/virtual-environments#3317 + sudo apt install \ + cmake swig doxygen graphviz curl lcov \ + libasound2-dev \ + qtbase5-dev qtbase5-dev-tools libqt5svg5-dev \ + libfdk-aac-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev \ + libzmq3-dev libmagick++-dev libbabl-dev \ + libopencv-dev libprotobuf-dev protobuf-compiler + # Install catch2 package from Ubuntu 20.10, since for some reason + # even 20.04 only has Catch 1.12.1 available. + wget https://launchpad.net/ubuntu/+archive/primary/+files/catch2_2.13.0-1_all.deb + sudo dpkg -i catch2_2.13.0-1_all.deb - - name: Build OpenShotAudio (if not cached) - if: steps.cache.outputs.cache-hit != 'true' - shell: bash - run: | - pushd audio - if [ ! -d build ]; then + - name: Install macOS dependencies + if: ${{ runner.os == 'macos' }} + run: | + brew install \ + qt5 ffmpeg zeromq cppzmq libomp opencv protobuf babl \ + python3 swig catch2 doxygen graphviz + + - name: Set up MSYS and install Windows dependencies + if: ${{ runner.os == 'Windows' }} + uses: msys2/setup-msys2@v2 + with: + release: false + update: true + install: >- + mingw-w64-x86_64-gcc + mingw-w64-x86_64-clang + mingw-w64-x86_64-lld + mingw-w64-x86_64-make + mingw-w64-x86_64-cmake + mingw-w64-x86_64-pkgconf + mingw-w64-x86_64-qt5 + mingw-w64-x86_64-libvpx + mingw-w64-x86_64-ffmpeg + mingw-w64-x86_64-zeromq + mingw-w64-x86_64-opencv + mingw-w64-x86_64-protobuf + mingw-w64-x86_64-babl + mingw-w64-x86_64-catch + mingw-w64-x86_64-python3 + mingw-w64-x86_64-swig + + - uses: actions/cache@v2 + id: cache + with: + path: audio/build + key: audio-${{ runner.os }}-${{ matrix.compiler.cxx }}-${{ hashFiles('audio/CMakeLists.txt') }} + + - name: Build OpenShotAudio (if not cached) + if: steps.cache.outputs.cache-hit != 'true' + run: | + pushd audio + if [ ! -d build ]; then + mkdir build + if [ "_${{ runner.os }}" == "_macOS" ]; then + export CMAKE_EXTRA="${CMAKE_EXTRA} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9" + fi + if [ "_${{ runner.os }}_${{ matrix.compiler.cc }}" == "_macOS_clang" ]; then + export CMAKE_EXTRA="${CMAKE_EXTRA} \ + -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ \ + -DCMAKE_MODULE_LINKER_FLAGS=-stdlib=libc++ \ + -DCMAKE_SHARED_LINKER_FLAGS=-stdlib=libc++"; + fi + cmake -B build -S . -G "${{ steps.generator.outputs.value }}" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \ + ${CMAKE_EXTRA} + fi + cmake --build build + popd + + - name: Build libopenshot + run: | + if [ "_${{ runner.os }}" == "_macOS" ]; then + export CMAKE_EXTRA="${CMAKE_EXTRA} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \ + -DQt5_DIR=/usr/local/opt/qt@5/lib/cmake/Qt5 \ + -DENABLE_RUBY=0"; + export PATH="/usr/local/opt/qt@5/bin:$PATH"; + fi + if [ "_${{ runner.os }}_${{ matrix.compiler.cc }}" == "_macOS_clang" ]; then + export CMAKE_EXTRA="${CMAKE_EXTRA} \ + -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ \ + -DCMAKE_MODULE_LINKER_FLAGS=-stdlib=libc++ \ + -DCMAKE_SHARED_LINKER_FLAGS=-stdlib=libc++"; + fi + if [ "_${{ runner.os }}" == "_Windows" ]; then + export CMAKE_EXTRA="${CMAKE_EXTRA} \ + -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \ + -DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld \ + -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld" + fi mkdir build - cmake -B build -S . - fi - cmake --build build - popd + cmake -B build -S . -G "${{ steps.generator.outputs.value }}" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \ + -DOpenShotAudio_ROOT="./audio/build" \ + ${CMAKE_EXTRA} \ + "${{ steps.coverage.outputs.value }}" + cmake --build build -- VERBOSE=1 - - name: Build libopenshot - shell: bash - run: | - mkdir build - pushd build - cmake -B . -S .. -DCMAKE_INSTALL_PREFIX:PATH="dist" -DCMAKE_BUILD_TYPE="Debug" -DOpenShotAudio_ROOT="../audio/build" "${{ steps.coverage.outputs.value }}" - cmake --build . -- VERBOSE=1 - popd + - name: Test libopenshot + run: | + cmake --build build --target coverage -- VERBOSE=1 - - name: Test libopenshot - shell: bash - run: | - pushd build - cmake --build . --target coverage -- VERBOSE=1 - popd + - name: Install libopenshot + run: | + cmake --build build --target install -- VERBOSE=1 - - name: Install libopenshot - shell: bash - run: | - pushd build - cmake --build . --target install -- VERBOSE=1 - popd - - - uses: codecov/codecov-action@v2.1.0 - if: ${{ matrix.compiler.cc == 'gcc' }} - with: - file: build/coverage.info + - uses: codecov/codecov-action@v2.1.0 + if: ${{ steps.coverage.outputs.value }} + with: + file: build/coverage.info diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ed9de68..5850b19e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,6 +218,7 @@ if (ENABLE_COVERAGE AND DEFINED UNIT_TEST_TARGETS) "examples/*" "${CMAKE_CURRENT_BINARY_DIR}/bindings/*" "${CMAKE_CURRENT_BINARY_DIR}/src/*_autogen/*" + "${CMAKE_CURRENT_BINARY_DIR}/src/protobuf_messages/*" "audio/*" ) setup_target_for_coverage_lcov( From ae66933c0c4a8e7c6899fa284b3d1da9ed55762d Mon Sep 17 00:00:00 2001 From: Jeff Shillitto Date: Sun, 3 Oct 2021 20:18:45 +1100 Subject: [PATCH 053/114] Determine file type based on content, not extension --- src/QtImageReader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/QtImageReader.cpp b/src/QtImageReader.cpp index 1800a0f2..8abee446 100644 --- a/src/QtImageReader.cpp +++ b/src/QtImageReader.cpp @@ -85,6 +85,7 @@ void QtImageReader::Open() image = std::make_shared(); QImageReader imgReader( path ); imgReader.setAutoTransform( true ); + imgReader.setDecideFormatFromContent( true ); loaded = imgReader.read(image.get()); } From d78ac099d6a69c06f3bb27488e9287250ad56a07 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Sun, 3 Oct 2021 07:01:56 -0400 Subject: [PATCH 054/114] CodeQL fixes, take 2 (#745) * Protect values against integer overflow When the code multiplies integer values in an rvalue context before it's stored in a larger type, the on-the-fly math is stored as int. The value can overflow before it reaches the wider memory space. To prevent this, we explicitly cast the result of the arithmetic to the destination type. Issues flagged by GitHub CodeQL. * Apply these fixes correctly --- src/DummyReader.cpp | 2 +- src/FFmpegReader.cpp | 5 ++--- src/FFmpegWriter.cpp | 26 ++++++++++++-------------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/DummyReader.cpp b/src/DummyReader.cpp index d8d7d694..6913e3fe 100644 --- a/src/DummyReader.cpp +++ b/src/DummyReader.cpp @@ -38,7 +38,7 @@ void DummyReader::init(Fraction fps, int width, int height, int sample_rate, int // Set key info settings info.has_audio = false; info.has_video = true; - info.file_size = static_cast(width * height * sizeof(int)); + info.file_size = static_cast(width) * height * sizeof(int); info.vcodec = "raw"; info.fps = fps; info.width = width; diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index c5c72a63..714c8dbd 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -1537,10 +1537,9 @@ void FFmpegReader::ProcessAudioPacket(int64_t requested_frame, int64_t target_fr // Copy audio samples over original samples memcpy(audio_buf, audio_converted->data[0], - static_cast( - audio_converted->nb_samples + static_cast(audio_converted->nb_samples) * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) - * info.channels) + * info.channels ); // Deallocate resample buffer diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp index 33c6da82..433a2f33 100644 --- a/src/FFmpegWriter.cpp +++ b/src/FFmpegWriter.cpp @@ -1673,9 +1673,9 @@ void FFmpegWriter::write_audio_packets(bool is_final) { // Copy audio samples over original samples memcpy(all_resampled_samples, audio_converted->data[0], - static_cast( - nb_samples * info.channels - * av_get_bytes_per_sample(output_sample_fmt))); + static_cast(nb_samples) + * info.channels + * av_get_bytes_per_sample(output_sample_fmt)); // Remove converted audio av_freep(&(audio_frame->data[0])); @@ -1709,8 +1709,8 @@ void FFmpegWriter::write_audio_packets(bool is_final) { av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) ) ), all_resampled_samples + samples_position, - static_cast( - diff * av_get_bytes_per_sample(output_sample_fmt)) + static_cast(diff) + * av_get_bytes_per_sample(output_sample_fmt) ); // Increment counters @@ -1765,9 +1765,9 @@ void FFmpegWriter::write_audio_packets(bool is_final) { // Copy audio into buffer for frame memcpy(final_samples_planar, samples, - static_cast( - audio_frame->nb_samples * info.channels - * av_get_bytes_per_sample(output_sample_fmt))); + static_cast(audio_frame->nb_samples) + * info.channels + * av_get_bytes_per_sample(output_sample_fmt)); // Fill input frame with sample data avcodec_fill_audio_frame(audio_frame, info.channels, output_sample_fmt, @@ -1793,10 +1793,9 @@ void FFmpegWriter::write_audio_packets(bool is_final) { ); // Copy audio samples over original samples - const auto copy_length = static_cast( - nb_samples + const auto copy_length = static_cast(nb_samples) * av_get_bytes_per_sample(audio_codec_ctx->sample_fmt) - * info.channels); + * info.channels; if (nb_samples > 0) memcpy(samples, frame_final->data[0], copy_length); @@ -1810,10 +1809,9 @@ void FFmpegWriter::write_audio_packets(bool is_final) { } else { // Create a new array - const auto buf_size = static_cast( - audio_input_position + const auto buf_size = static_cast(audio_input_position) * (av_get_bytes_per_sample(audio_codec_ctx->sample_fmt) / - av_get_bytes_per_sample(AV_SAMPLE_FMT_S16)) + av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) ); final_samples = reinterpret_cast( av_malloc(sizeof(int16_t) * buf_size)); From 2e8c74e8aa3b7ed16a2c65cac2c54f4bf01cf1c1 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 7 Oct 2021 13:34:00 -0500 Subject: [PATCH 055/114] Prevent crash when smallest frame detected in memory object is NULL --- src/CacheDisk.cpp | 11 ++++++----- src/CacheMemory.cpp | 11 ++++++----- src/Qt/VideoCacheThread.cpp | 13 ++++++------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/CacheDisk.cpp b/src/CacheDisk.cpp index 6d1241ed..43882c82 100644 --- a/src/CacheDisk.cpp +++ b/src/CacheDisk.cpp @@ -294,7 +294,6 @@ std::shared_ptr CacheDisk::GetSmallestFrame() { // Create a scoped lock, to protect the cache from multiple threads const GenericScopedLock lock(*cacheCriticalSection); - std::shared_ptr f; // Loop through frame numbers std::deque::iterator itr; @@ -305,10 +304,12 @@ std::shared_ptr CacheDisk::GetSmallestFrame() smallest_frame = *itr; } - // Return frame - f = GetFrame(smallest_frame); - - return f; + // Return frame (if any) + if (smallest_frame != -1) { + return GetFrame(smallest_frame); + } else { + return NULL; + } } // Gets the maximum bytes value diff --git a/src/CacheMemory.cpp b/src/CacheMemory.cpp index 62dc9957..6d51e533 100644 --- a/src/CacheMemory.cpp +++ b/src/CacheMemory.cpp @@ -168,7 +168,6 @@ std::shared_ptr CacheMemory::GetSmallestFrame() { // Create a scoped lock, to protect the cache from multiple threads const GenericScopedLock lock(*cacheCriticalSection); - std::shared_ptr f; // Loop through frame numbers std::deque::iterator itr; @@ -179,10 +178,12 @@ std::shared_ptr CacheMemory::GetSmallestFrame() smallest_frame = *itr; } - // Return frame - f = GetFrame(smallest_frame); - - return f; + // Return frame (if any) + if (smallest_frame != -1) { + return GetFrame(smallest_frame); + } else { + return NULL; + } } // Gets the maximum bytes value diff --git a/src/Qt/VideoCacheThread.cpp b/src/Qt/VideoCacheThread.cpp index 371d3ac0..6c4f1ac0 100644 --- a/src/Qt/VideoCacheThread.cpp +++ b/src/Qt/VideoCacheThread.cpp @@ -86,6 +86,7 @@ namespace openshot void VideoCacheThread::run() { // Types for storing time durations in whole and fractional milliseconds + std::shared_ptr smallest_frame = NULL; using ms = std::chrono::milliseconds; using double_ms = std::chrono::duration; @@ -107,13 +108,11 @@ namespace openshot ZmqLogger::Instance()->AppendDebugMethod("VideoCacheThread::run (cache frame)", "position", position, "current_display_frame", current_display_frame, "max_concurrent_frames", max_concurrent_frames, "needed_frames", (position - current_display_frame)); // Force the frame to be generated - if (reader->GetCache()->GetSmallestFrame()) { - int64_t smallest_cached_frame = reader->GetCache()->GetSmallestFrame()->number; - if (smallest_cached_frame > current_display_frame) { - // Cache position has gotten too far away from current display frame. - // Reset the position to the current display frame. - position = current_display_frame; - } + smallest_frame = reader->GetCache()->GetSmallestFrame(); + if (smallest_frame && smallest_frame->number > current_display_frame) { + // Cache position has gotten too far away from current display frame. + // Reset the position to the current display frame. + position = current_display_frame; } reader->GetFrame(position); } From 7fa3782bdb6860b49a6a66cc328cfaa3f60a4499 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 7 Oct 2021 13:40:31 -0500 Subject: [PATCH 056/114] Better detection of duration, especially for audio-only files. Improved PTS offset detection (for when start_time is used), mainly things recorded from streams. Better bitrate detection as well. --- src/FFmpegReader.cpp | 84 ++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 27 deletions(-) diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index c5c72a63..2c6092db 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -645,14 +645,29 @@ void FFmpegReader::UpdateAudioInfo() { info.channel_layout = (ChannelLayout) AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->channel_layout; info.sample_rate = AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->sample_rate; info.audio_bit_rate = AV_GET_CODEC_ATTRIBUTES(aStream, aCodecCtx)->bit_rate; + if (info.audio_bit_rate <= 0) { + // Get bitrate from format + info.audio_bit_rate = pFormatCtx->bit_rate; + } // Set audio timebase info.audio_timebase.num = aStream->time_base.num; info.audio_timebase.den = aStream->time_base.den; // Get timebase of audio stream (if valid) and greater than the current duration - if (aStream->duration > 0.0f && aStream->duration > info.duration) - info.duration = aStream->duration * info.audio_timebase.ToDouble(); + if (aStream->duration > 0 && aStream->duration > info.duration) { + // Get duration from audio stream + info.duration = aStream->duration * info.audio_timebase.ToDouble(); + } else if (pFormatCtx->duration > 0 && info.duration <= 0.0f) { + // Use the format's duration + info.duration = float(pFormatCtx->duration) / AV_TIME_BASE; + } + + // Calculate duration from filesize and bitrate (if any) + if (info.duration <= 0.0f && info.video_bit_rate > 0 && info.file_size > 0) { + // Estimate from bitrate, total bytes, and framerate + info.duration = float(info.file_size) / info.video_bit_rate; + } // Check for an invalid video length if (info.has_video && info.video_length <= 0) { @@ -767,14 +782,16 @@ void FFmpegReader::UpdateVideoInfo() { info.duration = pStream->duration * info.video_timebase.ToDouble(); // Check for valid duration (if found) - if (info.duration <= 0.0f && pFormatCtx->duration >= 0) - // Use the format's duration - info.duration = float(pFormatCtx->duration) / AV_TIME_BASE; + if (info.duration <= 0.0f && pFormatCtx->duration >= 0) { + // Use the format's duration + info.duration = float(pFormatCtx->duration) / AV_TIME_BASE; + } // Calculate duration from filesize and bitrate (if any) - if (info.duration <= 0.0f && info.video_bit_rate > 0 && info.file_size > 0) - // Estimate from bitrate, total bytes, and framerate - info.duration = float(info.file_size) / info.video_bit_rate; + if (info.duration <= 0.0f && info.video_bit_rate > 0 && info.file_size > 0) { + // Estimate from bitrate, total bytes, and framerate + info.duration = float(info.file_size) / info.video_bit_rate; + } // No duration found in stream of file if (info.duration <= 0.0f) { @@ -1268,7 +1285,7 @@ void FFmpegReader::ProcessVideoPacket(int64_t requested_frame) { max_width = std::max(float(max_width), max_width * max_scale_x); max_height = std::max(float(max_height), max_height * max_scale_y); - } else if (parent->scale == SCALE_CROP) { + } else if (parent->scale == SCALE_CROP) { // Cropping scale mode (based on max timeline size * cropped size * scaling keyframes) float max_scale_x = parent->scale_x.GetMaxPoint().co.Y; float max_scale_y = parent->scale_y.GetMaxPoint().co.Y; @@ -1843,20 +1860,25 @@ void FFmpegReader::UpdatePTSOffset(bool is_video) { // VIDEO PACKET if (video_pts_offset == 99999) // Has the offset been set yet? { - // Find the difference between PTS and frame number - video_pts_offset = 0 - GetVideoPTS(); + if (pStream->start_time != AV_NOPTS_VALUE && pStream->start_time > 0) { + // Adjust all PTS by start_time (if available) + video_pts_offset = 0 - pStream->start_time; + } else { + // Find the difference between PTS and frame number + video_pts_offset = 0 - GetVideoPTS(); - // Find the difference between PTS and frame number - // Also, determine if PTS is invalid (too far away from zero) - // We compare the PTS to the timebase value equal to 1 second (which means the PTS - // must be within the -1 second to +1 second of zero, otherwise we ignore it) - // TODO: Please see https://github.com/OpenShot/libopenshot/pull/565#issuecomment-690985272 - // for ideas to improve this logic. - int64_t max_offset = info.video_timebase.Reciprocal().ToFloat(); - if (video_pts_offset < -max_offset || video_pts_offset > max_offset) { - // Ignore PTS, it seems invalid - video_pts_offset = 0; - } + // Find the difference between PTS and frame number + // Also, determine if PTS is invalid (too far away from zero) + // We compare the PTS to the timebase value equal to 1 second (which means the PTS + // must be within the -1 second to +1 second of zero, otherwise we ignore it) + // TODO: Please see https://github.com/OpenShot/libopenshot/pull/565#issuecomment-690985272 + // for ideas to improve this logic. + int64_t max_offset = info.video_timebase.Reciprocal().ToFloat(); + if (video_pts_offset < -max_offset || video_pts_offset > max_offset) { + // Ignore PTS, it seems invalid + video_pts_offset = 0; + } + } // debug output ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::UpdatePTSOffset (Video)", "video_pts_offset", video_pts_offset, "is_video", is_video); @@ -1871,11 +1893,19 @@ void FFmpegReader::UpdatePTSOffset(bool is_video) { // must be within the -1 second to +1 second of zero, otherwise we ignore it) // TODO: Please see https://github.com/OpenShot/libopenshot/pull/565#issuecomment-690985272 // for ideas to improve this logic. - audio_pts_offset = 0 - packet->pts; - int64_t max_offset = info.audio_timebase.Reciprocal().ToFloat(); - if (audio_pts_offset < -max_offset || audio_pts_offset > max_offset) { - // Ignore PTS, it seems invalid - audio_pts_offset = 0; + if (aStream->start_time != AV_NOPTS_VALUE && aStream->start_time > 0) { + // Adjust all PTS by start_time (if available) + audio_pts_offset = 0 - aStream->start_time; + } else { + // Determine if PTS is sane + audio_pts_offset = 0 - packet->pts; + int64_t max_offset = info.audio_timebase.Reciprocal().ToFloat(); + if (audio_pts_offset < -max_offset || audio_pts_offset > max_offset) { + // Ignore PTS, it seems invalid + // Assuming the start_time is not set or not valid, then the PTS should be near the + // beginning of the stream + audio_pts_offset = 0; + } } // debug output From 15e52852065c05ee5c7c143bb94a712097a2f2c9 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 7 Oct 2021 13:45:16 -0500 Subject: [PATCH 057/114] Support for anamorphic profiles, i.e. non-square pixels. Fixes include Frame::Display, Frame::Save, and Timeline::SetMaxSize, all which had various issues. Added sample_aspect_ratio to FFmpegWriter, so the exported videos will continue to be anamorphic. Also fixed some waveform issues, which were not appearing, or appearing squished, and sometimes containing gaps. --- src/Clip.cpp | 21 ++++++------- src/FFmpegWriter.cpp | 6 +++- src/Frame.cpp | 75 ++++++++++++++++++++++---------------------- src/Timeline.cpp | 4 +-- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/src/Clip.cpp b/src/Clip.cpp index 35d0fba1..48d70956 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -1239,10 +1239,10 @@ bool Clip::isEqual(double a, double b) // Apply keyframes to the source frame (if any) void Clip::apply_keyframes(std::shared_ptr frame, std::shared_ptr background_canvas) { // Skip out if video was disabled or only an audio frame (no visualisation in use) - if (has_video.GetInt(frame->number) == 0 || - (!Waveform() && !Reader()->info.has_video)) + if (!Waveform() && !Reader()->info.has_video) { // Skip the rest of the image processing for performance reasons return; + } // Get image from clip std::shared_ptr source_image = frame->GetImage(); @@ -1251,7 +1251,7 @@ void Clip::apply_keyframes(std::shared_ptr frame, std::shared_ptr if (Waveform()) { // Debug output - ZmqLogger::Instance()->AppendDebugMethod("Clip::get_transform (Generate Waveform Image)", "frame->number", frame->number, "Waveform()", Waveform()); + ZmqLogger::Instance()->AppendDebugMethod("Clip::get_transform (Generate Waveform Image)", "frame->number", frame->number, "Waveform()", Waveform(), "background_canvas->width()", background_canvas->width(), "background_canvas->height()", background_canvas->height()); // Get the color of the waveform int red = wave_color.red.GetInt(frame->number); @@ -1261,17 +1261,14 @@ void Clip::apply_keyframes(std::shared_ptr frame, std::shared_ptr // Generate Waveform Dynamically (the size of the timeline) source_image = frame->GetWaveform(background_canvas->width(), background_canvas->height(), red, green, blue, alpha); + frame->AddImage(source_image); } - // Size of final image - int width = background_canvas->width(); - int height = background_canvas->height(); - // Get transform from clip's keyframes - QTransform transform = get_transform(frame, width, height); + QTransform transform = get_transform(frame, background_canvas->width(), background_canvas->height()); // Debug output - ZmqLogger::Instance()->AppendDebugMethod("Clip::ApplyKeyframes (Transform: Composite Image Layer: Prepare)", "frame->number", frame->number); + ZmqLogger::Instance()->AppendDebugMethod("Clip::ApplyKeyframes (Transform: Composite Image Layer: Prepare)", "frame->number", frame->number, "background_canvas->width()", background_canvas->width(), "background_canvas->height()", background_canvas->height()); // Load timeline's new frame image into a QPainter QPainter painter(background_canvas.get()); @@ -1325,7 +1322,7 @@ QTransform Clip::get_transform(std::shared_ptr frame, int width, int heig // Get image from clip std::shared_ptr source_image = frame->GetImage(); - /* ALPHA & OPACITY */ + /* ALPHA & OPACITY */ if (alpha.GetValue(frame->number) != 1.0) { float alpha_value = alpha.GetValue(frame->number); @@ -1351,7 +1348,7 @@ QTransform Clip::get_transform(std::shared_ptr frame, int width, int heig /* RESIZE SOURCE IMAGE - based on scale type */ QSize source_size = source_image->size(); - // Apply stretch scale to correctly fit the bounding-box + // Apply stretch scale to correctly fit the bounding-box if (parentTrackedObject){ scale = SCALE_STRETCH; } @@ -1471,7 +1468,7 @@ QTransform Clip::get_transform(std::shared_ptr frame, int width, int heig sy*= parentObject_scale_y; } - float scaled_source_width = source_size.width() * sx; + float scaled_source_width = source_size.width() * sx; float scaled_source_height = source_size.height() * sy; switch (gravity) diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp index 33c6da82..88c495f6 100644 --- a/src/FFmpegWriter.cpp +++ b/src/FFmpegWriter.cpp @@ -1143,6 +1143,10 @@ AVStream *FFmpegWriter::add_video_stream() { c->codec_id = codec->id; c->codec_type = AVMEDIA_TYPE_VIDEO; + // Set sample aspect ratio + c->sample_aspect_ratio.num = info.pixel_ratio.num; + c->sample_aspect_ratio.den = info.pixel_ratio.den; + /* Init video encoder options */ if (info.video_bit_rate >= 1000 #if (LIBAVCODEC_VERSION_MAJOR >= 58) @@ -1219,7 +1223,7 @@ AVStream *FFmpegWriter::add_video_stream() { } } -//TODO: Implement variable bitrate feature (which actually works). This implementation throws + //TODO: Implement variable bitrate feature (which actually works). This implementation throws //invalid bitrate errors and rc buffer underflow errors, etc... //c->rc_min_rate = info.video_bit_rate; //c->rc_max_rate = info.video_bit_rate; diff --git a/src/Frame.cpp b/src/Frame.cpp index 28c04eef..475c4005 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -139,17 +139,14 @@ void Frame::Display() // Get preview image std::shared_ptr previewImage = GetImage(); - // Update the image to reflect the correct pixel aspect ration (i.e. to fix non-squar pixels) - if (pixel_ratio.num != 1 || pixel_ratio.den != 1) - { - // Calculate correct DAR (display aspect ratio) - int new_width = previewImage->size().width(); - int new_height = previewImage->size().height() * pixel_ratio.Reciprocal().ToDouble(); - - // Resize to fix DAR - previewImage = std::make_shared(previewImage->scaled( - new_width, new_height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); - } + // Update the image to reflect the correct pixel aspect ration (i.e. to fix non-square pixels) + if (pixel_ratio.num != 1 || pixel_ratio.den != 1) + { + // Resize to fix DAR + previewImage = std::make_shared(previewImage->scaled( + previewImage->size().width(), previewImage->size().height() * pixel_ratio.Reciprocal().ToDouble(), + Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); + } // Create window QWidget previewWindow; @@ -187,6 +184,7 @@ std::shared_ptr Frame::GetWaveform(int width, int height, int Red, int G int height_padding = 20 * (audio->getNumChannels() - 1); int total_height = new_height + height_padding; int total_width = 0; + float zero_height = 1.0; // Used to clamp near-zero vales to this value to prevent gaps // Loop through each audio channel float Y = 100.0; @@ -202,9 +200,17 @@ std::shared_ptr Frame::GetWaveform(int width, int height, int Red, int G // Sample value (scaled to -100 to 100) float value = samples[sample] * 100.0; + // Set threshold near zero (so we don't allow near-zero values) + // This prevents empty gaps from appearing in the waveform + if (value > -zero_height && value < 0.0) { + value = -zero_height; + } else if (value > 0.0 && value < zero_height) { + value = zero_height; + } + // Append a line segment for each sample - lines.push_back(QPointF(X,Y+1.0)); - lines.push_back(QPointF(X,(Y-value)+1.0)); + lines.push_back(QPointF(X, Y)); + lines.push_back(QPointF(X, Y - value)); } // Add Channel Label Coordinate @@ -233,12 +239,6 @@ std::shared_ptr Frame::GetWaveform(int width, int height, int Red, int G // Draw the waveform painter.drawLines(lines); painter.end(); - - // Resize Image (if requested) - if (width != total_width || height != total_height) { - QImage scaled_wave_image = wave_image->scaled(width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - wave_image = std::make_shared(scaled_wave_image); - } } else { @@ -247,6 +247,12 @@ std::shared_ptr Frame::GetWaveform(int width, int height, int Red, int G wave_image->fill(QColor(QString::fromStdString("#000000"))); } + // Resize Image (if needed) + if (wave_image->width() != width || wave_image->height() != height) { + QImage scaled_wave_image = wave_image->scaled(width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + wave_image = std::make_shared(scaled_wave_image); + } + // Return new image return wave_image; } @@ -571,29 +577,22 @@ void Frame::Save(std::string path, float scale, std::string format, int quality) // Get preview image std::shared_ptr previewImage = GetImage(); + // Update the image to reflect the correct pixel aspect ration (i.e. to fix non-square pixels) + if (pixel_ratio.num != 1 || pixel_ratio.den != 1) + { + // Resize to fix DAR + previewImage = std::make_shared(previewImage->scaled( + previewImage->size().width(), previewImage->size().height() * pixel_ratio.Reciprocal().ToDouble(), + Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); + } + // scale image if needed if (fabs(scale) > 1.001 || fabs(scale) < 0.999) { - int new_width = width; - int new_height = height; - - // Update the image to reflect the correct pixel aspect ration (i.e. to fix non-squar pixels) - if (pixel_ratio.num != 1 || pixel_ratio.den != 1) - { - // Calculate correct DAR (display aspect ratio) - int new_width = previewImage->size().width(); - int new_height = previewImage->size().height() * pixel_ratio.Reciprocal().ToDouble(); - - // Resize to fix DAR - previewImage = std::make_shared(previewImage->scaled( - new_width, new_height, - Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); - } - // Resize image previewImage = std::make_shared(previewImage->scaled( - new_width * scale, new_height * scale, - Qt::KeepAspectRatio, Qt::SmoothTransformation)); + previewImage->size().width() * scale, previewImage->size().height() * scale, + Qt::KeepAspectRatio, Qt::SmoothTransformation)); } // Save image @@ -906,7 +905,7 @@ std::shared_ptr Frame::GetImage() // Fill with black AddColor(width, height, color); - return image; + return image; } #ifdef USE_OPENCV diff --git a/src/Timeline.cpp b/src/Timeline.cpp index 8bed50cf..bfc100bd 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -683,7 +683,7 @@ void Timeline::add_layer(std::shared_ptr new_frame, Clip* source_clip, in } // Debug output - ZmqLogger::Instance()->AppendDebugMethod("Timeline::add_layer (Transform: Composite Image Layer: Completed)", "source_frame->number", source_frame->number, "new_frame->GetImage()->width()", new_frame->GetImage()->width()); + ZmqLogger::Instance()->AppendDebugMethod("Timeline::add_layer (Transform: Composite Image Layer: Completed)", "source_frame->number", source_frame->number, "new_frame->GetImage()->width()", new_frame->GetImage()->width(), "new_frame->GetImage()->height()", new_frame->GetImage()->height()); } // Update the list of 'opened' clips @@ -1523,7 +1523,7 @@ void Timeline::ClearAllCache() { // Settings::Instance()->MAX_WIDTH and Settings::Instance()->MAX_HEIGHT. void Timeline::SetMaxSize(int width, int height) { // Maintain aspect ratio regardless of what size is passed in - QSize display_ratio_size = QSize(info.display_ratio.num * info.pixel_ratio.ToFloat(), info.display_ratio.den * info.pixel_ratio.ToFloat()); + QSize display_ratio_size = QSize(info.width, info.height); QSize proposed_size = QSize(std::min(width, info.width), std::min(height, info.height)); // Scale QSize up to proposed size From 8e663e72952cf3511c452bdb99f44b52597ba70f Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Fri, 8 Oct 2021 01:26:37 -0400 Subject: [PATCH 058/114] Include either Resvg or QtSVG, not both (#756) --- src/CMakeLists.txt | 69 +++++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e43c1c3a..04a1d8a5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -282,9 +282,46 @@ if (TARGET jsoncpp_lib) target_link_libraries(openshot PUBLIC jsoncpp_lib) endif () -################# QT5 ################### -# Find QT5 libraries -set(_qt_components Core Gui Widgets Svg) + +### +### Resvg, the Rust SVG library +### + +# Migrate some legacy variable names +if(DEFINED RESVGDIR AND NOT DEFINED Resvg_ROOT) + set(Resvg_ROOT ${RESVGDIR}) +endif() +if(DEFINED ENV{RESVGDIR} AND NOT DEFINED Resvg_ROOT) + set(Resvg_ROOT $ENV{RESVGDIR}) +endif() + +# Find resvg library (used for rendering svg files) +find_package(Resvg) + +# Include resvg headers (optional SVG library) +if (TARGET Resvg::Resvg) + #include_directories(${Resvg_INCLUDE_DIRS}) + target_link_libraries(openshot PUBLIC Resvg::Resvg) + + target_compile_definitions(openshot PUBLIC USE_RESVG=1) + + set(HAVE_RESVG TRUE CACHE BOOL "Building with Resvg support" FORCE) + mark_as_advanced(HAVE_RESVG) +else() + set(HAVE_RESVG FALSE CACHE BOOL "Building with Resvg support" FORCE) +endif() + +### +### Qt Toolkit +### + +set(_qt_components Core Gui Widgets) + +# We also need QtSvg unless we have Resvg insetead. +if(NOT HAVE_RESVG) + list(APPEND _qt_components Svg) +endif() + find_package(Qt5 COMPONENTS ${_qt_components} REQUIRED) foreach(_qt_comp IN LISTS _qt_components) @@ -400,32 +437,6 @@ if (TARGET cppzmq) target_link_libraries(openshot PUBLIC cppzmq) endif() -### -### Resvg, the Rust SVG library -### - -# Migrate some legacy variable names -if(DEFINED RESVGDIR AND NOT DEFINED Resvg_ROOT) - set(Resvg_ROOT ${RESVGDIR}) -endif() -if(DEFINED ENV{RESVGDIR} AND NOT DEFINED Resvg_ROOT) - set(Resvg_ROOT $ENV{RESVGDIR}) -endif() - -# Find resvg library (used for rendering svg files) -find_package(Resvg) - -# Include resvg headers (optional SVG library) -if (TARGET Resvg::Resvg) - #include_directories(${Resvg_INCLUDE_DIRS}) - target_link_libraries(openshot PUBLIC Resvg::Resvg) - - target_compile_definitions(openshot PUBLIC USE_RESVG=1) - - set(HAVE_RESVG TRUE CACHE BOOL "Building with Resvg support" FORCE) - mark_as_advanced(HAVE_RESVG) -endif() - ################# BLACKMAGIC DECKLINK ################### # Find BlackMagic DeckLinkAPI libraries if (ENABLE_BLACKMAGIC) From c02ab708137156dcb1de95374fe7a2750d8cf0e9 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 8 Oct 2021 03:02:45 -0400 Subject: [PATCH 059/114] FindResvg: Updates for discovery, version-parsing --- cmake/Modules/FindResvg.cmake | 37 +++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/FindResvg.cmake b/cmake/Modules/FindResvg.cmake index 7a03c33e..320e2e44 100644 --- a/cmake/Modules/FindResvg.cmake +++ b/cmake/Modules/FindResvg.cmake @@ -41,6 +41,28 @@ Copyright (c) 2020, FeRD (Frank Dana) #]=======================================================================] include(FindPackageHandleStandardArgs) +### Macro: parse_resvg_version +# +# Read the resvg.h file and extract the definition +# for RESVG_VERSION, to use as our version string. +macro (parse_resvg_version) + set(_header "${Resvg_INCLUDE_DIRS}/resvg.h") + if(EXISTS "${_header}") + #message(STATUS "Parsing Resvg version from ${_header}") + file(STRINGS "${_header}" _version_def + REGEX "^#define[ \t]+RESVG_VERSION[ \t]+\".*\"[ \t]*$") + string(REGEX REPLACE + "^.*RESVG_VERSION[ \t]+\"(.*)\".*$" + "\\1" + Resvg_VERSION "${_version_def}") + #message(STATUS "Found Resvg version: ${Resvg_VERSION}") + endif() +endmacro() + +### +### Begin discovery +### + # CMake 3.4+ only: Convert relative paths to absolute if(DEFINED RESVGDIR AND CMAKE_VERSION VERSION_GREATER 3.4) get_filename_component(RESVGDIR "${RESVGDIR}" ABSOLUTE @@ -58,8 +80,11 @@ find_path(Resvg_INCLUDE_DIRS /usr/include /usr/local/include PATH_SUFFIXES - resvg + c-api capi/include + resvg + resvg/include + resvg/c-api resvg/capi/include ) @@ -82,20 +107,24 @@ find_library(Resvg_LIBRARIES if (Resvg_INCLUDE_DIRS AND Resvg_LIBRARIES) set(Resvg_FOUND TRUE) endif() +parse_resvg_version() + set(Resvg_LIBRARIES ${Resvg_LIBRARIES} CACHE STRING "The Resvg library link path") set(Resvg_INCLUDE_DIRS ${Resvg_INCLUDE_DIRS} CACHE STRING "The Resvg include directories") set(Resvg_DEFINITIONS "" CACHE STRING "The Resvg CFLAGS") +set(Resvg_VERSION ${Resvg_VERSION} CACHE STRING "The Resvg version in use") mark_as_advanced(Resvg_LIBRARIES Resvg_INCLUDE_DIRS Resvg_DEFINITIONS) # Give a nice error message if some of the required vars are missing. find_package_handle_standard_args(Resvg - "Could NOT find Resvg, using Qt SVG parsing instead" - Resvg_LIBRARIES Resvg_INCLUDE_DIRS ) + REQUIRED_VARS Resvg_LIBRARIES Resvg_INCLUDE_DIRS + VERSION_VAR Resvg_VERSION +) # Export target if(Resvg_FOUND AND NOT TARGET Resvg::Resvg) - message(STATUS "Creating IMPORTED target Resvg::Resvg") + #message(STATUS "Creating IMPORTED target Resvg::Resvg") if (WIN32) # Windows mis-links SHARED library targets add_library(Resvg::Resvg UNKNOWN IMPORTED) From e3ca106f2054945f5d187070e84c641281cc20b4 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 8 Oct 2021 03:20:02 -0400 Subject: [PATCH 060/114] CI: Add cached Resvg build (Linux clang) --- .github/workflows/ci.yml | 41 +++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7c8bab8..55e6b2e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,14 @@ jobs: repository: OpenShot/libopenshot-audio path: audio + - name: Checkout Resvg + if: ${{ matrix.compiler.cc == 'clang' && runner.os == 'linux' }} + uses: actions/checkout@v2 + with: + repository: RazrFalcon/resvg + path: resvg + branch: v0.11.0 + - uses: haya14busa/action-cond@v1 id: generator with: @@ -54,6 +62,12 @@ jobs: cond: ${{ matrix.compiler.cc == 'gcc' && runner.os == 'linux' }} if_true: "-DENABLE_COVERAGE:BOOL=1" + - uses: haya14busa/action-cond@v1 + id: use-resvg + with: + cond: ${{ matrix.compiler.cc == 'clang' && runner.os == 'linux' }} + if_true: "-DResvg_ROOT:PATH=./resvg" + - name: Install Linux dependencies if: ${{ runner.os == 'linux' }} run: | @@ -63,9 +77,11 @@ jobs: cmake swig doxygen graphviz curl lcov \ libasound2-dev \ qtbase5-dev qtbase5-dev-tools libqt5svg5-dev \ - libfdk-aac-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev \ + libfdk-aac-dev libavcodec-dev libavformat-dev \ + libavutil-dev libswscale-dev libswresample-dev \ libzmq3-dev libmagick++-dev libbabl-dev \ - libopencv-dev libprotobuf-dev protobuf-compiler + libopencv-dev libprotobuf-dev protobuf-compiler \ + cargo # Install catch2 package from Ubuntu 20.10, since for some reason # even 20.04 only has Catch 1.12.1 available. wget https://launchpad.net/ubuntu/+archive/primary/+files/catch2_2.13.0-1_all.deb @@ -103,13 +119,20 @@ jobs: mingw-w64-x86_64-swig - uses: actions/cache@v2 - id: cache + id: cache-audio with: path: audio/build key: audio-${{ runner.os }}-${{ matrix.compiler.cxx }}-${{ hashFiles('audio/CMakeLists.txt') }} + - uses: actions/cache@v2 + if: ${{ steps.use-resvg.outputs.value }} + id: cache-resvg + with: + path: resvg/target + key: resvg-${{ runner.os }}-${{ matrix.compiler.cxx }}-${{ hashFiles('resvg/Cargo.toml') }} + - name: Build OpenShotAudio (if not cached) - if: steps.cache.outputs.cache-hit != 'true' + if: steps.cache-audio.outputs.cache-hit != 'true' run: | pushd audio if [ ! -d build ]; then @@ -131,6 +154,13 @@ jobs: cmake --build build popd + - name: Build Resvg (if enabled and not cached) + if: ${{ steps.use-resvg.outputs.value }} && (steps.cache-resvg.outputs.cache-hit != 'true') + run: | + pushd resvg/c-api + cargo build --release + popd + - name: Build libopenshot run: | if [ "_${{ runner.os }}" == "_macOS" ]; then @@ -157,7 +187,8 @@ jobs: -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \ -DOpenShotAudio_ROOT="./audio/build" \ ${CMAKE_EXTRA} \ - "${{ steps.coverage.outputs.value }}" + "${{ steps.coverage.outputs.value }}" \ + "${{ steps.use-resvg.outputs.value }}" cmake --build build -- VERBOSE=1 - name: Test libopenshot From af15649fe81a9e49ef7563b30959faa03d974a56 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 8 Oct 2021 12:04:50 -0400 Subject: [PATCH 061/114] Add support for Resvg 0.11.0+ --- src/QtImageReader.cpp | 76 ++++++++++++++++++++++++------------------- src/QtImageReader.h | 34 +++++++++++++++---- 2 files changed, 69 insertions(+), 41 deletions(-) diff --git a/src/QtImageReader.cpp b/src/QtImageReader.cpp index 1800a0f2..3cf2ea88 100644 --- a/src/QtImageReader.cpp +++ b/src/QtImageReader.cpp @@ -40,16 +40,15 @@ #include #include -#if USE_RESVG == 1 - // If defined and found in CMake, utilize the libresvg for parsing - // SVG files and rasterizing them to QImages. - #include "ResvgQt.h" -#endif - using namespace openshot; QtImageReader::QtImageReader(std::string path, bool inspect_reader) : path{QString::fromStdString(path)}, is_open(false) { + +#if RESVG_VERSION_MIN(0, 11) + // Initialize the Resvg options + resvg_options.loadSystemFonts(); +#endif // Open and Close the reader, to populate its attributes (such as height, width, etc...) if (inspect_reader) { Open(); @@ -171,8 +170,8 @@ std::shared_ptr QtImageReader::GetFrame(int64_t requested_frame) // Calculate max image size QSize current_max_size = calculate_max_size(); - // Scale image smaller (or use a previous scaled image) - if (!cached_image || (max_size.width() != current_max_size.width() || max_size.height() != current_max_size.height())) { + // Scale image smaller (or use a previous scaled image) + if (!cached_image || max_size != current_max_size) { // Check for SVG files and rasterize them to QImages if (path.toLower().endsWith(".svg") || path.toLower().endsWith(".svgz")) { load_svg_path(path); @@ -181,21 +180,22 @@ std::shared_ptr QtImageReader::GetFrame(int64_t requested_frame) // We need to resize the original image to a smaller image (for performance reasons) // Only do this once, to prevent tons of unneeded scaling operations cached_image = std::make_shared(image->scaled( - current_max_size.width(), current_max_size.height(), Qt::KeepAspectRatio, Qt::SmoothTransformation)); + current_max_size, + Qt::KeepAspectRatio, Qt::SmoothTransformation)); - // Set max size (to later determine if max_size is changed) - max_size.setWidth(current_max_size.width()); - max_size.setHeight(current_max_size.height()); - } + // Set max size (to later determine if max_size is changed) + max_size = current_max_size; + } - // Create or get frame object - auto image_frame = std::make_shared( - requested_frame, cached_image->width(), cached_image->height(), "#000000", - Frame::GetSamplesPerFrame(requested_frame, info.fps, info.sample_rate, info.channels), - info.channels); + auto sample_count = Frame::GetSamplesPerFrame( + requested_frame, info.fps, info.sample_rate, info.channels); + auto sz = cached_image->size(); - // Add Image data to frame - image_frame->AddImage(cached_image); + // Create frame object + auto image_frame = std::make_shared( + requested_frame, sz.width(), sz.height(), "#000000", + sample_count, info.channels); + image_frame->AddImage(cached_image); // return frame object return image_frame; @@ -270,27 +270,34 @@ QSize QtImageReader::load_svg_path(QString) { // Calculate max image size QSize current_max_size = calculate_max_size(); -#if USE_RESVG == 1 - // Use libresvg for parsing/rasterizing SVG +// Try to use libresvg for parsing/rasterizing SVG, if available +#if RESVG_VERSION_MIN(0, 11) + ResvgRenderer renderer(path, resvg_options); + if (renderer.isValid()) { + default_size = renderer.defaultSize(); + // Scale SVG size to keep aspect ratio, and fill max_size as much as possible + QSize svg_size = default_size.scaled(current_max_size, Qt::KeepAspectRatio); + auto qimage = renderer.renderToImage(svg_size); + image = std::make_shared( + qimage.convertToFormat(QImage::Format_RGBA8888_Premultiplied)); + loaded = true; + } +#elif RESVG_VERSION_MIN(0, 0) ResvgRenderer renderer(path); if (renderer.isValid()) { - // Set default SVG size - default_size.setWidth(renderer.defaultSize().width()); - default_size.setHeight(renderer.defaultSize().height()); - - // Scale SVG size to keep aspect ratio, and fill the max_size as best as possible - QSize svg_size(default_size.width(), default_size.height()); - svg_size.scale(current_max_size.width(), current_max_size.height(), Qt::KeepAspectRatio); - + default_size = renderer.defaultSize(); + // Scale SVG size to keep aspect ratio, and fill max_size as much as possible + QSize svg_size = default_size.scaled(current_max_size, Qt::KeepAspectRatio); // Load SVG at max size - image = std::make_shared(svg_size, QImage::Format_RGBA8888_Premultiplied); + image = std::make_shared(svg_size, + QImage::Format_RGBA8888_Premultiplied); image->fill(Qt::transparent); QPainter p(image.get()); renderer.render(&p); p.end(); loaded = true; } -#endif +#endif // Resvg if (!loaded) { // Use Qt for parsing/rasterizing SVG @@ -304,7 +311,8 @@ QSize QtImageReader::load_svg_path(QString) { if (image->width() < current_max_size.width() || image->height() < current_max_size.height()) { // Load SVG into larger/project size (so image is not blurry) - QSize svg_size = image->size().scaled(current_max_size.width(), current_max_size.height(), Qt::KeepAspectRatio); + QSize svg_size = image->size().scaled( + current_max_size, Qt::KeepAspectRatio); if (QCoreApplication::instance()) { // Requires QApplication to be running (for QPixmap support) // Re-rasterize SVG image to max size @@ -312,7 +320,7 @@ QSize QtImageReader::load_svg_path(QString) { } else { // Scale image without re-rasterizing it (due to lack of QApplication) image = std::make_shared(image->scaled( - svg_size.width(), svg_size.height(), Qt::KeepAspectRatio, Qt::SmoothTransformation)); + svg_size, Qt::KeepAspectRatio, Qt::SmoothTransformation)); } } } diff --git a/src/QtImageReader.h b/src/QtImageReader.h index 687e85e1..da74c093 100644 --- a/src/QtImageReader.h +++ b/src/QtImageReader.h @@ -31,19 +31,35 @@ #ifndef OPENSHOT_QIMAGE_READER_H #define OPENSHOT_QIMAGE_READER_H -#include -#include -#include -#include -#include #include +#include + +#include +#include #include "ReaderBase.h" +#include "Json.h" + +#if USE_RESVG == 1 + // If defined and found in CMake, utilize the libresvg for parsing + // SVG files and rasterizing them to QImages. + #include "ResvgQt.h" + + #define RESVG_VERSION_MIN(a, b) (\ + RESVG_MAJOR_VERSION > a \ + || (RESVG_MAJOR_VERSION == a && RESVG_MINOR_VERSION >= b) \ + ) +#else + #define RESVG_VERSION_MIN(a, b) 0 +#endif + +class QImage; namespace openshot { - // Forward decl - class CacheBase; + // Forward decl + class CacheBase; + class Frame; /** * @brief This class uses the Qt library, to open image files, and return @@ -73,6 +89,10 @@ namespace openshot bool is_open; ///> Is Reader opened QSize max_size; ///> Current max_size as calculated with Clip properties +#if RESVG_VERSION_MIN(0, 11) + ResvgOptions resvg_options; +#endif + /// Load an SVG file with Resvg or fallback with Qt /// /// @returns Success as a boolean From ce8b08238cc1b6af9bf6c815709351cd9b1934f7 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Fri, 8 Oct 2021 12:59:57 -0400 Subject: [PATCH 062/114] Enable Win builds without unit tests (#750) --- src/CMakeLists.txt | 2 +- src/protobuf_messages/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 04a1d8a5..89ce59cc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -536,7 +536,7 @@ install(DIRECTORY . # On Windows, we copy project output DLLs into the tests dir # so that the unit test executables can find them -if(CMAKE_VERSION VERSION_GREATER 3.13 AND WIN32) +if(CMAKE_VERSION VERSION_GREATER 3.13 AND WIN32 AND BUILD_TESTING) # Copy the DLLs immediately after they're built add_custom_command(TARGET openshot POST_BUILD COMMAND diff --git a/src/protobuf_messages/CMakeLists.txt b/src/protobuf_messages/CMakeLists.txt index 16df8a2b..6577424d 100644 --- a/src/protobuf_messages/CMakeLists.txt +++ b/src/protobuf_messages/CMakeLists.txt @@ -68,7 +68,7 @@ install(FILES ${ProtoHeaders} # On Windows, we copy project output DLLs into the test dirs # so that the unit test executables can find them -if(CMAKE_VERSION VERSION_GREATER 3.13 AND WIN32) +if(CMAKE_VERSION VERSION_GREATER 3.13 AND WIN32 AND BUILD_TESTING) add_custom_command(TARGET openshot_protobuf POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different From c9cbf3f2b09e026f59e9609e138180d424d42cc3 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 8 Oct 2021 16:28:32 -0400 Subject: [PATCH 063/114] QtImageReader.cpp: Convert tabs to spaces --- .github/workflows/ci.yml | 8 +- src/QtImageReader.cpp | 208 +++++++++++++++++++-------------------- 2 files changed, 109 insertions(+), 107 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55e6b2e0..59f97534 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,9 +157,11 @@ jobs: - name: Build Resvg (if enabled and not cached) if: ${{ steps.use-resvg.outputs.value }} && (steps.cache-resvg.outputs.cache-hit != 'true') run: | - pushd resvg/c-api - cargo build --release - popd + if [ -d "resvg/c-api" ]; then + pushd resvg/c-api + cargo build --release + popd + fi - name: Build libopenshot run: | diff --git a/src/QtImageReader.cpp b/src/QtImageReader.cpp index 3cf2ea88..2cf5806b 100644 --- a/src/QtImageReader.cpp +++ b/src/QtImageReader.cpp @@ -49,11 +49,11 @@ QtImageReader::QtImageReader(std::string path, bool inspect_reader) : path{QStri // Initialize the Resvg options resvg_options.loadSystemFonts(); #endif - // Open and Close the reader, to populate its attributes (such as height, width, etc...) - if (inspect_reader) { - Open(); - Close(); - } + // Open and Close the reader, to populate its attributes (such as height, width, etc...) + if (inspect_reader) { + Open(); + Close(); + } } QtImageReader::~QtImageReader() @@ -63,10 +63,10 @@ QtImageReader::~QtImageReader() // Open image file void QtImageReader::Open() { - // Open reader if not already open - if (!is_open) - { - bool loaded = false; + // Open reader if not already open + if (!is_open) + { + bool loaded = false; QSize default_svg_size; // Check for SVG files and rasterizing them to QImages @@ -77,95 +77,95 @@ void QtImageReader::Open() } } - if (!loaded) { - // Attempt to open file using Qt's build in image processing capabilities - // AutoTransform enables exif data to be parsed and auto transform the image - // to the correct orientation - image = std::make_shared(); + if (!loaded) { + // Attempt to open file using Qt's build in image processing capabilities + // AutoTransform enables exif data to be parsed and auto transform the image + // to the correct orientation + image = std::make_shared(); QImageReader imgReader( path ); imgReader.setAutoTransform( true ); loaded = imgReader.read(image.get()); - } + } - if (!loaded) { - // raise exception - throw InvalidFile("File could not be opened.", path.toStdString()); - } + if (!loaded) { + // raise exception + throw InvalidFile("File could not be opened.", path.toStdString()); + } - // Update image properties - info.has_audio = false; - info.has_video = true; - info.has_single_image = true; - #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) - // byteCount() is deprecated from Qt 5.10 - info.file_size = image->sizeInBytes(); - #else - info.file_size = image->byteCount(); - #endif - info.vcodec = "QImage"; - if (!default_svg_size.isEmpty()) { - // Use default SVG size (if detected) + // Update image properties + info.has_audio = false; + info.has_video = true; + info.has_single_image = true; + #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) + // byteCount() is deprecated from Qt 5.10 + info.file_size = image->sizeInBytes(); + #else + info.file_size = image->byteCount(); + #endif + info.vcodec = "QImage"; + if (!default_svg_size.isEmpty()) { + // Use default SVG size (if detected) info.width = default_svg_size.width(); info.height = default_svg_size.height(); - } else { - // Use Qt Image size as a fallback + } else { + // Use Qt Image size as a fallback info.width = image->width(); info.height = image->height(); - } - info.pixel_ratio.num = 1; - info.pixel_ratio.den = 1; - info.duration = 60 * 60 * 1; // 1 hour duration - info.fps.num = 30; - info.fps.den = 1; - info.video_timebase.num = 1; - info.video_timebase.den = 30; - info.video_length = round(info.duration * info.fps.ToDouble()); + } + info.pixel_ratio.num = 1; + info.pixel_ratio.den = 1; + info.duration = 60 * 60 * 1; // 1 hour duration + info.fps.num = 30; + info.fps.den = 1; + info.video_timebase.num = 1; + info.video_timebase.den = 30; + info.video_length = round(info.duration * info.fps.ToDouble()); - // Calculate the DAR (display aspect ratio) - Fraction size(info.width * info.pixel_ratio.num, info.height * info.pixel_ratio.den); + // Calculate the DAR (display aspect ratio) + Fraction size(info.width * info.pixel_ratio.num, info.height * info.pixel_ratio.den); - // Reduce size fraction - size.Reduce(); + // Reduce size fraction + size.Reduce(); - // Set the ratio based on the reduced fraction - info.display_ratio.num = size.num; - info.display_ratio.den = size.den; + // Set the ratio based on the reduced fraction + info.display_ratio.num = size.num; + info.display_ratio.den = size.den; - // Set current max size - max_size.setWidth(info.width); - max_size.setHeight(info.height); + // Set current max size + max_size.setWidth(info.width); + max_size.setHeight(info.height); - // Mark as "open" - is_open = true; - } + // Mark as "open" + is_open = true; + } } // Close image file void QtImageReader::Close() { - // Close all objects, if reader is 'open' - if (is_open) - { - // Mark as "closed" - is_open = false; + // Close all objects, if reader is 'open' + if (is_open) + { + // Mark as "closed" + is_open = false; - // Delete the image - image.reset(); + // Delete the image + image.reset(); - info.vcodec = ""; - info.acodec = ""; - } + info.vcodec = ""; + info.acodec = ""; + } } // Get an openshot::Frame object for a specific frame number of this reader. std::shared_ptr QtImageReader::GetFrame(int64_t requested_frame) { - // Check for open reader (or throw exception) - if (!is_open) - throw ReaderClosed("The Image is closed. Call Open() before calling this method.", path.toStdString()); + // Check for open reader (or throw exception) + if (!is_open) + throw ReaderClosed("The Image is closed. Call Open() before calling this method.", path.toStdString()); - // Create a scoped lock, allowing only a single thread to run the following code at one time - const GenericScopedLock lock(getFrameCriticalSection); + // Create a scoped lock, allowing only a single thread to run the following code at one time + const GenericScopedLock lock(getFrameCriticalSection); // Calculate max image size QSize current_max_size = calculate_max_size(); @@ -197,8 +197,8 @@ std::shared_ptr QtImageReader::GetFrame(int64_t requested_frame) sample_count, info.channels); image_frame->AddImage(cached_image); - // return frame object - return image_frame; + // return frame object + return image_frame; } // Calculate the max_size QSize, based on parent timeline and parent clip settings @@ -332,53 +332,53 @@ QSize QtImageReader::load_svg_path(QString) { // Generate JSON string of this object std::string QtImageReader::Json() const { - // Return formatted string - return JsonValue().toStyledString(); + // Return formatted string + return JsonValue().toStyledString(); } // Generate Json::Value for this object Json::Value QtImageReader::JsonValue() const { - // Create root json object - Json::Value root = ReaderBase::JsonValue(); // get parent properties - root["type"] = "QtImageReader"; - root["path"] = path.toStdString(); + // Create root json object + Json::Value root = ReaderBase::JsonValue(); // get parent properties + root["type"] = "QtImageReader"; + root["path"] = path.toStdString(); - // return JsonValue - return root; + // return JsonValue + return root; } // Load JSON string into this object void QtImageReader::SetJson(const std::string value) { - // Parse JSON string into JSON objects - try - { - const Json::Value root = openshot::stringToJson(value); - // Set all values that match - SetJsonValue(root); - } - catch (const std::exception& e) - { - // Error parsing JSON (or missing keys) - throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); - } + // Parse JSON string into JSON objects + try + { + const Json::Value root = openshot::stringToJson(value); + // Set all values that match + SetJsonValue(root); + } + catch (const std::exception& e) + { + // Error parsing JSON (or missing keys) + throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); + } } // Load Json::Value into this object void QtImageReader::SetJsonValue(const Json::Value root) { - // Set parent data - ReaderBase::SetJsonValue(root); + // Set parent data + ReaderBase::SetJsonValue(root); - // Set data from Json (if key is found) - if (!root["path"].isNull()) - path = QString::fromStdString(root["path"].asString()); + // Set data from Json (if key is found) + if (!root["path"].isNull()) + path = QString::fromStdString(root["path"].asString()); - // Re-Open path, and re-init everything (if needed) - if (is_open) - { - Close(); - Open(); - } + // Re-Open path, and re-init everything (if needed) + if (is_open) + { + Close(); + Open(); + } } From c3ef319e04d477b73886524c46e5aac836f9af77 Mon Sep 17 00:00:00 2001 From: Troy Rollo Date: Tue, 21 Sep 2021 10:36:09 +1000 Subject: [PATCH 064/114] Fix errors in LCH Chroma keying and Findbabl.cmake --- cmake/Modules/Findbabl.cmake | 2 +- src/effects/ChromaKey.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/Findbabl.cmake b/cmake/Modules/Findbabl.cmake index c302f52e..7ea9455e 100644 --- a/cmake/Modules/Findbabl.cmake +++ b/cmake/Modules/Findbabl.cmake @@ -22,6 +22,7 @@ set(babl_VERSION ${PC_BABL_VERSION}) find_path(babl_INCLUDE_DIR NAMES babl/babl.h + PATH_SUFFIXES babl-0.1 HINTS ${babl_DIR}/include ${PC_BABL_INCLUDE_DIRS} @@ -30,7 +31,6 @@ find_path(babl_INCLUDE_DIR find_library(babl_LIBRARY NAMES babl-0.1 - SUFFIXES babl-0.1 HINTS ${babl_DIR}/lib ${PC_BABL_LIBDIR} diff --git a/src/effects/ChromaKey.cpp b/src/effects/ChromaKey.cpp index d5becd6e..10e5238f 100644 --- a/src/effects/ChromaKey.cpp +++ b/src/effects/ChromaKey.cpp @@ -360,7 +360,7 @@ std::shared_ptr ChromaKey::GetFrame(std::shared_ptr Date: Sat, 16 Oct 2021 01:26:26 -0400 Subject: [PATCH 065/114] Adopt license management via Reuse project/tool (#711) * reuse-managed license/copyright headers reuse is a tool for compliance with the REUSE recommendations. See for more information, and for the online documentation. * Set jsoncpp license * Add MIT license for Decklink sources * Explicitly license examples/ - Add headers to source files - Change blanket licensing in .reuse/dep5 to only cover binary media - Import CC-BY-3.0 license and assign to sintel_trailer --- .bzrignore | 6 - .gitattributes | 4 + .github/dependabot.yml | 4 + .github/labeler.yml | 4 + .github/stale.yml | 4 + .github/workflows/ci.yml | 4 + .github/workflows/label-merge-conflicts.yml | 3 + .gitignore | 4 + .gitlab-ci.yml | 4 + .reuse/dep5 | 17 ++ AUTHORS | 4 + CMakeLists.txt | 18 +-- COPYING | 165 -------------------- Doxyfile.in | 4 + INSTALL.md | 6 + LICENSES/BSD-3-Clause.txt | 11 ++ LICENSES/CC-BY-3.0.txt | 93 +++++++++++ LICENSES/CC0-1.0.txt | 121 ++++++++++++++ LICENSES/LGPL-3.0-or-later.txt | 71 +++++++++ LICENSES/MIT.txt | 9 ++ README.md | 6 + bindings/CMakeLists.txt | 18 +-- bindings/python/CMakeLists.txt | 19 +-- bindings/python/openshot.i | 36 ++--- bindings/ruby/CMakeLists.txt | 18 +-- bindings/ruby/openshot.i | 36 ++--- cmake/Modules/CodeCoverage.cmake | 29 +--- cmake/Modules/FindBlackMagic.cmake | 4 + cmake/Modules/FindFFmpeg.cmake | 2 + cmake/Modules/FindResvg.cmake | 2 + cmake/Modules/FindZeroMQ.cmake | 4 + cmake/Modules/Findjsoncpp.cmake | 4 + cmake/Modules/UseDoxygen.cmake | 43 +---- cmake/Python/__init__.py | 2 - codecov.yml | 4 + doc/HW-ACCEL.md | 6 + doc/INSTALL-LINUX.md | 6 + doc/INSTALL-MAC.md | 6 + doc/INSTALL-WINDOWS.md | 6 + examples/CMakeLists.txt | 18 +-- examples/Example.cpp | 24 +-- examples/Example.py | 19 +-- examples/Example.rb | 4 + examples/ExampleBlackmagic.cpp | 24 +-- examples/ExampleHtml.cpp | 24 +-- examples/ExampleHtml.py | 19 +-- examples/Example_opencv.cpp | 24 +-- examples/OpenShot Wipe Tests.py | 4 + examples/qt-demo/main.cpp | 24 +-- src/AudioBufferSource.cpp | 24 +-- src/AudioBufferSource.h | 24 +-- src/AudioDeviceInfo.h | 24 +-- src/AudioReaderSource.cpp | 24 +-- src/AudioReaderSource.h | 24 +-- src/AudioResampler.cpp | 24 +-- src/AudioResampler.h | 24 +-- src/CMakeLists.txt | 18 +-- src/CVObjectDetection.cpp | 24 +-- src/CVObjectDetection.h | 24 +-- src/CVStabilization.cpp | 24 +-- src/CVStabilization.h | 24 +-- src/CVTracker.cpp | 24 +-- src/CVTracker.h | 24 +-- src/CacheBase.cpp | 24 +-- src/CacheBase.h | 24 +-- src/CacheDisk.cpp | 24 +-- src/CacheDisk.h | 24 +-- src/CacheMemory.cpp | 24 +-- src/CacheMemory.h | 24 +-- src/ChannelLayouts.h | 24 +-- src/ChunkReader.cpp | 24 +-- src/ChunkReader.h | 24 +-- src/ChunkWriter.cpp | 24 +-- src/ChunkWriter.h | 24 +-- src/Clip.cpp | 24 +-- src/Clip.h | 24 +-- src/ClipBase.cpp | 24 +-- src/ClipBase.h | 24 +-- src/ClipProcessingJobs.cpp | 24 +-- src/ClipProcessingJobs.h | 25 +-- src/Color.cpp | 24 +-- src/Color.h | 24 +-- src/Coordinate.cpp | 24 +-- src/Coordinate.h | 24 +-- src/CrashHandler.cpp | 24 +-- src/CrashHandler.h | 24 +-- src/DecklinkInput.cpp | 51 +----- src/DecklinkInput.h | 51 +----- src/DecklinkOutput.cpp | 51 +----- src/DecklinkOutput.h | 51 +----- src/DecklinkReader.cpp | 24 +-- src/DecklinkReader.h | 24 +-- src/DecklinkWriter.cpp | 24 +-- src/DecklinkWriter.h | 24 +-- src/DummyReader.cpp | 24 +-- src/DummyReader.h | 24 +-- src/EffectBase.cpp | 24 +-- src/EffectBase.h | 24 +-- src/EffectInfo.cpp | 24 +-- src/EffectInfo.h | 24 +-- src/Effects.h | 24 +-- src/Enums.h | 24 +-- src/Exceptions.h | 24 +-- src/FFmpegReader.cpp | 28 +--- src/FFmpegReader.h | 28 +--- src/FFmpegUtilities.h | 24 +-- src/FFmpegWriter.cpp | 28 +--- src/FFmpegWriter.h | 31 +--- src/Fraction.cpp | 24 +-- src/Fraction.h | 24 +-- src/Frame.cpp | 24 +-- src/Frame.h | 24 +-- src/FrameMapper.cpp | 24 +-- src/FrameMapper.h | 24 +-- src/ImageReader.cpp | 24 +-- src/ImageReader.h | 24 +-- src/ImageWriter.cpp | 27 +--- src/ImageWriter.h | 31 +--- src/Json.cpp | 24 +-- src/Json.h | 24 +-- src/KeyFrame.cpp | 24 +-- src/KeyFrame.h | 24 +-- src/MagickUtilities.h | 24 +-- src/OpenCVUtilities.h | 24 +-- src/OpenMPUtilities.h | 24 +-- src/OpenShot.h | 8 +- src/OpenShotVersion.cpp | 24 +-- src/OpenShotVersion.h.in | 24 +-- src/PlayerBase.cpp | 24 +-- src/PlayerBase.h | 24 +-- src/Point.cpp | 24 +-- src/Point.h | 24 +-- src/ProcessingController.h | 24 +-- src/Profiles.cpp | 24 +-- src/Profiles.h | 24 +-- src/Qt/AudioPlaybackThread.cpp | 24 +-- src/Qt/AudioPlaybackThread.h | 24 +-- src/Qt/PlayerDemo.cpp | 24 +-- src/Qt/PlayerDemo.h | 24 +-- src/Qt/PlayerPrivate.cpp | 24 +-- src/Qt/PlayerPrivate.h | 24 +-- src/Qt/VideoCacheThread.cpp | 24 +-- src/Qt/VideoCacheThread.h | 24 +-- src/Qt/VideoPlaybackThread.cpp | 24 +-- src/Qt/VideoPlaybackThread.h | 24 +-- src/Qt/VideoRenderWidget.cpp | 24 +-- src/Qt/VideoRenderWidget.h | 24 +-- src/Qt/VideoRenderer.cpp | 24 +-- src/Qt/VideoRenderer.h | 24 +-- src/QtHtmlReader.cpp | 24 +-- src/QtHtmlReader.h | 24 +-- src/QtImageReader.cpp | 24 +-- src/QtImageReader.h | 24 +-- src/QtPlayer.cpp | 24 +-- src/QtPlayer.h | 24 +-- src/QtTextReader.cpp | 24 +-- src/QtTextReader.h | 24 +-- src/QtUtilities.h | 24 +-- src/ReaderBase.cpp | 24 +-- src/ReaderBase.h | 24 +-- src/RendererBase.cpp | 24 +-- src/RendererBase.h | 24 +-- src/Settings.cpp | 24 +-- src/Settings.h | 24 +-- src/TextReader.cpp | 24 +-- src/TextReader.h | 24 +-- src/Timeline.cpp | 24 +-- src/Timeline.h | 24 +-- src/TimelineBase.cpp | 24 +-- src/TimelineBase.h | 24 +-- src/TrackedObjectBBox.cpp | 24 +-- src/TrackedObjectBBox.h | 24 +-- src/TrackedObjectBase.cpp | 24 +-- src/TrackedObjectBase.h | 24 +-- src/WriterBase.cpp | 24 +-- src/WriterBase.h | 24 +-- src/ZmqLogger.cpp | 24 +-- src/ZmqLogger.h | 24 +-- src/audio_effects/Compressor.cpp | 24 +-- src/audio_effects/Compressor.h | 24 +-- src/audio_effects/Delay.cpp | 24 +-- src/audio_effects/Delay.h | 24 +-- src/audio_effects/Distortion.cpp | 24 +-- src/audio_effects/Distortion.h | 24 +-- src/audio_effects/Echo.cpp | 24 +-- src/audio_effects/Echo.h | 24 +-- src/audio_effects/Expander.cpp | 24 +-- src/audio_effects/Expander.h | 24 +-- src/audio_effects/Noise.cpp | 24 +-- src/audio_effects/Noise.h | 24 +-- src/audio_effects/ParametricEQ.cpp | 24 +-- src/audio_effects/ParametricEQ.h | 24 +-- src/audio_effects/Robotization.cpp | 24 +-- src/audio_effects/Robotization.h | 24 +-- src/audio_effects/STFT.cpp | 4 + src/audio_effects/STFT.h | 4 + src/audio_effects/Whisperization.cpp | 24 +-- src/audio_effects/Whisperization.h | 24 +-- src/effects/Bars.cpp | 24 +-- src/effects/Bars.h | 24 +-- src/effects/Blur.cpp | 24 +-- src/effects/Blur.h | 24 +-- src/effects/Brightness.cpp | 24 +-- src/effects/Brightness.h | 24 +-- src/effects/Caption.cpp | 24 +-- src/effects/Caption.h | 24 +-- src/effects/ChromaKey.cpp | 24 +-- src/effects/ChromaKey.h | 24 +-- src/effects/ColorShift.cpp | 24 +-- src/effects/ColorShift.h | 24 +-- src/effects/Crop.cpp | 24 +-- src/effects/Crop.h | 24 +-- src/effects/Deinterlace.cpp | 24 +-- src/effects/Deinterlace.h | 24 +-- src/effects/Hue.cpp | 24 +-- src/effects/Hue.h | 24 +-- src/effects/Mask.cpp | 24 +-- src/effects/Mask.h | 24 +-- src/effects/Negate.cpp | 24 +-- src/effects/Negate.h | 24 +-- src/effects/ObjectDetection.cpp | 24 +-- src/effects/ObjectDetection.h | 24 +-- src/effects/Pixelate.cpp | 24 +-- src/effects/Pixelate.h | 24 +-- src/effects/Saturation.cpp | 24 +-- src/effects/Saturation.h | 24 +-- src/effects/Shift.cpp | 24 +-- src/effects/Shift.h | 24 +-- src/effects/Stabilizer.cpp | 24 +-- src/effects/Stabilizer.h | 24 +-- src/effects/Tracker.cpp | 24 +-- src/effects/Tracker.h | 24 +-- src/effects/Wave.cpp | 24 +-- src/effects/Wave.h | 24 +-- src/protobuf_messages/CMakeLists.txt | 18 +-- src/protobuf_messages/objdetectdata.proto | 3 + src/protobuf_messages/stabilizedata.proto | 3 + src/protobuf_messages/trackerdata.proto | 3 + src/sort_filter/Hungarian.cpp | 4 + src/sort_filter/Hungarian.h | 4 + src/sort_filter/KalmanTracker.cpp | 4 + src/sort_filter/KalmanTracker.h | 4 + src/sort_filter/sort.cpp | 4 + src/sort_filter/sort.hpp | 3 + tests/CMakeLists.txt | 18 +-- tests/CVObjectDetection.cpp | 24 +-- tests/CVStabilizer.cpp | 24 +-- tests/CVTracker.cpp | 24 +-- tests/CacheDisk.cpp | 24 +-- tests/CacheMemory.cpp | 24 +-- tests/Clip.cpp | 24 +-- tests/Color.cpp | 24 +-- tests/Coordinate.cpp | 24 +-- tests/DummyReader.cpp | 24 +-- tests/FFmpegReader.cpp | 24 +-- tests/FFmpegWriter.cpp | 24 +-- tests/Fraction.cpp | 24 +-- tests/Frame.cpp | 24 +-- tests/FrameMapper.cpp | 24 +-- tests/ImageWriter.cpp | 24 +-- tests/KeyFrame.cpp | 24 +-- tests/Point.cpp | 24 +-- tests/QtImageReader.cpp | 24 +-- tests/ReaderBase.cpp | 24 +-- tests/Settings.cpp | 24 +-- tests/Timeline.cpp | 24 +-- tests/catch_main.cpp | 24 +-- version.sh | 5 + 268 files changed, 1154 insertions(+), 4954 deletions(-) delete mode 100644 .bzrignore create mode 100644 .reuse/dep5 delete mode 100644 COPYING create mode 100644 LICENSES/BSD-3-Clause.txt create mode 100644 LICENSES/CC-BY-3.0.txt create mode 100644 LICENSES/CC0-1.0.txt create mode 100644 LICENSES/LGPL-3.0-or-later.txt create mode 100644 LICENSES/MIT.txt delete mode 100644 cmake/Python/__init__.py diff --git a/.bzrignore b/.bzrignore deleted file mode 100644 index e7f24925..00000000 --- a/.bzrignore +++ /dev/null @@ -1,6 +0,0 @@ -build/ -build/* -*.DS_Store -.pydevproject -.settings -.idea/* \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 032c1bd1..82751ff3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,6 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + * text=auto diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f2333859..017f5f6b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + # Set update schedule for GitHub Actions version: 2 diff --git a/.github/labeler.yml b/.github/labeler.yml index 756bf1e4..f912f46d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + # Add 'build' label to CMake changes build: - /**/CMakeList.txt diff --git a/.github/stale.yml b/.github/stale.yml index 9071118f..0a51d86f 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + # Number of days of inactivity before an issue becomes stale daysUntilStale: 90 # Number of days of inactivity before a stale issue is closed diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7c8bab8..f73e1dcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + name: libopenshot CI Build on: [push, pull_request] diff --git a/.github/workflows/label-merge-conflicts.yml b/.github/workflows/label-merge-conflicts.yml index e5703a5f..ea91111f 100644 --- a/.github/workflows/label-merge-conflicts.yml +++ b/.github/workflows/label-merge-conflicts.yml @@ -1,3 +1,6 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later name: Label merge conflicts diff --git a/.gitignore b/.gitignore index 3f706e28..b89ccf59 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + /build* *.DS_Store .pydevproject diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c9fd6415..204dd593 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + stages: - build-libopenshot - trigger-openshot-qt diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 00000000..075af2a8 --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,17 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: libopenshot +Upstream-Contact: Jonathan Thomas +Source: https://github.com/OpenShot/libopenshot + +Files: examples/*.png examples/*.svg examples/*.wav examples/*.mp4 examples/*.avi doc/images/* +Copyright: OpenShot Studios, LLC +License: LGPL-3.0-or-later + +Files: examples/sintel_trailer-720p.mp4 +Copyright: © copyright Blender Foundation | durian.blender.org +License: CC-BY-3.0 + +Files: thirdparty/jsoncpp/* +Copyright: Copyright (c) 2007-2010 by Baptiste Lepilleur and +The JsonCpp Authors +License: CC0-1.0 or MIT diff --git a/AUTHORS b/AUTHORS index 9ef20d7e..192fef39 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1,6 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + Jonathan Thomas Duzy Chan \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 5850b19e..3a1f17ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,24 +5,8 @@ # @section LICENSE # # Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ +# SPDX-License-Identifier: LGPL-3.0-or-later cmake_minimum_required(VERSION 3.10...3.20 FATAL_ERROR) diff --git a/COPYING b/COPYING deleted file mode 100644 index 02bbb60b..00000000 --- a/COPYING +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. \ No newline at end of file diff --git a/Doxyfile.in b/Doxyfile.in index 35c00d97..6cd2c32b 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + # Doxyfile 1.8.20 # This file describes the settings to be used by the documentation system diff --git a/INSTALL.md b/INSTALL.md index b1ddc796..a06bfccf 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,3 +1,9 @@ + + ## Detailed Install Instructions Operating system specific install instructions are located in: diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt new file mode 100644 index 00000000..6c9eef8d --- /dev/null +++ b/LICENSES/BSD-3-Clause.txt @@ -0,0 +1,11 @@ +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSES/CC-BY-3.0.txt b/LICENSES/CC-BY-3.0.txt new file mode 100644 index 00000000..465aae75 --- /dev/null +++ b/LICENSES/CC-BY-3.0.txt @@ -0,0 +1,93 @@ +Creative Commons Attribution 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. + + b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. + + c. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. + + d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. + + e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. + + f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. + + g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + + h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. + + i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; + + b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; + + c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, + + d. to Distribute and Publicly Perform Adaptations. + + e. For the avoidance of doubt: + + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; + + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, + + iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested. + + b. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. + + c. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. + + e. This License may not be modified without the mutual written agreement of the Licensor and You. + + f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. + +Creative Commons Notice + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. + +Creative Commons may be contacted at http://creativecommons.org/. diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 100644 index 00000000..0e259d42 --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/LICENSES/LGPL-3.0-or-later.txt b/LICENSES/LGPL-3.0-or-later.txt new file mode 100644 index 00000000..c9287dd3 --- /dev/null +++ b/LICENSES/LGPL-3.0-or-later.txt @@ -0,0 +1,71 @@ +GNU LESSER GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. + +0. Additional Definitions. + +As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. + +"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. + +An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. + +A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". + +The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. + +The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. + +1. Exception to Section 3 of the GNU GPL. +You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. + +2. Conveying Modified Versions. +If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: + + a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. + +3. Object Code Incorporating Material from Library Header Files. +The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license document. + +4. Combined Works. +You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: + + a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license document. + + c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. + + e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) + +5. Combined Libraries. +You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +6. Revised Versions of the GNU Lesser General Public License. +The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 00000000..2071b23b --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index f255e898..ad2a92a4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ + + OpenShot Video Library (libopenshot) is a free, open-source C++ library dedicated to delivering high quality video editing, animation, and playback solutions to the world. diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt index 831b7bde..348bf309 100644 --- a/bindings/CMakeLists.txt +++ b/bindings/CMakeLists.txt @@ -5,24 +5,8 @@ # @section LICENSE # # Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ +# SPDX-License-Identifier: LGPL-3.0-or-later IF(NOT DEFINED ENABLE_PYTHON) SET(ENABLE_PYTHON 1) diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 8116ccfd..a47ca44f 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -5,25 +5,8 @@ # @section LICENSE # # Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ - +# SPDX-License-Identifier: LGPL-3.0-or-later ############### SWIG PYTHON BINDINGS ################ find_package(SWIG 3.0 REQUIRED) diff --git a/bindings/python/openshot.i b/bindings/python/openshot.i index 6f3f61c4..f72d944b 100644 --- a/bindings/python/openshot.i +++ b/bindings/python/openshot.i @@ -1,29 +1,13 @@ -/* ####################### src/openshot.i (libopenshot) ######################## -# @brief SWIG configuration for libopenshot (to generate Python SWIG bindings) -# @author Jonathan Thomas -# -# @section LICENSE -# -# Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . -# -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ */ - +/** + * @file + * @brief SWIG configuration for libopenshot (to generate Python SWIG bindings) + * @author Jonathan Thomas + * + * @section LICENSE +*/ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later %module openshot diff --git a/bindings/ruby/CMakeLists.txt b/bindings/ruby/CMakeLists.txt index 36f4a17d..85959bc4 100644 --- a/bindings/ruby/CMakeLists.txt +++ b/bindings/ruby/CMakeLists.txt @@ -5,24 +5,8 @@ # @section LICENSE # # Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ +# SPDX-License-Identifier: LGPL-3.0-or-later ############### RUBY BINDINGS ################ find_package(SWIG 3.0 REQUIRED) diff --git a/bindings/ruby/openshot.i b/bindings/ruby/openshot.i index 3e64af26..ba240f58 100644 --- a/bindings/ruby/openshot.i +++ b/bindings/ruby/openshot.i @@ -1,29 +1,13 @@ -/* ####################### src/openshot.i (libopenshot) ######################## -# @brief SWIG configuration for libopenshot (to generate Ruby SWIG bindings) -# @author Jonathan Thomas -# -# @section LICENSE -# -# Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . -# -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ */ - +/** + * @file + * @brief SWIG configuration for libopenshot (to generate Python SWIG bindings) + * @author Jonathan Thomas + * + * @section LICENSE +*/ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later %module openshot diff --git a/cmake/Modules/CodeCoverage.cmake b/cmake/Modules/CodeCoverage.cmake index fde7f535..bb2ef294 100644 --- a/cmake/Modules/CodeCoverage.cmake +++ b/cmake/Modules/CodeCoverage.cmake @@ -1,31 +1,7 @@ # Copyright (c) 2012 - 2017, Lars Bilke -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without modification, -# are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +# SPDX-License-Identifier: BSD-3-Clause + # CHANGES: # # 2012-01-31, Lars Bilke @@ -109,7 +85,6 @@ # cmake -DCMAKE_BUILD_TYPE=Debug .. # make # make my_coverage_target -# include(CMakeParseArguments) diff --git a/cmake/Modules/FindBlackMagic.cmake b/cmake/Modules/FindBlackMagic.cmake index 453d6e58..e69e8669 100644 --- a/cmake/Modules/FindBlackMagic.cmake +++ b/cmake/Modules/FindBlackMagic.cmake @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + # - Try to find the BlackMagic DeckLinkAPI # Once done this will define # diff --git a/cmake/Modules/FindFFmpeg.cmake b/cmake/Modules/FindFFmpeg.cmake index 4f5093d7..d9ac621d 100644 --- a/cmake/Modules/FindFFmpeg.cmake +++ b/cmake/Modules/FindFFmpeg.cmake @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + # vim: ts=2 sw=2 #[=======================================================================[.rst: FindFFmpeg diff --git a/cmake/Modules/FindResvg.cmake b/cmake/Modules/FindResvg.cmake index 7a03c33e..08941320 100644 --- a/cmake/Modules/FindResvg.cmake +++ b/cmake/Modules/FindResvg.cmake @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later + # vim: ts=2 sw=2 #[=======================================================================[.rst: FindResvg diff --git a/cmake/Modules/FindZeroMQ.cmake b/cmake/Modules/FindZeroMQ.cmake index 1f1dc083..cec8113e 100644 --- a/cmake/Modules/FindZeroMQ.cmake +++ b/cmake/Modules/FindZeroMQ.cmake @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON) find_package(PkgConfig) pkg_check_modules(PC_LIBZMQ QUIET libzmq) diff --git a/cmake/Modules/Findjsoncpp.cmake b/cmake/Modules/Findjsoncpp.cmake index 75f7db4a..818d9ba7 100644 --- a/cmake/Modules/Findjsoncpp.cmake +++ b/cmake/Modules/Findjsoncpp.cmake @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + # - Try to find jsoncpp # # IMPORTED target diff --git a/cmake/Modules/UseDoxygen.cmake b/cmake/Modules/UseDoxygen.cmake index 807dbac6..c0684801 100644 --- a/cmake/Modules/UseDoxygen.cmake +++ b/cmake/Modules/UseDoxygen.cmake @@ -1,28 +1,6 @@ -# Redistribution and use is allowed according to the terms of the New -# BSD license: +# Copyright (c) 2009, 2010, 2011 Tobias Rautenkranz # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# SPDX-License-Identifier: BSD-3-Clause # - Run Doxygen # @@ -56,26 +34,19 @@ # DOXYFILE_EXTRA_SOURCES - Additional source diretories/files for Doxygen to scan. # The Paths should be in double quotes and separated by space. e.g.: # "${CMAKE_CURRENT_BINARY_DIR}/foo.c" "${CMAKE_CURRENT_BINARY_DIR}/bar/" -# +# # DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored. # Defaults to "${CMAKE_CURRENT_BINARY_DIR}/doc". -# +# # DOXYFILE_LATEX - ON/OFF; Set to "ON" if you want the LaTeX documentation # to be built. # DOXYFILE_LATEX_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where # the Doxygen LaTeX output is stored. Defaults to "latex". -# +# # DOXYFILE_HTML_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where # the Doxygen html output is stored. Defaults to "html". # -# -# Copyright (c) 2009, 2010, 2011 Tobias Rautenkranz -# -# Redistribution and use is allowed according to the terms of the New -# BSD license. -# - macro(usedoxygen_set_default name value type docstring) if(NOT DEFINED "${name}") set("${name}" "${value}" CACHE "${type}" "${docstring}") @@ -118,14 +89,14 @@ if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND) set(DOXYFILE_DOT "YES") endif() - set_property(DIRECTORY + set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}") add_custom_target(doxygen COMMAND "${DOXYGEN_EXECUTABLE}" - "${DOXYFILE}" + "${DOXYFILE}" COMMENT "Writing documentation to ${DOXYFILE_OUTPUT_DIR}..." WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/cmake/Python/__init__.py b/cmake/Python/__init__.py deleted file mode 100644 index d666bcd4..00000000 --- a/cmake/Python/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# Automatically import all openshot objects when this module is imported -from openshot import * diff --git a/codecov.yml b/codecov.yml index 6b9f43f4..d5358b95 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + coverage: status: project: diff --git a/doc/HW-ACCEL.md b/doc/HW-ACCEL.md index 497ae2b9..e01513cc 100644 --- a/doc/HW-ACCEL.md +++ b/doc/HW-ACCEL.md @@ -1,3 +1,9 @@ + + ## Hardware Acceleration OpenShot now has experimental support for hardware acceleration, which uses 1 (or more) diff --git a/doc/INSTALL-LINUX.md b/doc/INSTALL-LINUX.md index 2a0bbe1b..dd971e01 100644 --- a/doc/INSTALL-LINUX.md +++ b/doc/INSTALL-LINUX.md @@ -1,3 +1,9 @@ + + # Building libopenshot for Linux ## Getting Started diff --git a/doc/INSTALL-MAC.md b/doc/INSTALL-MAC.md index ac0c7f7c..5db761cf 100644 --- a/doc/INSTALL-MAC.md +++ b/doc/INSTALL-MAC.md @@ -1,3 +1,9 @@ + + # Building libopenshot for MacOS ## Getting Started diff --git a/doc/INSTALL-WINDOWS.md b/doc/INSTALL-WINDOWS.md index 2b17569b..ea01b302 100644 --- a/doc/INSTALL-WINDOWS.md +++ b/doc/INSTALL-WINDOWS.md @@ -1,3 +1,9 @@ + + # Building libopenshot for Windows ## Getting Started diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index bde744d7..d861813b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -6,24 +6,8 @@ # @section LICENSE # # Copyright (c) 2008-2020 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ +# SPDX-License-Identifier: LGPL-3.0-or-later include(GNUInstallDirs) diff --git a/examples/Example.cpp b/examples/Example.cpp index 52a30743..a903c0af 100644 --- a/examples/Example.cpp +++ b/examples/Example.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/examples/Example.py b/examples/Example.py index 31541b96..f43f0908 100755 --- a/examples/Example.py +++ b/examples/Example.py @@ -9,26 +9,9 @@ @ref License """ -# LICENSE -# # Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . +# SPDX-License-Identifier: LGPL-3.0-or-later # This can be run against an uninstalled build of libopenshot, just set the # environment variable PYTHONPATH to the location of the Python bindings. diff --git a/examples/Example.rb b/examples/Example.rb index 5e4c7940..1b413643 100644 --- a/examples/Example.rb +++ b/examples/Example.rb @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + # Find and load the ruby libopenshot wrapper library require "openshot" diff --git a/examples/ExampleBlackmagic.cpp b/examples/ExampleBlackmagic.cpp index 91a6655d..4845bcd2 100644 --- a/examples/ExampleBlackmagic.cpp +++ b/examples/ExampleBlackmagic.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/examples/ExampleHtml.cpp b/examples/ExampleHtml.cpp index 852543ae..e97b3352 100644 --- a/examples/ExampleHtml.cpp +++ b/examples/ExampleHtml.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/examples/ExampleHtml.py b/examples/ExampleHtml.py index 1938f2fe..5938063a 100755 --- a/examples/ExampleHtml.py +++ b/examples/ExampleHtml.py @@ -9,26 +9,9 @@ @ref License """ -# LICENSE -# # Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . +# SPDX-License-Identifier: LGPL-3.0-or-later import sys from PyQt5.QtCore import QTimer diff --git a/examples/Example_opencv.cpp b/examples/Example_opencv.cpp index 92576b3c..cdea4f59 100644 --- a/examples/Example_opencv.cpp +++ b/examples/Example_opencv.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/examples/OpenShot Wipe Tests.py b/examples/OpenShot Wipe Tests.py index 91b00917..9ff418fe 100644 --- a/examples/OpenShot Wipe Tests.py +++ b/examples/OpenShot Wipe Tests.py @@ -1,3 +1,7 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + import openshot # Create an empty timeline diff --git a/examples/qt-demo/main.cpp b/examples/qt-demo/main.cpp index 5d4120ac..2ef14224 100644 --- a/examples/qt-demo/main.cpp +++ b/examples/qt-demo/main.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Qt/PlayerDemo.h" #include "ZmqLogger.h" diff --git a/src/AudioBufferSource.cpp b/src/AudioBufferSource.cpp index 6b2bc59e..e71cfacc 100644 --- a/src/AudioBufferSource.cpp +++ b/src/AudioBufferSource.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "AudioBufferSource.h" diff --git a/src/AudioBufferSource.h b/src/AudioBufferSource.h index a899d8da..c164819f 100644 --- a/src/AudioBufferSource.h +++ b/src/AudioBufferSource.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_AUDIOBUFFERSOURCE_H #define OPENSHOT_AUDIOBUFFERSOURCE_H diff --git a/src/AudioDeviceInfo.h b/src/AudioDeviceInfo.h index 454bf923..53378fc4 100644 --- a/src/AudioDeviceInfo.h +++ b/src/AudioDeviceInfo.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_AUDIODEVICEINFO_H #define OPENSHOT_AUDIODEVICEINFO_H diff --git a/src/AudioReaderSource.cpp b/src/AudioReaderSource.cpp index 19fbb6ca..d12a17fa 100644 --- a/src/AudioReaderSource.cpp +++ b/src/AudioReaderSource.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "AudioReaderSource.h" #include "Exceptions.h" diff --git a/src/AudioReaderSource.h b/src/AudioReaderSource.h index 2b0cc0ea..b3d1134a 100644 --- a/src/AudioReaderSource.h +++ b/src/AudioReaderSource.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_AUDIOREADERSOURCE_H #define OPENSHOT_AUDIOREADERSOURCE_H diff --git a/src/AudioResampler.cpp b/src/AudioResampler.cpp index 8c27043e..841a2aa5 100644 --- a/src/AudioResampler.cpp +++ b/src/AudioResampler.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "AudioResampler.h" diff --git a/src/AudioResampler.h b/src/AudioResampler.h index f9f94d83..6d655be7 100644 --- a/src/AudioResampler.h +++ b/src/AudioResampler.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_RESAMPLER_H #define OPENSHOT_RESAMPLER_H diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 89ce59cc..3a9d6a60 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,24 +5,8 @@ # @section LICENSE # # Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ +# SPDX-License-Identifier: LGPL-3.0-or-later # Collect and display summary of options/dependencies include(FeatureSummary) diff --git a/src/CVObjectDetection.cpp b/src/CVObjectDetection.cpp index 959c37bc..1ba302d0 100644 --- a/src/CVObjectDetection.cpp +++ b/src/CVObjectDetection.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/CVObjectDetection.h b/src/CVObjectDetection.h index 326fc7ce..b82dd055 100644 --- a/src/CVObjectDetection.h +++ b/src/CVObjectDetection.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #pragma once diff --git a/src/CVStabilization.cpp b/src/CVStabilization.cpp index dd1c6b47..e38b294f 100644 --- a/src/CVStabilization.cpp +++ b/src/CVStabilization.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/CVStabilization.h b/src/CVStabilization.h index 4dd04ca9..fe3a39cd 100644 --- a/src/CVStabilization.h +++ b/src/CVStabilization.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_STABILIZATION_H #define OPENSHOT_STABILIZATION_H diff --git a/src/CVTracker.cpp b/src/CVTracker.cpp index b3891674..8df63825 100644 --- a/src/CVTracker.cpp +++ b/src/CVTracker.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/CVTracker.h b/src/CVTracker.h index db7b728f..8d31d676 100644 --- a/src/CVTracker.h +++ b/src/CVTracker.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CVTRACKER_H #define OPENSHOT_CVTRACKER_H diff --git a/src/CacheBase.cpp b/src/CacheBase.cpp index 72381792..b5f3c750 100644 --- a/src/CacheBase.cpp +++ b/src/CacheBase.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "CacheBase.h" diff --git a/src/CacheBase.h b/src/CacheBase.h index b0a64f45..8e9426b5 100644 --- a/src/CacheBase.h +++ b/src/CacheBase.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CACHE_BASE_H #define OPENSHOT_CACHE_BASE_H diff --git a/src/CacheDisk.cpp b/src/CacheDisk.cpp index 43882c82..04c32ae1 100644 --- a/src/CacheDisk.cpp +++ b/src/CacheDisk.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "CacheDisk.h" #include "Exceptions.h" diff --git a/src/CacheDisk.h b/src/CacheDisk.h index 764497b7..a9a79e4d 100644 --- a/src/CacheDisk.h +++ b/src/CacheDisk.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CACHE_DISK_H #define OPENSHOT_CACHE_DISK_H diff --git a/src/CacheMemory.cpp b/src/CacheMemory.cpp index 6d51e533..13a0f8d9 100644 --- a/src/CacheMemory.cpp +++ b/src/CacheMemory.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "CacheMemory.h" #include "Exceptions.h" diff --git a/src/CacheMemory.h b/src/CacheMemory.h index c693cb66..81ee7739 100644 --- a/src/CacheMemory.h +++ b/src/CacheMemory.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CACHE_MEMORY_H #define OPENSHOT_CACHE_MEMORY_H diff --git a/src/ChannelLayouts.h b/src/ChannelLayouts.h index 673eeccd..68250241 100644 --- a/src/ChannelLayouts.h +++ b/src/ChannelLayouts.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CHANNEL_LAYOUT_H #define OPENSHOT_CHANNEL_LAYOUT_H diff --git a/src/ChunkReader.cpp b/src/ChunkReader.cpp index 95a6613f..806f1a86 100644 --- a/src/ChunkReader.cpp +++ b/src/ChunkReader.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "ChunkReader.h" #include "Exceptions.h" diff --git a/src/ChunkReader.h b/src/ChunkReader.h index 775e20d2..aa3a85dd 100644 --- a/src/ChunkReader.h +++ b/src/ChunkReader.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CHUNK_READER_H #define OPENSHOT_CHUNK_READER_H diff --git a/src/ChunkWriter.cpp b/src/ChunkWriter.cpp index 3b03ae27..446fdcc6 100644 --- a/src/ChunkWriter.cpp +++ b/src/ChunkWriter.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "ChunkWriter.h" #include "Exceptions.h" diff --git a/src/ChunkWriter.h b/src/ChunkWriter.h index ff1aee36..f7da0326 100644 --- a/src/ChunkWriter.h +++ b/src/ChunkWriter.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CHUNK_WRITER_H #define OPENSHOT_CHUNK_WRITER_H diff --git a/src/Clip.cpp b/src/Clip.cpp index 48d70956..0535fee8 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Clip.h" #include "Exceptions.h" diff --git a/src/Clip.h b/src/Clip.h index 2b9caced..011e3f03 100644 --- a/src/Clip.h +++ b/src/Clip.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CLIP_H #define OPENSHOT_CLIP_H diff --git a/src/ClipBase.cpp b/src/ClipBase.cpp index f7695904..e09ac571 100644 --- a/src/ClipBase.cpp +++ b/src/ClipBase.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "ClipBase.h" diff --git a/src/ClipBase.h b/src/ClipBase.h index 2f138a5c..83054311 100644 --- a/src/ClipBase.h +++ b/src/ClipBase.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CLIPBASE_H #define OPENSHOT_CLIPBASE_H diff --git a/src/ClipProcessingJobs.cpp b/src/ClipProcessingJobs.cpp index cc3007d6..7ee2f609 100644 --- a/src/ClipProcessingJobs.cpp +++ b/src/ClipProcessingJobs.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "ClipProcessingJobs.h" diff --git a/src/ClipProcessingJobs.h b/src/ClipProcessingJobs.h index 66c55c3e..304433cb 100644 --- a/src/ClipProcessingJobs.h +++ b/src/ClipProcessingJobs.h @@ -7,28 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ - +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifdef USE_OPENCV #define int64 opencv_broken_int diff --git a/src/Color.cpp b/src/Color.cpp index c877cbd4..4b0f227b 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include diff --git a/src/Color.h b/src/Color.h index 8b7eaae2..57806138 100644 --- a/src/Color.h +++ b/src/Color.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_COLOR_H #define OPENSHOT_COLOR_H diff --git a/src/Coordinate.cpp b/src/Coordinate.cpp index d2a2ed3c..ae15d5d5 100644 --- a/src/Coordinate.cpp +++ b/src/Coordinate.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Coordinate.h" #include "Exceptions.h" diff --git a/src/Coordinate.h b/src/Coordinate.h index d4576cd2..a177fb92 100644 --- a/src/Coordinate.h +++ b/src/Coordinate.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_COORDINATE_H #define OPENSHOT_COORDINATE_H diff --git a/src/CrashHandler.cpp b/src/CrashHandler.cpp index 7b6c4e7e..fca7f890 100644 --- a/src/CrashHandler.cpp +++ b/src/CrashHandler.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "CrashHandler.h" diff --git a/src/CrashHandler.h b/src/CrashHandler.h index 2ee20024..1fe5d852 100644 --- a/src/CrashHandler.h +++ b/src/CrashHandler.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CRASH_HANDLER_H #define OPENSHOT_CRASH_HANDLER_H diff --git a/src/DecklinkInput.cpp b/src/DecklinkInput.cpp index 21c4f7bb..06ca9cfb 100644 --- a/src/DecklinkInput.cpp +++ b/src/DecklinkInput.cpp @@ -6,52 +6,11 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2009 Blackmagic Design - * - * Permission is hereby granted, free of charge, to any person or organization - * obtaining a copy of the software and accompanying documentation covered by - * this license (the "Software") to use, reproduce, display, distribute, - * execute, and transmit the Software, and to prepare derivative works of the - * Software, and to permit third-parties to whom the Software is furnished to - * do so, all subject to the following: - * - * The copyright notices in the Software and this entire statement, including - * the above license grant, this restriction and the following disclaimer, - * must be included in all copies of the Software, in whole or in part, and - * all derivative works of the Software, unless such copies or derivative - * works are solely in the form of machine-executable object code generated by - * a source language processor. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// Copyright (c) 2009 Blackmagic Design +// +// SPDX-License-Identifier: LGPL-3.0-or-later +// SPDX-License-Identifier: MIT #include "DecklinkInput.h" diff --git a/src/DecklinkInput.h b/src/DecklinkInput.h index 3541811e..23bfbc4a 100644 --- a/src/DecklinkInput.h +++ b/src/DecklinkInput.h @@ -6,52 +6,11 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2009 Blackmagic Design - * - * Permission is hereby granted, free of charge, to any person or organization - * obtaining a copy of the software and accompanying documentation covered by - * this license (the "Software") to use, reproduce, display, distribute, - * execute, and transmit the Software, and to prepare derivative works of the - * Software, and to permit third-parties to whom the Software is furnished to - * do so, all subject to the following: - * - * The copyright notices in the Software and this entire statement, including - * the above license grant, this restriction and the following disclaimer, - * must be included in all copies of the Software, in whole or in part, and - * all derivative works of the Software, unless such copies or derivative - * works are solely in the form of machine-executable object code generated by - * a source language processor. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// Copyright (c) 2009 Blackmagic Design +// +// SPDX-License-Identifier: LGPL-3.0-or-later +// SPDX-License-Identifier: MIT #ifndef OPENSHOT_DECKLINK_INPUT_H #define OPENSHOT_DECKLINK_INPUT_H diff --git a/src/DecklinkOutput.cpp b/src/DecklinkOutput.cpp index 13da185f..a80441bc 100644 --- a/src/DecklinkOutput.cpp +++ b/src/DecklinkOutput.cpp @@ -6,52 +6,11 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2009 Blackmagic Design - * - * Permission is hereby granted, free of charge, to any person or organization - * obtaining a copy of the software and accompanying documentation covered by - * this license (the "Software") to use, reproduce, display, distribute, - * execute, and transmit the Software, and to prepare derivative works of the - * Software, and to permit third-parties to whom the Software is furnished to - * do so, all subject to the following: - * - * The copyright notices in the Software and this entire statement, including - * the above license grant, this restriction and the following disclaimer, - * must be included in all copies of the Software, in whole or in part, and - * all derivative works of the Software, unless such copies or derivative - * works are solely in the form of machine-executable object code generated by - * a source language processor. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// Copyright (c) 2009 Blackmagic Design +// +// SPDX-License-Identifier: LGPL-3.0-or-later +// SPDX-License-Identifier: MIT #include "DecklinkOutput.h" diff --git a/src/DecklinkOutput.h b/src/DecklinkOutput.h index 9b1618b0..207f6dbf 100644 --- a/src/DecklinkOutput.h +++ b/src/DecklinkOutput.h @@ -6,52 +6,11 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2009 Blackmagic Design - * - * Permission is hereby granted, free of charge, to any person or organization - * obtaining a copy of the software and accompanying documentation covered by - * this license (the "Software") to use, reproduce, display, distribute, - * execute, and transmit the Software, and to prepare derivative works of the - * Software, and to permit third-parties to whom the Software is furnished to - * do so, all subject to the following: - * - * The copyright notices in the Software and this entire statement, including - * the above license grant, this restriction and the following disclaimer, - * must be included in all copies of the Software, in whole or in part, and - * all derivative works of the Software, unless such copies or derivative - * works are solely in the form of machine-executable object code generated by - * a source language processor. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// Copyright (c) 2009 Blackmagic Design +// +// SPDX-License-Identifier: LGPL-3.0-or-later +// SPDX-License-Identifier: MIT #ifndef OPENSHOT_DECKLINK_OUTPUT_H #define OPENSHOT_DECKLINK_OUTPUT_H diff --git a/src/DecklinkReader.cpp b/src/DecklinkReader.cpp index 30f23fc6..dacf211f 100644 --- a/src/DecklinkReader.cpp +++ b/src/DecklinkReader.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "DecklinkReader.h" #include "Exceptions.h" diff --git a/src/DecklinkReader.h b/src/DecklinkReader.h index 1a54d2f9..75f04f97 100644 --- a/src/DecklinkReader.h +++ b/src/DecklinkReader.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_DECKLINK_READER_H #define OPENSHOT_DECKLINK_READER_H diff --git a/src/DecklinkWriter.cpp b/src/DecklinkWriter.cpp index 1bfb59a8..d72dd1e9 100644 --- a/src/DecklinkWriter.cpp +++ b/src/DecklinkWriter.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "DecklinkWriter.h" diff --git a/src/DecklinkWriter.h b/src/DecklinkWriter.h index 49691ee5..56cb8c58 100644 --- a/src/DecklinkWriter.h +++ b/src/DecklinkWriter.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_DECKLINK_WRITER_H #define OPENSHOT_DECKLINK_WRITER_H diff --git a/src/DummyReader.cpp b/src/DummyReader.cpp index 6913e3fe..34b39042 100644 --- a/src/DummyReader.cpp +++ b/src/DummyReader.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "DummyReader.h" #include "Exceptions.h" diff --git a/src/DummyReader.h b/src/DummyReader.h index 8464f8d5..2ffb893e 100644 --- a/src/DummyReader.h +++ b/src/DummyReader.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_DUMMY_READER_H #define OPENSHOT_DUMMY_READER_H diff --git a/src/EffectBase.cpp b/src/EffectBase.cpp index a475c7eb..2a6ce775 100644 --- a/src/EffectBase.cpp +++ b/src/EffectBase.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/EffectBase.h b/src/EffectBase.h index 05936500..bd217faf 100644 --- a/src/EffectBase.h +++ b/src/EffectBase.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_EFFECT_BASE_H #define OPENSHOT_EFFECT_BASE_H diff --git a/src/EffectInfo.cpp b/src/EffectInfo.cpp index c6011fbc..91be9358 100644 --- a/src/EffectInfo.cpp +++ b/src/EffectInfo.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "EffectInfo.h" diff --git a/src/EffectInfo.h b/src/EffectInfo.h index 8d487096..13b497ac 100644 --- a/src/EffectInfo.h +++ b/src/EffectInfo.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_EFFECT_INFO_H #define OPENSHOT_EFFECT_INFO_H diff --git a/src/Effects.h b/src/Effects.h index c0da0741..c1005c59 100644 --- a/src/Effects.h +++ b/src/Effects.h @@ -9,27 +9,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later /* Effects */ #include "effects/Bars.h" diff --git a/src/Enums.h b/src/Enums.h index 601b2de9..5879656c 100644 --- a/src/Enums.h +++ b/src/Enums.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_ENUMS_H #define OPENSHOT_ENUMS_H diff --git a/src/Exceptions.h b/src/Exceptions.h index de0ba64e..46614b51 100644 --- a/src/Exceptions.h +++ b/src/Exceptions.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_EXCEPTIONS_H #define OPENSHOT_EXCEPTIONS_H diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index d39f22c9..4a0849ff 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -3,34 +3,16 @@ * @brief Source file for FFmpegReader class * @author Jonathan Thomas , Fabrice Bellard * - * @ref License - */ - -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard - * (http://www.openshotstudios.com). This file is part of - * OpenShot Library (http://www.openshot.org), an open-source project - * dedicated to delivering high quality video editing and animation solutions - * to the world. - * * This file is originally based on the Libavformat API example, and then modified * by the libopenshot project. * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . + * @ref License */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard +// +// SPDX-License-Identifier: LGPL-3.0-or-later + #include "FFmpegReader.h" #include "Exceptions.h" #include "Timeline.h" diff --git a/src/FFmpegReader.h b/src/FFmpegReader.h index a5de897a..7c2c1da5 100644 --- a/src/FFmpegReader.h +++ b/src/FFmpegReader.h @@ -3,34 +3,16 @@ * @brief Header file for FFmpegReader class * @author Jonathan Thomas , Fabrice Bellard * - * @ref License - */ - -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard - * (http://www.openshotstudios.com). This file is part of - * OpenShot Library (http://www.openshot.org), an open-source project - * dedicated to delivering high quality video editing and animation solutions - * to the world. - * * This file is originally based on the Libavformat API example, and then modified * by the libopenshot project. * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . + * @ref License */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard +// +// SPDX-License-Identifier: LGPL-3.0-or-later + #ifndef OPENSHOT_FFMPEG_READER_H #define OPENSHOT_FFMPEG_READER_H diff --git a/src/FFmpegUtilities.h b/src/FFmpegUtilities.h index 42358eed..ff6af122 100644 --- a/src/FFmpegUtilities.h +++ b/src/FFmpegUtilities.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_FFMPEG_UTILITIES_H #define OPENSHOT_FFMPEG_UTILITIES_H diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp index 6043f2f3..d94dabc9 100644 --- a/src/FFmpegWriter.cpp +++ b/src/FFmpegWriter.cpp @@ -3,34 +3,16 @@ * @brief Source file for FFmpegWriter class * @author Jonathan Thomas , Fabrice Bellard * - * @ref License - */ - -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard - * (http://www.openshotstudios.com). This file is part of - * OpenShot Library (http://www.openshot.org), an open-source project - * dedicated to delivering high quality video editing and animation solutions - * to the world. - * * This file is originally based on the Libavformat API example, and then modified * by the libopenshot project. * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . + * @ref License */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard +// +// SPDX-License-Identifier: LGPL-3.0-or-later + #include "FFmpegWriter.h" #include "Exceptions.h" diff --git a/src/FFmpegWriter.h b/src/FFmpegWriter.h index 79564b5c..62f707b0 100644 --- a/src/FFmpegWriter.h +++ b/src/FFmpegWriter.h @@ -3,38 +3,15 @@ * @brief Header file for FFmpegWriter class * @author Jonathan Thomas , Fabrice Bellard * - * @ref License - */ - -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard - * (http://www.openshotstudios.com). This file is part of - * OpenShot Library (http://www.openshot.org), an open-source project - * dedicated to delivering high quality video editing and animation solutions - * to the world. - * * This file is originally based on the Libavformat API example, and then modified * by the libopenshot project. * - * OpenShot Library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . + * @ref License */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_FFMPEG_WRITER_H #define OPENSHOT_FFMPEG_WRITER_H diff --git a/src/Fraction.cpp b/src/Fraction.cpp index cb13c393..da816494 100644 --- a/src/Fraction.cpp +++ b/src/Fraction.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Fraction.h" #include diff --git a/src/Fraction.h b/src/Fraction.h index 3033cb92..e021dff9 100644 --- a/src/Fraction.h +++ b/src/Fraction.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_FRACTION_H #define OPENSHOT_FRACTION_H diff --git a/src/Frame.cpp b/src/Frame.cpp index 475c4005..59e6028c 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Frame.h" #include diff --git a/src/Frame.h b/src/Frame.h index e35ea9ca..5eabecc4 100644 --- a/src/Frame.h +++ b/src/Frame.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_FRAME_H #define OPENSHOT_FRAME_H diff --git a/src/FrameMapper.cpp b/src/FrameMapper.cpp index 687ac595..981bc548 100644 --- a/src/FrameMapper.cpp +++ b/src/FrameMapper.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/FrameMapper.h b/src/FrameMapper.h index 813c644f..9b6ad4bd 100644 --- a/src/FrameMapper.h +++ b/src/FrameMapper.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_FRAMEMAPPER_H #define OPENSHOT_FRAMEMAPPER_H diff --git a/src/ImageReader.cpp b/src/ImageReader.cpp index a4c21b80..c5bf81d5 100644 --- a/src/ImageReader.cpp +++ b/src/ImageReader.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later // Require ImageMagick support #ifdef USE_IMAGEMAGICK diff --git a/src/ImageReader.h b/src/ImageReader.h index a6ab1027..d123f33b 100644 --- a/src/ImageReader.h +++ b/src/ImageReader.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_IMAGE_READER_H #define OPENSHOT_IMAGE_READER_H diff --git a/src/ImageWriter.cpp b/src/ImageWriter.cpp index 78b0d1a9..eb98d7e7 100644 --- a/src/ImageWriter.cpp +++ b/src/ImageWriter.cpp @@ -6,30 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard - * (http://www.openshotstudios.com). This file is part of - * OpenShot Library (http://www.openshot.org), an open-source project - * dedicated to delivering high quality video editing and animation solutions - * to the world. - * - * This file is originally based on the Libavformat API example, and then modified - * by the libopenshot project. - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard +// +// SPDX-License-Identifier: LGPL-3.0-or-later //Require ImageMagick support #ifdef USE_IMAGEMAGICK diff --git a/src/ImageWriter.h b/src/ImageWriter.h index be12e5d1..dd2d2b8a 100644 --- a/src/ImageWriter.h +++ b/src/ImageWriter.h @@ -6,34 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard - * (http://www.openshotstudios.com). This file is part of - * OpenShot Library (http://www.openshot.org), an open-source project - * dedicated to delivering high quality video editing and animation solutions - * to the world. - * - * This file is originally based on the Libavformat API example, and then modified - * by the libopenshot project. - * - * OpenShot Library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC, Fabrice Bellard +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_IMAGE_WRITER_H #define OPENSHOT_IMAGE_WRITER_H diff --git a/src/Json.cpp b/src/Json.cpp index ee3d06ba..288552a6 100644 --- a/src/Json.cpp +++ b/src/Json.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Json.h" #include "Exceptions.h" diff --git a/src/Json.h b/src/Json.h index 9837f216..a12b1e99 100644 --- a/src/Json.h +++ b/src/Json.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_JSON_H #define OPENSHOT_JSON_H diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index d5229a64..8e278c00 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "KeyFrame.h" #include "Exceptions.h" diff --git a/src/KeyFrame.h b/src/KeyFrame.h index 45624dd2..bbe9024c 100644 --- a/src/KeyFrame.h +++ b/src/KeyFrame.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_KEYFRAME_H #define OPENSHOT_KEYFRAME_H diff --git a/src/MagickUtilities.h b/src/MagickUtilities.h index 953b85ee..bb3e832d 100644 --- a/src/MagickUtilities.h +++ b/src/MagickUtilities.h @@ -5,27 +5,9 @@ * @author FeRD (Frank Dana) */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_MAGICK_UTILITIES_H #define OPENSHOT_MAGICK_UTILITIES_H diff --git a/src/OpenCVUtilities.h b/src/OpenCVUtilities.h index 1c5793ec..e227fe72 100644 --- a/src/OpenCVUtilities.h +++ b/src/OpenCVUtilities.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2021 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2021 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_OPENCV_UTILITIES_H #define OPENSHOT_OPENCV_UTILITIES_H diff --git a/src/OpenMPUtilities.h b/src/OpenMPUtilities.h index 4d4cc2cc..43932542 100644 --- a/src/OpenMPUtilities.h +++ b/src/OpenMPUtilities.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_OPENMP_UTILITIES_H #define OPENSHOT_OPENMP_UTILITIES_H diff --git a/src/OpenShot.h b/src/OpenShot.h index f6c80c42..d9b63355 100644 --- a/src/OpenShot.h +++ b/src/OpenShot.h @@ -1,5 +1,6 @@ -#ifndef OPENSHOT_H -#define OPENSHOT_H +// Copyright (c) 2008-2021 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later /** * @file @@ -95,6 +96,9 @@ * along with OpenShot Library. If not, see . */ +#ifndef OPENSHOT_H +#define OPENSHOT_H + // Include the version number of OpenShot Library #include "OpenShotVersion.h" diff --git a/src/OpenShotVersion.cpp b/src/OpenShotVersion.cpp index 1bc73c3a..c0bdaaba 100644 --- a/src/OpenShotVersion.cpp +++ b/src/OpenShotVersion.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "OpenShotVersion.h" diff --git a/src/OpenShotVersion.h.in b/src/OpenShotVersion.h.in index b6f41890..1926315d 100644 --- a/src/OpenShotVersion.h.in +++ b/src/OpenShotVersion.h.in @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_VERSION_H #define OPENSHOT_VERSION_H diff --git a/src/PlayerBase.cpp b/src/PlayerBase.cpp index 844b8d60..0c95e07c 100644 --- a/src/PlayerBase.cpp +++ b/src/PlayerBase.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "PlayerBase.h" diff --git a/src/PlayerBase.h b/src/PlayerBase.h index aa34c5d2..abce1e19 100644 --- a/src/PlayerBase.h +++ b/src/PlayerBase.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_PLAYER_BASE_H #define OPENSHOT_PLAYER_BASE_H diff --git a/src/Point.cpp b/src/Point.cpp index b11aa7ce..8e7e5472 100644 --- a/src/Point.cpp +++ b/src/Point.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Point.h" #include "Exceptions.h" diff --git a/src/Point.h b/src/Point.h index 118e6d39..fb64178b 100644 --- a/src/Point.h +++ b/src/Point.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_POINT_H #define OPENSHOT_POINT_H diff --git a/src/ProcessingController.h b/src/ProcessingController.h index 24d501e3..14bcb6ab 100644 --- a/src/ProcessingController.h +++ b/src/ProcessingController.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_PROCESSINGCONTROLLER_H #define OPENSHOT_PROCESSINGCONTROLLER_H diff --git a/src/Profiles.cpp b/src/Profiles.cpp index 529bf3cd..84329910 100644 --- a/src/Profiles.cpp +++ b/src/Profiles.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Profiles.h" #include "Exceptions.h" diff --git a/src/Profiles.h b/src/Profiles.h index 383051e0..c831df8c 100644 --- a/src/Profiles.h +++ b/src/Profiles.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_PROFILE_H #define OPENSHOT_PROFILE_H diff --git a/src/Qt/AudioPlaybackThread.cpp b/src/Qt/AudioPlaybackThread.cpp index 178642f6..be2585e6 100644 --- a/src/Qt/AudioPlaybackThread.cpp +++ b/src/Qt/AudioPlaybackThread.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "AudioPlaybackThread.h" diff --git a/src/Qt/AudioPlaybackThread.h b/src/Qt/AudioPlaybackThread.h index bf9aaf32..1ae460dd 100644 --- a/src/Qt/AudioPlaybackThread.h +++ b/src/Qt/AudioPlaybackThread.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_AUDIO_PLAYBACK_THREAD_H #define OPENSHOT_AUDIO_PLAYBACK_THREAD_H diff --git a/src/Qt/PlayerDemo.cpp b/src/Qt/PlayerDemo.cpp index bd5e45aa..cc90bcd1 100644 --- a/src/Qt/PlayerDemo.cpp +++ b/src/Qt/PlayerDemo.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include diff --git a/src/Qt/PlayerDemo.h b/src/Qt/PlayerDemo.h index 8dca83fc..d3f3c529 100644 --- a/src/Qt/PlayerDemo.h +++ b/src/Qt/PlayerDemo.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_PLAYER_DEMO_H #define OPENSHOT_PLAYER_DEMO_H diff --git a/src/Qt/PlayerPrivate.cpp b/src/Qt/PlayerPrivate.cpp index 879c7421..40de28fd 100644 --- a/src/Qt/PlayerPrivate.cpp +++ b/src/Qt/PlayerPrivate.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "PlayerPrivate.h" #include "Exceptions.h" diff --git a/src/Qt/PlayerPrivate.h b/src/Qt/PlayerPrivate.h index e403c10e..75c984a3 100644 --- a/src/Qt/PlayerPrivate.h +++ b/src/Qt/PlayerPrivate.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_PLAYER_PRIVATE_H #define OPENSHOT_PLAYER_PRIVATE_H diff --git a/src/Qt/VideoCacheThread.cpp b/src/Qt/VideoCacheThread.cpp index 6c4f1ac0..7d37fa59 100644 --- a/src/Qt/VideoCacheThread.cpp +++ b/src/Qt/VideoCacheThread.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "VideoCacheThread.h" #include "Exceptions.h" diff --git a/src/Qt/VideoCacheThread.h b/src/Qt/VideoCacheThread.h index 1ab3b193..88abafbf 100644 --- a/src/Qt/VideoCacheThread.h +++ b/src/Qt/VideoCacheThread.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_VIDEO_CACHE_THREAD_H #define OPENSHOT_VIDEO_CACHE_THREAD_H diff --git a/src/Qt/VideoPlaybackThread.cpp b/src/Qt/VideoPlaybackThread.cpp index 01e2871b..16019911 100644 --- a/src/Qt/VideoPlaybackThread.cpp +++ b/src/Qt/VideoPlaybackThread.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "VideoPlaybackThread.h" diff --git a/src/Qt/VideoPlaybackThread.h b/src/Qt/VideoPlaybackThread.h index 753c7778..ccb912c0 100644 --- a/src/Qt/VideoPlaybackThread.h +++ b/src/Qt/VideoPlaybackThread.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_VIDEO_PLAYBACK_THREAD_H #define OPENSHOT_VIDEO_PLAYBACK_THREAD_H diff --git a/src/Qt/VideoRenderWidget.cpp b/src/Qt/VideoRenderWidget.cpp index 52898372..8ed7f35d 100644 --- a/src/Qt/VideoRenderWidget.cpp +++ b/src/Qt/VideoRenderWidget.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "VideoRenderWidget.h" #include diff --git a/src/Qt/VideoRenderWidget.h b/src/Qt/VideoRenderWidget.h index 4d9ac17f..782ceafd 100644 --- a/src/Qt/VideoRenderWidget.h +++ b/src/Qt/VideoRenderWidget.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_VIDEO_RENDERER_WIDGET_H #define OPENSHOT_VIDEO_RENDERER_WIDGET_H diff --git a/src/Qt/VideoRenderer.cpp b/src/Qt/VideoRenderer.cpp index e70e8545..f835d6ec 100644 --- a/src/Qt/VideoRenderer.cpp +++ b/src/Qt/VideoRenderer.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "VideoRenderer.h" diff --git a/src/Qt/VideoRenderer.h b/src/Qt/VideoRenderer.h index 1bdbfac3..21c6d946 100644 --- a/src/Qt/VideoRenderer.h +++ b/src/Qt/VideoRenderer.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_VIDEO_RENDERER_H #define OPENSHOT_VIDEO_RENDERER_H diff --git a/src/QtHtmlReader.cpp b/src/QtHtmlReader.cpp index f14bcfa0..3493ef8a 100644 --- a/src/QtHtmlReader.cpp +++ b/src/QtHtmlReader.cpp @@ -8,27 +8,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "QtHtmlReader.h" #include "Exceptions.h" diff --git a/src/QtHtmlReader.h b/src/QtHtmlReader.h index fa200843..8a960fa1 100644 --- a/src/QtHtmlReader.h +++ b/src/QtHtmlReader.h @@ -8,27 +8,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_QT_HTML_READER_H #define OPENSHOT_QT_HTML_READER_H diff --git a/src/QtImageReader.cpp b/src/QtImageReader.cpp index 1800a0f2..46655137 100644 --- a/src/QtImageReader.cpp +++ b/src/QtImageReader.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "QtImageReader.h" #include "Exceptions.h" diff --git a/src/QtImageReader.h b/src/QtImageReader.h index 687e85e1..ba8beba6 100644 --- a/src/QtImageReader.h +++ b/src/QtImageReader.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_QIMAGE_READER_H #define OPENSHOT_QIMAGE_READER_H diff --git a/src/QtPlayer.cpp b/src/QtPlayer.cpp index f3697f71..1b80e78c 100644 --- a/src/QtPlayer.cpp +++ b/src/QtPlayer.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Clip.h" #include "FFmpegReader.h" diff --git a/src/QtPlayer.h b/src/QtPlayer.h index 7ddf6ada..bf179ea1 100644 --- a/src/QtPlayer.h +++ b/src/QtPlayer.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_QT_PLAYER_H #define OPENSHOT_QT_PLAYER_H diff --git a/src/QtTextReader.cpp b/src/QtTextReader.cpp index 00627e1c..6180a578 100644 --- a/src/QtTextReader.cpp +++ b/src/QtTextReader.cpp @@ -8,27 +8,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "QtTextReader.h" #include "Exceptions.h" diff --git a/src/QtTextReader.h b/src/QtTextReader.h index db4c73fb..46d6f4da 100644 --- a/src/QtTextReader.h +++ b/src/QtTextReader.h @@ -8,27 +8,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_QT_TEXT_READER_H #define OPENSHOT_QT_TEXT_READER_H diff --git a/src/QtUtilities.h b/src/QtUtilities.h index 3f9637d9..f2e36ffc 100644 --- a/src/QtUtilities.h +++ b/src/QtUtilities.h @@ -4,27 +4,9 @@ * @author FeRD (Frank Dana) */ -/* LICENSE - * - * Copyright (c) 2008-2020 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2020 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_QT_UTILITIES_H #define OPENSHOT_QT_UTILITIES_H diff --git a/src/ReaderBase.cpp b/src/ReaderBase.cpp index 63b5cada..755dbc4c 100644 --- a/src/ReaderBase.cpp +++ b/src/ReaderBase.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/ReaderBase.h b/src/ReaderBase.h index 4d2d3afa..5388aa78 100644 --- a/src/ReaderBase.h +++ b/src/ReaderBase.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_READER_BASE_H #define OPENSHOT_READER_BASE_H diff --git a/src/RendererBase.cpp b/src/RendererBase.cpp index ca9ad26e..c172600a 100644 --- a/src/RendererBase.cpp +++ b/src/RendererBase.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "RendererBase.h" using namespace openshot; diff --git a/src/RendererBase.h b/src/RendererBase.h index 5e65ea87..a7e0363e 100644 --- a/src/RendererBase.h +++ b/src/RendererBase.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_RENDERER_BASE_H #define OPENSHOT_RENDERER_BASE_H diff --git a/src/Settings.cpp b/src/Settings.cpp index 688eaae3..b5c0511e 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include // For std::getenv diff --git a/src/Settings.h b/src/Settings.h index e21822a0..938a19db 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_SETTINGS_H #define OPENSHOT_SETTINGS_H diff --git a/src/TextReader.cpp b/src/TextReader.cpp index 9ef8142f..60d07e9b 100644 --- a/src/TextReader.cpp +++ b/src/TextReader.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later // Require ImageMagick support #ifdef USE_IMAGEMAGICK diff --git a/src/TextReader.h b/src/TextReader.h index 4a440a8a..f55d4863 100644 --- a/src/TextReader.h +++ b/src/TextReader.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_TEXT_READER_H #define OPENSHOT_TEXT_READER_H diff --git a/src/Timeline.cpp b/src/Timeline.cpp index bfc100bd..8397c1e5 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Timeline.h" diff --git a/src/Timeline.h b/src/Timeline.h index 3a696bfa..39137c0c 100644 --- a/src/Timeline.h +++ b/src/Timeline.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_TIMELINE_H #define OPENSHOT_TIMELINE_H diff --git a/src/TimelineBase.cpp b/src/TimelineBase.cpp index 120de01b..a3ca1cb2 100644 --- a/src/TimelineBase.cpp +++ b/src/TimelineBase.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "TimelineBase.h" diff --git a/src/TimelineBase.h b/src/TimelineBase.h index 0fc70c74..87ccd1d4 100644 --- a/src/TimelineBase.h +++ b/src/TimelineBase.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_TIMELINE_BASE_H #define OPENSHOT_TIMELINE_BASE_H diff --git a/src/TrackedObjectBBox.cpp b/src/TrackedObjectBBox.cpp index e577e4d0..6fa6985b 100644 --- a/src/TrackedObjectBBox.cpp +++ b/src/TrackedObjectBBox.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "TrackedObjectBBox.h" diff --git a/src/TrackedObjectBBox.h b/src/TrackedObjectBBox.h index d7a7b7ce..1569e566 100644 --- a/src/TrackedObjectBBox.h +++ b/src/TrackedObjectBBox.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_TRACKEDOBJECTBBOX_H #define OPENSHOT_TRACKEDOBJECTBBOX_H diff --git a/src/TrackedObjectBase.cpp b/src/TrackedObjectBase.cpp index b1f5aae0..f268ab99 100644 --- a/src/TrackedObjectBase.cpp +++ b/src/TrackedObjectBase.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "TrackedObjectBase.h" diff --git a/src/TrackedObjectBase.h b/src/TrackedObjectBase.h index 110c277c..07c2a3ba 100644 --- a/src/TrackedObjectBase.h +++ b/src/TrackedObjectBase.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_TRACKEDOBJECTBASE_H #define OPENSHOT_TRACKEDOBJECTBASE_H diff --git a/src/WriterBase.cpp b/src/WriterBase.cpp index 8faab981..23534df1 100644 --- a/src/WriterBase.cpp +++ b/src/WriterBase.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/WriterBase.h b/src/WriterBase.h index 3939ca6e..0b928815 100644 --- a/src/WriterBase.h +++ b/src/WriterBase.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_WRITER_BASE_H #define OPENSHOT_WRITER_BASE_H diff --git a/src/ZmqLogger.cpp b/src/ZmqLogger.cpp index 4d8d8be6..0b195790 100644 --- a/src/ZmqLogger.cpp +++ b/src/ZmqLogger.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "ZmqLogger.h" #include "Exceptions.h" diff --git a/src/ZmqLogger.h b/src/ZmqLogger.h index da56a199..a12b9ce4 100644 --- a/src/ZmqLogger.h +++ b/src/ZmqLogger.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_LOGGER_H #define OPENSHOT_LOGGER_H diff --git a/src/audio_effects/Compressor.cpp b/src/audio_effects/Compressor.cpp index b0cb34e0..baad073a 100644 --- a/src/audio_effects/Compressor.cpp +++ b/src/audio_effects/Compressor.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Compressor.h" #include "Exceptions.h" diff --git a/src/audio_effects/Compressor.h b/src/audio_effects/Compressor.h index 7dcdb252..e6f1f45c 100644 --- a/src/audio_effects/Compressor.h +++ b/src/audio_effects/Compressor.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_COMPRESSOR_AUDIO_EFFECT_H #define OPENSHOT_COMPRESSOR_AUDIO_EFFECT_H diff --git a/src/audio_effects/Delay.cpp b/src/audio_effects/Delay.cpp index 467ba756..3c432c8c 100644 --- a/src/audio_effects/Delay.cpp +++ b/src/audio_effects/Delay.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Delay.h" #include "Exceptions.h" diff --git a/src/audio_effects/Delay.h b/src/audio_effects/Delay.h index a693c292..79f230f0 100644 --- a/src/audio_effects/Delay.h +++ b/src/audio_effects/Delay.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_DELAY_AUDIO_EFFECT_H #define OPENSHOT_DELAY_AUDIO_EFFECT_H diff --git a/src/audio_effects/Distortion.cpp b/src/audio_effects/Distortion.cpp index 1f4d58b6..a21e790a 100644 --- a/src/audio_effects/Distortion.cpp +++ b/src/audio_effects/Distortion.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Distortion.h" #include "Exceptions.h" diff --git a/src/audio_effects/Distortion.h b/src/audio_effects/Distortion.h index 8163a075..3125a59a 100644 --- a/src/audio_effects/Distortion.h +++ b/src/audio_effects/Distortion.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_DISTORTION_AUDIO_EFFECT_H #define OPENSHOT_DISTORTION_AUDIO_EFFECT_H diff --git a/src/audio_effects/Echo.cpp b/src/audio_effects/Echo.cpp index 442a5df1..a58bed15 100644 --- a/src/audio_effects/Echo.cpp +++ b/src/audio_effects/Echo.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Echo.h" #include "Exceptions.h" diff --git a/src/audio_effects/Echo.h b/src/audio_effects/Echo.h index 9a120b6e..597ec180 100644 --- a/src/audio_effects/Echo.h +++ b/src/audio_effects/Echo.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_ECHO_AUDIO_EFFECT_H #define OPENSHOT_ECHO_AUDIO_EFFECT_H diff --git a/src/audio_effects/Expander.cpp b/src/audio_effects/Expander.cpp index 3d60974f..2c023de2 100644 --- a/src/audio_effects/Expander.cpp +++ b/src/audio_effects/Expander.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Expander.h" #include "Exceptions.h" diff --git a/src/audio_effects/Expander.h b/src/audio_effects/Expander.h index 4eee84af..921cd055 100644 --- a/src/audio_effects/Expander.h +++ b/src/audio_effects/Expander.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_EXPANDER_AUDIO_EFFECT_H #define OPENSHOT_EXPANDER_AUDIO_EFFECT_H diff --git a/src/audio_effects/Noise.cpp b/src/audio_effects/Noise.cpp index 5a329ba6..5347ea12 100644 --- a/src/audio_effects/Noise.cpp +++ b/src/audio_effects/Noise.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Noise.h" #include "Exceptions.h" diff --git a/src/audio_effects/Noise.h b/src/audio_effects/Noise.h index 9de41458..c3c7a264 100644 --- a/src/audio_effects/Noise.h +++ b/src/audio_effects/Noise.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_NOISE_AUDIO_EFFECT_H #define OPENSHOT_NOISE_AUDIO_EFFECT_H diff --git a/src/audio_effects/ParametricEQ.cpp b/src/audio_effects/ParametricEQ.cpp index 87997b86..096db51f 100644 --- a/src/audio_effects/ParametricEQ.cpp +++ b/src/audio_effects/ParametricEQ.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "ParametricEQ.h" #include "Exceptions.h" diff --git a/src/audio_effects/ParametricEQ.h b/src/audio_effects/ParametricEQ.h index d131d98d..0ba5b582 100644 --- a/src/audio_effects/ParametricEQ.h +++ b/src/audio_effects/ParametricEQ.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_PARAMETRIC_EQ_AUDIO_EFFECT_H #define OPENSHOT_PARAMETRIC_EQ_AUDIO_EFFECT_H diff --git a/src/audio_effects/Robotization.cpp b/src/audio_effects/Robotization.cpp index d1687150..be3aeccd 100644 --- a/src/audio_effects/Robotization.cpp +++ b/src/audio_effects/Robotization.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Robotization.h" #include "Exceptions.h" diff --git a/src/audio_effects/Robotization.h b/src/audio_effects/Robotization.h index 88a61116..02dc6a4b 100644 --- a/src/audio_effects/Robotization.h +++ b/src/audio_effects/Robotization.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_ROBOTIZATION_AUDIO_EFFECT_H #define OPENSHOT_ROBOTIZATION_AUDIO_EFFECT_H diff --git a/src/audio_effects/STFT.cpp b/src/audio_effects/STFT.cpp index 3b87e6e3..043b2134 100644 --- a/src/audio_effects/STFT.cpp +++ b/src/audio_effects/STFT.cpp @@ -1,3 +1,7 @@ +// © OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later + #include "STFT.h" using namespace openshot; diff --git a/src/audio_effects/STFT.h b/src/audio_effects/STFT.h index 71f71a78..9cd1505d 100644 --- a/src/audio_effects/STFT.h +++ b/src/audio_effects/STFT.h @@ -1,3 +1,7 @@ +// © OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later + #pragma once #ifndef OPENSHOT_STFT_AUDIO_EFFECT_H diff --git a/src/audio_effects/Whisperization.cpp b/src/audio_effects/Whisperization.cpp index 7c235e26..aff1f8d0 100644 --- a/src/audio_effects/Whisperization.cpp +++ b/src/audio_effects/Whisperization.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Whisperization.h" #include "Exceptions.h" diff --git a/src/audio_effects/Whisperization.h b/src/audio_effects/Whisperization.h index 5659a861..b5a4ae1e 100644 --- a/src/audio_effects/Whisperization.h +++ b/src/audio_effects/Whisperization.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_WHISPERIZATION_AUDIO_EFFECT_H #define OPENSHOT_WHISPERIZATION_AUDIO_EFFECT_H diff --git a/src/effects/Bars.cpp b/src/effects/Bars.cpp index 6f80b94e..daec750d 100644 --- a/src/effects/Bars.cpp +++ b/src/effects/Bars.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Bars.h" #include "Exceptions.h" diff --git a/src/effects/Bars.h b/src/effects/Bars.h index b55ccc46..8ea5f1da 100644 --- a/src/effects/Bars.h +++ b/src/effects/Bars.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_BARS_EFFECT_H #define OPENSHOT_BARS_EFFECT_H diff --git a/src/effects/Blur.cpp b/src/effects/Blur.cpp index 169286cb..6d4dc483 100644 --- a/src/effects/Blur.cpp +++ b/src/effects/Blur.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Blur.h" #include "Exceptions.h" diff --git a/src/effects/Blur.h b/src/effects/Blur.h index 180f1ebd..fbf9da25 100644 --- a/src/effects/Blur.h +++ b/src/effects/Blur.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_BLUR_EFFECT_H #define OPENSHOT_BLUR_EFFECT_H diff --git a/src/effects/Brightness.cpp b/src/effects/Brightness.cpp index 4b80f9d7..8b2ddc87 100644 --- a/src/effects/Brightness.cpp +++ b/src/effects/Brightness.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Brightness.h" #include "Exceptions.h" diff --git a/src/effects/Brightness.h b/src/effects/Brightness.h index 7cb3b146..d63dc2fc 100644 --- a/src/effects/Brightness.h +++ b/src/effects/Brightness.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_BRIGHTNESS_EFFECT_H #define OPENSHOT_BRIGHTNESS_EFFECT_H diff --git a/src/effects/Caption.cpp b/src/effects/Caption.cpp index a19b8e2d..eda75aeb 100644 --- a/src/effects/Caption.cpp +++ b/src/effects/Caption.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Caption.h" #include "Exceptions.h" diff --git a/src/effects/Caption.h b/src/effects/Caption.h index 9fa869a3..1e99cabd 100644 --- a/src/effects/Caption.h +++ b/src/effects/Caption.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CAPTION_EFFECT_H #define OPENSHOT_CAPTION_EFFECT_H diff --git a/src/effects/ChromaKey.cpp b/src/effects/ChromaKey.cpp index 7eb4aa34..5ffa8ea8 100644 --- a/src/effects/ChromaKey.cpp +++ b/src/effects/ChromaKey.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "ChromaKey.h" #include "Exceptions.h" diff --git a/src/effects/ChromaKey.h b/src/effects/ChromaKey.h index f66f1309..f6149ec9 100644 --- a/src/effects/ChromaKey.h +++ b/src/effects/ChromaKey.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CHROMAKEY_EFFECT_H #define OPENSHOT_CHROMAKEY_EFFECT_H diff --git a/src/effects/ColorShift.cpp b/src/effects/ColorShift.cpp index 6b1323e3..8067fe53 100644 --- a/src/effects/ColorShift.cpp +++ b/src/effects/ColorShift.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "ColorShift.h" #include "Exceptions.h" diff --git a/src/effects/ColorShift.h b/src/effects/ColorShift.h index 98c62674..97d727ed 100644 --- a/src/effects/ColorShift.h +++ b/src/effects/ColorShift.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_COLOR_SHIFT_EFFECT_H #define OPENSHOT_COLOR_SHIFT_EFFECT_H diff --git a/src/effects/Crop.cpp b/src/effects/Crop.cpp index 5ef78520..592bc4e0 100644 --- a/src/effects/Crop.cpp +++ b/src/effects/Crop.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Crop.h" #include "Exceptions.h" diff --git a/src/effects/Crop.h b/src/effects/Crop.h index a09c1257..5961641e 100644 --- a/src/effects/Crop.h +++ b/src/effects/Crop.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_CROP_EFFECT_H #define OPENSHOT_CROP_EFFECT_H diff --git a/src/effects/Deinterlace.cpp b/src/effects/Deinterlace.cpp index 870f4a88..a665679b 100644 --- a/src/effects/Deinterlace.cpp +++ b/src/effects/Deinterlace.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Deinterlace.h" #include "Exceptions.h" diff --git a/src/effects/Deinterlace.h b/src/effects/Deinterlace.h index 5c1230c7..8826711c 100644 --- a/src/effects/Deinterlace.h +++ b/src/effects/Deinterlace.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_DEINTERLACE_EFFECT_H #define OPENSHOT_DEINTERLACE_EFFECT_H diff --git a/src/effects/Hue.cpp b/src/effects/Hue.cpp index 29db7c53..9bc84b5c 100644 --- a/src/effects/Hue.cpp +++ b/src/effects/Hue.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Hue.h" #include "Exceptions.h" diff --git a/src/effects/Hue.h b/src/effects/Hue.h index e35c9ece..61599a91 100644 --- a/src/effects/Hue.h +++ b/src/effects/Hue.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_HUE_EFFECT_H #define OPENSHOT_HUE_EFFECT_H diff --git a/src/effects/Mask.cpp b/src/effects/Mask.cpp index 0d5d335e..2c46a359 100644 --- a/src/effects/Mask.cpp +++ b/src/effects/Mask.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Mask.h" #include "Exceptions.h" diff --git a/src/effects/Mask.h b/src/effects/Mask.h index 86d5a38b..36748dd0 100644 --- a/src/effects/Mask.h +++ b/src/effects/Mask.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_MASK_EFFECT_H #define OPENSHOT_MASK_EFFECT_H diff --git a/src/effects/Negate.cpp b/src/effects/Negate.cpp index 50db5f2f..c22d91b1 100644 --- a/src/effects/Negate.cpp +++ b/src/effects/Negate.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Negate.h" #include "Exceptions.h" diff --git a/src/effects/Negate.h b/src/effects/Negate.h index 591a84fc..2799fdbf 100644 --- a/src/effects/Negate.h +++ b/src/effects/Negate.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_NEGATE_EFFECT_H #define OPENSHOT_NEGATE_EFFECT_H diff --git a/src/effects/ObjectDetection.cpp b/src/effects/ObjectDetection.cpp index b279a6fc..5bbc3ac2 100644 --- a/src/effects/ObjectDetection.cpp +++ b/src/effects/ObjectDetection.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/effects/ObjectDetection.h b/src/effects/ObjectDetection.h index 50e39308..fb49e983 100644 --- a/src/effects/ObjectDetection.h +++ b/src/effects/ObjectDetection.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_OBJECT_DETECTION_EFFECT_H #define OPENSHOT_OBJECT_DETECTION_EFFECT_H diff --git a/src/effects/Pixelate.cpp b/src/effects/Pixelate.cpp index a6809792..b1108d1a 100644 --- a/src/effects/Pixelate.cpp +++ b/src/effects/Pixelate.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Pixelate.h" #include "Exceptions.h" diff --git a/src/effects/Pixelate.h b/src/effects/Pixelate.h index 453c33eb..fec9a51b 100644 --- a/src/effects/Pixelate.h +++ b/src/effects/Pixelate.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_PIXELATE_EFFECT_H #define OPENSHOT_PIXELATE_EFFECT_H diff --git a/src/effects/Saturation.cpp b/src/effects/Saturation.cpp index 4b9f1241..f242ee14 100644 --- a/src/effects/Saturation.cpp +++ b/src/effects/Saturation.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Saturation.h" #include "Exceptions.h" diff --git a/src/effects/Saturation.h b/src/effects/Saturation.h index cfa945fc..b8861961 100644 --- a/src/effects/Saturation.h +++ b/src/effects/Saturation.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_SATURATION_EFFECT_H #define OPENSHOT_SATURATION_EFFECT_H diff --git a/src/effects/Shift.cpp b/src/effects/Shift.cpp index 0a9c496d..66b03eb9 100644 --- a/src/effects/Shift.cpp +++ b/src/effects/Shift.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Shift.h" #include "Exceptions.h" diff --git a/src/effects/Shift.h b/src/effects/Shift.h index d7b96416..1a9e974a 100644 --- a/src/effects/Shift.h +++ b/src/effects/Shift.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_SHIFT_EFFECT_H #define OPENSHOT_SHIFT_EFFECT_H diff --git a/src/effects/Stabilizer.cpp b/src/effects/Stabilizer.cpp index 576ab883..9884e80c 100644 --- a/src/effects/Stabilizer.cpp +++ b/src/effects/Stabilizer.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/effects/Stabilizer.h b/src/effects/Stabilizer.h index 1291fb73..63b00af3 100644 --- a/src/effects/Stabilizer.h +++ b/src/effects/Stabilizer.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_STABILIZER_EFFECT_H #define OPENSHOT_STABILIZER_EFFECT_H diff --git a/src/effects/Tracker.cpp b/src/effects/Tracker.cpp index 01537f77..f4f82e0b 100644 --- a/src/effects/Tracker.cpp +++ b/src/effects/Tracker.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/src/effects/Tracker.h b/src/effects/Tracker.h index 645e1d52..41f4aa5e 100644 --- a/src/effects/Tracker.h +++ b/src/effects/Tracker.h @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_TRACKER_EFFECT_H #define OPENSHOT_TRACKER_EFFECT_H diff --git a/src/effects/Wave.cpp b/src/effects/Wave.cpp index 07e0372a..9287fe0b 100644 --- a/src/effects/Wave.cpp +++ b/src/effects/Wave.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "Wave.h" #include "Exceptions.h" diff --git a/src/effects/Wave.h b/src/effects/Wave.h index 8ccd815a..482b1b22 100644 --- a/src/effects/Wave.h +++ b/src/effects/Wave.h @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef OPENSHOT_WAVE_EFFECT_H #define OPENSHOT_WAVE_EFFECT_H diff --git a/src/protobuf_messages/CMakeLists.txt b/src/protobuf_messages/CMakeLists.txt index 6577424d..2132fc12 100644 --- a/src/protobuf_messages/CMakeLists.txt +++ b/src/protobuf_messages/CMakeLists.txt @@ -6,24 +6,8 @@ # @section LICENSE # # Copyright (c) 2008-2020 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ +# SPDX-License-Identifier: LGPL-3.0-or-later # Dependencies find_package(Protobuf 3 REQUIRED) diff --git a/src/protobuf_messages/objdetectdata.proto b/src/protobuf_messages/objdetectdata.proto index 272ffb4f..057a63f4 100644 --- a/src/protobuf_messages/objdetectdata.proto +++ b/src/protobuf_messages/objdetectdata.proto @@ -1,3 +1,6 @@ +// © OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later // [START declaration] syntax = "proto3"; diff --git a/src/protobuf_messages/stabilizedata.proto b/src/protobuf_messages/stabilizedata.proto index 13a4b08c..7795f423 100644 --- a/src/protobuf_messages/stabilizedata.proto +++ b/src/protobuf_messages/stabilizedata.proto @@ -1,3 +1,6 @@ +// © OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later // [START declaration] syntax = "proto3"; diff --git a/src/protobuf_messages/trackerdata.proto b/src/protobuf_messages/trackerdata.proto index 24b35bb6..df53ec9d 100644 --- a/src/protobuf_messages/trackerdata.proto +++ b/src/protobuf_messages/trackerdata.proto @@ -1,3 +1,6 @@ +// © OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later // [START declaration] syntax = "proto3"; diff --git a/src/sort_filter/Hungarian.cpp b/src/sort_filter/Hungarian.cpp index 9eef6139..543ee5c5 100644 --- a/src/sort_filter/Hungarian.cpp +++ b/src/sort_filter/Hungarian.cpp @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2016 Cong Ma +// +// SPDX-License-Identifier: BSD-3-Clause + /////////////////////////////////////////////////////////////////////////////// // Hungarian.cpp: Implementation file for Class HungarianAlgorithm. // diff --git a/src/sort_filter/Hungarian.h b/src/sort_filter/Hungarian.h index ae59d06e..ef3e9820 100644 --- a/src/sort_filter/Hungarian.h +++ b/src/sort_filter/Hungarian.h @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2016 Cong Ma +// +// SPDX-License-Identifier: BSD-3-Clause + /////////////////////////////////////////////////////////////////////////////// // Hungarian.h: Header file for Class HungarianAlgorithm. // diff --git a/src/sort_filter/KalmanTracker.cpp b/src/sort_filter/KalmanTracker.cpp index 9e386202..083f3b1e 100644 --- a/src/sort_filter/KalmanTracker.cpp +++ b/src/sort_filter/KalmanTracker.cpp @@ -1,3 +1,7 @@ +// © OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later + /////////////////////////////////////////////////////////////////////////////// // KalmanTracker.cpp: KalmanTracker Class Implementation Declaration diff --git a/src/sort_filter/KalmanTracker.h b/src/sort_filter/KalmanTracker.h index 65e186c0..4c55c4c0 100644 --- a/src/sort_filter/KalmanTracker.h +++ b/src/sort_filter/KalmanTracker.h @@ -1,3 +1,7 @@ +// © OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later + /////////////////////////////////////////////////////////////////////////////// // KalmanTracker.h: KalmanTracker Class Declaration diff --git a/src/sort_filter/sort.cpp b/src/sort_filter/sort.cpp index 0958dcba..611eeea4 100644 --- a/src/sort_filter/sort.cpp +++ b/src/sort_filter/sort.cpp @@ -1,3 +1,7 @@ +// © OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later + #include "sort.hpp" using namespace std; diff --git a/src/sort_filter/sort.hpp b/src/sort_filter/sort.hpp index ba9a2d7a..6d7f22e2 100644 --- a/src/sort_filter/sort.hpp +++ b/src/sort_filter/sort.hpp @@ -1,3 +1,6 @@ +// © OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include "KalmanTracker.h" #include "Hungarian.h" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 822c4362..af63e81a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,24 +5,8 @@ # @section LICENSE # # Copyright (c) 2008-2019 OpenShot Studios, LLC -# . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the -# world. For more information visit . # -# OpenShot Library (libopenshot) is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# OpenShot Library (libopenshot) is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with OpenShot Library. If not, see . -################################################################################ +# SPDX-License-Identifier: LGPL-3.0-or-later # Allow spaces in test names if(POLICY CMP0110) diff --git a/tests/CVObjectDetection.cpp b/tests/CVObjectDetection.cpp index 350f1b98..939fc967 100644 --- a/tests/CVObjectDetection.cpp +++ b/tests/CVObjectDetection.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2020 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2020 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/CVStabilizer.cpp b/tests/CVStabilizer.cpp index 15782a57..1c0d5990 100644 --- a/tests/CVStabilizer.cpp +++ b/tests/CVStabilizer.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2020 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2020 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/CVTracker.cpp b/tests/CVTracker.cpp index 8415ecef..19d0c0fa 100644 --- a/tests/CVTracker.cpp +++ b/tests/CVTracker.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2020 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2020 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/CacheDisk.cpp b/tests/CacheDisk.cpp index 01df3f6e..cee9903e 100644 --- a/tests/CacheDisk.cpp +++ b/tests/CacheDisk.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/CacheMemory.cpp b/tests/CacheMemory.cpp index 9b8e5442..f41c7ab2 100644 --- a/tests/CacheMemory.cpp +++ b/tests/CacheMemory.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/Clip.cpp b/tests/Clip.cpp index 31842eb3..80733957 100644 --- a/tests/Clip.cpp +++ b/tests/Clip.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/Color.cpp b/tests/Color.cpp index dcd4b1d6..d8f8c847 100644 --- a/tests/Color.cpp +++ b/tests/Color.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/Coordinate.cpp b/tests/Coordinate.cpp index 8fe07575..68a20ab5 100644 --- a/tests/Coordinate.cpp +++ b/tests/Coordinate.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include diff --git a/tests/DummyReader.cpp b/tests/DummyReader.cpp index fc832624..28d8a88b 100644 --- a/tests/DummyReader.cpp +++ b/tests/DummyReader.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include diff --git a/tests/FFmpegReader.cpp b/tests/FFmpegReader.cpp index c5696b76..d46b7c79 100644 --- a/tests/FFmpegReader.cpp +++ b/tests/FFmpegReader.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/FFmpegWriter.cpp b/tests/FFmpegWriter.cpp index 6a9a0211..40c0cc69 100644 --- a/tests/FFmpegWriter.cpp +++ b/tests/FFmpegWriter.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/Fraction.cpp b/tests/Fraction.cpp index 57d37a79..306fa738 100644 --- a/tests/Fraction.cpp +++ b/tests/Fraction.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include diff --git a/tests/Frame.cpp b/tests/Frame.cpp index 0a780a32..5a54a668 100644 --- a/tests/Frame.cpp +++ b/tests/Frame.cpp @@ -7,27 +7,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/FrameMapper.cpp b/tests/FrameMapper.cpp index 7553345b..6065bf50 100644 --- a/tests/FrameMapper.cpp +++ b/tests/FrameMapper.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include diff --git a/tests/ImageWriter.cpp b/tests/ImageWriter.cpp index d50d73c5..59446ee4 100644 --- a/tests/ImageWriter.cpp +++ b/tests/ImageWriter.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #ifdef USE_IMAGEMAGICK diff --git a/tests/KeyFrame.cpp b/tests/KeyFrame.cpp index 7b5ec149..806d1847 100644 --- a/tests/KeyFrame.cpp +++ b/tests/KeyFrame.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include diff --git a/tests/Point.cpp b/tests/Point.cpp index 57cff7c7..1e57d153 100644 --- a/tests/Point.cpp +++ b/tests/Point.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/QtImageReader.cpp b/tests/QtImageReader.cpp index ad19d17d..2b33cd0b 100644 --- a/tests/QtImageReader.cpp +++ b/tests/QtImageReader.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include diff --git a/tests/ReaderBase.cpp b/tests/ReaderBase.cpp index d071d36d..06fa77fa 100644 --- a/tests/ReaderBase.cpp +++ b/tests/ReaderBase.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/Settings.cpp b/tests/Settings.cpp index 13239819..f55e005f 100644 --- a/tests/Settings.cpp +++ b/tests/Settings.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include diff --git a/tests/Timeline.cpp b/tests/Timeline.cpp index 255727c6..640f5c65 100644 --- a/tests/Timeline.cpp +++ b/tests/Timeline.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #include #include diff --git a/tests/catch_main.cpp b/tests/catch_main.cpp index 1d97a17b..1a548c5b 100644 --- a/tests/catch_main.cpp +++ b/tests/catch_main.cpp @@ -6,27 +6,9 @@ * @ref License */ -/* LICENSE - * - * Copyright (c) 2008-2019 OpenShot Studios, LLC - * . This file is part of - * OpenShot Library (libopenshot), an open-source project dedicated to - * delivering high quality video editing and animation solutions to the - * world. For more information visit . - * - * OpenShot Library (libopenshot) is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * OpenShot Library (libopenshot) is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with OpenShot Library. If not, see . - */ +// Copyright (c) 2008-2019 OpenShot Studios, LLC +// +// SPDX-License-Identifier: LGPL-3.0-or-later #define CATCH_CONFIG_MAIN #include diff --git a/version.sh b/version.sh index 86a664dc..5adb2014 100755 --- a/version.sh +++ b/version.sh @@ -1,4 +1,9 @@ #!/bin/sh + +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + grep 'set.*(.*PROJECT_VERSION_FULL' CMakeLists.txt\ |sed -e 's#set(PROJECT_VERSION_FULL.*"\(.*\)\")#\1#;q' From dae8ca5e4e2b96eb2d8ec45719dff3af8cbdb3d3 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Sat, 16 Oct 2021 02:50:25 -0400 Subject: [PATCH 066/114] CI: Validate repository licensing with Reuse (#758) --- .github/workflows/reuse.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/reuse.yml diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml new file mode 100644 index 00000000..7af8080a --- /dev/null +++ b/.github/workflows/reuse.yml @@ -0,0 +1,28 @@ +# © OpenShot Studios, LLC +# +# SPDX-License-Identifier: LGPL-3.0-or-later + +# Workflow to run 'reuse lint' via the reuse-action script, +# which will flag any files added or changed in the repo +# that don't have valid, verifiable license data associated +# with them. See the .reuse/ directory in the repo, and +# for more information visit https://reuse.software/ + +name: Validate source licensing + +on: + # Triggers the workflow on push or pull request events but only for the develop branch + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v1.1.1 From 68a6c589e9e6ae51f43647f7c09c8796c5e343f1 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sun, 3 Jan 2021 03:50:19 -0500 Subject: [PATCH 067/114] Docs: Switch from UseDoxygen to doxygen_add_docs Since CMake 3.11, the supported method of integrating Doxygen into CMake projects has been via the doxygen_add_docs() CMake function, which (crucially) can be passed a target name to create and doesn't rely on tons of hardcoding like our UseDoxygen.cmake and its Doxyfile.in template did. This means our docs (only) now require CMake 3.11 to generate, but it allows Doxygen to be configured/used multiple times in the same CMake configuration, removing a major barrier to superproject builds. --- CMakeLists.txt | 70 +++++++++++++--- cmake/Modules/UseDoxygen.cmake | 143 --------------------------------- 2 files changed, 57 insertions(+), 156 deletions(-) delete mode 100644 cmake/Modules/UseDoxygen.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a1f17ee..9354d7be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,23 +146,67 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/src/OpenShotVersion.h ################### DOCUMENTATION ################### # Find Doxygen (used for documentation) -set(DOCS_ENABLED FALSE) # Only set true if Doxygen is found and configured -if (ENABLE_DOCS) - include(cmake/Modules/UseDoxygen.cmake) +set(LIB_DOCS_ENABLED FALSE) # Only set true if Doxygen is found and configured +if(NOT DEFINED ENABLE_LIB_DOCS) + set(ENABLE_LIB_DOCS ${ENABLE_DOCS}) +endif() +if (ENABLE_LIB_DOCS AND CMAKE_VERSION VERSION_GREATER 3.11) + find_package(Doxygen) + if(Doxygen_FOUND) + message(STATUS "Doxygen found, enabling ${PROJECT_NAME} documentation target") + set(DOXYGEN_QUIET YES) + set(DOXYGEN_PROJECT_NAME "OpenShot Library | libopenshot") + set(DOXYGEN_PROJECT_NUMBER ${PROJECT_VERSION}) + set(DOXYGEN_STRIP_FROM_PATH "${PROJECT_SOURCE_DIR}/src") + set(DOXYGEN_STRIP_FROM_INC_PATH "${PROJECT_SOURCE_DIR}/src") + set(DOXYGEN_INCLUDE_FILE_PATTERNS "*.h") + set(DOXYGEN_EXCLUDE + ${PROJECT_SOURCE_DIR}/src/OpenShot.h + ${PROJECT_SOURCE_DIR}/src/Effects.h + ) + set(DOXYGEN_PREDEFINED USE_BLACKMAGIC USE_IMAGEMAGICK) + set(DOXYGEN_IMAGE_PATH ${PROJECT_SOURCE_DIR}) + set(DOXYGEN_OUTPUT_DIRECTORY "docs") - # Doxygen was found - if (TARGET doc) - message(STATUS "Doxygen found, documentation target enabled") - set(DOCS_ENABLED TRUE) + set(DOXYGEN_EXTRACT_ALL YES) + set(DOXYGEN_SORT_BRIEF_DOCS YES) + set(DOXYGEN_RECURSIVE YES) + set(DOXYGEN_SOURCE_BROWSER YES) + set(DOXYGEN_REFERENCED_BY_RELATION YES) - # Install docs, if the user builds them with `make doc` - install(CODE "MESSAGE(\"Checking for documentation files to install...\")") + set(DOXYGEN_HTML_OUTPUT "html") + set(DOXYGEN_HTML_DYNAMIC_SECTIONS NO) + + set(DOXYGEN_DOT_IMAGE_FORMAT svg) + set(DOXYGEN_INTERACTIVE_SVG YES) + set(DOXYGEN_DOT_TRANSPARENT YES) + + doxygen_add_docs(${PROJECT_NAME}-doc + ${PROJECT_SOURCE_DIR}/src + ${PROJECT_SOURCE_DIR}/doc + ${PROJECT_BINARY_DIR}/src/OpenShotVersion.h + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generate ${PROJECT_NAME} documentation" + ) + endif() +endif() +if (TARGET ${PROJECT_NAME}-doc) + set(LIB_DOCS_ENABLED TRUE) + + # Install docs, if the user builds them with `make doc` + install(CODE "MESSAGE(\"Checking for documentation files to install...\")") install(CODE "MESSAGE(\"(Compile with 'make doc' command, requires Doxygen)\")") install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/ - DESTINATION ${CMAKE_INSTALL_DOCDIR}/API - MESSAGE_NEVER # Don't spew about file copies - OPTIONAL ) # No error if the docs aren't found + DESTINATION ${CMAKE_INSTALL_DOCDIR}/API + MESSAGE_NEVER # Don't spew about file copies + OPTIONAL ) # No error if the docs aren't found + + if(NOT TARGET doc) + add_custom_target(doc) + endif() + if(TARGET doc) + add_dependencies(doc ${PROJECT_NAME}-doc) endif() endif() @@ -280,4 +324,4 @@ endforeach() feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES - DESCRIPTION "Build configuration:") + DESCRIPTION "${PROJECT_NAME} Build configuration:") diff --git a/cmake/Modules/UseDoxygen.cmake b/cmake/Modules/UseDoxygen.cmake deleted file mode 100644 index c0684801..00000000 --- a/cmake/Modules/UseDoxygen.cmake +++ /dev/null @@ -1,143 +0,0 @@ -# Copyright (c) 2009, 2010, 2011 Tobias Rautenkranz -# -# SPDX-License-Identifier: BSD-3-Clause - -# - Run Doxygen -# -# Adds a doxygen target that runs doxygen to generate the html -# and optionally the LaTeX API documentation. -# The doxygen target is added to the doc target as a dependency. -# i.e.: the API documentation is built with: -# make doc -# -# USAGE: GLOBAL INSTALL -# -# Install it with: -# cmake ./ && sudo make install -# Add the following to the CMakeLists.txt of your project: -# include(UseDoxygen OPTIONAL) -# Optionally copy Doxyfile.in in the directory of CMakeLists.txt and edit it. -# -# USAGE: INCLUDE IN PROJECT -# -# set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) -# include(UseDoxygen) -# Add the Doxyfile.in and UseDoxygen.cmake files to the projects source directory. -# -# -# CONFIGURATION -# -# To configure Doxygen you can edit Doxyfile.in and set some variables in cmake. -# Variables you may define are: -# DOXYFILE_SOURCE_DIR - Path where the Doxygen input files are. -# Defaults to the current source directory. -# DOXYFILE_EXTRA_SOURCES - Additional source diretories/files for Doxygen to scan. -# The Paths should be in double quotes and separated by space. e.g.: -# "${CMAKE_CURRENT_BINARY_DIR}/foo.c" "${CMAKE_CURRENT_BINARY_DIR}/bar/" -# -# DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored. -# Defaults to "${CMAKE_CURRENT_BINARY_DIR}/doc". -# -# DOXYFILE_LATEX - ON/OFF; Set to "ON" if you want the LaTeX documentation -# to be built. -# DOXYFILE_LATEX_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where -# the Doxygen LaTeX output is stored. Defaults to "latex". -# -# DOXYFILE_HTML_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where -# the Doxygen html output is stored. Defaults to "html". -# - -macro(usedoxygen_set_default name value type docstring) - if(NOT DEFINED "${name}") - set("${name}" "${value}" CACHE "${type}" "${docstring}") - endif() -endmacro() - -find_package(Doxygen) - -if(DOXYGEN_FOUND) - find_file(DOXYFILE_IN "Doxyfile.in" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/" - NO_DEFAULT_PATH - DOC "Path to the doxygen configuration template file") - set(DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile") - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(DOXYFILE_IN DEFAULT_MSG "DOXYFILE_IN") -endif() - -if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND) - usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc" - PATH "Doxygen output directory") - usedoxygen_set_default(DOXYFILE_HTML_DIR "html" - STRING "Doxygen HTML output directory") - usedoxygen_set_default(DOXYFILE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" - PATH "Input files source directory") - usedoxygen_set_default(DOXYFILE_EXTRA_SOURCE_DIRS "" - STRING "Additional source files/directories separated by space") - set(DOXYFILE_SOURE_DIRS "\"${DOXYFILE_SOURCE_DIR}\" ${DOXYFILE_EXTRA_SOURCES}") - - usedoxygen_set_default(DOXYFILE_LATEX OFF BOOL "Generate LaTeX API documentation") - usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex" STRING "LaTex output directory") - - mark_as_advanced(DOXYFILE_OUTPUT_DIR DOXYFILE_HTML_DIR DOXYFILE_LATEX_DIR - DOXYFILE_SOURCE_DIR DOXYFILE_EXTRA_SOURCE_DIRS DOXYFILE_IN) - - ## Dot - usedoxygen_set_default(DOXYFILE_USE_DOT ON BOOL "Use dot (part of graphviz) to generate graphs") - set(DOXYFILE_DOT "NO") - if(DOXYFILE_USE_DOT AND DOXYGEN_DOT_EXECUTABLE) - set(DOXYFILE_DOT "YES") - endif() - - set_property(DIRECTORY - APPEND PROPERTY - ADDITIONAL_MAKE_CLEAN_FILES - "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}") - - add_custom_target(doxygen - COMMAND "${DOXYGEN_EXECUTABLE}" - "${DOXYFILE}" - COMMENT "Writing documentation to ${DOXYFILE_OUTPUT_DIR}..." - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") - - ## LaTeX - set(DOXYFILE_PDFLATEX "NO") - - set_property(DIRECTORY APPEND PROPERTY - ADDITIONAL_MAKE_CLEAN_FILES - "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}") - - if(DOXYFILE_LATEX) - set(DOXYFILE_GENERATE_LATEX "YES") - find_package(LATEX) - find_program(DOXYFILE_MAKE make) - mark_as_advanced(DOXYFILE_MAKE) - if(LATEX_COMPILER AND MAKEINDEX_COMPILER AND DOXYFILE_MAKE) - if(PDFLATEX_COMPILER) - set(DOXYFILE_PDFLATEX "YES") - endif() - - add_custom_command(TARGET doxygen - POST_BUILD - COMMAND "${DOXYFILE_MAKE}" - COMMENT "Running LaTeX for Doxygen documentation in ${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}..." - WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}") - else() - set(DOXYGEN_LATEX "NO") - endif() - else() - set(DOXYFILE_GENERATE_LATEX "NO") - endif() - - - configure_file("${DOXYFILE_IN}" "${DOXYFILE}" @ONLY) - - if(TARGET doc) - get_target_property(DOC_TARGET doc TYPE) - endif() - if(NOT DOC_TARGET) - add_custom_target(doc) - endif() - - add_dependencies(doc doxygen) -endif() From ef77a27f3955e042bf866838ea64abffab2de5cf Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sun, 3 Jan 2021 04:00:43 -0500 Subject: [PATCH 068/114] Remove Doxyfile.in template --- Doxyfile.in | 2561 --------------------------------------------------- 1 file changed, 2561 deletions(-) delete mode 100644 Doxyfile.in diff --git a/Doxyfile.in b/Doxyfile.in deleted file mode 100644 index 6cd2c32b..00000000 --- a/Doxyfile.in +++ /dev/null @@ -1,2561 +0,0 @@ -# © OpenShot Studios, LLC -# -# SPDX-License-Identifier: LGPL-3.0-or-later - -# Doxyfile 1.8.20 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the configuration -# file that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "OpenShot Library | libopenshot" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = "@PROJECT_VERSION@" - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = "@DOXYFILE_OUTPUT_DIR@" - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all generated output in the proper direction. -# Possible values are: None, LTR, RTL and Context. -# The default value is: None. - -OUTPUT_TEXT_DIRECTION = None - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = "@PROJECT_SOURCE_DIR@/src" - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = "@PROJECT_SOURCE_DIR@/src" - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line -# such as -# /*************** -# as being the beginning of a Javadoc-style comment "banner". If set to NO, the -# Javadoc-style will behave just like regular comments and it will not be -# interpreted by doxygen. -# The default value is: NO. - -JAVADOC_BANNER = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# By default Python docstrings are displayed as preformatted text and doxygen's -# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the -# doxygen's special commands can be used and the contents of the docstring -# documentation blocks is shown as doxygen documentation. -# The default value is: YES. - -PYTHON_DOCSTRING = YES - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. -# When you need a literal { or } or , in the value part of an alias you have to -# escape them by means of a backslash (\), this can lead to conflicts with the -# commands \{ and \} for these it is advised to use the version @{ and @} or use -# a double escape (\\{ and \\}) - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice -# sources only. Doxygen will then generate output that is more tailored for that -# language. For instance, namespaces will be presented as modules, types will be -# separated into more groups, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_SLICE = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, -# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: -# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser -# tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files). For instance to make doxygen treat .inc files -# as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 5. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 0 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = YES - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use -# during processing. When set to 0 doxygen will based this on the number of -# cores available in the system. You can set it explicitly to a value larger -# than 0 to get more control over the balance between CPU load and processing -# speed. At this moment only the input processing can be done using multiple -# threads. Since this is still an experimental feature the default is set to 1, -# which efficively disables parallel processing. Please report any issues you -# encounter. Generating dot graphs in parallel is controlled by the -# DOT_NUM_THREADS setting. -# Minimum value: 0, maximum value: 32, default value: 1. - -NUM_PROC_THREADS = 1 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual -# methods of a class will be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIV_VIRTUAL = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# declarations. If set to NO, these declarations will be included in the -# documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# (including Cygwin) and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = YES - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. If -# EXTRACT_ALL is set to YES then this flag will automatically be disabled. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = "@PROJECT_SOURCE_DIR@/src" \ - "@PROJECT_SOURCE_DIR@/doc" \ - "@PROJECT_BINARY_DIR@/src/OpenShotVersion.h" - - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: https://www.gnu.org/software/libiconv/) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), -# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen -# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, -# *.vhdl, *.ucf, *.qsf and *.ice. - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = "_darcs" - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = "@PROJECT_SOURCE_DIR@/examples" - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = "*.cpp" - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = YES - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = "@PROJECT_SOURCE_DIR@" - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = NO - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# entity all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -# If clang assisted parsing is enabled you can provide the clang parser with the -# path to the directory containing a file called compile_commands.json. This -# file is the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the -# options used when the source files were built. This is equivalent to -# specifying the "-p" option to a clang tool, such as clang-check. These options -# will then be passed to the parser. Any options specified with CLANG_OPTIONS -# will be added as well. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. - -CLANG_DATABASE_PATH = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = "@DOXYFILE_HTML_DIR@" - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via JavaScript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have JavaScript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: https://developer.apple.com/xcode/), introduced with OSX -# 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy -# genXcode/_index.html for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the main .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NONE - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg -# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see -# https://inkscape.org) to generate formulas as SVG images instead of PNGs for -# the HTML output. These images will generally look nicer at scaled resolutions. -# Possible values are: png (the default) and svg (looks nicer but requires the -# pdf2svg or inkscape tool). -# The default value is: png. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FORMULA_FORMAT = png - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands -# to create new LaTeX commands to be used in formulas as building blocks. See -# the section "Including formulas" for details. - -FORMULA_MACROFILE = - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /