Modify ↓
Ticket #7775 (closed patch: fixed)
You must read the TicketHowTo before creating a new ticket or commenting on an existing ticket.
Opened 2 years ago
Last modified 2 years ago
Various fixes for EIA-708 (ATSC) closed captions
| Reported by: | Clayton Smith <argilo@…> | Owned by: | danielk |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | MythTV - Video Playback | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
The attached patch fixes various bugs in the EIA-708 (ATSC) closed captioning implementation. The bugs are as follows:
- 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?.
- 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.
- 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.
- 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.
Attachments
Change History
Changed 2 years ago by Clayton Smith <argilo@…>
-
attachment
various-caption-fixes.patch
added
comment:1 Changed 2 years ago by Clayton Smith <argilo@…>
Oops, I forgot to set the component to "MythTV - ATSC" but I can't see any way to change it now.
comment:2 Changed 2 years ago by danielk
- Owner changed from ijr to danielk
- Status changed from new to assigned
- Component changed from MythTV - General to MythTV - Video Playback
comment:3 Changed 2 years ago by danielk
- Status changed from assigned to closed
- Resolution set to fixed
Note: See
TracTickets for help on using
tickets.

Various fixes to EIA-708 closed caption code