/
xine_demux_sputext.h
48 lines (31 loc) · 1.17 KB
/
xine_demux_sputext.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef XINE_DEMUX_SPUTEXT_H
#define XINE_DEMUX_SPUTEXT_H
#include "io/mythmediabuffer.h"
#define SUB_BUFSIZE 1024
#define SUB_MAX_TEXT 5
#define MAX_TIMEOUT 4
#define DEBUG_XINE_DEMUX_SPUTEXT 0
struct subtitle_t {
int lines; ///< Count of text lines in this subtitle set.
long start; ///< Starting time in msec or starting frame
long end; ///< Ending time in msec or starting frame
char *text[SUB_MAX_TEXT]; ///< The subtitle text lines.
};
struct demux_sputext_t {
char *rbuffer_text;
off_t rbuffer_len;
off_t rbuffer_cur;
int status;
char buf[SUB_BUFSIZE];
off_t buflen;
float mpsub_position;
int uses_time;
int errs;
subtitle_t *subtitles;
int num; /* number of subtitle structs */
int cur; /* current subtitle */
int format; /* constants see below */
char next_line[SUB_BUFSIZE]; /* a buffer for next line read from file */
};
subtitle_t *sub_read_file (demux_sputext_t *demuxstr);
#endif