Remove the video channel id completely.

BUG=webrtc:5079

Review URL: https://codereview.webrtc.org/1412143002

Cr-Commit-Position: refs/heads/master@{#10324}
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index c2b1ec7..9a036c9 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -95,7 +95,6 @@
   const int num_cpu_cores_;
   const rtc::scoped_ptr<ProcessThread> module_process_thread_;
   const rtc::scoped_ptr<ChannelGroup> channel_group_;
-  volatile int next_channel_id_;
   Call::Config config_;
   rtc::ThreadChecker configuration_thread_checker_;
 
@@ -140,7 +139,6 @@
     : num_cpu_cores_(CpuInfo::DetectNumberOfCores()),
       module_process_thread_(ProcessThread::Create("ModuleProcessThread")),
       channel_group_(new ChannelGroup(module_process_thread_.get())),
-      next_channel_id_(0),
       config_(config),
       network_enabled_(true),
       receive_crit_(RWLockWrapper::CreateRWLock()),
@@ -274,9 +272,8 @@
   // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if
   // the call has already started.
   VideoSendStream* send_stream = new VideoSendStream(num_cpu_cores_,
-      module_process_thread_.get(), channel_group_.get(),
-      rtc::AtomicOps::Increment(&next_channel_id_), config, encoder_config,
-      suspended_video_send_ssrcs_);
+      module_process_thread_.get(), channel_group_.get(), config,
+      encoder_config, suspended_video_send_ssrcs_);
 
   // This needs to be taken before send_crit_ as both locks need to be held
   // while changing network state.
@@ -335,9 +332,8 @@
   TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream");
   RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
   VideoReceiveStream* receive_stream = new VideoReceiveStream(
-      num_cpu_cores_, channel_group_.get(),
-      rtc::AtomicOps::Increment(&next_channel_id_), config,
-      config_.voice_engine, module_process_thread_.get());
+      num_cpu_cores_, channel_group_.get(), config, config_.voice_engine,
+      module_process_thread_.get());
 
   // This needs to be taken before receive_crit_ as both locks need to be held
   // while changing network state.
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index 036f623..9aa7da1 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -140,7 +140,6 @@
 
 VideoReceiveStream::VideoReceiveStream(int num_cpu_cores,
                                        ChannelGroup* channel_group,
-                                       int channel_id,
                                        const VideoReceiveStream::Config& config,
                                        webrtc::VoiceEngine* voice_engine,
                                        ProcessThread* process_thread)
diff --git a/webrtc/video/video_receive_stream.h b/webrtc/video/video_receive_stream.h
index 6d00942..011788d 100644
--- a/webrtc/video/video_receive_stream.h
+++ b/webrtc/video/video_receive_stream.h
@@ -39,7 +39,6 @@
  public:
   VideoReceiveStream(int num_cpu_cores,
                      ChannelGroup* channel_group,
-                     int channel_id,
                      const VideoReceiveStream::Config& config,
                      webrtc::VoiceEngine* voice_engine,
                      ProcessThread* process_thread);
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index b53fd9f..b7b0150 100644
--- a/webrtc/video/video_send_stream.cc
+++ b/webrtc/video/video_send_stream.cc
@@ -112,7 +112,6 @@
     int num_cpu_cores,
     ProcessThread* module_process_thread,
     ChannelGroup* channel_group,
-    int channel_id,
     const VideoSendStream::Config& config,
     const VideoEncoderConfig& encoder_config,
     const std::map<uint32_t, RtpState>& suspended_ssrcs)
@@ -140,7 +139,7 @@
   const std::vector<uint32_t>& ssrcs = config.rtp.ssrcs;
 
   vie_encoder_.reset(new ViEEncoder(
-      channel_id, num_cpu_cores, module_process_thread_, &stats_proxy_,
+      num_cpu_cores, module_process_thread_, &stats_proxy_,
       config.pre_encode_callback, channel_group_->pacer(),
       channel_group_->bitrate_allocator()));
   RTC_CHECK(vie_encoder_->Init());
diff --git a/webrtc/video/video_send_stream.h b/webrtc/video/video_send_stream.h
index 874d00f..68473b1 100644
--- a/webrtc/video/video_send_stream.h
+++ b/webrtc/video/video_send_stream.h
@@ -40,7 +40,6 @@
   VideoSendStream(int num_cpu_cores,
                   ProcessThread* module_process_thread,
                   ChannelGroup* channel_group,
-                  int channel_id,
                   const VideoSendStream::Config& config,
                   const VideoEncoderConfig& encoder_config,
                   const std::map<uint32_t, RtpState>& suspended_ssrcs);
diff --git a/webrtc/video_engine/encoder_state_feedback_unittest.cc b/webrtc/video_engine/encoder_state_feedback_unittest.cc
index b61fc56..9787acc 100644
--- a/webrtc/video_engine/encoder_state_feedback_unittest.cc
+++ b/webrtc/video_engine/encoder_state_feedback_unittest.cc
@@ -32,7 +32,7 @@
 class MockVieEncoder : public ViEEncoder {
  public:
   explicit MockVieEncoder(ProcessThread* process_thread, PacedSender* pacer)
-      : ViEEncoder(1, 1, process_thread, nullptr, nullptr, pacer, nullptr) {}
+      : ViEEncoder(1, process_thread, nullptr, nullptr, pacer, nullptr) {}
   ~MockVieEncoder() {}
 
   MOCK_METHOD1(OnReceivedIntraFrameRequest,
diff --git a/webrtc/video_engine/vie_encoder.cc b/webrtc/video_engine/vie_encoder.cc
index 4d41e0e..340a78e 100644
--- a/webrtc/video_engine/vie_encoder.cc
+++ b/webrtc/video_engine/vie_encoder.cc
@@ -102,15 +102,13 @@
   ViEEncoder* owner_;
 };
 
-ViEEncoder::ViEEncoder(int32_t channel_id,
-                       uint32_t number_of_cores,
+ViEEncoder::ViEEncoder(uint32_t number_of_cores,
                        ProcessThread* module_process_thread,
                        SendStatisticsProxy* stats_proxy,
                        I420FrameCallback* pre_encode_callback,
                        PacedSender* pacer,
                        BitrateAllocator* bitrate_allocator)
-    : channel_id_(channel_id),
-      number_of_cores_(number_of_cores),
+    : number_of_cores_(number_of_cores),
       vpm_(VideoProcessingModule::Create()),
       qm_callback_(new QMVideoSettingsCallback(vpm_.get())),
       vcm_(VideoCodingModule::Create(Clock::GetRealTimeClock(),
@@ -176,10 +174,6 @@
 ViEEncoder::~ViEEncoder() {
 }
 
-int ViEEncoder::Owner() const {
-  return channel_id_;
-}
-
 void ViEEncoder::SetNetworkTransmissionState(bool is_transmitting) {
   {
     CriticalSectionScoped cs(data_cs_.get());
@@ -689,8 +683,9 @@
     if (video_suspended_ == video_is_suspended)
       return;
     video_suspended_ = video_is_suspended;
-    LOG(LS_INFO) << "Video suspended " << video_is_suspended
-                 << " for channel " << channel_id_;
+
+    LOG(LS_INFO) << "Video suspend state changed " << video_is_suspended
+                 << " for ssrc " << ssrc_streams_.begin()->first;
   }
   // Video suspend-state changed, inform codec observer.
   if (stats_proxy_)
diff --git a/webrtc/video_engine/vie_encoder.h b/webrtc/video_engine/vie_encoder.h
index ec4a82a..6b4449f 100644
--- a/webrtc/video_engine/vie_encoder.h
+++ b/webrtc/video_engine/vie_encoder.h
@@ -49,8 +49,7 @@
  public:
   friend class ViEBitrateObserver;
 
-  ViEEncoder(int32_t channel_id,
-             uint32_t number_of_cores,
+  ViEEncoder(uint32_t number_of_cores,
              ProcessThread* module_process_thread,
              SendStatisticsProxy* stats_proxy,
              I420FrameCallback* pre_encode_callback,
@@ -145,8 +144,6 @@
   void RegisterPostEncodeImageCallback(
         EncodedImageCallback* post_encode_callback);
 
-  int channel_id() const { return channel_id_; }
-
   int GetPaddingNeededBps() const;
 
  protected:
@@ -160,7 +157,6 @@
   void TraceFrameDropStart() EXCLUSIVE_LOCKS_REQUIRED(data_cs_);
   void TraceFrameDropEnd() EXCLUSIVE_LOCKS_REQUIRED(data_cs_);
 
-  const int channel_id_;
   const uint32_t number_of_cores_;
 
   const rtc::scoped_ptr<VideoProcessingModule> vpm_;