这是indexloc提供的服务,不要输入任何密码
Skip to content

fix: video playback duration value glitching, fix VideoPlayExample #424

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

Merged
merged 1 commit into from
May 19, 2024

Conversation

ylmrx
Copy link
Contributor

@ylmrx ylmrx commented Apr 17, 2024

No description provided.

@ylmrx
Copy link
Contributor Author

ylmrx commented Apr 17, 2024

⚠️ I might be doing it as I'm unsure if _hasUpdatedTexture = false; removal has no side-effects (I didn't get any)
The Duration was glitching alternating -1 and correct Duration, when the Update was called twice during the same frame (this happens when video file is using <60fps)

@ylmrx
Copy link
Contributor Author

ylmrx commented Apr 17, 2024

I also adjusted few stuffs in PlayVideoExample, it now works correctly at least with files found in Resources\common\test-footage

@ylmrx ylmrx marked this pull request as ready for review April 17, 2024 13:46
@pixtur
Copy link
Collaborator

pixtur commented May 9, 2024

Good catch. I frequently check the context.LocalTime to test if the operators has already been updated in the current frame. The _hasTextureUpdated was an attempt to only execute some compute shaders if the texture actually changes. This is relevant when apply stuff like motion vector extraction to videos with framerates like 25fps or if the current display rate is not 60 fps (like note books with 144 FPS refresh rate).

@pixtur pixtur merged commit 9bb6212 into tixl3d:dev May 19, 2024
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