summaryrefslogtreecommitdiffstats
path: root/subreader.h
diff options
context:
space:
mode:
authorhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-07 16:04:02 +0000
committerhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-07 16:04:02 +0000
commit3f4505eabb260dca3cc0714d36f9c76632821771 (patch)
tree745dd9cb07e48e80849e6825463639bdc3f02470 /subreader.h
parentbc745edb16dfcea782082205fba3ca854c6bd0c9 (diff)
downloadmpv-3f4505eabb260dca3cc0714d36f9c76632821771.tar.bz2
mpv-3f4505eabb260dca3cc0714d36f9c76632821771.tar.xz
support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9871 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.h')
-rw-r--r--subreader.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/subreader.h b/subreader.h
index f3ef2e4c4e..d1c9a82c24 100644
--- a/subreader.h
+++ b/subreader.h
@@ -1,9 +1,6 @@
#ifndef __MPLAYER_SUBREADER_H
#define __MPLAYER_SUBREADER_H
-extern int sub_uses_time;
-extern int sub_errs;
-extern int sub_num; // number of subtitle structs
extern int suboverlap_enabled;
extern int sub_no_text_pp; // disable text post-processing
@@ -26,6 +23,8 @@ extern int sub_no_text_pp; // disable text post-processing
// One of the SUB_* constant above
extern int sub_format;
+#define MAX_SUBTITLE_FILES 128
+
#define SUB_MAX_TEXT 10
typedef struct {
@@ -38,18 +37,26 @@ typedef struct {
char *text[SUB_MAX_TEXT];
} subtitle;
-subtitle* sub_read_file (char *filename, float pts);
+typedef struct {
+ subtitle *subtitles;
+ char *filename;
+ int sub_uses_time;
+ int sub_num; // number of subtitle structs
+ int sub_errs;
+} sub_data;
+
+sub_data* sub_read_file (char *filename, float pts);
subtitle* subcp_recode1 (subtitle *sub);
void subcp_open (void); /* for demux_ogg.c */
void subcp_close (void); /* for demux_ogg.c */
-char * sub_filename(char *path, char * fname);
-void list_sub_file(subtitle* subs);
-void dump_srt(subtitle* subs, float fps);
-void dump_mpsub(subtitle* subs, float fps);
-void dump_microdvd(subtitle* subs, float fps);
-void dump_jacosub(subtitle* subs, float fps);
-void dump_sami(subtitle* subs, float fps);
-void sub_free( subtitle * subs );
-void find_sub(subtitle* subtitles,int key);
-void step_sub(subtitle *subtitles, float pts, int movement);
+char ** sub_filenames(char *path, char *fname);
+void list_sub_file(sub_data* subd);
+void dump_srt(sub_data* subd, float fps);
+void dump_mpsub(sub_data* subd, float fps);
+void dump_microdvd(sub_data* subd, float fps);
+void dump_jacosub(sub_data* subd, float fps);
+void dump_sami(sub_data* subd, float fps);
+void sub_free( sub_data * subd );
+void find_sub(sub_data* subd,int key);
+void step_sub(sub_data *subd, float pts, int movement);
#endif