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

◆ decode_thread_func()

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

Definition at line 388 of file FFmpegCameraReader.cpp.

389{
390 while (!m_decode_stop.load()) {
391 {
392 std::unique_lock lock(m_decode_mutex);
393 m_decode_cv.wait(lock, [this] {
394 return m_decode_stop.load()
395 || m_frame_requested.load(std::memory_order_relaxed);
396 });
397 }
398
399 if (m_decode_stop.load())
400 break;
401
402 m_frame_requested.store(false, std::memory_order_relaxed);
403
404 auto container = m_container_ref.lock();
405 if (container)
406 pull_frame(container);
407 }
408
409 m_decode_active.store(false);
410}
std::weak_ptr< Kakshya::CameraContainer > m_container_ref
bool pull_frame(const std::shared_ptr< Kakshya::CameraContainer > &container) override
Produce one frame into the container.

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: