Implement VideoSendStream::SetCodec().

Removing assertion that SSRC count should be the same as the number of
streams in the codec. It makes sense that you don't always use the same
number of streams under one call. Dropping resolution due to CPU overuse
for instance can require less streams, but the SSRCs should stay
allocated so that operations can resume when not overusing any more.

This change also means we can get rid of the ugly SendStreamState whose
content wasn't defined. Instead we use SetCodec to change resolution
etc. on the fly. Should something else have to be replaced on the fly
then that functionality simply has to be implemented.

BUG=
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5123 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video/video_send_stream.h b/video/video_send_stream.h
index 304d825..2d077e3 100644
--- a/video/video_send_stream.h
+++ b/video/video_send_stream.h
@@ -17,6 +17,7 @@
 #include "webrtc/video/transport_adapter.h"
 #include "webrtc/video_receive_stream.h"
 #include "webrtc/video_send_stream.h"
+#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 
 namespace webrtc {
 
@@ -53,17 +54,15 @@
 
   virtual void StopSend() OVERRIDE;
 
-  virtual bool SetTargetBitrate(int min_bitrate, int max_bitrate,
-                                const std::vector<SimulcastStream>& streams)
-      OVERRIDE;
-
-  virtual void GetSendCodec(VideoCodec* send_codec) OVERRIDE;
+  virtual bool SetCodec(const VideoCodec& codec) OVERRIDE;
+  virtual VideoCodec GetCodec() OVERRIDE;
 
  public:
   bool DeliverRtcp(const uint8_t* packet, size_t length);
 
  private:
   TransportAdapter transport_adapter_;
+  scoped_ptr<CriticalSectionWrapper> codec_lock_;
   VideoSendStream::Config config_;
 
   ViEBase* video_engine_base_;