MayaFlux 1.0.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 56 of file SpatialTransfer.cpp.

57{
58 if (state.max_frames != 0 && state.frame.load(std::memory_order_relaxed) >= state.max_frames) {
59 return false;
60 }
61
62 if (!run_sources(*state.cache, state.sources)) {
64 "SpatialCapture: failed at frame {}", state.frame.load(std::memory_order_relaxed));
65 return false;
66 }
67
68 state.frame.fetch_add(1, std::memory_order_relaxed);
69 return true;
70}
#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 operator=(), and start().

Here is the caller graph for this function: