using System.Windows.Media; using ytLive.Helpers; namespace ytLive.Models; public enum SourceType { DisplayCapture, WindowCapture, Background, Image, TextOverlay } public enum ClipShape { Traditional, Round } /// /// A multi-instance scene object: image/background/text (screen/window later). /// The webcam is NOT a Source — it's a singleton resource whose per-scene usage /// is a . See the singleton-vs-multi-instance /// discriminator in ai.md. /// public class Source : SceneElement { private SourceType _type; public SourceType Type { get => _type; set => Set(ref _type, value); } private bool _isEnabled = true; public bool IsEnabled { get => _isEnabled; set => Set(ref _isEnabled, value); } // Display/Window capture private int? _monitorIndex; public int? MonitorIndex { get => _monitorIndex; set => Set(ref _monitorIndex, value); } private IntPtr? _windowHandle; public IntPtr? WindowHandle { get => _windowHandle; set => Set(ref _windowHandle, value); } // Image (asset stored in the layout database) private string? _assetId; private ImageSource? _imageSource; public string? AssetId { get => _assetId; set { if (Set(ref _assetId, value)) { _imageSource = ImageCache.Get(value ?? string.Empty); Raise(nameof(ImageSource)); Raise(nameof(DisplaySource)); } } } public ImageSource? ImageSource => _imageSource; public override ImageSource? DisplaySource => _imageSource; public override bool IsImageSource => Type == SourceType.Image; }