title: GST (gstreamer) command in QMediaPlayer command
body: <p>I am using Qt Creator 4.5.2 (Qt 5.9.5, GCC 7.3.0 64-bit) and running on Ubuntu 18.04 I am just trying to get live video stream from a IP camera. I used 'QGraphicsView', 'QGraphicsScene', 'QGraphicsVideoItem' and QMediaPlayer methods.</p>
  
  <p>Right now, the video streaming source is a IP camera and I am using 'QMediaPlayer' with 'RTSP' to get the live video and it works. However, for performance and other reasons, I need to change to gstreamer type command, like 'gst-launch-1.0', to get the live video. I am having trouble to get the correct 'gst pipe' string. Need helps.</p>
  
  <p>In the document for 'QMediaPlayer', it states: Since Qt 5.12.2, the url scheme gst-pipeline provides custom pipelines for the GStreamer backend.
  My version is 5.9.5 so I think the GStreamer type command should work.</p>
  
  <p>Related Code and comments:</p>
  
  <pre><code>   // Setup GraphicsScene
     mpView = ui-&gt;gvCam;
     mpView-&gt;setVisible(true);
     mpScene = new QGraphicsScene;
     mpView-&gt;setScene(mpScene);
     mpScene-&gt;setSceneRect(0, 0, mpView-&gt;width(), mpView-&gt;height());
     mpView-&gt;setSceneRect(QRectF());
     // Setup IP camera
     mpPlayer1 = new QMediaPlayer;
     mpVideoItem1 = new QGraphicsVideoItem;
     mpPlayer1-&gt;setVideoOutput(mpVideoItem1);
  
     //The following line works and I got the live stream.
     mpPlayer1-&gt;setMedia(QUrl("rtsp://20.0.2.118:8554/0"));
  
     //However, I need to use GST type command, like:
     //gst-launch-1.0 rtspsrc location=rtsp://20.0.2.118:8554/0 ! decodebin ! videoscale \
                 ! 'video/x-raw, width=480, height=270, format=I420' \
                 ! xvimagesink sync=false force-aspect-ratio=false;
  
     //The above GST command worked if I issued from the terminal and I got the live stream. 
  //But, I don't know how to put it as a 'gst pipeline' string as a parameter for  'setMedia' call.
  
     mpScene-&gt;addItem(mpVideoItem1);
     QSizeF qf1(mpView-&gt;width(), mpView-&gt;height());
     mpVideoItem1-&gt;setSize(qf1);
     mpVideoItem1-&gt;setAspectRatioMode(Qt::IgnoreAspectRatio);
     mpPlayer1-&gt;play();
  
  </code></pre>