Page 1 of 1

VlcJ Check Video-Audio

Posted: 17 Nov 2010 12:49
by ronins
Hello there,I want to ask something about vlcj.
Is there any way to check if the file that it's playing has something to display in video surface?

Re: VlcJ Check Video-Audio

Posted: 17 Nov 2010 20:47
by XilasZ
Don't know about vlcj, but in libvlc, there is libvlc_media_player_has_vout which return the number of video outputs (usually 0 or 1), and you can check if the media contains video tracks by calling libvlc_video_get_track_count.

Re: VlcJ Check Video-Audio

Posted: 17 Nov 2010 22:04
by sherington
Hello there,I want to ask something about vlcj.
Is there any way to check if the file that it's playing has something to display in video surface?
It's all there...

Code: Select all

int outputs = mediaPlayer.getVideoOutputs(); // this calls libvlc_media_player_has_vout if(outputs > 0) { ... }

Code: Select all

boolean isPlaying = mediaPlayer.isPlaying(); // this calls libvlc_media_player_is_playing

Code: Select all

int tracks = mediaPlayer.getVideoTrackCount(); // this calls libvlc_video_get_track_count
It also notifies you of the native events when the video starts/stops.

Re: VlcJ Check Video-Audio

Posted: 17 Nov 2010 22:06
by ronins
thks