Real rstp:// streaming support, ported from xine
[mplayer/greg.git] / subreader.h
blob3b6b4c60c273466188b7240302f20b8d69f6601b
1 #ifndef __MPLAYER_SUBREADER_H
2 #define __MPLAYER_SUBREADER_H
4 extern int suboverlap_enabled;
5 extern int sub_no_text_pp; // disable text post-processing
6 extern int sub_match_fuzziness;
8 // subtitle formats
9 #define SUB_INVALID -1
10 #define SUB_MICRODVD 0
11 #define SUB_SUBRIP 1
12 #define SUB_SUBVIEWER 2
13 #define SUB_SAMI 3
14 #define SUB_VPLAYER 4
15 #define SUB_RT 5
16 #define SUB_SSA 6
17 #define SUB_DUNNOWHAT 7 // FIXME what format is it ?
18 #define SUB_MPSUB 8
19 #define SUB_AQTITLE 9
20 #define SUB_SUBVIEWER2 10
21 #define SUB_SUBRIP09 11
22 #define SUB_JACOSUB 12
24 // One of the SUB_* constant above
25 extern int sub_format;
27 #define MAX_SUBTITLE_FILES 128
29 #define SUB_MAX_TEXT 10
31 typedef struct {
33 int lines;
35 unsigned long start;
36 unsigned long end;
38 char *text[SUB_MAX_TEXT];
39 } subtitle;
41 typedef struct {
42 subtitle *subtitles;
43 char *filename;
44 int sub_uses_time;
45 int sub_num; // number of subtitle structs
46 int sub_errs;
47 } sub_data;
49 sub_data* sub_read_file (char *filename, float pts);
50 subtitle* subcp_recode1 (subtitle *sub);
51 void subcp_open (void); /* for demux_ogg.c */
52 void subcp_close (void); /* for demux_ogg.c */
53 char ** sub_filenames(char *path, char *fname);
54 void list_sub_file(sub_data* subd);
55 void dump_srt(sub_data* subd, float fps);
56 void dump_mpsub(sub_data* subd, float fps);
57 void dump_microdvd(sub_data* subd, float fps);
58 void dump_jacosub(sub_data* subd, float fps);
59 void dump_sami(sub_data* subd, float fps);
60 void sub_free( sub_data * subd );
61 void find_sub(sub_data* subd,int key);
62 void step_sub(sub_data *subd, float pts, int movement);
63 #endif