[vlc-devel] [Android] VideoPlayerActivity onPause changes

Paulo Vitor Magacho da Silva pvmagacho at gmail.com
Wed Nov 26 20:02:47 CET 2014


Hi,

In this class there is the following comment in onPause method.

/*
 * Pausing here generates errors because the vout is constantly
 * trying to refresh itself every 80ms while the surface is not
 * accessible anymore.
 * To workaround that, we keep the last known position in the playlist
 * in savedIndexPosition to be able to restore it during onResume().
 */

Instead of doing this, I propose another solution, where the surface is
detached and re-attached on resume (using surfaceCreate and surfaceDestroy
methods) and the pause method of LibVLC is used (instead of stop). It
wouldn't be necessary to save the current position and time anymore.

There are also some minor changes needed in the VLC library to support this
- need to stop refreshing the surface and wait for a new one to be created
again.

However, I would like to introduce it along with the multiple video
instances patch. At this point, it would take me a very long time to apply
this change to the current code.

Can I submit both changes together ?

Thank you,
Paulo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20141126/f5f6f6f6/attachment.html>


More information about the vlc-devel mailing list