Add VP9 codec to VCM and vie_auto_test.
Include VP9 tests in videoprocessor_integrationtests.
Include end-to-end send/receiveVP9 test.

This is the same patch as https://code.google.com/p/webrtc/source/detail?r=7422, which was reverted when rolled into chrome (due to bss size increase). Relanding this again as we now have the clear to get this in:
see https://code.google.com/p/webrtc/issues/detail?id=3932

R=kjellander@webrtc.org, mflodman@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@7588 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video_encoder.h b/video_encoder.h
index cbdf1ef..2bf52f3 100644
--- a/video_encoder.h
+++ b/video_encoder.h
@@ -40,28 +40,84 @@
  public:
   enum EncoderType {
     kVp8,
+    kVp9,
   };
 
   static VideoEncoder* Create(EncoderType codec_type);
 
   static VideoCodecVP8 GetDefaultVp8Settings();
+  static VideoCodecVP9 GetDefaultVp9Settings();
   static VideoCodecH264 GetDefaultH264Settings();
 
   virtual ~VideoEncoder() {}
 
+  // Initialize the encoder with the information from the codecSettings
+  //
+  // Input:
+  //          - codec_settings    : Codec settings
+  //          - number_of_cores   : Number of cores available for the encoder
+  //          - max_payload_size  : The maximum size each payload is allowed
+  //                                to have. Usually MTU - overhead.
+  //
+  // Return value                  : Set bit rate if OK
+  //                                 <0 - Errors:
+  //                                  WEBRTC_VIDEO_CODEC_ERR_PARAMETER
+  //                                  WEBRTC_VIDEO_CODEC_ERR_SIZE
+  //                                  WEBRTC_VIDEO_CODEC_LEVEL_EXCEEDED
+  //                                  WEBRTC_VIDEO_CODEC_MEMORY
+  //                                  WEBRTC_VIDEO_CODEC_ERROR
   virtual int32_t InitEncode(const VideoCodec* codec_settings,
                              int32_t number_of_cores,
                              uint32_t max_payload_size) = 0;
+
+  // Register an encode complete callback object.
+  //
+  // Input:
+  //          - callback         : Callback object which handles encoded images.
+  //
+  // Return value                : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
   virtual int32_t RegisterEncodeCompleteCallback(
       EncodedImageCallback* callback) = 0;
+
+  // Free encoder memory.
+  // Return value                : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
   virtual int32_t Release() = 0;
 
-
+  // Encode an I420 image (as a part of a video stream). The encoded image
+  // will be returned to the user through the encode complete callback.
+  //
+  // Input:
+  //          - frame             : Image to be encoded
+  //          - frame_types       : Frame type to be generated by the encoder.
+  //
+  // Return value                 : WEBRTC_VIDEO_CODEC_OK if OK
+  //                                <0 - Errors:
+  //                                  WEBRTC_VIDEO_CODEC_ERR_PARAMETER
+  //                                  WEBRTC_VIDEO_CODEC_MEMORY
+  //                                  WEBRTC_VIDEO_CODEC_ERROR
+  //                                  WEBRTC_VIDEO_CODEC_TIMEOUT
   virtual int32_t Encode(const I420VideoFrame& frame,
                          const CodecSpecificInfo* codec_specific_info,
                          const std::vector<VideoFrameType>* frame_types) = 0;
 
+  // Inform the encoder of the new packet loss rate and the round-trip time of
+  // the network.
+  //
+  // Input:
+  //          - packet_loss : Fraction lost
+  //                          (loss rate in percent = 100 * packetLoss / 255)
+  //          - rtt         : Round-trip time in milliseconds
+  // Return value           : WEBRTC_VIDEO_CODEC_OK if OK
+  //                          <0 - Errors: WEBRTC_VIDEO_CODEC_ERROR
   virtual int32_t SetChannelParameters(uint32_t packet_loss, int rtt) = 0;
+
+  // Inform the encoder about the new target bit rate.
+  //
+  // Input:
+  //          - bitrate         : New target bit rate
+  //          - framerate       : The target frame rate
+  //
+  // Return value                : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
   virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) = 0;
 
   virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; }