Skip to content

Set correct segment start position to prevent bogus position reporting on AmLogic device after playback rate change#546

Open
skywojciechowskim wants to merge 2 commits into
release/v0.15.2from
feature/RDKEMW-20535_0152
Open

Set correct segment start position to prevent bogus position reporting on AmLogic device after playback rate change#546
skywojciechowskim wants to merge 2 commits into
release/v0.15.2from
feature/RDKEMW-20535_0152

Conversation

@skywojciechowskim

Copy link
Copy Markdown
Contributor

Summary: Set correct segment start position to prevent bogus position reporting on AmLogic device after playback rate change
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-20535

Copilot AI review requested due to automatic review settings June 26, 2026 07:50
@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

Fixes incorrect position reporting on AmLogic audio sink after playback-rate changes by ensuring the new-segment event carries an appropriate segment start, and adjusts related source/seek callback behavior and unit tests.

Changes:

  • Track the last audio segment start position when pushing initial samples and reuse it when emitting an AmLogic-specific new-segment during playback-rate changes.
  • Refactor pushSampleIfRequired to take MediaSourceType (enum) instead of a string, and adjust call sites/mocks/interfaces accordingly.
  • Stop treating seek-data as enough-data in FinishSetupSource, and update unit tests.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
media/server/gstplayer/source/tasks/generic/SetPlaybackRate.cpp Uses tracked audio segment start when sending AmLogic new-segment; adds include.
media/server/gstplayer/source/GstGenericPlayer.cpp Updates pushSampleIfRequired signature and stores audio segment position.
media/server/gstplayer/include/GenericPlayerContext.h Adds audioGstSegmentPosition to context.
media/server/gstplayer/source/tasks/generic/FinishSetupSource.cpp Makes seek-data callback a no-op (no longer schedules enough-data).
media/server/gstplayer/include/IGstGenericPlayerPrivate.h Removes pushSampleIfRequired from the private interface.
media/server/gstplayer/include/GstGenericPlayer.h Removes override declaration and reintroduces pushSampleIfRequired as a class method with enum parameter.
tests/unittests/media/server/mocks/gstplayer/GstGenericPlayerPrivateMock.h Drops mock method removed from the interface.
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/FinishSetupSourceTest.cpp Updates seek-data tests to no longer expect enough-data scheduling.

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

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

Copy link
Copy Markdown

Coverage statistics of your commit:
Congratulations, your commit improved lines coverage from: 0.0% to 84.3%
Congratulations, your commit improved functions coverage from: 0.0% to 92.5%

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