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 held by File. CICache scans all the files for
15 // frame caches and deletes what's needed to maintain the cache size.
26 // Number of last get or put operation involving this object.
36 // Returns 1 if frame exists in cache and copies it to the frame argument.
37 int get_frame(VFrame
*frame
,
40 // Returns pointer to cache entry if frame exists or 0.
41 // If a frame is found, the frame cache is left in the locked state until
42 // unlock is called. If nothing is found, the frame cache is unlocked before
43 // returning. This keeps the item from being deleted.
44 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
,
58 // Delete oldest item. Return 0 if successful. Return 1 if nothing to delete.
61 // Calculate current size of cache in bytes
62 int64_t get_memory_usage();
69 // Return 1 if matching frame exists.
71 int frame_exists(VFrame
*format
,
75 int frame_exists(int64_t position
,
83 // Current get or put operation since creation of FrameCache object
85 ArrayList
<FrameCacheItem
*> items
;
86 // Maximum size of cache in bytes.