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

Dispatch FrameAvailable event to UI thread #14

Merged
merged 1 commit into from Feb 10, 2017
Merged

Dispatch FrameAvailable event to UI thread #14

merged 1 commit into from Feb 10, 2017

Conversation

nekronos
Copy link
Contributor

@nekronos nekronos commented Feb 1, 2017

The android docs says that its undefined what thread will invoke the OnFrameAvailable
callback. Need to dispatch it to the UI thread and do the texture upload
there

The android docs says that its undefined what thread will invoke the OnFrameAvailable
callback. Need to dispatch it to the UI thread and do the texture upload
there
@nekronos
Copy link
Contributor Author

nekronos commented Feb 1, 2017


public void FrameAvailable()
{
UpdateTexImage(_tex);
Copy link

Choose a reason for hiding this comment

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

I'm not entirely sure this is quite enough. I think we still can risk not having a GL-context active, for instance if the app was kicked to the background before the dispatch took effect. But I'm not 100% sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, needs to be tested

Copy link

Choose a reason for hiding this comment

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

Hi All and thanks a lot for your replies and help,

I tested the following (on my Oppo R9 where the preview works):

  1. Launch the app: preview ok
  2. App to background > open other apps > reopen ours : preview resumes ok
  3. App to background > open the mobile's camera app > close it > reopen ours: preview does not resume, there is no crash, the latest preview frame keeps being displayed, but not updated.

Copy link

Choose a reason for hiding this comment

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

Will complete my answer once we've been able to re-test on the Samsung Trend Plus, where the preview did not work since the app launch. Should be done with the next 24 hours

Copy link

Choose a reason for hiding this comment

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

The app still crashes at opening on Samsung Trend Plus.

@bolav bolav merged commit 227de29 into bolav:master Feb 10, 2017
@mmpinso
Copy link

mmpinso commented Feb 23, 2017

Hi,

Could you help us with this please? We do not have the knowledge to solve it and it will be a Fuse nogo for our app otherwise..

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.

None yet

4 participants