0

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.

joy lamb
  • 59
  • 2
  • 9
  • Define "UDP video stream". Can you play it with VLC (for example)? What's the URL? – hyde Oct 12 '15 at 10:43
  • @hyde I am making use of the library vlc-qt to create a vlc instance. However my code would just crash upon the creation of the vlc instance. I have updated my code as above. – joy lamb Oct 17 '15 at 13:44
  • @hyde the Url is something like this "udp://@:1234" – joy lamb Oct 17 '15 at 13:51

0 Answers0