feat: support setting H.264 GOP

perf: merge H.264 SPS and PPS into I-frame
perf: refactor MJPEG frame detection
perf: update log timestamp to millisecond precision
perf: update script `update-nanokvm.py`
chore: bump Go to 1.23
chore: bump golang.org/x/net to v0.37.0
This commit is contained in:
wj-xiao
2025-03-20 18:31:09 +08:00
parent 1a3fd15fdf
commit 6ef83cb22f
24 changed files with 307 additions and 349 deletions

View File

@@ -1,16 +1,17 @@
import { http } from '@/lib/http.ts';
// get whether the frame detect is enabled
export function getFrameDetect() {
return http.get('/api/stream/mjpeg/detect');
}
// enable/disable frame detect
export function updateFrameDetect() {
return http.post('/api/stream/mjpeg/detect');
export function updateFrameDetect(enabled: boolean) {
const data = {
enabled
};
return http.post('/api/stream/mjpeg/detect', data);
}
// pause frame detect for a while (prevent a black screen when opening the page for the first time)
export function stopFrameDetect() {
return http.post('/api/stream/mjpeg/detect/stop');
export function stopFrameDetect(duration: number) {
const data = {
duration
};
return http.post('/api/stream/mjpeg/detect/stop', data);
}