使用 MixedReality-WebRTC 屏幕截图 [英] Using MixedReality-WebRTC Screen Capture

查看:53
本文介绍了使用 MixedReality-WebRTC 屏幕截图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 MixedReality-WebRTC 制作 UWP 应用.

I'm making a UWP app using MixedReality-WebRTC.

有没有办法实时获取当前屏幕,而不是网络摄像头?

Is there a way to get the current screen real-time, not a webcam?

推荐答案

有没有办法实时获取当前屏幕

Is there a way to get the current screen real-time

当然,您可以使用 GraphicsCapturePicker 选择要捕获的窗口,并使用屏幕捕获 api 使用 FrameArrived 事件获取实时帧.

Sure, you could use GraphicsCapturePicker to pick window that you want to capture, and use screen capture api the get real time frame with FrameArrived event.

_framePool.FrameArrived += (s, a) =>
{
    // The FrameArrived event fires for every frame on the thread that
    // created the Direct3D11CaptureFramePool. This means we don't have to
    // do a null-check here, as we know we're the only one  
    // dequeueing frames in our application.  

    // NOTE: Disposing the frame retires it and returns  
    // the buffer to the pool.
    using (var frame = _framePool.TryGetNextFrame())
    {
        // We'll define this method later in the document.
        ProcessFrame(frame);
    }  
};

这里是官方文档你可以参考.

这篇关于使用 MixedReality-WebRTC 屏幕截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆