[NTS] Fast Playback test case failures#523
Conversation
|
Pull request must be merged with a description containing the required fields, Summary: If there is no jira releated to this change, please put 'Jira: NO-JIRA'. Description can be changed by editing the top comment on your pull request and making a new commit. |
There was a problem hiding this comment.
Pull request overview
Fixes premature audio/video underflow reporting in the GStreamer generic player setup by ignoring underflow callbacks while the sink/decoder still reports buffered frames (non-zero FIFO depth). This aligns underflow signaling with actual depletion and prevents fast-playback-related test failures.
Changes:
- Guard audio/video underflow callbacks to no-op when
fifoDepth > 0. - Add unit tests asserting underflow is not scheduled when
fifoDepthis non-zero for both audio and video.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
media/server/gstplayer/source/tasks/generic/SetupElement.cpp |
Ignores underflow callbacks when FIFO depth is non-zero to prevent premature underflow scheduling. |
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/SetupElementTest.cpp |
Adds unit coverage for the new “ignore underflow when fifoDepth > 0” behavior for audio and video. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d11ae39 to
e38c32a
Compare
|
tests/unittests/media/server/gstplayer/genericPlayer/common/GenericTasksTestsBase.cpp:263:5: performance: Variable 'testContext' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] |
| TEST_F(SetupElementTest, shouldNotReportVideoUnderflowWhenFifoDepthIsNonZero) | ||
| { | ||
| shouldSetupVideoDecoderElementOnly(); | ||
| triggerSetupElement(); | ||
|
|
||
| ASSERT_TRUE(testContext->m_videoUnderflowCallback); | ||
| EXPECT_CALL(testContext->m_gstPlayer, scheduleVideoUnderflow()).Times(0); | ||
|
|
Summary: Fix premature underflow signal when buffer is still rendering frames
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-15056
f48c93a to
0d2a258
Compare
| auto videoUnderflowCallback = reinterpret_cast<void (*)(GstElement *, guint, gpointer, gpointer)>( | ||
| testContext->m_videoUnderflowCallback); | ||
| videoUnderflowCallback(testContext->m_element, 1, nullptr, &testContext->m_gstPlayer); | ||
| TEST_F(SetupElementTest, shouldReportFirstVideoFrame) |
|
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/SetupElementTest.cpp:174:1: error: Unmatched '{'. Configuration: ''. [syntaxError] |
b56c353 to
1450d87
Compare
1450d87 to
599a0a5
Compare
| ASSERT_TRUE(testContext->m_videoUnderflowCallback); | ||
| EXPECT_CALL(testContext->m_gstPlayer, scheduleVideoUnderflow()).Times(0); | ||
|
|
||
| triggerVideoUnderflowCallback(); | ||
| } |
| ASSERT_TRUE(testContext->m_audioUnderflowCallback); | ||
| EXPECT_CALL(testContext->m_gstPlayer, scheduleAudioUnderflow()).Times(0); | ||
|
|
||
| triggerAudioUnderflowCallback(); | ||
| } |
| #include <memory> | ||
| #include <string> | ||
|
|
||
| #include "GenericTasksTestsContext.h" | ||
|
|
1c5fafb to
ddce17b
Compare
| if (fifoDepth > 0) | ||
| { | ||
| RIALTO_SERVER_LOG_DEBUG("Ignoring audio underflow callback - fifoDepth is %u", fifoDepth); | ||
| return; | ||
| } |
| if (fifoDepth > 0) | ||
| { | ||
| RIALTO_SERVER_LOG_DEBUG("Ignoring video underflow callback - fifoDepth is %u", fifoDepth); | ||
| return; | ||
| } |
|
Coverage statistics of your commit: |
ddce17b to
e832f8d
Compare
|
Coverage statistics of your commit: |
|
Coverage statistics of your commit: |
Summary: Fix premature underflow signal when buffer is still rendering frames
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-15056