我的 WPF 应用程序的流视频 [英] Streaming video of my WPF application

查看:21
本文介绍了我的 WPF 应用程序的流视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的数字标牌解决方案,带有 WPF 中的演示应用程序.我想从我的远程机器监视"它.我想发送应用程序现在显示的内容流(图像、视频、用户控件等).

I have a simple digital signage solution with a presentation application in WPF. I would like to "monitor" it from my remote machine. I would like to send a stream of the content the application is showing now (images, video, userControls, etc.).

如何做到这一点,我是否需要手动截取屏幕截图并将其以视频流的形式发送到我的监视器 - 如何将其编码为监控应用程序可以播放的流(那个也是 WPF).

How to do this, do i need to manually take a screenshot and send it in a video stream to my monitor - how to encode it into a stream the monitoring application can playback (that one is also WPF).

推荐答案

好的,如果快照没问题,那么我之前已经这样做了.我这样做的方法是对应用程序进行屏幕截图"(使用您可以在此处找到的代码:http://www.grumpydev.com/2009/01/03/taking-wpf-screenshots/ )然后让标牌应用启动网络服务(HttpListener、WCF 或 SelfHosted Nancy) 每当向特定 url 发出请求时返回当前屏幕.您监控应用程序,然后根据需要经常轮询该网址.

Ok, if snapshots are ok then I've done this before. The way I did it was to take a "screenshot" of the app (using code you can find here: http://www.grumpydev.com/2009/01/03/taking-wpf-screenshots/ ) then have the signage app spin up a webservice (HttpListener, WCF or SelfHosted Nancy) that returns the current screen whenever a request is made to a particular url. You monitor app then polls that url however often you need to.

这样做是为了监视 Surface 设备的交互式游戏,并且似乎不会导致任何性能问题,因此应该可以满足您的需求.

This was done to monitor an interactive game for a Surface device, and didn't seem to cause any perf issues, so should be fine for your needs.

这篇关于我的 WPF 应用程序的流视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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