4.1.2 Presentation Initialization and Termination Sequence
The following annotation shows the New Presentation message sent from the server to the client. This message is sent after a channel has been set up. In this example, the PlatformCookie field is set to TSMM_PLATFORM_COOKIE_DSHOW to indicate that the server prefers to use the DShow platform for playback.
-
New Presentation ChannelName = TSMF,32,server to client 00000000 00 00 00 40 00 00 00 00 05 01 00 00 9f 04 86 e0...@........9:.. 00000010 26 d9 ae 45 8c 0f 3e 05 6a f3 f7 d4 02 00 00 00 ..UF...P>.x\.... 00 00 00 40 -> Interface Id = 0x00000000 | mask STREAM_ID_PROXY (0x40000000) 00 00 00 00 -> Message Id = 0x00000000 05 01 00 00 -> ON_NEW_PRESENTATION = 0x105 9f 04 86 e0 -> PresentationId (GUID) = {e086049f-d926-45ae-8c0f-3e056af3f7d4} 26 d9 ae 45 8c 0f 3e 05 6a f3 f7 d4 02 00 00 00 -> PlatformCookie = TSMM_PLATFORM_COOKIE_DSHOW = 0x02
The following annotation shows the Check Format Support Request message sent from the server to the client. In this example, the PlatformCookie field is set to TSMM_PLATFORM_COOKIE_MF to indicate that the server prefers to use the MF platform for playback. The NoRolloverFlags field is set to 0x01 to indicate that the client only uses the preferred platform for checking format support. The format to be checked is specified in other fields of the message.
-
Check Format Support Request ChannelName = TSMF,124,server to client 00000000 00 00 00 40 00 00 00 00 08 01 00 00 01 00 00 00 ...@............ 00000010 01 00 00 00 64 00 00 00 61 75 64 73 00 00 10 00 ....d...auds.... 00000020 80 00 00 aa 00 38 9b 71 62 01 00 00 00 00 10 00 .....8.qb....... 00000030 80 00 00 aa 00 38 9b 71 00 00 00 00 01 00 00 00 .....8.q........ 00000040 00 00 00 00 81 9f 58 05 56 c3 ce 11 bf 01 00 aa ......X.V....... 00000050 00 55 59 5a 24 00 00 00 62 01 02 00 00 77 01 00 .UYZ$...b....w.. 00000060 c0 5d 00 00 00 10 18 00 12 00 18 00 03 00 00 00 .].............. 00000070 00 00 00 00 00 00 00 00 e0 00 00 00 ............ 00 00 00 40 -> Interface Id = 0x00000000 | mask STREAM_ID_PROXY (0x40000000) 00 00 00 00 -> Message Id = 0x00000000 08 01 00 00 -> CHECK_FORMAT_SUPPORT_REQ = 0x108 01 00 00 00 -> PlatformCookie = TSMM_PLATFORM_COOKIE_MF (0x01) 01 00 00 00 -> NoRolloverFlags = 0x01 64 00 00 00 -> numMediaType = 0x64 61 75 64 73 -> MajorType (GUID) of the first TS_AM_MEDIA_TYPE structure = MEDIATYPE_Audio = {73647561-0000-0010-8000-00aa00389b71} 00 00 10 00 80 00 00 aa 00 38 9b 71 62 01 00 00 -> SubType (GUID) of the first TS_AM_MEDIA_TYPE structure = WMMEDIASUBTYPE_WMAudioV9 = {00000162-0000-0010-8000-00aa00389b71} 00 00 10 00 80 00 00 aa 00 38 9b 71 00 00 00 00 -> bFixedSizeSamples = 0x00 01 00 00 00 -> bTemporalCompression = 0x01 00 00 00 00 -> SampleSize = 0x00 81 9f 58 05 -> FormatType(GUID) of the first TS_AM_MEDIA_TYPE structure = FORMAT_WaveFormatEx = {05589f81-c356-11ce-bf01-00aa0055595a} 56 c3 ce 11 bf 01 00 aa 00 55 59 5a 24 00 00 00 -> cbFormat = 0x24 62 01 02 00 -> pbFormat. The structure of the format is WAVEFORMATEX, as indicated by FormatType. 00 77 01 00 c0 5d 00 00 00 10 18 00 12 00 18 00 03 00 00 00 00 00 00 00 00 00 00 00 e0 00 00 00
The following annotation shows the Check Format Support Response message sent from the client to the server. In this example, the FormatSupported field is set to 0x01 to indicate that the format is supported on the client. The PlatformCookie field is set to TSMM_PLATFORM_COOKIE_MF to indicate that the client is using the MF platform to play data for this format.
-
Check Format Support Response ChannelName = TSMF,20,server to client 00000000 00 00 00 80 00 00 00 00 01 00 00 00 01 00 00 00 ................ 00000010 00 00 00 00 00 00 00 80 -> Interface Id = 0x00000000 | mask STREAM_ID_STUB (0x80000000) 00 00 00 00 -> Message Id = 0x00000000 01 00 00 00 -> FormatSupported = 0x01 01 00 00 00 -> PlatformCookie = TSMM_PLATFORM_COOKIE_MF = 0x01 00 00 00 00 -> Result = S_OK
The following annotation shows the Add Stream message sent from the server to the client. The message specifies a unique StreamId and the format to be used for the media data in this stream.
-
Add Stream ChannelName = TSMF,136,server to client 00000000 00 00 00 40 00 00 00 00 02 01 00 00 d9 f0 eb 82 ...@............ 00000010 cd e8 cd 43 84 09 c4 bc ac d1 ab 47 02 00 00 00 ...C.......G.... 00000020 64 00 00 00 61 75 64 73 00 00 10 00 80 00 00 aa d...auds........ 00000030 00 38 9b 71 62 01 00 00 00 00 10 00 80 00 00 aa .8.qb........... 00000040 00 38 9b 71 00 00 00 00 01 00 00 00 00 00 00 00 .8.q............ 00000050 81 9f 58 05 56 c3 ce 11 bf 01 00 aa 00 55 59 5a ..X.V........UYZ 00000060 24 00 00 00 62 01 02 00 00 77 01 00 c0 5d 00 00 $...b....w...].. 00000070 00 10 18 00 12 00 18 00 03 00 00 00 00 00 00 00 ................ 00000080 00 00 00 00 e0 00 00 00 ........ 00 00 00 40 -> Interface Id = 0x00000000 | mask STREAM_ID_PROXY (0x40000000) 00 00 00 00 -> Message Id = 0x00000000 02 01 00 00 -> ADD_STREAM = 0x102 d9 f0 eb 82 -> PresentationId (GUID) = {82ebf0d9-e8cd-43cd-8409-c4bcacd1ab47} cd e8 cd 43 84 09 c4 bc ac d1 ab 47 02 00 00 00 -> StreamId = 0x02 64 00 00 00 -> numMediaType = 0x64 61 75 64 73 -> MajorType (GUID) of the first TS_AM_MEDIA_TYPE structure = MEDIATYPE_Audio = {73647561-0000-0010-8000-00aa00389b71} 00 00 10 00 80 00 00 aa 00 38 9b 71 62 01 00 00 -> SubType (GUID) of the first TS_AM_MEDIA_TYPE structure = WMMEDIASUBTYPE_WMAudioV9 = {00000162-0000-0010-8000-00aa00389b71} 00 00 10 00 80 00 00 aa 00 38 9b 71 00 00 00 00 -> bFixedSizeSamples = 0x00 01 00 00 00 -> bTemporalCompression = 0x01 00 00 00 00 -> SampleSize = 0x00 81 9f 58 05 -> FormatType(GUID) of the first TS_AM_MEDIA_TYPE structure = FORMAT_WaveFormatEx = {05589f81-c356-11ce-bf01-00aa0055595a} 56 c3 ce 11 bf 01 00 aa 00 55 59 5a 24 00 00 00 -> cbFormat = 0x24 62 01 02 00 -> pbFormat. The structure of the format is WAVEFORMATEX, as indicated by FormatType, for definition of the structure, see MSDN 00 77 01 00 c0 5d 00 00 00 10 18 00 12 00 18 00 03 00 00 00 00 00 00 00 00 00 00 00 e0 00 00 00
The following annotation shows the Set Topology Request message sent from the server to the client.
-
Set Topology Request ChannelName = TSMF,28,server to client 00000000 00 00 00 40 00 00 00 00 07 01 00 00 fc 7d 2e d8 ...@.........}.. 00000010 34 63 d6 49 90 a7 34 7d f0 8a 56 65 4c.I..4}..Ve 00 00 00 40 -> Interface Id = 0x00000000 | mask STREAM_ID_PROXY (0x40000000) 00 00 00 00 -> Message Id = 0x00000000 07 01 00 00 -> SET_TOPOLOGY_REQ = 0x107 fc 7d 2e d8 -> PresentationId (GUID) = {d82e7dfc-6334-49d6-90a7-347df08a5665} 34 63 d6 49 90 a7 34 7d f0 8a 56 65
The following annotation shows the Set Topology Response message sent from the client to the server. In this example, the TopologyReady field of the response is set to 0x01 to indicate that the topology is ready to be played on the client.
-
Set Topology Response ChannelName = TSMF,16,server to client 00000000 00 00 00 80 00 00 00 00 01 00 00 00 00 00 00 00 ................ 00 00 00 80 -> Interface Id = 0x00000000 | mask STREAM_ID_STUB (0x80000000) 00 00 00 00 -> Message Id = 0x00000000 01 00 00 00 -> TopologyReady = 0x01 00 00 00 00 -> Result = S_OK
The following annotation shows the Remove Stream message sent from the server to the client. The StreamId field identifies the stream to be removed.
-
Remove Stream ChannelName = TSMF,32,server to client 00000000 00 00 00 40 00 00 00 00 15 01 00 00 99 ac f1 31 ...@...........1 00000010 0c 83 97 43 92 28 dc ff 1a 45 1d d1 01 00 00 00 ...C.(...E...... 00 00 00 40 -> Interface Id = 0x00000000 | mask STREAM_ID_PROXY (0x40000000) 00 00 00 00 -> Message Id = 0x00000000 15 01 00 00 -> REMOVE_STREAM = 0x115 99 ac f1 31 -> PresentationId (GUID) = {31f1ac99-830c-4397-9228-dcff1a451dd1} 0c 83 97 43 92 28 dc ff 1a 45 1d d1 01 00 00 00 -> StreamId = 0x01
The following annotation shows the Shut Down Presentation Request message sent from the server to the client. The PresentationId field identifies the presentation to be shut down.
-
Shut Down Presentation Request ChannelName = TSMF,28,server to client 00000000 00 00 00 40 00 00 00 00 06 01 00 00 9e f9 48 4e ...@..........HN 00000010 46 7b 8e 4a b7 7a e4 0f b5 9e cc 63 F{.J.z.....c 00 00 00 40 -> Interface Id = 0x00000000 | mask STREAM_ID_PROXY (0x40000000) 00 00 00 00 -> Message Id = 0x00000000 06 01 00 00 -> SHUTDOWN_PRESENTATION = 0x106 9e f9 48 4e -> PresentationId (GUID) = {4e48f99e-7b46-4a8e-b77a-e40fb59ecc63} 46 7b 8e 4a b7 7a e4 0f b5 9e cc 63
The following annotation shows the Shut Down Presentation Response message sent from the client to the server.
-
Shut Down Presentation Response ChannelName = TSMF,28,client to server 00000000 00 00 00 80 00 00 00 00 00 00 00 00 ................ 00 00 00 80 -> Interface Id = 0x00000000 | mask STREAM_ID_STUB (0x80000000) 00 00 00 00 -> Message Id = 0x00000000 00 00 00 00 -> Result = S_OK