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

◆ set_container()

void MayaFlux::Buffers::ContainerToBufferAdapter::set_container ( std::shared_ptr< Kakshya::StreamContainer container)

Set the container to adapt.

Parameters
containerThe StreamContainer to extract data from.

Definition at line 187 of file ContainerBuffer.cpp.

188{
189 if (m_container) {
190 m_container->unregister_state_change_callback();
191 }
192
193 m_container = container;
194
195 if (container) {
196 auto structure = container->get_structure();
197 m_num_channels = structure.get_channel_count();
198
199 container->register_state_change_callback(
200 [this](std::shared_ptr<Kakshya::SignalSourceContainer> c, Kakshya::ProcessingState s) {
201 this->on_container_state_change(c, s);
202 });
203 }
204}
void on_container_state_change(std::shared_ptr< Kakshya::SignalSourceContainer > container, Kakshya::ProcessingState state)
Respond to container state changes (e.g., READY, PROCESSED, NEEDS_REMOVAL).
std::shared_ptr< Kakshya::StreamContainer > m_container
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: