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

◆ stop_recording()

std::future< bool > MayaFlux::IO::VideoFileWriter::stop_recording ( )

Definition at line 180 of file VideoFileWriter.cpp.

181{
182 const uint32_t obs_id = m_observer_id.exchange(0, std::memory_order_acq_rel);
183
184 if (obs_id != 0) {
186 .get_service<Registry::Service::DisplayService>();
187 if (svc && svc->unregister_frame_observer && m_capture_window) {
188 svc->unregister_frame_observer(
189 std::static_pointer_cast<void>(m_capture_window), obs_id);
190 }
191
193 m_capture_window->set_capture_enabled(false);
194 m_capture_did_enable = false;
195 }
196
197 m_capture_window.reset();
198 }
199
200 if (m_open.load(std::memory_order_acquire))
201 return close();
202
203 std::promise<bool> p;
204 p.set_value(false);
205 return p.get_future();
206}
std::atomic< uint32_t > m_observer_id
std::shared_ptr< Core::Window > m_capture_window
Interface * get_service()
Query for a backend service.
static BackendRegistry & instance()
Get the global registry instance.

References close(), MayaFlux::Registry::BackendRegistry::get_service(), MayaFlux::Registry::BackendRegistry::instance(), m_capture_did_enable, m_capture_window, m_observer_id, m_open, and MayaFlux::Registry::Service::DisplayService::unregister_frame_observer.

Referenced by record(), and ~VideoFileWriter().

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