AgoraIO / FaceUnity

Things related to FaceUnity SDK and Agora SDK
65 stars 38 forks source link

CameraPreviewSessionListener.onClosed called while the camera state is STARTED #15

Closed dattn-BL closed 4 years ago

dattn-BL commented 4 years ago

On the dev branch, I notice somehow the CameraPreviewSessionListener.onClosed get called while the camera state is STARTED, later, it makes the stopCaptureAndBlockUntilStopped failed due to the mPreviewSession is null, and causes the next startCaptureMaybeAsync call failed as well (due to its status is already STARTED) I do not have an exact steps but somehow, switch between the Camera app and the demo many times will cause this. Do you have any idea about this issue?

brianxcli commented 4 years ago

Thanks. We've found this issue, and it will be solved soon.

brianxcli commented 4 years ago

@dattn-BL you can try if it is solved now.

dattn-BL commented 4 years ago

It seems working fine now. But is it suppose for the preview session to be released/closed/reset on CameraPreviewSessionListener.onClosed?

brianxcli commented 4 years ago

At this moment, just ignore this callback, nothing done here. Maybe it's better to remove this line.

dattn-BL commented 4 years ago

I will test more to see if it leads to any issues. Thanks.