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

◆ decode_thread_func()

void MayaFlux::IO::CameraReader::decode_thread_func ( )
private

Definition at line 300 of file CameraReader.cpp.

301{
302 while (!m_decode_stop.load()) {
303 {
304 std::unique_lock lock(m_decode_mutex);
305 m_decode_cv.wait(lock, [this] {
306 return m_decode_stop.load()
307 || m_frame_requested.load(std::memory_order_relaxed);
308 });
309 }
310
311 if (m_decode_stop.load())
312 break;
313
314 m_frame_requested.store(false, std::memory_order_relaxed);
315
316 auto container = m_container_ref.lock();
317 if (container)
318 pull_frame(container);
319 }
320
321 m_decode_active.store(false);
322}
std::atomic< bool > m_decode_stop
std::atomic< bool > m_decode_active
std::atomic< bool > m_frame_requested
std::weak_ptr< Kakshya::CameraContainer > m_container_ref
std::condition_variable m_decode_cv
bool pull_frame(const std::shared_ptr< Kakshya::CameraContainer > &container)
Decode one frame from the device into the container's m_data[0].

References m_container_ref, m_decode_active, m_decode_cv, m_decode_mutex, m_decode_stop, m_frame_requested, and pull_frame().

Referenced by start_decode_thread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: