Update pc/ to not use implicit T* --> scoped_refptr<T> conversion
Bug: webrtc:13464
Change-Id: I729ec2306ec0d6df2e546b5dbb530f57065d60da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244090
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35623}
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc
index 0539559..4735805 100644
--- a/pc/rtc_stats_collector.cc
+++ b/pc/rtc_stats_collector.cc
@@ -1224,7 +1224,8 @@
std::vector<RequestInfo> requests_;
};
signaling_thread_->PostTask(std::make_unique<DeliveryTask>(
- this, cached_report_, std::move(requests)));
+ rtc::scoped_refptr<RTCStatsCollector>(this), cached_report_,
+ std::move(requests)));
} else if (!num_pending_partial_reports_) {
// Only start gathering stats if we're not already gathering stats. In the
// case of already gathering stats, `callback_` will be invoked when there
@@ -1660,14 +1661,16 @@
for (const RtpTransceiverStatsInfo& stats : transceiver_stats_infos_) {
std::vector<rtc::scoped_refptr<RtpSenderInternal>> senders;
for (const auto& sender : stats.transceiver->senders()) {
- senders.push_back(sender->internal());
+ senders.push_back(
+ rtc::scoped_refptr<RtpSenderInternal>(sender->internal()));
}
ProduceSenderMediaTrackStats(timestamp_us, *stats.track_media_info_map,
senders, report);
std::vector<rtc::scoped_refptr<RtpReceiverInternal>> receivers;
for (const auto& receiver : stats.transceiver->receivers()) {
- receivers.push_back(receiver->internal());
+ receivers.push_back(
+ rtc::scoped_refptr<RtpReceiverInternal>(receiver->internal()));
}
ProduceReceiverMediaTrackStats(timestamp_us, *stats.track_media_info_map,
receivers, report);
@@ -2210,11 +2213,13 @@
}
std::vector<rtc::scoped_refptr<RtpSenderInternal>> senders;
for (const auto& sender : transceiver->senders()) {
- senders.push_back(sender->internal());
+ senders.push_back(
+ rtc::scoped_refptr<RtpSenderInternal>(sender->internal()));
}
std::vector<rtc::scoped_refptr<RtpReceiverInternal>> receivers;
for (const auto& receiver : transceiver->receivers()) {
- receivers.push_back(receiver->internal());
+ receivers.push_back(
+ rtc::scoped_refptr<RtpReceiverInternal>(receiver->internal()));
}
stats.track_media_info_map = std::make_unique<TrackMediaInfoMap>(
std::move(voice_media_info), std::move(video_media_info), senders,