1 #ifndef __MPLAYER_SUBREADER_H
2 #define __MPLAYER_SUBREADER_H
6 extern int suboverlap_enabled
;
7 extern int sub_no_text_pp
; // disable text post-processing
8 extern int sub_match_fuzziness
;
11 #define SUB_INVALID -1
12 #define SUB_MICRODVD 0
14 #define SUB_SUBVIEWER 2
22 #define SUB_SUBVIEWER2 10
23 #define SUB_SUBRIP09 11
24 #define SUB_JACOSUB 12
27 // One of the SUB_* constant above
28 extern int sub_format
;
30 #define MAX_SUBTITLE_FILES 128
32 #define SUB_MAX_TEXT 12
33 #define SUB_ALIGNMENT_BOTTOMLEFT 1
34 #define SUB_ALIGNMENT_BOTTOMCENTER 2
35 #define SUB_ALIGNMENT_BOTTOMRIGHT 3
36 #define SUB_ALIGNMENT_MIDDLELEFT 4
37 #define SUB_ALIGNMENT_MIDDLECENTER 5
38 #define SUB_ALIGNMENT_MIDDLERIGHT 6
39 #define SUB_ALIGNMENT_TOPLEFT 7
40 #define SUB_ALIGNMENT_TOPCENTER 8
41 #define SUB_ALIGNMENT_TOPRIGHT 9
50 char *text
[SUB_MAX_TEXT
];
51 unsigned char alignment
;
58 int sub_num
; // number of subtitle structs
63 extern char *fribidi_charset
;
64 extern int flip_hebrew
;
65 extern int fribidi_flip_commas
;
68 sub_data
* sub_read_file (char *filename
, float pts
);
69 subtitle
* subcp_recode1 (subtitle
*sub
);
70 // enca_fd is the file enca uses to determine the codepage.
71 // setting to NULL disables enca.
73 void subcp_open (struct stream_st
*st
); /* for demux_ogg.c */
74 void subcp_close (void); /* for demux_ogg.c */
76 void* guess_buffer_cp(unsigned char* buffer
, int buflen
, char *preferred_language
, char *fallback
);
77 void* guess_cp(struct stream_st
*st
, char *preferred_language
, char *fallback
);
79 char ** sub_filenames(const char *path
, char *fname
);
80 void list_sub_file(sub_data
* subd
);
81 void dump_srt(sub_data
* subd
, float fps
);
82 void dump_mpsub(sub_data
* subd
, float fps
);
83 void dump_microdvd(sub_data
* subd
, float fps
);
84 void dump_jacosub(sub_data
* subd
, float fps
);
85 void dump_sami(sub_data
* subd
, float fps
);
86 void sub_free( sub_data
* subd
);
87 void find_sub(sub_data
* subd
,int key
);
88 void step_sub(sub_data
*subd
, float pts
, int movement
);