sendCommand(args);
}
+void MediaMPV::relativeSeek(qint64 ms) {
+ double seconds = ms / 1000.;
+ QByteArray ba = QString::number(seconds).toUtf8();
+ const char *args[] = {"seek", ba.constData(), "relative", nullptr};
+ sendCommand(args);
+}
+
QString MediaMPV::file() const {
- char *path;
+ char *path = nullptr;
mpv_get_property(mpv, "path", MPV_FORMAT_STRING, &path);
+ if (!path) return QString();
return QString::fromUtf8(path);
}