操纵发送到监视器的信号
我正在尝试较低级别的编程,对此我一无所知。我想捕获显示器的输入,将其存储在磁盘上的某个位置,然后稍后将其传输回屏幕。虽然我当然知道如何写入磁盘,但我必须知道如何以这种方式操作监视器。如果有人能给我一些指示/链接,我将不胜感激。 我了解 ruby 和 java,但我假设 ruby 作为一种高级语言,并不真正适合这种任务。我愿意看看所需的任何新语言。
I am experimenting with lower-level programming, which I know absolutely nothing about. I would like to capture input to the monitor, store it somewhere on disk, then pipe it back to the screen at a later time. While I of course know how to write to disk, I have to idea how to manipulate the monitor in such a fashion. If anyone can give me some pointers/links I'd be most grateful.
I know both ruby and java, but I'm assuming ruby, being such a high-level language, isn't really suited to this kind of task. I'm willing to have a look at any new language required.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Java 也是一种非常高级的语言,因为它是构建在 VM 上的。因此,对显示器等组件的低级手动操作只能通过迂回方法来实现。然而,有一个 Robot API允许您执行其中一些操作。机器人有创建屏幕截图和移动鼠标的方法,但它没有改变屏幕上像素的方法。为此,您必须查看一些 GUI 库,例如 Swing、SWT 和 RCP。
如果您想要进行一些真正的低级编程,您应该尝试其他语言,例如 C 或 C++。
Java is also a very high level language, as it is built on a VM. Because of this, low-level manual manipulation of components such as the monitor is only achievable through round-about methods. There is, however, a Robot API that allows you to do some of these things. Robot has methods to create screen captures and move the mouse, however it does not have methods for altering pixels on the screen. To do this, you'll have to look at some GUI libraries such as Swing, SWT and RCP.
If you're looking to do some real low-level programming, you should check out a different language like C or C++.
如果您想从屏幕截图。但是,如果您想捕获 60hz 全显示器带宽(例如捕获电影播放),我认为仅使用软件是不可能实现的,除非修改显卡驱动程序。您可以购买“视频捕获卡”,它可以直接捕获通过 DVI 或模拟发送的数据以获得最佳质量,但它们并不便宜。
Look at this answer if you want to create a movie from screen shots. However, if you want to capture 60hz full monitor bandwidth (as you would if capturing a movie playback for instance), I don't think this is possible with software alone, unless perhaps by modifying a video card driver. You can buy a "video capture card" that can directly capture data sent over DVI or analog for best quality, however they are not cheap.
如果您使用的是基于 Unix 的系统,您可能想研究通过 ssh 进行的 X11 转发,您可以对自己的客户端执行类似的操作。但这仍然是相当高水平的。
If you're using a Unix-based system you may want to looking into X11 forwarding over ssh, you can probably do something similar with your own client. This is still pretty high-level though.