Export (0) Print
Expand All

4.8 Streaming and Stopping Playback by Using Pipelined Mode

The sequence described in this topic occurs between a client and server while streaming a file, pausing playback, and then resuming playback using the pipelined mode of the protocol.

  1. The client sends a Describe request to retrieve the ASF header.

  2. The server responds with a $H (Header) packet.

  3. The client sends a Play request for the file, selecting one or more streams.

  4. The server responds with a $H (Header) packet and $D (Data) packets. HTTP 1.1 Chunked Transfer Coding is used by the server to transmit the packets because the number and size of the $D (Data) packets are not necessarily known at the time of the Play response.

  5. The client stops streaming by sending the xStopStrm token on a Pragma header in a Stop request to the server.

  6. If a Stop request is received, the server acknowledges this request.

  7. The client sends a Log request to the server.

  8. The server responds with a confirmation that it received the log.

  9. The client sends a Play request for the same file, specifying the point or offset from which to resume playback. If an offset is not specified, the client resumes playback from the beginning of the file.

  10. The server responds with a $H (Header) packet and $D (Data) packets.

  11. After all data packets have been sent to the client, the server sends a $E (End-of-Stream Notification) packet to indicate that the end of the media file has been reached.

  12. The client sends a Log request to the server.

  13. The server responds with a confirmation that it received the log.

Pause is implemented as a Stop request immediately followed by a Play request. After the client has stopped playback, it can choose to resume playing by sending another Play request as described in step 3. In the GET request, the client can specify the point or offset from which to resume playback using the stream-offset token on a Pragma header. The client can use packet-num, stream-time, or the stream-offset tokens on Pragma headers to specify the offset. These headers are used to seek to a specific point within the ASF file that the client was streaming. If the offset is not provided, then the client resumes playback from the beginning of the file. The server responds to the Play request as described in step 4.

The following figure shows the previously described sequence.

2b275c7a-d702-4c75-8ab1-c396e0d7a4b1

Figure 11: Stream, stop, and resume packet sequencing

To prevent an idle connection from being disconnected, the client sends periodic KeepAlive requests to the server.

 
Show:
© 2014 Microsoft