@brief Get an array of all Frames
| 98 | |
| 99 | // @brief Get an array of all Frames |
| 100 | std::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) |
| 117 | std::shared_ptr<Frame> CacheMemory::GetSmallestFrame() |
nothing calls this directly
no outgoing calls
no test coverage detected