VLC for android - video output and how SurfaceHolder callbacks are related to Activity lifecycle

VLC for Android and Chrome OS specific usage questions
gzaharieva
New Cone
New Cone
Posts: 6
Joined: 16 Feb 2015 16:23

VLC for android - video output and how SurfaceHolder callbacks are related to Activity lifecycle

Postby gzaharieva » 17 Feb 2015 12:37

Hello,
I'm using vlc for android. I met the some problems with video output and I hope there is someone who can guide me in the right direction.
The application loads the video output in surfaceview which is attached to LibVlc instance.
If application goes to background and after that get back to foreground the SurfaceView is destryed already and can not output video images.
The surface is not destroyed when the power button is pressed to put the phone to sleep. When the device goes to sleep, the Activity does onPause. (And does not do onStop.) It does onResume when the phone wakes up, and it does this while the lock screen is still visible and accepting input. When I make the Activity invisible by pressing the Home button, the Activity does both onPause and onStop. Everytime causes a callback to surfaceDestroyed in this case between the end of onPause and the start of onStop. It's not very obvious, but it does seem very consistent.

The console output messages:

Code: Select all

W/VLC﹕ [a42992b4] yuv_rgb_neon filter: can't get output picture E/VLC/ANW﹕ error -19 in dequeue_fence line 255 E/VLC/ANW﹕ error -19 in ANativeWindowPriv_lockData line 353
Is there a way for solving the situation. Should I use threads for somehow preventing the surfaceview from destrying (which is not recommended). Or just revalidate the video output again and use the surfaceview?

Thank you in advance

Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 8 guests