18 static constexpr size_t AUDIO_STREAM_INDEX_NOT_FOUND = -1;
21 size_t fileDuration_frame;
22 size_t audioStreamIndex;
23 int64_t firstPacketPts;
24 AVFormatContext* avFormatContext;
25 AVCodecContext* avCodecContext;
26 SwrContext* swrContext;
51 void ChangeFile(
const std::filesystem::path& newFilePath)
override;
56 bool Seek(
size_t frameIndex)
override;
63 void OpenFile(
const std::filesystem::path& filePath);
64 int SeekFrame(
size_t& frameIndex);
#define HEPH_API
Definition HephShared.h:132
class for storing the audio samples in internal format.
Definition AudioBuffer.h:16
stores encoded audio data.
Definition EncodedAudioBuffer.h:15
implements audio decoding via FFmpeg.
Definition FFmpegAudioDecoder.h:16
size_t GetFrameCount() const override
AudioBuffer Decode(size_t frameIndex, size_t frameCount) override
void CloseFile() override
bool IsFileOpen() const override
FFmpegAudioDecoder(FFmpegAudioDecoder &&rhs) noexcept
AudioFormatInfo GetOutputFormatInfo() const override
AudioBuffer Decode(size_t frameCount) override
AudioBuffer Decode(const EncodedAudioBuffer &encodedBuffer) override
void ChangeFile(const std::filesystem::path &newFilePath) override
FFmpegAudioDecoder(const std::filesystem::path &filePath)
AudioBuffer Decode() override
bool Seek(size_t frameIndex) override
interface for the audio decoders.
Definition IAudioDecoder.h:16