Wire up statistics in video send stream of new video engine api

Note, this CL does not contain any tests. Those are implemeted as call
tests and will be submitted when the receive stream is wired up as well.

BUG=2235
R=mflodman@webrtc.org, pbos@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5344 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video/video_send_stream.h b/video/video_send_stream.h
index 7433e8a..05c481f 100644
--- a/video/video_send_stream.h
+++ b/video/video_send_stream.h
@@ -11,10 +11,9 @@
 #ifndef WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_
 #define WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_
 
-#include <vector>
-
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
 #include "webrtc/video/encoded_frame_callback_adapter.h"
+#include "webrtc/video/send_statistics_proxy.h"
 #include "webrtc/video/transport_adapter.h"
 #include "webrtc/video_receive_stream.h"
 #include "webrtc/video_send_stream.h"
@@ -37,7 +36,8 @@
 class ResolutionAdaptor;
 
 class VideoSendStream : public webrtc::VideoSendStream,
-                        public VideoSendStreamInput {
+                        public VideoSendStreamInput,
+                        public SendStatisticsProxy::StreamStatsProvider {
  public:
   VideoSendStream(newapi::Transport* transport,
                   bool overuse_detection,
@@ -47,12 +47,6 @@
 
   virtual ~VideoSendStream();
 
-  virtual void PutFrame(const I420VideoFrame& frame) OVERRIDE;
-
-  virtual void SwapFrame(I420VideoFrame* frame) OVERRIDE;
-
-  virtual VideoSendStreamInput* Input() OVERRIDE;
-
   virtual void StartSending() OVERRIDE;
 
   virtual void StopSending() OVERRIDE;
@@ -60,9 +54,22 @@
   virtual bool SetCodec(const VideoCodec& codec) OVERRIDE;
   virtual VideoCodec GetCodec() OVERRIDE;
 
- public:
+  virtual Stats GetStats() const OVERRIDE;
+
   bool DeliverRtcp(const uint8_t* packet, size_t length);
 
+  // From VideoSendStreamInput.
+  virtual void PutFrame(const I420VideoFrame& frame) OVERRIDE;
+  virtual void SwapFrame(I420VideoFrame* frame) OVERRIDE;
+
+  // From webrtc::VideoSendStream.
+  virtual VideoSendStreamInput* Input() OVERRIDE;
+
+ protected:
+  // From SendStatisticsProxy::StreamStatsProvider.
+  virtual bool GetSendSideDelay(VideoSendStream::Stats* stats) OVERRIDE;
+  virtual std::string GetCName() OVERRIDE;
+
  private:
   I420VideoFrame input_frame_;
   TransportAdapter transport_adapter_;
@@ -82,6 +89,8 @@
   int channel_;
   int capture_id_;
   scoped_ptr<ResolutionAdaptor> overuse_observer_;
+
+  scoped_ptr<SendStatisticsProxy> stats_proxy_;
 };
 }  // namespace internal
 }  // namespace webrtc