MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / SetCache

Method SetCache

src/Timeline.cpp:1188–1201  ·  view source on GitHub ↗

Set the cache object used by this reader

Source from the content-addressed store, hash-verified

1186
1187// Set the cache object used by this reader
1188void Timeline::SetCache(CacheBase* new_cache) {
1189 // Get lock (prevent getting frames while this happens)
1190 const std::lock_guard<std::recursive_mutex> lock(getFrameMutex);
1191
1192 // Destroy previous cache (if managed by timeline)
1193 if (managed_cache && final_cache) {
1194 delete final_cache;
1195 final_cache = NULL;
1196 managed_cache = false;
1197 }
1198
1199 // Set new cache
1200 final_cache = new_cache;
1201}
1202
1203// Generate JSON string of this object
1204std::string Timeline::Json() const {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected