I'm attempting to use rtcp-mux for audio and video streams and I'm
getting this error in my logs:
o.j.i.n.t.d.DtlsPacketTransformer - Dropping a DTLS record, because it
was received on the RTCP channel while rtcpmux is in use.
I've set rtcp-mux everywhere that I can find that its supported, so what
am I missing?
Libjitsi doesn't natively support rtcp-mux. It expects its data input stream to only read RTP packets, and its control input stream to only read RTCP packets. To achieve this, you can use ice4j's MultiplexingDatagramSocket (or MultiplexingSocket) classes to create DatagramSocket (or Socket) instances which read only a subset of the packets in the original instance. E.g. from the selected CandidatePair you can get a MultiplexingDatagramSocket, and from that you can get two DatagramSocket instances (one for RTP and one for RTCP) using getSocket() with an appropriate DatagramPacketFilter. Something like this:
MultiplexingDatagramSocket mainSocket = (MultiplexingDatagramSocket) pair.getIceSocketWrapper().getUDPSocket();
DatagramSocket rtpSocket = mainSocket.getSocket(new RTPFilter());
DatagramSocket rtcpSocket = mainSocket.getSocket(new RTCPFilter());
StreamConnector = new DefaultStreamConnector(rtpSocket, rtcpSocket, true);
Where RTPFilter and RTCPFilter are your own implementations (it makes sense to include these as part of either ice4j or libjitsi, but we don't have them; contributions would be welcome). You can probably base these on RtpChannelDatagramFilter.
The DTLS code in libjitsi is an exception in that it is somewhat aware of rtcp-mux. You need to:
1. Tell it that you want rtcp-mux (DtlsControl#setRtcpmux)
2. Include DTLS packets in the data stream (i.e. in RTPFilter)
3. Not include DTLS packets in the control stream, in order to avoid the warning that you see (in RTCPFilter).
We do something similar in videobridge[0,1], but it is somewhat messy because we also juggle multiple Channels and SCTP ("bundle").
Some code sections where its set, not in any kind of order here:
StreamConnector audioConnector = new DefaultStreamConnector(rtpSocket,
and my media stream target uses the rtpPair for its rtcpPair since I see
no other way to indicate that the muxing is in use:
This seems right.
MediaStreamTarget mediaStreamTarget = new
I checked github libjitsi HEAD and heres the "funny" note in the code:
On 08/02/16 19:32, Mondain wrote:
dev mailing list
Unsubscribe instructions and other list options: