Class Rtcp
Builds and reads the RTCP packets a video receiver needs: a compound of a receiver report, RFC 3550 6.4.2, and the sender's CNAME, with a picture loss indication, RFC 4585 6.3.1, when a keyframe is needed; and the time of sender reports, for the reports' round-trip fields.
Namespace: Uniform.Matrix.WebRtc.Rtp
Assembly: Uniform.Matrix.WebRtc.dll
Fields
|
Edit this page
View Source
Packet type of payload-specific feedback, such as a picture loss indication.
Declaration
public const byte PayloadFeedbackType = 206
Field Value
|
Edit this page
View Source
Packet type of a receiver report.
Declaration
public const byte ReceiverReportType = 201
Field Value
|
Edit this page
View Source
Packet type of a sender report.
Declaration
public const byte SenderReportType = 200
Field Value
|
Edit this page
View Source
Packet type of source descriptions.
Declaration
public const byte SourceDescriptionType = 202
Field Value
|
Edit this page
View Source
Packet type of transport feedback, such as a generic NACK.
Declaration
public const byte TransportFeedbackType = 205
Field Value
Methods
|
Edit this page
View Source
Return whether a compound packet asks the sender of mediaSsrc for a keyframe: a picture loss indication, RFC 4585 6.3.1, or a full intra request, RFC 5104 4.3.1, for that stream.
Declaration
public static bool AsksKeyframe(ReadOnlySpan<byte> compound, uint mediaSsrc)
Parameters
Returns
|
Edit this page
View Source
Return a compound packet: a receiver report from senderSsrc with blocks, its cname, and with pictureLossOf a picture loss indication for that stream.
Declaration
public static byte[] Compound(uint senderSsrc, IReadOnlyList<ReportBlock> blocks, string cname, uint? pictureLossOf = null)
Parameters
Returns
|
Edit this page
View Source
Return a generic NACK, RFC 4585 6.2.1, from senderSsrc: the packets lost of mediaSsrc should be sent again. Each entry names a packet and a mask of the 16 after it.
Declaration
public static byte[] Nack(uint senderSsrc, uint mediaSsrc, IEnumerable<ushort> lost)
Parameters
Returns
|
Edit this page
View Source
Return time as 64-bit NTP: seconds since 1900 in the high half, the fraction in the low.
Declaration
public static ulong Ntp(DateTimeOffset time)
Parameters
Returns
|
Edit this page
View Source
Return a picture loss indication from senderSsrc: the stream mediaSsrc lost pictures and should send a keyframe.
Declaration
public static byte[] PictureLossIndication(uint senderSsrc, uint mediaSsrc)
Parameters
| Type |
Name |
Description |
| uint |
senderSsrc |
|
| uint |
mediaSsrc |
|
Returns
|
Edit this page
View Source
Return the sequence numbers that generic NACKs in a compound packet ask of mediaSsrc.
Declaration
public static IReadOnlyList<ushort> ReadNacks(ReadOnlySpan<byte> compound, uint mediaSsrc)
Parameters
Returns
|
Edit this page
View Source
Return the bitrate a REMB in a compound packet asks of mediaSsrc, in bits per second; null when none does.
Declaration
public static long? ReadRemb(ReadOnlySpan<byte> compound, uint mediaSsrc)
Parameters
Returns
|
Edit this page
View Source
Return the sender reports in a compound packet: each sender's SSRC and the middle 32 bits of its NTP time, which a receiver report echoes.
Declaration
public static IReadOnlyList<(uint Ssrc, uint NtpMiddle)> ReadSenderReports(ReadOnlySpan<byte> compound)
Parameters
Returns
|
Edit this page
View Source
Return a receiver report from senderSsrc with up to 31 blocks.
Declaration
public static byte[] ReceiverReport(uint senderSsrc, IReadOnlyList<ReportBlock> blocks)
Parameters
Returns
|
Edit this page
View Source
Return a receiver estimated maximum bitrate, REMB, from senderSsrc: the stream mediaSsrc should send at most bitsPerSecond.
Declaration
public static byte[] Remb(uint senderSsrc, uint mediaSsrc, long bitsPerSecond)
Parameters
| Type |
Name |
Description |
| uint |
senderSsrc |
|
| uint |
mediaSsrc |
|
| long |
bitsPerSecond |
|
Returns
|
Edit this page
View Source
Return a sender report, RFC 3550 6.4.1, of senderSsrc: the wall-clock time ntp as 64-bit NTP, the stream's RTP time at that moment, the packets and payload bytes sent, and up to 31 report blocks on streams received.
Declaration
public static byte[] SenderReport(uint senderSsrc, ulong ntp, uint rtpTimestamp, uint packets, uint octets, IReadOnlyList<ReportBlock> blocks)
Parameters
Returns
|
Edit this page
View Source
Return a source description with the CNAME of ssrc.
Declaration
public static byte[] SourceDescription(uint ssrc, string cname)
Parameters
Returns