Skip to content

Get the pipeline position instead of video sink position when syncing the subtitles#560

Merged
skywojciechowskim merged 1 commit into
release/v0.22.4from
feature/RDKEMW-21216_22.4
Jul 14, 2026
Merged

Get the pipeline position instead of video sink position when syncing the subtitles#560
skywojciechowskim merged 1 commit into
release/v0.22.4from
feature/RDKEMW-21216_22.4

Conversation

@skywojciechowskim

Copy link
Copy Markdown
Contributor

Summary: Get the pipeline position instead of video sink position when syncing the subtitles
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-21216

Copilot AI review requested due to automatic review settings July 13, 2026 09:30
@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.

@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

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

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 videoSink position 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);
@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.6%

@skywojciechowskim
skywojciechowskim merged commit f167a83 into release/v0.22.4 Jul 14, 2026
44 of 48 checks passed
@skywojciechowskim
skywojciechowskim deleted the feature/RDKEMW-21216_22.4 branch July 14, 2026 06:31
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants