문제

I have install Droid VNC Server on my tablet. I also checkout it's source at http://github.com/oNaiPs/droid-VNC-server but i don't find any line of codes where it capture the screen and upload to Viewer. So, How does it work? How can it capture the Droid's screen?

도움이 되었습니까?

해결책

Look in the jni/vnc/ folder. Sure looks like a VNC server to me.

다른 팁

It has 3 modes to try and read your screen:

  1. Framebuffer
  2. SurfaceFlinger
  3. Gralloc

I've only tried it on Android x86 and only got the framebuffer mode working. Supposedly 2. and 3. work better if you're on ARM. Basically what that does is directly read the framebuffer device (/dev/graphics/fb0 like on Linux). By read I mean it takes a series of "snapshots" of the screen and sends them to the VNC client as it requests screen updates. The framebuffer device is the layer between where Android writes its screen contents which is then in turn passed through the graphics pipeline to the hardware (graphics display chip -> screen). Think of a framebuffer just being like a frame in a video, a series of frames makes a video, as does a buffer of frames represent the actual dynamically changing contents of the screen.

With regards to input Droid VNC server receives pointer and key events over the network, processes them and then sends them to the /dev/input devices which Android then handles as if they were local keyboard or mouse inputs.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top