开发者

Streaming video of my WPF application

开发者 https://www.devze.com 2023-03-29 05:12 出处:网络
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

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.).

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).


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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消