12 // Simply a table of images described by frame position and dimensions.
13 // The frame position is relative to the frame rate of the source file.
14 // This object is used by File for playback.
15 // and MWindow for timeline drawing.
16 // CICache scans all the files for
17 // frame caches and deletes what's needed to maintain the cache size.
19 class FrameCacheItem
: public CacheItemBase
31 class FrameCache
: public CacheBase
37 // Returns 1 if frame exists in cache and copies it to the frame argument.
38 int get_frame(VFrame
*frame
,
41 // Returns pointer to cache entry if frame exists or 0.
42 // If a frame is found, the frame cache is left in the locked state until
43 // unlock is called. If nothing is found, the frame cache is unlocked before
44 // returning. This keeps the item from being deleted.
45 VFrame
* get_frame_ptr(int64_t position
,
50 // Puts the frame in cache.
51 // use_copy - if 1 a copy of the frame is made. if 0 the argument is stored.
52 // The copy of the frame is deleted by FrameCache in a future delete_oldest.
53 void put_frame(VFrame
*frame
,
64 // Return 1 if matching frame exists.
66 int frame_exists(VFrame
*format
,
69 FrameCacheItem
**item_return
);
70 int frame_exists(int64_t position
,
75 FrameCacheItem
**item_return
);