(Auto)update libjingle 72097588-> 72159069

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6799 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/session/media/channel.h b/talk/session/media/channel.h
index 340caa7..2480f45 100644
--- a/talk/session/media/channel.h
+++ b/talk/session/media/channel.h
@@ -31,11 +31,11 @@
 #include <string>
 #include <vector>
 
-#include "talk/base/asyncudpsocket.h"
-#include "talk/base/criticalsection.h"
-#include "talk/base/network.h"
-#include "talk/base/sigslot.h"
-#include "talk/base/window.h"
+#include "webrtc/base/asyncudpsocket.h"
+#include "webrtc/base/criticalsection.h"
+#include "webrtc/base/network.h"
+#include "webrtc/base/sigslot.h"
+#include "webrtc/base/window.h"
 #include "talk/media/base/mediachannel.h"
 #include "talk/media/base/mediaengine.h"
 #include "talk/media/base/screencastid.h"
@@ -73,10 +73,10 @@
 // NetworkInterface.
 
 class BaseChannel
-    : public talk_base::MessageHandler, public sigslot::has_slots<>,
+    : public rtc::MessageHandler, public sigslot::has_slots<>,
       public MediaChannel::NetworkInterface {
  public:
-  BaseChannel(talk_base::Thread* thread, MediaEngineInterface* media_engine,
+  BaseChannel(rtc::Thread* thread, MediaEngineInterface* media_engine,
               MediaChannel* channel, BaseSession* session,
               const std::string& content_name, bool rtcp);
   virtual ~BaseChannel();
@@ -86,7 +86,7 @@
   // done.
   void Deinit();
 
-  talk_base::Thread* worker_thread() const { return worker_thread_; }
+  rtc::Thread* worker_thread() const { return worker_thread_; }
   BaseSession* session() const { return session_; }
   const std::string& content_name() { return content_name_; }
   TransportChannel* transport_channel() const {
@@ -151,7 +151,7 @@
   void RegisterSendSink(T* sink,
                         void (T::*OnPacket)(const void*, size_t, bool),
                         SinkType type) {
-    talk_base::CritScope cs(&signal_send_packet_cs_);
+    rtc::CritScope cs(&signal_send_packet_cs_);
     if (SINK_POST_CRYPTO == type) {
       SignalSendPacketPostCrypto.disconnect(sink);
       SignalSendPacketPostCrypto.connect(sink, OnPacket);
@@ -163,7 +163,7 @@
 
   void UnregisterSendSink(sigslot::has_slots<>* sink,
                           SinkType type) {
-    talk_base::CritScope cs(&signal_send_packet_cs_);
+    rtc::CritScope cs(&signal_send_packet_cs_);
     if (SINK_POST_CRYPTO == type) {
       SignalSendPacketPostCrypto.disconnect(sink);
     } else {
@@ -172,7 +172,7 @@
   }
 
   bool HasSendSinks(SinkType type) {
-    talk_base::CritScope cs(&signal_send_packet_cs_);
+    rtc::CritScope cs(&signal_send_packet_cs_);
     if (SINK_POST_CRYPTO == type) {
       return !SignalSendPacketPostCrypto.is_empty();
     } else {
@@ -184,7 +184,7 @@
   void RegisterRecvSink(T* sink,
                         void (T::*OnPacket)(const void*, size_t, bool),
                         SinkType type) {
-    talk_base::CritScope cs(&signal_recv_packet_cs_);
+    rtc::CritScope cs(&signal_recv_packet_cs_);
     if (SINK_POST_CRYPTO == type) {
       SignalRecvPacketPostCrypto.disconnect(sink);
       SignalRecvPacketPostCrypto.connect(sink, OnPacket);
@@ -196,7 +196,7 @@
 
   void UnregisterRecvSink(sigslot::has_slots<>* sink,
                           SinkType type) {
-    talk_base::CritScope cs(&signal_recv_packet_cs_);
+    rtc::CritScope cs(&signal_recv_packet_cs_);
     if (SINK_POST_CRYPTO == type) {
       SignalRecvPacketPostCrypto.disconnect(sink);
     } else {
@@ -205,7 +205,7 @@
   }
 
   bool HasRecvSinks(SinkType type) {
-    talk_base::CritScope cs(&signal_recv_packet_cs_);
+    rtc::CritScope cs(&signal_recv_packet_cs_);
     if (SINK_POST_CRYPTO == type) {
       return !SignalRecvPacketPostCrypto.is_empty();
     } else {
@@ -244,35 +244,35 @@
   }
   bool IsReadyToReceive() const;
   bool IsReadyToSend() const;
-  talk_base::Thread* signaling_thread() { return session_->signaling_thread(); }
+  rtc::Thread* signaling_thread() { return session_->signaling_thread(); }
   SrtpFilter* srtp_filter() { return &srtp_filter_; }
   bool rtcp() const { return rtcp_; }
 
   void FlushRtcpMessages();
 
   // NetworkInterface implementation, called by MediaEngine
-  virtual bool SendPacket(talk_base::Buffer* packet,
-                          talk_base::DiffServCodePoint dscp);
-  virtual bool SendRtcp(talk_base::Buffer* packet,
-                        talk_base::DiffServCodePoint dscp);
-  virtual int SetOption(SocketType type, talk_base::Socket::Option o, int val);
+  virtual bool SendPacket(rtc::Buffer* packet,
+                          rtc::DiffServCodePoint dscp);
+  virtual bool SendRtcp(rtc::Buffer* packet,
+                        rtc::DiffServCodePoint dscp);
+  virtual int SetOption(SocketType type, rtc::Socket::Option o, int val);
 
   // From TransportChannel
   void OnWritableState(TransportChannel* channel);
   virtual void OnChannelRead(TransportChannel* channel,
                              const char* data,
                              size_t len,
-                             const talk_base::PacketTime& packet_time,
+                             const rtc::PacketTime& packet_time,
                              int flags);
   void OnReadyToSend(TransportChannel* channel);
 
   bool PacketIsRtcp(const TransportChannel* channel, const char* data,
                     size_t len);
-  bool SendPacket(bool rtcp, talk_base::Buffer* packet,
-                  talk_base::DiffServCodePoint dscp);
-  virtual bool WantsPacket(bool rtcp, talk_base::Buffer* packet);
-  void HandlePacket(bool rtcp, talk_base::Buffer* packet,
-                    const talk_base::PacketTime& packet_time);
+  bool SendPacket(bool rtcp, rtc::Buffer* packet,
+                  rtc::DiffServCodePoint dscp);
+  virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet);
+  void HandlePacket(bool rtcp, rtc::Buffer* packet,
+                    const rtc::PacketTime& packet_time);
 
   // Apply the new local/remote session description.
   void OnNewLocalDescription(BaseSession* session, ContentAction action);
@@ -344,7 +344,7 @@
                     std::string* error_desc);
 
   // From MessageHandler
-  virtual void OnMessage(talk_base::Message* pmsg);
+  virtual void OnMessage(rtc::Message* pmsg);
 
   // Handled in derived classes
   // Get the SRTP ciphers to use for RTP media
@@ -363,10 +363,10 @@
   sigslot::signal3<const void*, size_t, bool> SignalSendPacketPostCrypto;
   sigslot::signal3<const void*, size_t, bool> SignalRecvPacketPreCrypto;
   sigslot::signal3<const void*, size_t, bool> SignalRecvPacketPostCrypto;
-  talk_base::CriticalSection signal_send_packet_cs_;
-  talk_base::CriticalSection signal_recv_packet_cs_;
+  rtc::CriticalSection signal_send_packet_cs_;
+  rtc::CriticalSection signal_recv_packet_cs_;
 
-  talk_base::Thread* worker_thread_;
+  rtc::Thread* worker_thread_;
   MediaEngineInterface* media_engine_;
   BaseSession* session_;
   MediaChannel* media_channel_;
@@ -380,7 +380,7 @@
   SrtpFilter srtp_filter_;
   RtcpMuxFilter rtcp_mux_filter_;
   BundleFilter bundle_filter_;
-  talk_base::scoped_ptr<SocketMonitor> socket_monitor_;
+  rtc::scoped_ptr<SocketMonitor> socket_monitor_;
   bool enabled_;
   bool writable_;
   bool rtp_ready_to_send_;
@@ -399,7 +399,7 @@
 // and input/output level monitoring.
 class VoiceChannel : public BaseChannel {
  public:
-  VoiceChannel(talk_base::Thread* thread, MediaEngineInterface* media_engine,
+  VoiceChannel(rtc::Thread* thread, MediaEngineInterface* media_engine,
                VoiceMediaChannel* channel, BaseSession* session,
                const std::string& content_name, bool rtcp);
   ~VoiceChannel();
@@ -470,7 +470,7 @@
   // overrides from BaseChannel
   virtual void OnChannelRead(TransportChannel* channel,
                              const char* data, size_t len,
-                             const talk_base::PacketTime& packet_time,
+                             const rtc::PacketTime& packet_time,
                              int flags);
   virtual void ChangeState();
   virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc);
@@ -487,7 +487,7 @@
   bool SetOutputScaling_w(uint32 ssrc, double left, double right);
   bool GetStats_w(VoiceMediaInfo* stats);
 
-  virtual void OnMessage(talk_base::Message* pmsg);
+  virtual void OnMessage(rtc::Message* pmsg);
   virtual void GetSrtpCiphers(std::vector<std::string>* ciphers) const;
   virtual void OnConnectionMonitorUpdate(
       SocketMonitor* monitor, const std::vector<ConnectionInfo>& infos);
@@ -500,9 +500,9 @@
 
   static const int kEarlyMediaTimeout = 1000;
   bool received_media_;
-  talk_base::scoped_ptr<VoiceMediaMonitor> media_monitor_;
-  talk_base::scoped_ptr<AudioMonitor> audio_monitor_;
-  talk_base::scoped_ptr<TypingMonitor> typing_monitor_;
+  rtc::scoped_ptr<VoiceMediaMonitor> media_monitor_;
+  rtc::scoped_ptr<AudioMonitor> audio_monitor_;
+  rtc::scoped_ptr<TypingMonitor> typing_monitor_;
 };
 
 // VideoChannel is a specialization for video.
@@ -516,7 +516,7 @@
     virtual ~ScreenCapturerFactory() {}
   };
 
-  VideoChannel(talk_base::Thread* thread, MediaEngineInterface* media_engine,
+  VideoChannel(rtc::Thread* thread, MediaEngineInterface* media_engine,
                VideoMediaChannel* channel, BaseSession* session,
                const std::string& content_name, bool rtcp,
                VoiceChannel* voice_channel);
@@ -545,7 +545,7 @@
   void StartMediaMonitor(int cms);
   void StopMediaMonitor();
   sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor;
-  sigslot::signal2<uint32, talk_base::WindowEvent> SignalScreencastWindowEvent;
+  sigslot::signal2<uint32, rtc::WindowEvent> SignalScreencastWindowEvent;
 
   bool SendIntraFrame();
   bool RequestIntraFrame();
@@ -581,21 +581,21 @@
 
   VideoCapturer* AddScreencast_w(uint32 ssrc, const ScreencastId& id);
   bool RemoveScreencast_w(uint32 ssrc);
-  void OnScreencastWindowEvent_s(uint32 ssrc, talk_base::WindowEvent we);
+  void OnScreencastWindowEvent_s(uint32 ssrc, rtc::WindowEvent we);
   bool IsScreencasting_w() const;
   void GetScreencastDetails_w(ScreencastDetailsData* d) const;
   void SetScreenCaptureFactory_w(
       ScreenCapturerFactory* screencapture_factory);
   bool GetStats_w(VideoMediaInfo* stats);
 
-  virtual void OnMessage(talk_base::Message* pmsg);
+  virtual void OnMessage(rtc::Message* pmsg);
   virtual void GetSrtpCiphers(std::vector<std::string>* ciphers) const;
   virtual void OnConnectionMonitorUpdate(
       SocketMonitor* monitor, const std::vector<ConnectionInfo>& infos);
   virtual void OnMediaMonitorUpdate(
       VideoMediaChannel* media_channel, const VideoMediaInfo& info);
   virtual void OnScreencastWindowEvent(uint32 ssrc,
-                                       talk_base::WindowEvent event);
+                                       rtc::WindowEvent event);
   virtual void OnStateChange(VideoCapturer* capturer, CaptureState ev);
   bool GetLocalSsrc(const VideoCapturer* capturer, uint32* ssrc);
 
@@ -604,17 +604,17 @@
 
   VoiceChannel* voice_channel_;
   VideoRenderer* renderer_;
-  talk_base::scoped_ptr<ScreenCapturerFactory> screencapture_factory_;
+  rtc::scoped_ptr<ScreenCapturerFactory> screencapture_factory_;
   ScreencastMap screencast_capturers_;
-  talk_base::scoped_ptr<VideoMediaMonitor> media_monitor_;
+  rtc::scoped_ptr<VideoMediaMonitor> media_monitor_;
 
-  talk_base::WindowEvent previous_we_;
+  rtc::WindowEvent previous_we_;
 };
 
 // DataChannel is a specialization for data.
 class DataChannel : public BaseChannel {
  public:
-  DataChannel(talk_base::Thread* thread,
+  DataChannel(rtc::Thread* thread,
               DataMediaChannel* media_channel,
               BaseSession* session,
               const std::string& content_name,
@@ -623,7 +623,7 @@
   bool Init();
 
   virtual bool SendData(const SendDataParams& params,
-                        const talk_base::Buffer& payload,
+                        const rtc::Buffer& payload,
                         SendDataResult* result);
 
   void StartMediaMonitor(int cms);
@@ -641,7 +641,7 @@
       SignalMediaError;
   sigslot::signal3<DataChannel*,
                    const ReceiveDataParams&,
-                   const talk_base::Buffer&>
+                   const rtc::Buffer&>
       SignalDataReceived;
   // Signal for notifying when the channel becomes ready to send data.
   // That occurs when the channel is enabled, the transport is writable,
@@ -657,9 +657,9 @@
   }
 
  private:
-  struct SendDataMessageData : public talk_base::MessageData {
+  struct SendDataMessageData : public rtc::MessageData {
     SendDataMessageData(const SendDataParams& params,
-                        const talk_base::Buffer* payload,
+                        const rtc::Buffer* payload,
                         SendDataResult* result)
         : params(params),
           payload(payload),
@@ -668,12 +668,12 @@
     }
 
     const SendDataParams& params;
-    const talk_base::Buffer* payload;
+    const rtc::Buffer* payload;
     SendDataResult* result;
     bool succeeded;
   };
 
-  struct DataReceivedMessageData : public talk_base::MessageData {
+  struct DataReceivedMessageData : public rtc::MessageData {
     // We copy the data because the data will become invalid after we
     // handle DataMediaChannel::SignalDataReceived but before we fire
     // SignalDataReceived.
@@ -683,10 +683,10 @@
           payload(data, len) {
     }
     const ReceiveDataParams params;
-    const talk_base::Buffer payload;
+    const rtc::Buffer payload;
   };
 
-  typedef talk_base::TypedMessageData<bool> DataChannelReadyToSendMessageData;
+  typedef rtc::TypedMessageData<bool> DataChannelReadyToSendMessageData;
 
   // overrides from BaseChannel
   virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc);
@@ -706,9 +706,9 @@
                                   ContentAction action,
                                   std::string* error_desc);
   virtual void ChangeState();
-  virtual bool WantsPacket(bool rtcp, talk_base::Buffer* packet);
+  virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet);
 
-  virtual void OnMessage(talk_base::Message* pmsg);
+  virtual void OnMessage(rtc::Message* pmsg);
   virtual void GetSrtpCiphers(std::vector<std::string>* ciphers) const;
   virtual void OnConnectionMonitorUpdate(
       SocketMonitor* monitor, const std::vector<ConnectionInfo>& infos);
@@ -722,7 +722,7 @@
   void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error);
   void OnStreamClosedRemotely(uint32 sid);
 
-  talk_base::scoped_ptr<DataMediaMonitor> media_monitor_;
+  rtc::scoped_ptr<DataMediaMonitor> media_monitor_;
   // TODO(pthatcher): Make a separate SctpDataChannel and
   // RtpDataChannel instead of using this.
   DataChannelType data_channel_type_;