1.1.4
by Mario Limonciello
Import upstream version 1.0~rc2 |
1 |
#ifndef MPLAYER_SUBREADER_H
|
2 |
#define MPLAYER_SUBREADER_H
|
|
1
by Sebastian Dröge
Import upstream version 0.99+1.0pre7try2+cvs20051205 |
3 |
|
4 |
#include <stdio.h> |
|
5 |
||
6 |
extern int suboverlap_enabled; |
|
7 |
extern int sub_no_text_pp; // disable text post-processing |
|
8 |
extern int sub_match_fuzziness; |
|
9 |
||
10 |
// subtitle formats
|
|
11 |
#define SUB_INVALID -1
|
|
12 |
#define SUB_MICRODVD 0
|
|
13 |
#define SUB_SUBRIP 1
|
|
14 |
#define SUB_SUBVIEWER 2
|
|
15 |
#define SUB_SAMI 3
|
|
16 |
#define SUB_VPLAYER 4
|
|
17 |
#define SUB_RT 5
|
|
18 |
#define SUB_SSA 6
|
|
19 |
#define SUB_PJS 7
|
|
20 |
#define SUB_MPSUB 8
|
|
21 |
#define SUB_AQTITLE 9
|
|
22 |
#define SUB_SUBVIEWER2 10
|
|
23 |
#define SUB_SUBRIP09 11
|
|
24 |
#define SUB_JACOSUB 12
|
|
25 |
#define SUB_MPL2 13
|
|
26 |
||
27 |
// One of the SUB_* constant above
|
|
28 |
extern int sub_format; |
|
29 |
||
30 |
#define MAX_SUBTITLE_FILES 128
|
|
31 |
||
1.1.1
by Sebastian Dröge
Import upstream version 0.99+1.0pre7try2+cvs20060117 |
32 |
#define SUB_MAX_TEXT 12
|
1
by Sebastian Dröge
Import upstream version 0.99+1.0pre7try2+cvs20051205 |
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
|
|
42 |
||
43 |
typedef struct { |
|
44 |
||
45 |
int lines; |
|
46 |
||
47 |
unsigned long start; |
|
48 |
unsigned long end; |
|
49 |
||
50 |
char *text[SUB_MAX_TEXT]; |
|
1.1.4
by Mario Limonciello
Import upstream version 1.0~rc2 |
51 |
double endpts[SUB_MAX_TEXT]; |
1
by Sebastian Dröge
Import upstream version 0.99+1.0pre7try2+cvs20051205 |
52 |
unsigned char alignment; |
53 |
} subtitle; |
|
54 |
||
55 |
typedef struct { |
|
56 |
subtitle *subtitles; |
|
57 |
char *filename; |
|
58 |
int sub_uses_time; |
|
59 |
int sub_num; // number of subtitle structs |
|
60 |
int sub_errs; |
|
61 |
} sub_data; |
|
62 |
||
63 |
extern char *fribidi_charset; |
|
64 |
extern int flip_hebrew; |
|
65 |
extern int fribidi_flip_commas; |
|
66 |
||
67 |
sub_data* sub_read_file (char *filename, float pts); |
|
1.1.4
by Mario Limonciello
Import upstream version 1.0~rc2 |
68 |
subtitle* subcp_recode (subtitle *sub); |
1
by Sebastian Dröge
Import upstream version 0.99+1.0pre7try2+cvs20051205 |
69 |
// enca_fd is the file enca uses to determine the codepage.
|
70 |
// setting to NULL disables enca.
|
|
1.1.2
by Reinhard Tartler
Import upstream version 0.99+1.0pre8 |
71 |
struct stream_st; |
72 |
void subcp_open (struct stream_st *st); /* for demux_ogg.c */ |
|
1
by Sebastian Dröge
Import upstream version 0.99+1.0pre7try2+cvs20051205 |
73 |
void subcp_close (void); /* for demux_ogg.c */ |
0.2.1
by Reinhard Tartler
Import upstream version 1.0~rc2+svn20090303 |
74 |
#ifdef CONFIG_ENCA
|
75 |
const char* guess_buffer_cp(unsigned char* buffer, int buflen, const char *preferred_language, const char *fallback); |
|
76 |
const char* guess_cp(struct stream_st *st, const char *preferred_language, const char *fallback); |
|
1
by Sebastian Dröge
Import upstream version 0.99+1.0pre7try2+cvs20051205 |
77 |
#endif
|
1.1.3
by William Grant
Import upstream version 1.0~rc1 |
78 |
char ** sub_filenames(const char *path, char *fname); |
1
by Sebastian Dröge
Import upstream version 0.99+1.0pre7try2+cvs20051205 |
79 |
void list_sub_file(sub_data* subd); |
80 |
void dump_srt(sub_data* subd, float fps); |
|
81 |
void dump_mpsub(sub_data* subd, float fps); |
|
82 |
void dump_microdvd(sub_data* subd, float fps); |
|
83 |
void dump_jacosub(sub_data* subd, float fps); |
|
84 |
void dump_sami(sub_data* subd, float fps); |
|
85 |
void sub_free( sub_data * subd ); |
|
86 |
void find_sub(sub_data* subd,int key); |
|
87 |
void step_sub(sub_data *subd, float pts, int movement); |
|
1.1.4
by Mario Limonciello
Import upstream version 1.0~rc2 |
88 |
void sub_add_text(subtitle *sub, const char *txt, int len, double endpts); |
89 |
int sub_clear_text(subtitle *sub, double pts); |
|
0.2.1
by Reinhard Tartler
Import upstream version 1.0~rc2+svn20090303 |
90 |
|
91 |
#endif /* MPLAYER_SUBREADER_H */ |