Audacity
3.2.0
modules
import-export
mod-ffmpeg
lib-ffmpeg-support
AVCodecFunctions.h
Go to the documentation of this file.
1
/**********************************************************************
2
3
Audacity: A Digital Audio Editor
4
5
AVCodecFunctions.h
6
7
Dmitry Vedenko
8
9
**********************************************************************/
10
11
#pragma once
12
13
#include <cstdint>
14
15
#include "
FFmpegTypes.h
"
16
17
typedef
struct
AVCodecParameters
AVCodecParameters
;
18
19
struct
FFMPEG_SUPPORT_API
AVCodecFunctions
20
{
21
FFMPegVersion
AVCodecVersion
;
22
23
void (*
av_packet_ref
) (
AVPacket
* dst,
const
AVPacket
* src) =
nullptr
;
24
void (*
av_packet_unref
) (
AVPacket
* pkt) =
nullptr
;
25
void (*
av_init_packet
) (
AVPacket
*pkt) =
nullptr
;
26
AVCodec
* (*avcodec_find_encoder) (
AVCodecIDFwd
id
) =
nullptr
;
27
AVCodec
* (*avcodec_find_encoder_by_name) (
const
char
*
name
) =
nullptr
;
28
AVCodec
* (*avcodec_find_decoder) (
AVCodecIDFwd
id
) =
nullptr
;
29
const
char
* (*avcodec_get_name) (
AVCodecIDFwd
id
) =
nullptr
;
30
int (*
avcodec_open2
) (
AVCodecContext
*avctx,
const
AVCodec
*codec,
AVDictionary
**options) =
nullptr
;
31
int (*
avcodec_is_open
) (
AVCodecContext
*avctx) =
nullptr
;
32
int (*
avcodec_close
) (
AVCodecContext
*avctx) =
nullptr
;
33
AVCodecContext
* (*avcodec_alloc_context3) (
const
AVCodec
* codec) =
nullptr
;
34
int (*
av_codec_is_encoder
) (
const
AVCodec
*codec) =
nullptr
;
35
int (*
avcodec_fill_audio_frame
) (
AVFrame
*frame,
int
nb_channels,
AVSampleFormatFwd
sample_fmt,
const
uint8_t *buf,
int
buf_size,
int
align) =
nullptr
;
36
37
// The following functions are not present in all library versions:
38
AVPacket
* (*av_packet_alloc) () =
nullptr
;
39
void (*
av_packet_free
)(
AVPacket
** pkt) =
nullptr
;
40
void (*
avcodec_free_context
) (
AVCodecContext
** avctx) =
nullptr
;
41
int (*
avcodec_parameters_to_context
)(
AVCodecContext
* codec,
const
AVCodecParameters
* par) =
nullptr
;
42
int (*
avcodec_parameters_from_context
)(
AVCodecParameters
*par,
const
AVCodecContext
*codec)=
nullptr
;
43
int (*
avcodec_decode_audio4
) (
AVCodecContext
*avctx,
AVFrame
*frame,
int
*got_output,
const
AVPacket
*avpkt) =
nullptr
;
44
int (*
avcodec_encode_audio2
) (
AVCodecContext
*avctx,
AVPacket
*pkt,
const
AVFrame
*frame,
int
*got_output) =
nullptr
;
45
void (*
avcodec_register_all
)(void) =
nullptr
;
46
AVCodec
* (*av_codec_next)(
const
AVCodec
* c) =
nullptr
;
47
const
AVCodec
* (*av_codec_iterate)(
void
** opaque) =
nullptr
;
48
49
// New API for decoding and encoding. Audacity will preffer it when available.
50
int (*
avcodec_send_packet
)(
AVCodecContext
* avctx,
const
AVPacket
* avpkt) =
nullptr
;
51
int (*
avcodec_receive_frame
)(
AVCodecContext
* avctx,
AVFrame
* frame) =
nullptr
;
52
int (*
avcodec_send_frame
)(
AVCodecContext
* avctx,
const
AVFrame
* frame) =
nullptr
;
53
int (*
avcodec_receive_packet
)(
AVCodecContext
* avctx,
AVPacket
* avpkt) =
nullptr
;
54
};
AVCodecIDFwd
int AVCodecIDFwd
Definition:
AVCodecID.h:407
FFmpegTypes.h
AVDictionary
struct AVDictionary AVDictionary
Definition:
FFmpegTypes.h:117
AVSampleFormatFwd
int AVSampleFormatFwd
Definition:
FFmpegTypes.h:132
name
wxString name
Definition:
TagsEditor.cpp:166
id
int id
Definition:
WaveTrackControls.cpp:588
avcodec_open2
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
av_codec_is_encoder
int av_codec_is_encoder(const AVCodec *codec)
av_packet_unref
void av_packet_unref(AVPacket *pkt)
avcodec_fill_audio_frame
int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align)
avcodec_decode_audio4
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, const AVPacket *avpkt)
avcodec_is_open
int avcodec_is_open(AVCodecContext *s)
avcodec_encode_audio2
int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
av_init_packet
void av_init_packet(AVPacket *pkt)
av_packet_ref
int av_packet_ref(AVPacket *dst, const AVPacket *src)
avcodec_register_all
void avcodec_register_all(void)
avcodec_close
int avcodec_close(AVCodecContext *avctx)
avcodec_free_context
void avcodec_free_context(AVCodecContext **avctx)
avcodec_parameters_from_context
int avcodec_parameters_from_context(AVCodecParameters *par, const AVCodecContext *codec)
av_packet_free
void av_packet_free(AVPacket **pkt)
avcodec_receive_frame
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
avcodec_send_packet
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
avcodec_receive_packet
int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
avcodec_send_frame
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame)
avcodec_parameters_to_context
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
AVCodecContext
Definition:
ffmpeg-2.3.6-single-header.h:2847
AVCodecFunctions
Definition:
AVCodecFunctions.h:20
AVCodecFunctions::AVCodecVersion
FFMPegVersion AVCodecVersion
Definition:
AVCodecFunctions.h:21
AVCodec
Definition:
ffmpeg-2.3.6-single-header.h:3466
AVCodecParameters
Definition:
ffmpeg-3.4.8-single-header.h:3529
AVFrame
Definition:
ffmpeg-2.3.6-single-header.h:1530
AVPacket
Definition:
ffmpeg-2.3.6-single-header.h:2801
FFMPegVersion
Definition:
FFmpegTypes.h:168
Generated by
1.9.3