MMS协议.doc_第1页
MMS协议.doc_第2页
MMS协议.doc_第3页
MMS协议.doc_第4页
MMS协议.doc_第5页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

MMS协议解析:MMS协议简介:MMS(Microsoft Media Server protocol)是一种串流媒体传送协议,用来访问并流式接收Windows Media服务器中.asf文件的一种协议。MMS协议用于访问Windows Media发布点上的单播内容。MMS是连接Windows Media单播服务的默认方法。若观众在Windows Media Player中键入一个URL以连接内容,而不是通过超级链接访问内容,则他们必须使用MMS协议引用该流。MMS的默认埠(端口)是1755。现在除了Windows Media外,如KMPLAYER等流行的播放器也支持该协议,有些播放器已经带有许多的媒体信息地址,用户可以很方便地通过网络看电视、电影等,当然这还是免费的。MMS协议工作概览:MMS协议被用于传输实时多媒体信息(音频、视频等)。作为一个流协议,MMS尝试使多媒体数据被传输和同时呈现更加容易。协议使用TCP连接流媒体会话。客户端通过TCP连接发送MMS协议请求消息到服务器,请求服务器执行诸如多媒体数据流的开始或结束。多媒体数据要么通过同一个TCP连接被传输,要么UDP数据包流。在服务器传输多媒体数据到客户端的同时,客户端可以发送MMS协议消息到服务器,请求其改变当前被传输的流。例如,客户端可以请求服务器以较低比特率替换当前视频流。如果使用UDP传输的话,客户端可以发送MMS协议消息到服务器,请求它重发某个UDP数据包。这个请求消息使用UDP发送。与其他协议的关系:MMS协议依赖于TCP作为其控制流媒体会话的连接。MMS协议消息使用TCP连接在客户端和服务器之间发送。服务器端使用TCP或UDP传输多媒体数据。功能上,MMS协议与Real-Time Streaming Protocol (RTSP) WindowsMedia Extensions MS-RTSP. 相似。但是RTSP扩展支持在MMS上不可行。适用性MMS适合实时多媒体数据的流传输.在只是使用TCP传输多媒体数据的场合,W indows Media HTTP Streaming Protocol更为合适。标准分配ParameterValueReferenceTCP port1755As specified in IANAPORT.UDP port1755As specified in IANAPORT.MMS主要内容:消息(Messages)传输MMS默认使用1755端口。但是使用其他端口也是允许的,如果想使用其他端口,必须将其包含在URL中指出。消息语法所有的16、32、64位的整数必须以低端字节序被传输。日志数据结构(略)Data(传输多媒体数据的数据结构)。Data数据包可以通过TCP或UDP被传输,依赖于客户端与服务器约定的传输模式。01234567891012345678920123456789301LocationIdplayIncarnationAFFlagsPacketSizePayload (variable).LocationId (4 bytes): 32位整型;作为负载数据在整个被传输的对象中的索引。如果负载包含一个ASF文件头,第一个负载的LocationId必须为0x00000000,以后每个负载递增。A 32-bit integer field that specifies the index of the Payload field into the complete object being transferred. If the Payload field contains an ASF file header, LocationId MUST be 0x00000000 for the first payload, and MUST increment by 1 for each payload. If the Payload field contains a packet-pair packet, LocationId MUST be 0xF0F0F000 for the first packet-pair packet, and 0xF0F0F001 for the second packet-pair packet. If the payload contains an ASF data packet, the entire ASF file is considered the object that is being transferred. Thus, for payloads containing an ASF data packet, this field MUST be set to the payloads ASF data packet number. The first ASF data packet in an ASF file MUST have a LocationId of 0x00000000, the second ASF data packet in the file MUST have a LocationIdof 0x00000001, and so on. Note that because a server may skip ASF data packets, the valueof the LocationId field may not be sequential from one MMS Data packet to the next. If the server does not have access to the ASF file (for example, in the case of live content), the server MUST assume a virtual ASF file, incrementing LocationId (or decrementing it w hen rew inding the content) exactly as if a real ASF file existed.playIncarnation (1 byte): 8位整型,被设置为MMS消息最少标志8位,以触发服务器发送Data数据包。An 8-bit field that is set to the least significant 8 bits of the MMSmessage (see section 2.2.4) that triggered the server to send this Data packet. The value0x00 is reserved and MUST NOT be used. The value 0xFF MUST be used if the Data packetcontains a packet-pair packet.AFFlags (1 byte): An 8-bit integer field. When the Payload field contains an ASF data packet, the field MUST be treated as a sequence number. The initial value MUST be 0x00, and it MUST increment by 1 for each ASF data packet that is transmitted. If the most recently transmitted Data packet has an AFFlags field value of 0xFE, and the server receives a LinkViewerToMacStartPlaying (section 5) message or a LinkViewerToMacStartStriding (section 6) message, the first Data packet transmitted in response SHOULD have the AFFlags field set to 0x00. When the Payload field contains an ASF file header, the AFFlags field MUST be set to 0x04 if the ASF file header is split into multiple Data packets. AFFlags MUST be set to 0x0C if this is the last Data packet in the sequence. If the Payload field contains a packet-pair packet, AFFlags MUST be set to 0x10.PacketSize (2 bytes): A 16-bit integer field. MUST be set to the total size of the Data packet in bytes.Payload (variable): A variable size block of bytes. The content of this field is either an ASF data packet, an ASF file header, or a packet-pair packet, depending on the circumstances under w hich the Data packet is transmitted. If the Payload field contains an ASF data packet, and if the ASF packet contains a Padding Data field, as specified in ASF section 5.2.4, the Padding Data field SHOULD be removed before encapsulating the ASF data packet in the MMS Data packet, except if the client identified itself as W indows Media Services version 4.0or 4.1 in the LinkViewerToMacConnect (section 7) message. If the Padding Data field is removed, the Padding Length field in the ASF payload parsing information (as specified in ASF section 5.2.2) MUST be updated to indicate a non-existent Padding Data field.TcpMessageHeader(控制消息数据结构)TcpMessageHeader主要用于封装MMS消息,一个TcpMessageHeader可以包含多个MMS消息,只用MMS消息通过TCP传输的情况。01234567891012345678920123456789301repversionversionMinorpaddingsessionIdmessageLengthsealchunkCountseqMBZtimeSent.MMS message (variable).rep (1 byte): An 8-bit field. It MUST be set to 0x1. version (1 byte): An 8-bit field. It MUST be set to 0x0. versionMinor (1 byte): An 8-bit field. It MUST be set to 0x0.padding (1 byte): An 8-bit field. It SHOULD be set to 0x0, and SHOULD be ignored byreceivers.sessionId (4 bytes): A 32-bit field. It MUST be set to 2953575118.messageLength (4 bytes): An unsigned 32-bit integer that specifies the size, in bytes, of theMMS message field plus 16.seal (4 bytes): A 32-bit field. It MUST be set to 0x20534D4D.chunkCount (4 bytes): An unsigned 32-bit integer. It MUST be set to the total size of theTcpMessageHeader packet in multiples of 8 bytes.seq (2 bytes): An unsigned 16-bit integer. The TcpMessageHeader packet sequence number.The value of this field MUST increment by 1 for each TcpMessageHeader packet that is sent. The first packet MUST have a seq value of 0x0000.MBZ (2 bytes): A 16-bit field. It MUST be set to 0x0000.timeSent (8 bytes): An unsigned 64-bit integer. The value of this field SHOULD

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论