3.2.7.7.4 MaxBytes, Time and ByteRate Calculations

If the value of the Profile_LastPresTime variable is greater than the value of the Profile_FirstPresTime variable, then the server MUST subtract the value of the Profile_FirstPresTime variable from the value of the Profile_LastPresTime variable, and multiply the resulting value by the value of the Profile_ChosenRate variable. The value that resulted from the multiplication, divided by 1,000, is referred to as the Streamed Byte Count.

If the value of the Profile_LastPresTime variable is less than or equal to the value of the Profile_FirstPresTime variable, then the Streamed Byte Count is 0.

For each element in the Profile_MaxBytes array, the server MUST perform the following: Multiply the Streamed Byte Count by a constant. For the first element in the Profile_MaxBytes array, the value of the constant is 10. For the second element, the value of the constant is 12. For the third element, the value of the constant is 15. For the fourth element, the value of the constant is 20. For the fifth element, the value of the constant is 30. The result of the multiplication MUST be divided by 10. The result of the division MUST be subtracted from the value of the Profile_BytesNeeded variable. The result of the subtraction MUST be treated as a signed integer, as specified in [MS-DTYP] section 2.2.19; if the signed integer is greater than the value of the current element in the Profile_MaxBytes array, then the current element in the Profile_MaxBytes array MUST be set to the value of the signed integer, and the corresponding elements in the Profile_Time and Profile_ByteRate arrays MUST also be updated as follows:

  • The element in the Profile_Time array MUST be set to the value of the Profile_LastPresTime variable minus the value of the Profile_FirstPresTime variable.

  • The element in the Profile_ByteRate array MUST be set to the value of the Profile_ChosenRate variable.

For example, if the signed integer is greater than the value of the third element in the Profile_MaxBytes array, then the third element in the Profile_MaxBytes, Profile_Time, and Profile_ByteRate arrays are all modified.