Go Premium for a chance to win a PS4. Enter to Win


Scanning the framebuffer for changes

Posted on 2006-06-22
Medium Priority
Last Modified: 2010-08-05
Hey folks,

I'm developing a remote desktop app similar to VNC. I'm trying to scan the framebuffer for changes  but it takes a REALLY long time. I'm using methods similar to other VNC apps, with the difference that I can't go through X, but need look directly at the framebuffer.

I mmap the local framebuffer to a char* buffer, but for some reason comparing portions of it to what I have in my "check against" buffer take much longer than I expected.

What I mean is, using memcmp to compare two data buffers I've created takes almost no time, whereas comparing a data buffer I've created to a portion of the mmap'ed framebuffer takes many times longer.

Are there VNC or VNC-like apps out there that don't go through X, and are they any good?

Do I need to go even lower, to the drivers?

Many many thanks for your help.
Question by:quadrille01
  • 2
  • 2

Expert Comment

ID: 17057502
what about using DirectFb library.


Manish Regmi

Author Comment

ID: 17058453
I looked at DirectFB but from what I can tell its accellerated for write but not read. From some other reading I've learned that most video cards don't provide much bandwidth for reading. I mean at the hardware level. I'm looking at Xvfb right now. That keeps the framebuffer in system memory.


Accepted Solution

manish_regmi earned 1000 total points
ID: 17060672
There is another library which directly access hardware. Its called svgalib (www.svgalib.org). It is used in application where X cannot perform well like video games. Doom and Quake are already ported to that library.
You can give it a try.

Manish Regmi
LVL 35

Assisted Solution

by:Duncan Roe
Duncan Roe earned 1000 total points
ID: 17063137
We used svgalib in a project at work: were never able to read the sceen back at all. We wanted screen shots for the user manual but had to resort to Windows screenscraper while running it under VMWare. So it may not suit your needs.
Must say I did find the framebuffer X driver to be very slow when I tried it, compared to one that drove the chip directly. So it would seem there might be something inherently slow in the implementation. If so, could it be improved?
That would need someone (you?) to look with fresh eyes at how Linux is doing it now. Wish I could help you more, best of luck anyway

Author Comment

ID: 17063480
Overall video performance(by which I mean frames-per-second) is less of an issue right now than the CPU cycles that framebuffer scanning eats up.I wonder if there's a scanning algorithm thats been tested as mathematically the most efficient or something.

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question