Multiple instance VLC managenment

VLC for Android and Chrome OS specific usage questions
abhimaan
New Cone
New Cone
Posts: 4
Joined: 10 Jul 2015 11:22

Multiple instance VLC managenment

Postby abhimaan » 10 Jul 2015 12:08

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();

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Multiple instance VLC managenment

Postby Jean-Baptiste Kempf » 10 Jul 2015 18:26

You have one mLibVLC but multiple mMediaPlayer ?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

abhimaan
New Cone
New Cone
Posts: 4
Joined: 10 Jul 2015 11:22

Re: Multiple instance VLC managenment

Postby abhimaan » 10 Jul 2015 20:00

No no for every libvlc I have a single media player. ie multiple libvlc multiple mediaplayer

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Multiple instance VLC managenment

Postby Jean-Baptiste Kempf » 15 Jul 2015 23:52

You should have one VLC and many media players.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

tulkas85
Blank Cone
Blank Cone
Posts: 19
Joined: 07 Aug 2009 13:27

Re: Multiple instance VLC managenment

Postby tulkas85 » 16 Jul 2015 11:37

So, now it's possible to have multiple videoview in same activity using libvlc for Android ?

abhimaan
New Cone
New Cone
Posts: 4
Joined: 10 Jul 2015 11:22

Re: Multiple instance VLC managenment

Postby abhimaan » 16 Jul 2015 11:45

@jean-Baptiste Kempf so you means one libvlc instance is sufficient for multiple media player instance?

abhimaan
New Cone
New Cone
Posts: 4
Joined: 10 Jul 2015 11:22

Re: Multiple instance VLC managenment

Postby abhimaan » 16 Jul 2015 11:46

@tulkas yup it possible

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Multiple instance VLC managenment

Postby Jean-Baptiste Kempf » 16 Jul 2015 12:19

So, now it's possible to have multiple videoview in same activity using libvlc for Android ?
Yes. With 1.5.0 code.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Multiple instance VLC managenment

Postby Jean-Baptiste Kempf » 16 Jul 2015 12:21

@jean-Baptiste Kempf so you means one libvlc instance is sufficient for multiple media player instance?
Yes.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

tulkas85
Blank Cone
Blank Cone
Posts: 19
Joined: 07 Aug 2009 13:27

Re: Multiple instance VLC managenment

Postby tulkas85 » 16 Jul 2015 13:24

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Multiple instance VLC managenment

Postby Jean-Baptiste Kempf » 16 Jul 2015 13:42

Yes. Yes. Yes.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: Bing [Bot] and 13 guests