Ticket #1899: 1899-v2.patch
File 1899-v2.patch, 3.8 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/osdtypeteletext.h
15 15 16 16 #include "osdtypes.h" 17 17 #include "teletextdecoder.h" 18 #include "osd.h" 18 19 19 20 class TTFFont; 20 21 class OSDType; … … 107 108 Q_OBJECT 108 109 public: 109 110 OSDTypeTeletext(const QString &name, TTFFont *font, 110 QRect displayrect, float wmult, float hmult );111 QRect displayrect, float wmult, float hmult, OSD *osd); 111 112 OSDTypeTeletext(const OSDTypeTeletext &other) 112 113 : OSDType(other.m_name), TeletextViewer() {} 113 114 virtual ~OSDTypeTeletext() {} … … 184 185 185 186 bool m_displaying; 186 187 188 OSD *m_osd; 189 187 190 TeletextMagazine m_magazines[8]; 188 191 unsigned char bitswap[256]; 189 192 -
libs/libmythtv/osd.h
154 154 155 155 void SetTextSubtitles(const QStringList&); 156 156 void ClearTextSubtitles(void); 157 158 void SurfaceLock(void) { osdlock.lock(); }; 159 void SurfaceUnlock(void) { osdlock.unlock(); }; 157 160 private: 158 161 bool InitDefaults(void); 159 162 bool InitCC608(void); -
libs/libmythtv/osdtypeteletext.cpp
47 47 48 48 /*****************************************************************************/ 49 49 OSDTypeTeletext::OSDTypeTeletext(const QString &name, TTFFont *font, 50 QRect displayrect, float wmult, float hmult) 50 QRect displayrect, float wmult, float hmult, 51 OSD *osd) 51 52 : OSDType(name), 52 53 m_displayrect(displayrect), m_unbiasedrect(0,0,0,0), 53 54 m_font(font), m_surface(NULL), … … 65 66 m_curpage_showheader(true), m_curpage_issubtitle(false), 66 67 67 68 m_transparent(false), m_revealHidden(false), 68 m_displaying(false) 69 m_displaying(false), m_osd(osd) 69 70 { 70 71 m_unbiasedrect = bias(m_displayrect, wmult, hmult); 71 72 … … 184 185 else 185 186 { 186 187 memcpy(ttpage->data[0]+0, buf, 40); 187 memset(ttpage->data[0]+40, ' ', sizeof(ttpage->data)-40);188 188 } 189 190 memset(ttpage->data[0]+40, ' ', sizeof(ttpage->data)-40); // once a page has been updated and displayed the 191 // data it contains should be erased for all VBI types 192 // (prior only erase if not VBI_DVB/VBI_DVB_SUBTITLE 189 193 190 194 if ( !(ttpage->flags & TP_INTERRUPTED_SEQ)) 191 195 HeaderUpdated(ttpage->data[0],ttpage->lang); … … 316 320 317 321 if (m_surface != NULL) 318 322 { 323 m_osd->SurfaceLock(); 319 324 m_surface->SetChanged(true); 320 325 m_surface->ClearUsed(); 321 326 DrawPage(); 327 m_osd->SurfaceUnlock(); 322 328 } 323 329 } 324 330 … … 341 347 return; 342 348 343 349 if (m_surface != NULL) 350 { 351 m_osd->SurfaceLock(); 344 352 DrawHeader(page, lang); 353 m_osd->SurfaceUnlock(); 354 } 345 355 } 346 356 347 357 /** \fn OSDTypeTeletext::FindPage(int, int) -
libs/libmythtv/osd.cpp
269 269 } 270 270 271 271 OSDTypeTeletext *ttpage = new OSDTypeTeletext( 272 name, font, area, wmult, hmult );272 name, font, area, wmult, hmult, this); 273 273 274 274 container->AddType(ttpage); 275 275 return true;