streaming using RTP does not detect a connection loess
Posted: 01 Sep 2011 17:15
Hello Everyone,
I am not sure if here is the position to post this question:
I am using the libvlc to "push" a stream using RTP to another computer.
RTP, being a UDP based protocol, does not have a "connection". So even I push the stream to an invalid IP/port, the function returns correct.
Sample Code:
So, does that mean I am not able to detect the connection loss (for example, the target PC down) from this program ?
Many thanks again!
I am not sure if here is the position to post this question:
I am using the libvlc to "push" a stream using RTP to another computer.
RTP, being a UDP based protocol, does not have a "connection". So even I push the stream to an invalid IP/port, the function returns correct.
Sample Code:
Code: Select all
media = libvlc_media_new_location (vlc, "c:\test.mkv");
libvlc_media_add_option (media, "--sout=#udp{dst=192.168.55.102,port=1234}"); //push to 192.168.55.102, port 1234
libvlc_media_add_option (media, "--no-sout-display");
player = libvlc_media_player_new(vlc);
libvlc_media_player_set_media(player,media);
libvlc_media_player_play (player);
Many thanks again!