Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QMediaPlayer with QVideoProbe android

QMediaPlayer with QVideoProbe android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 210 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.
  • D Offline
    D Offline
    Deymos
    wrote on last edited by
    #1

    Hi, I have a problem with grab frames from QMediaPlayer with QVideoProbe
    Look, I have MediaPlayer in QML:

        MediaPlayer {
            id: player
            objectName: "qmlPlayer"
            source: "qrc:/imgs/ebalo.mp4"
    
        }
           VideoOutput {
               id: output
               source: player
               x: 0
               y: 0
               anchors.fill : parent
               width: parent.width
               height: parent.height
    }
    

    And i'm cast this into QMediaPlayer in qt side:

        QQmlEngine * engin = QQmlEngine::contextForObject(this)->engine();
        QQmlApplicationEngine *engine = qobject_cast<QQmlApplicationEngine*>(engin);
        QObject *qmlMedia = engine->rootObjects().at(0)->findChild<QObject*>("qmlPlayer");
        player = qvariant_cast<QMediaPlayer *>(qmlMedia->property("mediaObject"));
        connect(&probe,&QVideoProbe::videoFrameProbed,this,&ClassBuilder::handleFrame);
        qDebug()<<probe.setSource(player)<<"player"<<player<<player->errorString();
        probe.setSource(player);
    

    QDebug output is: false player QMediaPlayer(0xbe1ac010) ""
    why is setSource returns false?
    Replacing the MediaPlayer with the QCamera everything works as it should, maybe grabbing frames via QVideoProbe from QMediaPlayer is not supported on android?

    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