MayaFlux 0.2.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 196 of file SoundContainerBuffer.cpp.

197{
198 if (m_container) {
199 m_container->unregister_state_change_callback();
200 }
201
202 m_container = container;
203
204 if (container) {
205 auto structure = container->get_structure();
206 m_num_channels = structure.get_channel_count();
207
208 container->register_state_change_callback(
209 [this](std::shared_ptr<Kakshya::SignalSourceContainer> c, Kakshya::ProcessingState s) {
210 this->on_container_state_change(c, s);
211 });
212 }
213}
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: