Subject: [rtcweb] Does RID require the same ext id for all the m= sections?

From: Iñaki Baz Castillo <[email-masked]>
Date: Sun, 10 Sep 2017 18:35:07 +0200

Hi,

Let's assume I send two videos over a BUNDLEd transport, both of them
with simulcast enabled. So I get a local SDP offer with two m=video
sections, having each one 2 or 3 a=rid lines.

1) First question:

Should N in "a=extmap:N urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id"
be the same value in both m=sections?

Let's assume that they are different and that MID is not in use. How
would the receiving transport discover which m= section the RTP packet
belongs to? Note that, upon receipt of the RTP packet, the transport
should read the RID extension header to get the associated m= section.
Which ID should it use to read the packet RID? Unfortunately (DUE THE
ENDLESS SDP MESS) RTP header extensions that are required for the
transport (such as MID, RID, ABS, etc) are placed within m= sections
rather than "globally". So sometimes they must match, sometimes not,
and workarounds like that. Is that the case when using RID? should all
the m= sections use he same ID mapping for the RID extension?

2) Second question:

Should the values of RID be different in the first m=video and the
second m=video? If they were the same then bullet 1) above gets
invalidated because the RID value in RTP packets wouldn't be useful to
find the corresponding m= section. In that case MID would be mandatory
in order to also use RID. Is this correct?

Thanks a lot.

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: "Mo Zanaty (mzanaty)" <[email-masked]>
Date: Sun, 10 Sep 2017 18:22:05 +0000

Bundle requires MID to associate RTP streams to m= sections, whether or not RID is used. RID is never used for that purpose. All extmap IDs must be consistent in all bundled m= sections, just like PTs. 

Mo

On Sep 10, 2017, at 12:35 PM, Iñaki Baz Castillo <[email-masked]> wrote:

Hi,

1) First question:

2) Second question:

Thanks a lot.

-- 
Iñaki Baz Castillo
<[email-masked]>

_______________________________________________
rtcweb mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/rtcweb

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 11 Sep 2017 14:48:53 +0200

On Sun, Sep 10, 2017 at 8:22 PM, Mo Zanaty (mzanaty) <[email-masked]> wrote:
> All extmap IDs must be consistent in all bundled m= sections, just like PTs.

Thanks.

However, what does "consistent" mean? I assume/expect that the extmap
ID (for example a=extmap:4) cannot exist in two different m= sections
pointing to different extension URLs, right?

But, and given that you told about PTs, it's perfectly valid that two
different PTs point to the same codec+condiguration within the same m=
section or in different m= sections.

So, could a m=audio section have an "a=extmap:4 urn:foo" line while a
m=video section has "a=extmap:8 urn:foo"? or should both use extmap ID
4?

For example, the extmap ID for MID must be *UNIQUE* across all the
m=sections. Does the same constrain exist for the extmap ID for RID?

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: "Mo Zanaty (mzanaty)" <[email-masked]>
Date: Mon, 11 Sep 2017 13:34:27 +0000

See bundle section 13.

https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-38#section-13

The same ID must always map to the same URN. Different IDs can map to the same URN as aliases. (The latter is not stated but implied.)

Mo

On Sep 11, 2017, at 8:49 AM, Iñaki Baz Castillo <[email-masked]<mailto:[email-masked]>> wrote:

On Sun, Sep 10, 2017 at 8:22 PM, Mo Zanaty (mzanaty) <[email-masked]<mailto:[email-masked]>> wrote:
All extmap IDs must be consistent in all bundled m= sections, just like PTs.

Thanks.

--
Iñaki Baz Castillo
<[email-masked]<mailto:[email-masked]>>

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 11 Sep 2017 15:52:41 +0200

Ok, but that is not valid for MID, as the reveiver transport is supposed to
check the MID value using a single extmap ID, right?

El 11 sept. 2017 3:34 p. m., "Mo Zanaty (mzanaty)" <[email-masked]>
escribió:

> The same ID must always map to the same URN. Different IDs can map to the
> same URN as aliases. (The latter is not stated but implied.)
>
> Mo
>
> On Sep 11, 2017, at 8:49 AM, Iñaki Baz Castillo <[email-masked]> wrote:
>

---

From: Sergio Garcia Murillo <[email-masked]>
Date: Mon, 11 Sep 2017 16:11:11 +0200

But according to RFC 5285:

    An extension URI with the same attributes MUST NOT appear more than
    once applying to the same stream, i.e., at session level or in the
    declarations for a single stream at media level.

And

    In addition, as noted above,
    the IDs used MUST be unique for each stream type for a given media,
    or for the session for session-level declarations.

So it is not possible to have same URN with exact parameters with 
different IDs for same "stream" (whatever "stream" is meant to be 
nowadays), and I would (at least) assume that each URN cannot appear 
more than once in each m-line with same parameters.

Also, IMHO, bundle should be updated to make this requirement session 
level, as it is done with the ID uniqueness.

Best regards
Sergio
On 11/09/2017 15:34, Mo Zanaty (mzanaty) wrote:
> The same ID must always map to the same URN. Different IDs can map to 
> the same URN as aliases. (The latter is not stated but implied.)
>
> Mo
>
> On Sun, Sep 10, 2017 at 8:22 PM, Mo Zanaty (mzanaty) 
> <[email-masked] <mailto:[email-masked]>> wrote:
> <[email-masked] <mailto:[email-masked]>>
>
>

---

From: "Mo Zanaty (mzanaty)" <[email-masked]>
Date: Mon, 11 Sep 2017 15:02:36 +0000

Bundle defines MID, and section 13 restricts all extmap IDs (including MID, RID, etc.) to be consistent across all bundled m= sections, just like PTs. I see no restriction against aliases, nor any reason to impose one.

Mo

From: Iñaki Baz Castillo <[email-masked]<mailto:[email-masked]>>
Date: Monday, September 11, 2017 at 9:52 AM
To: mzanaty <[email-masked]<mailto:[email-masked]>>
Cc: "[email-masked]<mailto:[email-masked]>" <[email-masked]<mailto:[email-masked]>>
Subject: Re: [rtcweb] Does RID require the same ext id for all the m= sections?

Ok, but that is not valid for MID, as the reveiver transport is supposed to check the MID value using a single extmap ID, right?

El 11 sept. 2017 3:34 p. m., "Mo Zanaty (mzanaty)" <[email-masked]<mailto:[email-masked]>> escribió:
See bundle section 13.

Mo

Thanks.

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 11 Sep 2017 17:52:11 +0200

On Mon, Sep 11, 2017 at 5:02 PM, Mo Zanaty (mzanaty) <[email-masked]> wrote:
> Bundle defines MID, and section 13 restricts all extmap IDs (including MID,
> RID, etc.) to be consistent across all bundled m= sections, just like PTs. I
> see no restriction against aliases, nor any reason to impose one.

The RTP MID extension value is used (should be used when someone
implements it) to lookup the associated m=section, so the extmap ID
MUST be unique across all the m=sections in the SDP. Otherwise the
lookup operation would be impossible.

This has been discussed in this mailing list not so long ago.

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Sergio Garcia Murillo <[email-masked]>
Date: Mon, 11 Sep 2017 18:04:46 +0200

> This has been discussed in this mailing list not so long ago.

Well, while I am against heder extensions aliases, the extension id are 
meant to be unique across all m-sections, so it is possible to get the 
value of the extensions regardless of the m-section to which the RTP 
packet belongs to. It could be possible then to associate the rtp packet 
with the m-section via the MID value, and validate which header 
extensions ids were allowed in it (including the MID one).

IMHO, it would be better to not allow aliases in bundle across m-sections.

Best regards

Sergio

---

From: Sergio Garcia Murillo <[email-masked]>
Date: Mon, 11 Sep 2017 18:06:18 +0200

Aliases are already restricted in same m-line by the header extension RFC.

Best regard
Sergio
On 11/09/2017 17:02, Mo Zanaty (mzanaty) wrote:
> Bundle defines MID, and section 13 restricts all extmap IDs (including 
> MID, RID, etc.) to be consistent across all bundled m= sections, just 
> like PTs. I see no restriction against aliases, nor any reason to 
> impose one.
>
> Mo
>
> From: Iñaki Baz Castillo <[email-masked] <mailto:[email-masked]>>
> To: mzanaty <[email-masked] <mailto:[email-masked]>>
> Cc: "[email-masked] <mailto:[email-masked]>" <[email-masked] 
> <mailto:[email-masked]>>
> Ok, but that is not valid for MID, as the reveiver transport is 
> supposed to check the MID value using a single extmap ID, right?
>
>     <https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-38#section-13>
>
>     The same ID must always map to the same URN. Different IDs can map
>     to the same URN as aliases. (The latter is not stated but implied.)
>
>     Mo
>

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 11 Sep 2017 18:11:29 +0200

> Aliases are already restricted in same m-line by the header extension RFC.

I don't mean aliases within the same m= section, but usage of
different "a=extmap:N urn:mid" (different N) in different m= sections.

That's not valid since the receiver needs to use a *single* extmap ID
to look for the packet MID extension value, so it can find the
corresponding m=section it belongs to.

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Sergio Garcia Murillo <[email-masked]>
Date: Mon, 11 Sep 2017 18:15:39 +0200

What I meant is that there are already restrictions to aliases in m-lines
on non-bundle and that they would make sense to be extended to all bundled
m-lines.

Br
Sergio

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 11 Sep 2017 18:20:42 +0200

On Mon, Sep 11, 2017 at 6:15 PM, Sergio Garcia Murillo
<[email-masked]> wrote:
> What I meant is that there are already restrictions to aliases in m-lines on
> non-bundle and that they would make sense to be extended to all bundled
> m-lines.

Do you mean this?

"the IDs used MUST be unique for each stream type for a given media"

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Sergio Garcia Murillo <[email-masked]>
Date: Mon, 11 Sep 2017 18:23:58 +0200

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 11 Sep 2017 18:59:37 +0200

>    declarations for a single stream at media level.

Nop. It's not that. At "session level" means that two a=extmap
pointing to the same URN+params cannot appear more than once in the
*global* section (this is, before the m= sections).

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Sergio Garcia Murillo <[email-masked]>
Date: Mon, 11 Sep 2017 19:07:39 +0200

Please, read until the end: "or at media level"

El 11/9/2017 18:59, "Iñaki Baz Castillo" <[email-masked]> escribió:

--
Iñaki Baz Castillo
<[email-masked]>

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 11 Sep 2017 19:14:08 +0200

> Please, read until the end: "or at media level"

For me, "at media level" means two a=extmap with same URN but
different ID within the *same* media section.

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: "Mo Zanaty (mzanaty)" <[email-masked]>
Date: Mon, 11 Sep 2017 17:39:00 +0000

I found a restriction against aliases in 5285bis:
https://tools.ietf.org/html/draft-ietf-avtcore-rfc5285-bis-14#section-7

"... If an RTP header extension, i.e. a particular extension
URI and configuration using <extensionattributes>, is offered in
multiple m-lines that are part of the same bundle group it MUST use
the same ID in all of these m-lines."

Remap ID to different URN is disallowed when bundled:
m=...
a=extmap:x urn:foo
m=...
a=extmap:x urn:bar

Alias ID for same URN is disallowed when bundled:
m=...
a=extmap:x urn:foo
m=...
a=extamp:y urn:foo

The remap restriction is clearly necessary. I think the alias restriction
is unnecessary, but I'm fine with letting it proceed to publication if it
simplifies things for RTP stack implementors. (It complicates things for
middle box implementors that want to avoid rewriting RTP packets, which
aliases can help avoid.)

Mo

-----Original Message-----
From: Iñaki Baz Castillo <[email-masked]>
Date: Monday, September 11, 2017 at 11:52 AM
To: mzanaty <[email-masked]>
Cc: "[email-masked]" <[email-masked]>
Subject: Re: [rtcweb] Does RID require the same ext id for all the m=
sections?

On Mon, Sep 11, 2017 at 5:02 PM, Mo Zanaty (mzanaty) <[email-masked]>
wrote:
>MID,

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Tue, 26 Sep 2017 21:39:21 +0200

> the same ID in all of these m-lines."

Thanks. I was not aware of that draft. Hope implementors go that way.

-- 
Iñaki Baz Castillo
<[email-masked]>