MythTV  master
xine_demux_sputext.h
Go to the documentation of this file.
1 #ifndef XINE_DEMUX_SPUTEXT_H
2 #define XINE_DEMUX_SPUTEXT_H
3 
4 #include <vector>
5 
6 #include "io/mythmediabuffer.h"
7 
8 #define SUB_BUFSIZE 1024
9 #define MAX_TIMEOUT 4
10 
11 #define DEBUG_XINE_DEMUX_SPUTEXT 0
12 
13 #define FORMAT_UNKNOWN (-1)
14 #define FORMAT_MICRODVD 0
15 #define FORMAT_SUBRIP 1
16 #define FORMAT_SUBVIEWER 2
17 #define FORMAT_SAMI 3 /* Microsoft Synchronized Accessible Media Interchange */
18 #define FORMAT_VPLAYER 4 /* Windows Application */
19 #define FORMAT_RT 5 /* RealText */
20 #define FORMAT_SSA 6 /* Sub Station Alpha */
21 #define FORMAT_PJS 7 /* Phoenix Japanimation Society */
22 #define FORMAT_MPSUB 8 /* MPlayer */
23 #define FORMAT_AQTITLE 9 /* Czech subtitling community */
24 #define FORMAT_JACOBSUB 10 /* Amiga - Japanese Animation Club of Orlando */
25 #define FORMAT_SUBVIEWER2 11
26 #define FORMAT_SUBRIP09 12
27 #define FORMAT_MPL2 13 /*Mplayer sub 2 ?*/
28 
29 struct subtitle_t {
30 
31  int64_t start;
32  int64_t end;
33 
34  std::vector<std::string> text;
35 };
36 
38 
39  char *rbuffer_text;
42 
43  int status;
44 
45  std::string buf;
47 
49 
50  int uses_time;
51  int errs;
52  std::vector<subtitle_t> subtitles;
53  int num; /* number of subtitle structs */
54  int cur; /* current subtitle */
55  int format; /* constants see below */
56  std::string next_line; /* a buffer for next line read from file */
57  /* only used by vplayer */
58 };
59 
60 
61 bool sub_read_file (demux_sputext_t *demuxstr);
62 
63 #endif
demux_sputext_t::rbuffer_cur
off_t rbuffer_cur
Definition: xine_demux_sputext.h:41
demux_sputext_t::errs
int errs
Definition: xine_demux_sputext.h:51
demux_sputext_t::uses_time
int uses_time
Definition: xine_demux_sputext.h:50
demux_sputext_t
Definition: xine_demux_sputext.h:37
demux_sputext_t::rbuffer_text
char * rbuffer_text
Definition: xine_demux_sputext.h:39
subtitle_t::text
std::vector< std::string > text
The subtitle text lines.
Definition: xine_demux_sputext.h:34
demux_sputext_t::num
int num
Definition: xine_demux_sputext.h:53
demux_sputext_t::buf
std::string buf
Definition: xine_demux_sputext.h:45
demux_sputext_t::mpsub_position
float mpsub_position
Definition: xine_demux_sputext.h:48
demux_sputext_t::status
int status
Definition: xine_demux_sputext.h:43
subtitle_t
Definition: xine_demux_sputext.h:29
demux_sputext_t::cur
int cur
Definition: xine_demux_sputext.h:54
mythmediabuffer.h
off_t
#define off_t
Definition: mythiowrapper.cpp:240
demux_sputext_t::next_line
std::string next_line
Definition: xine_demux_sputext.h:56
subtitle_t::start
int64_t start
Starting time in msec or starting frame.
Definition: xine_demux_sputext.h:31
demux_sputext_t::format
int format
Definition: xine_demux_sputext.h:55
sub_read_file
bool sub_read_file(demux_sputext_t *demuxstr)
Definition: xine_demux_sputext.cpp:1023
demux_sputext_t::subtitles
std::vector< subtitle_t > subtitles
Definition: xine_demux_sputext.h:52
subtitle_t::end
int64_t end
Ending time in msec or starting frame.
Definition: xine_demux_sputext.h:32
demux_sputext_t::buflen
off_t buflen
Definition: xine_demux_sputext.h:46
demux_sputext_t::rbuffer_len
off_t rbuffer_len
Definition: xine_demux_sputext.h:40