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.

Qt Code:
  1. QMediaPlayer *mediaplayer = new QMediaPlayer;
  2. mediaplayer ->setMedia(QUrl::fromLocalFile("C:/user/video/demo.wmv"));
  3. mediaplayer ->play();
To copy to clipboard, switch view to plain text mode 

Is there any way I can accept a udp video stream and plays it in the QMediaPlayer?

Please advice. Thank you.