Page 1 of 1

Multiple instance VLC managenment

Posted: 10 Jul 2015 12:08
by abhimaan
I have successfully created Multiple instance of VLC player using the recent merged code.I have problem managing life cycle of vlc .ie when the android activity goes to onpause and onresume the vlc player stops rendering video and surface on which video was rendering is blank.

Can anyone point me what am i missing?

The below is the sample code of my custom VLC player using libvlc for android project

Code: Select all

mLibVLC = new LibVLC(VLCOptions.getLibOptions(pref)); mLibVLC.setOnHardwareAccelerationError(this); mMediaPlayer = new MediaPlayer(mLibVLC); Media media = new Media(mLibVLC, url); VLCOptions.setMediaOptions(media, 0); mMediaPlayer.setMedia(media); media.release(); mMediaPlayer.setEqualizer(VLCOptions.getEqualizer()); mMediaPlayer.setAudioOutput(VLCOptions.getAout(pref)); mMediaPlayer.getVLCVout().setVideoView(surfaceView); mMediaPlayer.getVLCVout().setCallback(this); mMediaPlayer.getVLCVout().attachViews();

Re: Multiple instance VLC managenment

Posted: 10 Jul 2015 18:26
by Jean-Baptiste Kempf
You have one mLibVLC but multiple mMediaPlayer ?

Re: Multiple instance VLC managenment

Posted: 10 Jul 2015 20:00
by abhimaan
No no for every libvlc I have a single media player. ie multiple libvlc multiple mediaplayer

Re: Multiple instance VLC managenment

Posted: 15 Jul 2015 23:52
by Jean-Baptiste Kempf
You should have one VLC and many media players.

Re: Multiple instance VLC managenment

Posted: 16 Jul 2015 11:37
by tulkas85
So, now it's possible to have multiple videoview in same activity using libvlc for Android ?

Re: Multiple instance VLC managenment

Posted: 16 Jul 2015 11:45
by abhimaan
@jean-Baptiste Kempf so you means one libvlc instance is sufficient for multiple media player instance?

Re: Multiple instance VLC managenment

Posted: 16 Jul 2015 11:46
by abhimaan
@tulkas yup it possible

Re: Multiple instance VLC managenment

Posted: 16 Jul 2015 12:19
by Jean-Baptiste Kempf
So, now it's possible to have multiple videoview in same activity using libvlc for Android ?
Yes. With 1.5.0 code.

Re: Multiple instance VLC managenment

Posted: 16 Jul 2015 12:21
by Jean-Baptiste Kempf
@jean-Baptiste Kempf so you means one libvlc instance is sufficient for multiple media player instance?
Yes.

Re: Multiple instance VLC managenment

Posted: 16 Jul 2015 13:24
by tulkas85
So, now it's possible to have multiple videoview in same activity using libvlc for Android ?
Yes. With 1.5.0 code.
thank you,

1.5.0 is latest version of libvlc for android ?
Can I run this command to take right sources?
git clone git://git.videolan.org/vlc-ports/android.git

Re: Multiple instance VLC managenment

Posted: 16 Jul 2015 13:42
by Jean-Baptiste Kempf
Yes. Yes. Yes.