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

◆ on_attach()

void MayaFlux::Kakshya::CursorAccessProcessor::on_attach ( const std::shared_ptr< SignalSourceContainer > &  container)
overridevirtual

Called when this processor is attached to a container.

Parameters
containerContainer this processor is being attached to

This method provides an opportunity for the processor to:

  • Initialize container-specific state
  • Allocate resources needed for processing
  • Validate the container's data structure
  • Configure processing parameters based on container properties
  • Store references or metadata needed for processing

Unlike BufferProcessor which may be attached implicitly through chains, DataProcessor attachment is typically an explicit operation that triggers immediate initialization.

Implements MayaFlux::Kakshya::DataProcessor.

Definition at line 15 of file CursorAccessProcessor.cpp.

16{
17 auto stream = std::dynamic_pointer_cast<DynamicSoundStream>(container);
18 if (!stream) {
20 "CursorAccessProcessor requires a DynamicSoundStream");
21 return;
22 }
23
24 m_structure = container->get_structure();
25
26 m_slot_index = stream->allocate_dynamic_slot();
27
28 const uint64_t num_channels = m_structure.get_channel_count();
29 m_cursor.assign(num_channels, m_loop_start);
30}
#define MF_ERROR(comp, ctx,...)
@ ContainerProcessing
Container operations (Kakshya - file/stream/region processing)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.
static uint64_t get_channel_count(const std::vector< DataDimension > &dimensions)
Extract channel count from dimensions.

References MayaFlux::Journal::ContainerProcessing, MayaFlux::Kakshya::ContainerDataStructure::get_channel_count(), MayaFlux::Journal::Kakshya, m_cursor, m_loop_start, m_slot_index, m_structure, and MF_ERROR.

+ Here is the call graph for this function: