Repository navigation
RDKEMW-27811 : [PLI]- [ROGERS IUV2][VIPA]Black Screen and Technical Fault Message on linear channel After Standby Wake-Up due to PlayerRequestTimeOut error - #314
Conversation
…re clearing a stale sinkbin reference could bypass the Rialto teardown sequence and leave its server-side session active. The teardown paths now request GST_STATE_NULL, confirm the transition with bounded state polling, remove the sinkbin from the pipeline, and then clear retained references. Test Procedure: updated in ticket Risks: medium Priority: P1 Signed-off-by: Rekha Kandhavelan rekha_kandhavelan@comcast.com
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
7 open issues
On timeout,ConfigurePipeline()logs but continues reconfiguring the shared pipeline even though… · New Sincestd::mutexandstd::condition_variableare now part of this public struct, ensure this… · NewmTeardownInProgressis set at function entry, but clearing/notifying happens only at the bottom… · New The polling loop ignores the return value fromgst_element_get_state(). If it returns… · New New behavior introduces bounded polling + a forcedgst_element_set_state(..., NULL)fallback when… · New Theif (current != GST_STATE_NULL)block is mis-indented relative to its surrounding scope, which… · New This mock setspendingtoGST_STATE_NULLfor the initial `gst_element_get_state(...,… · New
What changed in this PR
Fixes sinkbin teardown ordering and synchronization to prevent stale Rialto sessions (and resulting black screen/technical fault) after standby wake-up by ensuring sinkbins reach GST_STATE_NULL before removal/cleanup, and by preventing pipeline reconfiguration while teardown is still releasing resources.
Changes:
- Add teardown synchronization (mutex/CV + in-progress flag) to coordinate
ConfigurePipeline()vsTearDownStream(). - Add bounded state polling after
gst_element_set_state(..., GST_STATE_NULL)and force reset if NULL isn’t reached. - Harden stale CC sinkbin cleanup paths and update the unit test to match the new teardown behavior.
| File | Description |
|---|---|
InterfacePlayerRDK.cpp |
Adds teardown synchronization + bounded state polling and improves stale sinkbin teardown before clearing references. |
InterfacePlayerPriv.h |
Introduces shared teardown mutex/CV/flag in GstPlayerPriv to gate pipeline reconfiguration. |
test/utests/tests/InterfacePlayerTests/InterfacePlayerFunctionTests.cpp |
Updates expectations to reflect additional gst_element_get_state() polling during teardown. |
Review effort: Lite
| std::mutex mTeardownMutex; | ||
| std::condition_variable mTeardownCV; | ||
| bool mTeardownInProgress = false; |
There was a problem hiding this comment.
🟡 Changes recommended
A missing closing brace prevents compilation, while incomplete teardown synchronization still allows pipeline configuration to race with resource release.
5 open issues
Synchronize both pipeline-configuration overloads · New Serialize configuration and teardown for their full duration · New Close the teardown scope to restore compilation · New Clear teardown state on invalid track type · New Sincestd::mutexandstd::condition_variableare now part of this public struct, ensure this…
6 resolved since last review
On timeout,ConfigurePipeline()logs but continues reconfiguring the shared pipeline even though… New behavior introduces bounded polling + a forcedgst_element_set_state(..., NULL)fallback when… The polling loop ignores the return value fromgst_element_get_state(). If it returns…mTeardownInProgressis set at function entry, but clearing/notifying happens only at the bottom… This mock setspendingtoGST_STATE_NULLfor the initial `gst_element_get_state(...,… Theif (current != GST_STATE_NULL)block is mis-indented relative to its surrounding scope, which…
Review effort: Balanced
| std::unique_lock<std::mutex> teardownLock(interfacePlayerPriv->gstPrivateContext->mTeardownMutex); | ||
| if (!interfacePlayerPriv->gstPrivateContext->mTeardownCV.wait_for(teardownLock, std::chrono::milliseconds(3000), | ||
| [this]{ return !interfacePlayerPriv->gstPrivateContext->mTeardownInProgress; })) |
| { | ||
| MW_LOG_ERR("InterfacePlayerRDK::ConfigurePipeline: timed out waiting for prior TearDownStream to complete"); | ||
| } | ||
| } |
| { | ||
| std::lock_guard<std::mutex> teardownLock(interfacePlayerPriv->gstPrivateContext->mTeardownMutex); | ||
| interfacePlayerPriv->gstPrivateContext->mTeardownInProgress = true; |
| { | ||
| { | ||
| std::lock_guard<std::mutex> teardownLock(interfacePlayerPriv->gstPrivateContext->mTeardownMutex); | ||
| interfacePlayerPriv->gstPrivateContext->mTeardownInProgress = true; |
There was a problem hiding this comment.
🟡 Changes recommended
An unclosed lock scope prevents compilation, and incomplete teardown guards still allow pipeline configuration while teardown is active.
6 open issues
Close the teardown scope to restore compilation Serialize configuration and teardown for their full duration Synchronize both pipeline-configuration overloads Clear teardown state on invalid track type Sincestd::mutexandstd::condition_variableare now part of this public struct, ensure this… Test stale closed-caption sinkbin cleanup · New
Review effort: Balanced
| GstStateChangeReturn nullRc = SetStateWithWarnings(GST_ELEMENT(stream->sinkbin), GST_STATE_NULL); | ||
|
|
||
| if (GST_STATE_CHANGE_FAILURE != nullRc) |



Reason for change: This fix addresses a CC sinkbin teardown issue where clearing a stale sinkbin reference could bypass the Rialto teardown sequence and leave its server-side session active.
The teardown paths now request GST_STATE_NULL, confirm the transition with bounded state polling, remove the sinkbin from the pipeline, and then clear retained references.
Test Procedure: updated in ticket
Risks: medium
Priority: P1
Signed-off-by: Rekha Kandhavelan rekha_kandhavelan@comcast.com