コード例 #1
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     base.Encode(marshaler);
     marshaler.WriteUInt16(wTotalLength);
     marshaler.WriteByte(bNumInterfaces);
     marshaler.WriteByte(bConfigurationValue);
     marshaler.WriteByte(iConfiguration);
     marshaler.WriteByte(bmAttributes);
     marshaler.WriteByte(MaxPower);
 }
コード例 #2
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteUInt32(this.Header.cbSize);
     marshaler.WriteUInt32((uint)this.Header.PacketType);
     marshaler.WriteByte(this.PresentatioinId);
     marshaler.WriteByte((byte)this.NotificationType);
     marshaler.WriteUInt16(this.Reserved);
     marshaler.WriteUInt32(this.cbData);
     marshaler.WriteBytes(this.pData);
 }
コード例 #3
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteUInt32(this.Header.cbSize);
     marshaler.WriteUInt32((uint)this.Header.PacketType);
     marshaler.WriteByte(this.PresentatioinId);
     marshaler.WriteByte(this.ResponseFlags);
     marshaler.WriteUInt16(this.ResultFlags);
 }
コード例 #4
0
        public override void Encode(PduMarshaler marshaler)
        {
            marshaler.WriteUInt32(fecHeader.snSourceAck);
            marshaler.WriteUInt16(fecHeader.uReceiveWindowSize);
            marshaler.WriteUInt16((ushort)fecHeader.uFlags);

            if (SynData.HasValue)
            {
                marshaler.WriteUInt32(SynData.Value.snInitialSequenceNumber);
                marshaler.WriteUInt16(SynData.Value.uUpStreamMtu);
                marshaler.WriteUInt16(SynData.Value.uDownStreamMtu);
                // This datagram MUST be zero-padded to increase the size of this datagram to 1232 bytes.
                int length = 16;
                if (CorrelationId.HasValue)
                {
                    marshaler.WriteBytes(CorrelationId.Value.uCorrelationId);
                    length += 16;
                    marshaler.WriteBytes(CorrelationId.Value.uReserved);
                    length += 16;
                }

                byte[] padBytes = new byte[1232 - length];
                marshaler.WriteBytes(padBytes);
                return;
            }

            if (ackVectorHeader.HasValue)
            {
                // ACK
                marshaler.WriteUInt16(ackVectorHeader.Value.uAckVectorSize);
                if (ackVectorHeader.Value.AckVectorElement != null)
                {
                    List<byte> ackVecElementList = new List<byte>();
                    foreach (AckVector vec in ackVectorHeader.Value.AckVectorElement)
                    {
                        byte vecByte = 0;
                        vecByte |= vec.Length;
                        byte state = (byte)vec.State;
                        vecByte |= (byte)(state << 6);
                        ackVecElementList.Add(vecByte);
                    }
                    ackVecElementList.Reverse();
                    marshaler.WriteBytes(ackVecElementList.ToArray());
                }

                // Padding (variable): A variable-sized array, of length zero or more,
                // such that this structure ends on a DWORD ([MS-DTYP] section 2.2.9) boundary.
                int padLen = 4 - (2 + ackVectorHeader.Value.uAckVectorSize) % 4;

                if (padLen > 0 && padLen != 4)
                {
                    byte[] padding = new byte[padLen];
                    marshaler.WriteBytes(padding);
                }

                // Ack of Acks.
                if (ackOfAckVector.HasValue)
                {
                    marshaler.WriteUInt32(ackOfAckVector.Value.snAckOfAcksSeqNum);
                }
            }

            if (sourceHeader.HasValue || fecPayloadHeader.HasValue)
            {
                if (sourceHeader.HasValue)
                {
                    // Source Data.
                    marshaler.WriteUInt32(sourceHeader.Value.snCoded);
                    marshaler.WriteUInt32(sourceHeader.Value.snSourceStart);
                }
                else
                {
                    // FEC Data.
                    marshaler.WriteUInt32(fecPayloadHeader.Value.snCoded);
                    marshaler.WriteUInt32(fecPayloadHeader.Value.snSourceStart);
                    marshaler.WriteByte(fecPayloadHeader.Value.uRange);
                    marshaler.WriteByte(fecPayloadHeader.Value.uFecIndex);
                    marshaler.WriteUInt16(fecPayloadHeader.Value.uPadding);
                }

                if (payload != null)
                {
                    marshaler.WriteBytes(payload);
                }
            }
        }
コード例 #5
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteUInt16(maximumPacketSize);
     marshaler.WriteByte(endpointAddress);
     marshaler.WriteByte(interval);
     marshaler.WriteUInt32(pipeType);
     marshaler.WriteUInt32(pipeHandle);
     marshaler.WriteUInt32(maximumTransferSize);
     marshaler.WriteUInt32(pipeFlags);
 }
        /// <summary>
        /// Encode this PDU to the PduMarshaler.
        /// </summary>
        /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
        public override void Encode(PduMarshaler marshaler)
        {
            base.Encode(marshaler);
            marshaler.WriteByte(this.quantIdxY);
            marshaler.WriteByte(this.quantIdxCb);
            marshaler.WriteByte(this.quantIdxCr);
            marshaler.WriteUInt16(this.xIdx);
            marshaler.WriteUInt16(this.yIdx);
            marshaler.WriteBool(this.flags);

            marshaler.WriteUInt16(this.yLen);
            marshaler.WriteUInt16(this.cbLen);
            marshaler.WriteUInt16(this.crLen);
            marshaler.WriteUInt16(this.tailLen);

            if (this.yData != null)
                marshaler.WriteBytes(this.yData);
            if (this.cbData != null)
                marshaler.WriteBytes(this.cbData);
            if (this.crData != null)
                marshaler.WriteBytes(this.crData);
            if (this.tailData != null)
                marshaler.WriteBytes(this.tailData);
        }
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     base.Encode(marshaler);
     marshaler.WriteByte(this.ctxId);
     marshaler.WriteUInt16(this.tileSize);
     marshaler.WriteByte(this.flags);
 }
コード例 #8
0
 public override void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteByte(this.SubHeaderLength);
     marshaler.WriteByte((byte)this.SubHeaderType);
     if (this.SubHeaderData != null)
     {
         marshaler.WriteBytes(this.SubHeaderData);
     }
 }
コード例 #9
0
        /// <summary>
        /// Encode this PDU to the PduMarshaler.
        /// </summary>
        /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
        public override void Encode(PduMarshaler marshaler)
        {
            base.Encode(marshaler);

            marshaler.WriteUInt16(this.surfaceId);
            marshaler.WriteByte(this.fillPixel.B);
            marshaler.WriteByte(this.fillPixel.G);
            marshaler.WriteByte(this.fillPixel.R);
            marshaler.WriteByte(this.fillPixel.XA);
            marshaler.WriteUInt16(this.fillRectCount);

            foreach (RDPGFX_RECT16 rect in fillRectList)
            {
                marshaler.WriteUInt16(rect.left);
                marshaler.WriteUInt16(rect.top);
                marshaler.WriteUInt16(rect.right);
                marshaler.WriteUInt16(rect.bottom);
            }
        }
コード例 #10
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteByte((byte)descriptor);
     if (descriptor == DescriptorTypes.SINGLE)
     {
         if(bulkData != null)
         {
             marshaler.WriteByte(bulkData.header);
             marshaler.WriteBytes(bulkData.data);
         }
     }
     else
     {
         marshaler.WriteUInt16(segmentCount);
         marshaler.WriteUInt32(uncompressedSize);
         if (segmentArray != null && segmentArray.Length > 0)
         {
             foreach (RDP_DATA_SEGMENT dataSeg in segmentArray)
             {
                 marshaler.WriteUInt32(dataSeg.size);
                 if (dataSeg.bulkData != null)
                 {
                     marshaler.WriteByte(bulkData.header);
                     marshaler.WriteBytes(bulkData.data);
                 }
             }
         }
     }
 }
コード例 #11
0
 public override void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteByte((byte)((byte)(Flags << 4) | (byte)Action));
     marshaler.WriteUInt16(this.PayloadLength);
     marshaler.WriteByte(this.HeaderLength);
     if (SubHeaders != null)
     {
         foreach (RDP_TUNNEL_SUBHEADER subHeader in SubHeaders)
         {
             marshaler.WriteBytes(PduMarshaler.Marshal(subHeader));
         }
     }
 }
コード例 #12
0
        /// <summary>
        /// Encode this PDU to the PduMarshaler.
        /// </summary>
        /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
        public override void Encode(PduMarshaler marshaler)
        {
            marshaler.WriteUInt32(this.cbGeometryData);
            marshaler.WriteUInt32((uint)this.Version);
            marshaler.WriteUInt64(this.MappingId);
            marshaler.WriteUInt32((uint)this.UpdateType);
            marshaler.WriteUInt32(this.Flags);
            marshaler.WriteUInt64(this.TopLevelId);
            marshaler.WriteUInt32(this.Left);
            marshaler.WriteUInt32(this.Top);
            marshaler.WriteUInt32(this.Right);
            marshaler.WriteUInt32(this.Bottom);
            marshaler.WriteUInt32(this.TopLevelLeft);
            marshaler.WriteUInt32(this.TopLevelTop);
            marshaler.WriteUInt32(this.TopLevelRight);
            marshaler.WriteUInt32(this.TopLevelBottom);
            marshaler.WriteUInt32((uint)this.GeometryType);
            marshaler.WriteUInt32(this.cbGeometryBuffer);

            //Encode RGNDATA
            if (this.cbGeometryBuffer != 0)
            {
                marshaler.WriteUInt32(this.pGeometryBuffer.rdh.dwSize);
                marshaler.WriteUInt32(this.pGeometryBuffer.rdh.iType);
                marshaler.WriteUInt32(this.pGeometryBuffer.rdh.nCount);
                marshaler.WriteUInt32(this.pGeometryBuffer.rdh.nRgnSize);
                EncodeRect(this.pGeometryBuffer.rdh.rcBound, marshaler);

                if (this.pGeometryBuffer.Buffer != null)
                {
                    foreach (RECT rct in this.pGeometryBuffer.Buffer)
                    {
                        EncodeRect(rct, marshaler);
                    }
                }
            }
            marshaler.WriteByte(this.Reserved2);
        }
コード例 #13
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     base.Encode(marshaler);
     marshaler.WriteByte(bInterfaceNumber);
     marshaler.WriteByte(bAlternateSetting);
     marshaler.WriteByte(bNumEndpoints);
     marshaler.WriteByte(bInterfaceClass);
     marshaler.WriteByte(bInterfaceSubClass);
     marshaler.WriteByte(bInterfaceProtocol);
     marshaler.WriteByte(iInterface);
 }
コード例 #14
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     base.Encode(marshaler);
     marshaler.WriteByte(bEndpointAddress);
     marshaler.WriteByte(bmAttributes);
     marshaler.WriteUInt16(wMaxPacketSize);
     marshaler.WriteByte(bInterval);
 }
コード例 #15
0
 public void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteByte((byte)((int)c << 5 | val1));
     if (c >= EIGHT_BYTE_C_Values.TWO_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val2);
     }
     if (c >= EIGHT_BYTE_C_Values.THREE_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val3);
     }
     if (c >= EIGHT_BYTE_C_Values.FOUR_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val4);
     }
     if (c >= EIGHT_BYTE_C_Values.FIVE_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val5);
     }
     if (c >= EIGHT_BYTE_C_Values.SIX_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val6);
     }
     if (c >= EIGHT_BYTE_C_Values.SEVEN_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val7);
     }
     if (c == EIGHT_BYTE_C_Values.EIGHT_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val8);
     }
 }
コード例 #16
0
        /// <summary>
        /// Encode this PDU to the PduMarshaler.
        /// </summary>
        /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
        public override void Encode(PduMarshaler marshaler)
        {
            base.Encode(marshaler);
            marshaler.WriteUInt16(this.surfaceId);
            marshaler.WriteUInt16((ushort)this.codecId);
            marshaler.WriteByte((byte)this.pixelFormat);

            // Destination rectangle.
            marshaler.WriteUInt16(this.destRect.left);
            marshaler.WriteUInt16(this.destRect.top);
            marshaler.WriteUInt16(this.destRect.right);
            marshaler.WriteUInt16(this.destRect.bottom);

            // Bitmap.
            marshaler.WriteUInt32(this.bitmapDataLength);
            marshaler.WriteBytes(this.bitmapData);
        }
コード例 #17
0
 public void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteByte((byte)((int)c << 6 | val1));
     if (c >= FOUR_BYTE_C_Values.TWO_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val2);
     }
     if (c >= FOUR_BYTE_C_Values.THREE_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val3);
     }
     if (c == FOUR_BYTE_C_Values.FOUR_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val4);
     }
 }
コード例 #18
0
        /// <summary>
        /// Encode this PDU to the PduMarshaler.
        /// </summary>
        /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
        public override void Encode(PduMarshaler marshaler)
        {
            base.Encode(marshaler);
            marshaler.WriteUInt16(this.surfaceId);
            marshaler.WriteUInt16((ushort)this.codecId);
            marshaler.WriteUInt32(this.codecContextId);
            marshaler.WriteByte((byte)this.pixelFormat);

            // Bitmap.
            marshaler.WriteUInt32(this.bitmapDataLength);
            marshaler.WriteBytes(this.bitmapData);
        }
        /// <summary>
        /// Encode this PDU to the PduMarshaler.
        /// </summary>
        /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
        public override void Encode(PduMarshaler marshaler)
        {
            base.Encode(marshaler);
            marshaler.WriteByte(this.quantIdxY);
            marshaler.WriteByte(this.quantIdxCb);
            marshaler.WriteByte(this.quantIdxCr);
            marshaler.WriteUInt16(this.xIdx);
            marshaler.WriteUInt16(this.yIdx);
            marshaler.WriteByte(this.progressiveQuality);

            marshaler.WriteUInt16(this.ySrlLen);
            marshaler.WriteUInt16(this.yRawLen);
            marshaler.WriteUInt16(this.cbSrlLen);
            marshaler.WriteUInt16(this.cbRawLen);
            marshaler.WriteUInt16(this.crSrlLen);
            marshaler.WriteUInt16(this.crRawLen);

            if (this.ySrlData != null)
                marshaler.WriteBytes(this.ySrlData);
            if (this.yRawData != null)
                marshaler.WriteBytes(this.yRawData);
            if (this.cbSrlData != null)
                marshaler.WriteBytes(this.cbSrlData);
            if (this.cbRawData != null)
                marshaler.WriteBytes(this.cbRawData);
            if (this.crSrlData != null)
                marshaler.WriteBytes(this.crSrlData);
            if (this.crRawData != null)
                marshaler.WriteBytes(this.crRawData);
        }
コード例 #20
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     base.Encode(marshaler);
     marshaler.WriteUInt32((uint)this.capsSet.version);
     marshaler.WriteUInt32(this.capsSet.capsDataLength);
     for (int i = 0; i < this.capsSet.capsDataLength; i++)
     {
         marshaler.WriteByte(this.capsSet.capsData[i]);
     }
 }
        /// <summary>
        /// Encode this PDU to the PduMarshaler.
        /// </summary>
        /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
        public override void Encode(PduMarshaler marshaler)
        {
            base.Encode(marshaler);

            marshaler.WriteByte(this.tileSize);
            marshaler.WriteUInt16(this.numRects);
            marshaler.WriteByte(this.numQuant);
            marshaler.WriteByte(this.numProgQuant);
            marshaler.WriteByte(this.flags);
            marshaler.WriteUInt16(this.numTiles);
            marshaler.WriteUInt32(this.tileDataSize);

            // Encode rects, in normal case, it can't be NULL
            if (rects != null)
            {
                for (int i = 0; i < rects.Count(); i++)
                {
                    byte[] arr = Convert2Bytes(rects[i]);
                    marshaler.WriteBytes(arr);
                }
            }

            // Encode quantVals, in normal case, it can't be NULL
            if (quantVals != null)
            {
                for (int i = 0; i < quantVals.Count(); i++)
                {
                    byte[] arr = Convert2Bytes(quantVals[i]);
                    marshaler.WriteBytes(arr);
                }
            }

            if (quantProgVals != null)   // progressive encoding enabled
            {
                for (int i = 0; i < quantProgVals.Count(); i++)
                {
                    byte[] arr;
                    marshaler.WriteByte(quantProgVals[i].quality);

                    arr = Convert2Bytes(quantProgVals[i].yQuantValues);
                    marshaler.WriteBytes(arr);

                    arr = Convert2Bytes(quantProgVals[i].cbQuantValues);
                    marshaler.WriteBytes(arr);

                    arr = Convert2Bytes(quantProgVals[i].crQuantValues);
                    marshaler.WriteBytes(arr);
                }
            }
        }
コード例 #22
0
 /// <summary>
 /// Decode this PDU from the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     base.Encode(marshaler);
     marshaler.WriteUInt16(this.surfaceId);
     marshaler.WriteUInt16(this.width);
     marshaler.WriteUInt16(this.height);
     marshaler.WriteByte((byte)this.pixFormat);
 }
コード例 #23
0
        /// <summary>
        /// Encode this PDU to the PduMarshaler.
        /// </summary>
        /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
        public override void Encode(PduMarshaler marshaler)
        {
            marshaler.WriteUInt16(length);
            marshaler.WriteByte(interfaceNumber);
            marshaler.WriteByte(alternateSetting);
            marshaler.WriteByte(class_field);
            marshaler.WriteByte(subClass);
            marshaler.WriteByte(protocol);
            marshaler.WriteByte(padding);
            marshaler.WriteUInt32(interfaceHandle);
            marshaler.WriteUInt32(numberOfPipes);

            if (null != pipes)
            {
                for (int i = 0; i < pipes.Length; i++)
                {
                    pipes[i].Encode(marshaler);
                }
            }
        }
コード例 #24
0
 public override void Encode(PduMarshaler marshaler)
 {
     base.Encode(marshaler);
     marshaler.WriteByte(contactId);
 }
コード例 #25
0
        /// <summary>
        /// Encode this PDU to the PduMarshaler.
        /// </summary>
        /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
        public override void Encode(PduMarshaler marshaler)
        {
            marshaler.WriteUInt16(len);
            marshaler.WriteUInt16(numberOfPipesExpected);
            marshaler.WriteByte(interfaceNumber);
            marshaler.WriteByte(alternateSetting);
            marshaler.WriteUInt16(padding);
            marshaler.WriteUInt32(numberOfPipes);

            for (int i = 0; i < informations.Length; i++)
            {
                informations[i].Encode(marshaler);
            }
        }
コード例 #26
0
 public override void Encode(PduMarshaler marshaler)
 {
     base.Encode(marshaler);
     encodeTime.Encode(marshaler);
     frameCount.Encode(marshaler);
     foreach (RDPINPUT_TOUCH_FRAME f in frames)
     {
         f.contactCount.Encode(marshaler);
         f.frameOffset.Encode(marshaler);
         foreach (RDPINPUT_CONTACT_DATA d in f.contacts)
         {
             marshaler.WriteByte(d.contactId);
             d.fieldsPresent.Encode(marshaler);
             d.x.Encode(marshaler);
             d.y.Encode(marshaler);
             d.contactFlags.Encode(marshaler);
             ushort fieldPresent = d.fieldsPresent.ToUShort();
             if ((ushort)(fieldPresent & (ushort)(RDPINPUT_CONTACT_DATA_FieldsPresent.CONTACT_DATA_CONTACTRECT_PRESENT)) == (ushort)RDPINPUT_CONTACT_DATA_FieldsPresent.CONTACT_DATA_CONTACTRECT_PRESENT)
             {
                 d.contactRectLeft.Encode(marshaler);
                 d.contactRectTop.Encode(marshaler);
                 d.contactRectRight.Encode(marshaler);
                 d.contactRectBottom.Encode(marshaler);
             }
             if ((ushort)(fieldPresent & (ushort)(RDPINPUT_CONTACT_DATA_FieldsPresent.CONTACT_DATA_ORIENTATION_PRESENT)) == (ushort)RDPINPUT_CONTACT_DATA_FieldsPresent.CONTACT_DATA_ORIENTATION_PRESENT)
             {
                 d.orientation.Encode(marshaler);
             }
             if ((ushort)(fieldPresent & (ushort)(RDPINPUT_CONTACT_DATA_FieldsPresent.CONTACT_DATA_PRESSURE_PRESENT)) == (ushort)RDPINPUT_CONTACT_DATA_FieldsPresent.CONTACT_DATA_PRESSURE_PRESENT)
             {
                 d.pressure.Encode(marshaler);
             }
         }
     }
 }
コード例 #27
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteUInt32(this.Header.cbSize);
     marshaler.WriteUInt32((uint)this.Header.PacketType);
     marshaler.WriteByte(this.PresentatioinId);
     marshaler.WriteByte((byte)this.Version);
     marshaler.WriteByte((byte)this.Command);
     marshaler.WriteByte(this.FrameRate);
     marshaler.WriteUInt16(this.AverageBitrateKbps);
     marshaler.WriteUInt16(this.Reserved);
     marshaler.WriteUInt32(this.SourceWidth);
     marshaler.WriteUInt32(this.SourceHeight);
     marshaler.WriteUInt32(this.ScaledWidth);
     marshaler.WriteUInt32(this.ScaledHeight);
     marshaler.WriteUInt64(this.hnsTimestampOffset);
     marshaler.WriteUInt64(this.GeometryMappingId);
     marshaler.WriteBytes(this.VideoSubtypeId, 0, 16);
     marshaler.WriteUInt32(this.cbExtra);
     if (this.pExtraData != null)
     {
         marshaler.WriteBytes(this.pExtraData);
     }
     marshaler.WriteByte(this.Reserved2);
 }
コード例 #28
0
 public void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteByte((byte)((int)c << 7 | val1));
     if (c == TWO_BYTE_C_Values.TWO_BYTE_VAL)
     {
         marshaler.WriteByte((byte)val2);
     }
 }
コード例 #29
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteUInt32(this.Header.cbSize);
     marshaler.WriteUInt32((uint)this.Header.PacketType);
     marshaler.WriteByte(this.PresentatioinId);
     marshaler.WriteByte((byte)this.Version);
     marshaler.WriteByte((byte)this.Flags);
     marshaler.WriteByte(this.Reserved);
     marshaler.WriteUInt64(this.HnsTimestamp);
     marshaler.WriteUInt64(this.HnsDuration);
     marshaler.WriteUInt16(this.CurrentPacketIndex);
     marshaler.WriteUInt16(this.PacketsInSample);
     marshaler.WriteUInt32(this.SampleNumber);
     marshaler.WriteUInt32(this.cbSample);
     if (this.pSample != null)
     {
         marshaler.WriteBytes(this.pSample);
     }
     marshaler.WriteByte(this.Reserved2);
 }
コード例 #30
0
 /// <summary>
 /// Encode this PDU to the PduMarshaler.
 /// </summary>
 /// <param name="marshaler">This is used to encode the fields of this PDU.</param>
 public override void Encode(PduMarshaler marshaler)
 {
     marshaler.WriteByte(bLength);
     marshaler.WriteByte((byte)bDescriptorType);
 }