145 Commits

Author SHA1 Message Date
Jonathan Thomas
7efc48006a Modify all throw InvalidFile(...) callsites: each now has a distinct message string, and adding unit tests to verify this.
So a crash line will now be more like:
  what(): FFmpegReader could not open media file. for file C:\...\TitleFileName%04d.png
  instead of only File could not be opened.
2026-02-23 16:55:49 -06:00
Jonathan Thomas
b94dcac3b4 Adding Benchmark executable to assist with performance testing and comparisons with different versions of OpenShot.
Initial results:
FFmpegWriter,7800
FrameMapper,3508
Clip,4958
Timeline,30817
Timeline (with transforms),53951
Effect_Mask,9283
Effect_Brightness,12486
Effect_Crop,5153
Effect_Saturation,15545
Overall,147136
2025-09-12 17:27:43 -05:00
Jonathan Thomas
a326f541a1 Fix bug with Wave effect that can cause colored bands to appear in certain cases, and added new wave effect unit test 2025-09-12 15:07:51 -05:00
Jonathan Thomas
79846eacf8 Adding new Analog Tap effect: Vintage home video wobble, bleed, and grain. 2025-09-10 22:44:30 -05:00
Jonathan Thomas
364fb37565 Unit tests for new VideoCacheThread, to test all helper methods and ensure our general logic is correct (caching forward and backwards) 2025-06-03 22:24:34 -05:00
Jonathan Thomas
d26ef4dcbb Merge branch 'develop' into lens-flare 2025-05-28 20:34:51 -05:00
Jonathan Thomas
3db2fe14fb Adding unit tests for Lens Flare effect, and adding effect to Python SWIG bindings 2025-05-28 17:40:47 -05:00
Jonathan Thomas
789944f576 Adding unit tests for Color Map effect 2025-05-25 18:22:41 -05:00
Jonathan Thomas
86ebbb8ff9 Merge branch 'develop' into sharpen-effect
# Conflicts:
#	src/EffectInfo.cpp
#	tests/CMakeLists.txt
2025-05-23 22:26:35 -05:00
Jonathan Thomas
52988ee5b3 Initial unit tests for Sharpen effect, still failing though. 2025-05-23 15:09:02 -05:00
Jonathan Thomas
ec890fe74d Adding unit tests for spherical project effect, using 2 PNG assets 2025-05-21 18:25:22 -05:00
Jonathan Thomas
7fb8308cc7 Adding spherical support to FFmpegWriter and FFmpegReader, so they can optionally write the correct side data for Spacial and equirectangular 360 videos. 2025-05-20 20:21:32 -05:00
Jonathan Thomas
5cd91a9c97 Fixing a RGB to BGR color issue with the Outline effect, and adding in unit tests for the Outline effect. 2025-03-12 16:52:15 -05:00
Jonathan Thomas
06c140c23c Improvement to Caption effect, including Caption unit-tests, and the following fixes:
- improved regex, which now detects lines without blank lines separating them, and detects captions that start with numbers
- line wrapping fixed for languages that don't use spaces
- forced line wrapping of long strings of characters
2023-02-10 15:14:10 -06:00
Jonathan Thomas
70e86ef044 Improved Profile Class (Helper methods, Sortable, Unit tests) (#895)
* Removing legacy profile property. Add new operators for Profile classes (for comparison). Also added new functions to generate different variations of the Profile data (key, short name, long name, long name w/description).

* Add empty constructor for Profile class, and new Profile unit tets

* Adding zero padding to profile Key function, for easier sorting: 01920x1080i2997_16:09

* Clear setfill flag after creating Key() output

* Updating example exe to load an *.osp project file via C++, which makes debugging complex broken projects much easier.

* - Add new unit test to FFmpegWriter to create an animated GIF and verify it can be wrapped with a FrameMapper (with no audio track)
- Improve FrameMapper to ignore missing audio data (i.e. when no audio samples present, don't try and find them or resample them)

* Fix some whitespace issues

* Fix inline documentation mistype

* Fixed missing reuse licensing on new example profile files

* Changing Profile::Key() format to exclude the : character, since Windows file names cannot contain that

* - Large memory leak fixed in FFmpegWriter when closing the video & audio contexts
- Reducing # of cached frames and rescalers to 1, since we no longer use OMP and this is unneeded - we need to refactor much of this code out eventually

* - Fixing whitespace issues
- Code clean-up / line wrapping / etc...
2023-02-02 16:29:38 -06:00
Jonathan Thomas
186a4ca5c1 Refactoring Audio Device detection (don't crash on Windows, find actual sample rate and device details) (#883)
* Close down ZMQ context to stop the zmq threads (related to sentry bug: OPENSHOT-3X)

* Add Support for Windows 7/8.1 (#881)

Adding protection around getting current sample rate for win 7, if audio device not found. Also added mutex for Singleton method. Also, making whitespace consistent on AudioPlaybackThread.cpp

* Big refactor of audio device opening - with multiple sample rates attempted, for better recovery from a missing or unsupported sample rate. Debug logs added for testing.

* Additional failure logging for windows audio device init

* Refactor of Audio Device Initialization (#882)

* Huge refactor of audio device initialization:
- Attempt requested audio device first, and then iterate through all known audio types and devices, and common sample rates. The idea is to ignore an invalid default or invalid requested device, and keep looking until we find a valid one
- New public method to return active, open audio device
- Added methods for AudioDeviceInfo struct, to make it callable from Python
- Some code clean-up and whitespace fixes
- New unit tests for AudioDeviceManagerSingleton

* Ignore audio device unit tests on systems with "No Driver" returned in the audio error message

* Ignore audio device unit tests if any error is found during initialization (i.e. build servers don't have audio cards)

* Trying to update GitHub libomp errors during build checks

* Remove zmq context shutdown call, due to the method missing on newer versions of zmq.hpp

* Downgrading GitHub Ubuntu latest image to Ubuntu 20.04, for compatibility with Catchv2

* Initialize all audio device manager variables correctly, and ignore unit test on low or missing sample rate systems (i.e. GitHub build servers)
2022-12-19 13:15:43 -06:00
Jonathan Thomas
2326532820 Initial commit of AudioWaveformer class, which is designed to iterate any ReaderBase, and return a reduced "average" sample set - more useful for generating waveforms - for example, reduce a 44100 samples per second down to 20 samples per second. 2022-10-30 22:04:19 -05:00
FeRD (Frank Dana)
159d4fc629 tests/CMakeLists: Handle Catch2 v2 vs. v3 2022-06-17 15:37:51 -04:00
Frank Dana
be20f9b343 Merge branch 'develop' into chromakey-unit 2021-11-02 14:02:45 -04:00
Jonathan Thomas
f81f620c2a Merge pull request #732 from ferdnyc/crop-qpainter
Rewrite Crop effect using QPainter
2021-10-29 13:17:38 -05:00
Frank Dana
f26a574bf2 Only duplicate Settings test involving envvar (#762) 2021-10-24 01:07:03 -04:00
Frank Dana
2d2a062bdc Remove (broken) BlackMagic DeckLink support (#760) 2021-10-20 06:49:08 -04:00
Frank Dana
59138ea3e4 Adopt license management via Reuse project/tool (#711)
* reuse-managed license/copyright headers

reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> 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
2021-10-16 01:26:26 -04:00
FeRD (Frank Dana)
ab60286ae8 Crop effect: Add unit tests 2021-09-18 08:37:09 -04:00
FeRD (Frank Dana)
ed1c4f4bca ChromaKey: Minimal unit testing 2021-09-11 22:53:03 -04:00