Remove GetReceiveBandwidthEstimatorStats.

Removes unnecessary non-standard stats that we don't really make use of.

BUG=
R=pthatcher@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47379004

Cr-Commit-Position: refs/heads/master@{#8588}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8588 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2015-03-04 08:54:32 +00:00
parent 7572d85aa8
commit 058b1f17ac
23 changed files with 51 additions and 206 deletions

View File

@ -280,19 +280,6 @@ void ExtractStats(const cricket::BandwidthEstimationInfo& info,
info.transmit_bitrate);
report->AddValue(StatsReport::kStatsValueNameBucketDelay,
info.bucket_delay);
if (level >= PeerConnectionInterface::kStatsOutputLevelDebug) {
report->AddValue(
StatsReport::kStatsValueNameRecvPacketGroupPropagationDeltaSumDebug,
info.total_received_propagation_delta_ms);
if (info.recent_received_propagation_delta_ms.size() > 0) {
report->AddValue(
StatsReport::kStatsValueNameRecvPacketGroupPropagationDeltaDebug,
info.recent_received_propagation_delta_ms);
report->AddValue(
StatsReport::kStatsValueNameRecvPacketGroupArrivalTimeDebug,
info.recent_received_packet_group_arrival_time_ms);
}
}
}
void ExtractRemoteStats(const cricket::MediaSenderInfo& info,
@ -817,12 +804,8 @@ void StatsCollector::ExtractVideoInfo(
if (!session_->video_channel())
return;
cricket::StatsOptions options;
options.include_received_propagation_stats =
(level >= PeerConnectionInterface::kStatsOutputLevelDebug) ?
true : false;
cricket::VideoMediaInfo video_info;
if (!session_->video_channel()->GetStats(options, &video_info)) {
if (!session_->video_channel()->GetStats(&video_info)) {
LOG(LS_ERROR) << "Failed to get video channel stats.";
return;
}

View File

@ -47,7 +47,6 @@
#include "webrtc/base/network.h"
#include "webrtc/p2p/base/fakesession.h"
using cricket::StatsOptions;
using rtc::scoped_ptr;
using testing::_;
using testing::DoAll;
@ -98,7 +97,7 @@ class MockVideoMediaChannel : public cricket::FakeVideoMediaChannel {
MockVideoMediaChannel() : cricket::FakeVideoMediaChannel(NULL) {}
// MOCK_METHOD0(transport_channel, cricket::TransportChannel*());
MOCK_METHOD2(GetStats, bool(const StatsOptions&, cricket::VideoMediaInfo*));
MOCK_METHOD1(GetStats, bool(cricket::VideoMediaInfo*));
};
class MockVoiceMediaChannel : public cricket::FakeVoiceMediaChannel {
@ -809,8 +808,8 @@ TEST_F(StatsCollectorTest, BytesCounterHandles64Bits) {
EXPECT_CALL(session_, video_channel()).WillRepeatedly(Return(&video_channel));
EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull());
EXPECT_CALL(*media_channel, GetStats(_, _))
.WillOnce(DoAll(SetArgPointee<1>(stats_read),
EXPECT_CALL(*media_channel, GetStats(_))
.WillOnce(DoAll(SetArgPointee<0>(stats_read),
Return(true)));
stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard);
stats.GetStats(NULL, &reports);
@ -849,9 +848,8 @@ TEST_F(StatsCollectorTest, BandwidthEstimationInfoIsReported) {
EXPECT_CALL(session_, video_channel()).WillRepeatedly(Return(&video_channel));
EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull());
EXPECT_CALL(*media_channel, GetStats(_, _))
.WillOnce(DoAll(SetArgPointee<1>(stats_read),
Return(true)));
EXPECT_CALL(*media_channel, GetStats(_))
.WillOnce(DoAll(SetArgPointee<0>(stats_read), Return(true)));
stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard);
stats.GetStats(NULL, &reports);
@ -944,8 +942,8 @@ TEST_F(StatsCollectorTest, TrackAndSsrcObjectExistAfterUpdateSsrcStats) {
EXPECT_CALL(session_, video_channel()).WillRepeatedly(Return(&video_channel));
EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull());
EXPECT_CALL(*media_channel, GetStats(_, _))
.WillOnce(DoAll(SetArgPointee<1>(stats_read),
EXPECT_CALL(*media_channel, GetStats(_))
.WillOnce(DoAll(SetArgPointee<0>(stats_read),
Return(true)));
stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard);
@ -1005,8 +1003,8 @@ TEST_F(StatsCollectorTest, TransportObjectLinkedFromSsrcObject) {
EXPECT_CALL(session_, video_channel()).WillRepeatedly(Return(&video_channel));
EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull());
EXPECT_CALL(*media_channel, GetStats(_, _))
.WillRepeatedly(DoAll(SetArgPointee<1>(stats_read),
EXPECT_CALL(*media_channel, GetStats(_))
.WillRepeatedly(DoAll(SetArgPointee<0>(stats_read),
Return(true)));
InitSessionStats(kVcName);
@ -1097,8 +1095,8 @@ TEST_F(StatsCollectorTest, RemoteSsrcInfoIsPresent) {
EXPECT_CALL(session_, video_channel()).WillRepeatedly(Return(&video_channel));
EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull());
EXPECT_CALL(*media_channel, GetStats(_, _))
.WillRepeatedly(DoAll(SetArgPointee<1>(stats_read),
EXPECT_CALL(*media_channel, GetStats(_))
.WillRepeatedly(DoAll(SetArgPointee<0>(stats_read),
Return(true)));
stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard);
@ -1134,8 +1132,8 @@ TEST_F(StatsCollectorTest, ReportsFromRemoteTrack) {
EXPECT_CALL(session_, video_channel()).WillRepeatedly(Return(&video_channel));
EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull());
EXPECT_CALL(*media_channel, GetStats(_, _))
.WillOnce(DoAll(SetArgPointee<1>(stats_read),
EXPECT_CALL(*media_channel, GetStats(_))
.WillOnce(DoAll(SetArgPointee<0>(stats_read),
Return(true)));
stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard);
@ -1415,52 +1413,6 @@ TEST_F(StatsCollectorTest, UnsupportedDigestIgnored) {
remote_cert, std::vector<std::string>());
}
// Verifies the correct optons are passed to the VideoMediaChannel when using
// verbose output level.
TEST_F(StatsCollectorTest, StatsOutputLevelVerbose) {
StatsCollectorForTest stats(&session_);
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, "", false, NULL);
cricket::VideoMediaInfo stats_read;
cricket::BandwidthEstimationInfo bwe;
bwe.total_received_propagation_delta_ms = 10;
bwe.recent_received_propagation_delta_ms.push_back(100);
bwe.recent_received_propagation_delta_ms.push_back(200);
bwe.recent_received_packet_group_arrival_time_ms.push_back(1000);
bwe.recent_received_packet_group_arrival_time_ms.push_back(2000);
stats_read.bw_estimations.push_back(bwe);
EXPECT_CALL(session_, video_channel())
.WillRepeatedly(Return(&video_channel));
EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull());
StatsOptions options;
options.include_received_propagation_stats = true;
EXPECT_CALL(*media_channel, GetStats(
Field(&StatsOptions::include_received_propagation_stats, true),
_))
.WillOnce(DoAll(SetArgPointee<1>(stats_read),
Return(true)));
stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelDebug);
StatsReports reports; // returned values.
stats.GetStats(NULL, &reports);
std::string result = ExtractBweStatsValue(
reports,
StatsReport::kStatsValueNameRecvPacketGroupPropagationDeltaSumDebug);
EXPECT_EQ("10", result);
result = ExtractBweStatsValue(
reports,
StatsReport::kStatsValueNameRecvPacketGroupPropagationDeltaDebug);
EXPECT_EQ("[100, 200]", result);
result = ExtractBweStatsValue(
reports, StatsReport::kStatsValueNameRecvPacketGroupArrivalTimeDebug);
EXPECT_EQ("[1000, 2000]", result);
}
// This test verifies that a local stats object can get statistics via
// AudioTrackInterface::GetStats() method.
TEST_F(StatsCollectorTest, GetStatsFromLocalAudioTrack) {

View File

@ -402,12 +402,6 @@ const char* StatsReport::Value::display_name() const {
return "googPreferredJitterBufferMs";
case kStatsValueNameReadable:
return "googReadable";
case kStatsValueNameRecvPacketGroupArrivalTimeDebug:
return "googReceivedPacketGroupArrivalTimeDebug";
case kStatsValueNameRecvPacketGroupPropagationDeltaDebug:
return "googReceivedPacketGroupPropagationDeltaDebug";
case kStatsValueNameRecvPacketGroupPropagationDeltaSumDebug:
return "googReceivedPacketGroupPropagationDeltaSumDebug";
case kStatsValueNameRemoteAddress:
return "googRemoteAddress";
case kStatsValueNameRemoteCandidateId:

View File

@ -200,9 +200,6 @@ class StatsReport {
kStatsValueNamePlisReceived,
kStatsValueNamePlisSent,
kStatsValueNamePreferredJitterBufferMs,
kStatsValueNameRecvPacketGroupArrivalTimeDebug,
kStatsValueNameRecvPacketGroupPropagationDeltaDebug,
kStatsValueNameRecvPacketGroupPropagationDeltaSumDebug,
kStatsValueNameRemoteAddress,
kStatsValueNameRemoteCandidateId,
kStatsValueNameRemoteCandidateType,

View File

@ -583,8 +583,7 @@ class FakeVideoMediaChannel : public RtpHelper<VideoMediaChannel> {
return true;
}
virtual bool GetStats(const StatsOptions& options,
VideoMediaInfo* info) { return false; }
virtual bool GetStats(VideoMediaInfo* info) { return false; }
virtual bool SendIntraFrame() {
sent_intra_frame_ = true;
return true;

View File

@ -294,9 +294,7 @@ class FileVideoChannel : public VideoMediaChannel {
virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) {
return false;
}
virtual bool GetStats(const StatsOptions& options, VideoMediaInfo* info) {
return true;
}
virtual bool GetStats(VideoMediaInfo* info) { return true; }
virtual bool SendIntraFrame() { return false; }
virtual bool RequestIntraFrame() { return false; }

View File

@ -944,8 +944,7 @@ struct BandwidthEstimationInfo {
actual_enc_bitrate(0),
retransmit_bitrate(0),
transmit_bitrate(0),
bucket_delay(0),
total_received_propagation_delta_ms(0) {
bucket_delay(0) {
}
int available_send_bandwidth;
@ -955,11 +954,6 @@ struct BandwidthEstimationInfo {
int retransmit_bitrate;
int transmit_bitrate;
int64_t bucket_delay;
// The following stats are only valid when
// StatsOptions::include_received_propagation_stats is true.
int total_received_propagation_delta_ms;
std::vector<int> recent_received_propagation_delta_ms;
std::vector<int64_t> recent_received_packet_group_arrival_time_ms;
};
struct VoiceMediaInfo {
@ -991,12 +985,6 @@ struct DataMediaInfo {
std::vector<DataReceiverInfo> receivers;
};
struct StatsOptions {
StatsOptions() : include_received_propagation_stats(false) {}
bool include_received_propagation_stats;
};
class VoiceMediaChannel : public MediaChannel {
public:
enum Error {
@ -1115,13 +1103,7 @@ class VideoMediaChannel : public MediaChannel {
// |capturer|. If |ssrc| is non zero create a new stream with |ssrc| as SSRC.
virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) = 0;
// Gets quality stats for the channel.
virtual bool GetStats(const StatsOptions& options, VideoMediaInfo* info) = 0;
// This is needed for MediaMonitor to use the same template for voice, video
// and data MediaChannels.
bool GetStats(VideoMediaInfo* info) {
return GetStats(StatsOptions(), info);
}
virtual bool GetStats(VideoMediaInfo* info) = 0;
// Send an intra frame to the receivers.
virtual bool SendIntraFrame() = 0;
// Reuqest each of the remote senders to send an intra frame.

View File

@ -845,7 +845,7 @@ class VideoMediaChannelTest : public testing::Test,
EXPECT_FRAME_WAIT(frame + i * fps, codec.width, codec.height, kTimeout);
}
cricket::VideoMediaInfo info;
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
// For webrtc, |framerate_sent| and |framerate_rcvd| depend on periodic
// callbacks (1 sec).
// Received |fraction_lost| and |packets_lost| are from sent RTCP packet.
@ -867,7 +867,7 @@ class VideoMediaChannelTest : public testing::Test,
SendReceiveManyAndGetStats(DefaultCodec(), kDurationSec, kFps);
cricket::VideoMediaInfo info;
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
// TODO(whyuan): bytes_sent and bytes_rcvd are different. Are both payload?
@ -929,7 +929,7 @@ class VideoMediaChannelTest : public testing::Test,
EXPECT_FRAME_ON_RENDERER_WAIT(
renderer2, 1, DefaultCodec().width, DefaultCodec().height, kTimeout);
cricket::VideoMediaInfo info;
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
// TODO(whyuan): bytes_sent and bytes_rcvd are different. Are both payload?
@ -995,7 +995,7 @@ class VideoMediaChannelTest : public testing::Test,
cricket::VideoMediaInfo info;
for (uint32 i = 0; i < kTimeout; ++i) {
rtc::Thread::Current()->ProcessMessages(1);
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(2U, info.senders.size());
if (info.senders[0].packets_sent + info.senders[1].packets_sent ==
NumRtpPackets()) {

View File

@ -2520,8 +2520,7 @@ bool WebRtcVideoMediaChannel::SetRenderer(uint32 ssrc,
return true;
}
bool WebRtcVideoMediaChannel::GetStats(const StatsOptions& options,
VideoMediaInfo* info) {
bool WebRtcVideoMediaChannel::GetStats(VideoMediaInfo* info) {
// Get sender statistics and build VideoSenderInfo.
unsigned int total_bitrate_sent = 0;
unsigned int video_bitrate_sent = 0;
@ -2763,24 +2762,6 @@ bool WebRtcVideoMediaChannel::GetStats(const StatsOptions& options,
// Build BandwidthEstimationInfo.
// TODO(zhurunz): Add real unittest for this.
BandwidthEstimationInfo bwe;
// TODO(jiayl): remove the condition when the necessary changes are available
// outside the dev branch.
if (options.include_received_propagation_stats) {
webrtc::ReceiveBandwidthEstimatorStats additional_stats;
// Only call for the default channel because the returned stats are
// collected for all the channels using the same estimator.
if (engine_->vie()->rtp()->GetReceiveBandwidthEstimatorStats(
GetDefaultRecvChannel()->channel_id(), &additional_stats) == 0) {
bwe.total_received_propagation_delta_ms =
additional_stats.total_propagation_time_delta_ms;
bwe.recent_received_propagation_delta_ms.swap(
additional_stats.recent_propagation_time_delta_ms);
bwe.recent_received_packet_group_arrival_time_ms.swap(
additional_stats.recent_arrival_time_ms);
}
}
engine_->vie()->rtp()->GetPacerQueuingDelayMs(
GetDefaultRecvChannel()->channel_id(), &bwe.bucket_delay);

View File

@ -279,8 +279,7 @@ class WebRtcVideoMediaChannel : public rtc::MessageHandler,
virtual bool AddRecvStream(const StreamParams& sp) OVERRIDE;
virtual bool RemoveRecvStream(uint32 ssrc) OVERRIDE;
virtual bool SetRenderer(uint32 ssrc, VideoRenderer* renderer) OVERRIDE;
virtual bool GetStats(const StatsOptions& options,
VideoMediaInfo* info) OVERRIDE;
virtual bool GetStats(VideoMediaInfo* info) OVERRIDE;
virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) OVERRIDE;
virtual bool SendIntraFrame() OVERRIDE;
virtual bool RequestIntraFrame() OVERRIDE;

View File

@ -1001,8 +1001,7 @@ bool WebRtcVideoChannel2::GetRenderer(uint32 ssrc, VideoRenderer** renderer) {
return true;
}
bool WebRtcVideoChannel2::GetStats(const StatsOptions& options,
VideoMediaInfo* info) {
bool WebRtcVideoChannel2::GetStats(VideoMediaInfo* info) {
info->Clear();
FillSenderStats(info);
FillReceiverStats(info);

View File

@ -201,8 +201,7 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
virtual bool AddRecvStream(const StreamParams& sp) override;
virtual bool RemoveRecvStream(uint32 ssrc) override;
virtual bool SetRenderer(uint32 ssrc, VideoRenderer* renderer) override;
virtual bool GetStats(const StatsOptions& options,
VideoMediaInfo* info) override;
virtual bool GetStats(VideoMediaInfo* info) override;
virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) override;
virtual bool SendIntraFrame() override;
virtual bool RequestIntraFrame() override;

View File

@ -1681,7 +1681,7 @@ TEST_F(WebRtcVideoChannel2Test, EstimatesNtpStartTimeAndElapsedTimeCorrectly) {
// Verify that NTP time has been correctly deduced.
cricket::VideoMediaInfo info;
ASSERT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
ASSERT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1u, info.receivers.size());
EXPECT_EQ(kInitialNtpTimeMs, info.receivers[0].capture_start_ntp_time_ms);
}
@ -2074,7 +2074,7 @@ TEST_F(WebRtcVideoChannel2Test, GetStatsReportsCpuOveruseMetrics) {
stream->SetStats(stats);
cricket::VideoMediaInfo info;
ASSERT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
ASSERT_TRUE(channel_->GetStats(&info));
EXPECT_EQ(stats.avg_encode_time_ms, info.senders[0].avg_encode_ms);
EXPECT_EQ(stats.encode_usage_percent, info.senders[0].encode_usage_percent);
}
@ -2091,7 +2091,7 @@ TEST_F(WebRtcVideoChannel2Test, GetStatsReportsUpperResolution) {
stream->SetStats(stats);
cricket::VideoMediaInfo info;
ASSERT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
ASSERT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1u, info.senders.size());
EXPECT_EQ(123, info.senders[0].send_frame_width);
EXPECT_EQ(90, info.senders[0].send_frame_height);
@ -2127,7 +2127,7 @@ TEST_F(WebRtcVideoChannel2Test, GetStatsTracksAdaptationStats) {
// Capture format VGA -> adapt (OnCpuResolutionRequest downgrade) -> VGA/2.
EXPECT_TRUE(video_capturer_vga.CaptureFrame());
cricket::VideoMediaInfo info;
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
EXPECT_EQ(1, info.senders[0].adapt_changes);
EXPECT_EQ(CoordinatedVideoAdapter::ADAPTREASON_CPU,
@ -2137,7 +2137,7 @@ TEST_F(WebRtcVideoChannel2Test, GetStatsTracksAdaptationStats) {
overuse_callback->OnLoadUpdate(webrtc::LoadObserver::kUnderuse);
EXPECT_TRUE(video_capturer_vga.CaptureFrame());
info.Clear();
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
EXPECT_EQ(2, info.senders[0].adapt_changes);
EXPECT_EQ(CoordinatedVideoAdapter::ADAPTREASON_NONE,
@ -2146,7 +2146,7 @@ TEST_F(WebRtcVideoChannel2Test, GetStatsTracksAdaptationStats) {
// No capturer (no adapter). Adapt changes from old adapter should be kept.
EXPECT_TRUE(channel_->SetCapturer(kSsrcs3[0], NULL));
info.Clear();
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
EXPECT_EQ(2, info.senders[0].adapt_changes);
EXPECT_EQ(CoordinatedVideoAdapter::ADAPTREASON_NONE,
@ -2163,7 +2163,7 @@ TEST_F(WebRtcVideoChannel2Test, GetStatsTracksAdaptationStats) {
overuse_callback->OnLoadUpdate(webrtc::LoadObserver::kOveruse);
EXPECT_TRUE(video_capturer_hd.CaptureFrame());
info.Clear();
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
EXPECT_EQ(3, info.senders[0].adapt_changes);
EXPECT_EQ(CoordinatedVideoAdapter::ADAPTREASON_CPU,
@ -2187,7 +2187,7 @@ TEST_F(WebRtcVideoChannel2Test,
stream->SetStats(stats);
cricket::VideoMediaInfo info;
ASSERT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
ASSERT_TRUE(channel_->GetStats(&info));
EXPECT_EQ(7, info.senders[0].firs_rcvd);
EXPECT_EQ(10, info.senders[0].nacks_rcvd);
EXPECT_EQ(13, info.senders[0].plis_rcvd);
@ -2203,7 +2203,7 @@ TEST_F(WebRtcVideoChannel2Test,
stream->SetStats(stats);
cricket::VideoMediaInfo info;
ASSERT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
ASSERT_TRUE(channel_->GetStats(&info));
EXPECT_EQ(stats.rtcp_packet_type_counts.fir_packets,
info.receivers[0].firs_sent);
EXPECT_EQ(stats.rtcp_packet_type_counts.nack_packets,
@ -2225,7 +2225,7 @@ TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesDecodeStatsCorrectly) {
stream->SetStats(stats);
cricket::VideoMediaInfo info;
ASSERT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
ASSERT_TRUE(channel_->GetStats(&info));
EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms);
EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms);
EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms);
@ -2243,7 +2243,7 @@ TEST_F(WebRtcVideoChannel2Test, TranslatesCallStatsCorrectly) {
fake_call_->SetStats(stats);
cricket::VideoMediaInfo info;
ASSERT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
ASSERT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(2u, info.senders.size());
EXPECT_EQ(stats.rtt_ms, info.senders[0].rtt_ms);
EXPECT_EQ(stats.rtt_ms, info.senders[1].rtt_ms);
@ -2271,7 +2271,7 @@ TEST_F(WebRtcVideoChannel2Test, TranslatesSenderBitrateStatsCorrectly) {
stream2->SetStats(stats2);
cricket::VideoMediaInfo info;
ASSERT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
ASSERT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(2u, info.senders.size());
// Assuming stream and stream2 corresponds to senders[0] and [1] respectively
// is OK as std::maps are sorted and AddSendStream() gives increasing SSRCs.
@ -2421,7 +2421,7 @@ class WebRtcVideoChannel2SimulcastTest : public WebRtcVideoEngine2SimulcastTest,
}
}
cricket::VideoMediaInfo info;
ASSERT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
ASSERT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1u, info.senders.size());
EXPECT_EQ(total_max_bitrate_bps, info.senders[0].preferred_bitrate);

View File

@ -1745,7 +1745,7 @@ TEST_F(WebRtcVideoEngineTestFake, SendReceiveBitratesStats) {
EXPECT_NE(first_receive_channel, second_receive_channel);
cricket::VideoMediaInfo info;
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.bw_estimations.size());
ASSERT_EQ(0, info.bw_estimations[0].actual_enc_bitrate);
ASSERT_EQ(0, info.bw_estimations[0].transmit_bitrate);
@ -1771,7 +1771,7 @@ TEST_F(WebRtcVideoEngineTestFake, SendReceiveBitratesStats) {
vie_.SetReceiveBandwidthEstimate(first_receive_channel, receive_bandwidth);
info.Clear();
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.bw_estimations.size());
ASSERT_EQ(send_video_bitrate, info.bw_estimations[0].actual_enc_bitrate);
ASSERT_EQ(send_total_bitrate, info.bw_estimations[0].transmit_bitrate);
@ -1789,7 +1789,7 @@ TEST_F(WebRtcVideoEngineTestFake, SendReceiveBitratesStats) {
EXPECT_EQ(0, vie_.StartReceive(second_receive_channel));
info.Clear();
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.bw_estimations.size());
ASSERT_EQ(2 * send_video_bitrate, info.bw_estimations[0].actual_enc_bitrate);
ASSERT_EQ(2 * send_total_bitrate, info.bw_estimations[0].transmit_bitrate);
@ -3729,7 +3729,7 @@ TEST_F(WebRtcVideoEngineSimulcastTestFake, GetStatsWithMultipleSsrcs) {
// Get stats and verify there are 2 ssrcs.
cricket::VideoMediaInfo info;
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
ASSERT_EQ(2U, info.senders[0].ssrcs().size());
EXPECT_EQ(1U, info.senders[0].ssrcs()[0]);
@ -4176,7 +4176,7 @@ TEST_F(WebRtcVideoEngineSimulcastTestFake, GetAdaptStats) {
// Capture format VGA -> adapt (OnCpuResolutionRequest downgrade) -> VGA/2.
EXPECT_TRUE(video_capturer_vga.CaptureFrame());
cricket::VideoMediaInfo info;
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
EXPECT_EQ(1, info.senders[0].adapt_changes);
EXPECT_EQ(cricket::CoordinatedVideoAdapter::ADAPTREASON_CPU,
@ -4186,7 +4186,7 @@ TEST_F(WebRtcVideoEngineSimulcastTestFake, GetAdaptStats) {
observer->NormalUsage();
EXPECT_TRUE(video_capturer_vga.CaptureFrame());
info.Clear();
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
EXPECT_EQ(2, info.senders[0].adapt_changes);
EXPECT_EQ(cricket::CoordinatedVideoAdapter::ADAPTREASON_NONE,
@ -4196,7 +4196,7 @@ TEST_F(WebRtcVideoEngineSimulcastTestFake, GetAdaptStats) {
EXPECT_TRUE(channel_->SetCapturer(kSsrcs3[0], NULL));
EXPECT_TRUE(vie_.GetCpuOveruseObserver(channel0) == NULL);
info.Clear();
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
EXPECT_EQ(2, info.senders[0].adapt_changes);
EXPECT_EQ(cricket::CoordinatedVideoAdapter::ADAPTREASON_NONE,
@ -4215,7 +4215,7 @@ TEST_F(WebRtcVideoEngineSimulcastTestFake, GetAdaptStats) {
observer->OveruseDetected();
EXPECT_TRUE(video_capturer_hd.CaptureFrame());
info.Clear();
EXPECT_TRUE(channel_->GetStats(cricket::StatsOptions(), &info));
EXPECT_TRUE(channel_->GetStats(&info));
ASSERT_EQ(1U, info.senders.size());
EXPECT_EQ(3, info.senders[0].adapt_changes);
EXPECT_EQ(cricket::CoordinatedVideoAdapter::ADAPTREASON_CPU,

View File

@ -1775,10 +1775,9 @@ void VideoChannel::ChangeState() {
LOG(LS_INFO) << "Changing video state, recv=" << recv << " send=" << send;
}
bool VideoChannel::GetStats(
const StatsOptions& options, VideoMediaInfo* stats) {
return InvokeOnWorker(Bind(&VideoMediaChannel::GetStats,
media_channel(), options, stats));
bool VideoChannel::GetStats(VideoMediaInfo* stats) {
return InvokeOnWorker(
Bind(&VideoMediaChannel::GetStats, media_channel(), stats));
}
void VideoChannel::StartMediaMonitor(int cms) {

View File

@ -529,7 +529,7 @@ class VideoChannel : public BaseChannel {
int GetScreencastFps(uint32 ssrc);
int GetScreencastMaxPixels(uint32 ssrc);
// Get statistics about the current media session.
bool GetStats(const StatsOptions& options, VideoMediaInfo* stats);
bool GetStats(VideoMediaInfo* stats);
sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&>
SignalConnectionMonitor;

View File

@ -406,13 +406,6 @@ class WEBRTC_DLLEXPORT ViERTP_RTCP {
const int video_channel,
unsigned int* estimated_bandwidth) const = 0;
// This function gets the receive-side bandwidth esitmator statistics.
// TODO(jiayl): remove the default impl when libjingle's FakeWebRtcVideoEngine
// is updated.
virtual int GetReceiveBandwidthEstimatorStats(
const int video_channel,
ReceiveBandwidthEstimatorStats* output) const { return -1; }
// This function gets the PacedSender queuing delay for the last sent frame.
// TODO(jiayl): remove the default impl when libjingle is updated.
virtual int GetPacerQueuingDelayMs(

View File

@ -1383,11 +1383,6 @@ void ViEChannel::RegisterSendBitrateObserver(
send_bitrate_observer_.Set(observer);
}
void ViEChannel::GetReceiveBandwidthEstimatorStats(
ReceiveBandwidthEstimatorStats* output) const {
vie_receiver_.GetReceiveBandwidthEstimatorStats(output);
}
int32_t ViEChannel::StartRTPDump(const char file_nameUTF8[1024],
RTPDirections direction) {
if (direction == kRtpIncoming) {

View File

@ -226,8 +226,6 @@ class ViEChannel
// to avoid deadlocks.
bool GetSendSideDelay(int* avg_send_delay, int* max_send_delay) const;
void RegisterSendSideDelayObserver(SendSideDelayObserver* observer);
void GetReceiveBandwidthEstimatorStats(
ReceiveBandwidthEstimatorStats* output) const;
// Called on any new send bitrate estimate.
void RegisterSendBitrateObserver(BitrateStatisticsObserver* observer);

View File

@ -471,11 +471,6 @@ int ViEReceiver::StopRTPDump() {
return 0;
}
void ViEReceiver::GetReceiveBandwidthEstimatorStats(
ReceiveBandwidthEstimatorStats* output) const {
remote_bitrate_estimator_->GetStats(output);
}
ReceiveStatistics* ViEReceiver::GetReceiveStatistics() const {
return rtp_receive_statistics_.get();
}

View File

@ -84,9 +84,6 @@ class ViEReceiver : public RtpData {
virtual bool OnRecoveredPacket(const uint8_t* packet,
size_t packet_length) OVERRIDE;
void GetReceiveBandwidthEstimatorStats(
ReceiveBandwidthEstimatorStats* output) const;
ReceiveStatistics* GetReceiveStatistics() const;
void ReceivedBWEPacket(int64_t arrival_time_ms, size_t payload_size,

View File

@ -789,19 +789,6 @@ int ViERTP_RTCPImpl::GetEstimatedReceiveBandwidth(
return 0;
}
int ViERTP_RTCPImpl::GetReceiveBandwidthEstimatorStats(
const int video_channel,
ReceiveBandwidthEstimatorStats* output) const {
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
shared_data_->SetLastError(kViERtpRtcpInvalidChannelId);
return -1;
}
vie_channel->GetReceiveBandwidthEstimatorStats(output);
return 0;
}
int ViERTP_RTCPImpl::GetPacerQueuingDelayMs(
const int video_channel, int64_t* delay_ms) const {
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));

View File

@ -121,8 +121,6 @@ class ViERTP_RTCPImpl
virtual int GetEstimatedReceiveBandwidth(
const int video_channel,
unsigned int* estimated_bandwidth) const;
virtual int GetReceiveBandwidthEstimatorStats(
const int video_channel, ReceiveBandwidthEstimatorStats* output) const;
virtual int GetPacerQueuingDelayMs(const int video_channel,
int64_t* delay_ms) const;
virtual int StartRTPDump(const int video_channel,