2.2.8 TS_MM_DATA_SAMPLE Structure

This structure describes a media sample.


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

SampleStartTime

...

SampleEndTime

...

ThrottleDuration

...

SampleFlags

SampleExtensions

cbData

pData (variable)

...

SampleStartTime (8 bytes): A 64-bit signed integer that indicates the start time for the sample, in 100 nanosecond units.

SampleEndTime (8 bytes): A 64-bit signed integer that indicates the end time for the sample, in 100 nanosecond units.

ThrottleDuration (8 bytes): A 64-bit unsigned integer that indicates the duration for the sample used by the server to keep a certain amount of data buffered on the client. If valid sample timestamps are available, this duration SHOULD be calculated by taking into account the sample start and end times. If valid sample timestamps are not available, this duration SHOULD be calculated by taking into account the sample size and format. If sample size and format are insufficient for such calculations, a default value for duration MAY <5> be used. The server is free to use any units for the ThrottleDuration field.

SampleFlags (4 bytes): A 32-bit unsigned integer. This field is reserved and MUST be ignored on receipt.

SampleExtensions (4 bytes): A 32-bit unsigned integer. The bits of this integer indicate attributes of the sample. The following table defines the meaning of each bit.

 Bit

 Symbolic name

 Meaning

0

TSMM_SAMPLE_EXT_CLEANPOINT

Indicates whether a video sample is a key frame.

If the attribute is 1, the sample is a key frame and decoding SHOULD begin from this sample. Otherwise, the sample is not a key frame.

1

TSMM_SAMPLE_EXT_DISCONTINUITY

Specifies whether a media sample is the first sample after a gap in the stream.

If this attribute is 1, there was a discontinuity in the sample and this sample is the first to appear after the gap.

2

TSMM_SAMPLE_EXT_INTERLACED

Indicates whether a video frame is interlaced or progressive. If this attribute is 1, the frame is interlaced. If this attribute is 0, the media type describes the interlacing.

3

TSMM_SAMPLE_EXT_BOTTOMFIELDFIRST

Specifies the field dominance for an interlaced video frame.

If the video frame is interlaced and the sample contains two interleaved fields, this attribute indicates which field is displayed first. If this attribute is 1, the bottom field is displayed first in time. If the frame is interlaced and the sample contains a single field, this attribute indicates which field the sample contains. Also, if this attribute is 1, the sample contains the bottom field.

If the frame is progressive, this attribute describes how the fields SHOULD be ordered when the output is interlaced. If this attribute is 1, the bottom field SHOULD be output first.If this attribute is not set, the media type describes the field dominance.

4

TSMM_SAMPLE_EXT_REPEATFIELDFIRST

Specifies whether to repeat the first field in an interlaced frame. If this attribute is set to 1, the first field is repeated.

5

TSMM_SAMPLE_EXT_SINGLEFIELD

Specifies whether a video sample contains a single field or two interleaved fields. If this attribute is set to 1, the sample contains one field.

6

TSMM_SAMPLE_EXT_DERIVEDFROMTOPFIELD

Specifies whether a de-interlaced video frame was derived from the upper field or the lower field. If this attribute is set to 1, the lower field was interpolated from the upper field.

7

TSMM_SAMPLE_EXT_HAS_NO_TIMESTAMPS

Indicates whether the sample has a time stamp. If the value is 1, no time stamp is set in the sample.

8

TSMM_SAMPLE_EXT_RELATIVE_TIMESTAMPS

Indicates whether the sample has a relative time stamp. If the value is 1, the time stamp set in the sample is a value that is relative to the time when the presentation started running. The time stamps are reset to 0 when the presentation is sought.

9

TSMM_SAMPLE_EXT_ABSOLUTE_TIMESTAMPS

Indicates whether the sample has an absolute time stamp. If the value is 1, the time stamp set in the sample is the absolute value returned by the reference clock.

cbData (4 bytes): A 32-bit unsigned integer. This field MUST contain the number of bytes in the pData field.

pData (variable): Sample data that is sent as an array of bytes. The data is encoded in the stream format.