DBus connection to omxplayer

  • Re: DBus connection to omxplayer won't work

    Looking for working example to play, get status omxplayer using dbus from qt application. Tried but no success. Connection is successful but not able to get status or pause/stop from application. Also looking for method to play files using dbus

    QProcess proc;
    proc.start("omxplayer video.mp4");

    Files play correctly, I'm not sure there is direct way to play using dbus

    QDBusConnection *_dbus;
    _dbus = new QDBusConnection(QDBusConnection::sessionBus());
    _dbus->connectToBus("/tmp/omxplayerdbus", "org.mpris.MediaPlayer2.omxplayer");
    if( !_dbus->isConnected() ) {
        qDebug() << "not connected";

    Test result: This get connected with no error

    QString dest = "org.mpris.MediaPlayer2.omxplayer";
    QString path = "/org/mpris/MediaPlayer2";
    QString interface = "org.mpris.MediaPlayer2.Player";
    QString name = "pause";//stop
    QDBusMessage msg = QDBusMessage::createMethodCall(dest, path, interface, name);
    if( !_dbus->send(msg) )
        qWarning() << "error: " << _dbus->lastError().message();

    No error, but video continue to play

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.