FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
adtsenc.c File Reference
#include "libavcodec/get_bits.h"
#include "libavcodec/put_bits.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/mpeg4audio.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "apetag.h"

Go to the source code of this file.

Data Structures

struct  ADTSContext
 

Macros

#define ADTS_HEADER_SIZE   7
 
#define ADTS_MAX_FRAME_BYTES   ((1 << 13) - 1)
 
#define ENC   AV_OPT_FLAG_ENCODING_PARAM
 
#define OFFSET(obj)   offsetof(ADTSContext, obj)
 

Functions

static int adts_decode_extradata (AVFormatContext *s, ADTSContext *adts, uint8_t *buf, int size)
 
static int adts_write_header (AVFormatContext *s)
 
static int adts_write_frame_header (ADTSContext *ctx, uint8_t *buf, int size, int pce_size)
 
static int adts_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int adts_write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass adts_muxer_class
 
AVOutputFormat ff_adts_muxer
 

Macro Definition Documentation

#define ADTS_HEADER_SIZE   7

Definition at line 31 of file adtsenc.c.

Referenced by adts_write_frame_header(), and adts_write_packet().

#define ADTS_MAX_FRAME_BYTES   ((1 << 13) - 1)

Definition at line 44 of file adtsenc.c.

Referenced by adts_write_frame_header().

#define ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 179 of file adtsenc.c.

#define OFFSET (   obj)    offsetof(ADTSContext, obj)

Definition at line 180 of file adtsenc.c.

Function Documentation

static int adts_decode_extradata ( AVFormatContext s,
ADTSContext adts,
uint8_t buf,
int  size 
)
static

Definition at line 46 of file adtsenc.c.

Referenced by adts_write_header().

static int adts_write_header ( AVFormatContext s)
static

Definition at line 95 of file adtsenc.c.

static int adts_write_frame_header ( ADTSContext ctx,
uint8_t buf,
int  size,
int  pce_size 
)
static

Definition at line 107 of file adtsenc.c.

Referenced by adts_write_packet().

static int adts_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 145 of file adtsenc.c.

static int adts_write_trailer ( AVFormatContext s)
static

Definition at line 169 of file adtsenc.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "write_apetag", "Enable APE tag writing", OFFSET(apetag), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, ENC},
{ NULL },
}

Definition at line 181 of file adtsenc.c.

const AVClass adts_muxer_class
static
Initial value:
= {
.class_name = "ADTS muxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 186 of file adtsenc.c.

AVOutputFormat ff_adts_muxer
Initial value:
= {
.name = "adts",
.long_name = NULL_IF_CONFIG_SMALL("ADTS AAC (Advanced Audio Coding)"),
.mime_type = "audio/aac",
.extensions = "aac,adts",
.priv_data_size = sizeof(ADTSContext),
.audio_codec = AV_CODEC_ID_AAC,
.video_codec = AV_CODEC_ID_NONE,
.priv_class = &adts_muxer_class,
}

Definition at line 193 of file adtsenc.c.