* @brief Get player status */
| 246 | * @brief Get player status |
| 247 | */ |
| 248 | API::CommandResponse API::Handlers::MDF4PlayerHandler::getStatus(const QString& id, |
| 249 | const QJsonObject& params) |
| 250 | { |
| 251 | Q_UNUSED(params) |
| 252 | |
| 253 | auto& player = MDF4::Player::instance(); |
| 254 | |
| 255 | QJsonObject result; |
| 256 | result[QStringLiteral("isOpen")] = player.isOpen(); |
| 257 | result[QStringLiteral("isPlaying")] = player.isPlaying(); |
| 258 | result[QStringLiteral("frameCount")] = player.frameCount(); |
| 259 | result[QStringLiteral("framePosition")] = player.framePosition(); |
| 260 | result[QStringLiteral("progress")] = player.progress(); |
| 261 | result[QStringLiteral("timestamp")] = player.timestamp(); |
| 262 | result[QStringLiteral("filename")] = player.filename(); |
| 263 | |
| 264 | return CommandResponse::makeSuccess(id, result); |
| 265 | } |
nothing calls this directly
no test coverage detected