1

我想在 MediaCapture 中叠加一个图形,例如视频层顶部的下 3 层或帧作为效果。我该怎么做呢?

我不只是想使用网格在 UI 中对其进行分层,它需要在 MediaCapture 中,以便在视频/图像录制中也捕获帧/下 3rd。

我在测试时使用了一个相当基本的 MediaCapture 实现;

MediaCapture mediaCapture;

public async void init()
{
    mediaCapture = new MediaCapture();
    await mediaCapture.InitializeAsync();
}

public async void snapPic()
{
    var lowLagCapture = await mediaCapture.PrepareLowLagPhotoCaptureAsync(ImageEncodingProperties.CreateUncompressed(MediaPixelFormat.Bgra8));

    var capturedPhoto = await lowLagCapture.CaptureAsync();
    var softwareBitmap = capturedPhoto.Frame.SoftwareBitmap;

    await lowLagCapture.FinishAsync(); 
}
4

0 回答 0