Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.imgstreaming
Class NativeScreenCapture

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.imgstreaming.NativeScreenCapture

public class NativeScreenCapture
extends Object

This class uses native code to capture desktop screen. It should work for Windows, Mac OS X and X11-based Unix such as Linux and FreeBSD.

Author:
Sebastien Vincent

Constructor Summary
NativeScreenCapture()
           
 
Method Summary
static boolean grabScreen(int display, int x, int y, int width, int height, byte[] output)
          Grab desktop screen and get raw bytes.
static boolean grabScreen(int display, int x, int y, int width, int height, long output, int outputLength)
          Grab desktop screen and get raw bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeScreenCapture

public NativeScreenCapture()
Method Detail

grabScreen

public static boolean grabScreen(int display,
                                 int x,
                                 int y,
                                 int width,
                                 int height,
                                 byte[] output)
Grab desktop screen and get raw bytes.

Parameters:
display - index of display
x - x position to start capture
y - y position to start capture
width - capture width
height - capture height
output - output buffer to store screen bytes
Returns:
true if grab success, false otherwise

grabScreen

public static boolean grabScreen(int display,
                                 int x,
                                 int y,
                                 int width,
                                 int height,
                                 long output,
                                 int outputLength)
Grab desktop screen and get raw bytes.

Parameters:
display - index of display
x - x position to start capture
y - y position to start capture
width - capture width
height - capture height
output - native output buffer to store screen bytes
outputLength - native output length
Returns:
true if grab success, false otherwise

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.