Blender V5.3
blender::seq::MovieReaderCache Struct Reference

Public Member Functions

 MovieReaderCache ()=default
 ~MovieReaderCache ()=default
MovieReaderAccessor acquire (const MovieReaderKey &key, int frame_index, uint64_t timestamp)
MovieReaderAccessor acquire_any (const MovieReaderKey &key)
void invalidate (const std::string &source_filepath)
void clear ()
void release (MovieReaderCacheEntry &entry)
void reader_open (MovieReaderCacheEntry &entry)
bool reader_ensure_initialized (MovieReaderCacheEntry &entry)
bool remove_oldest_stale_entry ()
void remove_excess_entries ()

Public Attributes

Mutex mutex_
Vector< std::unique_ptr< MovieReaderCacheEntry > > entries_
uint64_t timestamp_counter_ = 0

Static Public Attributes

static constexpr int64_t max_entries = 16
static constexpr uint64_t stale_after_timestamps = 8
static constexpr int backward_seek_penalty = 32

Detailed Description

Definition at line 87 of file movie_reader_cache.cc.

Constructor & Destructor Documentation

◆ MovieReaderCache()

blender::seq::MovieReaderCache::MovieReaderCache ( )
default

◆ ~MovieReaderCache()

blender::seq::MovieReaderCache::~MovieReaderCache ( )
default

Member Function Documentation

◆ acquire()

◆ acquire_any()

◆ clear()

◆ invalidate()

◆ reader_ensure_initialized()

◆ reader_open()

◆ release()

void blender::seq::MovieReaderCache::release ( MovieReaderCacheEntry & entry)

◆ remove_excess_entries()

void blender::seq::MovieReaderCache::remove_excess_entries ( )

Definition at line 132 of file movie_reader_cache.cc.

References entries_, max_entries, and remove_oldest_stale_entry().

Referenced by acquire(), and ~MovieReaderCache().

◆ remove_oldest_stale_entry()

bool blender::seq::MovieReaderCache::remove_oldest_stale_entry ( )

Member Data Documentation

◆ backward_seek_penalty

int blender::seq::MovieReaderCache::backward_seek_penalty = 32
staticconstexpr

Definition at line 90 of file movie_reader_cache.cc.

Referenced by acquire().

◆ entries_

Vector<std::unique_ptr<MovieReaderCacheEntry> > blender::seq::MovieReaderCache::entries_

◆ max_entries

int64_t blender::seq::MovieReaderCache::max_entries = 16
staticconstexpr

Definition at line 88 of file movie_reader_cache.cc.

Referenced by acquire(), and remove_excess_entries().

◆ mutex_

Mutex blender::seq::MovieReaderCache::mutex_

Definition at line 92 of file movie_reader_cache.cc.

Referenced by acquire(), acquire_any(), clear(), invalidate(), and release().

◆ stale_after_timestamps

uint64_t blender::seq::MovieReaderCache::stale_after_timestamps = 8
staticconstexpr

Definition at line 89 of file movie_reader_cache.cc.

Referenced by remove_oldest_stale_entry().

◆ timestamp_counter_

uint64_t blender::seq::MovieReaderCache::timestamp_counter_ = 0

Definition at line 94 of file movie_reader_cache.cc.

Referenced by acquire(), and remove_oldest_stale_entry().


The documentation for this struct was generated from the following file: