[mythtv-commits] Ticket #7775: Various fixes for EIA-708 (ATSC) closed captions

MythTV mythtv at cvs.mythtv.org
Sat Dec 19 17:26:27 UTC 2009


#7775: Various fixes for EIA-708 (ATSC) closed captions
----------------------------------------------+-----------------------------
 Reporter:  Clayton Smith <argilo@…>          |       Owner:  ijr    
     Type:  patch                             |      Status:  new    
 Priority:  minor                             |   Milestone:  unknown
Component:  MythTV - General                  |     Version:  head   
 Severity:  medium                            |     Mlocked:  0      
----------------------------------------------+-----------------------------
 The attached patch fixes various bugs in the EIA-708 (ATSC) closed
 captioning implementation.  The bugs are as follows:

 1. The DisplayWindows command does not take effect immediately, so caption
 windows don't appear until a later command triggers a redraw.  To fix
 this, I added a call to CC708Updated() to the end of
 NuppelVideoPlayer::DisplayWindows.

 2. Caption windows which are not set as visible get drawn anyway,
 resulting in overlapping text on shows that alternate between two caption
 windows.  To fix this, I added "if (!win.visible) return;" to the start of
 OSDType708CC::Draw.

 3. On many shows, only the last line of captions is ever visible.  After
 some investigation, I found that this occurs because captions are written
 into a hidden window which is initially defined (with DefineWindow) to
 have only one row.  Then, as each line is added, DefineWindow is called to
 expand the window by one row.  But the current DefineWindow implementation
 deletes all text in a window upon resizing.  So I modified
 CC708Window::DefineWindow to keep the existing text whenever the number of
 rows is increased, and now all rows of text are visible.

 4. When a character is printed in the rightmost column of a caption
 window, the pen always moves to the beginning of the next line.  But as
 far as I can tell from the CEA-708 Wikipedia page, this is only supposed
 to happen when the column lock is set and the row lock is not set.  This
 bug causes extra blank lines to be inserted into scrolling captions, and
 causes some rows of non-scrolling captions to disappear.  I have fixed
 this by adding !row_lock and column_lock conditions to
 CC708Window::IncrPenLocation.

 After making these four changes, closed captions are finally working in
 all my shows.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/7775>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list