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

◆ ~VideoFileWriter()

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

Definition at line 78 of file VideoFileWriter.cpp.

79{
80 if (m_observer_id.load(std::memory_order_acquire) != 0) {
81 stop_recording().get();
82 } else if (m_open.load(std::memory_order_acquire) && !m_closing.exchange(true)) {
83 auto fut = close();
84 if (fut.wait_for(std::chrono::seconds(5)) == std::future_status::timeout) {
86 "VideoFileWriter destructor timed out; worker detached, file may be incomplete");
87 m_worker.detach();
88 return;
89 }
90 }
91 if (m_worker.joinable())
92 m_worker.join();
93}
#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: