Inheritance: NewTOAPIA.Drawing.GraphPortDelegate
Example #1
0
        public GLSketchViewer(GraphicsInterface gi, int width, int height)
        {
            fDynamicTexture = new SnapNGLView.DynamicTexture(gi, width, height, 3);

            // Create the backing buffer to retain the image
            backingBuffer = new PixelBuffer24(width, height);
            //backingBuffer.DeviceContext.ClearToWhite();

            // 1.  Show a dialog box to allow the user to type in the 
            // group IP address and port number.
            HostForm groupForm = new HostForm();
            groupForm.ShowDialog();

            // 2. Get the address and port from the form, and use
            // them to setup the MultiSession object
            string groupIP = groupForm.groupAddressField.Text;
            int groupPort = int.Parse(groupForm.groupPortField.Text);
            IPEndPoint ipep = new IPEndPoint(IPAddress.Parse(groupIP), groupPort);

            // Create the session
            fSession = new MultiSession(Guid.NewGuid().ToString(), ipep);

            // Add the channel for graphics commands
            fSketchChannel = fSession.CreateChannel(PayloadType.Whiteboard);

            // 3. Setup the chunk decoder so we can receive new images
            // when they come in
            fChunkDecoder = new GraphPortChunkDecoder(backingBuffer, fSketchChannel);
            fChunkDecoder.PixBltPixelBuffer24Handler += this.PixBltPixelBuffer24;
            fChunkDecoder.PixBltLumbHandler += this.PixBltLum24;

            //fSketchChannel.FrameReceivedEvent += FrameReceived;

        }
Example #2
0
        public SketchViewer(PayloadChannel channel, int width, int height)
        {
            fSketchChannel = channel;

            // Create the backing buffer to retain the image
            fBackingBuffer = new PixelBuffer24(width, height);

            // Create the decoder and assign ourself to received 
            // decoded methods
            fChunkDecoder = new GraphPortChunkDecoder(fBackingBuffer, fSketchChannel);
            fChunkDecoder.AddPort(this);
        }
Example #3
0
        public GraphicsChannel(IGraphPort localRenderer, PayloadChannel channel)
        {
            fCollaborationChannel = channel;

            fRenderer = localRenderer;

            fChunkDecoder = new GraphPortChunkDecoder();
            fChunkDecoder.AddGraphPort(fRenderer);

            // Create the sending graph port
            fChunkEncoder = new GraphPortChunkEncoder();
            fChunkEncoder.ChunkPackedEvent += new GraphPortChunkEncoder.ChunkPacked(GDIChunkPacked);
            AddGraphPort(fChunkEncoder);
            
            // send the frame to the receiver
            fCollaborationChannel.FrameReceivedEvent += new RtpStream.FrameReceivedEventHandler(GDICommandReceived);
        }