Skip to content

RDKEMW-22860: Setting low latency properties on audio sink/decoder - #610

Open
Koky2701 wants to merge 1 commit into
masterfrom
feature/RDKEMW-22860
Open

Koky2701 wants to merge 1 commit into
masterfrom
feature/RDKEMW-22860

Conversation

@Koky2701

Copy link
Copy Markdown
Contributor

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

Copilot AI lite review requested due to automatic review settings September 28, 2026 15:33
@github-actions

Copy link
Copy Markdown

Pull request title must follow the pattern:
< JIRA TICKET >: < one line summary of change less than 65 characters >

Pull request description must follow the Commit message format for RDK-E:
https://etwiki.sys.comcast.net/spaces/RDKAR/pages/1407997180/Commit+Message+Format+For+RDKE

  1. Associated JIRA ticket in format : < JIRA TICKET >: < one line summary of change less than 65 characters >
  2. Detailed reason for change information
  3. Test procedure. Only references links to Jira ticket or sub tickets where test steps and references are captured.

< JIRA TICKET >: < one line summary of change less than 65 characters >
< empty line >
Reason for change:
Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET/url/to/test_step_section>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Compilation, source-type handling, mock expectations, and the pending-state assertion must be corrected.

Review effort: Lite
Findings: 4 High severity

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.

Comment on lines +46 to +47
GstElement *decoder = m_player.getDecoder(MediaSourceType::AUDIO);
if (decoder)
Copilot AI review requested due to automatic review settings September 29, 2026 07:47
@Koky2701
Koky2701 force-pushed the feature/RDKEMW-22860 branch from 46fcd33 to 90d9d11 Compare September 29, 2026 07:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +46 to +47
GstElement *decoder = m_player.getDecoder(MediaSourceType::AUDIO);
if (decoder)
Copilot AI review requested due to automatic review settings September 29, 2026 09:28
@Koky2701
Koky2701 force-pushed the feature/RDKEMW-22860 branch from 90d9d11 to 9c58009 Compare September 29, 2026 09:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +46 to +50
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);
Comment on lines +32 to +36
TEST_F(SetImmediateOutputTest, shouldSetAudioImmediateOutput)
{
shouldGetAudioElementsForImmediateOutput();
triggerAudioSetImmediateOutput();
}
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
WARNING: Lines coverage decreased from: 85.0% to 84.8%
WARNING: Functions coverage decreased from: 93.4% to 93.3%

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
Copilot AI lite review requested due to automatic review settings October 5, 2026 20:47
@Koky2701
Koky2701 force-pushed the feature/RDKEMW-22860 branch from 9c58009 to df03029 Compare October 5, 2026 20:47
@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Comment on lines +78 to +80
GstElement *sink = m_player.getSink(MediaSourceType::AUDIO);
if (sink)
{
Comment on lines +330 to +332
* @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;
Comment on lines +130 to 144
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));
}
Comment on lines +32 to +36
TEST_F(SetImmediateOutputTest, shouldSetAudioImmediateOutput)
{
shouldGetAudioElementsForImmediateOutput();
triggerAudioSetImmediateOutput();
}
Comment on lines +49 to +62
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);
}
};
Comment on lines +81 to +94
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);
}
};

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants