Revert "Move stats ID generation from SSRC to local ID"

This reverts commit e357a4dd4e3b015f8281813f246de793589bd537.

Reason for revert: Looks like it's breaking some downstream projects.

Original change's description:
> Move stats ID generation from SSRC to local ID
> 
> This generates stats IDs for Track stats (which
> represents stats on the attachment of a track to
> a PeerConnection) from being SSRC-based to being
> based on an ID that is allocated when connecting the
> track to the PC.
> 
> This is a prerequisite to generating stats before
> the PeerConnection is connected.
> 
> Bug: webrtc:8673
> Change-Id: I82f6e521646b0c92b3af4dffb2cdee75e6dc10d4
> Reviewed-on: https://webrtc-review.googlesource.com/38360
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21582}

TBR=solenberg@webrtc.org,hbos@webrtc.org,hta@webrtc.org

Change-Id: I621c10236c02be01d82f4660168f0323b85e24af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8673
Reviewed-on: https://webrtc-review.googlesource.com/38681
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21586}
This commit is contained in:
Erik Språng
2018-01-11 15:16:32 +00:00
committed by Commit Bot
parent 875841d9d8
commit c0092c372e
14 changed files with 247 additions and 263 deletions

View File

@ -1506,31 +1506,6 @@ TEST_F(PeerConnectionInterfaceTest, AddTrackBeforeConnecting) {
EXPECT_TRUE(DoGetStats(nullptr));
}
TEST_F(PeerConnectionInterfaceTest, AttachmentIdIsSetOnAddTrack) {
CreatePeerConnectionWithoutDtls();
rtc::scoped_refptr<AudioTrackInterface> audio_track(
pc_factory_->CreateAudioTrack("audio_track", nullptr));
rtc::scoped_refptr<VideoTrackInterface> video_track(
pc_factory_->CreateVideoTrack(
"video_track", pc_factory_->CreateVideoSource(
std::unique_ptr<cricket::VideoCapturer>(
new cricket::FakeVideoCapturer()))));
auto audio_sender = pc_->AddTrack(audio_track, std::vector<std::string>());
auto video_sender = pc_->AddTrack(video_track, std::vector<std::string>());
EXPECT_TRUE(audio_sender.ok());
EXPECT_TRUE(video_sender.ok());
EXPECT_NE(0, video_sender.value()->AttachmentId());
EXPECT_NE(0, audio_sender.value()->AttachmentId());
}
TEST_F(PeerConnectionInterfaceTest, AttachmentIdIsSetOnAddStream) {
CreatePeerConnectionWithoutDtls();
AddVideoStream(kStreamLabel1);
auto senders = pc_->GetSenders();
EXPECT_EQ(1u, senders.size());
EXPECT_NE(0, senders[0]->AttachmentId());
}
TEST_F(PeerConnectionInterfaceTest, CreateOfferReceiveAnswer) {
InitiateCall();
WaitAndVerifyOnAddStream(kStreamLabel1);