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

◆ capture_frame()

bool MayaFlux::IO::VolumeCapture::capture_frame ( )
private

One frame's readback and write.

Called from the routine body.

Returns
False on failure, which ends the routine.

Definition at line 264 of file VolumeTransfer.cpp.

265{
266 if (m_max_frames != 0 && m_frame >= m_max_frames) {
267 return false;
268 }
269
270 auto data = download_volume(m_volume, m_fields);
271 if (!data) {
273 "VolumeCapture: readback failed at frame {}", m_frame);
274 return false;
275 }
276
277 if (!m_write(std::move(*data), resolve_sequence_path(m_pattern, m_frame), m_options)) {
279 "VolumeCapture: write failed at frame {}", m_frame);
280 return false;
281 }
282
283 ++m_frame;
284 return true;
285}
#define MF_ERROR(comp, ctx,...)
std::vector< std::string > m_fields
std::shared_ptr< Buffers::VolumeGridBuffer > m_volume
std::string resolve_sequence_path(std::string_view pattern, uint64_t frame)
Substitute a frame index into a numbered output pattern.
std::optional< Kakshya::VolumeData > download_volume(const std::shared_ptr< Buffers::VolumeGridBuffer > &volume, const std::vector< std::string > &field_names)
Download named fields from a GPU-resident volume into host VolumeData.
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.

References MayaFlux::IO::download_volume(), MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, m_fields, m_frame, m_max_frames, m_options, m_pattern, m_volume, m_write, MF_ERROR, and MayaFlux::IO::resolve_sequence_path().

+ Here is the call graph for this function: