MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / getStatus

Method getStatus

app/src/API/Handlers/MDF4PlayerHandler.cpp:248–265  ·  view source on GitHub ↗

* @brief Get player status */

Source from the content-addressed store, hash-verified

246 * @brief Get player status
247 */
248API::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}

Callers

nothing calls this directly

Calls 6

isOpenMethod · 0.45
isPlayingMethod · 0.45
frameCountMethod · 0.45
framePositionMethod · 0.45
progressMethod · 0.45
filenameMethod · 0.45

Tested by

no test coverage detected