Mercurial > mplayer.hg
annotate subreader.h @ 12567:4d76973b6c98
sync
author | wight |
---|---|
date | Fri, 11 Jun 2004 13:21:36 +0000 |
parents | ae4ae7ab636c |
children | dc8eba991005 |
rev | line source |
---|---|
616 | 1 #ifndef __MPLAYER_SUBREADER_H |
2 #define __MPLAYER_SUBREADER_H | |
258 | 3 |
8361
2202c00001e3
overlapping subtitles support is now optional, can be disabled (-nooverlapsub)
arpi
parents:
7982
diff
changeset
|
4 extern int suboverlap_enabled; |
9126
7a06258271d6
Add a command line option (-sub-no-text-pp) to disable subtitles
arpi
parents:
8733
diff
changeset
|
5 extern int sub_no_text_pp; // disable text post-processing |
9893 | 6 extern int sub_match_fuzziness; |
2912 | 7 |
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 | |
11873 | 17 #define SUB_PJS 7 |
2912 | 18 #define SUB_MPSUB 8 |
19 #define SUB_AQTITLE 9 | |
6012 | 20 #define SUB_SUBVIEWER2 10 |
6076
eff64fb1ffea
patch fixes broken detecniou of AQTitle subtiles and adds support for subtitles created by subrip 0.9 - by Jiri.Svoboda@seznam.cz
arpi
parents:
6012
diff
changeset
|
21 #define SUB_SUBRIP09 11 |
7982
eac680483e6c
JACOSub is another subtitling format, whose specifications are at:
arpi
parents:
7460
diff
changeset
|
22 #define SUB_JACOSUB 12 |
12138
eb3ad04675e1
MPL2 subreader, patch by Cezary Jackiewicz (cjackiewicz@poczta.onet.pl)
alex
parents:
11873
diff
changeset
|
23 #define SUB_MPL2 13 |
2912 | 24 |
25 // One of the SUB_* constant above | |
26 extern int sub_format; | |
27 | |
9870
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
28 #define MAX_SUBTITLE_FILES 128 |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
29 |
7215
065387d29573
increased SUB_MAX_TEXT by Piotr Krukowiecki <piotr@pingu.ii.uj.edu.pl>
alex
parents:
6792
diff
changeset
|
30 #define SUB_MAX_TEXT 10 |
10916
c36db88bfbc4
Subtitle alignment & smart splitting by Salvatore Falco
henry
parents:
9893
diff
changeset
|
31 #define SUB_ALIGNMENT_HLEFT 1 |
c36db88bfbc4
Subtitle alignment & smart splitting by Salvatore Falco
henry
parents:
9893
diff
changeset
|
32 #define SUB_ALIGNMENT_HCENTER 0 |
c36db88bfbc4
Subtitle alignment & smart splitting by Salvatore Falco
henry
parents:
9893
diff
changeset
|
33 #define SUB_ALIGNMENT_HRIGHT 2 |
258 | 34 |
35 typedef struct { | |
36 | |
37 int lines; | |
38 | |
39 unsigned long start; | |
40 unsigned long end; | |
41 | |
42 char *text[SUB_MAX_TEXT]; | |
10916
c36db88bfbc4
Subtitle alignment & smart splitting by Salvatore Falco
henry
parents:
9893
diff
changeset
|
43 unsigned char alignment; |
258 | 44 } subtitle; |
45 | |
9870
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
46 typedef struct { |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
47 subtitle *subtitles; |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
48 char *filename; |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
49 int sub_uses_time; |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
50 int sub_num; // number of subtitle structs |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
51 int sub_errs; |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
52 } sub_data; |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
53 |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
54 sub_data* sub_read_file (char *filename, float pts); |
8618
a879b231b7e3
This patch adds a call to subcp_recode1(), so this subtitles too are
arpi
parents:
8451
diff
changeset
|
55 subtitle* subcp_recode1 (subtitle *sub); |
12443 | 56 void subcp_open (char *current_sub_cp); /* for demux_ogg.c */ |
57 void subcp_open_noenca (); /* for demux_ogg.c */ | |
8733
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8618
diff
changeset
|
58 void subcp_close (void); /* for demux_ogg.c */ |
9870
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
59 char ** sub_filenames(char *path, char *fname); |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
60 void list_sub_file(sub_data* subd); |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
61 void dump_srt(sub_data* subd, float fps); |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
62 void dump_mpsub(sub_data* subd, float fps); |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
63 void dump_microdvd(sub_data* subd, float fps); |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
64 void dump_jacosub(sub_data* subd, float fps); |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
65 void dump_sami(sub_data* subd, float fps); |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
66 void sub_free( sub_data * subd ); |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
67 void find_sub(sub_data* subd,int key); |
09d630a4f991
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
henry
parents:
9126
diff
changeset
|
68 void step_sub(sub_data *subd, float pts, int movement); |
818 | 69 #endif |