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

resume() on MP4Sprite causes random video freezes #99

Closed
ActualMandM opened this issue Apr 30, 2022 · 10 comments
Closed

resume() on MP4Sprite causes random video freezes #99

ActualMandM opened this issue Apr 30, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@ActualMandM
Copy link
Contributor

ActualMandM commented Apr 30, 2022

Trying to use resume() (even if the video is currently playing) will have a random chance of the video feed instantly freezing, freezing for a bit, or just not freezing at all.

2022-04-29_23-35-24_NotFunkin.mp4
@ActualMandM ActualMandM changed the title Trying to use resume on MP4Sprite kills video resume() on MP4Sprite causes random video freezes Apr 30, 2022
@polybiusproxy polybiusproxy added the bug Something isn't working label Apr 30, 2022
@polybiusproxy
Copy link
Owner

I don't know what's causing it, since on the LibVLC file, the pause and resume function both use libvlc_media_player_pause(libVlcMediaPlayer);

@polybiusproxy
Copy link
Owner

My guess is that upon pausing, libVLC frees the video buffer, and then tries to load it again upon resuming.

@ActualMandM
Copy link
Contributor Author

ActualMandM commented Apr 30, 2022

What would happen if the two functions used libvlc_media_player_set_pause instead?

void LibVLC::pause()
{
	libvlc_media_player_set_pause(libVlcMediaPlayer, 1);
}

void LibVLC::resume()
{
	libvlc_media_player_set_pause(libVlcMediaPlayer, 0);
}

@polybiusproxy
Copy link
Owner

polybiusproxy commented May 1, 2022

Why don't you try? I don't think it'll work, since I guess that the libvlc_media_player_pause function is just a short way of doing libvlc_media_player_set_pause, but I guess it's worth it trying.

What would happen if the two functions used libvlc_media_player_set_pause instead?

void LibVLC::pause()
{
	libvlc_media_player_set_pause(libVlcMediaPlayer, 1);
}

void LibVLC::resume()
{
	libvlc_media_player_set_pause(libVlcMediaPlayer, 0);
}

@ActualMandM
Copy link
Contributor Author

I've just tried it out and seems to have the same result.

@polybiusproxy
Copy link
Owner

No idea then.

@Stilic
Copy link
Contributor

Stilic commented May 17, 2022

Trying to use resume() (even if the video is currently playing) will have a random chance of the video feed instantly freezing, freezing for a bit, or just not freezing at all.

2022-04-29_23-35-24_NotFunkin.mp4

funkin colors but da vid is broken as heck

@polybiusproxy
Copy link
Owner

Wait, could you try to pause/resume the video without pausing the whole state?
It may be that the pause substate in FNF is somehow interfering.
@ActualMandM

@ActualMandM
Copy link
Contributor Author

ActualMandM commented May 23, 2022

Just tried it out, and it pauses and unpauses just fine. Also apparently resume() can both pause and unpause.

@ActualMandM
Copy link
Contributor Author

After messing with it a bit more, this appears to just be an implementation issue on my end.

Checking for isPlaying and doing the syncing & unpausing in resyncVocals makes it work fine now, even if it's frozen for a split second after unpausing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants