Go to the documentation of this file.
41 if(
s->nb_streams != 1 ||
44 "LRC supports only a single subtitle stream.\n");
66 for(metadata_item =
NULL;
67 (metadata_item =
av_dict_get(
s->metadata,
"", metadata_item,
70 if(!metadata_item->
value[0]) {
73 while((delim = strchr(metadata_item->
value,
'\n'))) {
76 while((delim = strchr(metadata_item->
value,
'\r'))) {
80 metadata_item->
key, metadata_item->
value);
100 delim >=
data && (delim[0] ==
'\n' || delim[0] ==
'\r'); delim--) {
104 while(
line[0] ==
'\n' ||
line[0] ==
'\r') {
109 delim = strchr(
line,
'\n');
111 if(delim >
line && delim[-1] ==
'\r') {
119 "Subtitle starts with '[', may cause problems with LRC format.\n");
123 avio_printf(
s->pb,
"[%02"PRId64
":%02"PRId64
".%02"PRId64
"]",
130 avio_printf(
s->pb,
"[-%02"PRId64
":%02"PRId64
".%02"PRId64
"]",
#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
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key,...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
static int lrc_write_packet(AVFormatContext *s, AVPacket *pkt)
const AVMetadataConv ff_lrc_metadata_conv[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define AV_NOPTS_VALUE
Undefined timestamp value.
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
@ 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.
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.
AVOutputFormat ff_lrc_muxer
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)