Files
HMS MediaEngine Agent 362e089be0 AUFGERAUMT: Root auf 10 sichtbare Elemente reduziert
Der Nutzer hat recht: Der Ordner war voller Entwicklungs-Muell.
Jetzt ist sauber getrennt:

ROOT (was der Nutzer sieht und braucht):
- run.py                     = das Programm
- hms_app/                   = der Anwendungscode
- HMS MediaEngine.app        = macOS Doppelklick-Starter
- HMS-Start.vbs              = Windows Doppelklick-Starter
- HMS-Install.vbs             = Windows Erst-Installation
- HMS-Mac-Install.command     = macOS Homebrew-Installation
- HMS-Portable-Install.command = macOS Portable-Installation (16GB-Fix)
- installer_gui.py           = grafischer Installer
- launcher.pyw + launcher_core.py = interne Start-Logik
- LIESMICH.txt               = 10-Zeilen-Kurzanleitung
- .gitignore

_entwicklung/ (alles andere, NICHT benoetigt):
- packages/ apps/ native/ plugins/ tools/ schemas/ tests/ docs/
  build/ fixture_profiles/
- PLAN.md STATUS.md ERRORS.md TEST_REPORT.md CHANGELOG.md README.md
- pyproject.toml uv.lock setup_*.sh/ps1 make_mac_app.py

Diese Trennung gilt ab sofort fuer alle Commits. Der Nutzer kann
_entwicklung/ loeschen wenn er Platz braucht - die App laeuft ohne.

Verifiziert: App startet nach Aufraeumen unveraendert (Health 200).
2026-09-11 23:44:06 +02:00

62 lines
2.3 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Unit-Tests Renderer-Pipeline-Definitionen (PLAN.md §12, §36 Nr. 45)."""
from __future__ import annotations
from hms_renderer import (
D3D11Pipeline,
DevGLPipeline,
build_compositor_pipeline,
build_single_video_pipeline,
gst_available,
)
def test_single_video_d3d11_uses_hardware_decoder_path() -> None:
pipeline = build_single_video_pipeline("C:/clips/test.mp4", d3d11=True)
assert "d3d11" in pipeline
assert "d3d11videosink" in pipeline
assert "fullscreen=true" in pipeline # randloses Vollbild (§3.3)
assert "uridecodebin" in pipeline
def test_single_video_devgl_marked_alternative() -> None:
pipeline = build_single_video_pipeline("/tmp/test.mp4", d3d11=False)
assert "d3d11" not in pipeline # Dev-Pfad darf D3D11 nicht still nutzen
assert "glimagesink" in pipeline
def test_compositor_d3d11_mixed_two_sources_on_gpu() -> None:
pipeline = build_compositor_pipeline("a.mp4", "b.mp4", d3d11=True)
# Zwei Quellen → Compositor → Ausgabe ohne CPU-Readback (§36 Nr. 5)
assert pipeline.count("uridecodebin") == 2
assert "d3d11compositor" in pipeline
assert "d3d11convert" in pipeline
assert "D3D11Memory" in pipeline # GPU-Residenz explizit angefordert
assert "appsink" not in pipeline # kein CPU-Abgriff im Normalpfad
assert "videoconvert" not in pipeline # kein Software-Farbkonverter
def test_compositor_devgl_is_separate_path() -> None:
pipeline = build_compositor_pipeline("a.mp4", "b.mp4", d3d11=False)
assert "glvideomixer" in pipeline
assert "d3d11" not in pipeline
def test_d3d11_pipeline_splits_screen_for_two_videos() -> None:
p = D3D11Pipeline(video_a="a.mp4", video_b="b.mp4", width=1920, height=1080)
s = p.launch_string()
assert "sink_0::width=960" in s # linke Hälfte
assert "sink_1::width=960" in s # rechte Hälfte
assert "width=1920,height=1080" in s # Master-Auflösung
def test_devgl_pipeline_reduced_resolution() -> None:
p = DevGLPipeline(video_a="a.mp4", video_b="b.mp4")
assert p.width == 960 and p.height == 540 # Dev-Pfad kleiner, gekennzeichnet
def test_gst_available_reflects_environment() -> None:
# Im Entwicklungscontainer ist GStreamer nicht installiert → False.
# Auf dem Windows-Ziel mit gebündelter Runtime → True. Kein Fake.
assert isinstance(gst_available(), bool)