|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Assembles the layers of a TextureArrayBuffer from whatever feeds them, so a fragment shader can build one picture out of many. More...
#include <Chimera.hpp>
Collaboration diagram for MayaFlux::Kriya::Chimera:Classes | |
| struct | Layer |
| struct | State |
Public Member Functions | |
| Chimera ()=default | |
| void | cut (size_t layer, double seconds) |
| Jump a ring or collection layer to a moment this many seconds behind the live head. | |
| size_t | layer_count () const |
| Number of layers. | |
| void | level (size_t layer, double weight) |
| Set the weight of one layer in the buffer's push constants. | |
| void | params (size_t layer, const glm::vec4 &values) |
| Set the params of one layer in the buffer's per-layer data. | |
| void | set (size_t layer, Kakshya::ImageData image) |
| Replace the layer's content with a still image, delivered on the next frame. | |
| void | set (size_t layer, std::shared_ptr< Core::VKImage > image) |
| Replace the layer's content with a GPU image copied every frame. | |
| void | set (size_t layer, std::shared_ptr< Kakshya::DynamicVideoStream > ring) |
| Replace the layer's content with a ring, read as the layer's lag or speed say. | |
| void | set (size_t layer, std::shared_ptr< Kakshya::TextureCollection > collection, double frame_rate=0.0) |
| Replace the layer's content with a texture collection, read as the layer's lag or speed say. | |
| void | speed (size_t layer, double ratio) |
| Change the speed of a freely playing layer. | |
| void | stop () |
| Stop feeding. | |
Static Private Member Functions | |
| static void | collect (State &state, Layer &layer, uint32_t index, double elapsed) |
| static void | feed (State &state, Layer &layer, uint32_t index, double elapsed) |
| static void | place (const State &state, Layer &layer, uint64_t head, double rate, double nearest, double elapsed) |
| static void | stamp (State &state, uint32_t index, const glm::vec4 &timing) |
| static void | tick (State &state, uint64_t frame) |
Private Attributes | |
| std::shared_ptr< void > | m_guard |
| std::shared_ptr< State > | m_state |
Friends | |
| class | ChimeraBuilder |
Assembles the layers of a TextureArrayBuffer from whatever feeds them, so a fragment shader can build one picture out of many.
A layer holds a still image, a GPU image copied every frame, or a moment of a ring or a texture collection that is still being recorded. Moments are read at a lag behind the write head, with a lag that varies in time, or played freely from where the layer entered, forward, held or backward, optionally smoothed between frames. A layer can be cut to another moment, or given a new source, while running. Layers are numbered in declaration order, enter after their own delay, and refresh every frame or every few. Copies share the same layers, and the set stops when the last copy goes.
A lagged layer stays at least two frames behind the frame being written. A layer whose position falls outside what the ring still holds keeps its last frame and reports once. stop() holds every layer on its last frame.
Built from a buffer with ChimeraBuilder or create_chimera. The layers are fed by the cycles of the builder's pipeline, one per frame, after whatever the pipeline records. What the layers mean on screen is the buffer's fragment shader. Call the controls from the frame clock.
Definition at line 51 of file Chimera.hpp.