~mbranton/libopenshot/alpha-channel-fix

« back to all changes in this revision

Viewing changes to include/Timeline.h

  • Committer: Jonathan Thomas
  • Date: 2016-09-07 05:40:01 UTC
  • Revision ID: jonathan@openshot.org-20160907054001-v2tbe8uy8a7lk4qw
Added new CacheDisk class, which caches frames to the hard drive, dramatically speeding up preview speeds, at the expense of IO operations. New unittests for caching framework. Fixed a few bugs with Frame constructor, which was causing invalid # width & height. Integrated JSON into the cache framework, to quickly share the state of the cache (including ranges of cached frame numbers). Fixed a bug where some Timeline frames could have no audio samples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include <tr1/memory>
33
33
#include <QtGui/QImage>
34
34
#include <QtGui/QPainter>
 
35
#include "CacheBase.h"
 
36
#include "CacheDisk.h"
35
37
#include "CacheMemory.h"
36
38
#include "Color.h"
37
39
#include "Clip.h"
147
149
                list<Clip*> closing_clips; ///<List of clips that need to be closed
148
150
                map<Clip*, Clip*> open_clips; ///<List of 'opened' clips on this timeline
149
151
                list<EffectBase*> effects; ///<List of clips on this timeline
150
 
                CacheMemory final_cache; ///<Final cache of timeline frames
 
152
                CacheBase *final_cache; ///<Final cache of timeline frames
151
153
 
152
154
                /// Process a new layer of video or audio
153
155
                void add_layer(tr1::shared_ptr<Frame> new_frame, Clip* source_clip, long int clip_frame_number, long int timeline_frame_number, bool is_top_clip);
228
230
                list<EffectBase*> Effects() { return effects; };
229
231
 
230
232
                /// Get the cache object used by this reader
231
 
                CacheMemory* GetCache() { return &final_cache; };
 
233
                CacheBase* GetCache() { return final_cache; };
 
234
 
 
235
                /// Get the cache object used by this reader
 
236
                void SetCache(CacheBase* new_cache);
232
237
 
233
238
                /// Get an openshot::Frame object for a specific frame number of this timeline.
234
239
                ///