MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::internal Namespace Reference

Classes

struct  LiveArenaEntry
 Single directory entry mapping a string key to a location within the arena. More...
 
struct  LiveArenaHeader
 POD header block placed at the start of the arena storage. More...
 

Functions

uint32_t align_up (uint32_t value, uint32_t align) noexcept
 Aligns value up to the next multiple of align.
 
std::shared_ptr< Buffers::BufferProcessor > attach_quick_process_audio (Buffers::AudioProcessingFunction processor, const std::shared_ptr< Buffers::AudioBuffer > &buffer)
 
std::shared_ptr< Buffers::BufferProcessor > attach_quick_process_channels (Buffers::AudioProcessingFunction processor, std::initializer_list< unsigned int > channels)
 
std::shared_ptr< Buffers::BufferProcessor > attach_quick_process_graphics (Buffers::GraphicsProcessingFunction processor, const std::shared_ptr< Buffers::VKBuffer > &buffer)
 
void cleanup_engine ()
 
void cleanup_persistent_store ()
 
void enable_live_exposure () noexcept
 Turns on exposure for the MF_LIVE_EXPOSE macros in the linked library.
 
Core::Engine & get_or_create_engine ()
 
void * live_arena_alloc (const char *key, uint32_t size, uint32_t alignment) noexcept
 Allocates size bytes from the arena with alignment.
 
bool live_arena_expose (const char *key, std::shared_ptr< void > shared) noexcept
 Registers an externally owned shared_ptr under key.
 
LiveArenaEntry * live_arena_find (const char *key) noexcept
 Locates an existing directory entry by key.
 
LiveArenaHeader * live_arena_header () noexcept
 Returns a pointer to the header block at the start of arena storage.
 
unsigned char * live_arena_object_region () noexcept
 Returns a pointer to the object region (immediately after the header).
 
bool live_exposure_enabled () noexcept
 Reports whether live exposure has been enabled.
 
void live_format_key (char *buf, std::string_view name, uint32_t count) noexcept
 Formats a live arena key as "TypeName_N" into buf.
 
template<typename T >
constexpr std::string_view live_type_name () noexcept
 Extracts the unqualified type name from a compiler-generated function signature.
 
std::vector< std::shared_ptr< void > > & persistent_store ()
 

Variables

std::atomic< bool > atexit_registered { false }
 
thread_local bool cleaning_up = false
 
std::atomic< bool > ending { false }
 
std::atomic< Core::Engine * > engine_ptr { nullptr }
 The engine is published through a raw atomic pointer and is freed only after End() has joined every thread that can call a global getter, so a getter is a single acquire load and never waits on a lifecycle change.
 
uint32_t g_live_arena_bump {}
 Byte offset of the bump pointer from the start of the object region.
 
std::shared_ptr< void > g_live_arena_shared_ptrs [LIVE_ARENA_MAX_ENTRIES] {}
 Shared ownership table for objects registered via expose_live.
 
unsigned char g_live_arena_storage [LIVE_ARENA_CAPACITY] {}
 Raw backing storage for the live arena with external linkage.
 
std::atomic< bool > g_live_exposure_enabled { false }
 Whether the MF_LIVE_EXPOSE macros publish objects to the arena.
 
std::atomic< bool > initialized { false }
 
constexpr std::size_t LIVE_ARENA_CAPACITY = static_cast<const std::size_t>(16 * 1024 * 1024)
 Default capacity of the live arena in bytes.
 
constexpr std::size_t LIVE_ARENA_KEY_MAX = 64
 Maximum length of a live arena key, including null terminator.
 
constexpr std::size_t LIVE_ARENA_MAX_ENTRIES = 256
 Maximum number of objects that can be registered in the live arena.
 
std::atomic< bool > terminating { false }