[Deinterlace-checkins] CVS: DScaler/DScaler VBI_VideoText.H,1.20,1.21 VBI_VideoText.cpp,1.34,1.35 DS
Brought to you by:
adcockj,
dschmelzer
From: Mike T. <tem...@us...> - 2002-02-24 08:18:09
|
Update of /cvsroot/deinterlace/DScaler/DScaler In directory usw-pr-cvs1:/tmp/cvs-serv27542 Modified Files: VBI_VideoText.H VBI_VideoText.cpp DScaler.cpp Log Message: TIMER_VTFLASHER set only when displayed page contains flashed elements and only in teletext modes. Index: VBI_VideoText.H =================================================================== RCS file: /cvsroot/deinterlace/DScaler/DScaler/VBI_VideoText.H,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** VBI_VideoText.H 7 Feb 2002 13:04:54 -0000 1.20 --- VBI_VideoText.H 24 Feb 2002 08:18:03 -0000 1.21 *************** *** 190,193 **** --- 190,194 ---- void VTS_DecodeLine(BYTE* VBI_Buffer); void VT_DoUpdate_Page(int Page, int SubPage); + void VT_UpdateFlashTimerStatus(); int VT_MostRecentSubPage(int Page); int VT_SubPageNext(int Page, int SubPage, int Direction, bool Cycle); Index: VBI_VideoText.cpp =================================================================== RCS file: /cvsroot/deinterlace/DScaler/DScaler/VBI_VideoText.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** VBI_VideoText.cpp 7 Feb 2002 13:04:54 -0000 1.34 --- VBI_VideoText.cpp 24 Feb 2002 08:18:03 -0000 1.35 *************** *** 41,44 **** --- 41,47 ---- // // $Log$ + // Revision 1.35 2002/02/24 08:18:03 temperton + // TIMER_VTFLASHER set only when displayed page contains flashed elements and only in teletext modes. + // // Revision 1.34 2002/02/07 13:04:54 temperton // Added Spanish and Polish teletext code pages. Thanks to Jazz (stawiarz). *************** *** 152,155 **** --- 155,159 ---- bool VTShowHidden = false; bool VTShowFlashed = false; + bool VTFlashTimerSet = false; CRITICAL_SECTION VTUpdateAccess; *************** *** 684,687 **** --- 688,726 ---- memcpy(&VisiblePage, pPage, sizeof(TVTPage)); + } + + void VT_UpdateFlashTimerStatus() + { + if(VTState!=VT_OFF) + { + bool bHasFlashingElements = false; + for(int row = 0; (row < 25) && (!bHasFlashingElements); ++row) + { + for(int col = 0; (col < 40) && (!bHasFlashingElements); ++col) + { + bHasFlashingElements |= ((VisiblePage.Frame[row][col] & 0x7f) == 0x08); + } + } + + if(bHasFlashingElements) + { + if(!VTFlashTimerSet) + { + SetTimer(::hWnd, TIMER_VTFLASHER, TIMER_VTFLASHER_MS, NULL); + VTFlashTimerSet = true; + } + } + else + { + KillTimer(::hWnd, TIMER_VTFLASHER); + VTFlashTimerSet = false; + } + } + else + { + KillTimer(::hWnd, TIMER_VTFLASHER); + VTFlashTimerSet = false; + } + } Index: DScaler.cpp =================================================================== RCS file: /cvsroot/deinterlace/DScaler/DScaler/DScaler.cpp,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -r1.135 -r1.136 *** DScaler.cpp 23 Feb 2002 16:43:13 -0000 1.135 --- DScaler.cpp 24 Feb 2002 08:18:03 -0000 1.136 *************** *** 68,71 **** --- 68,74 ---- // // $Log$ + // Revision 1.136 2002/02/24 08:18:03 temperton + // TIMER_VTFLASHER set only when displayed page contains flashed elements and only in teletext modes. + // // Revision 1.135 2002/02/23 16:43:13 laurentg // Timer TIMER_STATUS killed when status bar is not displayed *************** *** 710,715 **** } - SetTimer(hWnd, TIMER_VTFLASHER, TIMER_VTFLASHER_MS, NULL); - // catch any serious errors during message handling while (GetMessage(&msg, NULL, 0, 0)) --- 713,716 ---- *************** *** 867,870 **** --- 868,872 ---- VT_PurgeRedrawCache(); VT_DoUpdate_Page(VTPage - 100, VTSubPage); + VT_UpdateFlashTimerStatus(); Cursor_VTUpdate(false, 0, 0); InvalidateRect(hWnd, NULL, FALSE); *************** *** 2308,2311 **** --- 2310,2314 ---- VT_ProcessRedrawCache(hWnd, hDC); ReleaseDC(hWnd, hDC); + VT_UpdateFlashTimerStatus(); } break; |