[ortc] RtpReceiver.send() must enforce stricter rules

ibc has just created a new issue for https://github.com/openpeer/ortc:

== RtpReceiver.send() must enforce stricter rules ==
`RtpSender.send()`:

> 7- For each value of i from 0 to the number of codecs, check that 
each value of withParameters.codecs[i].name not equal to "red", "rtx" 
or a forward error correction codec is included in 
getCapabilities(track.kind).codecs[j].name, where j goes from 0 to the
 number of codecs. If a match is not found for any value of i, return 
a promise rejected with InvalidParameters.

That is a too much simplistic check. The fact that the codec `name` 
matches one in `getCapabilities()` does not mean, at all, that it is 
the "same" codec. Lot of scenarios here:

* What would happen if `send()` is called with an "audio/opus" codec 
that includes `rtcpFeedback` entries not present in the "audio/opus" 
codec of the local capabilities?
* Or what would happen if `clockRate` does not match?
* Or imagine that local "video/H264" supports `packetization-mode` 0 
and 1, but `send()` is called with 
`codec.parameters.packetizationMode: 2`.



Please view or discuss this issue at 
https://github.com/openpeer/ortc/issues/564 using your GitHub account

Received on Tuesday, 7 June 2016 13:14:56 UTC