Akagi201
12/25/2015 - 1:22 AM

SDP.md

  • SDP(会话描述协议)是一种格式来描述 streaming media initializaion parameters. RFC2327
  • SDP用来描述 multimedia communication sessions用来session announcement, session invitation, 和 parameter negotiation(转发).
  • SDP自身不发送media但是用来转发(negotiation)在媒体类型,格式和所有的关联的属性的端点之间.
  • 这个属性和参数的集合通常被叫做一个session profile.
  • SDP被设计用来扩展来支持新的media type和format.
  • SDP开始是作为SAP(Session Announcement Protocol)的一个组件(component).但是发现有其他的用处和RTP,RTSP,SIP等协同工作. 甚至用来单独描述multicast sessions(多播会话)
  • 一个Session 被一系列的域(field)描述, 一个一行, 每个域的格式如下: =
  • 是一个大小写相关的字符, 并且value是结构化的文本, 他的格式取决于属性类型.
  • Values 通常是典型的UTF-8编码的.空格不允许直接在=的两边任何一边.
  • 在一个SDP信息中有3个main section, detailing the session, timing, 和 media description.
  • 每一个信息可能包含许多timing和媒体描述
  • 名字在相应的句法构造内是唯一的, 例如在session, time, media内部.
  • 可选的值被标记为=*, 并且每个域必须按照下面的顺序排列.
Session description:
    v=  (protocol version number, currently only 0)
    o=  (originator and session identifier : username, id, version number, network address)
    s=  (session name : mandatory with at least one UTF-8-encoded character)
    i=* (session title or short information)
    u=* (URI of description)
    e=* (zero of more email address with optional name of contacts)
    p=* (zero of more phone number with optional name of contacts)
    c=* (connection information—not required if included in all media)
    b=* (zero or more bandwidth information lines)
    One or more Time descriptions ("t=" and "r=" lines; see below)
    z=* (time zone adjustments)
    k=* (encryption key)
    a=* (zero or more session attribute lines)
    Zero or more Media descriptions (each one starting by an "m=" line; see below)
 * Time description (mandatory)
    t=  (time the session is active)
    r=* (zero or more repeat times)
 * Media description (if present)
    m=  (media name and transport address)
    i=* (media title or information field)
    c=* (connection information — optional if included at session level)
    b=* (zero or more bandwidth information lines)
    k=* (encryption key)
    a=* (zero or more media attribute lines — overriding the Session attribute lines)