|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
SignalSourceContainer wrapping a live GLFW/Vulkan window surface. More...
#include <WindowContainer.hpp>
Inheritance diagram for MayaFlux::Kakshya::WindowContainer:
Collaboration diagram for MayaFlux::Kakshya::WindowContainer:Public Member Functions | |
| void | add_region_group (const RegionGroup &group) override |
| Add a named group of regions to the container. | |
| void | advance_write_head () |
| Advance the write head index, wrapping around frame_capacity. | |
| std::vector< DataAccess > | all_channel_data () override |
| Get all channel data as accessors. | |
| bool | all_dimensions_consumed () const override |
| Check if all active dimensions have been consumed in this cycle. | |
| DataAccess | channel_data (size_t channel_index) override |
| Get channel data with semantic interpretation. | |
| void | clear () override |
| Clear all data in the container. | |
| uint64_t | coordinates_to_linear_index (const std::vector< uint64_t > &coordinates) const override |
| Convert coordinates to linear index based on current memory layout. | |
| void | create_default_processor () override |
| Create and configure a default processor for this container. | |
| std::unordered_map< std::string, RegionGroup > | get_all_region_groups () const override |
| Get all region groups in the container. | |
| const std::vector< DataVariant > & | get_data () override |
| Get a reference to the raw data stored in the container. | |
| std::shared_ptr< DataProcessor > | get_default_processor () const override |
| Get the current default data processor. | |
| std::vector< DataDimension > | get_dimensions () const override |
| Get the dimensions describing the structure of the data. | |
| uint32_t | get_frame_capacity () const |
| uint64_t | get_frame_size () const override |
| Get the number of elements that constitute one "frame". | |
| Portal::Graphics::ImageFormat | get_image_format () const |
| Portal ImageFormat corresponding to the live swapchain surface format. | |
| MemoryLayout | get_memory_layout () const override |
| Get the memory layout used by this container. | |
| uint64_t | get_num_frames () const override |
| Get the number of frames in the primary (temporal) dimension. | |
| const std::vector< DataVariant > & | get_processed_data () const override |
| Get a const reference to the processed data buffer. | |
| std::vector< DataVariant > & | get_processed_data () override |
| Get a mutable reference to the processed data buffer. | |
| std::shared_ptr< DataProcessingChain > | get_processing_chain () override |
| Get the current processing chain for this container. | |
| ProcessingState | get_processing_state () const override |
| Get the current processing state of the container. | |
| const void * | get_raw_data () const override |
| Get a raw pointer to the underlying data storage. | |
| std::vector< DataVariant > | get_region_data (const Region ®ion) const override |
Extract data for all regions across all region groups that spatially intersect region. | |
| RegionGroup | get_region_group (const std::string &name) const override |
| Get a region group by name. | |
| std::vector< DataVariant > | get_region_group_data (const RegionGroup &group) const override |
| Get data for multiple regions efficiently. | |
| std::vector< DataVariant > | get_segments_data (const std::vector< RegionSegment > &segments) const override |
| Get data for multiple region segments efficiently. | |
| const ContainerDataStructure & | get_structure () const override |
| ContainerDataStructure & | get_structure () override |
| Get the data structure defining this container's layout. | |
| uint64_t | get_total_elements () const override |
| Get the total number of elements in the container. | |
| std::shared_ptr< Core::Window > | get_window () const |
| The underlying window. | |
| uint32_t | get_write_head () const |
| Current write head index in m_data, advanced by the default processor after each readback. | |
| void | handle_surface_resize () |
| Reallocate m_data and m_processed_data to match the current window dimensions. | |
| bool | has_active_readers () const override |
| Check if any dimensions currently have active readers. | |
| bool | has_data () const override |
| Check if the container currently holds any data. | |
| std::shared_ptr< Core::VKImage > | image_at (uint32_t frame_index) const |
| Upload m_data[frame_index] to a new VKImage. | |
| std::shared_ptr< Core::VKImage > | image_at (uint32_t frame_index, const std::shared_ptr< Buffers::VKBuffer > &staging) const |
| Upload m_data[frame_index] reusing a caller-supplied staging buffer. | |
| void | invalidate_float_frame_cache (uint32_t frame_index=0) |
| Invalidate the normalised float cache for a specific processed_data slot. | |
| bool | is_ready_for_processing () const override |
| Check if the container is ready for processing. | |
| bool | is_region_loaded (const Region ®ion) const override |
| Always returns true. | |
| std::vector< uint64_t > | linear_index_to_coordinates (uint64_t linear_index) const override |
| Convert linear index to coordinates based on current memory layout. | |
| void | load_region (const Region ®ion) override |
| No-op. | |
| void | mark_buffers_for_processing (bool) override |
| Mark associated buffers for processing in the next cycle. | |
| void | mark_buffers_for_removal () override |
| Mark associated buffers for removal from the system. | |
| void | mark_dimension_consumed (uint32_t dimension_index, uint32_t reader_id) override |
| Mark a dimension as consumed for the current processing cycle. | |
| void | mark_ready_for_processing (bool ready) override |
| Mark the container as ready or not ready for processing. | |
| uint8_t * | mutable_frame_ptr (uint32_t frame_index) |
| Mutable pointer into m_data[frame_index] for the processor to write into. | |
| WindowContainer & | operator= (const WindowContainer &)=delete |
| WindowContainer & | operator= (WindowContainer &&)=delete |
| void | process_default () override |
| Process the container's data using the default processor. | |
| std::span< const float > | processed_frame_as_float (uint32_t frame_index=0) const |
| processed_data[frame_index] as a normalised float span. | |
| std::shared_ptr< Core::VKImage > | region_to_image (const Region ®ion) const |
| Crop a region from the last readback and upload it as a VKImage. | |
| uint32_t | register_dimension_reader (uint32_t dimension_index) override |
| Register a reader for a specific dimension. | |
| void | register_state_change_callback (std::function< void(const std::shared_ptr< SignalSourceContainer > &, ProcessingState)> callback) override |
| Register a callback to be invoked on processing state changes. | |
| void | remove_region_group (const std::string &name) override |
| Remove a region group by name. | |
| void | set_default_processor (const std::shared_ptr< DataProcessor > &processor) override |
| Set the default data processor for this container. | |
| void | set_memory_layout (MemoryLayout layout) override |
| Set the memory layout for this container. | |
| void | set_processing_chain (const std::shared_ptr< DataProcessingChain > &chain) override |
| Set the processing chain for this container. | |
| void | set_region_data (const Region ®ion, const std::vector< DataVariant > &data) override |
| Set data for a specific region. | |
| void | set_structure (ContainerDataStructure s) override |
| Set the data structure for this container. | |
| std::shared_ptr< Core::VKImage > | to_image () const |
| Upload the full surface readback to a new VKImage. | |
| std::shared_ptr< Core::VKImage > | to_image (const std::shared_ptr< Buffers::VKBuffer > &staging) const |
| Upload the full surface readback to a new VKImage, reusing a caller-supplied persistent staging buffer. | |
| void | unload_region (const Region ®ion) override |
| No-op. | |
| void | unregister_dimension_reader (uint32_t dimension_index) override |
| Unregister a reader for a specific dimension. | |
| void | unregister_state_change_callback () override |
| Unregister the state change callback, if any. | |
| void | update_processing_state (ProcessingState new_state) override |
| Update the processing state of the container. | |
| std::type_index | value_element_type () const override |
| Runtime query for the native scalar element type of this container. | |
| WindowContainer (const WindowContainer &)=delete | |
| WindowContainer (std::shared_ptr< Core::Window > window, uint32_t frame_capacity=60) | |
| Construct from an existing managed window. | |
| WindowContainer (WindowContainer &&)=delete | |
| ~WindowContainer () override=default | |
Public Member Functions inherited from MayaFlux::Kakshya::SignalSourceContainer | |
| ~SignalSourceContainer () override=default | |
Public Member Functions inherited from MayaFlux::Kakshya::NDDataContainer | |
| auto | get_frame (uint64_t frame_index) const -> FrameView |
| Get a single frame of data efficiently. | |
| template<DataVariantElement T> | |
| auto | get_frame_as (uint64_t frame_index) const -> std::span< const T > |
| Get a single frame of data as a typed span. | |
| template<DataVariantElement T> | |
| void | get_frames (std::span< T > output, uint64_t start_frame, uint64_t num_frames) const |
| Get multiple frames efficiently. | |
| template<DataVariantElement T> | |
| void | get_frames_as (std::vector< T > &output, uint64_t start_frame, uint64_t num_frames) const |
| Get multiple frames efficiently as a typed span. | |
| template<DataVariantElement T> | |
| T | get_value_at (const std::vector< uint64_t > &coordinates) const |
| Read a single element at the given N-dimensional coordinates. | |
| template<DataVariantElement T> | |
| void | set_value_at (const std::vector< uint64_t > &coordinates, T value) |
| Write a single element at the given N-dimensional coordinates. | |
| virtual | ~NDDataContainer ()=default |
Protected Member Functions | |
| auto | get_frame_span_impl (uint64_t frame_index) const -> DataSpanVariant override |
| Implementation-specific method to retrieve a frame span. | |
| void | get_frames_impl (void *output, size_t count, uint64_t start_frame, uint64_t num_frames, const std::type_info &type) const override |
| Implementation-specific method to retrieve multiple frames. | |
| void | get_value_impl (const std::vector< uint64_t > &coords, void *out, const std::type_info &type) const override |
| Type-erased single-element read. | |
| void | set_value_impl (const std::vector< uint64_t > &coords, const void *in, const std::type_info &type) override |
| Type-erased single-element write. | |
Private Member Functions | |
| auto | get_frame_typed (uint64_t frame_index) const -> std::span< const uint8_t > |
| void | get_frames_typed (std::span< uint8_t > output, uint64_t start_frame, uint64_t num_frames) const |
| void | setup_dimensions () |
SignalSourceContainer wrapping a live GLFW/Vulkan window surface.
Exposes a window's rendered surface as addressable N-dimensional data. Dimensions follow IMAGE_COLOR convention: dims[0] → SPATIAL_Y (height) dims[1] → SPATIAL_X (width) dims[2] → CHANNEL
Region semantics: Regions are registered through the inherited RegionGroup API (add_region_group / get_all_region_groups / remove_region_group). load_region() and unload_region() are no-ops on this container — all surface data is always available after a GPU readback; region selection is a processor concern, not a container concern.
Processing model:
Write semantics (compositing) are deferred to a future processor.
Definition at line 54 of file WindowContainer.hpp.