stats: fix remote-outbound-rtp id for video
which was using the audio type to generate the id. Safe change since the id is supposed to be random. BUG=webrtc:12529 Change-Id: I9909c6d320f6f9239f0466599eba1f0eacf00adf Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347683 Reviewed-by: Florent Castelli <orphis@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Philipp Hancke <phancke@meta.com> Cr-Commit-Position: refs/heads/main@{#42142}
This commit is contained in:
parent
15f40ec2fc
commit
622ca1a011
@ -517,7 +517,7 @@ std::unique_ptr<RTCRemoteOutboundRtpStreamStats>
|
||||
CreateRemoteOutboundMediaStreamStats(
|
||||
const cricket::MediaReceiverInfo& media_receiver_info,
|
||||
const std::string& mid,
|
||||
const std::string& kind,
|
||||
cricket::MediaType media_type,
|
||||
const RTCInboundRtpStreamStats& inbound_audio_stats,
|
||||
const std::string& transport_id) {
|
||||
if (!media_receiver_info.last_sender_report_timestamp_ms.has_value()) {
|
||||
@ -531,13 +531,13 @@ CreateRemoteOutboundMediaStreamStats(
|
||||
// Create.
|
||||
auto stats = std::make_unique<RTCRemoteOutboundRtpStreamStats>(
|
||||
/*id=*/RTCRemoteOutboundRTPStreamStatsIDFromSSRC(
|
||||
cricket::MEDIA_TYPE_AUDIO, media_receiver_info.ssrc()),
|
||||
media_type, media_receiver_info.ssrc()),
|
||||
Timestamp::Millis(*media_receiver_info.last_sender_report_timestamp_ms));
|
||||
|
||||
// Populate.
|
||||
// - RTCRtpStreamStats.
|
||||
stats->ssrc = media_receiver_info.ssrc();
|
||||
stats->kind = kind;
|
||||
stats->kind = cricket::MediaTypeToString(media_type);
|
||||
stats->transport_id = transport_id;
|
||||
if (inbound_audio_stats.codec_id.has_value()) {
|
||||
stats->codec_id = *inbound_audio_stats.codec_id;
|
||||
@ -1711,7 +1711,8 @@ void RTCStatsCollector::ProduceAudioRTPStreamStats_n(
|
||||
}
|
||||
// Remote-outbound.
|
||||
auto remote_outbound_audio = CreateRemoteOutboundMediaStreamStats(
|
||||
voice_receiver_info, mid, "audio", *inbound_audio_ptr, transport_id);
|
||||
voice_receiver_info, mid, cricket::MEDIA_TYPE_AUDIO, *inbound_audio_ptr,
|
||||
transport_id);
|
||||
// Add stats.
|
||||
if (remote_outbound_audio) {
|
||||
// When the remote outbound stats are available, the remote ID for the
|
||||
@ -1804,7 +1805,8 @@ void RTCStatsCollector::ProduceVideoRTPStreamStats_n(
|
||||
}
|
||||
// Remote-outbound.
|
||||
auto remote_outbound_video = CreateRemoteOutboundMediaStreamStats(
|
||||
video_receiver_info, mid, "video", *inbound_video_ptr, transport_id);
|
||||
video_receiver_info, mid, cricket::MEDIA_TYPE_VIDEO, *inbound_video_ptr,
|
||||
transport_id);
|
||||
// Add stats.
|
||||
if (remote_outbound_video) {
|
||||
// When the remote outbound stats are available, the remote ID for the
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user