Class representing media information and payload data up to one network MTU in length from a MediaPacket. MediaHeaderPackets are used to transfer a portion of payload data and the media information from a MediaPacket. The combination of a MediaHeaderPacket and the subsequent MediaContinuationPackets is a transfer sequence.
More...
|
| MediaHeaderPacket () |
| Initializes a new MediaHeaderPacket instance with no parameters. More...
|
|
| MediaHeaderPacket (byte[] guid, Int16 mediaTypeIdentifier, Int16 mediaTransferCompressioIdentifier, Int32 packetCount, Int32 totalPayloadDataLength, Int32 originatingDataLength, byte[] payload, Int64 sequenceNumber) |
| Initializes a new MediaHeaderPacket instance that has the specified source Guid, media type identified, media transfer compression identified, packet count, total payload data length, originating data length, sequence number and payload data More...
|
|
| MediaHeaderPacket (byte[] guid, Int16 mediaTypeIdentifier, Int16 mediaTransferCompressioIdentifier, Int32 packetCount, Int32 totalPayloadDataLength, Int32 originatingDataLength, byte[] payload) |
| Initializes a new MediaHeaderPacket instance that has the specified source Guid, media type identified, media transfer compression identified, packet count, total payload data length, originating data length and payload data More...
|
|
byte[] | GetBytes (long sequenceNumber) |
|
void | FromBytes (byte[] packetBytes) |
| Sets the state of this packet from the provided array of bytes. If the array does not containt a valid byte representation of this type of packet, throws an ArgumentException. More...
|
|
byte[] | GetBytes () |
| Converts this packet to a byte array for network transfer. The sequence number specified in the packet will be used. More...
|
|
byte[] | GetBytes (Int64 sequence) |
| Converts this packet to a byte array for network transfer. The specified seqeuence number will be used in the packet header. More...
|
|
Class representing media information and payload data up to one network MTU in length from a MediaPacket. MediaHeaderPackets are used to transfer a portion of payload data and the media information from a MediaPacket. The combination of a MediaHeaderPacket and the subsequent MediaContinuationPackets is a transfer sequence.
<author>Veli-Mikko Puupponen</author> This packet consist of a packet type identifier, sender GUID, a Int64 sequence number, media type identifier, media compression identified, payload data length and originating data length.
This packet must always have payload data. If the payload data length is smaller than network MTU, there transfer sequence can consist of only a single MediaHeaderPacket.
MediaHeaderPacket |
( |
byte[] |
guid, |
|
|
Int16 |
mediaTypeIdentifier, |
|
|
Int16 |
mediaTransferCompressioIdentifier, |
|
|
Int32 |
packetCount, |
|
|
Int32 |
totalPayloadDataLength, |
|
|
Int32 |
originatingDataLength, |
|
|
byte[] |
payload |
|
) |
| |
Initializes a new MediaHeaderPacket instance that has the specified source Guid, media type identified, media transfer compression identified, packet count, total payload data length, originating data length and payload data
The sequence number must be provided prior any calls to the parameterless GetBytes.
- Parameters
-
guid | String representation of the sender's Guid |
mediaTypeIdentifier | Payload media type |
mediaTransferCompressioIdentifier | Payload media transfer compression type |
packetCount | Total count of packets in the related trasfer sequence |
totalPayloadDataLength | Total number of payload octets in the complete related trasfer sequence |
originatingDataLength | Original length of the data before encoding into the transfer format |
payload | Payload data in this packet |