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

vo: add --video-recenter #15320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guidocella
Copy link
Contributor

This resets --video-align-x and --video-align-y to 0 when the video becomes smaller than the OSD in the respective direction, e.g. by zooming out.

Unlike doing this by observing osd-dimensions in a script, this is done before rerendering, so you don't see the image being rendered not centered for an instant after zooming out before being rerendered centered.

Defaults to yes.

video/out/vo.c Outdated
if (!vo->params || !vo->opts->recenter)
return;

struct MPContext *mpctx = (struct MPContext *)vo->extra.wakeup_ctx;
Copy link
Contributor

Choose a reason for hiding this comment

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

VO shouldn't access mpctx. It's for main player thread only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How can se signal the property notifications?

Copy link
Contributor

Choose a reason for hiding this comment

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

It shouldn't

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't what?

Copy link
Contributor

Choose a reason for hiding this comment

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

How can se signal the property notifications?

These options are part of the VO sub option so they can be updated with config cache. window-maximized etc are updated in this way in VO implementations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done.

@guidocella guidocella force-pushed the video-recenter branch 3 times, most recently from 62dd0a5 to ad98eb5 Compare November 17, 2024 13:13
Copy link

github-actions bot commented Nov 17, 2024

Download the artifacts for this pull request:

Windows
macOS

This resets --video-align-x and --video-align-y to 0 when the video
becomes smaller than the OSD in the respective direction, e.g. by
zooming out.

Unlike doing this by observing osd-dimensions in a script, this is done
before rerendering, so you don't see the image being rendered uncentered
for an instant after zooming out, before being rerendered centered.

Defaults to yes.
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.

3 participants