Reland "Update RTCStatsCollector to work with RtpTransceivers"
Original change's description:
> Update RTCStatsCollector to work with RtpTransceivers
>
> Bug: webrtc:8764
> Change-Id: I8b442345869eb6d8b65fd12241ed7cb6e7d7ce3d
> Reviewed-on: https://webrtc-review.googlesource.com/49580
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22026}
Bug: webrtc:8764
Change-Id: I6a682824febf3f4f41397fc1a8dd7396c4ffa8e3
Reviewed-on: https://webrtc-review.googlesource.com/54160
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22064}
diff --git a/pc/trackmediainfomap_unittest.cc b/pc/trackmediainfomap_unittest.cc
index 93d6155..c135564 100644
--- a/pc/trackmediainfomap_unittest.cc
+++ b/pc/trackmediainfomap_unittest.cc
@@ -18,11 +18,11 @@
#include "api/rtpreceiverinterface.h"
#include "api/rtpsenderinterface.h"
-#include "api/test/mock_rtpreceiver.h"
-#include "api/test/mock_rtpsender.h"
#include "media/base/mediachannel.h"
#include "pc/audiotrack.h"
#include "pc/test/fakevideotracksource.h"
+#include "pc/test/mock_rtpreceiverinternal.h"
+#include "pc/test/mock_rtpsenderinternal.h"
#include "pc/videotrack.h"
#include "rtc_base/refcount.h"
#include "test/gtest.h"
@@ -42,7 +42,7 @@
return params;
}
-rtc::scoped_refptr<MockRtpSender> CreateMockRtpSender(
+rtc::scoped_refptr<MockRtpSenderInternal> CreateMockRtpSender(
cricket::MediaType media_type,
std::initializer_list<uint32_t> ssrcs,
rtc::scoped_refptr<MediaStreamTrackInterface> track) {
@@ -52,8 +52,8 @@
} else {
first_ssrc = 0;
}
- rtc::scoped_refptr<MockRtpSender> sender(
- new rtc::RefCountedObject<MockRtpSender>());
+ rtc::scoped_refptr<MockRtpSenderInternal> sender(
+ new rtc::RefCountedObject<MockRtpSenderInternal>());
EXPECT_CALL(*sender, track())
.WillRepeatedly(testing::Return(std::move(track)));
EXPECT_CALL(*sender, ssrc()).WillRepeatedly(testing::Return(first_ssrc));
@@ -65,12 +65,12 @@
return sender;
}
-rtc::scoped_refptr<MockRtpReceiver> CreateMockRtpReceiver(
+rtc::scoped_refptr<MockRtpReceiverInternal> CreateMockRtpReceiver(
cricket::MediaType media_type,
std::initializer_list<uint32_t> ssrcs,
rtc::scoped_refptr<MediaStreamTrackInterface> track) {
- rtc::scoped_refptr<MockRtpReceiver> receiver(
- new rtc::RefCountedObject<MockRtpReceiver>());
+ rtc::scoped_refptr<MockRtpReceiverInternal> receiver(
+ new rtc::RefCountedObject<MockRtpReceiverInternal>());
EXPECT_CALL(*receiver, track())
.WillRepeatedly(testing::Return(std::move(track)));
EXPECT_CALL(*receiver, media_type())
@@ -108,7 +108,7 @@
void AddRtpSenderWithSsrcs(std::initializer_list<uint32_t> ssrcs,
MediaStreamTrackInterface* local_track) {
- rtc::scoped_refptr<MockRtpSender> rtp_sender = CreateMockRtpSender(
+ rtc::scoped_refptr<MockRtpSenderInternal> rtp_sender = CreateMockRtpSender(
local_track->kind() == MediaStreamTrackInterface::kAudioKind
? cricket::MEDIA_TYPE_AUDIO
: cricket::MEDIA_TYPE_VIDEO,
@@ -136,7 +136,7 @@
void AddRtpReceiverWithSsrcs(std::initializer_list<uint32_t> ssrcs,
MediaStreamTrackInterface* remote_track) {
- rtc::scoped_refptr<MockRtpReceiver> rtp_receiver = CreateMockRtpReceiver(
+ auto rtp_receiver = CreateMockRtpReceiver(
remote_track->kind() == MediaStreamTrackInterface::kAudioKind
? cricket::MEDIA_TYPE_AUDIO
: cricket::MEDIA_TYPE_VIDEO,
@@ -173,8 +173,8 @@
protected:
cricket::VoiceMediaInfo* voice_media_info_;
cricket::VideoMediaInfo* video_media_info_;
- std::vector<rtc::scoped_refptr<RtpSenderInterface>> rtp_senders_;
- std::vector<rtc::scoped_refptr<RtpReceiverInterface>> rtp_receivers_;
+ std::vector<rtc::scoped_refptr<RtpSenderInternal>> rtp_senders_;
+ std::vector<rtc::scoped_refptr<RtpReceiverInternal>> rtp_receivers_;
std::unique_ptr<TrackMediaInfoMap> map_;
rtc::scoped_refptr<AudioTrack> local_audio_track_;
rtc::scoped_refptr<AudioTrack> remote_audio_track_;