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

◆ create_container()

std::shared_ptr< Kakshya::SignalSourceContainer > MayaFlux::IO::SoundFileReader::create_container ( )
overridevirtual

Create a SignalSourceContainer for this file.

Returns
Shared pointer to a new SignalSourceContainer.

Implements MayaFlux::IO::FileReader.

Definition at line 796 of file SoundFileReader.cpp.

797{
798 std::shared_lock<std::shared_mutex> lock(m_context_mutex);
799
800 if (!m_context || !m_context->is_valid()) {
801 set_error("File not open");
802 return nullptr;
803 }
804
805 auto container = std::make_shared<Kakshya::SoundFileContainer>();
806 lock.unlock();
807
808 if (!load_into_container(container)) {
809 return nullptr;
810 }
811
812 return container;
813}
bool load_into_container(std::shared_ptr< Kakshya::SignalSourceContainer > container) override
Load file data into an existing SignalSourceContainer.
void set_error(const std::string &error) const
Set the last error message.
std::shared_ptr< FFmpegContext > m_context

References load_into_container(), m_context, m_context_mutex, and set_error().

+ Here is the call graph for this function: