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

◆ set_container()

void MayaFlux::Buffers::SoundStreamReader::set_container ( const std::shared_ptr< Kakshya::StreamContainer > &  container)

Set the container to adapt.

Parameters
containerThe StreamContainer to extract data from.

Definition at line 194 of file SoundContainerBuffer.cpp.

195{
196 if (m_container) {
197 m_container->unregister_state_change_callback();
198 }
199
200 m_container = container;
201
202 if (container) {
203 auto structure = container->get_structure();
204 m_num_channels = structure.get_channel_count();
205
206 container->register_state_change_callback(
207 [this](std::shared_ptr<Kakshya::SignalSourceContainer> c, Kakshya::ProcessingState s) {
208 this->on_container_state_change(c, s);
209 });
210 }
211}
std::shared_ptr< Kakshya::StreamContainer > m_container
void on_container_state_change(const std::shared_ptr< Kakshya::SignalSourceContainer > &container, Kakshya::ProcessingState state)
Respond to container state changes (e.g., READY, PROCESSED, NEEDS_REMOVAL).
ProcessingState
Represents the current processing lifecycle state of a container.

References m_container, m_num_channels, and on_container_state_change().

+ Here is the call graph for this function: