MayaFlux 0.4.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 154 of file SoundContainerBuffer.cpp.

155{
156 if (m_container) {
157 m_container->unregister_state_change_callback();
158 }
159
160 m_container = container;
161
162 if (container) {
163 auto structure = container->get_structure();
164 m_num_channels = structure.get_channel_count();
165
166 container->register_state_change_callback(
167 [this](std::shared_ptr<Kakshya::SignalSourceContainer> c, Kakshya::ProcessingState s) {
168 this->on_container_state_change(c, s);
169 });
170 }
171}
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: