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

Method GetFrames

src/CacheMemory.cpp:100–114  ·  view source on GitHub ↗

@brief Get an array of all Frames

Source from the content-addressed store, hash-verified

98
99// @brief Get an array of all Frames
100std::vector<std::shared_ptr<openshot::Frame>> CacheMemory::GetFrames()
101{
102 // Create a scoped lock, to protect the cache from multiple threads
103 const std::lock_guard<std::recursive_mutex> lock(*cacheMutex);
104
105 std::vector<std::shared_ptr<openshot::Frame>> all_frames;
106 std::vector<int64_t>::iterator itr_ordered;
107 for(itr_ordered = ordered_frame_numbers.begin(); itr_ordered != ordered_frame_numbers.end(); ++itr_ordered)
108 {
109 int64_t frame_number = *itr_ordered;
110 all_frames.push_back(GetFrame(frame_number));
111 }
112
113 return all_frames;
114}
115
116// Get the smallest frame number (or NULL shared_ptr if no frame is found)
117std::shared_ptr<Frame> CacheMemory::GetSmallestFrame()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected