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

Vid.NoAutostart falg not checked when returnig from game #585

Open
oomek opened this issue Nov 26, 2019 · 3 comments
Open

Vid.NoAutostart falg not checked when returnig from game #585

oomek opened this issue Nov 26, 2019 · 3 comments

Comments

@oomek
Copy link
Collaborator

@oomek oomek commented Nov 26, 2019

I would like to propose changes to how video_flags and video_playing properties behave during launching an emulator.

Currently when a snap has set Vid.NoAutoStart it does not have any effect on video state when returning from a game. The only way to have video not playing is to set snap.video_playing = false in Transition.FromGame

Additionally there is a stalled frame showing for 5 frames when video is restarted after returning from an emulator and persistent stalled frame when video is stopped in Transition.FromGame
This is very noticeable when an emulator does not force resolution change and looks particularly bad on videos that have fade-ins.

So, to get rid of that stalled frame I suggest to call preload() on all videos to fill the texture buffer with the first frame in post_run()

Regarding the video state on exiting an emulator I'm not yet sure what should determine its state:
Vid.NoAutostart flag, or previously called video_playing = false before launching an emulator

Please tell me what you think. I have a test branch and an example layout if you would like to discuss it further.

@mickelson

This comment has been minimized.

Copy link
Owner

@mickelson mickelson commented Nov 27, 2019

I’ll get back on the other points, but I think the 5 frame stall may be caused by this:

const int PLAY_COUNT=5;

try changing play_count to a lower number and see if that helps...

@oomek

This comment has been minimized.

Copy link
Collaborator Author

@oomek oomek commented Nov 27, 2019

Yes, that's exactly what is causing it.

@oomek

This comment has been minimized.

Copy link
Collaborator Author

@oomek oomek commented Nov 27, 2019

I've tried, the only thing that works is what I did here:
https://github.com/oomek/attract/commits/fix-video-play-state

It fixes both, things NoAutostart check after exiting from an emulator and stalled buffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.