diff options
| author | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2026-08-10 10:38:14 +0500 |
|---|---|---|
| committer | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2026-08-10 10:38:14 +0500 |
| commit | 6dc1149d078fc3b04a19696bfb7d5d6940372175 (patch) | |
| tree | 169f7f71e6a292a4ab61a0493000e1add4430f8e /include/recorder/audio_codec.h | |
| parent | 6836426ae183b9a7d0ec99c1e147e8ad6edabd92 (diff) | |
| parent | 80517840f4ae64469721598e8373d81f2e4493dd (diff) | |
Merge tag '6.0.0' of https://repo.dec05eba.com/gpu-screen-recorder into debian
Diffstat (limited to 'include/recorder/audio_codec.h')
| -rw-r--r-- | include/recorder/audio_codec.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/recorder/audio_codec.h b/include/recorder/audio_codec.h new file mode 100644 index 0000000..d432abd --- /dev/null +++ b/include/recorder/audio_codec.h @@ -0,0 +1,23 @@ +#ifndef GSR_RECORDER_AUDIO_CODEC_H +#define GSR_RECORDER_AUDIO_CODEC_H + +#include <stdbool.h> +#include <stdint.h> +#include "../defs.h" +#include "../sound.h" + +#include <libavcodec/avcodec.h> + +#define GSR_AUDIO_SAMPLE_RATE 48000 + +gsr_audio_format audio_codec_context_get_audio_format(const AVCodecContext *audio_codec_context); +enum AVSampleFormat audio_format_to_sample_format(const gsr_audio_format audio_format); + +AVCodecContext* create_audio_codec_context(int fps, gsr_audio_codec audio_codec, bool mix_audio, int64_t audio_bitrate); +bool open_audio(AVCodecContext *audio_codec_context, const char *ffmpeg_audio_opts); +AVFrame* create_audio_frame(AVCodecContext *audio_codec_context); + +double audio_codec_get_desired_delay(gsr_audio_codec audio_codec, int fps); +int audio_codec_get_frame_size(gsr_audio_codec audio_codec); + +#endif /* GSR_RECORDER_AUDIO_CODEC_H */ |
