From 96b5d7867a7854e15d1058dc9a38c2b8a96ba071 Mon Sep 17 00:00:00 2001 From: Metacube Date: Sun, 5 Apr 2026 09:01:02 +0200 Subject: [PATCH] Delete stream_control.php --- stream_control.php | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 stream_control.php diff --git a/stream_control.php b/stream_control.php deleted file mode 100644 index 0fcd546..0000000 --- a/stream_control.php +++ /dev/null @@ -1,33 +0,0 @@ - /dev/null 2>&1 & echo $!', $output); - return $output[0]; -} - -function stopEncoder($pid) { - exec("kill $pid"); -} - -if ($_SERVER['REQUEST_METHOD'] === 'POST') { - $action = $_POST['action']; - - if ($action === 'start') { - if (!isset($_SESSION['encoder_pid'])) { - $pid = startEncoder(); - $_SESSION['encoder_pid'] = $pid; - echo json_encode(['status' => 'started', 'pid' => $pid]); - } else { - echo json_encode(['status' => 'already_running', 'pid' => $_SESSION['encoder_pid']]); - } - } elseif ($action === 'stop') { - if (isset($_SESSION['encoder_pid'])) { - stopEncoder($_SESSION['encoder_pid']); - unset($_SESSION['encoder_pid']); - echo json_encode(['status' => 'stopped']); - } else { - echo json_encode(['status' => 'not_running']); - } - } -}