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

◆ run_one_frame()

bool MayaFlux::IO::SpatialCapture::run_one_frame ( CaptureState state)
staticprivate

One tick: write every source's stream.

Returns
False if any source's capture_frame() call fails, which ends the routine.

A private static member, not a free function, because CaptureState is a private nested type: only SpatialCapture's own members can name it.

Definition at line 55 of file SpatialTransfer.cpp.

56{
57 if (state.max_frames != 0 && state.frame.load(std::memory_order_relaxed) >= state.max_frames) {
58 return false;
59 }
60
61 if (!run_sources(*state.cache, state.sources)) {
63 "SpatialCapture: failed at frame {}", state.frame.load(std::memory_order_relaxed));
64 return false;
65 }
66
67 state.frame.fetch_add(1, std::memory_order_relaxed);
68 return true;
69}
#define MF_ERROR(comp, ctx,...)
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.

References MayaFlux::IO::SpatialCapture::CaptureState::cache, MayaFlux::Journal::FileIO, MayaFlux::IO::SpatialCapture::CaptureState::frame, MayaFlux::Journal::IO, MayaFlux::IO::SpatialCapture::CaptureState::max_frames, MF_ERROR, and MayaFlux::IO::SpatialCapture::CaptureState::sources.

Referenced by start().

+ Here is the caller graph for this function: