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

◆ decode_thread_func()

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

Definition at line 309 of file CameraReader.cpp.

310{
311 while (!m_decode_stop.load()) {
312 {
313 std::unique_lock lock(m_decode_mutex);
314 m_decode_cv.wait(lock, [this] {
315 return m_decode_stop.load()
316 || m_frame_requested.load(std::memory_order_relaxed);
317 });
318 }
319
320 if (m_decode_stop.load())
321 break;
322
323 m_frame_requested.store(false, std::memory_order_relaxed);
324
325 auto container = m_container_ref.lock();
326 if (container)
327 pull_frame(container);
328 }
329
330 m_decode_active.store(false);
331}
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: