FFmpeg
Data Structures | Macros | Functions | Variables
assenc.c File Reference
#include "libavutil/avstring.h"
#include "avformat.h"
#include "internal.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  DialogueLine
 
struct  ASSContext
 

Macros

#define OFFSET(x)   offsetof(ASSContext, x)
 
#define E   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int write_header (AVFormatContext *s)
 
static void purge_dialogues (AVFormatContext *s, int force)
 
static void insert_dialogue (ASSContext *ass, DialogueLine *dialogue)
 
static int write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass ass_class
 
const AVOutputFormat ff_ass_muxer
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(ASSContext, x)

Definition at line 215 of file assenc.c.

◆ E

Definition at line 216 of file assenc.c.

Function Documentation

◆ write_header()

static int write_header ( AVFormatContext s)
static

Definition at line 46 of file assenc.c.

◆ purge_dialogues()

static void purge_dialogues ( AVFormatContext s,
int  force 
)
static

Definition at line 84 of file assenc.c.

Referenced by write_packet(), and write_trailer().

◆ insert_dialogue()

static void insert_dialogue ( ASSContext ass,
DialogueLine dialogue 
)
static

Definition at line 114 of file assenc.c.

Referenced by write_packet().

◆ write_packet()

static int write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 154 of file assenc.c.

◆ write_trailer()

static int write_trailer ( AVFormatContext s)
static

Definition at line 202 of file assenc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "ignore_readorder", "write events immediately, even if they're out-of-order", OFFSET(ignore_readorder), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, E },
{ NULL },
}

Definition at line 217 of file assenc.c.

◆ ass_class

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

Definition at line 222 of file assenc.c.

◆ ff_ass_muxer

const AVOutputFormat ff_ass_muxer
Initial value:
= {
.name = "ass",
.long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
.mime_type = "text/x-ass",
.extensions = "ass,ssa",
.priv_data_size = sizeof(ASSContext),
.subtitle_codec = AV_CODEC_ID_ASS,
.priv_class = &ass_class,
}

Definition at line 229 of file assenc.c.

AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:475
AV_CODEC_ID_ASS
@ AV_CODEC_ID_ASS
Definition: codec_id.h:544
write_header
static int write_header(AVFormatContext *s)
Definition: assenc.c:46
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
ass_class
static const AVClass ass_class
Definition: assenc.c:222
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
OFFSET
#define OFFSET(x)
Definition: assenc.c:215
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:117
write_packet
static int write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: assenc.c:154
AVFMT_GLOBALHEADER
#define AVFMT_GLOBALHEADER
Format wants global header.
Definition: avformat.h:474
AVFMT_TS_NONSTRICT
#define AVFMT_TS_NONSTRICT
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:485
E
#define E
Definition: assenc.c:216
ASSContext
Definition: assdec.c:31
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:241
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
options
static const AVOption options[]
Definition: assenc.c:217
write_trailer
static int write_trailer(AVFormatContext *s)
Definition: assenc.c:202