Commit Graph

2674 Commits

Author SHA1 Message Date
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
f50e18e3c2 A bit of refactoring around Clip Reader deletion - to prevent memory leak and some skipped readers 2022-10-28 11:25:48 -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
52de46078a Adding mutex to Timeline::Close 2022-10-26 23:15:50 -05:00
Jonathan Thomas
1186c24d1d Merge pull request #863 from OpenShot/broken-image-formats
Support many new image formats with our FFmpegReader
2022-10-24 19:53:53 -05:00
Jonathan Thomas
9f391f57c0 Merge pull request #862 from OpenShot/performance-profile-fixes
Always cache starting 1 frame before the playhead's position
2022-10-24 19:52:52 -05:00
Jonathan Thomas
b70f89ff6c Fixing whitespace 2022-10-24 15:03:10 -05:00
Jonathan Thomas
2bc1c28b75 Fixing whitespace 2022-10-24 15:02:25 -05:00
Jonathan Thomas
f207e48fe4 Support many image formats with our FFmpegReader, by safely protecting empty packets in GetPacketPTS, and generating a duration and setting the has_single_image property. 2022-10-24 14:43:10 -05:00
Jonathan Thomas
6a234fe4ce Always cache starting 1 frame previous to the playhead - to prevent the Seek method from clearing all cache 2022-10-24 13:08:37 -05:00
Jonathan Thomas
05b997ac85 Merge pull request #861 from OpenShot/less-sort
Improving Thread Safety of Timeline (+ new unit tests)
2022-10-23 17:14:24 -05:00
Jonathan Thomas
d46efe8c7c Small tweak to playback logic, to refresh frame anytime Player::Seek() is called - which allows for changing keyframes during playback (i.e. shaking a clip during playback) 2022-10-22 23:40:42 -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
87e14ba616 Refactor how Clip overrides ClipBase::End() 2022-10-22 22:48:18 -05:00
Jonathan Thomas
788a3c77a6 Fixing whitespace 2022-10-21 18:15:41 -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
b890417ada Merge pull request #859 from OpenShot/remove-cache-from-clear
Removing cache clearing from Timeline::Clear method - unneeded
2022-10-15 21:55:58 -05:00
Jonathan Thomas
ca33d951e6 Removing cache clearing from Timeline::Clear method - unneeded 2022-10-15 21:48:55 -05:00
Jonathan Thomas
4439fe980e Merge pull request #858 from OpenShot/stop-caching-when-disabled
Break out of cache loop when caching is disabled
2022-10-15 00:18:15 -05:00
Jonathan Thomas
28e6e0ba21 Break out of cache loop when caching is temporarily disabled (i.e. when transforming, editing keyframes, rotating, moving, resizing, etc...) 2022-10-15 00:08:49 -05:00
Jonathan Thomas
92677907a3 Merge pull request #857 from OpenShot/fixing-audio-regression
Fix Regression causing Blank audio in many files
2022-10-14 23:33:30 -05:00
Jonathan Thomas
0800205e24 Remove regression causing blank audio on many audio files. Replacing the broken logic in a different way, to force a NULL packet to the ProcessAudioPacket() function at the end of stream / EOF. 2022-10-14 23:15:31 -05:00
Jonathan Thomas
9954b53b82 Merge pull request #856 from OpenShot/audio-eof-detection
Detect audio EOF when all packets are decoded
2022-10-13 17:43:11 -05:00
Jonathan Thomas
b13865c0e4 Detect audio EOF when all packets are decoded - since not all audio streams get a NULL packet at the end of stream 2022-10-13 16:45:33 -05:00