wallclock Value

匿名 (未验证), 29 一月, 2010

The wallclock value can be used in the begin and end attributes to start and stop media according to a real-time clock. For example, you could set a media element on a broadcast publishing point to start streaming at 6:00 A.M. on July 1, 2005 and stop streaming at 11:00 A.M. on July 3, 2005.

  • Note   Except for Windows Server 2003, Web Edition, this value is available only on the x64-based versions of Windows Server 2003 and on the 32-bit versions of Windows Server 2003 with Service Pack 1. It is also available on Windows Server 2008.

Syntax

wallclock-sync-value ::= "wallclock(" S? (DateTime | WallTime | Date) S? ")" DateTime ::= Date "T" WallTime Date ::= Years "-" Months "-" Days WallTime ::= (HHMM-Time | HHMMSS-Time)(TZD)? HHMM-Time ::= Hours24 ":" Minutes HHMMSS-Time ::= Hours24 ":" Minutes ":" Seconds ("." Fraction)? Years ::= 4DIGIT; Months ::= 2DIGIT; range from 01 to 12 Days ::= 2DIGIT; range from 01 to 31 Hours24 ::= 2DIGIT; range from 00 to 23 4DIGIT ::= DIGIT DIGIT DIGIT DIGIT TZD ::= "Z" | (("+" | "-") Hours24 ":" Minutes ) 

Remarks

The "S?" value indicates that white space is optional preceding and following the DateTime value.

The "T" character is a literal character and must be used when specifying both a date and a time.

The WallTime value can be given either in local time, or in local time with a Coordinated Universal Time (UTC) time zone offset.

The following table shows syntax examples for the wallclock value.

 

Example Description 08:30 The media will start or stop streaming at 8:30 A.M. local time on the current date. 08:30-00:00 The media will start or stop streaming at 8:30 A.M. UTC on the current date. 2005-12-01T08:30:45 The media will start or stop streaming on December 1, 2005 at 8:30:45 A.M., local time. 2005-12-01T00:00-00:00 The media will start or stop streaming on December 1, 2005 at midnight, UTC. 2005-12-01T08:30-08:00 The media will start or stop streaming on December 1, 2005 at 8:30 A.M., Pacific Standard Time.


 

The following example is a playlist that contains two media elements with wallclock values in their beginattributes. The first wallclock value denotes that on July 28, 2005 at 3:30 P.M. Pacific Standard Time, the first media element will start streaming. At 3:59 P.M. local time, the second media element will begin streaming, and it will end at 4:30 P.M. local time.

<smil> <excl> <priorityClass peers="Pause"> <media id="Prog1" src="Prog1.wmv" begin="wallclock( 2005-07-28T15:30-08:00 )"/> <media id="News" src="http://WMEncoder02:8070" begin="wallclock( 15:59:50 )" end="wallclock( 16:30:00 )" /> <media id="Promo1" src="ad04.wmv" begin="News.end" /> <media id="EPG" src="http://EncEPG:8090" begin="0"/> </priorityClass> </excl> </smil> 

The wallclock value is set when the playlist is loaded into memory. For broadcast publishing points, this happens when the publishing point is started, and for on-demand publishing points, this happens when a user begins streaming the playlist. Any dynamic changes to the playlist, either programmatically or through the Windows Media Playlist Editor in the Windows Media Services UI, will be ignored until the playlist is loaded into memory again.

Because an empty publishing point cannot start, the playlist must contain at least one element that is always active (such as a looping JPEG). Media elements with wallclock values will interrupt these default elements and begin playing.

  • Note   If a playlist has remained in memory for over a day, and the wallclock value does not have a Date value assigned to it, the playlist must be loaded into memory again before that wallclock value is acknowledged. For example, if a broadcast publishing point references a playlist with a media element set to start streaming at 12:30 P.M., the publishing point must be restarted before 12:30 P.M. the following day to honor that wallclock value again.

Also, the wallclock value does not honor Daylight Saving Time (DST). If you are streaming media from a time zone that honors DST, you should use a UTC time zone offset when specifying your time values.

评论