MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / playback_pause

Function playback_pause

src/server/NymphCastServer.cpp:1280–1311  ·  view source on GitHub ↗

--- PLAYBACK PAUSE --- uint8 playback_pause()

Source from the content-addressed store, hash-verified

1278// --- PLAYBACK PAUSE ---
1279// uint8 playback_pause()
1280NymphMessage* playback_pause(int session, NymphMessage* msg, void* data) {
1281 NymphMessage* returnMsg = msg->getReplyMessage();
1282
1283 if (serverMode == NCS_MODE_MASTER) {
1284 for (int i = 0; i < slave_remotes.size(); ++i) {
1285 NymphCastSlaveRemote& rm = slave_remotes[i];
1286 std::vector<NymphType*> values;
1287 std::string result;
1288 NymphType* returnValue = 0;
1289 if (!NymphRemoteServer::callMethod(rm.handle, "playback_pause", values, returnValue, result)) {
1290 // TODO:
1291 }
1292
1293 delete returnValue;
1294 }
1295 }
1296
1297 SDL_Event event;
1298 event.type = SDL_KEYDOWN;
1299 event.key.keysym.sym = SDLK_p;
1300 SDL_PushEvent(&event);
1301
1302 playerPaused = !playerPaused;
1303
1304 // Send status update to clients.
1305 sendGlobalStatusUpdate();
1306
1307 returnMsg->setResultValue(new NymphType((uint8_t) 0));
1308 msg->discard();
1309
1310 return returnMsg;
1311}
1312
1313
1314// --- PLAYBACK REWIND ---

Callers

nothing calls this directly

Calls 2

sendGlobalStatusUpdateFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected