Audacity 3.2.0
|
#include <FFmpegFunctions.h>
Classes | |
struct | Private |
Public Member Functions | |
FFmpegFunctions () | |
~FFmpegFunctions () | |
std::unique_ptr< AVIOContextWrapper > | CreateAVIOContext () const |
std::unique_ptr< AVFormatContextWrapper > | CreateAVFormatContext () const |
std::unique_ptr< AVStreamWrapper > | CreateAVStreamWrapper (AVStream *stream, bool forEncoding) const |
std::unique_ptr< AVPacketWrapper > | CreateAVPacketWrapper () const |
std::unique_ptr< AVFrameWrapper > | CreateAVFrameWrapper () const |
std::unique_ptr< AVInputFormatWrapper > | CreateAVInputFormatWrapper (AVInputFormat *inputFormat) const |
std::unique_ptr< AVOutputFormatWrapper > | CreateAVOutputFormatWrapper (const AVOutputFormat *outputFormat) const |
std::unique_ptr< AVCodecWrapper > | CreateDecoder (AVCodecIDFwd codecID) const |
std::unique_ptr< AVCodecWrapper > | CreateEncoder (AVCodecIDFwd codecID) const |
std::unique_ptr< AVCodecWrapper > | CreateEncoder (const char *codecName) const |
std::unique_ptr< AVCodecContextWrapper > | CreateAVCodecContextWrapper (AVCodecContext *context) const |
std::unique_ptr< AVCodecContextWrapper > | CreateAVCodecContextWrapperFromCodec (std::unique_ptr< AVCodecWrapper > codec) const |
std::unique_ptr< AVOutputFormatWrapper > | GuessOutputFormat (const char *short_name, const char *filename, const char *mime_type) |
std::unique_ptr< AVChannelLayoutWrapper > | CreateDefaultChannelLayout (int channelsCount) const |
std::unique_ptr< AVChannelLayoutWrapper > | CreateLegacyChannelLayout (uint64_t layout, int channelsCount) const |
std::unique_ptr< AVChannelLayoutWrapper > | CreateAVChannelLayout (const AVChannelLayout *layout) const |
const std::vector< const AVOutputFormatWrapper * > & | GetOutputFormats () const |
const std::vector< const AVCodecWrapper * > & | GetCodecs () const |
template<typename T > | |
AVDataBuffer< T > | CreateMemoryBuffer (int preallocatedSize) const |
Static Public Member Functions | |
static std::shared_ptr< FFmpegFunctions > | Load (bool fromUserPathOnly=false) |
static std::vector< wxString > | GetSearchPaths (bool fromUserPathOnly) |
Public Attributes | |
AVCodecIDFwd(* | GetAVCodecID )(AudacityAVCodecID) = nullptr |
AudacityAVCodecID(* | GetAudacityCodecID )(AVCodecIDFwd) = nullptr |
Public Attributes inherited from AVCodecFunctions | |
FFMPegVersion | AVCodecVersion |
void(* | av_packet_ref )(AVPacket *dst, const AVPacket *src) = nullptr |
void(* | av_packet_unref )(AVPacket *pkt) = nullptr |
void(* | av_init_packet )(AVPacket *pkt) = nullptr |
AVCodec *(* | avcodec_find_encoder )(AVCodecIDFwd id) = nullptr |
AVCodec *(* | avcodec_find_encoder_by_name )(const char *name) = nullptr |
AVCodec *(* | avcodec_find_decoder )(AVCodecIDFwd id) = nullptr |
const char *(* | avcodec_get_name )(AVCodecIDFwd id) = nullptr |
int(* | avcodec_open2 )(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) = nullptr |
int(* | avcodec_is_open )(AVCodecContext *avctx) = nullptr |
int(* | avcodec_close )(AVCodecContext *avctx) = nullptr |
AVCodecContext *(* | avcodec_alloc_context3 )(const AVCodec *codec) = nullptr |
int(* | av_codec_is_encoder )(const AVCodec *codec) = nullptr |
int(* | avcodec_fill_audio_frame )(AVFrame *frame, int nb_channels, AVSampleFormatFwd sample_fmt, const uint8_t *buf, int buf_size, int align) = nullptr |
AVPacket *(* | av_packet_alloc )() = nullptr |
void(* | av_packet_free )(AVPacket **pkt) = nullptr |
void(* | avcodec_free_context )(AVCodecContext **avctx) = nullptr |
int(* | avcodec_parameters_to_context )(AVCodecContext *codec, const AVCodecParameters *par) = nullptr |
int(* | avcodec_parameters_from_context )(AVCodecParameters *par, const AVCodecContext *codec) = nullptr |
int(* | avcodec_decode_audio4 )(AVCodecContext *avctx, AVFrame *frame, int *got_output, const AVPacket *avpkt) = nullptr |
int(* | avcodec_encode_audio2 )(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_output) = nullptr |
void(* | avcodec_register_all )(void) = nullptr |
AVCodec *(* | av_codec_next )(const AVCodec *c) = nullptr |
const AVCodec *(* | av_codec_iterate )(void **opaque) = nullptr |
int(* | avcodec_send_packet )(AVCodecContext *avctx, const AVPacket *avpkt) = nullptr |
int(* | avcodec_receive_frame )(AVCodecContext *avctx, AVFrame *frame) = nullptr |
int(* | avcodec_send_frame )(AVCodecContext *avctx, const AVFrame *frame) = nullptr |
int(* | avcodec_receive_packet )(AVCodecContext *avctx, AVPacket *avpkt) = nullptr |
Public Attributes inherited from AVFormatFunctions | |
FFMPegVersion | AVFormatVersion |
int(* | avformat_find_stream_info )(AVFormatContext *ic, AVDictionary **options) = nullptr |
int(* | av_read_frame )(AVFormatContext *s, AVPacket *pkt) = nullptr |
int(* | av_seek_frame )(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) = nullptr |
void(* | avformat_close_input )(AVFormatContext **s) = nullptr |
int(* | avformat_write_header )(AVFormatContext *s, AVDictionary **options) = nullptr |
int(* | av_interleaved_write_frame )(AVFormatContext *s, AVPacket *pkt) = nullptr |
AVOutputFormat *(* | av_oformat_next )(const AVOutputFormat *f) = nullptr |
AVStream *(* | avformat_new_stream )(AVFormatContext *s, const AVCodec *c) = nullptr |
AVFormatContext *(* | avformat_alloc_context )(void) = nullptr |
int(* | av_write_trailer )(AVFormatContext *s) = nullptr |
unsigned int(* | av_codec_get_tag )(const struct AVCodecTag *const *tags, AVCodecIDFwd id) = nullptr |
int(* | avformat_open_input )(AVFormatContext **ic_ptr, const char *filename, const AVInputFormat *fmt, AVDictionary **options) = nullptr |
int64_t(* | avio_size )(AVIOContext *s) = nullptr |
AVIOContext *(* | avio_alloc_context )(unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int(*read_packet)(void *opaque, uint8_t *buf, int buf_size), int(*write_packet)(void *opaque, const uint8_t *buf, int buf_size), int64_t(*seek)(void *opaque, int64_t offset, int whence)) = nullptr |
AVOutputFormat *(* | av_guess_format )(const char *short_name, const char *filename, const char *mime_type) = nullptr |
void(* | avformat_free_context )(AVFormatContext *s) = nullptr |
void(* | av_register_all )(void) = nullptr |
void(* | avio_context_free )(AVIOContext **s) = nullptr |
const AVOutputFormat *(* | av_muxer_iterate )(void **opaque) |
Public Attributes inherited from AVUtilFunctions | |
FFMPegVersion | AVUtilVersion |
void *(* | av_malloc )(size_t size) = nullptr |
void(* | av_free )(void *ptr) = nullptr |
char *(* | av_strdup )(const char *ptr) = nullptr |
void(* | av_dict_free )(AVDictionary **m) = nullptr |
AudacityAVDictionaryEntry *(* | av_dict_get )(const AVDictionary *m, const char *key, const AudacityAVDictionaryEntry *prev, int flags) = nullptr |
int(* | av_dict_set )(AVDictionary **pm, const char *key, const char *value, int flags) = nullptr |
void(* | av_dict_copy )(AVDictionary **dst, const AVDictionary *src, int flags) = nullptr |
int(* | av_get_bytes_per_sample )(AVSampleFormatFwd sample_fmt) = nullptr |
void(* | av_log_set_callback )(void(*cb)(void *, int, const char *, va_list)) = nullptr |
void(* | av_log_default_callback )(void *ptr, int level, const char *fmt, va_list vl) = nullptr |
int64_t(* | av_rescale_q )(int64_t a, AudacityAVRational bq, AudacityAVRational cq) = nullptr |
AVFrame *(* | av_frame_alloc )(void) = nullptr |
void(* | av_frame_free )(AVFrame **frame) = nullptr |
int(* | av_samples_get_buffer_size )(int *linesize, int nb_channels, int nb_samples, AVSampleFormatFwd sample_fmt, int align) = nullptr |
int64_t(* | av_get_default_channel_layout )(int nb_channels) = nullptr |
int(* | av_strerror )(int errnum, char *errbuf, size_t errbuf_size) = nullptr |
void(* | av_channel_layout_default )(AVChannelLayout *layout, int nb_channels) = nullptr |
Private Member Functions | |
void | FillCodecsList () |
void | FillOuptutFormatsList () |
Private Attributes | |
std::unique_ptr< Private > | mPrivate |
std::vector< const AVCodecWrapper * > | mCodecPointers |
std::vector< std::unique_ptr< AVCodecWrapper > > | mCodecs |
std::vector< const AVOutputFormatWrapper * > | mOutputFormatPointers |
std::vector< std::unique_ptr< AVOutputFormatWrapper > > | mOutputFormats |
Definition at line 81 of file FFmpegFunctions.h.
FFmpegFunctions::FFmpegFunctions | ( | ) |
Definition at line 255 of file FFmpegFunctions.cpp.
FFmpegFunctions::~FFmpegFunctions | ( | ) |
Definition at line 260 of file FFmpegFunctions.cpp.
std::unique_ptr< AVChannelLayoutWrapper > FFmpegFunctions::CreateAVChannelLayout | ( | const AVChannelLayout * | layout | ) | const |
Definition at line 401 of file FFmpegFunctions.cpp.
References mPrivate.
std::unique_ptr< AVCodecContextWrapper > FFmpegFunctions::CreateAVCodecContextWrapper | ( | AVCodecContext * | context | ) | const |
Definition at line 447 of file FFmpegFunctions.cpp.
References mPrivate.
std::unique_ptr< AVCodecContextWrapper > FFmpegFunctions::CreateAVCodecContextWrapperFromCodec | ( | std::unique_ptr< AVCodecWrapper > | codec | ) | const |
Definition at line 454 of file FFmpegFunctions.cpp.
References mPrivate.
std::unique_ptr< AVFormatContextWrapper > FFmpegFunctions::CreateAVFormatContext | ( | ) | const |
Definition at line 348 of file FFmpegFunctions.cpp.
References mPrivate.
std::unique_ptr< AVFrameWrapper > FFmpegFunctions::CreateAVFrameWrapper | ( | ) | const |
Definition at line 364 of file FFmpegFunctions.cpp.
References mPrivate.
Referenced by AVCodecContextWrapper::DecodeAudioPacket().
std::unique_ptr< AVInputFormatWrapper > FFmpegFunctions::CreateAVInputFormatWrapper | ( | AVInputFormat * | inputFormat | ) | const |
Definition at line 370 of file FFmpegFunctions.cpp.
References mPrivate.
Referenced by AVFormatContextWrapper::OpenInputContext().
std::unique_ptr< AVIOContextWrapper > FFmpegFunctions::CreateAVIOContext | ( | ) | const |
Definition at line 342 of file FFmpegFunctions.cpp.
References mPrivate.
Referenced by AVFormatContextWrapper::OpenInputContext(), and AVFormatContextWrapper::OpenOutputContext().
std::unique_ptr< AVOutputFormatWrapper > FFmpegFunctions::CreateAVOutputFormatWrapper | ( | const AVOutputFormat * | outputFormat | ) | const |
Definition at line 407 of file FFmpegFunctions.cpp.
References mPrivate.
std::unique_ptr< AVPacketWrapper > FFmpegFunctions::CreateAVPacketWrapper | ( | ) | const |
Definition at line 359 of file FFmpegFunctions.cpp.
References mPrivate.
Referenced by AVCodecContextWrapper::DecodeAudioPacket(), and AVFormatContextWrapper::ReadNextPacket().
std::unique_ptr< AVStreamWrapper > FFmpegFunctions::CreateAVStreamWrapper | ( | AVStream * | stream, |
bool | forEncoding | ||
) | const |
Definition at line 354 of file FFmpegFunctions.cpp.
References mPrivate.
Referenced by AVFormatContextWrapper::CreateStream().
std::unique_ptr< AVCodecWrapper > FFmpegFunctions::CreateDecoder | ( | AVCodecIDFwd | codecID | ) | const |
Definition at line 414 of file FFmpegFunctions.cpp.
References AVCodecFunctions::avcodec_find_decoder, and mPrivate.
std::unique_ptr< AVChannelLayoutWrapper > FFmpegFunctions::CreateDefaultChannelLayout | ( | int | channelsCount | ) | const |
Definition at line 386 of file FFmpegFunctions.cpp.
References mPrivate.
std::unique_ptr< AVCodecWrapper > FFmpegFunctions::CreateEncoder | ( | AVCodecIDFwd | codecID | ) | const |
Definition at line 425 of file FFmpegFunctions.cpp.
References AVCodecFunctions::avcodec_find_encoder, and mPrivate.
std::unique_ptr< AVCodecWrapper > FFmpegFunctions::CreateEncoder | ( | const char * | codecName | ) | const |
Definition at line 436 of file FFmpegFunctions.cpp.
References AVCodecFunctions::avcodec_find_encoder_by_name, mPrivate, and name.
std::unique_ptr< AVChannelLayoutWrapper > FFmpegFunctions::CreateLegacyChannelLayout | ( | uint64_t | layout, |
int | channelsCount | ||
) | const |
Definition at line 393 of file FFmpegFunctions.cpp.
References mPrivate.
|
inline |
Definition at line 127 of file FFmpegFunctions.h.
|
private |
Definition at line 481 of file FFmpegFunctions.cpp.
References AVCodecFunctions::av_codec_iterate, AVCodecFunctions::av_codec_next, mCodecPointers, mCodecs, and mPrivate.
Referenced by GetCodecs().
|
private |
Definition at line 514 of file FFmpegFunctions.cpp.
References AVFormatFunctions::av_muxer_iterate, AVFormatFunctions::av_oformat_next, anonymous_namespace{ExportPCM.cpp}::format, mOutputFormatPointers, mOutputFormats, and mPrivate.
Referenced by GetOutputFormats().
const std::vector< const AVCodecWrapper * > & FFmpegFunctions::GetCodecs | ( | ) | const |
Definition at line 473 of file FFmpegFunctions.cpp.
References FillCodecsList(), mCodecPointers, and mCodecs.
const std::vector< const AVOutputFormatWrapper * > & FFmpegFunctions::GetOutputFormats | ( | ) | const |
Definition at line 465 of file FFmpegFunctions.cpp.
References FillOuptutFormatsList(), mOutputFormatPointers, and mOutputFormats.
|
static |
Definition at line 300 of file FFmpegFunctions.cpp.
References AVFormatPath, Setting< T >::Read(), anonymous_namespace{CompareAudioCommand.cpp}::reg, and wxT().
Referenced by EnvSetter::EnvSetter(), FindFFmpegLibs(), and FFmpegFunctions::Private::LoadLibrary().
std::unique_ptr< AVOutputFormatWrapper > FFmpegFunctions::GuessOutputFormat | ( | const char * | short_name, |
const char * | filename, | ||
const char * | mime_type | ||
) |
Definition at line 376 of file FFmpegFunctions.cpp.
References AVFormatFunctions::av_guess_format, and mPrivate.
|
static |
Definition at line 264 of file FFmpegFunctions.cpp.
References BuildAVFormatPaths(), FFmpegAPIResolver::Get(), and FFmpegAPIResolver::GetSuportedAVFormatVersions().
Referenced by anonymous_namespace{ExportFFmpeg.cpp}::ExportOptionsFFmpegCustomEditor::CheckFFmpeg(), ExportFFmpeg::CheckFileName(), ExportFFmpeg::ExportFFmpeg(), ExportFFmpegOptions::ExportFFmpegOptions(), FFmpegImportPlugin::FailureHint(), FFmpegExporter::FFmpegExporter(), FindFFmpegLibs(), GetFFmpegVersion(), FFmpegExportProcessor::Initialize(), LoadFFmpeg(), and FFmpegImportPlugin::Open().
AudacityAVCodecID(* FFmpegFunctions::GetAudacityCodecID) (AVCodecIDFwd) = nullptr |
Definition at line 92 of file FFmpegFunctions.h.
Referenced by FFmpegFunctions::Private::Load().
AVCodecIDFwd(* FFmpegFunctions::GetAVCodecID) (AudacityAVCodecID) = nullptr |
Definition at line 91 of file FFmpegFunctions.h.
Referenced by FFmpegFunctions::Private::Load().
|
private |
Definition at line 139 of file FFmpegFunctions.h.
Referenced by FillCodecsList(), and GetCodecs().
|
private |
Definition at line 140 of file FFmpegFunctions.h.
Referenced by FillCodecsList(), and GetCodecs().
|
private |
Definition at line 142 of file FFmpegFunctions.h.
Referenced by FillOuptutFormatsList(), and GetOutputFormats().
|
private |
Definition at line 143 of file FFmpegFunctions.h.
Referenced by FillOuptutFormatsList(), and GetOutputFormats().
|
private |
Definition at line 137 of file FFmpegFunctions.h.
Referenced by CreateAVChannelLayout(), CreateAVCodecContextWrapper(), CreateAVCodecContextWrapperFromCodec(), CreateAVFormatContext(), CreateAVFrameWrapper(), CreateAVInputFormatWrapper(), CreateAVIOContext(), CreateAVOutputFormatWrapper(), CreateAVPacketWrapper(), CreateAVStreamWrapper(), CreateDecoder(), CreateDefaultChannelLayout(), CreateEncoder(), CreateLegacyChannelLayout(), FillCodecsList(), FillOuptutFormatsList(), and GuessOutputFormat().