webrtcbin: rtcp codec stats are messed up
i'm regularily querying the RTCP stats of my webrtcbin using the "get-stats" signal. the reply of the promise is supposed to look kinda like this (transformed into JSON):
{
"stats": {
"codec-stats-src_0": {
"clock-rate": 48000,
"id": "codec-stats-src_0",
"payload-type": 111,
"timestamp": 12445409.612,
"type": "GST_WEBRTC_STATS_CODEC"
},
"codec-stats-src_1": {
"clock-rate": 90000,
"id": "codec-stats-src_1",
"payload-type": 100,
"timestamp": 12445409.612,
"type": "GST_WEBRTC_STATS_CODEC"
},
"ice-candidate-pair_webrtcnicetransport0": {
"id": "ice-candidate-pair_webrtcnicetransport0",
"timestamp": 12445409.612,
"type": "GST_WEBRTC_STATS_TRANSPORT"
},
"ice-candidate-pair_webrtcnicetransport2": {
"id": "ice-candidate-pair_webrtcnicetransport2",
"timestamp": 12445409.612,
"type": "GST_WEBRTC_STATS_TRANSPORT"
},
"peer-connection-stats": {
"data-channels-accepted": 0,
"data-channels-closed": 0,
"data-channels-opened": 0,
"data-channels-requested": 0,
"id": "peer-connection-stats",
"timestamp": 12445409.612,
"type": "GST_WEBRTC_STATS_PEER_CONNECTION"
},
"rtp-inbound-stream-stats_2001382111": {
"bytes-received": 157941,
"codec-id": "codec-stats-src_1",
"fir-count": 0,
"id": "rtp-inbound-stream-stats_2001382111",
"jitter": "inf",
"nack-count": 0,
"packets-lost": 0,
"packets-received": 202,
"pli-count": 0,
"remote-id": "rtp-remote-outbound-stream-stats_2001382111",
"ssrc": 2001382111,
"timestamp": 12445409.612,
"transport-id": "transport-stats_webrtcdtlstransport2",
"type": "GST_WEBRTC_STATS_INBOUND_RTP"
},
"rtp-inbound-stream-stats_2060799192": {
"bytes-received": 20752,
"codec-id": "codec-stats-src_0",
"fir-count": 0,
"id": "rtp-inbound-stream-stats_2060799192",
"jitter": "inf",
"nack-count": 0,
"packets-lost": 0,
"packets-received": 214,
"pli-count": 0,
"remote-id": "rtp-remote-outbound-stream-stats_2060799192",
"ssrc": 2060799192,
"timestamp": 12445409.612,
"transport-id": "transport-stats_webrtcdtlstransport0",
"type": "GST_WEBRTC_STATS_INBOUND_RTP"
},
"rtp-outbound-stream-stats_2001382111": {
"bytes-sent": 0,
"codec-id": "codec-stats-src_1",
"fir-count": 1,
"id": "rtp-outbound-stream-stats_2001382111",
"nack-count": 0,
"packets-sent": 0,
"pli-count": 0,
"remote-id": "rtp-remote-inbound-stream-stats_2001382111",
"ssrc": 2001382111,
"timestamp": 12445409.612,
"transport-id": "transport-stats_webrtcdtlstransport2",
"type": "GST_WEBRTC_STATS_OUTBOUND_RTP"
},
"rtp-outbound-stream-stats_2060799192": {
"bytes-sent": 0,
"codec-id": "codec-stats-src_0",
"fir-count": 0,
"id": "rtp-outbound-stream-stats_2060799192",
"nack-count": 0,
"packets-sent": 0,
"pli-count": 0,
"remote-id": "rtp-remote-inbound-stream-stats_2060799192",
"ssrc": 2060799192,
"timestamp": 12445409.612,
"transport-id": "transport-stats_webrtcdtlstransport0",
"type": "GST_WEBRTC_STATS_OUTBOUND_RTP"
},
"rtp-remote-inbound-stream-stats_2001382111": {
"codec-id": "codec-stats-src_1",
"id": "rtp-remote-inbound-stream-stats_2001382111",
"jitter": 0.0,
"local-id": "rtp-outbound-stream-stats_2001382111",
"packets-lost": 0,
"round-trip-time": 0.0,
"ssrc": 2001382111,
"timestamp": 12445409.612,
"transport-id": "transport-stats_webrtcdtlstransport2",
"type": "GST_WEBRTC_STATS_REMOTE_INBOUND_RTP"
},
"rtp-remote-inbound-stream-stats_2060799192": {
"codec-id": "codec-stats-src_0",
"id": "rtp-remote-inbound-stream-stats_2060799192",
"jitter": 0.0,
"local-id": "rtp-outbound-stream-stats_2060799192",
"packets-lost": 0,
"round-trip-time": 0.0,
"ssrc": 2060799192,
"timestamp": 12445409.612,
"transport-id": "transport-stats_webrtcdtlstransport0",
"type": "GST_WEBRTC_STATS_REMOTE_INBOUND_RTP"
},
"rtp-remote-outbound-stream-stats_2001382111": {
"codec-id": "codec-stats-src_1",
"id": "rtp-remote-outbound-stream-stats_2001382111",
"local-id": "rtp-inbound-stream-stats_2001382111",
"ssrc": 2001382111,
"timestamp": 12445409.612,
"transport-id": "transport-stats_webrtcdtlstransport2",
"type": "GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP"
},
"rtp-remote-outbound-stream-stats_2060799192": {
"codec-id": "codec-stats-src_0",
"id": "rtp-remote-outbound-stream-stats_2060799192",
"local-id": "rtp-inbound-stream-stats_2060799192",
"ssrc": 2060799192,
"timestamp": 12445409.612,
"transport-id": "transport-stats_webrtcdtlstransport0",
"type": "GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP"
},
"transport-stats_webrtcdtlstransport0": {
"id": "transport-stats_webrtcdtlstransport0",
"timestamp": 12445409.612,
"type": "GST_WEBRTC_STATS_TRANSPORT"
},
"transport-stats_webrtcdtlstransport2": {
"id": "transport-stats_webrtcdtlstransport2",
"timestamp": 12445409.612,
"type": "GST_WEBRTC_STATS_TRANSPORT"
}
},
"type": "stats"
}
starting with commit 9f684a2f (webrtcbin: implement support for group: BUNDLE) this changes in a way where all stream stats for every stream are still listed and counted seperately but all have either have the "codec-id": "codec-stats-src_1" or _0. therefore it's hard to distinguish between audio and video packets and it looks like a bug to me.