Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. The QCamera doesn't works with QVideoProbe under Win32.

The QCamera doesn't works with QVideoProbe under Win32.

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lygstate
    wrote on last edited by
    #1

    In the following code, the result of videoProbe->setSource((QMediaObject *)camera)
    are false, how to deal with this problem?
    @
    QCamera *camera = new QCamera;
    camera->setCaptureMode(QCamera::CaptureVideo);

        QCameraViewfinder *viewfinder = new QCameraViewfinder();
        camera->setViewfinder(viewfinder);
    
        qDebug() << " start set source";
        QVideoProbe *videoProbe = new QVideoProbe(this);
        if (videoProbe->setSource((QMediaObject *)camera)) {
            qDebug() << " set source succeed";
            // Probing succeeded, videoProbe->isValid() should be true.
            connect(videoProbe, SIGNAL(videoFrameProbed(const QVideoFrame &)),
                    this, SLOT(detectAVA(const QVideoFrame &)));
        }
    
        camera->start();
    
        // Viewfinder frames should now also be emitted by
        // the video probe, even in still image capture mode.
        // Another alternative is to install the probe on a
        // QMediaRecorder connected to the camera to get the
        // recorded frames, if they are different from the
        // viewfinder frames.
        viewfinder->resize(800, 480);
        viewfinder->show();
    

    @

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      For the QVideoProbe support see this "email":http://lists.qt-project.org/pipermail/interest/2014-February/011125.html

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lygstate
        wrote on last edited by
        #3

        Using (passing) a Camera element as sourceObj, what will happen?

        It will also work.

        That was in theory. In practice, it depends on the platform. QVideoProbe is not available on all of them (or only for either a media player or a camera).

        It should be in the doc, but here's an overview of QVideoProbe support:

        Android: only for camera
        Blackberry: no support
        iOS: no support
        Linux: only for media player
        Mac: no support
        Windows: only for media player

        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.

        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.

        Besides, I will add media player support under Android. That's two feature I am looking for.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved