Punctuation. ;)
[mplayer/glamo.git] / subreader.h
blob708b4a8945e65618dca818b58034f96abe66bc92
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
30 #define SUB_ALIGNMENT_HLEFT 1
31 #define SUB_ALIGNMENT_HCENTER 0
32 #define SUB_ALIGNMENT_HRIGHT 2
34 typedef struct {
36 int lines;
38 unsigned long start;
39 unsigned long end;
41 char *text[SUB_MAX_TEXT];
42 unsigned char alignment;
43 } subtitle;
45 typedef struct {
46 subtitle *subtitles;
47 char *filename;
48 int sub_uses_time;
49 int sub_num; // number of subtitle structs
50 int sub_errs;
51 } sub_data;
53 sub_data* sub_read_file (char *filename, float pts);
54 subtitle* subcp_recode1 (subtitle *sub);
55 void subcp_open (void); /* for demux_ogg.c */
56 void subcp_close (void); /* for demux_ogg.c */
57 char ** sub_filenames(char *path, char *fname);
58 void list_sub_file(sub_data* subd);
59 void dump_srt(sub_data* subd, float fps);
60 void dump_mpsub(sub_data* subd, float fps);
61 void dump_microdvd(sub_data* subd, float fps);
62 void dump_jacosub(sub_data* subd, float fps);
63 void dump_sami(sub_data* subd, float fps);
64 void sub_free( sub_data * subd );
65 void find_sub(sub_data* subd,int key);
66 void step_sub(sub_data *subd, float pts, int movement);
67 #endif