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

[WIP] Seek using thumbnails #1

Open
wants to merge 2 commits into
base: replay-improvements
Choose a base branch
from

Conversation

Res260
Copy link

@Res260 Res260 commented Jul 3, 2021

It works, but there are noticable glitches (possibly) because of the GDI cache. I tried to save GDI's bitmap cache to disk and set it, but it doesnt seem to fix the issue. I'd appreciate your input on this, I looked for a while and I thought the logic was good, but clearly I missed something.

@alxbl
Copy link
Owner

alxbl commented Jul 6, 2021

The GDI cache changes over time and entries get set/unset/replaced as the server sees fit. ideally we would record the cache (and its transitions) as part of the pyrdp session file format. This is currently not the case and will require a new format for binary sessions.

If we're going to make improvements to the file format, it would be worth it to tackle a few other things such as embedded bitmaps. We can focus on getting improved seek working on bitmap streams first, and improve it eventually. the code should be generic anyway.

first_thumbnail_timestamp = timestamp
thumbnails[timestamp - first_thumbnail_timestamp] = (
f"{thumbnail_directory}/{file}",
f"{thumbnail_directory}/gdi_cache/{file}".replace('.png', '.bitmapcache'))
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think saving a snapshot of the cache at every frame is going to be enough. on large enough intervals, the cache might change several times in-between two thumbnails.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, but if I save the cache at the time of the thumbnail, and i replay events starting at the thumbnail, shoulnt the cache get updated correctly then? Or the player doesnt update the cache when playing the replay?

@Res260
Copy link
Author

Res260 commented Jul 6, 2021

So you suggest I remove the part where the cache is saved to disk?

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