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

Method GetBytes

src/CacheMemory.cpp:140–155  ·  view source on GitHub ↗

Gets the maximum bytes value

Source from the content-addressed store, hash-verified

138
139// Gets the maximum bytes value
140int64_t CacheMemory::GetBytes()
141{
142 // Create a scoped lock, to protect the cache from multiple threads
143 const std::lock_guard<std::recursive_mutex> lock(*cacheMutex);
144
145 int64_t total_bytes = 0;
146
147 // Loop through frames, and calculate total bytes
148 std::deque<int64_t>::reverse_iterator itr;
149 for(itr = frame_numbers.rbegin(); itr != frame_numbers.rend(); ++itr)
150 {
151 total_bytes += frames[*itr]->GetBytes();
152 }
153
154 return total_bytes;
155}
156
157// Remove a specific frame
158void CacheMemory::Remove(int64_t frame_number)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected