412 Commits

Author SHA1 Message Date
Jonathan Thomas
4039851a66 Adding Invalid Codec exception to AV1 unittest 2022-11-16 17:11:30 -06:00
Jonathan Thomas
2c24d0ff32 Updating unit tests to ignore older versions of FFmpeg that do not support AV1 decoding. 2022-11-16 15:10:25 -06:00
Jonathan Thomas
58dc99d1f9 Fixing whitespacae 2022-11-15 14:52:13 -06:00
Jonathan Thomas
cbff18ad95 Update AV1 unit testing to verify pixel values, to ensure correct decoding 2022-11-15 14:33:03 -06:00
Jonathan Thomas
63ebc4f4f3 Adding test for AV1 sync verification on Windows builder 2022-11-14 12:03:33 -06:00
Jonathan Thomas
bdb161dc93 AudioWaveformData: Adding protection from divide by zero and readers with no audio, including additional unit tests and a faster zero() function 2022-11-03 11:37:14 -05:00
Jonathan Thomas
c838c126ad Improvements to AudioWaveformer to use RMS (Root Mean Square), and return both average RMS and max RMS for graphing, including some new unit tests. 2022-11-01 15:17:03 -05: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
Jonathan Thomas
da813e08db Fixing whitespace 2022-10-28 19:02:27 -05:00
Jonathan Thomas
9f3fa0af52 Fixing whitespace 2022-10-28 19:01:27 -05:00
Jonathan Thomas
1547fb1d52 New unit tests around GetMaxFrame / GetMaxTime. Improvemetns to apply_json_to_timeline() to not clear all cache when setting the timeline's "duration" - an optimization for performance 2022-10-28 15:25:30 -05:00
Jonathan Thomas
c12e3fe96e - 2 new unit tests, to verify Reader() ownership and clean-up is correct
- Bug fix for clip, to delete a new Reader, regardless of how it was set (correctly track allocated readers, and ignore FrameMappers pointed to existing allocated reader)
- Bug fix for timeline to correctly wrap Reader with FrameMapper
2022-10-28 11:00:47 -05:00
Jonathan Thomas
389bf33adb - Protect AddClip(), RemoveClip(), update_open_clips(), sort_clips(), sort_effects() methods with mutex, making them thread safe
- Refactor sorting of clips & effects, and only sort these arrays when the arrays change (instead of each call to GetFrame)
- Cache max timeline duration, and make Timeline::GetMaxTime() thread safe
- New multi-threaded unit tests, which are designed to verify no seg faults on multi-threaded calls to Timeline::GetFrame(), Timeline::AddClip(), and Timeline::RemoveClip()
- New public Timeline::SortTimeline() method which is called by child Clips automatically, when certain properties are changed
2022-10-22 22:55:40 -05:00
Jonathan Thomas
d8f8cba27f Do not sort_clips on every call to GetFrame, as this invalidates the internal clips list, and causes crashes in ClearAllCache() and Clear() methods. 2022-10-21 18:11:32 -05:00
Jonathan Thomas
31566a192a Protection for ClearAllCache method, to prevent messing with closed clips. Added a multi-threaded unit tests for Timeline::GetFrame access - to verify nothing crashes. 2022-10-13 00:01:03 -05:00
Jonathan Thomas
934ca786ed Adding new Clear() method to Timeline, to delete all allocated clips, effects, and frame mapeprs (freeing memory). Also, keep track of allocated clips and effects on timeline (when using SetJson to create them), so we can clean them up correctly on Clear() or RemoveClip()/RemoveEffect(). Added new test case for Clear(). 2022-10-06 15:07:31 -05:00
Jonathan Thomas
0419f2c2a7 Fixing some whitespace issues 2022-08-17 22:14:36 -05:00
Jonathan Thomas
02c256cda5 Fixed FrameMapper::info::video_length after calling FrameMapper::ChangeMapping(). Added some unit tests to verify. 2022-08-03 16:14:00 -05:00
Jonathan Thomas
d093004dcf Fixing timeline tests. Recent FrameMapper bug fixes changed the mapping slightly, for certain tests 2022-07-21 10:07:34 -05:00
FeRD (Frank Dana)
6c5ffe1c1d HACK: 'using namespace Catch' in v3 header 2022-06-18 04:45:50 -04:00
FeRD (Frank Dana)
190bd915be Catch2v3: Use catch_all header 2022-06-18 04:21:58 -04:00
FeRD (Frank Dana)
677ed5f591 Tests: Switch test files to openshot_catch.h 2022-06-17 15:37:51 -04:00
FeRD (Frank Dana)
159d4fc629 tests/CMakeLists: Handle Catch2 v2 vs. v3 2022-06-17 15:37:51 -04:00
FeRD (Frank Dana)
6db5f14139 Update catch_main.cpp (only for Catch2v2) 2022-06-17 15:37:47 -04:00
FeRD (Frank Dana)
5ae7112494 Catch2: Header templates for tests
Since Catch2 v3.0+ uses a vasty different organization for headers
and targets, we have two templates for what the unit test code
will include. One or the other is configure by CMake as the file
openshot_catch.h in the build directory, and all of the unit test
sources can include that instead.
2022-06-17 15:37:15 -04:00