|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::IO::SoundFileReader::open_from_demux | ( | std::shared_ptr< FFmpegDemuxContext > | demux, |
| std::shared_ptr< AudioStreamContext > | audio, | ||
| const std::string & | filepath, | ||
| FileReadOptions | options = FileReadOptions::ALL |
||
| ) |
Open an audio stream from an already-constructed demux and stream context.
Secondary open path for callers that have already probed the demuxer and opened an AudioStreamContext (e.g. VideoFileReader sharing its m_demux and m_audio). No avformat_open_input or AudioStreamContext::open is performed — both contexts are adopted as-is.
The filepath is required only for filesystem-level metadata (file_size, modification_time) populated during build_metadata. It must point to the same file already open in the demux context. Pass an empty string only if FileReadOptions::EXTRACT_METADATA is not set.
All subsequent SoundFileReader operations — metadata, regions, read_all, load_into_container — behave identically to the filepath-based open().
Both contexts must remain valid for the lifetime of this reader.
| demux | Shared, already-open demux context. |
| audio | Shared, already-open and valid audio stream context. |
| filepath | Path to the source file (used for filesystem metadata only). |
| options | File read options (metadata, regions, etc.). |
Definition at line 126 of file SoundFileReader.cpp.
References build_metadata(), build_regions(), clear_error(), MayaFlux::IO::EXTRACT_METADATA, MayaFlux::IO::EXTRACT_REGIONS, m_audio, m_cached_metadata, m_cached_regions, m_context_mutex, m_current_frame_position, m_demux, m_filepath, m_metadata_mutex, MayaFlux::IO::NONE, and set_error().
Referenced by MayaFlux::IO::VideoFileReader::load_into_container().
Here is the call graph for this function:
Here is the caller graph for this function: