3.2.7.7 Computing Values for the X-StartupProfile Header
This local event occurs when the server has received a Play request and intends to include the X-StartupProfile (section 2.2.6.28) header in the response.
The input parameter to this event is the value of the AccelDuration parameter on the X-Accelerate-Streaming header that is sent by the server. If the value of the input parameter is zero, it is not possible to compute values for the X-StartupProfile header, and the processing of this local event terminates unsuccessfully.
The values of the Profile_ByteRate, Profile_BytesNeeded, Profile_ChosenRate, Profile_FirstPresTime, Profile_FirstSendTime, Profile_LastPresTime, Profile_LastSendTime, Profile_MaxBytes, Profile_MaxDiffSndTime, Profile_PlaybackRate, Profile_Time, and Profile_TimeForMaxDiffSndTime variables in the Abstract Data Model MUST be set to their initial values.
The server MUST compute the sum of the average bit rates of each stream listed in the Selected-Streams variable in the Abstract Data Model. The server MUST set the value of the Profile_PlaybackRate variable to this sum divided by 8.
The server MUST inspect the ASF packets that will be sent to the client. The higher layer provides the ASF packets that will be inspected. The ASF packets MUST be inspected in the same sequence as they appear in the content, starting with the first ASF packet that is due to be transmitted to the client in response to the Play request. For each ASF packet that is inspected, the server MUST inspect each ASF payload ([ASF] section 5.2) that contains a complete media object or the beginning of a media object by using the processing rules in section 3.2.7.7.1. (In other words, for the ASF payload to be inspected, the Offset Into Media Object field defined in [ASF] section 5.2.3.1 MUST be 0 or not present.) The server MUST continue inspecting ASF packets and the applicable ASF payloads contained in the ASF packets, until the processing rules in section 3.2.7.7.1 indicate that no more ASF payloads can be inspected.
When no more ASF payloads can be inspected, if the value of the Profile_FirstPresTime variable in the Abstract Data Model is 18,446,744,073,709,551,615, then it is not possible to compute values for the X-StartupProfile header, and the processing of this local event terminates unsuccessfully.
The XSP-Rate parameter ([MS-WMSP] section 2.2.1.12.1) of the X-StartupProfile header SHOULD contain five rate-value parameters, and the values of the rate-value parameters SHOULD be 10, 12, 15, 20, and 30.
The XSP-MaxBytes parameter ([MS-WMSP] section 2.2.1.12.2) of the X-StartupProfile header SHOULD contain five maxbyte-value parameters, and the values of the maxbyte-value parameters SHOULD be set to values of the Profile_MaxBytes array's elements. The assignment SHOULD be done such that the value of the first maxbyte-value parameter is equal to the value of the first element in the Profile_MaxBytes array, and the second maxbyte-value parameter is equal to the value of the second element in the Profile_MaxBytes array.
The XSP-Time parameter ([MS-WMSP] section 2.2.1.12.3) of the X-StartupProfile header SHOULD contain five time-value parameters, and the values of the time-value parameters SHOULD be set to the values of the elements of the Profile_Time array. The assignment SHOULD be done such that the value of the first time-value parameter is equal to the value of the first element in the Profile_Time array, and the second time-value parameter is equal to the value of the second element in the Profile_Time array.
The XSP-STime parameter ([MS-WMSP] section 2.2.1.12.4) of the X-StartupProfile header SHOULD be set to the value of the Profile_FirstPresTime variable in the Abstract Data Model.
If the value of the Profile_LastPresTime variable is greater than the value of the Profile_FirstPresTime variable, then the value of the XSP-LTime parameter ([MS-WMSP] section 2.2.1.12.5) of the X-StartupProfile header SHOULD be set to the value obtained by subtracting the value of Profile_FirstPresTime from the value of Profile_LastPresTime.
If the value of the Profile_LastPresTime variable is less than or equal to the value of the Profile_FirstPresTime variable, then the value of the XSP-LTime parameter of the X-StartupProfile header SHOULD be set to 0.
If the value of the Profile_TimeForMaxDiffSndTime variable is greater than the value of the Profile_FirstPresTime variable, then the value of the XSP-MaxDTime parameter ([MS-WMSP] section 2.2.1.12.6) of the X-StartupProfile header SHOULD be set to the value obtained by subtracting the value of Profile_FirstPresTime from the value of Profile_TimeForMaxDiffSndTime.
If the value of the Profile_TimeForMaxDiffSndTime variable is less than or equal to the value of the Profile_FirstPresTime variable, then the value of the XSP-MaxDTime parameter of the X-StartupProfile header SHOULD be set to 0.
The XSP-MaxDSTime parameter ([MS-WMSP] section 2.2.1.12.7) of the X-StartupProfile header SHOULD be set to the value of the Profile_MaxDiffSndTime variable in the Abstract Data Model.
The XSP-ByteRate parameter ([MS-WMSP] section 2.2.1.12.8) of the X-StartupProfile header SHOULD contain five byterate-val parameters, and the values of the byterate-val parameters SHOULD be set to the values of the elements of the Profile_ByteRate array. The assignment SHOULD be done such that the value of the first byterate-val parameter is equal to the value of the first element in the Profile_ByteRate array, and the value of the second byterate-val parameter is equal to the value of the second element in the Profile_ByteRate array.