標籤:
SDP:session description protocol。繪畫描述協議
SDP描述主要包括:會話名、會話目的、會話有效時間、構成會話的媒體及接受這些媒體的資訊 (地址、連接埠、格式)等等 。
1.概述
SDP也是MMUSIC工作群組的一個產品,在MBONE內容中用得很多。其目的就是在媒體會話中,傳遞媒體流資訊,允許會話描述的接收者去參與會話。SDP基本上在internet上工作。他定義了會話畫描述的統一格式,但並不定義多播地址的分配和SDP訊息的傳輸,也不支援媒體編碼方案的協商,這些功能均由下層傳送協議完成.典型的會話傳送協議包括:SAP(Session Announcement Protocol 會話公告協議),SIP,RTSP,HTTP,和使用MIME的E-Mail.(注意:對SAP只能包含一個會話描述,其它會話傳誦協議的SDP可包含多個繪畫描述)
SDP包括以下一些方面:
1)會話的名稱和目的
2)會話存活時間
3)包含在會話中的媒體資訊,包括:
媒體類型(video, audio, etc)
傳輸協議(RTP/UDP/IP, H.320, etc)
媒體格式(H.261 video, MPEG video, etc)
多播或遠端(單播)地址和連接埠
4)為接收媒體而需的資訊(addresses, ports, formats and so on)
5)使用的頻寬資訊
6)可信賴的接洽資訊(Contact information)
7)等。。。
2.協議:
Session description //格式及舉例
v= (protocol version) //v=0
o= (owner/creator and session identifier).
//o=<使用者名稱><會話id><版本><網路類型><地址類型><地址>
//o=sname 1234567890 0987654321 I IP4 126.15.64.3
s= (session name) //會話名
i=* (session information) //會話資訊
u=* (URI of description) //u=http://www.zte.com.cn/staff/sdp.ps
e=* (email address) //[email protected](general text如:王生)
//或e=Mr. Wang<[email protected]>
p=* (phone number) //p=+86-0755-26773000-7110(wang) or p=+1 617 253 6011
c=* (connection information -如已經包含在所有媒體中則該行不需要)
//c=<網路類型><地址資訊><串連地址>
//多點會議包括TTL
//串連地址: <base multicast address>/<ttl>/<number of addresses>
//c=IN IP4 224.2.13.23/127
//c=IN IP4 224.2.1.1/127/3
b=* (bandwidth information) //b=<修改量(CT Conference Total
//IAS Application-specific Max)>:<頻寬值(kb/s)>
//b=CT:120
One or more time descriptions (see below)
z=* (time zone adjustments) //時區調整
k=* (encryption key) //k=<方法>:<密鑰>或k=<方法>
a=* (zero or more session attribute lines) //a=<屬性> 或a=<屬性>:<值>
Zero or more media descriptions (see below)
各行嚴格按順序,其中:
時間描述:
t= (time the session is active) //<開始時間><結束時間>,單位秒,十進位NTP
//t=2873397468 2873404969
r=* (zero or more repeat times) //<重複時間><活動期間以開始時刻為參考的位移列表>單位秒
//r=604800 3666 90000 或寫成r=7d 1h 0 25h
媒體描述:
m= (media name and transport address)
//m=<媒體><連接埠><傳送><格式列表>
//m=audio 49170 RTP/AVP 0 3
//協議為RTP,剖面為AVP
//參考rtp-parameters.txt
i=* (media title) //媒體稱呼
c=* (connection information – 如已經包含在會話級描述則為可選)
b=* (bandwidth information) //同c
k=* (encryption key) //會話級為摸認值,同c
a=* (zero or more media attribute lines)
//兩種形式:(也同c)(見後說明)
//a=<attribute>如:
// a=recvonly
//a=<attribute>:<value>
註:v,o,s,t,m為必須的,其他項為可選。
如果SDP文法分析器不能識別某一類型(Type),則整個描述丟失;
如果”a=”的某屬性值不理解,則予以丟失
整個協議區分大小寫
“=”兩側不允許有空格
會話級的描述就是媒體級描述的預設值
所有均格式為<type>=<value>
An example SDP description is:
v=0
o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
s=SDP Seminar
i=A Seminar on the session description protocol
u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
[email protected] (Mark Handley)
c=IN IP4 224.2.17.12/127
t=2873397496 2873404696
a=recvonly
m=audio 49170 RTP/AVP 0
m=video 51372 RTP/AVP 31
m=application 32416 udp wb
a=orient:portrait
轉:SDP介紹