From 30e4d72c1de685e10469fc887be8c8a106e0fc47 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 16 Dec 2021 16:36:12 -0500 Subject: [PATCH] Implement CMD_MAXFPS --- web/ajax/stream.php | 7 +++++++ web/includes/config.php.in | 1 + 2 files changed, 8 insertions(+) diff --git a/web/ajax/stream.php b/web/ajax/stream.php index 5c8c07312..2557977ca 100644 --- a/web/ajax/stream.php +++ b/web/ajax/stream.php @@ -52,6 +52,13 @@ if ( sem_acquire($semaphore,1) !== false ) { intval($_REQUEST['offset']), 1000000*( $_REQUEST['offset']-intval($_REQUEST['offset']))); break; + case CMD_MAXFPS : + ZM\Debug('Maxfps to '.$_REQUEST['maxfps']); + # Pack int two 32 bit integers instead of trying to deal with floats + $msg = pack('lcNN', MSG_CMD, $_REQUEST['command'], + intval($_REQUEST['maxfps']), + 1000000*( $_REQUEST['maxfps']-intval($_REQUEST['maxfps']))); + break; default : ZM\Debug('Sending command ' . $_REQUEST['command']); $msg = pack('lc', MSG_CMD, $_REQUEST['command']); diff --git a/web/includes/config.php.in b/web/includes/config.php.in index d285d8616..fcd3a936d 100644 --- a/web/includes/config.php.in +++ b/web/includes/config.php.in @@ -119,6 +119,7 @@ define('CMD_NEXT', 13); define('CMD_SEEK', 14 ); define('CMD_VARPLAY', 15); define('CMD_QUIT', 17); +define('CMD_MAXFPS', 18); define('CMD_QUERY', 99); //