Skip to content

Max-time and max-buffers usage in appsrc queue - #652

Open
smudri85 wants to merge 1 commit into
release/v0.15.2from
MaxBuffersUsageAppSrcQueue
Open

smudri85 wants to merge 1 commit into
release/v0.15.2from
MaxBuffersUsageAppSrcQueue

Conversation

@smudri85

Copy link
Copy Markdown
Contributor

Summary: Max-time and max-buffers usage in appsrc queue
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-21391

RDKEMW-21391: Max-time and max-buffers usage in appsrc queue

Reason for change: Max-time and max-buffers property used instead of
max-bytes if available in appsrc queue size setting
Test Procedure: https://ccp.sys.comcast.net/browse/RDKEMW-21929
Copilot AI balanced review requested due to automatic review settings October 23, 2026 12:56
@github-actions

Copy link
Copy Markdown

Pull request must be merged with a description containing the required fields,

Summary:
Type: Feature/Fix/Cleanup
Test Plan:
Jira:

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.

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.

🟡 Changes recommended

The new branches retain an unintended byte limit, and the buffer-count setter passes an incorrectly typed variadic argument.

2 open issues
What changed in this PR

This PR updates appsrc queue configuration to prefer time-based or buffer-count limits for audio and video, while retaining byte-based limits for subtitles and older implementations.

Changes:

  • Prefer a one-second limit, falling back to 250 buffers when supported.
  • Preserve byte-based fallback configuration.
  • Add unit coverage for the new branches and update component-test expectations.
File Description
tests/​unittests/​media/​server/​gstplayer/​rialtoSrc/​AppSrcTest.cpp Tests property detection and both new limit-selection branches.
tests/​componenttests/​server/​tests/​mediaPipeline/​DualVideoPlaybackTest.cpp Updates secondary-video setup expectations for property checks.
tests/​componenttests/​server/​fixtures/​MediaPipelineTest.cpp Updates shared source-setup expectations for byte-limit fallback.
media/​server/​gstplayer/​source/​GstSrc.cpp Selects queue limits based on source type and available properties.

Review effort: Balanced

m_gstWrapper->gstAppSrcSetMaxBytes(GST_APP_SRC(streamInfo.appSrc), sizeIt->second);
RIALTO_SERVER_LOG_DEBUG("Setting max-time property on appsrc to 1 second");
constexpr GstClockTime kMaxBufferingTime{1 * GST_SECOND};
m_glibWrapper->gObjectSet(appSrc, "max-time", kMaxBufferingTime, nullptr);
m_glibWrapper->gObjectClassFindProperty(G_OBJECT_GET_CLASS(appSrc), "max-buffers"))
{
RIALTO_SERVER_LOG_DEBUG("Setting max-buffers property on appsrc to 250");
m_glibWrapper->gObjectSet(appSrc, "max-buffers", 250, nullptr);
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Congratulations, your commit improved lines coverage from: 0.0% to 84.4%
Congratulations, your commit improved functions coverage from: 0.0% to 92.5%

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