45 "Unsupported subtitles codec: %s\n",
60 int x1 = -1, y1 = -1, x2 = -1, y2 = -1;
64 if (p &&
size == 16) {
73 "Insufficient timestamps in event number %d.\n", srt->
index);
77 avio_printf(avf->
pb,
"%d\n%02d:%02d:%02d,%03d --> %02d:%02d:%02d,%03d",
79 (
int)(
s / 3600000), (
int)(
s / 60000) % 60,
80 (
int)(
s / 1000) % 60, (
int)(
s % 1000),
81 (
int)(e / 3600000), (
int)(e / 60000) % 60,
82 (
int)(e / 1000) % 60, (
int)(e % 1000));
97 .p.mime_type =
"application/x-subrip",
98 .p.extensions =
"srt",
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
Writes a formatted string to the context.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt)
static void write_header(FFV1Context *f)
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
@ AV_CODEC_ID_TEXT
raw UTF-8 text
@ AV_PKT_DATA_SUBTITLE_POSITION
Subtitle event position.
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
Get side information from packet.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_NOPTS_VALUE
Undefined timestamp value.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#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....
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
AVIOContext * pb
I/O context.
void * priv_data
Format private data.
AVStream ** streams
A list of all streams in the file.
This structure stores compressed data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.