rfc3158.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,236 行 · 第 1/4 页
TXT
1,236 行
RFC 3158 RTP Testing Strategies August 2001
In this case, the average RTCP interval should be within 5% of:
T = 11 * S / (B * Fs)
Where S is the size of the RTCP packets sent by the test instrument,
B is the RTCP bandwidth, and Fs is the fraction of RTCP bandwidth
allocated for senders (normally 25%). The values for B and S should
be chosen small enough so that T is on the order of tens of seconds.
Reasonable choices are S=1024 bits and B=1.5 kb/s.
2.4.4 Reverse Reconsideration
The reverse reconsideration algorithm is effectively the opposite of
the normal reconsideration algorithm. It causes the RTCP interval to
be reduced more rapidly in response to decreases in the group
membership. This is advantageous in that it keeps the RTCP
information as fresh as possible, and helps avoids some premature
timeout problems.
In the first test, the implementation joins the session as a
receiver. As soon as the implementation sends its first RTCP packet,
the test instrument sends 100 RTCP RR packets, each of the same
length S, and a different SDES CNAME and SSRC in each. It then waits
for the implementation to send another RTCP packet. Once it does,
the test instrument sends 100 BYE packets, each one containing a
different SSRC, but matching an SSRC from one of the initial RTCP
packets. Each BYE should also be the same size as the RTCP packets
sent by the test instrument. This is easily accomplished by using a
BYE reason to pad out the length. The time of the next RTCP packet
from the implementation is then noted. The delay T between this (the
third RTCP packet) and the previous should be no more than:
T < 3 * S / (B * Fr * (e-1.5) * 2)
Where S is the size of the RTCP and BYE packets sent by the test
instrument, B is the RTCP bandwidth, Fr is the fraction of the RTCP
bandwidth allocated to receivers, and e is the natural exponent. B
should be chosen such that T is on the order of tens of seconds. A
reasonable choice is S=1024 bits and B=168 bits per second.
This test demonstrates basic correctness of implementation. An
implementation without reverse reconsideration will not send its next
RTCP packet for nearly 100 times as long as the above amount.
In the second test, the implementation joins the session as a
receiver. As soon as it sends its first RTCP packet, the test
instrument sends 100 RTCP RR packets, each of the same length S,
followed by 100 BYE packets, also of length S. Each RTCP packet
Perkins, et al. Informational [Page 12]
RFC 3158 RTP Testing Strategies August 2001
carries a different SDES CNAME and SSRC, and is matched with
precisely one BYE packet with the same SSRC. This will cause the
implementation to see a rapid increase and then rapid drop in group
membership.
The test is deemed successful if the next RTCP packet shows up T
seconds after the first, and T is within:
2.5 / (e-1.5) < T < 7.5 / (e-1.5)
This tests correctness of the maintenance of the pmembers variable.
An incorrect implementation might try to execute reverse
reconsideration every time a BYE is received, as opposed to only when
the group membership drops below pmembers. If an implementation did
this, it would end up sending an RTCP packet immediately after
receiving the stream of BYE's. For this test to work, B must be
chosen to be a large value, around 1Mb/s.
2.4.5 BYE Reconsideration
The BYE reconsideration algorithm works in much the same fashion as
regular reconsideration, except applied to BYE packets. When a user
leaves the group, instead of sending a BYE immediately, it may delay
transmission of its BYE packet if others are sending BYE's.
The test for correctness of this algorithm is as follows. The RTP
implementation joins the group as a receiver. The test instrument
waits for the first RTCP packet. When the test instrument receives
this packet, the test instrument immediately sends 100 RTCP RR
packets, each of the same length S, and each containing a different
SSRC and SDES CNAME. Once the test instrument receives the next RTCP
packet from the implementation, the RTP implementation is made to
leave the RTP session, and this information is conveyed to the test
instrument through some non-RTP means. The test instrument then
sends 100 BYE packets, each with a different SSRC, and each matching
an SSRC from a previously transmitted RTCP packet. Each of these BYE
packets is also of size S. Immediately following the BYE packets,
the test instrument sends 100 RTCP RR packets, using the same
SSRC/CNAMEs as the original 100 RTCP packets.
The test is deemed successful if the implementation either never
sends a BYE, or if it does, the BYE is received by the test
instrument not earlier than T seconds, and not later than 3 * T
seconds, after the implementation left the session, where T is:
T = 100 * S / ( 2 * (e-1.5) * B )
Perkins, et al. Informational [Page 13]
RFC 3158 RTP Testing Strategies August 2001
S is the size of the RTCP and BYE packets, e is the natural exponent,
B is the RTCP bandwidth, and Fr is the RTCP bandwidth fraction for
receivers. S and B should be chosen so that T is on the order of 50
seconds. A reasonable choice is S=1024 bits and B=1.1 kb/s.
The transmission of the RTCP packets is meant to verify that the
implementation is ignoring non-BYE RTCP packets once it decides to
leave the group.
2.4.6 Timing out members
Active RTP participants are supposed to send periodic RTCP packets.
When a participant leaves the session, they may send a BYE, however
this is not required. Furthermore, BYE reconsideration may cause a
BYE to never be sent. As a result, participants must time out other
participants who have not sent an RTCP packet in a long time.
According to the specification, participants who have not sent an
RTCP packet in the last 5 intervals are timed out. This test
verifies that these timeouts are being performed correctly.
The RTP implementation joins a session as a receiver. The test
instrument waits for the first RTCP packet from the implementation.
Once it arrives, the test instrument sends 100 RTCP RR packets, each
with a different SDES and SSRC, and notes the time. This will cause
the implementation to believe that there are now 101 group
participants, causing it to increase its RTCP interval. The test
instrument continues to monitor the RTCP packets from the
implementation. As each RTCP packet is received, the time of its
reception is noted, and the interval between RTCP packets is stored.
The 100 participants spoofed by the test instrument should eventually
time out at the RTP implementation. This should cause the RTCP
interval to be reduced to its minimum.
The test is deemed successful if the interval between RTCP packets
after the first is no less than:
Ti > 101 * S / ( 2 * (e-1.5) * B * Fr)
and this minimum interval is sustained no later than Td seconds after
the transmission of the 100 RR's, where Td is:
Td = 7 * 101 * S / ( B * Fr )
and the interval between RTCP packets after this point is no less
than:
Tf > 2.5 / (e-1.5)
Perkins, et al. Informational [Page 14]
RFC 3158 RTP Testing Strategies August 2001
For this test to work, B and S must be chosen so Ti is on the order
of minutes. Recommended values are S = 1024 bits and B = 1.9 kbps.
2.4.7 Rapid SR's
The minimum interval for RTCP packets can be reduced for large
session bandwidths. The reduction applies to senders only. The
recommended algorithm for computing this minimum interval is 360
divided by the RTP session bandwidth, in kbps. For bandwidths larger
than 72 kbps, this interval is less than 5 seconds.
This test verifies the ability of an implementation to use a lower
RTCP minimum interval when it is a sender in a high bandwidth
session. The test can only be run on implementations that support
this reduction, since it is optional.
The RTP implementation is configured to join the session as a sender.
The session is configured to use 360 kbps. If the recommended
algorithm for computing the reduced minimum interval is used, the
result is a 1 second interval. If the RTP implementation uses a
different algorithm, the session bandwidth should be set in such a
way to cause the reduced minimum interval to be 1 second.
Once joining the session, the RTP implementation should begin to send
both RTP and RTCP packets. The interval between RTCP packets is
measured and stored until 100 intervals have been collected.
The test is deemed successful if the smallest interval is no less
than 1/2 a second, and the largest interval is no more than 1.5
seconds. The average should be close to 1 second.
3 RTP translators
RTP translators should be tested in the same manner as end systems,
with the addition of the tests described in this section.
The architecture for testing RTP translators is shown in Figure 3.
+-----------------+
+--------+ RTP Translator +-----+
| +-----------------+ |
| |
+-------+--------+ +-------+--------+
| First RTP | | Second RTP |
| implementation | | implementation |
+----------------+ +----------------+
Figure 3: Testing architecture for translators
Perkins, et al. Informational [Page 15]
RFC 3158 RTP Testing Strategies August 2001
The first RTP implementation is instructed to send data to the
translator, which forwards the packets to the other RTP
implementation, after translating then as desired. It should be
verified that the second implementation can playout the translated
packets.
It should be verified that the packets received by the second
implementation have the same SSRC as those sent by the first
implementation. The CC should be zero and CSRC fields should not be
present in the translated packets. The other RTP header fields may
be rewritten by the translator, depending on the translation being
performed, for example
o the payload type should change if the translator changes the
encoding of the data
o the timestamp may change if, for example, the encoding,
packetisation interval or framerate is changed
o the sequence number may change if the translator merges or
splits packets
o padding may be added or removed, in particular if the
translator is adding or removing encryption
o the marker bit may be rewritten
If the translator modifies the contents of the data packets it should
be verified that the corresponding change is made to the RTCP
packets, and that the receivers can correctly process the modified
RTCP packets. In particular
o the SSRC is unchanged by the translator
o if the translator changes the data encoding it should also
change the octet count field in the SR packets
o if the translator combines multiple data packets into one it
should also change the packet count field in SR packets
o if the translator changes the sampling frequency of the data
packets it should also change the RTP timestamp field in the SR
packets
o if the translator combines multiple data packets into one it
should also change the packet loss and extended highest
sequence number fields of RR packets flowing back from the
receiver (it is legal for the translator to strip the report
Perkins, et al. Informational [Page 16]
RFC 3158 RTP Testing Strategies August 2001
blocks and send empty SR/RR packets, but this should only be
done if the transformation of the data is such that the
reception reports cannot sensibly be translated)
o the translator should forward SDES CNAME packets
o the translator may forward other SDES packets
o the translator should forward BYE packets unchanged
o the translator should forward APP packets unchanged
When the translator exits it should be verified to send a BYE packet
to each receiver containing the SSRC of the other receiver. The
receivers should be verified to correctly process this BYE packet
(this is different to the BYE test in section 2.3.3 since multiple
SSRCs may be included in each BYE if the translator also sends its
own RTCP information).
4 RTP mixers
RTP mixers should be tested in the same manner as end systems, with
the addition of the tests described in this section.
The architecture for testing RTP mixers is shown in Figure 4.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?