Skip to content

Commit

Permalink
RTP matching rules
Browse files Browse the repository at this point in the history
Yet another attempt to fix Issues #368, #546, #547
  • Loading branch information
aboba authored Apr 18, 2017
1 parent 8d8044d commit 64617b7
Showing 1 changed file with 42 additions and 37 deletions.
79 changes: 42 additions & 37 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4409,44 +4409,49 @@ <h3>RTP matching rules</h3>
is called, and are removed when <code>receiver.stop()</code> is called. If
<code>receiver.receive(<var>parameters</var>)</code> is called again, all entries
referencing <var>receiver</var> are removed prior to adding new entries.</p>
<p>muxId table:<p>
<section id="tablefilling*">
<h3>Table construction</h3>
<p>As noted in [[!BUNDLE]] Section 10.2, to prepare for demultiplexing RTP/RTCP
packets to the correct <code><a>RTCRtpReceiver</a></code> the following steps
MUST be followed:</p>
<ol>
<li>If <code><var>parameters</var>.muxId</code> is set,
<code>muxId_table[<var>parameters</var>.muxId]</code> is set to <var>receiver</var>.</li>
<li>If <code>muxId_table[<var>muxId</var>]</code> is already set to a value other than
<var>receiver</var>, then <code>receiver.receive()</code> will be rejected with
<code>InvalidParameters</code>.</li>
</ol>
<p>SSRC table:</p>
<ol>
<li>Set <code>ssrc_table[<var>parameters</var>.encodings[<var>i</var>].ssrc]</code>
to <var>receiver</var> for each entry where
<code><var>parameters</var>.encodings[<var>i</var>].ssrc</code> is set, for values of
<var>i</var> from 0 to <code>encodings.length-1</code>.</li>
<li>Set <code>ssrc_table[<var>parameters</var>.encodings[<var>i</var>].rtx.ssrc]</code>
to <var>receiver</var> for each entry where
<code><var>parameters</var>.encodings[<var>i</var>].rtx.ssrc</code> is set, for values of
<var>i</var> from 0 to <code>encodings.length-1</code>.</li>
<li>Set <code>ssrc_table[<var>parameters</var>.encodings[<var>i</var>].fec.ssrc]</code>
to <var>receiver</var> for each entry where
<code><var>parameters</var>.encodings[<var>i</var>].fec.ssrc</code> is set, for values of
<var>i</var> from 0 to <code>encodings.length-1</code>.</li>
<li>If <code>ssrc_table[<var>ssrc</var>]</code> is already set to a value other
than <var>receiver</var>, then <code>receiver.receive()</code> will be rejected
with <code>InvalidParameters</code>.</li>
</ol>
<p>payload type table:<p>
<ol>
<li>If <code><var>parameters</var>.muxId</code> is set, abort these steps.</li>
<li>If <code><var>parameters</var>.encodings[<var>i</var>].ssrc</code> is unset for all
values of <var>i</var> from 0 to <code>encodings.length-1</code>, then add
entries to <code>pt_table</code> by setting
<code>pt_table[<var>parameters</var>.codecs[<var>j</var>].payloadType]</code> to
<var>receiver</var>, for values of <var>j</var> from 0 to <code>codecs.length-1</code>.</li>
<li>If <code>pt_table[<var>pt</var>]</code> is already set to a value other than
<var>receiver</var> then <code>receiver.receive()</code> will be rejected with
<code>InvalidParameters</code>.</li>
</ol>
<ol>muxId table construction
<li>If <code><var>parameters</var>.muxId</code> is set,
<code>muxId_table[<var>parameters</var>.muxId]</code> is set to <var>receiver</var>.</li>
<li>If <code>muxId_table[<var>muxId</var>]</code> is already set to a value other than
<var>receiver</var>, then <code>receiver.receive()</code> will be rejected with
<code>InvalidParameters</code>.</li>
</ol>
<ol>SSRC table construction
<li>Set <code>ssrc_table[<var>parameters</var>.encodings[<var>i</var>].ssrc]</code>
to <var>receiver</var> for each entry where
<code><var>parameters</var>.encodings[<var>i</var>].ssrc</code> is set, for values of
<var>i</var> from 0 to <code>encodings.length-1</code>.</li>
<li>Set <code>ssrc_table[<var>parameters</var>.encodings[<var>i</var>].rtx.ssrc]</code>
to <var>receiver</var> for each entry where
<code><var>parameters</var>.encodings[<var>i</var>].rtx.ssrc</code> is set, for values of
<var>i</var> from 0 to <code>encodings.length-1</code>.</li>
<li>Set <code>ssrc_table[<var>parameters</var>.encodings[<var>i</var>].fec.ssrc]</code>
to <var>receiver</var> for each entry where
<code><var>parameters</var>.encodings[<var>i</var>].fec.ssrc</code> is set, for values of
<var>i</var> from 0 to <code>encodings.length-1</code>.</li>
<li>If <code>ssrc_table[<var>ssrc</var>]</code> is already set to a value other
than <var>receiver</var>, then <code>receiver.receive()</code> will be rejected
with <code>InvalidParameters</code>.</li>
</ol>
<ol>payload type table construction
<li>If <code><var>parameters</var>.muxId</code> is set, abort these steps.</li>
<li>If <code><var>parameters</var>.encodings[<var>i</var>].ssrc</code> is unset for all
values of <var>i</var> from 0 to <code>encodings.length-1</code>, then add
entries to <code>pt_table</code> by setting
<code>pt_table[<var>parameters</var>.codecs[<var>j</var>].payloadType]</code> to
<var>receiver</var>, for values of <var>j</var> from 0 to <code>codecs.length-1</code>.</li>
<li>If <code>pt_table[<var>pt</var>]</code> is already set to a value other than
<var>receiver</var> then <code>receiver.receive()</code> will be rejected with
<code>InvalidParameters</code>.</li>
</ol>
</ol>
</section>
<section id="rtppackethandling*">
<h4>RTP packet handling</h4>
<p>When an RTP packet arrives, the implementation determines the
Expand Down

0 comments on commit 64617b7

Please sign in to comment.