|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Backend-agnostic interface for sequential data storage and transformation. More...
#include <Buffer.hpp>
Inheritance diagram for MayaFlux::Buffers::Buffer:
Collaboration diagram for MayaFlux::Buffers::Buffer:Public Member Functions | |
| virtual | ~Buffer ()=default |
| Virtual destructor for proper resource management. | |
| virtual void | clear ()=0 |
| Resets all data values in the buffer. | |
| virtual void | process_default ()=0 |
| Applies the default transformation to the buffer's data. | |
| virtual void | set_default_processor (std::shared_ptr< BufferProcessor > processor)=0 |
| Sets the default transformation processor for this buffer. | |
| virtual std::shared_ptr< BufferProcessor > | get_default_processor () const =0 |
| Gets the current default transformation processor. | |
| virtual std::shared_ptr< BufferProcessingChain > | get_processing_chain ()=0 |
| Gets the transformation chain attached to this buffer. | |
| virtual void | set_processing_chain (std::shared_ptr< BufferProcessingChain > chain, bool force=false)=0 |
| Sets the transformation chain for this buffer. | |
| virtual bool | has_data_for_cycle () const =0 |
| Checks if the buffer has data for the current processing cycle. | |
| virtual bool | needs_removal () const =0 |
| Checks if the buffer should be removed from processing chains. | |
| virtual void | mark_for_processing (bool has_data)=0 |
| Marks the buffer's data availability for the current processing cycle. | |
| virtual void | mark_for_removal ()=0 |
| Marks the buffer for removal from processing chains. | |
| virtual void | enforce_default_processing (bool should_process)=0 |
| Controls whether the buffer should use default processing. | |
| virtual bool | needs_default_processing ()=0 |
| Checks if the buffer should undergo default processing. | |
| virtual bool | try_acquire_processing ()=0 |
| Attempts to acquire processing rights for the buffer. | |
| virtual void | release_processing ()=0 |
| Releases processing rights for the buffer. | |
| virtual bool | is_processing () const =0 |
| Checks if the buffer is currently being processed. | |
| virtual std::shared_ptr< Buffer > | clone_to (uint8_t dest_desc)=0 |
| Creates a clone of this buffer for a specific channel or usage enum. | |
| virtual void | force_internal_usage (bool internal)=0 |
| Marks the buffer as internal-only, preventing root aggregation. | |
| virtual bool | is_internal_only () const =0 |
| Checks if the buffer is marked as internal-only. | |
Backend-agnostic interface for sequential data storage and transformation.
Buffer provides a unified interface for all buffer types in the MayaFlux engine, supporting multiple data types and processing backends. Buffers store sequential data samples and provide mechanisms for transforming that data through attached processors. Unlike nodes which operate on individual values, buffers process blocks of data, enabling efficient batch operations and transformations.
The Buffer interface is designed to be backend-agnostic and data-type agnostic, allowing for concrete implementations like AudioBuffer, VideoBuffer, TextureBuffer, and other specialized buffer types. This mirrors the processing token architecture used in the node system, where different backends handle different types of data processing.
Buffers can:
The buffer system complements the node system by providing block-based processing capabilities, which are more efficient for certain operations and essential for interfacing with hardware and external systems that operate on data blocks. Different buffer types can be managed centrally while maintaining type-specific processing capabilities through their concrete implementations.
Definition at line 37 of file Buffer.hpp.