Skip to content

Change fade-volume for playback info message to prevent getting it to often#514

Merged
skywojciechowskim merged 2 commits into
masterfrom
feature/RDKEMW-18645
Jun 2, 2026
Merged

Change fade-volume for playback info message to prevent getting it to often#514
skywojciechowskim merged 2 commits into
masterfrom
feature/RDKEMW-18645

Conversation

@skywojciechowskim
Copy link
Copy Markdown
Contributor

Summary: Change fade-volume for playback info message to prevent getting it to often
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-18645

Copilot AI review requested due to automatic review settings May 29, 2026 10: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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to avoid querying the GStreamer fade-volume property too frequently during periodic PlaybackInfo notifications (which can trigger decoder issues), by caching the last known fade volume and using that cached value when audio fade is enabled.

Changes:

  • Cache and reuse the last known fade volume for PlaybackInfo when audio fade is enabled.
  • Simplify MediaPipelineServerInternal::getVolume() to always execute on the main thread (and remove the “set volume in progress” flag).
  • Update/add unit tests to reflect the new threading behavior and the new playback-info-with-audio-fade path.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/unittests/media/server/main/mediaPipeline/MiscellaneousFunctionsTest.cpp Adjusts volume-related tests to expect main-thread enqueueing for getVolume().
tests/unittests/media/server/gstplayer/genericPlayer/GstGenericPlayerPrivateTest.cpp Adds test coverage for PlaybackInfo notification behavior when audio fade is enabled.
media/server/main/source/MediaPipelineServerInternal.cpp Changes getVolume() to always enqueueTaskAndWait on the main thread; removes conditional path.
media/server/main/include/MediaPipelineServerInternal.h Removes the m_isSetVolumeInProgress flag.
media/server/gstplayer/source/tasks/generic/SetVolume.cpp Records fade volume in context when fade is used (new behavior).
media/server/gstplayer/source/GstGenericPlayer.cpp Uses cached fade volume in notifyPlaybackInfo() when audio fade is enabled; updates cache during getVolume().
media/server/gstplayer/include/GenericPlayerContext.h Adds audioFadeVolume to cache the last known fade volume for PlaybackInfo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread media/server/gstplayer/source/tasks/generic/SetVolume.cpp
Comment thread media/server/gstplayer/include/GenericPlayerContext.h
@github-actions
Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.2%
Functions coverage stays unchanged and is: 92.6%

@github-actions
Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.2%
Functions coverage stays unchanged and is: 92.6%

@skywojciechowskim skywojciechowskim merged commit c090f00 into master Jun 2, 2026
50 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2026
@skywojciechowskim skywojciechowskim deleted the feature/RDKEMW-18645 branch June 2, 2026 05:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants