Question about TRANSPORT_PRODUCE.

From the code from transport.cpp:

	const auto& producerRtpHeaderExtensionIds = producer->GetRtpHeaderExtensionIds();

				if (producerRtpHeaderExtensionIds.mid != 0u)
				{
					this->recvRtpHeaderExtensionIds.mid = producerRtpHeaderExtensionIds.mid;
				}

				if (producerRtpHeaderExtensionIds.rid != 0u)
				{
					this->recvRtpHeaderExtensionIds.rid = producerRtpHeaderExtensionIds.rid;
				}

				if (producerRtpHeaderExtensionIds.rrid != 0u)
				{
					this->recvRtpHeaderExtensionIds.rrid = producerRtpHeaderExtensionIds.rrid;
				}

				if (producerRtpHeaderExtensionIds.absSendTime != 0u)
				{
					this->recvRtpHeaderExtensionIds.absSendTime = producerRtpHeaderExtensionIds.absSendTime;
				}

				if (producerRtpHeaderExtensionIds.transportWideCc01 != 0u)
				{
					this->recvRtpHeaderExtensionIds.transportWideCc01 =
					  producerRtpHeaderExtensionIds.transportWideCc01;
				}

It seems if a transport has more than one producer and if the producers have different headerExtensionIds the new one will overlap the old ones?

Lets say producer 1

a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid

and producer 2

a=extmap:8 urn:ietf:params:rtp-hdrext:sdes:mid

Do I miss something here or its a bug?

Wellcome to SDP hell.

Yes, in SDP design.

2 Likes

Thanks for your reply, would you mind give me some references or what would happend if i pass two diffrent headerExtensionID to mediasoup?

Unexpected things (such an issues in previous Producers/Consumers) since that should not happen. New ext ids will replace previous ones. Just avoid that.

BTW I’d love to know the motivation for this question since this issue cannot happen if you use mediasoup client side libraries.

1 Like

We are using mediasoup-worker alone so I’m trying to read the source code of the C++ part. And this part is pretty annoying for me, i try to find the reason.
At first i think the webrtc will generate the same headerIds for for same key( Chrome always generates 4 for mid), but firefox not, then i think its keep the same in same PC, but still no doc for that.
It bothers me for a while, so i post the question here.
So accroding for your answer, it’s safe to asume in same PC they will use the same headerExtensionID for same key if its generate from a valid client, right?

1 Like

The requirement is per Transport so per SDP so per PeerConnection, yes.

1 Like