如何在VNC通信中添加额外的数据帧?

发布于 2024-11-19 21:05:07 字数 90 浏览 5 评论 0原文

有谁知道如何在 vnc 通信中添加额外的数据帧和视频帧。客户端和服务器都由我来处理。以及如何在两侧对额外的数据帧进行编码和解码。

任何帮助将不胜感激。

Does anyone knows how to add extra data frame along with video frames in vnc communication. Both client and server will be handled by me. And also how to do encode and decode that extra data frame at both the sides.

Any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

流年已逝 2024-11-26 21:05:08

我在 RFB (VNC) 协议上找到的最佳参考是: http://tigervnc.org/cgi -bin/rfbproto

您有几个一般方向。

如果您不介意扩展协议,那么您可以将新的消息类型添加到协议中(因为您控制两端)。请参阅 clientcuttextservercuttext 作为现有消息的示例,用于在任一方向发送任意数量的数据。缺点是,如果您的客户端或服务器连接到不同的客户端或服务器,那么这将导致致命错误。

另一种选择是以向后兼容的方式扩展现有消息。例如,您可以通过发送视口外部的鼠标事件(然后发送返回真实位置内部的最终鼠标事件)来将客户端发送到服务器消息。您可以通过发送视口之外的帧缓冲区更新来将服务器发送到客户端消息。普通客户端不会显示该信息。

The best reference I've found on the RFB (VNC) protocol is: http://tigervnc.org/cgi-bin/rfbproto

You have a couple of general directions.

If you don't mind extending the protocol, then you can just add new message types to your protocol (since you control both ends). See the clientcuttext and servercuttext as examples of existing messages for sending an arbitrary amount of data in either direction. The disadvantage is that if your client or server is connected to be a different client or server then this will cause a fatal error.

Another option is to extend an existing message in a backwards compatible way. For example, you could send client to server message by sending mouse events that are outside the viewport (and then sending a final mouse event that is back inside at the real location). You could send server to client messages by sending frame buffer updates that are outside the viewport. That won't be displayed by normal clients.

淤浪 2024-11-26 21:05:07

使用“水印”。您可以设置每个第 X 帧都有数据。每个像素将用于存储一位数据。记录每个第 X-1 帧的每个像素,并且对于每个第 X 帧,忽略服务器视频源中的任何实际更改,但如果您希望该位为 1,则使该像素变暗,如果您希望它为 0,则保留像素相同。在 1024 x 768 像素显示器上,使用此方法可以每 X 帧存储 786kb 的数据。确保不压缩将存储数据的帧的流。

如果您不需要 786kb,只为屏幕的上半部分使用,您将节省一些带宽,并且您将获得 786kb 的一半用作数据。

您应该能够很好地实现大部分(如果不是全部)加密。你也可以做很多混淆。也许每第三位都是随机且无用的。也许如果第一位是 1,则翻转所有内容。等等等等.

Use 'watermark's. You can set every Xth frame to have data. Every pixel would be used to store a bit of data. Record every pixel at every X-1th frame, and for every Xth frame ignore any actual change in the server's video feed but if you want the bit to be 1, make that pixel darker, and if you want it to be 0, keep the pixel the same. On a 1024 by 768 pixel display, you can potentially store 786kb of data every X frames with this method. Make sure to not compress the stream for the frames that will store data, through.

If you don't need 786kb, only do it for the top half of the screen, you'll save some bandwidth, and you'll get half of 786kb to use as data.

You should be able to implement most if not all encryption fine. You can do lots of obfuscation too. Maybe every 3rd bit is random and useless. Maybe if the 1st bit is 1, flip everything. Etc etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文