This is the code I used:
Code: Select all
public MainPage()
{
this.InitializeComponent();
Loaded += (s, e) =>
{
_libVLC = new LibVLC(VideoView.SwapChainOptions);
_mediaPlayer = new MediaPlayer(_libVLC);
VideoView.MediaPlayer = _mediaPlayer;
this._mediaPlayer.Play(new Media(_libVLC, "rtp://@10.2.4.108:15012", FromType.FromLocation));
};
}
But there is error
main demux error: SDP required
main demux error: A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (96).
rtp demux debug: unknown payload (96)
Adding "--rtp-dynamic-pt=96" into options parameter when creating new LibVLC didn't help.
I have SDP but I don't know how to "give it" to VLC. Is there a way to pass it as a parameter somewhere?
I thought that saving SDP file as .sdp and then instancing Media with sdp location and type = FromType.FromPath could work
but line below crashes application
Code: Select all
this._mediaPlayer.Play(new Media(_libVLC, "ms-appx:///NewFolder1/sdp file.sdp", FromType.FromPath));