Bug 1371362: Remove unused audio and video stream counters of PeerConnectionImpl
MozReview-Commit-ID: AtZRVqCyF4A
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -304,18 +304,16 @@ PeerConnectionImpl::PeerConnectionImpl(c
, mCertificate(nullptr)
, mPrivacyRequested(false)
, mSTSThread(nullptr)
, mAllowIceLoopback(false)
, mAllowIceLinkLocal(false)
, mForceIceTcp(false)
, mMedia(nullptr)
, mUuidGen(MakeUnique<PCUuidGenerator>())
- , mNumAudioStreams(0)
- , mNumVideoStreams(0)
, mHaveConfiguredCodecs(false)
, mHaveDataStream(false)
, mAddCandidateErrorCount(0)
, mTrickle(true) // TODO(ekr@rtfm.com): Use pref
, mNegotiationNeeded(false)
, mPrivateWindow(false)
{
MOZ_ASSERT(NS_IsMainThread());
@@ -2335,31 +2333,29 @@ PeerConnectionImpl::AddTrack(MediaStream
aTrack.AddPrincipalChangeObserver(this);
PrincipalChanged(&aTrack);
if (aTrack.AsAudioStreamTrack()) {
res = AddTrackToJsepSession(SdpMediaSection::kAudio, streamId, trackId);
if (NS_FAILED(res)) {
return res;
}
- mNumAudioStreams++;
}
if (aTrack.AsVideoStreamTrack()) {
if (!Preferences::GetBool("media.peerconnection.video.enabled", true)) {
// Before this code was moved, this would silently ignore just like it
// does now. Is this actually what we want to do?
return NS_OK;
}
res = AddTrackToJsepSession(SdpMediaSection::kVideo, streamId, trackId);
if (NS_FAILED(res)) {
return res;
}
- mNumVideoStreams++;
}
OnNegotiationNeeded();
return NS_OK;
}
RefPtr<MediaPipeline>
PeerConnectionImpl::GetMediaPipelineForTrack(MediaStreamTrack& aRecvTrack)
{
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
@@ -783,22 +783,16 @@ private:
std::string mPreviousIceUfrag; // used during rollback of ice restart
std::string mPreviousIcePwd; // used during rollback of ice restart
// Start time of ICE, used for telemetry
mozilla::TimeStamp mIceStartTime;
// Start time of call used for Telemetry
mozilla::TimeStamp mStartTime;
- // Temporary: used to prevent multiple audio streams or multiple video streams
- // in a single PC. This is tied up in the IETF discussion around proper
- // representation of multiple streams in SDP, and strongly related to
- // Bug 840728.
- int mNumAudioStreams;
- int mNumVideoStreams;
bool mHaveConfiguredCodecs;
bool mHaveDataStream;
unsigned int mAddCandidateErrorCount;
bool mTrickle;