FFmpeg
Data Structures | Macros | Functions | Variables
lrcenc.c File Reference
#include <inttypes.h>
#include <stdint.h>
#include <string.h>
#include "avformat.h"
#include "internal.h"
#include "lrc.h"
#include "metadata.h"
#include "mux.h"
#include "version.h"
#include "libavutil/dict.h"
#include "libavutil/log.h"
#include "libavutil/macros.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  LRCSubtitleContext
 

Macros

#define OFFSET(x)   offsetof(LRCSubtitleContext, x)
 
#define SE   AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int lrc_write_header (AVFormatContext *s)
 
static int lrc_write_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass lrcenc_class
 
const FFOutputFormat ff_lrc_muxer
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 137 of file lrcenc.c.

◆ SE

Definition at line 138 of file lrcenc.c.

Function Documentation

◆ lrc_write_header()

static int lrc_write_header ( AVFormatContext s)
static

Definition at line 42 of file lrcenc.c.

◆ lrc_write_packet()

static int lrc_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 84 of file lrcenc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{"precision", "precision of the fractional part of the timestamp, 2 for centiseconds", OFFSET(precision), AV_OPT_TYPE_INT, {.i64 = 2}, 1, 6, SE},
{ NULL },
}

Definition at line 139 of file lrcenc.c.

◆ lrcenc_class

const AVClass lrcenc_class
static
Initial value:
= {
.class_name = "lrc",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 144 of file lrcenc.c.

◆ ff_lrc_muxer

const FFOutputFormat ff_lrc_muxer
Initial value:
= {
.p.name = "lrc",
.p.long_name = NULL_IF_CONFIG_SMALL("LRC lyrics"),
.p.extensions = "lrc",
.p.video_codec = AV_CODEC_ID_NONE,
.p.audio_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_SUBRIP,
.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
.priv_data_size = sizeof(LRCSubtitleContext),
.p.priv_class = &lrcenc_class,
}

Definition at line 151 of file lrcenc.c.

AVFMT_VARIABLE_FPS
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:481
OFFSET
#define OFFSET(x)
Definition: lrcenc.c:137
LRCSubtitleContext
Definition: lrcenc.c:37
lrc_write_packet
static int lrc_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: lrcenc.c:84
options
static const AVOption options[]
Definition: lrcenc.c:139
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:241
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
AVFMT_GLOBALHEADER
#define AVFMT_GLOBALHEADER
Format wants global header.
Definition: avformat.h:477
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
AV_CODEC_ID_SUBRIP
@ AV_CODEC_ID_SUBRIP
Definition: codec_id.h:579
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
write_packet
static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt)
Definition: ffmpeg_mux.c:209
AVFMT_TS_NEGATIVE
#define AVFMT_TS_NEGATIVE
Format allows muxing negative timestamps.
Definition: avformat.h:490
AVFMT_TS_NONSTRICT
#define AVFMT_TS_NONSTRICT
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:487
SE
#define SE
Definition: lrcenc.c:138
lrcenc_class
static const AVClass lrcenc_class
Definition: lrcenc.c:144
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:384
lrc_write_header
static int lrc_write_header(AVFormatContext *s)
Definition: lrcenc.c:42