init: ShowenV2 项目骨架 — 数字生命窗口平台

- core/ 跨平台内核骨架 (Plugin trait, Message, ServiceManager, Config)
- plugins/ 空桩 (video, http, ble, screen, wifi)
- PROGRESS.md 进度跟踪, TEAM.md 团队档案
- cargo check 零 warning 通过

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
showen
2026-03-12 05:03:58 +08:00
commit 23f4d46287
21 changed files with 2223 additions and 0 deletions

54
src/plugins/video/mod.rs Normal file
View File

@@ -0,0 +1,54 @@
//! VideoPlugin — 视频播放引擎
//!
//! 基于 OpenCV 的视频播放,支持状态机驱动、帧变换、过渡效果。
//! Phase 1 核心:迁移旧 video_processor.rs + state_machine.rs
pub mod processor;
pub mod state_machine;
use crate::core::message::Message;
use crate::core::plugin::{Plugin, PluginContext, PluginInfo, Platform};
use anyhow::Result;
pub struct VideoPlugin {
ctx: Option<PluginContext>,
}
impl VideoPlugin {
pub fn new() -> Self {
Self { ctx: None }
}
}
impl Plugin for VideoPlugin {
fn id(&self) -> &'static str { "video" }
fn info(&self) -> PluginInfo {
PluginInfo {
name: "Video Player",
version: "0.2.0",
description: "视频播放引擎 (OpenCV)",
platform: Platform::Any,
}
}
fn init(&mut self, ctx: PluginContext) -> Result<()> {
self.ctx = Some(ctx);
Ok(())
}
fn start(&mut self) -> Result<()> {
// TODO: Commit 4 实现
Ok(())
}
fn handle_message(&mut self, _msg: Message) -> Result<()> {
// TODO: Commit 4 实现
Ok(())
}
fn stop(&mut self) -> Result<()> {
// TODO: Commit 4 实现
Ok(())
}
}