Questions about RTP header extension

605 views
Skip to first unread message

Piasy Xu

unread,
Oct 8, 2018, 11:06:31 AM10/8/18
to discuss-webrtc
Hi folks,

When browsing WebRTC's source code, I find there is a RTPExtensionType enum definition:

enum RTPExtensionType : int {
  kRtpExtensionNone,
  kRtpExtensionTransmissionTimeOffset,
  kRtpExtensionAudioLevel,
  kRtpExtensionAbsoluteSendTime,
  kRtpExtensionVideoRotation,
  kRtpExtensionTransportSequenceNumber,
  kRtpExtensionPlayoutDelay,
  kRtpExtensionVideoContentType,
  kRtpExtensionVideoTiming,
  kRtpExtensionFrameMarking,
  kRtpExtensionRtpStreamId,
  kRtpExtensionRepairedRtpStreamId,
  kRtpExtensionMid,
  kRtpExtensionGenericFrameDescriptor,
  kRtpExtensionNumberOfExtensions  // Must be the last entity in the enum.
};

https://webrtc.googlesource.com/src/+/ab09039d2ab6d66d3a57c6caa626034d9effb62e/modules/rtp_rtcp/include/rtp_rtcp_defines.h#100

and header extension data format graph:

// Coordination of Video Orientation in RTP streams.
//
// Coordination of Video Orientation consists in signaling of the current
// orientation of the image captured on the sender side to the receiver for
// appropriate rendering and displaying.
//
//    0                   1
//    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
//   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//   |  ID   | len=0 |0 0 0 0 C F R R|
//   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Where could I find reference materials about these header extensions definition? I googled a lot, but didn't find any RFC or RFC draft.

Thanks!

Lorenzo Miniero

unread,
Oct 8, 2018, 11:11:36 AM10/8/18
to discuss-webrtc
It's actually a 3GPP specification:

Lorenzo

Piasy Xu

unread,
Oct 8, 2018, 11:48:24 AM10/8/18
to discuss-webrtc
Thanks for your reply! The 3GPP spec defines the format of CVO header extension, but what about other header extensions?

在 2018年10月8日星期一 UTC+8下午11:11:36,Lorenzo Miniero写道:

Steve Anton

unread,
Oct 8, 2018, 1:13:12 PM10/8/18
to discuss...@googlegroups.com
Hi,

Each RTP header extension has a URI associated with it used for negotiation. The URI target usually describes the format/purpose of the header extension. Here's the URIs for the header extensions supported in WebRTC: https://codesearch.chromium.org/chromium/src/third_party/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h

Best,
Steve

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/0ca1fda7-905b-4bf6-a5a5-297697c72645%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Piasy Xu

unread,
Oct 8, 2018, 8:12:56 PM10/8/18
to discuss-webrtc
Hi Steve,

Thanks for your reply!

The kUri field is a good clue to find reference materials, but I still have one question: where defines the id of each extension?

For example, the AudioLevel extension, in rfc6464, I can find the extension format, but I can't find where defines the id should be 2.

在 2018年10月9日星期二 UTC+8上午1:13:12,Steve Anton写道:

Steve Anton

unread,
Oct 8, 2018, 8:33:13 PM10/8/18
to discuss...@googlegroups.com
The RTP header extension IDs are negotiated during the offer/answer exchange. See the a=extmap: lines: https://webrtchacks.com/sdp-anatomy/

Piasy Xu

unread,
Oct 8, 2018, 11:25:20 PM10/8/18
to discuss-webrtc
I get it, thank you Steve!

在 2018年10月9日星期二 UTC+8上午8:33:13,Steve Anton写道:
Reply all
Reply to author
Forward
0 new messages