|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Fundamental unit of operation in buffer processing pipelines. More...
#include <BufferOperation.hpp>
Collaboration diagram for MayaFlux::Kriya::BufferOperation:Public Types | |
| enum class | OpType : uint8_t { CAPTURE , TRANSFORM , ROUTE , LOAD , SYNC , CONDITION , BRANCH , DISPATCH , FUSE , MODIFY } |
| Defines the fundamental operation types in the processing pipeline. More... | |
Public Member Functions | |
| BufferOperation & | as_capture_phase () |
| Hint that this operation should execute in capture phase. | |
| BufferOperation & | as_process_phase () |
| Hint that this operation should execute in process phase. | |
| BufferOperation & | as_streaming () |
| Mark this operation as streaming (executes continuously) Useful for modify_buffer and similar stateful operations. | |
| BufferOperation (OpType type, BufferCapture capture) | |
| BufferOperation (OpType type, Buffers::ProcessingToken token) | |
| BufferOperation & | every_n_cycles (uint32_t n) |
| Set cycle interval for periodic execution. | |
| BufferOperation & | for_cycles (uint32_t count) |
| ExecutionPhase | get_execution_phase () const |
| Get the execution phase hint for this operation. | |
| std::shared_ptr< Kakshya::DynamicVideoStream > | get_graphics_stream () const |
| The dynamic video stream this operation writes to. | |
| uint8_t | get_priority () const |
| Getters for internal state (read-only) | |
| const std::string & | get_tag () const |
| Getters for user defined tag. | |
| Buffers::ProcessingToken | get_token () const |
| Return the operation's processing token. | |
| OpType | get_type () const |
| Getters for internal state (read-only) | |
| bool | is_streaming () const |
| Check if this operation is a streaming operation. | |
| BufferOperation & | on_token (Buffers::ProcessingToken token) |
| Set processing token for execution context. | |
| BufferOperation & | with_priority (uint8_t priority) |
| Set execution priority for scheduler ordering. | |
| BufferOperation & | with_tag (const std::string &tag) |
| Assign identification tag. | |
Static Public Member Functions | |
| static BufferOperation | capture (BufferCapture capture) |
| Create a capture operation using BufferCapture configuration. | |
| static BufferOperation | capture_camera (const std::shared_ptr< IO::IOManager > &io_manager, const IO::CameraConfig &config, BufferCapture::CaptureMode mode=BufferCapture::CaptureMode::TRANSIENT, uint32_t cycle_count=1, std::optional< Portal::Graphics::RenderConfig > render=std::nullopt) |
| Open and capture a camera through IOManager. | |
| static CaptureBuilder | capture_camera_from (const std::shared_ptr< IO::IOManager > &io_manager, const IO::CameraConfig &config, std::optional< Portal::Graphics::RenderConfig > render=std::nullopt) |
| Open a camera and return its capture builder. | |
| static BufferOperation | capture_file (const std::shared_ptr< IO::IOManager > &io_manager, const std::string &filepath, IO::VideoLoadConfig config, uint32_t cycle_count=1, std::optional< Portal::Graphics::RenderConfig > render=std::nullopt) |
| Capture a video file with explicit video load configuration. | |
| static BufferOperation | capture_file (const std::shared_ptr< IO::IOManager > &io_manager, const std::string &filepath, uint32_t channel=0, uint32_t cycle_count=0) |
| Create a file capture operation that reads from file and stores in stream. | |
| static CaptureBuilder | capture_file_from (const std::shared_ptr< IO::IOManager > &io_manager, const std::string &filepath, IO::VideoLoadConfig config, std::optional< Portal::Graphics::RenderConfig > render=std::nullopt) |
| Create a capture builder for a video file. | |
| static CaptureBuilder | capture_file_from (const std::shared_ptr< IO::IOManager > &io_manager, const std::string &filepath, uint32_t channel=0) |
| Create CaptureBuilder for file with fluent configuration. | |
| static CaptureBuilder | capture_from (std::nullptr_t) |
| static CaptureBuilder | capture_from (std::shared_ptr< Buffers::AudioBuffer > buffer) |
| Create a CaptureBuilder for fluent capture configuration. | |
| static CaptureBuilder | capture_from (std::shared_ptr< Buffers::VKBuffer > buffer, std::optional< Portal::Graphics::RenderConfig > render=std::nullopt) |
| static BufferOperation | capture_input (const std::shared_ptr< Buffers::BufferManager > &buffer_manager, uint32_t input_channel, BufferCapture::CaptureMode mode=BufferCapture::CaptureMode::ACCUMULATE, uint32_t cycle_count=0) |
| Create capture operation from input channel using convenience API. | |
| static CaptureBuilder | capture_input_from (const std::shared_ptr< Buffers::BufferManager > &buffer_manager, uint32_t input_channel) |
| Create CaptureBuilder for input channel with fluent configuration. | |
| static BufferOperation | capture_to_stream (const std::shared_ptr< IO::IOManager > &io_manager, const IO::CameraConfig &config, uint64_t ring_frames=0, std::optional< Portal::Graphics::RenderConfig > live=std::nullopt, std::optional< Portal::Graphics::RenderConfig > display=std::nullopt) |
| Capture a camera straight into a dynamic video stream it creates. | |
| static BufferOperation | capture_to_stream (const std::shared_ptr< IO::IOManager > &io_manager, const std::shared_ptr< Kakshya::VideoStreamContainer > &container, uint64_t ring_frames=0, std::optional< Portal::Graphics::RenderConfig > live=std::nullopt, std::optional< Portal::Graphics::RenderConfig > display=std::nullopt) |
| Capture an opened camera or loaded video into a dynamic video stream it creates. | |
| static BufferOperation | capture_to_stream (const std::shared_ptr< IO::IOManager > &io_manager, const std::string &filepath, IO::VideoLoadConfig config, uint64_t ring_frames=0, std::optional< Portal::Graphics::RenderConfig > live=std::nullopt, std::optional< Portal::Graphics::RenderConfig > display=std::nullopt) |
| Capture a video file straight into a dynamic video stream it creates. | |
| static BufferOperation | dispatch_to (OperationFunction handler, Buffers::ProcessingToken token=Buffers::ProcessingToken::AUDIO_BACKEND) |
| Create a dispatch operation for external processing. | |
| static BufferOperation | file_to_stream (const std::shared_ptr< IO::IOManager > &io_manager, const std::string &filepath, std::shared_ptr< Kakshya::DynamicSoundStream > target_stream, uint32_t cycle_count=0) |
| Create operation to route file data to DynamicSoundStream. | |
| static BufferOperation | file_to_stream (const std::shared_ptr< IO::IOManager > &io_manager, const std::string &filepath, std::shared_ptr< Kakshya::DynamicVideoStream > target_stream, IO::VideoLoadConfig config, uint32_t cycle_count=0, std::optional< Portal::Graphics::RenderConfig > render=std::nullopt) |
| Route frames from a video file to a dynamic video stream. | |
| static BufferOperation | fuse_containers (std::vector< std::shared_ptr< Kakshya::DynamicSoundStream > > sources, TransformVectorFunction fusion_func, std::shared_ptr< Kakshya::DynamicSoundStream > target) |
| Create a fusion operation for multiple DynamicSoundStream sources. | |
| static BufferOperation | fuse_containers (std::vector< std::shared_ptr< Kakshya::DynamicVideoStream > > sources, TransformVectorFunction fusion_func, std::shared_ptr< Kakshya::DynamicVideoStream > target) |
| Fuse video stream frames into a dynamic video stream. | |
| static BufferOperation | fuse_data (std::vector< std::shared_ptr< Buffers::AudioBuffer > > sources, TransformVectorFunction fusion_func, std::shared_ptr< Buffers::AudioBuffer > target) |
| Create a fusion operation for multiple AudioBuffer sources. | |
| static BufferOperation | fuse_data (std::vector< std::shared_ptr< Buffers::VKBuffer > > sources, TransformVectorFunction fusion_func, std::shared_ptr< Buffers::VKBuffer > target) |
| Fuse graphics buffer data into a graphics destination. | |
| static bool | is_capture_phase_operation (const BufferOperation &op) |
| static bool | is_process_phase_operation (const BufferOperation &op) |
| static BufferOperation | load_from_container (std::shared_ptr< Kakshya::DynamicSoundStream > source, std::shared_ptr< Buffers::AudioBuffer > target, uint64_t start_frame=0, uint32_t length=0) |
| Create a load operation from container to buffer. | |
| static BufferOperation | load_from_container (std::shared_ptr< Kakshya::DynamicVideoStream > source, std::shared_ptr< Buffers::VKBuffer > target, uint64_t start_frame=0, uint32_t length=0) |
| Load video frames from a dynamic stream into a graphics buffer. | |
| static BufferOperation | modify_buffer (std::shared_ptr< Buffers::AudioBuffer > buffer, Buffers::AudioProcessingFunction modifier) |
| Create a modify operation for direct buffer manipulation. | |
| static BufferOperation | modify_buffer (std::shared_ptr< Buffers::VKBuffer > buffer, Buffers::GraphicsProcessingFunction modifier) |
| Attach a graphics quick processor to a Vulkan buffer. | |
| static BufferOperation | route_to_buffer (std::shared_ptr< Buffers::AudioBuffer > target) |
| Create a routing operation to AudioBuffer destination. | |
| static BufferOperation | route_to_buffer (std::shared_ptr< Buffers::TextureArrayBuffer > target, std::vector< std::shared_ptr< Core::VKImage > > images) |
| Route many GPU images into the layers of a texture array buffer. | |
| static BufferOperation | route_to_buffer (std::shared_ptr< Buffers::TextureArrayBuffer > target, uint32_t layer=0) |
| Route frames into one layer of a texture array buffer. | |
| static BufferOperation | route_to_buffer (std::shared_ptr< Buffers::VKBuffer > target) |
| Route data to a graphics buffer. | |
| static BufferOperation | route_to_container (std::shared_ptr< Kakshya::DynamicSoundStream > target, uint32_t channel=0) |
| Create a routing operation to DynamicSoundStream destination. | |
| static BufferOperation | route_to_container (std::shared_ptr< Kakshya::DynamicVideoStream > target, std::optional< Portal::Graphics::RenderConfig > render=std::nullopt) |
| Append frames to a dynamic video stream. | |
| static BufferOperation | transform (TransformationFunction transformer, Buffers::ProcessingToken token=Buffers::ProcessingToken::AUDIO_BACKEND) |
| Create a transform operation with custom transformation function. | |
| static BufferOperation | when (std::function< bool(uint32_t)> condition, Buffers::ProcessingToken token=Buffers::ProcessingToken::AUDIO_BACKEND) |
| Create a conditional operation for pipeline branching. | |
Private Types | |
| enum class | ExecutionPhase : uint8_t { AUTO , CAPTURE , PROCESS } |
Friends | |
| class | BufferPipeline |
Fundamental unit of operation in buffer processing pipelines.
BufferOperation encapsulates discrete processing steps that can be composed into complex data flow pipelines. Each operation represents a specific action such as capturing data, transforming it, routing to destinations, or applying conditional logic. Operations are designed to be chainable and support sophisticated scheduling and priority management.
Operation Types:
Example Usage:
Definition at line 147 of file BufferOperation.hpp.