Remove the deprecated GetStats method from PeerConnectionInterface.
R=fischman@webrtc.org, wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/8879004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5634 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
80bbf4c312
commit
db41b4dbcd
@ -2216,7 +2216,9 @@ JOW(bool, PeerConnection_nativeGetStats)(
|
|||||||
talk_base::scoped_refptr<StatsObserverWrapper> observer(
|
talk_base::scoped_refptr<StatsObserverWrapper> observer(
|
||||||
new talk_base::RefCountedObject<StatsObserverWrapper>(jni, j_observer));
|
new talk_base::RefCountedObject<StatsObserverWrapper>(jni, j_observer));
|
||||||
return ExtractNativePC(jni, j_pc)->GetStats(
|
return ExtractNativePC(jni, j_pc)->GetStats(
|
||||||
observer, reinterpret_cast<MediaStreamTrackInterface*>(native_track));
|
observer,
|
||||||
|
reinterpret_cast<MediaStreamTrackInterface*>(native_track),
|
||||||
|
PeerConnectionInterface::kStatsOutputLevelStandard);
|
||||||
}
|
}
|
||||||
|
|
||||||
JOW(jobject, PeerConnection_signalingState)(JNIEnv* jni, jobject j_pc) {
|
JOW(jobject, PeerConnection_signalingState)(JNIEnv* jni, jobject j_pc) {
|
||||||
|
@ -447,11 +447,6 @@ talk_base::scoped_refptr<DtmfSenderInterface> PeerConnection::CreateDtmfSender(
|
|||||||
return DtmfSenderProxy::Create(signaling_thread(), sender.get());
|
return DtmfSenderProxy::Create(signaling_thread(), sender.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PeerConnection::GetStats(StatsObserver* observer,
|
|
||||||
webrtc::MediaStreamTrackInterface* track) {
|
|
||||||
return GetStats(observer, track, kStatsOutputLevelStandard);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PeerConnection::GetStats(StatsObserver* observer,
|
bool PeerConnection::GetStats(StatsObserver* observer,
|
||||||
MediaStreamTrackInterface* track,
|
MediaStreamTrackInterface* track,
|
||||||
StatsOutputLevel level) {
|
StatsOutputLevel level) {
|
||||||
|
@ -74,8 +74,6 @@ class PeerConnection : public PeerConnectionInterface,
|
|||||||
virtual talk_base::scoped_refptr<DataChannelInterface> CreateDataChannel(
|
virtual talk_base::scoped_refptr<DataChannelInterface> CreateDataChannel(
|
||||||
const std::string& label,
|
const std::string& label,
|
||||||
const DataChannelInit* config);
|
const DataChannelInit* config);
|
||||||
virtual bool GetStats(StatsObserver* observer,
|
|
||||||
webrtc::MediaStreamTrackInterface* track);
|
|
||||||
virtual bool GetStats(StatsObserver* observer,
|
virtual bool GetStats(StatsObserver* observer,
|
||||||
webrtc::MediaStreamTrackInterface* track,
|
webrtc::MediaStreamTrackInterface* track,
|
||||||
StatsOutputLevel level);
|
StatsOutputLevel level);
|
||||||
|
@ -79,6 +79,7 @@ using webrtc::MockCreateSessionDescriptionObserver;
|
|||||||
using webrtc::MockDataChannelObserver;
|
using webrtc::MockDataChannelObserver;
|
||||||
using webrtc::MockSetSessionDescriptionObserver;
|
using webrtc::MockSetSessionDescriptionObserver;
|
||||||
using webrtc::MockStatsObserver;
|
using webrtc::MockStatsObserver;
|
||||||
|
using webrtc::PeerConnectionInterface;
|
||||||
using webrtc::SessionDescriptionInterface;
|
using webrtc::SessionDescriptionInterface;
|
||||||
using webrtc::StreamCollectionInterface;
|
using webrtc::StreamCollectionInterface;
|
||||||
|
|
||||||
@ -328,7 +329,8 @@ class PeerConnectionTestClientBase
|
|||||||
int GetAudioOutputLevelStats(webrtc::MediaStreamTrackInterface* track) {
|
int GetAudioOutputLevelStats(webrtc::MediaStreamTrackInterface* track) {
|
||||||
talk_base::scoped_refptr<MockStatsObserver>
|
talk_base::scoped_refptr<MockStatsObserver>
|
||||||
observer(new talk_base::RefCountedObject<MockStatsObserver>());
|
observer(new talk_base::RefCountedObject<MockStatsObserver>());
|
||||||
EXPECT_TRUE(peer_connection_->GetStats(observer, track));
|
EXPECT_TRUE(peer_connection_->GetStats(
|
||||||
|
observer, track, PeerConnectionInterface::kStatsOutputLevelStandard));
|
||||||
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
|
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
|
||||||
return observer->AudioOutputLevel();
|
return observer->AudioOutputLevel();
|
||||||
}
|
}
|
||||||
@ -336,7 +338,8 @@ class PeerConnectionTestClientBase
|
|||||||
int GetAudioInputLevelStats() {
|
int GetAudioInputLevelStats() {
|
||||||
talk_base::scoped_refptr<MockStatsObserver>
|
talk_base::scoped_refptr<MockStatsObserver>
|
||||||
observer(new talk_base::RefCountedObject<MockStatsObserver>());
|
observer(new talk_base::RefCountedObject<MockStatsObserver>());
|
||||||
EXPECT_TRUE(peer_connection_->GetStats(observer, NULL));
|
EXPECT_TRUE(peer_connection_->GetStats(
|
||||||
|
observer, NULL, PeerConnectionInterface::kStatsOutputLevelStandard));
|
||||||
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
|
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
|
||||||
return observer->AudioInputLevel();
|
return observer->AudioInputLevel();
|
||||||
}
|
}
|
||||||
@ -344,7 +347,8 @@ class PeerConnectionTestClientBase
|
|||||||
int GetBytesReceivedStats(webrtc::MediaStreamTrackInterface* track) {
|
int GetBytesReceivedStats(webrtc::MediaStreamTrackInterface* track) {
|
||||||
talk_base::scoped_refptr<MockStatsObserver>
|
talk_base::scoped_refptr<MockStatsObserver>
|
||||||
observer(new talk_base::RefCountedObject<MockStatsObserver>());
|
observer(new talk_base::RefCountedObject<MockStatsObserver>());
|
||||||
EXPECT_TRUE(peer_connection_->GetStats(observer, track));
|
EXPECT_TRUE(peer_connection_->GetStats(
|
||||||
|
observer, track, PeerConnectionInterface::kStatsOutputLevelStandard));
|
||||||
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
|
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
|
||||||
return observer->BytesReceived();
|
return observer->BytesReceived();
|
||||||
}
|
}
|
||||||
@ -352,7 +356,8 @@ class PeerConnectionTestClientBase
|
|||||||
int GetBytesSentStats(webrtc::MediaStreamTrackInterface* track) {
|
int GetBytesSentStats(webrtc::MediaStreamTrackInterface* track) {
|
||||||
talk_base::scoped_refptr<MockStatsObserver>
|
talk_base::scoped_refptr<MockStatsObserver>
|
||||||
observer(new talk_base::RefCountedObject<MockStatsObserver>());
|
observer(new talk_base::RefCountedObject<MockStatsObserver>());
|
||||||
EXPECT_TRUE(peer_connection_->GetStats(observer, track));
|
EXPECT_TRUE(peer_connection_->GetStats(
|
||||||
|
observer, track, PeerConnectionInterface::kStatsOutputLevelStandard));
|
||||||
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
|
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
|
||||||
return observer->BytesSent();
|
return observer->BytesSent();
|
||||||
}
|
}
|
||||||
|
@ -199,10 +199,6 @@ class PeerConnectionInterface : public talk_base::RefCountInterface {
|
|||||||
virtual talk_base::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
|
virtual talk_base::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
|
||||||
AudioTrackInterface* track) = 0;
|
AudioTrackInterface* track) = 0;
|
||||||
|
|
||||||
// TODO(jiayl): remove the old API once all Chrome overrides are updated.
|
|
||||||
virtual bool GetStats(StatsObserver* observer,
|
|
||||||
MediaStreamTrackInterface* track) = 0;
|
|
||||||
|
|
||||||
virtual bool GetStats(StatsObserver* observer,
|
virtual bool GetStats(StatsObserver* observer,
|
||||||
MediaStreamTrackInterface* track,
|
MediaStreamTrackInterface* track,
|
||||||
StatsOutputLevel level) = 0;
|
StatsOutputLevel level) = 0;
|
||||||
|
@ -410,7 +410,8 @@ class PeerConnectionInterfaceTest : public testing::Test {
|
|||||||
bool DoGetStats(MediaStreamTrackInterface* track) {
|
bool DoGetStats(MediaStreamTrackInterface* track) {
|
||||||
talk_base::scoped_refptr<MockStatsObserver> observer(
|
talk_base::scoped_refptr<MockStatsObserver> observer(
|
||||||
new talk_base::RefCountedObject<MockStatsObserver>());
|
new talk_base::RefCountedObject<MockStatsObserver>());
|
||||||
if (!pc_->GetStats(observer, track))
|
if (!pc_->GetStats(
|
||||||
|
observer, track, PeerConnectionInterface::kStatsOutputLevelStandard))
|
||||||
return false;
|
return false;
|
||||||
EXPECT_TRUE_WAIT(observer->called(), kTimeout);
|
EXPECT_TRUE_WAIT(observer->called(), kTimeout);
|
||||||
return observer->called();
|
return observer->called();
|
||||||
|
@ -44,7 +44,6 @@ BEGIN_PROXY_MAP(PeerConnection)
|
|||||||
PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*)
|
PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*)
|
||||||
PROXY_METHOD1(talk_base::scoped_refptr<DtmfSenderInterface>,
|
PROXY_METHOD1(talk_base::scoped_refptr<DtmfSenderInterface>,
|
||||||
CreateDtmfSender, AudioTrackInterface*)
|
CreateDtmfSender, AudioTrackInterface*)
|
||||||
PROXY_METHOD2(bool, GetStats, StatsObserver*, MediaStreamTrackInterface*)
|
|
||||||
PROXY_METHOD3(bool, GetStats, StatsObserver*,
|
PROXY_METHOD3(bool, GetStats, StatsObserver*,
|
||||||
MediaStreamTrackInterface*,
|
MediaStreamTrackInterface*,
|
||||||
StatsOutputLevel)
|
StatsOutputLevel)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user