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
32 class FrameCache
: public CacheBase
38 // Returns 1 if frame exists in cache and copies it to the frame argument.
39 int get_frame(VFrame
*frame
,
44 // Returns pointer to cache entry if frame exists or 0.
45 // If a frame is found, the frame cache is left in the locked state until
46 // unlock is called. If nothing is found, the frame cache is unlocked before
47 // returning. This keeps the item from being deleted.
48 // asset - supplied by user if the cache is not part of a file.
49 VFrame
* get_frame_ptr(int64_t position
,
56 // Puts the frame in cache.
57 // use_copy - if 1 a copy of the frame is made. if 0 the argument is stored.
58 // The copy of the frame is deleted by FrameCache in a future delete_oldest.
59 // asset - supplied by user if the cache is not part of a file.
60 void put_frame(VFrame
*frame
,
65 Asset_GC asset
= Asset_GC());
75 // Return 1 if matching frame exists.
77 int frame_exists(VFrame
*format
,
81 FrameCacheItem
**item_return
,
83 int frame_exists(int64_t position
,
89 FrameCacheItem
**item_return
,
99 // c-file-style: "linux"