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"
#include "id3v2.h"

Go to the source code of this file.

Data Structures

struct  ADTSContext


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


static int adts_decode_extradata (AVFormatContext *s, ADTSContext *adts, const 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)


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 32 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 46 of file adtsenc.c.

Referenced by adts_write_frame_header().


Definition at line 183 of file adtsenc.c.

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

Definition at line 184 of file adtsenc.c.

Function Documentation

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

Definition at line 48 of file adtsenc.c.

Referenced by adts_write_header().

static int adts_write_header ( AVFormatContext s)

Definition at line 97 of file adtsenc.c.

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

Definition at line 111 of file adtsenc.c.

Referenced by adts_write_packet().

static int adts_write_packet ( AVFormatContext s,
AVPacket pkt 

Definition at line 149 of file adtsenc.c.

static int adts_write_trailer ( AVFormatContext s)

Definition at line 173 of file adtsenc.c.

Variable Documentation

const AVOption options[]
Initial value:
= {
{ "write_id3v2", "Enable ID3v2 tag writing", OFFSET(id3v2tag), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, ENC},
{ "write_apetag", "Enable APE tag writing", OFFSET(apetag), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, ENC},
{ NULL },
#define NULL
Definition: coverity.c:32
#define ENC
Definition: adtsenc.c:183
#define OFFSET(obj)
Definition: adtsenc.c:184

Definition at line 185 of file adtsenc.c.

const AVClass adts_muxer_class
Initial value:
= {
.class_name = "ADTS muxer",
.item_name = av_default_item_name,
.option = options,
Definition: version.h:70
static const AVOption options[]
Definition: adtsenc.c:185

Definition at line 191 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,
static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: adtsenc.c:149
static int adts_write_header(AVFormatContext *s)
Definition: adtsenc.c:97
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
Format does not need / have any timestamps.
Definition: avformat.h:484
static int flags
Definition: cpu.c:47
static const AVClass adts_muxer_class
Definition: adtsenc.c:191
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:498
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: v4l2enc.c:86
static int adts_write_trailer(AVFormatContext *s)
Definition: adtsenc.c:173

Definition at line 198 of file adtsenc.c.