title: Qt QML Camera to C++ QImage on Android
body: <p>I have a Qt5.4-based program  with some image processing. I use <code>QCamera</code> with my <code>videoSurface</code> (derived from <code>QAbstractVideoSurface</code>) to get VideoFrames. It works good on Windows.</p>
  
  <p>But now I need Android version of my app. I found out that <code>QCamera</code> do not work on Android. But I see that QML Camera example run on Android with no problems.</p>
  
  <p>So I decided to rewrite my application in QML. 
  The main problem: I can't access QML Camera surface in C++.</p>
  
  <pre><code>void myVideoOutput::setSource(QObject *source)
  {
      qDebug() &lt;&lt; Q_FUNC_INFO &lt;&lt; source;
  
      if (source == m_source.data())
          return;
      m_source = source;
      if (m_source) {
          const QMetaObject *metaObject = m_source.data()-&gt;metaObject();
  
          QStringList properties;
          for(int i = metaObject-&gt;propertyOffset(); i &lt; metaObject &gt;propertyCount(); ++i)
              properties &lt;&lt; QString::fromLatin1(metaObject-&gt;property(i).name());
          qDebug() &lt;&lt; properties;
  
      }
      .....
      emit sourceChanged();
  }
  </code></pre>
  
  <p>This code give access to properties. But I can't access videoSurface this way (using <code>QCamera</code> I could do it). I wonder how QML Camera works? Is it based on <code>QCamera</code>? I see <code>QCamera *m_camera</code> in <code>QDeclarativeCamera</code>...</p>
  
  <p>So I have 2 questions: </p>
  
  <ol>
  <li>Is it possible to use QML Camera for postprocess images in C++? Working example would be very valuable.</li>
  <li>Do you know other ways to capture video from Android camera in Qt?</li>
  </ol>