VlcJ Check Video-Audio

This forum is about all development around libVLC.
ronins
New Cone
New Cone
Posts: 9
Joined: 17 Nov 2010 12:43

VlcJ Check Video-Audio

Postby ronins » 17 Nov 2010 12:49

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?

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: VlcJ Check Video-Audio

Postby XilasZ » 17 Nov 2010 20:47

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.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: VlcJ Check Video-Audio

Postby sherington » 17 Nov 2010 22:04

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.

ronins
New Cone
New Cone
Posts: 9
Joined: 17 Nov 2010 12:43

Re: VlcJ Check Video-Audio

Postby ronins » 17 Nov 2010 22:06

thks


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 1 guest