简体   繁体   中英

Implementing VNC in Qt

I am trying to create a simple application for watching a screen in Qt. I have written my own server and client. At the moment the client simply sends a screenshot of the entire screen to the server so it can be displayed. I am just wondering if I can implement VNC into my server and client, or is there a way of comparing two images so I can send only what has changed?

The client and server use UDP to send the screenshot across and I want the image in the best quality possible.

There are many possible ways of detecting changes to the screen, but the most efficient would probably be to use a mirror driver.

VNC also uses a hooking system to register areas of the screen that are "likely to be changed".

Grabbing everything and then comparing pixels for changes are also possible, but requires a bit more work on the server side since you need to keep a buffer of what you have already sent to the client. That buffer is then used when you compare the current snapshot to detect changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM