Set correct segment start position to prevent bogus position reporting on AmLogic device after playback rate change#546
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 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
pushSampleIfRequiredto takeMediaSourceType(enum) instead of a string, and adjust call sites/mocks/interfaces accordingly. - Stop treating
seek-dataasenough-datainFinishSetupSource, 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.
|
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