Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / libjingle / source / talk / media / base / fakemediaengine.h
index 27fbeb0..a6eabef 100644 (file)
 #include <string>
 #include <vector>
 
-#include "talk/base/buffer.h"
-#include "talk/base/stringutils.h"
 #include "talk/media/base/audiorenderer.h"
 #include "talk/media/base/mediaengine.h"
 #include "talk/media/base/rtputils.h"
 #include "talk/media/base/streamparams.h"
 #include "talk/p2p/base/sessiondescription.h"
+#include "webrtc/base/buffer.h"
+#include "webrtc/base/stringutils.h"
 
 namespace cricket {
 
@@ -73,11 +73,11 @@ template <class Base> class RtpHelper : public Base {
     if (!sending_) {
       return false;
     }
-    talk_base::Buffer packet(data, len, kMaxRtpPacketLen);
+    rtc::Buffer packet(data, len, kMaxRtpPacketLen);
     return Base::SendPacket(&packet);
   }
   bool SendRtcp(const void* data, int len) {
-    talk_base::Buffer packet(data, len, kMaxRtpPacketLen);
+    rtc::Buffer packet(data, len, kMaxRtpPacketLen);
     return Base::SendRtcp(&packet);
   }
 
@@ -191,12 +191,12 @@ template <class Base> class RtpHelper : public Base {
     return true;
   }
   void set_playout(bool playout) { playout_ = playout; }
-  virtual void OnPacketReceived(talk_base::Buffer* packet,
-                                const talk_base::PacketTime& packet_time) {
+  virtual void OnPacketReceived(rtc::Buffer* packet,
+                                const rtc::PacketTime& packet_time) {
     rtp_packets_.push_back(std::string(packet->data(), packet->length()));
   }
-  virtual void OnRtcpReceived(talk_base::Buffer* packet,
-                              const talk_base::PacketTime& packet_time) {
+  virtual void OnRtcpReceived(rtc::Buffer* packet,
+                              const rtc::PacketTime& packet_time) {
     rtcp_packets_.push_back(std::string(packet->data(), packet->length()));
   }
   virtual void OnReadyToSend(bool ready) {
@@ -690,7 +690,7 @@ class FakeDataMediaChannel : public RtpHelper<DataMediaChannel> {
   }
 
   virtual bool SendData(const SendDataParams& params,
-                        const talk_base::Buffer& payload,
+                        const rtc::Buffer& payload,
                         SendDataResult* result) {
     if (send_blocked_) {
       *result = SDR_BLOCK;
@@ -724,7 +724,7 @@ class FakeBaseEngine {
       : loglevel_(-1),
         options_changed_(false),
         fail_create_channel_(false) {}
-  bool Init(talk_base::Thread* worker_thread) { return true; }
+  bool Init(rtc::Thread* worker_thread) { return true; }
   void Terminate() {}
 
   void SetLogging(int level, const char* filter) {
@@ -824,7 +824,7 @@ class FakeVoiceEngine : public FakeBaseEngine {
 
   bool SetLocalMonitor(bool enable) { return true; }
 
-  bool StartAecDump(talk_base::PlatformFile file) { return false; }
+  bool StartAecDump(rtc::PlatformFile file) { return false; }
 
   bool RegisterProcessor(uint32 ssrc, VoiceProcessor* voice_processor,
                          MediaProcessorDirection direction) {
@@ -868,7 +868,7 @@ class FakeVoiceEngine : public FakeBaseEngine {
 
 class FakeVideoEngine : public FakeBaseEngine {
  public:
-  FakeVideoEngine() : renderer_(NULL), capture_(false), processor_(NULL) {
+  FakeVideoEngine() : capture_(false), processor_(NULL) {
     // Add a fake video codec. Note that the name must not be "" as there are
     // sanity checks against that.
     codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0));
@@ -926,10 +926,6 @@ class FakeVideoEngine : public FakeBaseEngine {
     options_changed_ = true;
     return true;
   }
-  bool SetLocalRenderer(VideoRenderer* r) {
-    renderer_ = r;
-    return true;
-  }
   bool SetCapture(bool capture) {
     capture_ = capture;
     return true;
@@ -946,7 +942,6 @@ class FakeVideoEngine : public FakeBaseEngine {
   std::vector<VideoCodec> codecs_;
   VideoEncoderConfig default_encoder_config_;
   std::string in_device_;
-  VideoRenderer* renderer_;
   bool capture_;
   VideoProcessor* processor_;
   VideoOptions options_;
@@ -994,7 +989,6 @@ class FakeMediaEngine :
   }
   const std::string& audio_in_device() const { return voice_.in_device_; }
   const std::string& audio_out_device() const { return voice_.out_device_; }
-  VideoRenderer* local_renderer() { return video_.renderer_; }
   int voice_loglevel() const { return voice_.loglevel_; }
   const std::string& voice_logfilter() const { return voice_.logfilter_; }
   int video_loglevel() const { return video_.loglevel_; }