Skip to content

Feature/rdkemw 19775 debug#539

Open
balasaraswathy-n wants to merge 8 commits into
masterfrom
feature/RDKEMW-19775_debug
Open

Feature/rdkemw 19775 debug#539
balasaraswathy-n wants to merge 8 commits into
masterfrom
feature/RDKEMW-19775_debug

Conversation

@balasaraswathy-n

Copy link
Copy Markdown
Contributor

No description provided.

balasaraswathy-n and others added 8 commits June 15, 2026 14:04
Summary: Fix reattaching audio source at dynamic audio codec change.
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-17771

---------

Co-authored-by: smudri85 <smudri85@gmail.com>
Co-authored-by: Marcin Wojciechowski <marcin.wojciechowski@sky.uk>
Co-authored-by: Sasa Mudri <Sasa_Mudri@comcast.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
)

Summary: Fix reattaching audio source at dynamic audio codec change.
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-17771

---------

Co-authored-by: smudri85 <smudri85@gmail.com>
Co-authored-by: Marcin Wojciechowski <marcin.wojciechowski@sky.uk>
Co-authored-by: Sasa Mudri <Sasa_Mudri@comcast.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
)

Summary: Fix reattaching audio source at dynamic audio codec change.
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-17771

---------

Co-authored-by: smudri85 <smudri85@gmail.com>
Co-authored-by: Marcin Wojciechowski <marcin.wojciechowski@sky.uk>
Co-authored-by: Sasa Mudri <Sasa_Mudri@comcast.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 22, 2026 08:58
@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.

@github-actions

Copy link
Copy Markdown

wrappers/source/OcdmSession.cpp:131:1: error: Unmatched '}'. Configuration: ''. [syntaxError]
} // namespace
^
nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport]

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.

Pull request overview

This PR adds an “audio source removed” concept to the server-side GStreamer player flow (new RemoveSource task, context flag, and related scheduling logic), and adds additional OCDM/key-session debug logging.

Changes:

  • Add IGstGenericPlayer::removeSource() and a new tasks::generic::RemoveSource task, plus GenericPlayerContext::audioSourceRemoved handling in NeedData/underflow/reattach flows.
  • Wire source removal from MediaPipelineServerInternal into the GStreamer player and extend unit tests to cover remove/reattach scenarios.
  • Add extra OCDM/key-session status debug logs (currently at high log severity/verbosity).

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wrappers/source/OcdmSession.cpp Adds hex formatting helper and logs key status/keyId during decrypt.
wrappers/CMakeLists.txt Adds include paths needed for common/logging headers used by wrappers.
tests/unittests/media/server/mocks/gstplayer/GstGenericPlayerPrivateMock.h Minor formatting cleanup in mock header.
tests/unittests/media/server/mocks/gstplayer/GstGenericPlayerMock.h Adds mock for new removeSource() API.
tests/unittests/media/server/mocks/gstplayer/GenericPlayerTaskFactoryMock.h Adds mock factory method for createRemoveSource().
tests/unittests/media/server/main/mediaPipeline/SourceTest.cpp Extends pipeline unit tests to expect removeSource() calls.
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/RemoveSourceTest.cpp Adds new task-level unit tests for RemoveSource behavior.
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/NeedDataTest.cpp Adds coverage for NeedData behavior when audio source is removed.
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/GenericPlayerTaskFactoryTest.cpp Adds factory test ensuring RemoveSource task creation.
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/AttachSourceTest.cpp Updates reattach tests to account for “removed then reattach” behavior.
tests/unittests/media/server/gstplayer/genericPlayer/GstGenericPlayerTest.cpp Adds test for GstGenericPlayer::removeSource() task enqueueing.
tests/unittests/media/server/gstplayer/genericPlayer/GstGenericPlayerPrivateTest.cpp Expands underflow scheduling tests to account for audioSourceRemoved.
tests/unittests/media/server/gstplayer/genericPlayer/common/GenericTasksTestsBase.h Adds helper methods for new RemoveSource/reattach test flows.
tests/unittests/media/server/gstplayer/genericPlayer/common/GenericTasksTestsBase.cpp Implements new test helpers and triggers for RemoveSource/reattach flows.
tests/unittests/media/server/gstplayer/CMakeLists.txt Adds new RemoveSource task tests to the unit test target.
media/server/main/source/MediaPipelineServerInternal.cpp Calls m_gstPlayer->removeSource(type) during source removal.
media/server/main/source/MediaKeySession.cpp Adds debug status logging after decrypt (currently at ERROR level).
media/server/gstplayer/source/tasks/generic/RemoveSource.cpp Introduces RemoveSource task implementation for AUDIO source cleanup.
media/server/gstplayer/source/tasks/generic/NeedData.cpp Skips need-data notifications when audio source is marked removed.
media/server/gstplayer/source/tasks/generic/GenericPlayerTaskFactory.cpp Adds factory method to create RemoveSource tasks.
media/server/gstplayer/source/tasks/generic/CheckAudioUnderflow.cpp Disables underflow handling when audio source is removed.
media/server/gstplayer/source/tasks/generic/AttachSource.cpp Clears audioSourceRemoved and triggers need-data notification on reattach.
media/server/gstplayer/source/GstGenericPlayer.cpp Adds removeSource() API and disables underflow scheduling when audio is removed.
media/server/gstplayer/interface/IGstGenericPlayer.h Extends interface with removeSource().
media/server/gstplayer/include/tasks/IGenericPlayerTaskFactory.h Extends task factory interface with createRemoveSource().
media/server/gstplayer/include/tasks/generic/RemoveSource.h Declares the new RemoveSource task.
media/server/gstplayer/include/tasks/generic/GenericPlayerTaskFactory.h Declares factory method override for RemoveSource.
media/server/gstplayer/include/GstGenericPlayer.h Declares removeSource() override on GstGenericPlayer.
media/server/gstplayer/include/GenericPlayerContext.h Adds audioSourceRemoved flag to player context.
media/server/gstplayer/CMakeLists.txt Adds RemoveSource.cpp to the gstplayer library build.

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

Comment on lines +258 to +259
RIALTO_COMMON_LOG_MIL("OCDM pre status casted to int is %d", static_cast<int>(preStatus));
RIALTO_COMMON_LOG_MIL("keyId (%zu bytes): %s", keyId.size(), bytesToHex(keyId).c_str());
Comment on lines 272 to 275
const ::KeyStatus postStatus =
opencdm_session_status(m_session, keyId.data(), static_cast<uint8_t>(keyId.size()));
RIALTO_COMMON_LOG_MIL("OCDM post status casted to int is %d", static_cast<int>(postStatus));
if (postStatus == OutputRestricted || postStatus == OutputRestrictedHDCP22)
Comment on lines +279 to +283
switch (status)
{
case firebolt::rialto::MediaKeyErrorStatus::OK:
RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session status : OK");
break;
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
WARNING: Lines coverage decreased from: 84.3% to 84.2%
Functions coverage stays unchanged and is: 92.6%

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.

2 participants