Skip to content

RDKEMW-26260: Workstream A - Polling Bus Dispatcher - #640

Merged
Chirag-BN merged 4 commits into
masterfrom
feature/RDKEMW-26260
Oct 23, 2026
Merged

Chirag-BN merged 4 commits into
masterfrom
feature/RDKEMW-26260

Conversation

@Chirag-BN

@Chirag-BN Chirag-BN commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RDKEMW-26260: Workstream A

Reason for change: Replace polling bus dispatcher with GMainLoop-based event-driven dispatcher (PeriodicWakes - Theme 6)
Test Procedure: Rialto CI

Copilot AI balanced review requested due to automatic review settings October 15, 2026 11:18
@github-actions

Copy link
Copy Markdown

Pull request title must follow the pattern:
< JIRA TICKET >: < one line summary of change less than 65 characters >

Pull request description must follow the Commit message format for RDK-E:
https://etwiki.sys.comcast.net/spaces/RDKAR/pages/1407997180/Commit+Message+Format+For+RDKE

  1. Associated JIRA ticket in format : < JIRA TICKET >: < one line summary of change less than 65 characters >
  2. Detailed reason for change information
  3. Test procedure. Only references links to Jira ticket or sub tickets where test steps and references are captured.

< JIRA TICKET >: < one line summary of change less than 65 characters >
< empty line >
Reason for change:
Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET/url/to/test_step_section>

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.

🟡 Changes recommended

Shutdown can hang before loop startup, and the component-test harness still depends on polling.

2 open findings
What changed in this PR

Replaces periodic GStreamer bus polling with a private GLib event loop to reduce idle wakeups.

Changes:

  • Adds bus-watch and main-loop wrapper APIs and mocks.
  • Injects the GLib wrapper into both player dispatchers.
  • Reworks dispatcher unit tests around callbacks and message ownership.
File Description
wrappers/​interface/​IGstWrapper.h Declares bus-watch and message-reference APIs.
wrappers/​interface/​IGlibWrapper.h Declares context, loop, and source APIs.
wrappers/​include/​GstWrapper.h Implements new GStreamer wrappers.
wrappers/​include/​GlibWrapper.h Implements new GLib wrappers.
tests/​unittests/​media/​server/​mocks/​gstplayer/​GstDispatcherThreadFactoryMock.h Updates factory mock signature.
tests/​unittests/​media/​server/​gstplayer/​webAudioPlayer/​CreateTest.cpp Updates factory failure expectation.
tests/​unittests/​media/​server/​gstplayer/​webAudioPlayer/​common/​GstWebAudioPlayerTestCommon.cpp Updates dispatcher creation expectation.
tests/​unittests/​media/​server/​gstplayer/​genericPlayer/​common/​GstGenericPlayerTestCommon.cpp Updates dispatcher creation expectation.
tests/​unittests/​media/​server/​gstplayer/​dispatcherThread/​GstDispatcherThreadTest.cpp Tests callback dispatch and lifecycle.
tests/​common/​externalLibraryMocks/​GstWrapperMock.h Mocks new GStreamer APIs.
tests/​common/​externalLibraryMocks/​GlibWrapperMock.h Mocks new GLib APIs.
media/​server/​gstplayer/​source/​GstWebAudioPlayer.cpp Passes GLib wrapper to dispatcher.
media/​server/​gstplayer/​source/​GstGenericPlayer.cpp Passes GLib wrapper to dispatcher.
media/​server/​gstplayer/​source/​GstDispatcherThread.cpp Replaces polling with bus-watch dispatch.
media/​server/​gstplayer/​include/​IGstDispatcherThread.h Extends factory interface.
media/​server/​gstplayer/​include/​GstDispatcherThread.h Declares event-loop state and callbacks.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread media/server/gstplayer/source/GstDispatcherThread.cpp
Comment thread media/server/gstplayer/source/GstDispatcherThread.cpp
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

@Chirag-BN
Chirag-BN force-pushed the feature/RDKEMW-26260 branch from 0a29c80 to 2f2b910 Compare October 15, 2026 11:41
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

Copilot AI balanced review requested due to automatic review settings October 15, 2026 12:39

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.

🔵 Needs a closer look

Shutdown can block indefinitely if the quit request occurs before the dispatcher enters the main loop.

2 open findings

🧠 Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

Copilot AI balanced review requested due to automatic review settings October 15, 2026 16:24
@Chirag-BN
Chirag-BN force-pushed the feature/RDKEMW-26260 branch from 5f8b18c to 4a74dc5 Compare October 15, 2026 16:24

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.

🔵 Needs a closer look

A startup/shutdown race can lose the quit request and block player teardown indefinitely.

2 open findings

🧠 Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

Copilot AI balanced review requested due to automatic review settings October 15, 2026 16:59
@Chirag-BN
Chirag-BN force-pushed the feature/RDKEMW-26260 branch from 4a74dc5 to 5aa6b7d Compare October 15, 2026 16:59

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.

🔵 Needs a closer look

Shutdown can lose an early quit request and block player destruction indefinitely.

2 open findings

🧠 Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

Copilot AI balanced review requested due to automatic review settings October 16, 2026 07:16
@Chirag-BN
Chirag-BN force-pushed the feature/RDKEMW-26260 branch from 5aa6b7d to a116325 Compare October 16, 2026 07:16

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.

🔵 Needs a closer look

The shutdown race and component-test harness incompatibility remain unresolved.

2 open findings

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 16, 2026 07:24
@Chirag-BN
Chirag-BN force-pushed the feature/RDKEMW-26260 branch from a116325 to 944d5fd Compare October 16, 2026 07:24
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

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.

🔵 Needs a closer look

Shutdown can race loop startup and block player destruction indefinitely.

2 open findings

🧠 Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

Copilot AI balanced review requested due to automatic review settings October 16, 2026 15:39
@Chirag-BN
Chirag-BN force-pushed the feature/RDKEMW-26260 branch from 3798da6 to cae6809 Compare October 16, 2026 15:39

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.

🔵 Needs a closer look

Thread shutdown and message ownership changes warrant human review and real-GLib validation because the updated tests simulate loop scheduling.

3 open findings

🧠 Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

Copilot AI balanced review requested due to automatic review settings October 16, 2026 15:45
@Chirag-BN
Chirag-BN force-pushed the feature/RDKEMW-26260 branch from cae6809 to fda1c4b Compare October 16, 2026 15:45

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.

🔵 Needs a closer look

The threading and lifecycle rewrite needs human review and validation against real GLib scheduling beyond the mocked tests.

3 open findings

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 16, 2026 15:50
@Chirag-BN
Chirag-BN force-pushed the feature/RDKEMW-26260 branch from fda1c4b to 52b8970 Compare October 16, 2026 15:50
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

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.

🔵 Needs a closer look

Cross-thread shutdown and callback ownership need human validation against real GLib execution beyond the mocked tests.

3 open findings

🧠 Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

cbicco888 added 4 commits October 23, 2026 11:51
Reason for change: Replace polling bus dispatcher with GMainLoop-based event-driven dispatcher (PeriodicWakes - Theme 6)
Test Procedure: Rialto CI

Signed-off-by: cbicco888 <chirag_biccodenandeesh@comcast.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 11:52
@Chirag-BN
Chirag-BN force-pushed the feature/RDKEMW-26260 branch from 52b8970 to 7eed1e3 Compare October 23, 2026 11:52

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.

🔵 Needs a closer look

Cross-thread shutdown and message ownership need human review alongside Rialto CI results, since the updated tests simulate GLib dispatch.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

@Chirag-BN
Chirag-BN merged commit 1d2c762 into master Oct 23, 2026
85 of 97 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 23, 2026
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