MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_optimal_token()

ProcessingToken MayaFlux::Buffers::get_optimal_token ( const std::string &  buffer_type,
uint32_t  system_capabilities 
)

Gets the optimal processing token for a given buffer type and system configuration.

Parameters
buffer_typeType identifier for the buffer (e.g., "audio", "video", "texture")
system_capabilitiesAvailable system capabilities (GPU, multi-core CPU, etc.)
Returns
Recommended processing token for optimal performance

This function analyzes buffer characteristics and system capabilities to recommend the most appropriate processing token configuration. It considers factors like:

  • Buffer data type and size characteristics
  • Available hardware acceleration
  • System performance characteristics
  • Current system load and resource availability

The recommendations help achieve optimal performance by matching processing requirements with available system capabilities.

Definition at line 85 of file BufferUtils.cpp.

86{
87 if (buffer_type == "audio") {
88 return (system_capabilities & 0x1) ? AUDIO_PARALLEL : AUDIO_BACKEND;
89 }
90
91 if (buffer_type == "video" || buffer_type == "texture") {
92 return GRAPHICS_BACKEND;
93 }
94 return AUDIO_BACKEND;
95}
@ AUDIO_BACKEND
Standard audio processing backend configuration.
@ AUDIO_PARALLEL
High-performance parallel audio processing domain.
Definition Domain.hpp:43

References AUDIO_BACKEND, AUDIO_PARALLEL, and GRAPHICS_BACKEND.