Native Renderkern: Rust/GStreamer-Plugin nach ADR-0004 (996 Zeilen)
- Cargo.toml: gstreamer-rs 0.22, windows-rs 0.58 (D3D11/DXGI/HLSL), rmp-serde, serde, thiserror; cdylib+rlib; release mit LTO - lib.rs: Modul-Struktur, GStreamer-Plugin-Registrierung (hmscompositor), FFI-Interface (hms_build_pipeline, hms_push_frame) - compositor.rs: alle 9 Blend-Modi (§12.4), LayerTransform, D3D11-TextureHandle, LayerCompositor ohne CPU-Readback (§12.6) - shader_loader.rs: HmsParams-cbuffer nach §14.4 (u_resolution, u_time_seconds, u_audio_*, 16 Plugin-Params), D3DCompile (ps_5_0), FrameSnapshot-Parameter-Bindung - frame_receiver.rs: FrameSnapshot aus MessagePack (Feldnamen identisch zu Python engine.py), Thread-sicher - pipeline_builder.rs: d3d11h264dec -> d3d11convert -> hmscompositor -> d3d11videosink (§13.1) - README.md: Windows-Build-Anleitung, Python-Integration (ctypes) - Nicht kompiliert (ADR-0008: kein cargo im Container); zwei Pruefpunkte fuer Windows-Durchlauf dokumentiert: SimpleElement-Subklasse, D3DCompile-Signatur
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
[package]
|
||||
name = "hms_render_bridge"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "HMS MediaEngine native render bridge (ADR-0004): GStreamer D3D11 pipeline, layer compositor, HLSL shader loader."
|
||||
license = "MIT"
|
||||
|
||||
[lib]
|
||||
name = "hms_render_bridge"
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
# GStreamer core + video + base (gstreamer-rs)
|
||||
gstreamer = "0.22"
|
||||
gstreamer-video = "0.22"
|
||||
gstreamer-base = "0.22"
|
||||
gstreamer-gl = "0.22"
|
||||
|
||||
# D3D11 interop via windows-rs (Windows only)
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows = { version = "0.58", features = [
|
||||
"Win32_Graphics_Direct3D11",
|
||||
"Win32_Graphics_Direct3D",
|
||||
"Win32_Graphics_Dxgi",
|
||||
"Win32_Graphics_Dxgi_Common",
|
||||
"Win32_Graphics_Direct3D11_On_12",
|
||||
"Win32_Foundation",
|
||||
"Win32_Graphics_Direct3D12",
|
||||
"Win32_Graphics_Direct3D12_On_11",
|
||||
"Win32_Graphics_Hlsl",
|
||||
"Win32_System_Com",
|
||||
"Win32_System_LibraryLoader",
|
||||
] }
|
||||
|
||||
# MessagePack for FrameSnapshot IPC (field names identical to Python FrameSnapshot)
|
||||
rmp-serde = "1.3"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_bytes = "0.11"
|
||||
|
||||
# Logging
|
||||
log = "0.4"
|
||||
env_logger = "0.11"
|
||||
|
||||
# Error handling
|
||||
thiserror = "1.0"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
panic = "abort"
|
||||
Reference in New Issue
Block a user