Screen backdrop (schema v5/v6) + five-scene catalog + webcam polish: live desktop/game capture as a permanent non-deletable bottom layer (Source.IsBackdrop), auto full-screen game detection (Win32FullScreenDetector) else primary display, GraphicsCapturePicker re-designation, refcounted shared ScreenCaptureManager, Live-only backdrop by policy (HasBackdrop + v5-v6 backfill + EnforceBackdropPolicy, checkbox gone), SceneCatalog (Starting/Live/BRB/Chat/Ending) with + button re-adding missing scenes, webcam mid-session transparent-container fix (GetPreviewBitmap propagation), Chat half-screen-area cap, 'Add Webcam' always opens the picker (SwapWebcamIdentityAsync, no silent resurrect), WindowsRuntimeMarshal frame-read + 5s-throttled errors, docs updated, tests (65 passing)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace ytLive.Models;
|
||||
|
||||
/// <summary>
|
||||
/// The app's five canonical scenes. Scenes are worked on by name; you can delete
|
||||
/// them ("work with less"), but the app only ever adds back one of these five —
|
||||
/// anything beyond them is OBS territory. The live desktop/game backdrop exists
|
||||
/// only in the Live scene.
|
||||
/// </summary>
|
||||
public static class SceneCatalog
|
||||
{
|
||||
public const string Starting = "Starting";
|
||||
public const string Live = "Live";
|
||||
public const string Brb = "BRB";
|
||||
public const string Chat = "Chat";
|
||||
public const string Ending = "Ending";
|
||||
|
||||
public static readonly string[] All = { Starting, Live, Brb, Chat, Ending };
|
||||
|
||||
public static bool IsCanonical(string? name)
|
||||
=> name != null && All.Contains(name.Trim(), StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public static bool Is(string? name, string canonical)
|
||||
=> name != null && string.Equals(name.Trim(), canonical, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public static bool IsChat(string? name) => Is(name, Chat);
|
||||
|
||||
/// <summary>Only the Live scene carries the live desktop/game backdrop.</summary>
|
||||
public static bool HasBackdrop(string? name) => Is(name, Live);
|
||||
}
|
||||
Reference in New Issue
Block a user