MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_cached_segment()

std::optional< RegionCache > MayaFlux::Kakshya::RegionCacheManager::get_cached_segment ( const RegionSegment segment)

Definition at line 76 of file RegionCacheManager.cpp.

77{
78 if (!m_initialized) {
79 return std::nullopt;
80 }
81 try {
82 std::unique_lock<std::recursive_mutex> lock(m_mutex, std::try_to_lock);
83
84 if (!lock.owns_lock()) {
85 MF_WARN(Journal::Component::Kakshya, Journal::Context::Runtime, "Could not acquire mutex lock in get_cached_segment, potential deadlock avoided");
86 return std::nullopt;
87 }
88
89 return get_cached_region_internal(segment.source_region);
90 } catch (const std::exception& e) {
91 MF_ERROR(Journal::Component::Kakshya, Journal::Context::Runtime, "Exception in get_cached_segment: {}", e.what());
92 return std::nullopt;
93 } catch (...) {
94 MF_ERROR(Journal::Component::Kakshya, Journal::Context::Runtime, "Unknown exception in get_cached_segment");
95 return std::nullopt;
96 }
97}
#define MF_ERROR(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
std::optional< RegionCache > get_cached_region_internal(const Region &region)
@ Runtime
General runtime operations (default fallback)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.

References get_cached_region_internal(), MayaFlux::Journal::Kakshya, m_initialized, m_mutex, MF_ERROR, MF_WARN, MayaFlux::Journal::Runtime, and MayaFlux::Kakshya::RegionSegment::source_region.

+ Here is the call graph for this function: