Name change from stream label to stream id for spec compliance.

Bug: webrtc:7932
Change-Id: I66f33597342394083256f050cac2a00a68042302
Reviewed-on: https://webrtc-review.googlesource.com/59280
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22276}
diff --git a/api/mediastreaminterface.cc b/api/mediastreaminterface.cc
index 6f08a0c..3d4eb66 100644
--- a/api/mediastreaminterface.cc
+++ b/api/mediastreaminterface.cc
@@ -58,4 +58,15 @@
   return nullptr;
 }
 
+// TODO(shampson): Remove this once downstreams are using id().
+std::string MediaStreamInterface::label() const {
+  return id();
+}
+
+// TODO(shampson): Remove this default implementation once downstreams have
+// implemented.
+std::string MediaStreamInterface::id() const {
+  return std::string();
+}
+
 }  // namespace webrtc
diff --git a/api/mediastreaminterface.h b/api/mediastreaminterface.h
index b7ba332..e2412de 100644
--- a/api/mediastreaminterface.h
+++ b/api/mediastreaminterface.h
@@ -313,8 +313,10 @@
 class MediaStreamInterface : public rtc::RefCountInterface,
                              public NotifierInterface {
  public:
-  // TODO(steveanton): This could be renamed to id() to match the spec.
-  virtual std::string label() const = 0;
+  // TODO(shampson): Remove once downstreams are updated to use id().
+  virtual std::string label() const;
+  // TODO(shampson): Make pure virtual once downstreams have implemented.
+  virtual std::string id() const;
 
   virtual AudioTrackVector GetAudioTracks() = 0;
   virtual VideoTrackVector GetVideoTracks() = 0;
diff --git a/api/mediastreamproxy.h b/api/mediastreamproxy.h
index e32d52b..848b75b 100644
--- a/api/mediastreamproxy.h
+++ b/api/mediastreamproxy.h
@@ -23,6 +23,7 @@
 BEGIN_SIGNALING_PROXY_MAP(MediaStream)
   PROXY_SIGNALING_THREAD_DESTRUCTOR()
   PROXY_CONSTMETHOD0(std::string, label)
+  PROXY_CONSTMETHOD0(std::string, id)
   PROXY_METHOD0(AudioTrackVector, GetAudioTracks)
   PROXY_METHOD0(VideoTrackVector, GetVideoTracks)
   PROXY_METHOD1(rtc::scoped_refptr<AudioTrackInterface>,
diff --git a/api/peerconnectioninterface.h b/api/peerconnectioninterface.h
index 7f7b910..1dfe2bd 100644
--- a/api/peerconnectioninterface.h
+++ b/api/peerconnectioninterface.h
@@ -633,7 +633,7 @@
 
   // Add a new MediaStreamTrack to be sent on this PeerConnection, and return
   // the newly created RtpSender. The RtpSender will be associated with the
-  // streams specified in the |stream_labels| list.
+  // streams specified in the |stream_ids| list.
   //
   // Errors:
   // - INVALID_PARAMETER: |track| is null, has a kind other than audio or video,
@@ -643,13 +643,13 @@
   // implementations have been updated.
   virtual RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>> AddTrack(
       rtc::scoped_refptr<MediaStreamTrackInterface> track,
-      const std::vector<std::string>& stream_labels) {
+      const std::vector<std::string>& stream_ids) {
     return RTCError(RTCErrorType::UNSUPPORTED_OPERATION, "Not implemented");
   }
-  // |streams| indicates which stream labels the track should be associated
+  // |streams| indicates which stream ids the track should be associated
   // with.
   // TODO(steveanton): Remove this overload once callers have moved to the
-  // signature with stream labels.
+  // signature with stream ids.
   virtual rtc::scoped_refptr<RtpSenderInterface> AddTrack(
       MediaStreamTrackInterface* track,
       std::vector<MediaStreamInterface*> streams) {
@@ -1189,8 +1189,8 @@
       std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator,
       PeerConnectionObserver* observer) = 0;
 
-  virtual rtc::scoped_refptr<MediaStreamInterface>
-      CreateLocalMediaStream(const std::string& label) = 0;
+  virtual rtc::scoped_refptr<MediaStreamInterface> CreateLocalMediaStream(
+      const std::string& stream_id) = 0;
 
   // Creates an AudioSourceInterface.
   // |options| decides audio processing settings.
diff --git a/api/rtptransceiverinterface.h b/api/rtptransceiverinterface.h
index 4106793..c8b42aa 100644
--- a/api/rtptransceiverinterface.h
+++ b/api/rtptransceiverinterface.h
@@ -40,6 +40,8 @@
   RtpTransceiverDirection direction = RtpTransceiverDirection::kSendRecv;
 
   // The added RtpTransceiver will be added to these streams.
+  // TODO(shampson): Change name to stream_id & update native wrapper's naming
+  // as well.
   // TODO(bugs.webrtc.org/7600): Not implemented.
   std::vector<std::string> stream_labels;