FFmpeg
1.2.4
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavformat
subtitles.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012 Clément Bœsch
3
*
4
* This file is part of FFmpeg.
5
*
6
* FFmpeg is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* FFmpeg is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with FFmpeg; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef AVFORMAT_SUBTITLES_H
22
#define AVFORMAT_SUBTITLES_H
23
24
#include <stdint.h>
25
#include "
avformat.h
"
26
#include "libavutil/bprint.h"
27
28
typedef
struct
{
29
AVPacket
*
subs
;
30
int
nb_subs
;
31
int
allocated_size
;
32
int
current_sub_idx
;
33
}
FFDemuxSubtitlesQueue
;
34
43
AVPacket
*
ff_subtitles_queue_insert
(
FFDemuxSubtitlesQueue
*q,
44
const
uint8_t
*event,
int
len
,
int
merge
);
45
49
void
ff_subtitles_queue_finalize
(
FFDemuxSubtitlesQueue
*q);
50
55
int
ff_subtitles_queue_read_packet
(
FFDemuxSubtitlesQueue
*q,
AVPacket
*
pkt
);
56
61
int
ff_subtitles_queue_seek
(
FFDemuxSubtitlesQueue
*q,
AVFormatContext
*s,
int
stream_index,
62
int64_t min_ts, int64_t ts, int64_t max_ts,
int
flags
);
63
67
void
ff_subtitles_queue_clean
(
FFDemuxSubtitlesQueue
*q);
68
74
int
ff_smil_extract_next_chunk
(
AVIOContext
*pb,
AVBPrint
*buf,
char
*
c
);
75
82
const
char
*
ff_smil_get_attr_ptr
(
const
char
*s,
const
char
*attr);
83
97
void
ff_subtitles_read_chunk
(
AVIOContext
*pb,
AVBPrint
*buf);
98
103
static
av_always_inline
int
ff_subtitles_next_line
(
const
char
*ptr)
104
{
105
int
n = strcspn(ptr,
"\n"
);
106
ptr += n;
107
if
(*ptr ==
'\n'
)
108
n++;
109
return
n;
110
}
111
112
#endif
/* AVFORMAT_SUBTITLES_H */
Generated on Fri Nov 29 2013 19:15:20 for FFmpeg by
1.8.1.2