title: How to make QVideoProbe work?
body: <p>I'm currently making a cross-platform app (Android, iOS) using QML, and I need to do a QR code scanning function. The QR code readings are using ZXing and there is no problem, the problem is on the camera. <strong>I can't extract video frames from QCamera</strong>.</p>
  
  <p>There is a module <code>QVideoProbe</code> which is supposed to do it for me. However, it doesn't work
  , not on Win32, not on OSX. It simply doesn't work on desktop platform. I don't have my code on this computer, but it's just like this example I found on the forum</p>
  
  <pre><code>QCamera *camera = new QCamera;
  camera-&gt;setCaptureMode(QCamera::CaptureVideo);
  QCameraViewfinder *viewfinder = new QCameraViewfinder();
  camera-&gt;setViewfinder(viewfinder);
  qDebug() &lt;&lt; " start set source";
  QVideoProbe *videoProbe = new QVideoProbe(this);
  if (videoProbe-&gt;setSource((QMediaObject *)camera)) {
      qDebug() &lt;&lt; " set source succeed";
      //Probing succeeded, videoProbe-&gt;isValid() should be true.
      connect(videoProbe, SIGNAL(videoFrameProbed(const QVideoFrame &amp;)),this,SLOT(detectAVA(const QVideoFrame &amp;)));
  }
  camera-&gt;start();
  </code></pre>
  
  <p>The guy on the forum has the same problem with me. The line:</p>
  
  <pre><code>videoProbe-&gt;setSource((QMediaObject *)camera)
  </code></pre>
  
  <p>will return <code>false</code>.</p>
  
  <p>The reply on the forum is:</p>
  
  <blockquote>
    <p>Using (passing) a <code>Camera</code> element as sourceObj, what will happen?</p>
    
    <p>It will also work.</p>
    
    <p>That was in theory. In practice, it depends on the platform.
    <code>QVideoProbe</code> is not available on all of them (or only for either a
    media player or a camera).</p>
    
    <p>It should be in the doc, but here's an overview of <code>QVideoProbe</code>
    support:</p>
    
    <ul>
    <li>Android: only for camera </li>
    <li>Blackberry: no support </li>
    <li>iOS: no support </li>
    <li>Linux: only for media player </li>
    <li>Mac: no support</li>
    <li>Windows: only for media player</li>
    </ul>
    
    <p>If it’s not supported it doesn't necessarily mean it's not possible to
    do it on a given platform, it can mean that it’s not currently
    implemented.</p>
    
    <p>So, Android is only platform that support for Camera, then I am
    looking for support on Win32, I am willing to add support under win32,
    is that work will be really hard, and I will merge it into Qt
    mainline.</p>
    
    <p>Besides, I will add media player support under Android. That’s two
    feature I am looking for.</p>
  </blockquote>
  
  <p>Looks like it's not implemented, and if this works, it will only work on Android, and I have to test it on a real phone (simulator doesn't work).</p>
  
  <p>I guess extracting a frame from camera is a very basic function on any platform and language. There must be a way. Is there any solution?</p>