FFmpeg
Data Structures | Macros | Functions | Variables
latmenc.c File Reference
#include "libavcodec/get_bits.h"
#include "libavcodec/put_bits.h"
#include "libavcodec/codec_id.h"
#include "libavcodec/codec_par.h"
#include "libavcodec/packet.h"
#include "libavcodec/mpeg4audio.h"
#include "libavcodec/mpeg4audio_copy_pce.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"
#include "mux.h"
#include "rawenc.h"

Go to the source code of this file.

Data Structures

struct  LATMContext
 

Macros

#define MAX_EXTRADATA_SIZE   1024
 

Functions

static int latm_decode_extradata (AVFormatContext *s, uint8_t *buf, int size)
 
static int latm_write_header (AVFormatContext *s)
 
static void copy_bits (PutBitContext *pb, const uint8_t *src, int length)
 
static void latm_write_frame_header (AVFormatContext *s, PutBitContext *bs)
 
static int latm_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int latm_check_bitstream (AVFormatContext *s, AVStream *st, const AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass latm_muxer_class
 
const FFOutputFormat ff_latm_muxer
 

Macro Definition Documentation

◆ MAX_EXTRADATA_SIZE

#define MAX_EXTRADATA_SIZE   1024

Definition at line 35 of file latmenc.c.

Function Documentation

◆ latm_decode_extradata()

static int latm_decode_extradata ( AVFormatContext s,
uint8_t *  buf,
int  size 
)
static

Definition at line 60 of file latmenc.c.

Referenced by latm_write_header(), and latm_write_packet().

◆ latm_write_header()

static int latm_write_header ( AVFormatContext s)
static

Definition at line 90 of file latmenc.c.

◆ copy_bits()

static void copy_bits ( PutBitContext pb,
const uint8_t *  src,
int  length 
)
static

Definition at line 108 of file latmenc.c.

Referenced by latm_write_frame_header(), and latm_write_packet().

◆ latm_write_frame_header()

static void latm_write_frame_header ( AVFormatContext s,
PutBitContext bs 
)
static

Definition at line 119 of file latmenc.c.

Referenced by latm_write_packet().

◆ latm_write_packet()

static int latm_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 165 of file latmenc.c.

◆ latm_check_bitstream()

static int latm_check_bitstream ( AVFormatContext s,
AVStream st,
const AVPacket pkt 
)
static

Definition at line 250 of file latmenc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{"smc-interval", "StreamMuxConfig interval.",
0x42, AV_OPT_TYPE_INT, {.i64 = 0x0014}, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM},
{NULL},
}

Definition at line 47 of file latmenc.c.

◆ latm_muxer_class

const AVClass latm_muxer_class
static
Initial value:
= {
.class_name = "LATM/LOAS muxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 53 of file latmenc.c.

◆ ff_latm_muxer

const FFOutputFormat ff_latm_muxer
Initial value:
= {
.p.name = "latm",
.p.long_name = NULL_IF_CONFIG_SMALL("LOAS/LATM"),
.p.mime_type = "audio/MP4A-LATM",
.p.extensions = "latm,loas",
.priv_data_size = sizeof(LATMContext),
.p.audio_codec = AV_CODEC_ID_AAC,
.p.video_codec = AV_CODEC_ID_NONE,
.write_header = latm_write_header,
.write_packet = latm_write_packet,
.p.priv_class = &latm_muxer_class,
.check_bitstream= latm_check_bitstream,
.p.flags = AVFMT_NOTIMESTAMPS,
}

Definition at line 263 of file latmenc.c.

latm_muxer_class
static const AVClass latm_muxer_class
Definition: latmenc.c:53
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:480
latm_check_bitstream
static int latm_check_bitstream(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
Definition: latmenc.c:250
AV_OPT_FLAG_ENCODING_PARAM
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:281
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_CODEC_ID_AAC
@ AV_CODEC_ID_AAC
Definition: codec_id.h:445
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
latm_write_packet
static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: latmenc.c:165
latm_write_header
static int latm_write_header(AVFormatContext *s)
Definition: latmenc.c:90
LATMContext
Definition: aacdec.c:265
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
options
static const AVOption options[]
Definition: latmenc.c:47