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

Reducing the time for displaying a frame on the screen #28

Open
spaul13 opened this issue Apr 9, 2019 · 1 comment
Open

Reducing the time for displaying a frame on the screen #28

spaul13 opened this issue Apr 9, 2019 · 1 comment

Comments

@spaul13
Copy link

spaul13 commented Apr 9, 2019

The total time for decoding the video (BUFFERING-->START) IS <=22 ms for my case but after that to display the frame on the screen takes additional 25-30 ms. Mainly these four APIs are being executed in order to display the frame on the screen

nativeSetVideoTime(decoderID, (float)setTime);
GL.IssuePluginEvent(GetRenderEventFunc(), decoderID);
getTextureFromNative();
setTextures(videoTexYch, videoTexUch, videoTexVch);

Is there any way to optimize this delay associated to display the frame on the screen. Any help is highly appreciated.

@kyo8568131
Copy link
Contributor

Hi spaul13,
You could modify the timing of native create texture buffer to as early as possible to avoid runtime texture creation. And for the best optimization to show up the first texture, you could modify the flow to work as synchronization rather than asynchronization. Since asynchronization would follow the life cycle of Unity and may cause some delay to trigger your things.
Thanks.

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

No branches or pull requests

2 participants