One document matched: draft-alvestrand-rtcweb-msid-00.xml


<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-alvestrand-rtcweb-msid-00"
     ipr="trust200902">
  <front>
    <title abbrev="MSID in SDP">Signalling Media Stream ID in the Session
    Description Protocol</title>

    <author fullname="Harald Alvestrand" initials="H. T." surname="Alvestrand">
      <organization>Google</organization>

      <address>
        <email>harald@alvestrand.no</email>
      </address>
    </author>

    <date day="11" month="January" year="2012" />

    <abstract>
      <t>This document specifies how the association between the RTP concept
      of SSRC and the WebRTC concept of "media stream" / "media stream track"
      is carried using SDP signalling.</t>

      <t>This document should be discussed in the RTCWEB WG list,
      rtcweb@ietf.org.</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>The W3C WebRTC API specification <xref
      target="W3C.WD-webrtc-20111027"></xref> specifies that communication
      between WebRTC entities is done via MediaStreams, which contain
      MediaStreamTracks. A MediaStreamTrack is carried using a single SSRC in
      an RTP session. (There might possibly with additional SSRCs, possibly
      within additional RTP sessions, in order to support functionality like
      forward error correction or simulcast. This complication is largely
      ignored below.)</t>

      <t>One SSRC may utilize multiple codecs, such as an audio track
      switching between audio, comfort noise and DTMF. An SSRC MUST NOT switch
      between media types (no switching between audio and video, for
      instance)</t>

      <t>In the RTP specification, media streams are identified using SSRC,
      which is grouped into RTP Sessions, and also carry a CNAME. Neither
      CNAME nor RTP session correspond to a MediaStream. Therefore, the
      association of an RTP media stream to MediaStreams need to be explicitly
      signalled.</t>

      <t>The marking needs to be on a per-SSRC basis, since one RTP session
      can carry media from multiple MediaStreams, and one MediaStream can have
      media in multiple RTP sessions. This means that the <xref
      target="RFC4574"></xref> "label" attribute, which is used to label RTP
      sessions, is not usable for this purpose.</t>
    </section>

    <section title="Basic mechanism">
      <t>Association of the messagestream to the SSRC is done via an "msid"
      attribute attached to the SSRC in the SDP description, using the "Source
      Specific Media Attribute" mechanism <xref target="RFC5576"></xref>:</t>

      <figure>
        <artwork><![CDATA[  a=ssrc:1234 msid:examplefoo

]]></artwork>
      </figure>

      <t>The msid is a string of ASCII characters chosen from 0-9, a-z, A-Z
      and - (hyphen), consisting of between 1 and 64 characters. The value
      "default" (all lower case) has special meaning, and MUST NOT be
      generated. Values starting with "example" (all lower case) are reserved
      for documentation, and MUST NOT be generated by an implementation.</t>

      <t>(Note: one possible generation algorithm is to generate 6 random
      bytes, base64 encode them (giving 8 bytes), and prefixing with a letter
      that is neither "d" nor "e".)</t>

      <t>The msid uniquely identifies a media stream within the scope of an
      SDP description. When an SDP description is updated, a specific msid
      continues to refer to the same media stream; an msid value MUST NOT be
      reused for another media stream within an SDP session's lifetime.</t>

      <t>The value of the msid corresponds to the "id" attribute of a
      MediaStream. (note: as of Jan 11, 2012, this is called "label". The word
      "label" means many other things, so the same word should not be
      used.)</t>

      <t>In a WebRTC-compatible SDP description, all SSRCs intending to be
      sent from one peer will be identified in the SDP generated by that
      entity.</t>

      <t>The following are the rules for handling updates of the list of ssrcs
      and their msid values.</t>

      <t><list style="symbols">
          <t>When a new msid value occurs in the description, the recipient
          can signal to its application that a new media stream has been
          added.</t>

          <t>When a description is updated to have more ssrcs with the same
          msid value, the recipient can signal to its application that new
          media stream tracks have been added to the media stream.</t>

          <t>When a description is updated to no longer list the msid value on
          a specific ssrc, the recipient can signal to its application that
          the corresponding media stream track has been closed. It is an
          IMPLEMENTATION CHOICE <OPEN ISSUE> whether the recipient waits
          until an RTCP BYE packet is received on the media stream, or whether
          the recipient waits for a timeout with no more media arriving,
          before signalling that the media stream track is closed.</t>

          <t>When a description is updated to no longer list the msid value on
          any ssrc, the recipient can signal to its application that the media
          stream track has been closed.</t>
        </list></t>
    </section>

    <section title="Handling of non-signalled tracks">
      <t>Pre-WebRTC entities will not send msid. This means that there will be
      some incoming RTP packets with SSRCs that are not signalled.</t>

      <t>Handling will depend on whether or not any SSRCs are signalled in the
      relevant RTP session. There are two cases:</t>

      <t><list style="symbols">
          <t>No SSRC is signalled with an msid attribute. The SDP session is
          assumed to be a backwards-compatible session. All incoming SSRCs, on
          all RTP sessions that are part of the SDP session, are assumed to
          belong to a single media stream. The ID of this media stream is
          "default".</t>

          <t>Some SSRCs are signalled with an msid attribute. In this case,
          the session is webRTC compatible, and the newly arrived SSRCs are
          either caused by a bug or by timing skew between the arrival of the
          media packets and the SDP description. These packets MAY be
          discarded, or they MAY be buffered for a while in order to allow
          immediate startup of the media stream when the SDP description is
          updated. The arrival of media packets MUST NOT cause a new
          MediaStreamTrack to be created.</t>
        </list>Note: This means that it is wise to include at least one
      a=ssrc: line with an msid attribute, even when no media streams are yet
      attached to the session. (Alternative: Mark the RTP session explicitly
      as "I will signal the media stream tracks explicitly").</t>

      <t>It follows from the above that media stream tracks in the "default"
      media stream cannot be closed by signalling; the application must
      instead signal these as closed when either an RTCP BYE packet or the
      absence of media for a defined interval <what interval?> indicates
      that the stream is gone.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests IANA to register the "msid" attribute in the
      "att-field (source level)" registry within the SDP parameters registry,
      according to the procedures of <xref target="RFC5576"></xref></t>

      <t>The required information is:</t>

      <t><list style="symbols">
          <t>Contact name, email: IETF, rtcweb@ietf.org (or a successor
          designated by IESG)</t>

          <t>Attribute name: msid</t>

          <t>Long-form attribute name: Media Stream Identifier</t>

          <t>The attribute value contains only ASCII characters, and is
          therefore not subject to the charset attribute.</t>

          <t>The attribute gives an association between a WebRTC MediaStream
          and an SSRC.</t>

          <t>The details of appropriate values are given in RFC XXXX.</t>
        </list>IANA is requested to replace "RFC XXXX" with the RFC number of
      this document upon publication.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>An adversary with the ability to modify SDP descriptions has the
      ability to switch around tracks between media streams. This is a special
      case of the general security consideration that modification of SDP
      descriptions needs to be confined to entities trusted by the
      application.</t>

      <t>No attacks that are relevant to the browser's security have been
      identified that depend on this mechanism.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>This note is based on sketches from, among others, Justin Uberti and
      Cullen Jennings.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.5576'?>

      <?rfc include='reference.W3C.WD-webrtc-20111027'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.4574'?>
    </references>

    <section title="Design considerations, open questions and and alternatives">
      <t>This appendix should be deleted before publication as an RFC.</t>

      <t>One suggested mechanism has been to use CNAME instead of a new
      attribute. This was abandoned because CNAME identifies a synchronization
      context; one can imagine both wanting to have tracks from the same
      synchronization context in multiple media streams and wanting to have
      tracks from multiple synchronization contexts within one media
      stream.</t>

      <t>Another suggestion has been to put the msid value within an attribute
      of RTCP SR (sender report) packets. This doesn't offer the ability to
      know that you have seen all the tracks currently configured for a media
      stream.</t>

      <t>There has been a suggestion that this mechanism could be used to mute
      tracks too. This is not done at the moment.</t>

      <t>The special value "default" and the reservation of "example*" seems
      bothersome; apart from that, it's a random string. It's uncertain
      whether "example" has any benefit.</t>

      <t>An alternative to the "default" media stream is to let each new media
      stream track without a msid attribute create its own media stream. Input
      on this question is sought.</t>

      <t>Discarding of incoming data when the SDP description isn't updated
      yet (section 3) may cause clipping. However, the same issue exists when
      crypto keys aren't available. Input sought.</t>

      <t>There's been a suggestion that acceptable SSRCs should be signalled
      in a response, giving a recipient the ability to say "no" to certain
      SSRCs. This is not supported in the current version of this
      document.</t>
    </section>

    <section title="Change log">
      <t>This appendix shoudl be deleted before publication as an RFC.</t>

      <t>This is the first version.</t>
    </section>
  </back>
</rfc>

PAFTECH AB 2003-20262026-04-24 02:42:18