Change fade-volume for playback info message to prevent getting it to often#514
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
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
PlaybackInfowhen 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.
|
Coverage statistics of your commit: |
|
Coverage statistics of your commit: |
Summary: Change fade-volume for playback info message to prevent getting it to often
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-18645