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

Method GetFrames

src/CacheDisk.cpp:227–241  ·  view source on GitHub ↗

@brief Get an array of all Frames

Source from the content-addressed store, hash-verified

225
226// @brief Get an array of all Frames
227std::vector<std::shared_ptr<openshot::Frame>> CacheDisk::GetFrames()
228{
229 // Create a scoped lock, to protect the cache from multiple threads
230 const std::lock_guard<std::recursive_mutex> lock(*cacheMutex);
231
232 std::vector<std::shared_ptr<openshot::Frame>> all_frames;
233 std::vector<int64_t>::iterator itr_ordered;
234 for(itr_ordered = ordered_frame_numbers.begin(); itr_ordered != ordered_frame_numbers.end(); ++itr_ordered)
235 {
236 int64_t frame_number = *itr_ordered;
237 all_frames.push_back(GetFrame(frame_number));
238 }
239
240 return all_frames;
241}
242
243// Get the smallest frame number (or NULL shared_ptr if no frame is found)
244std::shared_ptr<Frame> CacheDisk::GetSmallestFrame()

Callers 1

CheckWorkingFramesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected