Skip to content

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

Open
skywojciechowskim wants to merge 5 commits into
masterfrom
feature/RDKEMW-20535
Open

Set correct segment start position to prevent bogus position reporting on AmLogic device after playback rate change#547
skywojciechowskim wants to merge 5 commits into
masterfrom
feature/RDKEMW-20535

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 08:15
@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 playback position reporting on AmLogic (amlhalasink) after playback-rate changes by ensuring a meaningful GstSegment::start is used when emitting a new-segment event, and by tracking the audio segment position when pushing the first segment.

Changes:

  • Track the last audio segment position in GenericPlayerContext and use it when sending a new-segment event on amlhalasink during playback-rate changes.
  • Refactor pushSampleIfRequired to take MediaSourceType (instead of a string) and update logging/profiling accordingly; update interface/mocks to match.
  • Adjust seek-data callback behavior (no longer schedules enough-data) and update unit tests to reflect the new behavior.

Reviewed changes

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

Show a summary per file
File Description
tests/unittests/media/server/mocks/gstplayer/GstGenericPlayerPrivateMock.h Updates mock to match the removed interface method.
tests/unittests/media/server/gstplayer/genericPlayer/tasksTests/FinishSetupSourceTest.cpp Updates tests to reflect seek-data no longer scheduling enough-data.
media/server/gstplayer/source/tasks/generic/SetPlaybackRate.cpp Sends a new-segment with start derived from tracked audio segment position for amlhalasink.
media/server/gstplayer/source/tasks/generic/FinishSetupSource.cpp Changes seek-data callback behavior (no longer triggers enough-data).
media/server/gstplayer/source/GstGenericPlayer.cpp Updates pushSampleIfRequired signature and records audio segment position for later use.
media/server/gstplayer/include/IGstGenericPlayerPrivate.h Removes pushSampleIfRequired from the private interface.
media/server/gstplayer/include/GstGenericPlayer.h Moves pushSampleIfRequired to a concrete class method taking MediaSourceType.
media/server/gstplayer/include/GenericPlayerContext.h Adds audioGstSegmentPosition to persist the last audio segment start/position.

💡 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/include/GenericPlayerContext.h
Comment thread media/server/gstplayer/source/tasks/generic/FinishSetupSource.cpp
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 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