use of common.BufferedImageCanvas in project cloudstack by apache.
the class AwtCanvasAdapter method main.
/**
* Example.
*/
public static void main(String[] args) {
// System.setProperty("streamer.Link.debug", "true");
// System.setProperty("streamer.Element.debug", "true");
// System.setProperty("streamer.Pipeline.debug", "true");
ByteBuffer packet = new ByteBuffer(new byte[] { 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x10, 0x00, 0x01, 0x04, 0x0a, 0x00, 0x0c, (byte) 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
Pipeline pipeline = new PipelineImpl("test");
Element bitmap = new ServerBitmapUpdate("bitmap");
BufferedImageCanvas canvas = new BufferedImageCanvas(1024, 768);
Element adapter = new AwtCanvasAdapter("test", canvas, null) {
{
verbose = true;
}
};
pipeline.addAndLink(bitmap, adapter);
bitmap.handleData(packet, null);
}
Aggregations