I'd like to send a simple message via dbus to omxplayer, with my C++ qt application.
I've seen this script: https://github.com/popcornmix/omxplayer ... control.sh , and it works, but I'm unable to replicate its functionality with my code.
This is what I tried:
and it doesn't work. here I've noticed that something is extracted from the /tmp/omxplayerdbus file, but I don't know what is it and where to put it.
Code: Select all
QDBusConnection bus = QDBusConnection::sessionBus(); bus.connectToBus("/tmp/omxplayerdbus", "org.mpris.MediaPlayer2.omxplayer"); QDBusMessage m = QDBusMessage::createMethodCall("org.mpris.MediaPlayer2", "/org/mpris/MediaPlayer2", "", "Quit"); bus.send(m);
So, how can I send a simple message to omxplayer via dbus?