How to NOT record a stream that cannot be accessed

This forum is about all development around libVLC.
yasdnil1
New Cone
New Cone
Posts: 9
Joined: 13 May 2011 22:55

How to NOT record a stream that cannot be accessed

Postby yasdnil1 » 28 Dec 2011 20:57

I am recording two streams from one camera. I would like to know how to NOT create a recording for a stream that CANNOT be accessed. I've tried a try, catch (but an empty 0KB file is created, instead of an exception caught) and comparing properties of the two media players (which say the same thing for the stream that CAN be accessed and the stream that CANNOT be accessed).

The properties I compare:
mediaPlayer.isPlayable() : false
mediaPlayer.isPlaying() : false
mediaPlayer.getVideoOutputs() : 0
mediaPlayer.isMute() : false
mediaPlayer.getFps() : 0.0
mediaPlayer.getRate() : 1.0
mediaPlayer.isSeekable() : false
mediaPlayer.getMediaPlayerState() : libvlc_NothingSpecial
mediaPlayer.getMediaState() : null
mediaPlayer.getMediaStatistics() : null
mediaPlayer.getVideoTrack() : -1

An empty 0KB file gets created for the stream that CANNOT be accessed and I get these messages:
[04feead4] live555 demux error: Failed to connect with rtsp://172.10.0.22/stream2
[04cc528c] main input error: open of `rtsp://172.10.0.22/stream2' failed: (null)
[04cc528c] main input error: Your input can't be opened
[04cc528c] main input error: VLC is unable to open the MRL 'rtsp://172.10.0.22/stream2'. Check the log for details.

Is there a media player property that would be different for a stream that CAN or CANNOT be accessed? How can I differentiate between a stream that CAN or CANNOT be accessed? Thank you.

Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 5 guests