3.2.5.8.1 Sending Data Packets Containing an ASF File Header

The server MUST encapsulate the ASF file header specified in section 2.2.2 in one or more Data (section 2.2.2) packets.

The value of the playIncarnation field in the Data packet MUST be set to the 8 least-significant bits of the value of the Incarnation variable in the abstract data model.

The size of the Payload field of any Data packet MUST NOT be larger than the maximum ASF data packet size. The maximum ASF data packet size is the value of the cbPacketSize field in the most recently sent LinkMacToViewerReportStreamChange message or, if no such message has been sent, the value of the filePacketSize field in the LinkMacToViewerReportOpenFile message that was sent by the server.

If the value of the Client-Port variable is not 0x0000, the server MUST then send the Data packets that contain the ASF file header to the client, using UDP, to the UDP port specified by the Client-Port variable. Otherwise, the Data packets MUST be sent to the client over the existing TCP connection.

If multiple Data packets are required to send the complete ASF file header to the client, the transmission of the Data packets MUST be paced by the server. Pacing means that the server transmits the packets as quickly as possible, but the bit rate used when transmitting the Data packets MUST NOT exceed the average content bit rate. The average content bit rate is the value of the dwBitRate field in the most recently sent LinkMacToViewerReportStreamChange message or, if no such message has been sent, the value of the fileBitRate field in the LinkMacToViewerReportOpenFile message that was sent by the server.

While sending the Data packets, the server MUST be prepared to receive a LinkViewerToMacCancelReadBlock message from the client. How to process this message is specified in section 3.2.5.9.

After sending the last Data packet containing the ASF file header, if the value of the State variable is INIT, then the State variable MUST be set to READY, and the server MUST wait for a LinkViewerToMacCancelReadBlock message, a LinkViewerToMacStreamSwitch message, a LinkViewerToMacStartPlaying message, a LinkViewerToMacStartStriding message, or a LinkViewerToMacCloseFile message to be received from the client.

How to process a LinkViewerToMacCancelReadBlock message is specified in section 3.2.5.9.

How to process a LinkViewerToMacStreamSwitch message is specified in section 3.2.5.10.

How to process a LinkViewerToMacStartPlaying message is specified in section 3.2.5.11.

How to process a LinkViewerToMacStartStriding message is specified in section 3.2.5.12.

How to process a LinkViewerToMacCloseFile message is specified in section 3.2.5.17.