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

◆ save_volume() [2/2]

bool MayaFlux::IO::IOManager::save_volume ( Kakshya::VolumeData  data,
const std::string &  filepath,
const IO::VolumeWriteOptions &  options = {} 
)

Save an already-downloaded VolumeData to disk asynchronously.

Purely CPU-bound from here, so no thread restrictions on the caller. Encode and disk flush are dispatched to a worker; failures are logged but do not block.

The extension of filepath selects the writer via VolumeWriterRegistry. For synchronous semantics use the IO::save_volume free function in VolumeTransfer.hpp, and for a numbered frame sequence use IO::VolumeCapture.

Returns
True if the encode task was queued.

Definition at line 1314 of file IOManager.cpp.

1318{
1319 track_save_task(std::async(std::launch::async,
1320 [data = std::move(data),
1321 filepath,
1322 options]() -> bool {
1323 return Detail::execute_volume_write(filepath, data, options);
1324 }));
1325
1326 return true;
1327}
void track_save_task(std::future< bool > fut)
Retain a save task in m_save_tasks and opportunistically reclaim finished ones.
bool execute_volume_write(const std::string &filepath, const Kakshya::VolumeData &data, const VolumeWriteOptions &options)

References MayaFlux::IO::Detail::execute_volume_write(), and track_save_task().

Referenced by capture_volume().

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