Commit Graph

180 Commits

Author SHA1 Message Date
Frank Dana
6009a26e4c Eliminate TooManySeeks exception (#611)
Since commit bfa050409c (2015-08-24),
there is no code in libopenshot which ever throws TooManySeeks.

- Removed catch() statements for TooManySeeks from multiple functions
- Removed the exception from Exceptions.h
- in Qt/AudioPlaybackThread.h:
  - Removed the "SafeTimeSliceThread" class definition, as it only
    existed to catch TooManySeeks.
  - Replaced SafeTimeSliceThread with a standard juce::TimeSliceThread
2021-01-01 05:24:48 -05:00
Jonathan Thomas
e556d0fded Added 2 new unit tests for Clip's with a Timeline associated with them, and FFmpegReaders with a Clip/Timeline associated with them. 2020-10-23 01:35:46 -05:00
Jonathan Thomas
e5d5d82050 - Simplifying the FrameMapper Clip::AdjustFrameNumber method
- Removing transformed == true boolean (Qt should be smart enough to optimize for blank transforms)
- Fixing regression from TimelineBase import
2020-10-20 13:03:10 -05:00
Jonathan Thomas
18911bebb7 Apply suggestions from code review
Applying some awesome improvements from @ferdnyc, thx!

Co-authored-by: Frank Dana <ferdnyc@gmail.com>
2020-10-20 12:42:00 -05:00
FeRD (Frank Dana)
cf89891bf0 Finish conflict resolution 2020-10-19 17:42:12 -04:00
FeRD (Frank Dana)
a1e44edad4 Merge branch 'develop' into clip-refactor-keyframes 2020-10-19 16:28:49 -04:00
FeRD (Frank Dana)
f4ae897240 Merge branch 'clip-refactor-keyframes' of https://github.com/OpenShot/libopenshot into clip-refactor-keyframes 2020-10-19 16:26:09 -04:00
Jonathan Thomas
d2521bcbff Fixing some additional cpp_test complaints 2020-10-19 16:22:27 -04:00
Jonathan Thomas
2f4aba450c Fixing some cpp_test complaints 2020-10-19 16:22:27 -04:00
Jonathan Thomas
d3d604cc08 Fix alpha and mask effects, so they correctly multiply the alpha to all colors (since we have switched to a premulitplied alpha format) 2020-10-19 16:22:27 -04:00
Jonathan Thomas
b936ea837c Initializing Clip info struct, and fixing clip cache settings 2020-10-19 16:05:01 -04:00
Jonathan Thomas
8387b124ad Large refactor of Timeline, TimelineBase, ClipBase, and Clip, to allow a Clip access to the parent timeline instance (if available), and thus, certain properties (preview size, timeline FPS, etc...). This allows for a simpler rendering of Clip keyframes (during the Clip::GetFrame method), and a simpler Timeline class, that can change the preview window size dynamically and no longer requires a Singleton Settings class.
- Also removed "crop" from Clip class, as it was never implmeneted correctly, and we have a fully functional "crop" effect when needed
 - Added caching to Clip class, to optimize previewing of cached frames (much faster than previous)
2020-10-19 16:05:01 -04:00
Jonathan Thomas
6da4e8fded Fixed a bug with cropping logic on Clip (disabled it temporarily). I need to replace the Crop functionality with a more robust cropping tool. Also, updated Timeline to use the MaxWidth/MaxHeight settings when calling the clip (since those are set when the screen is resized). 2020-10-19 15:46:43 -04:00
Jonathan Thomas
eb328f1190 Refactored the Settings::Instance()->MAX_WIDTH and Settings::Instance()->MAX_HEIGHT out of the Cilp class. GetFrame() now has an overload which specifies the width, height, and samples needed. Otherwise, it returns the Clip image based on the source reader (width, height, num samples). 2020-10-19 15:46:42 -04:00
Jonathan Thomas
000c9d6d4c - Refactoring all Timeline drawing code into the Clip class
- Making Clip a proper Reader (so it can be used directly, instead of a Timeline)
2020-10-19 15:45:37 -04:00
FeRD (Frank Dana)
aa40ea29e0 Update include paths in all source/header files 2020-10-18 07:43:37 -04:00
Jonathan Thomas
29107bc427 Fixing some additional cpp_test complaints 2020-10-16 18:22:42 -05:00
Jonathan Thomas
f4d0d9d7bb Fixing some cpp_test complaints 2020-10-16 18:04:10 -05:00
Jonathan Thomas
1dfbb0e771 Merge branch 'develop' into clip-refactor-keyframes
# Conflicts:
#	src/CacheDisk.cpp
#	src/Clip.cpp
#	src/Frame.cpp
#	src/QtHtmlReader.cpp
#	src/QtImageReader.cpp
#	src/QtTextReader.cpp
#	src/effects/Bars.cpp
#	src/effects/Crop.cpp
2020-10-16 15:32:43 -05:00
Jonathan Thomas
8f6c64215e Merge pull request #556 from ferdnyc/use-make-shared
Use std::make_shared to allocate shared ptrs, instead of std::shared_ptr constructors
2020-10-16 14:48:14 -05:00
Jonathan Thomas
1eecda3d4e Fix alpha and mask effects, so they correctly multiply the alpha to all colors (since we have switched to a premulitplied alpha format) 2020-10-14 14:19:26 -05:00
Jonathan Thomas
57b48f31a2 Initializing Clip info struct, and fixing clip cache settings 2020-10-13 14:55:25 -05:00
Jonathan Thomas
fb879a4e46 Merge branch 'develop' into clip-refactor-keyframes
# Conflicts:
#	include/Clip.h
#	include/ReaderBase.h
#	include/Timeline.h
#	src/Clip.cpp
#	src/FFmpegReader.cpp
#	src/QtImageReader.cpp
#	src/ReaderBase.cpp
2020-10-05 23:14:44 -05:00
Jonathan Thomas
f9a717ef4b Large refactor of Timeline, TimelineBase, ClipBase, and Clip, to allow a Clip access to the parent timeline instance (if available), and thus, certain properties (preview size, timeline FPS, etc...). This allows for a simpler rendering of Clip keyframes (during the Clip::GetFrame method), and a simpler Timeline class, that can change the preview window size dynamically and no longer requires a Singleton Settings class.
- Also removed "crop" from Clip class, as it was never implmeneted correctly, and we have a fully functional "crop" effect when needed
 - Added caching to Clip class, to optimize previewing of cached frames (much faster than previous)
2020-10-04 16:59:21 -05:00
FeRD (Frank Dana)
36dab0b1db Clip: GetEffect implementation 2020-09-01 23:05:04 -04:00