Skip to content

player: synchronize OSD updates with the current frame - #18921

Open
kasper93 wants to merge 6 commits into
mpv-player:masterfrom
kasper93:sync_osd
Open

kasper93 wants to merge 6 commits into
mpv-player:masterfrom
kasper93:sync_osd

Conversation

@kasper93

Copy link
Copy Markdown
Member

No description provided.

write_video() updates the OSD in front of vo_queue_frame(), so that the
OSD shows the state of the frame it is drawn with. Since 786f37a the
playback time is only set after write_video(), which left the time of
the frame before in that update.
The track is going to be built from a kept state as well. No functional
change.
It is going to be copied in a second place. No functional change.
The flag that told whether the libass track has to be built again
becomes the id of the state the track was built from. Will be used in
next commit. functional change.
The changes of the OSD text and bar between the two calls are made for
the frame with the given pts. The state from before is kept, and
osd_render() gives it to the frame before that one until it is called
for another frame.
Since the VO draws on its own thread, it draws a frame while the player
may have updated the OSD for the next one already. The time on the OSD
was up to one frame ahead. Synchronize the OSD rander with given frame
that the core currently is going to queue for rendering.
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.

1 participant