Slightly modified patch attached.
Is anyone out there using Teletext at rates other that 25 frames per second?
If so, could you please test this patch?
/Martin.
Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp,v
retrieving revision 1.477
diff -u -r1.477 NuppelVideoPlayer.cpp
--- libs/libmythtv/NuppelVideoPlayer.cpp 6 Jun 2005 13:46:29 -0000
1.477
+++ libs/libmythtv/NuppelVideoPlayer.cpp 18 Jun 2005 23:37:30 -0000
@@ -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%video_frame_rate)*(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