feat: 支持 rtsp 功能

This commit is contained in:
mofeng-git
2026-02-11 16:06:06 +08:00
parent 261deb1303
commit 3824e57fc5
23 changed files with 2154 additions and 37 deletions

View File

@@ -357,6 +357,30 @@ export interface RustDeskConfig {
device_id: string;
}
/** RTSP output codec */
export enum RtspCodec {
H264 = "h264",
H265 = "h265",
}
/** RTSP configuration */
export interface RtspConfig {
/** Enable RTSP output */
enabled: boolean;
/** Bind IP address */
bind: string;
/** RTSP TCP listen port */
port: number;
/** Stream path (without leading slash) */
path: string;
/** Allow only one client connection at a time */
allow_one_client: boolean;
/** Output codec (H264/H265) */
codec: RtspCodec;
/** Optional username for authentication */
username?: string;
}
/** Main application configuration */
export interface AppConfig {
/** Whether initial setup has been completed */
@@ -381,6 +405,8 @@ export interface AppConfig {
extensions: ExtensionsConfig;
/** RustDesk remote access settings */
rustdesk: RustDeskConfig;
/** RTSP streaming settings */
rtsp: RtspConfig;
}
/** Update for a single ATX key configuration */
@@ -557,6 +583,33 @@ export interface MsdConfigUpdate {
msd_dir?: string;
}
export interface RtspConfigResponse {
enabled: boolean;
bind: string;
port: number;
path: string;
allow_one_client: boolean;
codec: RtspCodec;
username?: string;
has_password: boolean;
}
export interface RtspConfigUpdate {
enabled?: boolean;
bind?: string;
port?: number;
path?: string;
allow_one_client?: boolean;
codec?: RtspCodec;
username?: string;
password?: string;
}
export interface RtspStatusResponse {
config: RtspConfigResponse;
service_status: string;
}
export interface RustDeskConfigUpdate {
enabled?: boolean;
rendezvous_server?: string;