Implement 'toffset' extension in VideoSendStream.

BUG=2229
R=holmer@google.com, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4722 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video_engine/internal/video_send_stream.cc b/video_engine/internal/video_send_stream.cc
index 0a4e738..979631b 100644
--- a/video_engine/internal/video_send_stream.cc
+++ b/video_engine/internal/video_send_stream.cc
@@ -105,7 +105,17 @@
   }
   rtp_rtcp_->SetNACKStatus(channel_, config_.rtp.nack.rtp_history_ms > 0);
   rtp_rtcp_->SetTransmissionSmoothingStatus(channel_, config_.pacing);
-  rtp_rtcp_->SetSendTimestampOffsetStatus(channel_, true, 1);
+
+  for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) {
+    const std::string& extension = config_.rtp.extensions[i].name;
+    int id = config_.rtp.extensions[i].id;
+    if (extension == "toffset") {
+      if (rtp_rtcp_->SetSendTimestampOffsetStatus(channel_, true, id) != 0)
+        abort();
+    } else {
+      abort();  // Unsupported extension.
+    }
+  }
 
   char rtcp_cname[ViERTP_RTCP::KMaxRTCPCNameLength];
   assert(config_.rtp.c_name.length() < ViERTP_RTCP::KMaxRTCPCNameLength);
@@ -142,7 +152,7 @@
         new ResolutionAdaptor(codec_, channel_, config_.codec.width,
                               config_.codec.height));
     video_engine_base_->RegisterCpuOveruseObserver(channel_,
-                                                overuse_observer_.get());
+                                                   overuse_observer_.get());
   }
 }