FFmpeg  4.0
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
 
AVOutputFormat ff_ass_muxer
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 216 of file assenc.c.

◆ E

Definition at line 217 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 85 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 115 of file assenc.c.

Referenced by write_packet().

◆ write_packet()

static int write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 155 of file assenc.c.

◆ write_trailer()

static int write_trailer ( AVFormatContext s)
static

Definition at line 203 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 },
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: assenc.c:216
#define E
Definition: assenc.c:217

Definition at line 218 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,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption options[]
Definition: assenc.c:218

Definition at line 223 of file assenc.c.

◆ ff_ass_muxer

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,
}
static int write_header(AVFormatContext *s)
Definition: assenc.c:46
static int write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: assenc.c:155
static const AVClass ass_class
Definition: assenc.c:223
#define AVFMT_TS_NONSTRICT
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:479
static int flags
Definition: log.c:55
static int write_trailer(AVFormatContext *s)
Definition: assenc.c:203
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AVFMT_GLOBALHEADER
Format wants global header.
Definition: avformat.h:468
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:469

Definition at line 230 of file assenc.c.