|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Records a numbered .vdb sequence from a running volume. More...
#include <VolumeTransfer.hpp>
Collaboration diagram for MayaFlux::IO::VolumeCapture:Public Member Functions | |
| uint32_t | frames_written () const |
| bool | is_recording () const |
| VolumeCapture & | operator= (const VolumeCapture &)=delete |
| void | start (uint32_t max_frames=0, uint64_t frame_interval=1) |
| Spawn the capture routine, resetting the frame counter. | |
| void | stop () |
| Cancel the capture routine. | |
| VolumeCapture (const VolumeCapture &)=delete | |
| VolumeCapture (Vruta::TaskScheduler &scheduler, std::shared_ptr< Buffers::VolumeGridBuffer > volume, std::string path_pattern, std::vector< std::string > field_names={}, VolumeWriteOptions options={}, VolumeWriteHook write=nullptr) | |
| ~VolumeCapture () | |
Private Member Functions | |
| bool | capture_frame () |
| One frame's readback and write. | |
Private Attributes | |
| std::vector< std::string > | m_fields |
| uint32_t | m_frame {} |
| uint32_t | m_max_frames {} |
| VolumeWriteOptions | m_options |
| std::string | m_pattern |
| bool | m_recording {} |
| Vruta::TaskScheduler & | m_scheduler |
| std::string | m_task_name |
| std::shared_ptr< Buffers::VolumeGridBuffer > | m_volume |
| VolumeWriteHook | m_write |
Records a numbered .vdb sequence from a running volume.
No volumetric format carries time, so an animation is a folder of files with a contiguous numeric suffix that a DCC steps through per scene frame.
start() spawns a GraphicsRoutine that reads one frame and suspends on a FrameDelay, so capture advances on the frame clock with no polling and no driver loop. The routine resumes on the graphics thread, which is where command queue access lives, so the readback is legal by construction rather than by convention. stop() cancels the task by name.
The frame counter belongs to the capture, not to the clock, so numbering stays contiguous whatever interval is used and whenever recording began.
Readback is not free. Six fields at 128 cubed is roughly 76 MB per frame before compression, and both the transfer and the encode happen on the graphics thread. Capture on a coarse interval, and expect the frame it runs on to cost.
A failed frame stops the capture. A sequence with a hole in it is worse than a short one: a DCC reading the gap either stops early or repeats a frame, and neither is visible until someone renders.
Definition at line 158 of file VolumeTransfer.hpp.