Let StreamStatistician::GetReceiveStreamDataCounters return counters by value

Tbr: ossu@webrtc.org # Trivial update of audio/ call site
Bug: None
Change-Id: I3763e83f6c0e18be1b696dd7b2ba5841045c9159
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148820
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28830}
This commit is contained in:
Niels Möller
2019-08-12 12:16:31 +02:00
committed by Commit Bot
parent 412282acf9
commit 58b496b4d8
5 changed files with 9 additions and 12 deletions

View File

@ -217,13 +217,12 @@ TEST_F(ReceiveStatisticsTest, GetReceiveStreamDataCounters) {
receive_statistics_->GetStatistician(kSsrc1);
ASSERT_TRUE(statistician != NULL);
StreamDataCounters counters;
statistician->GetReceiveStreamDataCounters(&counters);
StreamDataCounters counters = statistician->GetReceiveStreamDataCounters();
EXPECT_GT(counters.first_packet_time_ms, -1);
EXPECT_EQ(1u, counters.transmitted.packets);
receive_statistics_->OnRtpPacket(packet1_);
statistician->GetReceiveStreamDataCounters(&counters);
counters = statistician->GetReceiveStreamDataCounters();
EXPECT_GT(counters.first_packet_time_ms, -1);
EXPECT_EQ(2u, counters.transmitted.packets);
}