Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

FrameCache Class Reference

#include <framecache.h>

List of all members.

Public Member Functions

 FrameCache ()
 ~FrameCache ()
int get_frame (VFrame *frame, int64_t position, double frame_rate)
VFrame * get_frame_ptr (int64_t position, double frame_rate, int color_model, int w, int h)
void unlock ()
void put_frame (VFrame *frame, int64_t position, double frame_rate, int use_copy)
int delete_oldest ()
int64_t get_memory_usage ()
void dump ()

Private Member Functions

int frame_exists (VFrame *format, int64_t position, double frame_rate, int *item_return)
int frame_exists (int64_t position, double frame_rate, int color_model, int w, int h, int *item_return)

Private Attributes

Mutex * lock
int current_age
ArrayList< FrameCacheItem * > items
int64_t max_bytes


Detailed Description

Definition at line 30 of file framecache.h.


Constructor & Destructor Documentation

FrameCache::FrameCache  ) 
 

Definition at line 37 of file framecache.C.

References current_age, lock, and max_bytes.

FrameCache::~FrameCache  ) 
 

Definition at line 44 of file framecache.C.

References items, and lock.


Member Function Documentation

int FrameCache::delete_oldest  ) 
 

Definition at line 213 of file framecache.C.

References items, and lock.

Referenced by File::purge_cache().

void FrameCache::dump  ) 
 

Definition at line 238 of file framecache.C.

References FrameCacheItem::age, FrameCacheItem::data, FrameCacheItem::frame_rate, items, lock, and FrameCacheItem::position.

int FrameCache::frame_exists int64_t  position,
double  frame_rate,
int  color_model,
int  w,
int  h,
int *  item_return
[private]
 

Definition at line 176 of file framecache.C.

References FrameCacheItem::data, FrameCacheItem::frame_rate, items, and FrameCacheItem::position.

int FrameCache::frame_exists VFrame *  format,
int64_t  position,
double  frame_rate,
int *  item_return
[private]
 

Definition at line 157 of file framecache.C.

References FrameCacheItem::data, FrameCacheItem::frame_rate, items, and FrameCacheItem::position.

Referenced by get_frame(), get_frame_ptr(), and put_frame().

int FrameCache::get_frame VFrame *  frame,
int64_t  position,
double  frame_rate
 

Definition at line 52 of file framecache.C.

References FrameCacheItem::age, current_age, FrameCacheItem::data, frame_exists(), items, and lock.

Referenced by File::read_frame().

VFrame * FrameCache::get_frame_ptr int64_t  position,
double  frame_rate,
int  color_model,
int  w,
int  h
 

Definition at line 76 of file framecache.C.

References FrameCacheItem::age, current_age, FrameCacheItem::data, frame_exists(), items, and lock.

Referenced by ResourcePixmap::draw_video_resource().

int64_t FrameCache::get_memory_usage  ) 
 

Definition at line 200 of file framecache.C.

References FrameCacheItem::data, items, and lock.

Referenced by File::get_memory_usage().

void FrameCache::put_frame VFrame *  frame,
int64_t  position,
double  frame_rate,
int  use_copy
 

Definition at line 114 of file framecache.C.

References FrameCacheItem::age, current_age, FrameCacheItem::data, frame_exists(), FrameCacheItem::frame_rate, items, lock, and FrameCacheItem::position.

Referenced by ResourcePixmap::draw_video_resource(), and File::read_frame().

void FrameCache::unlock  ) 
 

Definition at line 107 of file framecache.C.

References lock.

Referenced by ResourcePixmap::draw_video_resource().


Member Data Documentation

int FrameCache::current_age [private]
 

Definition at line 84 of file framecache.h.

Referenced by FrameCache(), get_frame(), get_frame_ptr(), and put_frame().

ArrayList<FrameCacheItem*> FrameCache::items [private]
 

Definition at line 85 of file framecache.h.

Referenced by delete_oldest(), dump(), frame_exists(), get_frame(), get_frame_ptr(), get_memory_usage(), put_frame(), and ~FrameCache().

Mutex* FrameCache::lock [private]
 

Definition at line 82 of file framecache.h.

Referenced by delete_oldest(), dump(), FrameCache(), get_frame(), get_frame_ptr(), get_memory_usage(), put_frame(), unlock(), and ~FrameCache().

int64_t FrameCache::max_bytes [private]
 

Definition at line 87 of file framecache.h.

Referenced by FrameCache().


The documentation for this class was generated from the following files:
Generated on Sun Jan 8 13:39:15 2006 for Cinelerra-svn by  doxygen 1.4.4