#include <twolame.h>
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#include "mpegaudio.h"
Go to the source code of this file.
Data Structures | |
struct | TWOLAMEContext |
Defines | |
#define | OFFSET(x) offsetof(TWOLAMEContext, x) |
#define | AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Functions | |
static av_cold int | twolame_encode_close (AVCodecContext *avctx) |
static av_cold int | twolame_encode_init (AVCodecContext *avctx) |
static int | twolame_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
Variables | |
static const AVOption | options [] |
static const AVClass | libtwolame_class |
AVCodec | ff_libtwolame_encoder |
Definition in file libtwolame.c.
#define AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 153 of file libtwolame.c.
#define OFFSET | ( | x | ) | offsetof(TWOLAMEContext, x) |
Definition at line 152 of file libtwolame.c.
static av_cold int twolame_encode_close | ( | AVCodecContext * | avctx | ) | [static] |
static int twolame_encode_frame | ( | AVCodecContext * | avctx, | |
AVPacket * | avpkt, | |||
const AVFrame * | frame, | |||
int * | got_packet_ptr | |||
) | [static] |
Definition at line 91 of file libtwolame.c.
static av_cold int twolame_encode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 54 of file libtwolame.c.
Initial value:
{ .name = "libtwolame", .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_MP2, .priv_data_size = sizeof(TWOLAMEContext), .init = twolame_encode_init, .encode2 = twolame_encode_frame, .close = twolame_encode_close, .capabilities = CODEC_CAP_DELAY, .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_NONE }, .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, 0 }, .supported_samplerates = (const int[]){ 16000, 22050, 24000, 32000, 44100, 48000, 0 }, .long_name = NULL_IF_CONFIG_SMALL("libtwolame MP2 (MPEG audio layer 2)"), .priv_class = &libtwolame_class, }
Definition at line 176 of file libtwolame.c.
const AVClass libtwolame_class [static] |
Initial value:
{ .class_name = "libtwolame encoder", .item_name = av_default_item_name, .option = options, .version = LIBAVUTIL_VERSION_INT, }
Definition at line 169 of file libtwolame.c.
Initial value:
{ { "mode", "Mpeg Mode", OFFSET(mode), AV_OPT_TYPE_INT, { .i64 = TWOLAME_AUTO_MODE }, TWOLAME_AUTO_MODE, TWOLAME_MONO, AE, "mode"}, { "auto", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = TWOLAME_AUTO_MODE }, 0, 0, AE, "mode" }, { "stereo", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = TWOLAME_STEREO }, 0, 0, AE, "mode" }, { "joint_stereo", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = TWOLAME_JOINT_STEREO }, 0, 0, AE, "mode" }, { "dual_channel", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = TWOLAME_DUAL_CHANNEL }, 0, 0, AE, "mode" }, { "mono", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = TWOLAME_MONO }, 0, 0, AE, "mode" }, { "psymodel", "Psychoacoustic Model", OFFSET(psymodel), AV_OPT_TYPE_INT, { .i64 = 3 }, -1, 4, AE}, { "energy_levels","enable energy levels", OFFSET(energy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AE}, { "error_protection","enable CRC error protection", OFFSET(error_protection), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AE}, { "copyright", "set MPEG Audio Copyright flag", OFFSET(copyright), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AE}, { "original", "set MPEG Audio Original flag", OFFSET(original), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AE}, { NULL }, }
Definition at line 154 of file libtwolame.c.