2.2.1.6 TSMM_VIDEO_DATA Structure

This message contains a potentially fragmented video sample. If the VideoSubtypeId of the TSMM_PRESENTATION_REQUEST (section 2.2.1.2) message is set to MFVideoFormat_H264 ({34363248-0000-0010-8000-00AA00389B71}), then the sample (before fragmentation and encoding) is derived from RGB data that has been converted to the YUV color space by using the method outlined in [ITU-BT601-7] section 2.5.4 and annex 2.1.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Header

...

A

Version

Flags

Reserved

hnsTimestamp

...

hnsDuration

...

CurrentPacketIndex

PacketsInSample

SampleNumber

cbSample

pSample (variable)

...

...

Header (8 bytes): TSMM_VIDEO_PACKET_HEADER defined in section 2.2.1.1.

A - PresentationId (1 byte): UINT8 ([MS-DTYP] section 2.2.47). This is the same number as the PresentationId field in the TSMM_PRESENTATION_REQUEST message.

Version (1 byte): UINT8. This is the same number as the Version field in the TSMM_PRESENTATION_REQUEST message.

Flags (1 byte): UINT8. The bits of this integer indicate attributes of this message. The following table defines the meaning of each bit.

Bit

Symbolic name

Meaning

0x01

TSMM_VIDEO_DATA_FLAG_HAS_TIMESTAMPS

Indicates that this message has a valid hnsTimestamp field.

0x02

TSMM_VIDEO_DATA_FLAG_KEYFRAME

Indicates that the sample contained in this message is part of a keyframe.

0x04

TSMM_VIDEO_DATA_FLAG_NEW_FRAMERATE

Indicates the first sample after receiving TSMM_CLIENT_NOTIFICATION_FRAMERATE_OVERRIDE.

Reserved (1 byte): UINT8. This field is reserved and MUST be ignored.

hnsTimestamp (8 bytes): UINT64 ([MS-DTYP] section 2.2.50). Timestamp of the current packet, in 100-ns intervals since the video presentation was started. This timestamp SHOULD be used to sync the video stream with an audio stream remoted using the Remote Desktop Protocol: Audio Output Virtual Channel Extension (see the dwAudioTimeStamp field in [MS-RDPEA] section 2.2.3.10).

hnsDuration (8 bytes): UINT64. Duration of the current packet, in 100-ns intervals.  This is the length of time between the last sample and the current sample.

CurrentPacketIndex (2 bytes): UINT16 ([MS-DTYP] section 2.2.48). Each sample (logically one contiguous frame) is divided into packets for network transmission as atomic units.  This field contains the index of the current packet within the larger sample.  This field is indexed starting with 1 and increases until it is equal to the value in the PacketsInSample field.

PacketsInSample (2 bytes): UINT16. This field contains the number of packets that make up the current sample.

SampleNumber (4 bytes): UINT32 ([MS-DTYP] section 2.2.49). This field contains the current sample number. The first sample will have this field set to 1.

cbSample (4 bytes): UINT32. Length (in bytes) of the pSample field.

pSample (variable): Array of UINT8. Encoded sample data. The total number of bytes in this field is set in the cbSample field.