Fix pipeline setup async requests executing at pipeline teardown#563
Fix pipeline setup async requests executing at pipeline teardown#563smudri85 wants to merge 4 commits into
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 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_workerThreadguard inupdatePlaybackGroupto 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.
|
Coverage statistics of your commit: |
62f8ff7 to
39bcea1
Compare
|
Coverage statistics of your commit: |
39bcea1 to
51db707
Compare
|
Coverage statistics of your commit: |
1 similar comment
|
Coverage statistics of your commit: |
Summary: Fix pipeline setup async requests executing at pipeline teardown.
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-21388