|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::IO::AudioStreamContext::open | ( | const FFmpegDemuxContext & | demux, |
| bool | planar_output = false, |
||
| uint32_t | target_rate = 0 |
||
| ) |
Open the audio stream from an already-probed demux context.
Finds the best audio stream, allocates and opens the codec context, caches audio parameters, and initialises the SwrContext for conversion to AV_SAMPLE_FMT_DBL (or AV_SAMPLE_FMT_DBLP if planar output requested).
| demux | Open demux context (must outlive this object). |
| planar_output | If true, configure swr for planar double output. |
| target_rate | Resample target in Hz; 0 = keep source rate. |
Definition at line 44 of file AudioStreamContext.cpp.
References channels, close(), codec_context, drain_resampler_init(), MayaFlux::IO::FFmpegDemuxContext::find_best_stream(), MayaFlux::IO::FFmpegDemuxContext::format_context, MayaFlux::IO::FFmpegDemuxContext::get_stream(), MayaFlux::IO::FFmpegDemuxContext::init_ffmpeg(), MayaFlux::IO::FFmpegDemuxContext::is_open(), m_last_error, sample_rate, setup_resampler(), stream_index, and total_frames.
Here is the call graph for this function: