Here's the SVN version of my patch.

It still applies cleanly. Contains:

  * Time indication per line (hh:mm:ss:nnn)
  * Blocking of the top two lines of Teletext that so far have always had 
gibberish in them at best.

/Martin.
Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.cpp	(revision 6759)
+++ libs/libmythtv/NuppelVideoPlayer.cpp	(working copy)
@@ -1007,6 +1007,7 @@
 void NuppelVideoPlayer::ShowText(void)
 {
     VideoFrame *last = videoOutput->GetLastShownFrame();
+    int seconds,minutes,hours, milliseconds = 0;
 
     // check if subtitles need to be updated on the OSD
     if (osd && tbuffer_numvalid() && txtbuffers[rtxt].timecode &&
@@ -1036,9 +1037,18 @@
                     struct teletextsubtitle st;
                     memcpy(&st, inpos, sizeof(st));
                     inpos += sizeof(st);
-                    printf("%s\n", (char*) inpos);
                     QString s((const char*) inpos);
-                    osd->AddCCText(s, st.row, st.col, st.fg, true);
+                    // Hide weird characters at the top when viewing teletext pages...
+                    if ( st.row > 1 ) {
+                      seconds=(framesPlayed/video_frame_rate);
+                      minutes=(seconds/60);
+                      hours=(minutes/60);
+                      minutes=minutes%60;
+                      seconds=seconds%60;
+                      milliseconds=(framesPlayed%(int)(video_frame_rate+0.1))*(1000/video_frame_rate);
+                      osd->AddCCText(s, st.row, st.col, st.fg, true);
+                      printf("%02d:%02d:%02d,%03d - %s\n", hours, minutes, seconds, milliseconds, (char*) inpos);
+                    }
                     inpos += st.len;
                 }
             }
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to