Get the pipeline position instead of video sink position when syncing the subtitles#560
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. |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
This PR updates subtitle clock synchronisation to use the GStreamer pipeline position (via IGstGenericPlayerPrivate::getPosition) instead of querying the video sink position, improving subtitle sync accuracy and consistency with other position-reporting tasks.
Changes:
- Switched subtitle sync timestamp source from
videoSinkposition queries to pipeline position (m_player.getPosition(m_context.pipeline)). - Added early-return handling when position retrieval fails.
- Simplified subtitle appsrc lookup and event dispatch logic.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| GstStructure *structure = m_gstWrapper->gstStructureNew("current-pts", "pts", G_TYPE_UINT64, position, nullptr); | ||
| GstEvent *event = m_gstWrapper->gstEventNewCustom(GST_EVENT_CUSTOM_DOWNSTREAM_OOB, structure); | ||
| GstStructure *structure = m_gstWrapper->gstStructureNew("current-pts", "pts", G_TYPE_UINT64, position, nullptr); |
|
Coverage statistics of your commit: |
Summary: Get the pipeline position instead of video sink position when syncing the subtitles
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-21216