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)
This commit is contained in:
Jonathan Thomas
2020-10-04 16:59:21 -05:00
committed by FeRD (Frank Dana)
parent 6da4e8fded
commit 8387b124ad
35 changed files with 509 additions and 326 deletions

View File

@@ -222,7 +222,6 @@ std::shared_ptr<Frame> ChunkReader::GetFrame(int64_t requested_frame)
// Close existing reader (if needed)
if (local_reader)
{
std::cout << "Close READER" << std::endl;
// Close and delete old reader
local_reader->Close();
delete local_reader;
@@ -230,7 +229,6 @@ std::shared_ptr<Frame> ChunkReader::GetFrame(int64_t requested_frame)
try
{
std::cout << "Load READER: " << chunk_video_path << std::endl;
// Load new FFmpegReader
local_reader = new FFmpegReader(chunk_video_path);
local_reader->Open(); // open reader