[MPlayer-cygwin] Need help with ReplayTV mpeg Closed Captioning

Wen-King Su wen-king at myri.com
Mon Oct 18 23:21:24 CEST 2004


Hello,

This is a personal appeal to Sascha Sommer for getting a compiled
version of the windows mplayer that would display closed caption for
programs streamed from ReplayTV DVR.  I only need to apply very small
patches to two files.  I have tested it on Solaris, but I am a total
novice on windows and I have a great deal of difficulty in the
process.

ReplayTV is a cousin to the better known Tivo.  The Closed Caption
support for Tivo is included in 1.0pre5, but not the support for
ReplayTV.  ReplayTV users have our own on-line forum, and I am a member
of a sub-group of ReplayTV users who are deaf or hard of hearing, and
need CC to watch a program.

A Java based server program is available for streaming and viewing
recorded material on a computer.  Mplayer and Videolan VLC are two of
the possible players used by the server program.  Neither players, in
their native form, would show CC from ReplayTV, however.  Like Tivo,
ReplayTV uses a non-standard encoding for CC.  I believe VLC does not
do CC in any form at all, but I know mplayer and I have patched it to
show CC for ReplayTV mpeg.

I am familiar with Solaris, and I have been running the java server in
conjunction with my patched mplayer on solaris for a while.  However,
most people would like a windows solution, and I would like to provide
members of the group with a windows solution.  I have spent a lot of
time trying to compile under Cygwin, and there is just something I am
not doing right.  Also, looking into the config.h file, I am concerned
that even if I manage to get it compile correctly, the result may not
be portable and would thus be useless to another person.

Thus it would help us tremendously if you could apply the patch and
produce a new binary for us, and put it up for download.  I would
like to see the patch help those other than myself.  Please let me
know if you could honor the request. Thanks.
								- Wen


Diff against /ufs/tmp/wen/mplayer/MPlayer-1.0pre5

--- sub_cc.c.orig       Wed Nov  6 15:54:21 2002
+++ sub_cc.c    Mon Oct 18 12:17:52 2004
@@ -291,3 +291,9 @@
        subcc_decode();
 }
 
+
+void replay_subcc_process_data(unsigned char b1, unsigned char b2)
+{
+       if(!inited) subcc_init();
+       cc_decode_EIA608(b1 | (b2 << 8));
+}

--- libmpdemux/video.c.orig     Sun Apr 11 12:03:12 2004
+++ libmpdemux/video.c  Mon Oct 18 12:17:28 2004
@@ -290,15 +290,33 @@
 
 static void process_userdata(unsigned char* buf,int len){
     int i;
+    static int normal_cc = 0;
     /* if the user data starts with "CC", assume it is a CC info packet */
     if(len>2 && buf[0]=='C' && buf[1]=='C'){
 //     mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"video.c: process_userdata() detected Closed Captions!\n");
        if(subcc_enabled) subcc_process_data(buf+2,len-2);
+       normal_cc = 1;
     }
     if( len > 2 && buf[ 0 ] == 'T' && buf[ 1 ] == 'Y' )
     {
        ty_processuserdata( buf + 2, len - 2 );
        return;
+    }
+    if(!normal_cc && subcc_enabled)
+    {
+       if(len == 10 && buf[0] == 0x99 && buf[1] == 0x02 &&
+                       buf[4] == 0xAA && buf[5] == 0x02)
+       {
+           replay_subcc_process_data(buf[2],buf[3]);  /* RTV5K series */
+           return;
+       }
+
+       if(len ==  8 && buf[0] == 0xBB && buf[1] == 0x02 &&
+                       buf[4] == 0xCC && buf[5] == 0x02)
+       {
+           replay_subcc_process_data(buf[6],buf[7]);  /* RTV4K series */
+           return;
+       }
     }
     if(verbose<2) return;
     printf( "user_data: len=%3d  %02X %02X %02X %02X '",




More information about the MPlayer-cygwin mailing list