I am trying accept a udp video stream instead of a local video file. The code below is used to grab video from my local drive and upon running the program the video will load and play on the gui display.
QMediaPlayer *mediaplayer = new QMediaPlayer;
mediaplayer ->setMedia(QUrl::fromLocalFile("C:/user/video/demo.wmv"));
mediaplayer ->play();
Is there any way I can accept a udp video stream and plays it in the QMediaPlayer?
[update]
I am using the vlc-qt library in my project. With reference to this tutorial
instance = new VlcInstance(VlcCommon::args(), this);
player = new VlcMediaPlayer(instance);
player->setVideoWidget();//accepts a widget
However, my program crashes when the vlc instance is created. Please advice.