Go to the documentation of this file.
65 for(metadata_item =
NULL;
68 if(!metadata_item->
value[0]) {
71 while((delim = strchr(metadata_item->
value,
'\n'))) {
74 while((delim = strchr(metadata_item->
value,
'\r'))) {
78 metadata_item->
key, metadata_item->
value);
92 while (end >
line && (end[-1] ==
'\n' || end[-1] ==
'\r'))
95 while (
line[0] ==
'\n' ||
line[0] ==
'\r')
104 const uint8_t *next_line = memchr(
line,
'\n', end -
line);
109 if (next_line >
line && next_line[-1] ==
'\r')
115 "Subtitle starts with '[', may cause problems with LRC format.\n");
126 avio_printf(
s->pb,
"%02"PRIu64
":%02"PRIu64
".%0*"PRIu64
"]",
127 minutes, seconds, p->
precision, rescaled);
137 #define OFFSET(x) offsetof(LRCSubtitleContext, x)
138 #define SE AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM
140 {
"precision",
"precision of the fractional part of the timestamp, 2 for centiseconds",
OFFSET(precision),
AV_OPT_TYPE_INT, {.i64 = 2}, 1, 6,
SE},
154 .p.extensions =
"lrc",
#define AV_LOG_WARNING
Something somehow does not look correct.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int precision
precision of the fractional part of the timestamp, 2 for centiseconds
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
const FFOutputFormat ff_lrc_muxer
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int lrc_write_packet(AVFormatContext *s, AVPacket *pkt)
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
static const AVOption options[]
const AVMetadataConv ff_lrc_metadata_conv[]
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
Rational number (pair of numerator and denominator).
const char * av_default_item_name(void *ptr)
Return the context name.
void avio_w8(AVIOContext *s, int b)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int ff_standardize_creation_time(AVFormatContext *s)
Standardize creation_time metadata in AVFormatContext to an ISO-8601 timestamp string.
#define AV_NOPTS_VALUE
Undefined timestamp value.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
#define AV_TIME_BASE
Internal time base represented as integer.
#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....
static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
@ AV_CODEC_ID_TEXT
raw UTF-8 text
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
Writes a formatted string to the context.
static const AVClass lrcenc_class
@ AV_OPT_TYPE_INT
Underlying C type is int.
This structure stores compressed data.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
static void write_header(FFV1Context *f)
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
The official guide to swscale for confused that consecutive non overlapping rectangles of slice_bottom special converter These generally are unscaled converters of common like for each output line the vertical scaler pulls lines from a ring buffer When the ring buffer does not contain the wanted line
static int lrc_write_header(AVFormatContext *s)