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

◆ ~VideoFileWriter()

MayaFlux::IO::VideoFileWriter::~VideoFileWriter ( )

Definition at line 79 of file VideoFileWriter.cpp.

80{
81 if (m_observer_id.load(std::memory_order_acquire) != 0) {
82 stop_recording().get();
83 } else if (m_open.load(std::memory_order_acquire) && !m_closing.exchange(true)) {
84 auto fut = close();
85 if (fut.wait_for(std::chrono::seconds(5)) == std::future_status::timeout) {
87 "VideoFileWriter destructor timed out; worker detached, file may be incomplete");
88 m_worker.detach();
89 return;
90 }
91 }
92 if (m_worker.joinable())
93 m_worker.join();
94}
#define MF_ERROR(comp, ctx,...)
std::future< bool > stop_recording()
std::atomic< uint32_t > m_observer_id
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.

References close(), MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, m_closing, m_observer_id, m_open, m_worker, MF_ERROR, and stop_recording().

+ Here is the call graph for this function: