Conversation
|
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.
Copilot review overview
🟡 Changes recommended
Compilation, source-type handling, mock expectations, and the pending-state assertion must be corrected.
Review effort: Lite
Findings: 4
Open (4)
What changed in this PR
This PR adds vendor-specific low-latency configuration for audio sinks and decoders when immediate output is enabled.
Changes:
- Adds audio sink and decoder property handling.
- Injects GStreamer/GLib wrappers into
SetImmediateOutput. - Updates task construction and unit-test coverage.
| File | Description |
|---|---|
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/SetImmediateOutputTest.cpp |
Adds audio immediate-output coverage. |
tests/unittests/media/server/gstplayer/genericPlayer/common/GenericTasksTestsBase.cpp |
Updates task construction and expectations. |
media/server/gstplayer/source/tasks/generic/SetImmediateOutput.cpp |
Implements audio latency property handling. |
media/server/gstplayer/source/tasks/generic/GenericPlayerTaskFactory.cpp |
Passes wrapper dependencies to the task. |
media/server/gstplayer/include/tasks/generic/SetImmediateOutput.h |
Extends task dependencies and state. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| GstElement *decoder = m_player.getDecoder(MediaSourceType::AUDIO); | ||
| if (decoder) |
46fcd33 to
90d9d11
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical runtime and test compilation issues remain, along with missing strict-mock expectations.
Review effort: Lite
Findings: 6
Open (6)
Defer decoder lookup until pipeline and elements are available · New Fix test fixture access and qualify MediaSourceType · New Test asserts pendingLowLatency without production assignment Strict mock test misses getDecoder and getSink expectations Existing video test lacks expectations for new audio calls Missing getDecoder accessor causes compilation failure
| GstElement *decoder = m_player.getDecoder(MediaSourceType::AUDIO); | ||
| if (decoder) |
90d9d11 to
9c58009
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical test incompatibilities and functional issues remain in property naming, asynchronous setup handling, and unsupported source validation.
Review effort: Lite
Findings: 5
Open (7)
Update StrictMock tests for new audio traversal behavior · New Fix test fixture access and qualify MediaSourceType Defer decoder lookup until pipeline and elements are available Strict mock test misses getDecoder and getSink expectations Missing getDecoder accessor causes compilation failure Use the canonical stream-sync-mode property name · New Test audio vendor mappings and property values · New
Resolved since last review (2)
| GstElement *decoder = m_player.getDecoder(MediaSourceType::AUDIO); | ||
| if (decoder) | ||
| { | ||
| m_context.pendingImmediateOutputForVideo = m_immediateOutput; | ||
| const auto setDecoderBoolPropertyIfExists = [&](const char *property, bool value) { | ||
| if (m_glibWrapper->gObjectClassFindProperty(G_OBJECT_GET_CLASS(decoder), property)) |
| if (m_glibWrapper->gStrHasPrefix(decoderName.c_str(), "brcmaudiodecoder")) | ||
| { | ||
| setDecoderBoolPropertyIfExists("sync-off", m_immediateOutput); | ||
| setDecoderIntPropertyIfExists("stream_sync_mode", m_immediateOutput ? 1 : 0); |
| TEST_F(SetImmediateOutputTest, shouldSetAudioImmediateOutput) | ||
| { | ||
| shouldGetAudioElementsForImmediateOutput(); | ||
| triggerAudioSetImmediateOutput(); | ||
| } |
|
Coverage statistics of your commit: |
Reason for change: Netflix needs low latency mode for NTS tests to pass. Idea is to add setting of low latency properties when 'immediate-output' is set, since it's one property which is available on each SOC Test Procedure: https://ccp.sys.comcast.net/browse/RDKEMW-22860
9c58009 to
df03029
Compare
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
Review effort: Lite
Findings: 5
Open (13)
The task is executed 'for %s source' based on m_type, but it always queries/configures AUDIO… · New The task is executed 'for %s source' based on m_type, but it always queries/configures AUDIO… · New Update StrictMock tests for new audio traversal behavior Defer decoder lookup until pipeline and elements are available Missing getDecoder accessor causes compilation failure The contract text is inaccurate/unclear: it refers to 'getObjectUnref()' (no such API is shown… · NewgetDecoderis a getter-style API but is non-const, unlikegetSink(...) constand other query… · New For AUDIO, the function neither persists a pending value in the context (unlike VIDEO) nor applies… · New This new test only exercises the code path with getDecoder/getSink returning nullptr and doesn't… · New Use the canonical stream-sync-mode property name The boolean/int 'set property if exists' helpers are duplicated for decoder and sink. Consider… · New The boolean/int 'set property if exists' helpers are duplicated for decoder and sink. Consider… · New Test audio vendor mappings and property values
| RIALTO_SERVER_LOG_DEBUG("Executing SetImmediateOutput for %s source", common::convertMediaSourceType(m_type)); | ||
|
|
||
| if (m_type == MediaSourceType::VIDEO) | ||
| GstElement *decoder = m_player.getDecoder(MediaSourceType::AUDIO); |
| GstElement *sink = m_player.getSink(MediaSourceType::AUDIO); | ||
| if (sink) | ||
| { |
| * @retval The decoder, NULL if not found. Please call getObjectUnref() if it's non-null | ||
| */ | ||
| virtual GstElement *getDecoder(const MediaSourceType &mediaSourceType) = 0; |
| * | ||
| * @retval The decoder, NULL if not found. Please call getObjectUnref() if it's non-null | ||
| */ | ||
| virtual GstElement *getDecoder(const MediaSourceType &mediaSourceType) = 0; |
| if (m_type == MediaSourceType::VIDEO) | ||
| { | ||
| m_context.pendingImmediateOutputForVideo = m_immediateOutput; | ||
| if (m_context.pipeline) | ||
| { | ||
| m_player.setImmediateOutput(); | ||
| } | ||
| return; | ||
| } | ||
|
|
||
| if (m_context.pipeline) | ||
| if (m_type != MediaSourceType::AUDIO) | ||
| { | ||
| m_player.setImmediateOutput(); | ||
| RIALTO_SERVER_LOG_ERROR("SetImmediateOutput not currently supported for source type %s", | ||
| common::convertMediaSourceType(m_type)); | ||
| } |
| TEST_F(SetImmediateOutputTest, shouldSetAudioImmediateOutput) | ||
| { | ||
| shouldGetAudioElementsForImmediateOutput(); | ||
| triggerAudioSetImmediateOutput(); | ||
| } |
| const auto setDecoderBoolPropertyIfExists = [&](const char *property, bool value) { | ||
| if (m_glibWrapper->gObjectClassFindProperty(G_OBJECT_GET_CLASS(decoder), property)) | ||
| { | ||
| gboolean propertyValue{value ? TRUE : FALSE}; | ||
| m_glibWrapper->gObjectSet(decoder, property, propertyValue, nullptr); | ||
| } | ||
| }; | ||
|
|
||
| const auto setDecoderIntPropertyIfExists = [&](const char *property, gint value) { | ||
| if (m_glibWrapper->gObjectClassFindProperty(G_OBJECT_GET_CLASS(decoder), property)) | ||
| { | ||
| m_glibWrapper->gObjectSet(decoder, property, value, nullptr); | ||
| } | ||
| }; |
| const auto setBoolPropertyIfExists = [&](const char *property, bool value) { | ||
| if (m_glibWrapper->gObjectClassFindProperty(G_OBJECT_GET_CLASS(sink), property)) | ||
| { | ||
| gboolean propertyValue{value ? TRUE : FALSE}; | ||
| m_glibWrapper->gObjectSet(sink, property, propertyValue, nullptr); | ||
| } | ||
| }; | ||
|
|
||
| const auto setIntPropertyIfExists = [&](const char *property, gint value) { | ||
| if (m_glibWrapper->gObjectClassFindProperty(G_OBJECT_GET_CLASS(sink), property)) | ||
| { | ||
| m_glibWrapper->gObjectSet(sink, property, value, nullptr); | ||
| } | ||
| }; |



Reason for change: Netflix needs low latency mode for NTS tests to pass. Idea is to add setting of low latency properties when 'immediate-output' is set, since it's one property which is available on each SOC Test Procedure: https://ccp.sys.comcast.net/browse/RDKEMW-22860