您的位置:首页 > 其它

[RTSP][2012-06-16] RTSP DESCRIBE & SDP 部分 注释

2012-06-16 16:19 183 查看
Methods: DESCRIBE
direction: Client to Server

requirement: recommended

目的: Client 利用 DESCRIBE 這個 method, 向 Server 要求有關 requested media data (URL) 的相關資料, 另外, Client 還可配合 Accept header 來告知 Server, Client 端可以看懂哪一些格式的 description.

Example:

C -> S :

DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0 312

Accept: application/sdp, application/rtsl, application/mheg

S -> C :

RTSP/1.0 200 312 OK

Date: 23 Jan 1997 15:35:06 GMT

Content-Type: application/sdp

Content-Length: 376

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 (URI 描述)

e=mjh@isi.edu (Mark Handley) (Email 地址)

c=IN IP4 224.2.17.12/127 (连接信息)

t=2873397496 28973404696 (会话活动时间)

a=recvonly (0 个或多个会话属性行)

m=audio 3456 RTP/AVP 0 (媒体名称和传输地址)

m=video 2232 RTP/AVP 31 (媒体名称和传输地址)

m=whiteboard 32416 UDP WB (媒体名称和传输地址)

a=orient:portrait(0 个或多个媒体属性行)

b = * (带宽信息)

z = * (时间区域调整)

k = * (加密密钥)

=========

C -> S :

DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0

CSeq: 312

Accept: application/sdp, application/rtsl, application/mheg

S -> C :

RTSP/1.0 200 OK

CSeq: 312

Date: 23 Jan 1997 15:35:06 GMT

Content-Type: application/sdp

Content-Length: 376

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

e=mjh@isi.edu (Mark Handley)

c=IN IP4 224.2.17.12/127

t=2873397496 28973404696

a=recvonly

m=audio 3456 RTP/AVP 0

m=video 2232 RTP/AVP 31

m=whiteboard 32416 UDP WB

a=orient:portrait

ps:

sdp的格式

v=<version>

o=<username> <session id> <version> <network type> <address type> <address>

s=<session name>

i=<session description>

u=<URI>

e=<email address>

p=<phone number>

c=<network type> <address type> <connection address>

b=<modifier>:<bandwidth-value>

t=<start time> <stop time>

r=<repeat interval> <active duration> <list of offsets from start-time>

z=<adjustment time> <offset> <adjustment time> <offset> ....

k=<method>

k=<method>:<encryption key>

a=<attribute>

a=<attribute>:<value>

m=<media> <port> <transport> <fmt list>

v = (协议版本)

o = (所有者/创建者和会话标识符)

s = (会话名称)

i = * (会话信息)

u = * (URI 描述)

e = * (Email 地址)

p = * (电话号码)

c = * (连接信息)

b = * (带宽信息)

z = * (时间区域调整)

k = * (加密密钥)

a = * (0 个或多个会话属性行)

时间描述:

t = (会话活动时间)

r = * (0或多次重复次数)

媒体描述:

m = (媒体名称和传输地址)

i = * (媒体标题)

c = * (连接信息 — 如果包含在会话层则该字段可选)

b = * (带宽信息)

k = * (加密密钥)

a = * (0 个或多个媒体属性行)

带*为可选信息。

参考文章:rfc2326(rtsp);rfc2327(sdp) ;rfc3550(rtp/rtcp)

原帖地址:

http://blog.chinaunix.net/u2/77292/showart_1922940.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: