FFmpeg
Data Structures | Macros | Functions | Variables
assenc.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/mem.h"
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "mux.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 FFOutputFormat ff_ass_muxer
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 218 of file assenc.c.

◆ E

Definition at line 219 of file assenc.c.

Function Documentation

◆ write_header()

static int write_header ( AVFormatContext s)
static

Definition at line 49 of file assenc.c.

◆ purge_dialogues()

static void purge_dialogues ( AVFormatContext s,
int  force 
)
static

Definition at line 82 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 112 of file assenc.c.

Referenced by write_packet().

◆ write_packet()

static int write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 152 of file assenc.c.

◆ write_trailer()

static int write_trailer ( AVFormatContext s)
static

Definition at line 205 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 220 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 225 of file assenc.c.

◆ ff_ass_muxer

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

Definition at line 232 of file assenc.c.

AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:479
FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
#define FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat....
Definition: mux.h:59
AV_CODEC_ID_ASS
@ AV_CODEC_ID_ASS
Definition: codec_id.h:578
write_header
static int write_header(AVFormatContext *s)
Definition: assenc.c:49
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:225
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
OFFSET
#define OFFSET(x)
Definition: assenc.c:218
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:94
write_packet
static int write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: assenc.c:152
AVFMT_GLOBALHEADER
#define AVFMT_GLOBALHEADER
Format wants global header.
Definition: avformat.h:478
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
FF_OFMT_FLAG_MAX_ONE_OF_EACH
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
Definition: mux.h:50
AVFMT_TS_NONSTRICT
#define AVFMT_TS_NONSTRICT
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:491
E
#define E
Definition: assenc.c:219
ASSContext
Definition: assdec.c:31
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition: opt.h:327
options
static const AVOption options[]
Definition: assenc.c:220
write_trailer
static int write_trailer(AVFormatContext *s)
Definition: assenc.c:205