TASK 3 milestone 1: webcam capture (MediaCapture CPU-first, CameraManager refcount, picker, clip/mirror, schema v2, tests)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
namespace ytLive.Services;
|
||||
|
||||
/// <summary>
|
||||
/// A normalized CPU frame (32bpp BGRA, tightly packed). The capture path hands
|
||||
/// these to the UI thread, which copies them into the shared WriteableBitmap.
|
||||
/// Deliberately the only pixel type the rest of the app knows about — every
|
||||
/// future capture source (screen, background-removed webcam) feeds the same seam.
|
||||
/// </summary>
|
||||
public sealed class VideoFrame
|
||||
{
|
||||
public int Width { get; }
|
||||
public int Height { get; }
|
||||
public byte[] BgraPixels { get; }
|
||||
public int Stride => Width * 4;
|
||||
|
||||
public VideoFrame(int width, int height, byte[] bgraPixels)
|
||||
{
|
||||
Width = width;
|
||||
Height = height;
|
||||
BgraPixels = bgraPixels;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user