mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-10-28 08:20:49 +08:00
在现有 HTTP 服务挂载 /mcp,让外部 AI 经共享 API Key 调用原分辨率截图、批量键鼠、ATX/WOL 和虚拟介质八个工具。所有调用共用有界 FIFO 和全局限流,复用现有采集管线与硬件控制器。 移除内置模型调用、网页 Agent 面板及旧配置,设置页提供可持续查看的 Key、统一的地址/密钥复制样式。补齐 DEB 的 libudev1 运行依赖。 验证:583 项 Rust 库测试、前端生产构建、ARMv7 设备视觉操作与介质/WOL 实测,以及默认 Release 构建和 DEB 包校验通过。 Refs #319
50 lines
1.6 KiB
Rust
50 lines
1.6 KiB
Rust
//! Video capture and streaming module
|
|
//!
|
|
//! This module provides V4L2 video capture, encoding, and streaming functionality.
|
|
|
|
pub mod capture;
|
|
pub mod codec;
|
|
pub mod codec_constraints;
|
|
pub mod device;
|
|
pub mod format;
|
|
pub mod frame;
|
|
#[cfg(feature = "desktop")]
|
|
pub mod pipeline;
|
|
pub mod recovery;
|
|
pub mod signal;
|
|
#[cfg(feature = "desktop")]
|
|
pub mod snapshot;
|
|
#[cfg(feature = "desktop")]
|
|
pub mod stream_manager;
|
|
#[cfg(feature = "desktop")]
|
|
pub mod streamer;
|
|
#[cfg(feature = "desktop")]
|
|
pub mod traits;
|
|
#[cfg(feature = "desktop")]
|
|
pub mod types;
|
|
|
|
pub use capture::{CaptureMeta, CaptureStream};
|
|
pub use codec::{H264Encoder, H264EncoderType, JpegEncoder, PixelConverter, Yuv420pBuffer};
|
|
pub use device::{VideoDevice, VideoDeviceInfo};
|
|
pub use format::PixelFormat;
|
|
pub use frame::VideoFrame;
|
|
pub use pipeline::{
|
|
EncodedVideoFrame, SharedVideoPipeline, SharedVideoPipelineConfig, SharedVideoPipelineStats,
|
|
};
|
|
pub use signal::SignalStatus;
|
|
pub use stream_manager::VideoStreamManager;
|
|
pub use streamer::{Streamer, StreamerState};
|
|
|
|
impl From<SignalStatus> for streamer::StreamerState {
|
|
fn from(value: SignalStatus) -> Self {
|
|
match value {
|
|
SignalStatus::NoCable => streamer::StreamerState::NoCable,
|
|
SignalStatus::NoSync => streamer::StreamerState::NoSync,
|
|
SignalStatus::OutOfRange => streamer::StreamerState::OutOfRange,
|
|
SignalStatus::NoSignal => streamer::StreamerState::NoSignal,
|
|
SignalStatus::UvcUsbError => streamer::StreamerState::UvcUsbError,
|
|
SignalStatus::UvcCaptureStall => streamer::StreamerState::UvcCaptureStall,
|
|
}
|
|
}
|
|
}
|