Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

Scanning the framebuffer for changes

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.
0
quadrille01
Asked:
quadrille01
  • 2
  • 2
2 Solutions
 
manish_regmiCommented:
what about using DirectFb library.

http://www.directfb.org/

regards
Manish Regmi
0
 
quadrille01Author Commented:
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.

Nathan
0
 
manish_regmiCommented:
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.

regards
Manish Regmi
 
0
 
Duncan RoeSoftware DeveloperCommented:
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
0
 
quadrille01Author Commented:
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.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now