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

◆ on_detach()

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

Called when this processor is detached from a container.

Parameters
containerContainer this processor is being detached from

This method allows the processor to:

  • Release container-specific resources
  • Finalize any pending operations
  • Clean up state information
  • Perform any necessary cleanup before the processor is removed

Explicit detachment provides cleaner resource management compared to BufferProcessor's implicit detachment through chain removal.

Implements MayaFlux::Kakshya::DataProcessor.

Definition at line 32 of file CursorAccessProcessor.cpp.

33{
34 auto stream = std::dynamic_pointer_cast<DynamicSoundStream>(container);
35 if (!stream) {
37 "CursorAccessProcessor requires a DynamicSoundStream, slot index can potentially leak");
38 return;
39 }
40
41 m_active = false;
42 m_cursor.clear();
43 stream->release_dynamic_slot(m_slot_index);
44}
#define MF_ERROR(comp, ctx,...)
@ ContainerProcessing
Container operations (Kakshya - file/stream/region processing)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.

References MayaFlux::Journal::ContainerProcessing, MayaFlux::Journal::Kakshya, m_active, m_cursor, m_slot_index, and MF_ERROR.