HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
FFmpegEncodedAudioBuffer.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
4#include "FFmpegAudioShared.h"
5
8namespace HephAudio
9{
15 {
16 private:
17 using EncodedAudioBuffer::Resize;
18
19 private:
20 size_t frameCount;
21 size_t extraDataSize;
22 void* extraData;
23 size_t blockAlign;
24
25 public:
28
34 explicit FFmpegEncodedAudioBuffer(const AudioFormatInfo& formatInfo);
35
37
40
43
44 FFmpegEncodedAudioBuffer& operator=(const FFmpegEncodedAudioBuffer&) = delete;
45 FFmpegEncodedAudioBuffer& operator=(FFmpegEncodedAudioBuffer&& rhs) noexcept;
46
52 AVPacket*& operator[](size_t index) const;
53
54 void Release() override;
55
60 size_t GetFrameCount() const;
61
66 size_t GetBlockAlign() const;
67
72 void SetBlockAlign(size_t blockAlign);
73
78 size_t GetExtraDataSize() const;
79
84 void* GetExtraData() const;
85
90 void SetExtraData(void* pExtraData, size_t extraDataSize);
91
97 void Add(AVPacket* packet, size_t frameCount);
98
103 AVPacket** begin() const;
104
109 AVPacket** end() const;
110 };
111}
#define HEPH_API
Definition HephShared.h:132
stores encoded audio data.
Definition EncodedAudioBuffer.h:15
stores the audio data that's encoded via FFmpeg.
Definition FFmpegEncodedAudioBuffer.h:15
void SetExtraData(void *pExtraData, size_t extraDataSize)
FFmpegEncodedAudioBuffer(const AudioFormatInfo &formatInfo)
FFmpegEncodedAudioBuffer(FFmpegEncodedAudioBuffer &&rhs) noexcept
void SetBlockAlign(size_t blockAlign)
void Add(AVPacket *packet, size_t frameCount)
AVPacket *& operator[](size_t index) const
stores the properties of the audio signals
Definition AudioFormatInfo.h:20