Add interface to signal a network down event.

- In real-time mode encoding will be paused until the network is back up.
- In buffering mode the encoder will keep encoding, and packets will be
  buffered at the sender. When the buffer grows above the target delay
  encoding will be paused.
- Fixes a couple of issues related to pacing which was found with the new test.
- Introduces different max bitrates for pacing and for encoding. This allows
  the pacer to faster get rid of the queue after a network down event.

(Work based on issue 1237004)

BUG=1524
TESTS=trybots,vie_auto_test

Review URL: https://webrtc-codereview.appspot.com/1258004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3730 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video_engine/vie_encoder.h b/video_engine/vie_encoder.h
index 08295a7..8e03518 100644
--- a/video_engine/vie_encoder.h
+++ b/video_engine/vie_encoder.h
@@ -57,6 +57,8 @@
 
   bool Init();
 
+  void SetNetworkTransmissionState(bool is_transmitting);
+
   // Returns the id of the owning channel.
   int Owner() const;
 
@@ -173,6 +175,8 @@
                         int64_t capture_time_ms);
 
  private:
+  bool EncoderPaused() const;
+
   WebRtc_Word32 engine_id_;
   const int channel_id_;
   const WebRtc_UWord32 number_of_cores_;
@@ -188,7 +192,9 @@
 
   BitrateController* bitrate_controller_;
 
-  bool paused_;
+  int target_delay_ms_;
+  bool network_is_transmitting_;
+  bool encoder_paused_;
   std::map<unsigned int, int64_t> time_last_intra_request_ms_;
   WebRtc_Word32 channels_dropping_delta_frames_;
   bool drop_next_frame_;