RDKEMW-5395 : CC skip in xumo play - #35
Conversation
Reason for change: Redefine window on timeout and update screen on getting clear command even when window is not visible. Test Procedure: Launch xumo play and check CC in assets in xumo originals Risks: Medium Signed-off-by:Anaswara KookkalAnaswara_Kookkal@comcast.com
There was a problem hiding this comment.
Pull request overview
This PR addresses Closed Captions (CEA-608) “skip” behavior in Xumo Play by improving how the system recovers after a caption window timeout and by attempting to refresh the rendered output when window visibility changes.
Changes:
- Update
WindowController::drawWindows()to trigger a clear/update when a window’s visibility-change flag is set even if the window isn’t markedchanged(). - In
CommandParser::process608CaptionControl(), reset the 608 caption state toCaptionState_Idlewhen the WindowController reports a timeout, so subsequent control processing can re-define windows.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
subttxrend-cc/src/CcWindowController.cpp |
Adds an extra visibility-change handling branch in the draw decision loop. |
subttxrend-cc/src/CcCommand608Parser.cpp |
Forces 608 caption state to Idle on timeout before processing the next caption control. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| bool windowTimedout = m_proc->isWindowTimedout(); | ||
| if(windowTimedout) | ||
| m_608CaptionState = CaptionState_Idle; | ||
|
|
||
| uint32_t last608CaptionState = m_608CaptionState; |
There was a problem hiding this comment.
This change alters timeout recovery behavior but there is no corresponding automated test coverage to prevent regressions (the repo has existing CC 608 L2 tests under test/TEST_10xx_CC_608_*). Please add a test case that triggers a caption window timeout and then verifies captions resume correctly after the next 608 control sequence (and that clear/erase commands don’t leave stale captions when the window was not visible).
| else if(window && window->windowVisibilityChanged()) | ||
| { | ||
| clearAndUpdate = true; | ||
| window->draw(); | ||
| } |
There was a problem hiding this comment.
The newly added else if (window && window->windowVisibilityChanged()) branch appears to be unreachable with the current Window implementation: m_visibilityChanged is only set in show()/hide()/toggle(), which also sets m_changed = true, and draw() resets both flags. This duplicates the earlier window->changed() block and adds extra complexity. Consider removing this branch, or (if the intent is to react to a non-visibility change like clear() while hidden) gate on the appropriate flag/condition instead of windowVisibilityChanged().
| if(windowTimedout) | ||
| m_608CaptionState = CaptionState_Idle; |
There was a problem hiding this comment.
When windowTimedout is true you reset m_608CaptionState to CaptionState_Idle, but the 608 parser's other state (e.g., windowInfo[*].assignedRow and m_608Windowlist) is not reset here. After a WindowController timeout/reset, those can be stale and are used by define608Window() to decide whether to displayWindows(), which can lead to incorrect window visibility/row assignment after redefining windows. Consider resetting the window tracking state on timeout (similar to the windowInfo/m_608Windowlist reset logic in reset608CaptionState()) so the parser and WindowController are synchronized after a timeout.
| if(windowTimedout) | |
| m_608CaptionState = CaptionState_Idle; | |
| if (windowTimedout) | |
| { | |
| // Fully reset 608 caption state (including window tracking) so the | |
| // parser stays synchronized with the WindowController after timeout. | |
| reset608CaptionState(); | |
| } |
Reason for change: Redefine window on timeout and update screen on getting clear command even when window is not visible. Test Procedure: Launch xumo play and check CC in assets in xumo originals Risks: Medium
Signed-off-by:Anaswara KookkalAnaswara_Kookkal@comcast.com