Skip to content

Fix pipeline setup async requests executing at pipeline teardown#563

Open
smudri85 wants to merge 4 commits into
masterfrom
feature/RDKEMW-21388
Open

Fix pipeline setup async requests executing at pipeline teardown#563
smudri85 wants to merge 4 commits into
masterfrom
feature/RDKEMW-21388

Conversation

@smudri85

Copy link
Copy Markdown
Contributor

Summary: Fix pipeline setup async requests executing at pipeline teardown.
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-21388

Copilot AI review requested due to automatic review settings July 16, 2026 13:52
@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.

Pull request overview

This PR fixes a teardown-time lifetime issue in the GStreamer generic player path by ensuring objects captured for async worker-thread tasks remain valid until the task is destroyed, preventing setup-time callbacks/tasks from accessing freed GStreamer objects during pipeline teardown.

Changes:

  • Take/own GStreamer references at scheduling time (gstObjectRef + gstCapsCopy) and release them in task destructors.
  • Add a m_workerThread guard in updatePlaybackGroup to avoid queuing work when the worker thread is unavailable.
  • Update unit tests to reflect the new ref/unref and caps-copy behavior, including a new null-caps test.

Reviewed changes

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

Show a summary per file
File Description
media/server/gstplayer/source/GstGenericPlayer.cpp Refs element/typefind, copies caps, and guards enqueueing based on worker thread presence.
media/server/gstplayer/source/tasks/generic/DeepElementAdded.cpp Releases the scheduled element reference in the task destructor.
media/server/gstplayer/source/tasks/generic/UpdatePlaybackGroup.cpp Releases the scheduled typefind reference and owned caps copy in the task destructor.
tests/unittests/media/server/gstplayer/genericPlayer/GstGenericPlayerTest.cpp Expects gstObjectRef for deep-element scheduling.
tests/unittests/media/server/gstplayer/genericPlayer/GstGenericPlayerPrivateTest.cpp Expects typefind ref + caps copy; adds coverage for null caps.
tests/unittests/media/server/gstplayer/genericPlayer/common/GenericTasksTestsBase.cpp Updates expectations for destructor-time unrefs for tasks constructed in tests.
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/GenericPlayerTaskFactoryTest.cpp Updates factory-task tests for new destructor unref behavior.

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

Comment thread media/server/gstplayer/source/tasks/generic/UpdatePlaybackGroup.cpp
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.7%

Copilot AI review requested due to automatic review settings July 16, 2026 15:12
@smudri85
smudri85 force-pushed the feature/RDKEMW-21388 branch from 62f8ff7 to 39bcea1 Compare July 16, 2026 15:19

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

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

Comment thread media/server/gstplayer/include/tasks/IGenericPlayerTaskFactory.h Outdated
Comment thread media/server/gstplayer/include/tasks/generic/UpdatePlaybackGroup.h
Copilot AI review requested due to automatic review settings July 16, 2026 15:19

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread media/server/gstplayer/include/tasks/IGenericPlayerTaskFactory.h
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.7%

Copilot AI review requested due to automatic review settings July 16, 2026 15:28
@smudri85
smudri85 force-pushed the feature/RDKEMW-21388 branch from 39bcea1 to 51db707 Compare July 16, 2026 15: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.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Comment thread media/server/gstplayer/source/GstGenericPlayer.cpp
Comment thread media/server/gstplayer/source/GstGenericPlayer.cpp
Comment thread media/server/gstplayer/include/tasks/IGenericPlayerTaskFactory.h
Comment thread media/server/gstplayer/include/tasks/generic/UpdatePlaybackGroup.h
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.7%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.7%

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