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
Jonathan Thomas
eced60545a
Update CVTracker unit test, since we've rounded bounding coordinates, we need to update the expected value in our unit test. Seems close enough to be a rounding error onw.
2022-05-13 14:55:58 -05:00
Jonathan Thomas
a8e9c95fea
Silence openshot::Frame audio when requesting a Clip::GetFrame() past the end of the Clip's Reader. For example, if a Clip has 1000 frames, and the user requests frame 1001, we will return the last cached openshot::Frame object, but we don't want to repeat the audio samples (causing a stutter). Any frame past the end of the reader, should always silence the audio samples. Also, fixed a few invalid comments, and added a Unit test.
2022-03-02 16:24:09 -06:00
Jonathan Thomas
dec6b04442
Merge pull request #771 from ferdnyc/move-magick-code
...
Move ImageMagick code out of Frame class
2021-11-11 14:15:21 -06:00
Frank Dana
0c1e9d0700
tests/Fraction: Approx() floating-point for 32bit ( #777 )
2021-11-11 08:20:07 -05:00
Frank Dana
f8a73791a1
Merge branch 'develop' into move-magick-code
2021-11-10 23:26:27 -05:00
Jonathan Thomas
5adf45ab90
Merge pull request #768 from ferdnyc/fraction-operators
...
Fraction: Operators for direct autoconverting multiplication and division, in both C++ and Python
2021-11-10 22:20:11 -06:00
Jonathan Thomas
dab4568f33
Merge pull request #730 from ferdnyc/chromakey-unit
...
ChromaKey: Minimal unit testing
2021-11-10 22:15:02 -06:00
FeRD (Frank Dana)
59108504e3
Code changes for compatibility with JUCE 6.x
...
- Replace all juce::CriticalSection with std::recursive_mutex
- Replace all juce::AudioSampleBuffer with juce::AudioBuffer<float>
- Eliminate implicit reliance on 'using namespace juce;'
- Replace OpenShotAudio.h includes with targeted juce modules
2021-11-09 06:22:25 -05:00