Set correct segment start position to prevent bogus position reporting on AmLogic device after playback rate change#547
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
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
GenericPlayerContextand use it when sending a new-segment event on amlhalasink during playback-rate changes. - Refactor
pushSampleIfRequiredto takeMediaSourceType(instead of a string) and update logging/profiling accordingly; update interface/mocks to match. - Adjust
seek-datacallback 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.
|
Coverage statistics of your commit: |
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