# HG changeset patch # User eyck # Date 990529766 0 # Node ID 2cc743142e7978c4d076e97f3766aa4737149718 # Parent 0d4f64301c21b5c03685c849fa6afdf6e030826c Preliminary support for RT-type subs. diff -r 0d4f64301c21 -r 2cc743142e79 configure --- a/configure Tue May 22 07:45:35 2001 +0000 +++ b/configure Tue May 22 11:09:26 2001 +0000 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # MPlayer configurator. (C) 2000 Pontscho/fresh!mindworkz diff -r 0d4f64301c21 -r 2cc743142e79 debian/files --- a/debian/files Tue May 22 07:45:35 2001 +0000 +++ b/debian/files Tue May 22 11:09:26 2001 +0000 @@ -1,1 +1,1 @@ -mplayer_0.17a-1_i386.deb unknown optional +mplayer_0.17a-2_i386.deb unknown optional diff -r 0d4f64301c21 -r 2cc743142e79 debian/mplayer.conf --- a/debian/mplayer.conf Tue May 22 07:45:35 2001 +0000 +++ b/debian/mplayer.conf Tue May 22 11:09:26 2001 +0000 @@ -41,7 +41,6 @@ ## sound = 1 -nosound = nein mixer = /dev/mixer master = no # no : set PCM volume yes : set MASTER volume @@ -83,7 +82,7 @@ # forcexv = yes # force XVideo even if not detected -# nodshow # disable usage of DirectShow video codecs +# nodshow = 1 # disable usage of DirectShow video codecs ## ## You can also include other configfiles diff -r 0d4f64301c21 -r 2cc743142e79 subreader.c --- a/subreader.c Tue May 22 07:45:35 2001 +0000 +++ b/subreader.c Tue May 22 11:09:26 2001 +0000 @@ -24,6 +24,7 @@ // 2 for the third format (what's this?) // 3 for SAMI (smi) // 4 for vplayer format + // 5 for RT format int eol(char p) { return (p=='\r' || p=='\n' || p=='\0'); @@ -253,6 +254,46 @@ return current; } +subtitle *sub_read_line_rt(FILE *fd,subtitle *current) { + //TODO: This format uses quite rich (sub/super)set of xhtml + // I couldn't check it since DTD is not included. + // WARNING: full XML parses can be required for proper parsing + char line[1001]; + int a1,a2,a3,a4,b1,b2,b3,b4; + char *p=NULL,*next=NULL; + int i,len,plen; + + bzero (current, sizeof(current)); + + while (!current->text[0]) { + if (!fgets (line, 1000, fd)) return NULL; + //TODO: it seems that format of time is not easily determined, it may be 1:12, 1:12.0 or 0:1:12.0 + //to describe the same moment in time. Maybe there are even more formats in use. + //if ((len=sscanf (line, "