Audacity 3.2.0
AVUtilFunctions.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 AVUtilFunctions.h
6
7 Dmitry Vedenko
8
9**********************************************************************/
10
11#pragma once
12
13#include <cstdarg>
14#include <cstdint>
15
16#include "FFmpegTypes.h"
17
18struct FFMPEG_SUPPORT_API AVUtilFunctions
19{
21
22 void* (*av_malloc) (size_t size) = nullptr;
23 void (*av_free) (void *ptr) = nullptr;
24 char* (*av_strdup) (const char *ptr) = nullptr;
25 void (*av_dict_free) (AVDictionary **m) = nullptr;
27 (*av_dict_get) (const AVDictionary *m, const char *key, const AudacityAVDictionaryEntry *prev, int flags) = nullptr;
28 int (*av_dict_set) (AVDictionary **pm, const char *key, const char *value, int flags) = nullptr;
29 void (*av_dict_copy) (AVDictionary** dst, const AVDictionary* src, int flags) = nullptr;
30 int (*av_get_bytes_per_sample) (AVSampleFormatFwd sample_fmt) = nullptr;
31 void (*av_log_set_callback) (void (*cb)(void*, int, const char*, va_list)) = nullptr;
32 void (*av_log_default_callback) (void* ptr, int level, const char* fmt, va_list vl) = nullptr;
33
34 int64_t (*av_rescale_q) (int64_t a, AudacityAVRational bq, AudacityAVRational cq) = nullptr;
35 AVFrame* (*av_frame_alloc) (void) = nullptr;
36 void (*av_frame_free) (AVFrame **frame) = nullptr;
37 int (*av_samples_get_buffer_size) (int *linesize, int nb_channels, int nb_samples, AVSampleFormatFwd sample_fmt, int align) = nullptr;
38 int64_t (*av_get_default_channel_layout) (int nb_channels) = nullptr;
39 int (*av_strerror) (int errnum, char *errbuf, size_t errbuf_size) = nullptr;
40 void (*av_channel_layout_default)(AVChannelLayout *layout, int nb_channels) = nullptr;
41};
struct AVDictionary AVDictionary
Definition: FFmpegTypes.h:117
int AVSampleFormatFwd
Definition: FFmpegTypes.h:132
static const AudacityProject::AttachedObjects::RegisteredFactory key
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
void av_free(void *ptr)
void av_log_set_callback(void(*callback)(void *, int, const char *, va_list))
void av_dict_free(AVDictionary **m)
int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
void av_log_default_callback(void *avcl, int level, const char *fmt, va_list vl)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
void av_frame_free(AVFrame **frame)
int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
void av_dict_copy(AVDictionary **dst, FF_CONST_AVUTIL53 AVDictionary *src, int flags)
int64_t av_get_default_channel_layout(int nb_channels)
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels)
FFMPegVersion AVUtilVersion
Simply an overlay of AVDictionaryEntry, but we avoid including that type.
Definition: FFmpegTypes.h:143