Bug 1371362: Remove unused audio and video stream counters of PeerConnectionImpl draft
authorPaul Ellenbogen <pe5@cs.princeton.edu>
Thu, 08 Jun 2017 11:17:08 -0700
changeset 591165 d75317b3461a4be903af058f45a74a405a02ab59
parent 590317 a49112c7a5765802096b3fc298069b9495436107
child 632448 4ac731aa4d239b5ef2ee22e1ebcf2dc434157bec
push id62979
push userbmo:pe5@cs.princeton.edu
push dateThu, 08 Jun 2017 18:37:35 +0000
bugs1371362
milestone55.0a1
Bug 1371362: Remove unused audio and video stream counters of PeerConnectionImpl MozReview-Commit-ID: AtZRVqCyF4A
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
--- 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;