title: Play RTP video stream using Qt?
body: <p>I want to create a Qt widget that can play incoming RTP streams where the video is encoded as H264 and contains no audio.</p>
  
  <p>My basic plan for implementation is this:</p>
  
  <ul>
  <li>Create a Phonon <a href="http://doc.trolltech.com/4.6/phonon-mediasource.html" rel="nofollow noreferrer">MediaSource</a> object (Stream type).</li>
  <li>Connect it with a <a href="http://doc.trolltech.com/4.6/qiodevice.html" rel="nofollow noreferrer">QIODevice</a> subclass that provides the data</li>
  <li>Obtain the video data using either:
  
  <ul>
  <li>The <a href="http://research.edm.uhasselt.be/~jori/page/index.php?n=CS.Jrtplib" rel="nofollow noreferrer">JRTPLIB</a> client library</li>
  <li>The <a href="http://gstreamer.freedesktop.org/" rel="nofollow noreferrer">GStreamer</a> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-gstrtpbin.html" rel="nofollow noreferrer">gstrtpbin</a> plugin. This plugin takes care depayloading the packages and decoding the video. Maybe this improves the chances that Phonon will recognize the data.</li>
  </ul></li>
  </ul>
  
  <p>My environment:</p>
  
  <ul>
  <li>Ubuntu 9.10</li>
  <li>Qt 4.6</li>
  </ul>
  
  <p>My questions:</p>
  
  <ul>
  <li>Is my approach a good one? Perhaps I'm overlooking a more obvious or simple solution?</li>
  <li>I'm currently experiencing this issue: when trying to play the video stream the state of the MediaObject turns to ErrorState with errorType FatalError. Can anyone tell me what I'm doing wrong?</li>
  </ul>
  
  <p><b>Edit</b><br>
  One solution I found is using libVLC in combination with Qt, which I learned about in this <a href="https://stackoverflow.com/questions/1873113/how-to-implement-a-video-widget-in-qt-that-builds-upon-gstreamer">thread</a>. Here's a <a href="http://code.google.com/p/stacked-crooked/source/browse/trunk/Playground/QtWithLibVLC/VLCPlayer.cpp" rel="nofollow noreferrer">code sample</a> for the interested.
  I'm still looking for a Phonon-based solution.
  <br>Ideally I would only need to provide an SDP file and job is done. </p>