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

Method GetBytes

src/CacheDisk.cpp:267–280  ·  view source on GitHub ↗

Gets the maximum bytes value

Source from the content-addressed store, hash-verified

265
266// Gets the maximum bytes value
267int64_t CacheDisk::GetBytes()
268{
269 // Create a scoped lock, to protect the cache from multiple threads
270 const std::lock_guard<std::recursive_mutex> lock(*cacheMutex);
271
272 int64_t total_bytes = 0;
273
274 // Loop through frames, and calculate total bytes
275 std::deque<int64_t>::reverse_iterator itr;
276 for(itr = frame_numbers.rbegin(); itr != frame_numbers.rend(); ++itr)
277 total_bytes += frame_size_bytes;
278
279 return total_bytes;
280}
281
282// Remove a specific frame
283void CacheDisk::Remove(int64_t frame_number)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected