From 3f4505eabb260dca3cc0714d36f9c76632821771 Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 7 Apr 2003 16:04:02 +0000 Subject: support for multiple subtitle files by Marcin Wojdyr git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9871 b3059339-0415-0410-9bf9-f77b7e298cf2 --- subreader.h | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'subreader.h') 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 -- cgit v1.2.3