I'm having problems launching my own Nokia video player from my application, which I just can't solve.
My first attempt included a call
Qt.openUrlExternally(url)
from QML, and this seemed to do the trick just fine, except that every time it opened the browser and used it instead of the video package (main player).
Next I tried cuteTube-Approach, where I start a new process as follows:
QStringList args; args << url; QProcess *player = new QProcess(); connect(player, SIGNAL(finished(int, QProcess::ExitStatus)), player, SLOT(deleteLater())); player->start("/usr/bin/video-suite", args);
This worked, except that to call the player-> start function, it was necessary to close the video package, otherwise it did nothing.
My third attempt included launching a video package through QDBus, but this did not help:
QList<QVariant> args; QStringList urls; urls << url; args.append(urls); QDBusMessage message = QDBusMessage::createMethodCall( "com.nokia.VideoSuite", "/", "com.nokia.maemo.meegotouch.VideoSuiteInterface", "play"); message.setArguments(args); message.setAutoStartService(true); QDBusConnection bus = QDBusConnection::sessionBus(); if (bus.isConnected()) { bus.send(message); } else { qDebug() << "Error, QDBus is not connected"; }
The problem is that this requires the video set to be up and running - the autoStartService parameter did not help either. If the video package is not already running, the call opens it just fine, but, alas, the video does not start playing.
In the end, I tried to use VideoSuiteInterface as well , but even with compiling a program with it seemed difficult. When I eventually managed to collect and link all the relevant libraries, the results did not differ from option 3 above.
So, is there a way to use VideoSuiteInterface directly or via DBus so that it starts playing video regardless of the current state of the application?