|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
RAII owner of one audio stream's codec and resampler state. More...
#include <AudioStreamContext.hpp>
Collaboration diagram for MayaFlux::IO::AudioStreamContext:Public Member Functions | |
| AudioStreamContext ()=default | |
| ~AudioStreamContext () | |
| AudioStreamContext (const AudioStreamContext &)=delete | |
| AudioStreamContext & | operator= (const AudioStreamContext &)=delete |
| AudioStreamContext (AudioStreamContext &&)=delete | |
| AudioStreamContext & | operator= (AudioStreamContext &&)=delete |
| bool | open (const FFmpegDemuxContext &demux, bool planar_output=false, uint32_t target_rate=0) |
| Open the audio stream from an already-probed demux context. | |
| void | close () |
| Release codec and resampler resources. | |
| bool | is_valid () const |
| True if the codec and resampler are ready for decoding. | |
| void | flush_codec () |
| Flush codec internal buffers (call after a seek). | |
| void | drain_resampler_init () |
| Drain any samples buffered inside the resampler. | |
| void | extract_stream_metadata (const FFmpegDemuxContext &demux, FileMetadata &out) const |
| Populate stream-specific fields into an existing FileMetadata. | |
| std::vector< FileRegion > | extract_cue_regions (const FFmpegDemuxContext &demux) const |
| Extract cue/marker regions from stream metadata tags. | |
| const std::string & | last_error () const |
Public Attributes | |
| AVCodecContext * | codec_context = nullptr |
| Owned; freed in destructor. | |
| SwrContext * | swr_context = nullptr |
| Owned; freed in destructor. | |
| int | stream_index = -1 |
| uint64_t | total_frames = 0 |
| uint32_t | sample_rate = 0 |
| uint32_t | channels = 0 |
Private Member Functions | |
| bool | setup_resampler (bool planar_output, uint32_t target_rate) |
Private Attributes | |
| std::string | m_last_error |
RAII owner of one audio stream's codec and resampler state.
Encapsulates all audio-stream-specific FFmpeg objects:
Does NOT own AVFormatContext — that belongs to FFmpegDemuxContext. Packet reading is always delegated to the demuxer's format_context; this context only decodes and converts packets it receives.
Destruction order (enforced in destructor): swr_context → codec_context The associated FFmpegDemuxContext must outlive this object.
Definition at line 29 of file AudioStreamContext.hpp.