Search in sources :

Example 1 with BufferedImageCanvas

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);
}
Also used : PipelineImpl(streamer.PipelineImpl) Element(streamer.Element) BaseElement(streamer.BaseElement) ServerBitmapUpdate(rdpclient.rdp.ServerBitmapUpdate) ByteBuffer(streamer.ByteBuffer) BufferedImageCanvas(common.BufferedImageCanvas) Pipeline(streamer.Pipeline)

Aggregations

BufferedImageCanvas (common.BufferedImageCanvas)1 ServerBitmapUpdate (rdpclient.rdp.ServerBitmapUpdate)1 BaseElement (streamer.BaseElement)1 ByteBuffer (streamer.ByteBuffer)1 Element (streamer.Element)1 Pipeline (streamer.Pipeline)1 PipelineImpl (streamer.PipelineImpl)1