Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPD-91: Use forced resolution for overlay composition when requested by downstream peer #26

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

roman380
Copy link

@roman380 roman380 commented Oct 12, 2024

This updates subtitle rendered to negotiate overlay composition reoslution with the downstream peers.

NOTE:

Copy link
Author

@roman380 roman380 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normal behavior is to sync subtitle resolution with video resolution, here we introduce an option to decouple.

Comment on lines +348 to +349
if (gst_structure_get_int (structure, "overlay-composition-width", &overlay_composition_width) &&
gst_structure_get_int (structure, "overlay-composition-height", &overlay_composition_height)) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When downstream connection (kmssink in our case) sets these two propreties, and the renderer is capable to attach overlay composition rather than blend into video, the overlay composition resolution is fixed.

We send the caps back downstream as well, and the renderer will be able to recognize fixed resolution.

These properties are introduced by us.

The idea is that physical monitor is known and fixed in our AERQ case, and in general it does not make a lot of sense to downsize the subtitles if the video is low res. But also, it does not make a lot of sense to render 4K and upload to slow buffer if this is sensed as performance hit.

Comment on lines +490 to +491
render->width = render->overlay_composition_width;
render->height = render->overlay_composition_height;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we essentially override the internal resolution, and composition renderer would just use the resolution detached from actual video from now on.

@roman380 roman380 marked this pull request as ready for review October 12, 2024 22:32
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