Repository navigation
Conversation
The 10s SynchroniseSubtitleClock timer was only stopped on the PAUSED state transition. Through READY/NULL and termPipeline it kept firing, enqueueing tasks that warn on null position/source and racing the worker thread join. - HandleBusMessage: stop the resync timer on GST_STATE_READY when a subtitle source is attached - termPipeline: cancel m_subtitleClockResyncTimer alongside the other timers - AttachSource: fail loudly (no appsrc/streamInfo) when the pipeline does not expose a 'text-sink' property, instead of buffering subtitle data to nowhere
Covers READY (stop), PAUSED (stop) and PLAYING (start) transitions when a subtitle source is attached - the READY case previously had no coverage and the timer kept firing into teardown.
|
Pull request title must follow the pattern: Pull request description must follow the Commit message format for RDK-E:
< JIRA TICKET >: < one line summary of change less than 65 characters > |
There was a problem hiding this comment.
🟡 Changes recommended
Shutdown still allows the subtitle timer callback to race with worker-thread reset, risking an invalid dereference, and the new READY test lacks required StrictMock expectations.
2 open issues
What changed in this PR
This PR improves subtitle lifecycle handling in the GStreamer player by stopping clock resynchronization during READY transitions and pipeline teardown, and rejecting subtitle attachment when the pipeline lacks a text sink.
Changes:
- Stops the subtitle resync timer on READY and during
termPipeline(). - Logs an error and skips subtitle source creation when
text-sinkis unavailable. - Adds tests for subtitle timer behavior on READY, PAUSED, and PLAYING transitions.
| File | Description |
|---|---|
| tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/HandleBusMessageTest.cpp | Adds subtitle timer state-transition tests. |
| media/server/gstplayer/source/tasks/generic/HandleBusMessage.cpp | Stops subtitle resync on READY. |
| media/server/gstplayer/source/tasks/generic/AttachSource.cpp | Rejects subtitle attachment without text-sink. |
| media/server/gstplayer/source/GstGenericPlayer.cpp | Cancels subtitle resync during pipeline teardown. |
Review effort: Balanced
|
|
||
| clearAudioFirstFrameFallbackProbe(); | ||
| stopNotifyPlaybackInfoTimer(); | ||
| stopSubtitleClockResyncTimer(); |
| EXPECT_CALL(m_gstPlayer, stopNotifyPlaybackInfoTimer()); | ||
| EXPECT_CALL(m_gstPlayer, stopSubtitleClockResyncTimer()); | ||
| EXPECT_CALL(*m_gstWrapper, gstMessageUnref(&m_message)); | ||
| firebolt::rialto::server::tasks::generic::HandleBusMessage task{m_context, m_gstPlayer, |


Jira: RDKEMW-28182
What
The 10s
SynchroniseSubtitleClockperiodic timer was only stopped on the PAUSED bus transition. Through READY/NULL andtermPipeline()it kept firing, enqueueing worker tasks that warn on null position/source and racingresetWorkerThread().Changes
HandleBusMessage: stop the resync timer onGST_STATE_READYwhen a subtitle source is attachedGstGenericPlayer::termPipeline(): cancelm_subtitleClockResyncTimeralongside the other timersAttachSource: fail loudly (ERROR + no appsrc/streamInfo) when the pipeline does not expose atext-sinkproperty, instead of silently buffering subtitle data to nowhereL1 tests
stopSubtitleClockResyncTimerstopSubtitleClockResyncTimerstartSubtitleClockResyncTimerReviewed as part of the Rialto subtitle stabilization audit.