(Auto)update libjingle 72097588-> 72159069
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6799 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/audiotrack.cc b/talk/app/webrtc/audiotrack.cc
index a8d45ba..5ac9b96 100644
--- a/talk/app/webrtc/audiotrack.cc
+++ b/talk/app/webrtc/audiotrack.cc
@@ -42,10 +42,10 @@
return kAudioTrackKind;
}
-talk_base::scoped_refptr<AudioTrack> AudioTrack::Create(
+rtc::scoped_refptr<AudioTrack> AudioTrack::Create(
const std::string& id, AudioSourceInterface* source) {
- talk_base::RefCountedObject<AudioTrack>* track =
- new talk_base::RefCountedObject<AudioTrack>(id, source);
+ rtc::RefCountedObject<AudioTrack>* track =
+ new rtc::RefCountedObject<AudioTrack>(id, source);
return track;
}
diff --git a/talk/app/webrtc/audiotrack.h b/talk/app/webrtc/audiotrack.h
index 2f96527..f0094d3 100644
--- a/talk/app/webrtc/audiotrack.h
+++ b/talk/app/webrtc/audiotrack.h
@@ -31,14 +31,14 @@
#include "talk/app/webrtc/mediastreaminterface.h"
#include "talk/app/webrtc/mediastreamtrack.h"
#include "talk/app/webrtc/notifier.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/scoped_ref_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ref_ptr.h"
namespace webrtc {
class AudioTrack : public MediaStreamTrack<AudioTrackInterface> {
public:
- static talk_base::scoped_refptr<AudioTrack> Create(
+ static rtc::scoped_refptr<AudioTrack> Create(
const std::string& id, AudioSourceInterface* source);
// AudioTrackInterface implementation.
@@ -49,7 +49,7 @@
virtual void AddSink(AudioTrackSinkInterface* sink) OVERRIDE {}
virtual void RemoveSink(AudioTrackSinkInterface* sink) OVERRIDE {}
virtual bool GetSignalLevel(int* level) OVERRIDE { return false; }
- virtual talk_base::scoped_refptr<AudioProcessorInterface> GetAudioProcessor()
+ virtual rtc::scoped_refptr<AudioProcessorInterface> GetAudioProcessor()
OVERRIDE { return NULL; }
virtual cricket::AudioRenderer* GetRenderer() OVERRIDE {
return NULL;
@@ -62,7 +62,7 @@
AudioTrack(const std::string& label, AudioSourceInterface* audio_source);
private:
- talk_base::scoped_refptr<AudioSourceInterface> audio_source_;
+ rtc::scoped_refptr<AudioSourceInterface> audio_source_;
};
} // namespace webrtc
diff --git a/talk/app/webrtc/audiotrackrenderer.cc b/talk/app/webrtc/audiotrackrenderer.cc
index 92d3449..c812697 100644
--- a/talk/app/webrtc/audiotrackrenderer.cc
+++ b/talk/app/webrtc/audiotrackrenderer.cc
@@ -26,7 +26,7 @@
*/
#include "talk/app/webrtc/audiotrackrenderer.h"
-#include "talk/base/common.h"
+#include "webrtc/base/common.h"
namespace webrtc {
diff --git a/talk/app/webrtc/audiotrackrenderer.h b/talk/app/webrtc/audiotrackrenderer.h
index a4c58c4..4a9bf6e 100644
--- a/talk/app/webrtc/audiotrackrenderer.h
+++ b/talk/app/webrtc/audiotrackrenderer.h
@@ -28,7 +28,7 @@
#ifndef TALK_APP_WEBRTC_AUDIOTRACKRENDERER_H_
#define TALK_APP_WEBRTC_AUDIOTRACKRENDERER_H_
-#include "talk/base/thread.h"
+#include "webrtc/base/thread.h"
#include "talk/media/base/audiorenderer.h"
namespace webrtc {
diff --git a/talk/app/webrtc/datachannel.cc b/talk/app/webrtc/datachannel.cc
index d98f8be..952f5bf 100644
--- a/talk/app/webrtc/datachannel.cc
+++ b/talk/app/webrtc/datachannel.cc
@@ -30,8 +30,8 @@
#include "talk/app/webrtc/mediastreamprovider.h"
#include "talk/app/webrtc/sctputils.h"
-#include "talk/base/logging.h"
-#include "talk/base/refcount.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/refcount.h"
namespace webrtc {
@@ -86,13 +86,13 @@
other->packets_.swap(packets_);
}
-talk_base::scoped_refptr<DataChannel> DataChannel::Create(
+rtc::scoped_refptr<DataChannel> DataChannel::Create(
DataChannelProviderInterface* provider,
cricket::DataChannelType dct,
const std::string& label,
const InternalDataChannelInit& config) {
- talk_base::scoped_refptr<DataChannel> channel(
- new talk_base::RefCountedObject<DataChannel>(provider, dct, label));
+ rtc::scoped_refptr<DataChannel> channel(
+ new rtc::RefCountedObject<DataChannel>(provider, dct, label));
if (!channel->Init(config)) {
return NULL;
}
@@ -151,7 +151,7 @@
// Chrome glue and WebKit) are not wired up properly until after this
// function returns.
if (provider_->ReadyToSendData()) {
- talk_base::Thread::Current()->Post(this, MSG_CHANNELREADY, NULL);
+ rtc::Thread::Current()->Post(this, MSG_CHANNELREADY, NULL);
}
}
@@ -271,7 +271,7 @@
UpdateState();
}
-void DataChannel::OnMessage(talk_base::Message* msg) {
+void DataChannel::OnMessage(rtc::Message* msg) {
switch (msg->message_id) {
case MSG_CHANNELREADY:
OnChannelReady(true);
@@ -288,7 +288,7 @@
void DataChannel::OnDataReceived(cricket::DataChannel* channel,
const cricket::ReceiveDataParams& params,
- const talk_base::Buffer& payload) {
+ const rtc::Buffer& payload) {
uint32 expected_ssrc =
(data_channel_type_ == cricket::DCT_RTP) ? receive_ssrc_ : config_.id;
if (params.ssrc != expected_ssrc) {
@@ -325,7 +325,7 @@
waiting_for_open_ack_ = false;
bool binary = (params.type == cricket::DMT_BINARY);
- talk_base::scoped_ptr<DataBuffer> buffer(new DataBuffer(payload, binary));
+ rtc::scoped_ptr<DataBuffer> buffer(new DataBuffer(payload, binary));
if (was_ever_writable_ && observer_) {
observer_->OnMessage(*buffer.get());
} else {
@@ -355,7 +355,7 @@
was_ever_writable_ = true;
if (data_channel_type_ == cricket::DCT_SCTP) {
- talk_base::Buffer payload;
+ rtc::Buffer payload;
if (config_.open_handshake_role == InternalDataChannelInit::kOpener) {
WriteDataChannelOpenMessage(label_, config_, &payload);
@@ -452,7 +452,7 @@
}
while (!queued_received_data_.Empty()) {
- talk_base::scoped_ptr<DataBuffer> buffer(queued_received_data_.Front());
+ rtc::scoped_ptr<DataBuffer> buffer(queued_received_data_.Front());
observer_->OnMessage(*buffer);
queued_received_data_.Pop();
}
@@ -465,7 +465,7 @@
packet_buffer.Swap(&queued_send_data_);
while (!packet_buffer.Empty()) {
- talk_base::scoped_ptr<DataBuffer> buffer(packet_buffer.Front());
+ rtc::scoped_ptr<DataBuffer> buffer(packet_buffer.Front());
SendDataMessage(*buffer);
packet_buffer.Pop();
}
@@ -520,17 +520,17 @@
control_packets.Swap(&queued_control_data_);
while (!control_packets.Empty()) {
- talk_base::scoped_ptr<DataBuffer> buf(control_packets.Front());
+ rtc::scoped_ptr<DataBuffer> buf(control_packets.Front());
SendControlMessage(buf->data);
control_packets.Pop();
}
}
-void DataChannel::QueueControlMessage(const talk_base::Buffer& buffer) {
+void DataChannel::QueueControlMessage(const rtc::Buffer& buffer) {
queued_control_data_.Push(new DataBuffer(buffer, true));
}
-bool DataChannel::SendControlMessage(const talk_base::Buffer& buffer) {
+bool DataChannel::SendControlMessage(const rtc::Buffer& buffer) {
bool is_open_message =
(config_.open_handshake_role == InternalDataChannelInit::kOpener);
diff --git a/talk/app/webrtc/datachannel.h b/talk/app/webrtc/datachannel.h
index 0510f7e..184ad91 100644
--- a/talk/app/webrtc/datachannel.h
+++ b/talk/app/webrtc/datachannel.h
@@ -33,9 +33,9 @@
#include "talk/app/webrtc/datachannelinterface.h"
#include "talk/app/webrtc/proxy.h"
-#include "talk/base/messagehandler.h"
-#include "talk/base/scoped_ref_ptr.h"
-#include "talk/base/sigslot.h"
+#include "webrtc/base/messagehandler.h"
+#include "webrtc/base/scoped_ref_ptr.h"
+#include "webrtc/base/sigslot.h"
#include "talk/media/base/mediachannel.h"
#include "talk/session/media/channel.h"
@@ -47,7 +47,7 @@
public:
// Sends the data to the transport.
virtual bool SendData(const cricket::SendDataParams& params,
- const talk_base::Buffer& payload,
+ const rtc::Buffer& payload,
cricket::SendDataResult* result) = 0;
// Connects to the transport signals.
virtual bool ConnectDataChannel(DataChannel* data_channel) = 0;
@@ -100,9 +100,9 @@
// SSRC==0.
class DataChannel : public DataChannelInterface,
public sigslot::has_slots<>,
- public talk_base::MessageHandler {
+ public rtc::MessageHandler {
public:
- static talk_base::scoped_refptr<DataChannel> Create(
+ static rtc::scoped_refptr<DataChannel> Create(
DataChannelProviderInterface* provider,
cricket::DataChannelType dct,
const std::string& label,
@@ -128,8 +128,8 @@
virtual DataState state() const { return state_; }
virtual bool Send(const DataBuffer& buffer);
- // talk_base::MessageHandler override.
- virtual void OnMessage(talk_base::Message* msg);
+ // rtc::MessageHandler override.
+ virtual void OnMessage(rtc::Message* msg);
// Called if the underlying data engine is closing.
void OnDataEngineClose();
@@ -142,7 +142,7 @@
// Sigslots from cricket::DataChannel
void OnDataReceived(cricket::DataChannel* channel,
const cricket::ReceiveDataParams& params,
- const talk_base::Buffer& payload);
+ const rtc::Buffer& payload);
// The remote peer request that this channel should be closed.
void RemotePeerRequestClose();
@@ -217,8 +217,8 @@
bool QueueSendDataMessage(const DataBuffer& buffer);
void SendQueuedControlMessages();
- void QueueControlMessage(const talk_base::Buffer& buffer);
- bool SendControlMessage(const talk_base::Buffer& buffer);
+ void QueueControlMessage(const rtc::Buffer& buffer);
+ bool SendControlMessage(const rtc::Buffer& buffer);
std::string label_;
InternalDataChannelInit config_;
@@ -242,7 +242,7 @@
class DataChannelFactory {
public:
- virtual talk_base::scoped_refptr<DataChannel> CreateDataChannel(
+ virtual rtc::scoped_refptr<DataChannel> CreateDataChannel(
const std::string& label,
const InternalDataChannelInit* config) = 0;
diff --git a/talk/app/webrtc/datachannel_unittest.cc b/talk/app/webrtc/datachannel_unittest.cc
index ef4d26f..84a6935 100644
--- a/talk/app/webrtc/datachannel_unittest.cc
+++ b/talk/app/webrtc/datachannel_unittest.cc
@@ -28,7 +28,7 @@
#include "talk/app/webrtc/datachannel.h"
#include "talk/app/webrtc/sctputils.h"
#include "talk/app/webrtc/test/fakedatachannelprovider.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/gunit.h"
using webrtc::DataChannel;
@@ -86,14 +86,14 @@
webrtc::InternalDataChannelInit init_;
FakeDataChannelProvider provider_;
- talk_base::scoped_ptr<FakeDataChannelObserver> observer_;
- talk_base::scoped_refptr<DataChannel> webrtc_data_channel_;
+ rtc::scoped_ptr<FakeDataChannelObserver> observer_;
+ rtc::scoped_refptr<DataChannel> webrtc_data_channel_;
};
// Verifies that the data channel is connected to the transport after creation.
TEST_F(SctpDataChannelTest, ConnectedToTransportOnCreated) {
provider_.set_transport_available(true);
- talk_base::scoped_refptr<DataChannel> dc = DataChannel::Create(
+ rtc::scoped_refptr<DataChannel> dc = DataChannel::Create(
&provider_, cricket::DCT_SCTP, "test1", init_);
EXPECT_TRUE(provider_.IsConnected(dc.get()));
@@ -190,7 +190,7 @@
SetChannelReady();
webrtc::InternalDataChannelInit init;
init.id = 1;
- talk_base::scoped_refptr<DataChannel> dc = DataChannel::Create(
+ rtc::scoped_refptr<DataChannel> dc = DataChannel::Create(
&provider_, cricket::DCT_SCTP, "test1", init);
EXPECT_EQ(webrtc::DataChannelInterface::kConnecting, dc->state());
EXPECT_TRUE_WAIT(webrtc::DataChannelInterface::kOpen == dc->state(),
@@ -204,7 +204,7 @@
webrtc::InternalDataChannelInit init;
init.id = 1;
init.ordered = false;
- talk_base::scoped_refptr<DataChannel> dc = DataChannel::Create(
+ rtc::scoped_refptr<DataChannel> dc = DataChannel::Create(
&provider_, cricket::DCT_SCTP, "test1", init);
EXPECT_EQ_WAIT(webrtc::DataChannelInterface::kOpen, dc->state(), 1000);
@@ -218,7 +218,7 @@
cricket::ReceiveDataParams params;
params.ssrc = init.id;
params.type = cricket::DMT_CONTROL;
- talk_base::Buffer payload;
+ rtc::Buffer payload;
webrtc::WriteDataChannelOpenAckMessage(&payload);
dc->OnDataReceived(NULL, params, payload);
@@ -234,7 +234,7 @@
webrtc::InternalDataChannelInit init;
init.id = 1;
init.ordered = false;
- talk_base::scoped_refptr<DataChannel> dc = DataChannel::Create(
+ rtc::scoped_refptr<DataChannel> dc = DataChannel::Create(
&provider_, cricket::DCT_SCTP, "test1", init);
EXPECT_EQ_WAIT(webrtc::DataChannelInterface::kOpen, dc->state(), 1000);
@@ -299,7 +299,7 @@
config.open_handshake_role = webrtc::InternalDataChannelInit::kNone;
SetChannelReady();
- talk_base::scoped_refptr<DataChannel> dc = DataChannel::Create(
+ rtc::scoped_refptr<DataChannel> dc = DataChannel::Create(
&provider_, cricket::DCT_SCTP, "test1", config);
EXPECT_EQ_WAIT(webrtc::DataChannelInterface::kOpen, dc->state(), 1000);
@@ -315,7 +315,7 @@
config.open_handshake_role = webrtc::InternalDataChannelInit::kAcker;
SetChannelReady();
- talk_base::scoped_refptr<DataChannel> dc = DataChannel::Create(
+ rtc::scoped_refptr<DataChannel> dc = DataChannel::Create(
&provider_, cricket::DCT_SCTP, "test1", config);
EXPECT_EQ_WAIT(webrtc::DataChannelInterface::kOpen, dc->state(), 1000);
@@ -342,7 +342,7 @@
SetChannelReady();
const size_t buffer_size = 1024;
- talk_base::Buffer buffer;
+ rtc::Buffer buffer;
buffer.SetLength(buffer_size);
memset(buffer.data(), 0, buffer_size);
@@ -396,7 +396,7 @@
TEST_F(SctpDataChannelTest, ClosedWhenReceivedBufferFull) {
SetChannelReady();
const size_t buffer_size = 1024;
- talk_base::Buffer buffer;
+ rtc::Buffer buffer;
buffer.SetLength(buffer_size);
memset(buffer.data(), 0, buffer_size);
diff --git a/talk/app/webrtc/datachannelinterface.h b/talk/app/webrtc/datachannelinterface.h
index 57fe200..5684cc2 100644
--- a/talk/app/webrtc/datachannelinterface.h
+++ b/talk/app/webrtc/datachannelinterface.h
@@ -33,9 +33,9 @@
#include <string>
-#include "talk/base/basictypes.h"
-#include "talk/base/buffer.h"
-#include "talk/base/refcount.h"
+#include "webrtc/base/basictypes.h"
+#include "webrtc/base/buffer.h"
+#include "webrtc/base/refcount.h"
namespace webrtc {
@@ -66,7 +66,7 @@
};
struct DataBuffer {
- DataBuffer(const talk_base::Buffer& data, bool binary)
+ DataBuffer(const rtc::Buffer& data, bool binary)
: data(data),
binary(binary) {
}
@@ -77,7 +77,7 @@
}
size_t size() const { return data.length(); }
- talk_base::Buffer data;
+ rtc::Buffer data;
// Indicates if the received data contains UTF-8 or binary data.
// Note that the upper layers are left to verify the UTF-8 encoding.
// TODO(jiayl): prefer to use an enum instead of a bool.
@@ -95,7 +95,7 @@
virtual ~DataChannelObserver() {}
};
-class DataChannelInterface : public talk_base::RefCountInterface {
+class DataChannelInterface : public rtc::RefCountInterface {
public:
// Keep in sync with DataChannel.java:State and
// RTCDataChannel.h:RTCDataChannelState.
diff --git a/talk/app/webrtc/dtmfsender.cc b/talk/app/webrtc/dtmfsender.cc
index 6556acd..4eade16 100644
--- a/talk/app/webrtc/dtmfsender.cc
+++ b/talk/app/webrtc/dtmfsender.cc
@@ -31,8 +31,8 @@
#include <string>
-#include "talk/base/logging.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/thread.h"
namespace webrtc {
@@ -75,21 +75,21 @@
return true;
}
-talk_base::scoped_refptr<DtmfSender> DtmfSender::Create(
+rtc::scoped_refptr<DtmfSender> DtmfSender::Create(
AudioTrackInterface* track,
- talk_base::Thread* signaling_thread,
+ rtc::Thread* signaling_thread,
DtmfProviderInterface* provider) {
if (!track || !signaling_thread) {
return NULL;
}
- talk_base::scoped_refptr<DtmfSender> dtmf_sender(
- new talk_base::RefCountedObject<DtmfSender>(track, signaling_thread,
+ rtc::scoped_refptr<DtmfSender> dtmf_sender(
+ new rtc::RefCountedObject<DtmfSender>(track, signaling_thread,
provider));
return dtmf_sender;
}
DtmfSender::DtmfSender(AudioTrackInterface* track,
- talk_base::Thread* signaling_thread,
+ rtc::Thread* signaling_thread,
DtmfProviderInterface* provider)
: track_(track),
observer_(NULL),
@@ -176,7 +176,7 @@
return inter_tone_gap_;
}
-void DtmfSender::OnMessage(talk_base::Message* msg) {
+void DtmfSender::OnMessage(rtc::Message* msg) {
switch (msg->message_id) {
case MSG_DO_INSERT_DTMF: {
DoInsertDtmf();
diff --git a/talk/app/webrtc/dtmfsender.h b/talk/app/webrtc/dtmfsender.h
index f2bebde..e875d3a 100644
--- a/talk/app/webrtc/dtmfsender.h
+++ b/talk/app/webrtc/dtmfsender.h
@@ -33,15 +33,15 @@
#include "talk/app/webrtc/dtmfsenderinterface.h"
#include "talk/app/webrtc/mediastreaminterface.h"
#include "talk/app/webrtc/proxy.h"
-#include "talk/base/common.h"
-#include "talk/base/messagehandler.h"
-#include "talk/base/refcount.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/messagehandler.h"
+#include "webrtc/base/refcount.h"
// DtmfSender is the native implementation of the RTCDTMFSender defined by
// the WebRTC W3C Editor's Draft.
// http://dev.w3.org/2011/webrtc/editor/webrtc.html
-namespace talk_base {
+namespace rtc {
class Thread;
}
@@ -70,11 +70,11 @@
class DtmfSender
: public DtmfSenderInterface,
public sigslot::has_slots<>,
- public talk_base::MessageHandler {
+ public rtc::MessageHandler {
public:
- static talk_base::scoped_refptr<DtmfSender> Create(
+ static rtc::scoped_refptr<DtmfSender> Create(
AudioTrackInterface* track,
- talk_base::Thread* signaling_thread,
+ rtc::Thread* signaling_thread,
DtmfProviderInterface* provider);
// Implements DtmfSenderInterface.
@@ -90,7 +90,7 @@
protected:
DtmfSender(AudioTrackInterface* track,
- talk_base::Thread* signaling_thread,
+ rtc::Thread* signaling_thread,
DtmfProviderInterface* provider);
virtual ~DtmfSender();
@@ -98,7 +98,7 @@
DtmfSender();
// Implements MessageHandler.
- virtual void OnMessage(talk_base::Message* msg);
+ virtual void OnMessage(rtc::Message* msg);
// The DTMF sending task.
void DoInsertDtmf();
@@ -107,9 +107,9 @@
void StopSending();
- talk_base::scoped_refptr<AudioTrackInterface> track_;
+ rtc::scoped_refptr<AudioTrackInterface> track_;
DtmfSenderObserverInterface* observer_;
- talk_base::Thread* signaling_thread_;
+ rtc::Thread* signaling_thread_;
DtmfProviderInterface* provider_;
std::string tones_;
int duration_;
diff --git a/talk/app/webrtc/dtmfsender_unittest.cc b/talk/app/webrtc/dtmfsender_unittest.cc
index a483505..c5b19cc 100644
--- a/talk/app/webrtc/dtmfsender_unittest.cc
+++ b/talk/app/webrtc/dtmfsender_unittest.cc
@@ -32,9 +32,9 @@
#include <vector>
#include "talk/app/webrtc/audiotrack.h"
-#include "talk/base/gunit.h"
-#include "talk/base/logging.h"
-#include "talk/base/timeutils.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/timeutils.h"
using webrtc::AudioTrackInterface;
using webrtc::AudioTrack;
@@ -97,12 +97,12 @@
virtual bool InsertDtmf(const std::string& track_label,
int code, int duration) OVERRIDE {
int gap = 0;
- // TODO(ronghuawu): Make the timer (basically the talk_base::TimeNanos)
+ // TODO(ronghuawu): Make the timer (basically the rtc::TimeNanos)
// mockable and use a fake timer in the unit tests.
if (last_insert_dtmf_call_ > 0) {
- gap = static_cast<int>(talk_base::Time() - last_insert_dtmf_call_);
+ gap = static_cast<int>(rtc::Time() - last_insert_dtmf_call_);
}
- last_insert_dtmf_call_ = talk_base::Time();
+ last_insert_dtmf_call_ = rtc::Time();
LOG(LS_VERBOSE) << "FakeDtmfProvider::InsertDtmf code=" << code
<< " duration=" << duration
@@ -139,10 +139,10 @@
protected:
DtmfSenderTest()
: track_(AudioTrack::Create(kTestAudioLabel, NULL)),
- observer_(new talk_base::RefCountedObject<FakeDtmfObserver>()),
+ observer_(new rtc::RefCountedObject<FakeDtmfObserver>()),
provider_(new FakeDtmfProvider()) {
provider_->AddCanInsertDtmfTrack(kTestAudioLabel);
- dtmf_ = DtmfSender::Create(track_, talk_base::Thread::Current(),
+ dtmf_ = DtmfSender::Create(track_, rtc::Thread::Current(),
provider_.get());
dtmf_->RegisterObserver(observer_.get());
}
@@ -229,10 +229,10 @@
}
}
- talk_base::scoped_refptr<AudioTrackInterface> track_;
- talk_base::scoped_ptr<FakeDtmfObserver> observer_;
- talk_base::scoped_ptr<FakeDtmfProvider> provider_;
- talk_base::scoped_refptr<DtmfSender> dtmf_;
+ rtc::scoped_refptr<AudioTrackInterface> track_;
+ rtc::scoped_ptr<FakeDtmfObserver> observer_;
+ rtc::scoped_ptr<FakeDtmfProvider> provider_;
+ rtc::scoped_refptr<DtmfSender> dtmf_;
};
TEST_F(DtmfSenderTest, CanInsertDtmf) {
diff --git a/talk/app/webrtc/dtmfsenderinterface.h b/talk/app/webrtc/dtmfsenderinterface.h
index 46f3924..93b4543 100644
--- a/talk/app/webrtc/dtmfsenderinterface.h
+++ b/talk/app/webrtc/dtmfsenderinterface.h
@@ -31,8 +31,8 @@
#include <string>
#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/base/common.h"
-#include "talk/base/refcount.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/refcount.h"
// This file contains interfaces for DtmfSender.
@@ -53,7 +53,7 @@
// The interface of native implementation of the RTCDTMFSender defined by the
// WebRTC W3C Editor's Draft.
-class DtmfSenderInterface : public talk_base::RefCountInterface {
+class DtmfSenderInterface : public rtc::RefCountInterface {
public:
virtual void RegisterObserver(DtmfSenderObserverInterface* observer) = 0;
virtual void UnregisterObserver() = 0;
diff --git a/talk/app/webrtc/fakeportallocatorfactory.h b/talk/app/webrtc/fakeportallocatorfactory.h
index c1727ae..eee98b0 100644
--- a/talk/app/webrtc/fakeportallocatorfactory.h
+++ b/talk/app/webrtc/fakeportallocatorfactory.h
@@ -39,8 +39,8 @@
class FakePortAllocatorFactory : public PortAllocatorFactoryInterface {
public:
static FakePortAllocatorFactory* Create() {
- talk_base::RefCountedObject<FakePortAllocatorFactory>* allocator =
- new talk_base::RefCountedObject<FakePortAllocatorFactory>();
+ rtc::RefCountedObject<FakePortAllocatorFactory>* allocator =
+ new rtc::RefCountedObject<FakePortAllocatorFactory>();
return allocator;
}
@@ -49,7 +49,7 @@
const std::vector<TurnConfiguration>& turn_configurations) {
stun_configs_ = stun_configurations;
turn_configs_ = turn_configurations;
- return new cricket::FakePortAllocator(talk_base::Thread::Current(), NULL);
+ return new cricket::FakePortAllocator(rtc::Thread::Current(), NULL);
}
const std::vector<StunConfiguration>& stun_configs() const {
diff --git a/talk/app/webrtc/java/jni/peerconnection_jni.cc b/talk/app/webrtc/java/jni/peerconnection_jni.cc
index a3181a5..fadbc8a 100644
--- a/talk/app/webrtc/java/jni/peerconnection_jni.cc
+++ b/talk/app/webrtc/java/jni/peerconnection_jni.cc
@@ -66,10 +66,10 @@
#include "talk/app/webrtc/mediaconstraintsinterface.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "talk/app/webrtc/videosourceinterface.h"
-#include "talk/base/bind.h"
-#include "talk/base/logging.h"
-#include "talk/base/messagequeue.h"
-#include "talk/base/ssladapter.h"
+#include "webrtc/base/bind.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/messagequeue.h"
+#include "webrtc/base/ssladapter.h"
#include "talk/media/base/videocapturer.h"
#include "talk/media/base/videorenderer.h"
#include "talk/media/devices/videorendererfactory.h"
@@ -98,10 +98,10 @@
#endif
using icu::UnicodeString;
-using talk_base::Bind;
-using talk_base::Thread;
-using talk_base::ThreadManager;
-using talk_base::scoped_ptr;
+using rtc::Bind;
+using rtc::Thread;
+using rtc::ThreadManager;
+using rtc::scoped_ptr;
using webrtc::AudioSourceInterface;
using webrtc::AudioTrackInterface;
using webrtc::AudioTrackVector;
@@ -1177,7 +1177,7 @@
// MediaCodecVideoEncoder is created, operated, and destroyed on a single
// thread, currently the libjingle Worker thread.
class MediaCodecVideoEncoder : public webrtc::VideoEncoder,
- public talk_base::MessageHandler {
+ public rtc::MessageHandler {
public:
virtual ~MediaCodecVideoEncoder();
explicit MediaCodecVideoEncoder(JNIEnv* jni);
@@ -1198,8 +1198,8 @@
int /* rtt */) OVERRIDE;
virtual int32_t SetRates(uint32_t new_bit_rate, uint32_t frame_rate) OVERRIDE;
- // talk_base::MessageHandler implementation.
- virtual void OnMessage(talk_base::Message* msg) OVERRIDE;
+ // rtc::MessageHandler implementation.
+ virtual void OnMessage(rtc::Message* msg) OVERRIDE;
private:
// CHECK-fail if not running on |codec_thread_|.
@@ -1401,7 +1401,7 @@
frame_rate));
}
-void MediaCodecVideoEncoder::OnMessage(talk_base::Message* msg) {
+void MediaCodecVideoEncoder::OnMessage(rtc::Message* msg) {
JNIEnv* jni = AttachCurrentThreadIfNeeded();
ScopedLocalRefFrame local_ref_frame(jni);
@@ -1639,7 +1639,7 @@
}
void MediaCodecVideoEncoder::ResetParameters(JNIEnv* jni) {
- talk_base::MessageQueueManager::Clear(this);
+ rtc::MessageQueueManager::Clear(this);
width_ = 0;
height_ = 0;
yuv_size_ = 0;
@@ -1818,7 +1818,7 @@
}
class MediaCodecVideoDecoder : public webrtc::VideoDecoder,
- public talk_base::MessageHandler {
+ public rtc::MessageHandler {
public:
explicit MediaCodecVideoDecoder(JNIEnv* jni);
virtual ~MediaCodecVideoDecoder();
@@ -1838,8 +1838,8 @@
virtual int32_t Release() OVERRIDE;
virtual int32_t Reset() OVERRIDE;
- // talk_base::MessageHandler implementation.
- virtual void OnMessage(talk_base::Message* msg) OVERRIDE;
+ // rtc::MessageHandler implementation.
+ virtual void OnMessage(rtc::Message* msg) OVERRIDE;
private:
// CHECK-fail if not running on |codec_thread_|.
@@ -2196,7 +2196,7 @@
return InitDecode(&codec_, 1);
}
-void MediaCodecVideoDecoder::OnMessage(talk_base::Message* msg) {
+void MediaCodecVideoDecoder::OnMessage(rtc::Message* msg) {
}
class MediaCodecVideoDecoderFactory
@@ -2256,7 +2256,7 @@
CHECK(!pthread_once(&g_jni_ptr_once, &CreateJNIPtrKey), "pthread_once");
- CHECK(talk_base::InitializeSSL(), "Failed to InitializeSSL()");
+ CHECK(rtc::InitializeSSL(), "Failed to InitializeSSL()");
JNIEnv* jni;
if (jvm->GetEnv(reinterpret_cast<void**>(&jni), JNI_VERSION_1_6) != JNI_OK)
@@ -2270,7 +2270,7 @@
g_class_reference_holder->FreeReferences(AttachCurrentThreadIfNeeded());
delete g_class_reference_holder;
g_class_reference_holder = NULL;
- CHECK(talk_base::CleanupSSL(), "Failed to CleanupSSL()");
+ CHECK(rtc::CleanupSSL(), "Failed to CleanupSSL()");
g_jvm = NULL;
}
@@ -2319,7 +2319,7 @@
jbyteArray data, jboolean binary) {
jbyte* bytes = jni->GetByteArrayElements(data, NULL);
bool ret = ExtractNativeDC(jni, j_dc)->Send(DataBuffer(
- talk_base::Buffer(bytes, jni->GetArrayLength(data)),
+ rtc::Buffer(bytes, jni->GetArrayLength(data)),
binary));
jni->ReleaseByteArrayElements(data, bytes, JNI_ABORT);
return ret;
@@ -2348,7 +2348,7 @@
}
#endif
}
- talk_base::LogMessage::LogToDebug(nativeSeverity);
+ rtc::LogMessage::LogToDebug(nativeSeverity);
}
JOW(void, PeerConnection_freePeerConnection)(JNIEnv*, jclass, jlong j_p) {
@@ -2458,9 +2458,9 @@
// talk/ assumes pretty widely that the current Thread is ThreadManager'd, but
// ThreadManager only WrapCurrentThread()s the thread where it is first
// created. Since the semantics around when auto-wrapping happens in
- // talk/base/ are convoluted, we simply wrap here to avoid having to think
+ // webrtc/base/ are convoluted, we simply wrap here to avoid having to think
// about ramifications of auto-wrapping there.
- talk_base::ThreadManager::Instance()->WrapCurrentThread();
+ rtc::ThreadManager::Instance()->WrapCurrentThread();
webrtc::Trace::CreateTrace();
Thread* worker_thread = new Thread();
worker_thread->SetName("worker_thread", NULL);
@@ -2474,7 +2474,7 @@
encoder_factory.reset(new MediaCodecVideoEncoderFactory());
decoder_factory.reset(new MediaCodecVideoDecoderFactory());
#endif
- talk_base::scoped_refptr<PeerConnectionFactoryInterface> factory(
+ rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
webrtc::CreatePeerConnectionFactory(worker_thread,
signaling_thread,
NULL,
@@ -2496,9 +2496,9 @@
JOW(jlong, PeerConnectionFactory_nativeCreateLocalMediaStream)(
JNIEnv* jni, jclass, jlong native_factory, jstring label) {
- talk_base::scoped_refptr<PeerConnectionFactoryInterface> factory(
+ rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
factoryFromJava(native_factory));
- talk_base::scoped_refptr<MediaStreamInterface> stream(
+ rtc::scoped_refptr<MediaStreamInterface> stream(
factory->CreateLocalMediaStream(JavaToStdString(jni, label)));
return (jlong)stream.release();
}
@@ -2508,9 +2508,9 @@
jobject j_constraints) {
scoped_ptr<ConstraintsWrapper> constraints(
new ConstraintsWrapper(jni, j_constraints));
- talk_base::scoped_refptr<PeerConnectionFactoryInterface> factory(
+ rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
factoryFromJava(native_factory));
- talk_base::scoped_refptr<VideoSourceInterface> source(
+ rtc::scoped_refptr<VideoSourceInterface> source(
factory->CreateVideoSource(
reinterpret_cast<cricket::VideoCapturer*>(native_capturer),
constraints.get()));
@@ -2520,9 +2520,9 @@
JOW(jlong, PeerConnectionFactory_nativeCreateVideoTrack)(
JNIEnv* jni, jclass, jlong native_factory, jstring id,
jlong native_source) {
- talk_base::scoped_refptr<PeerConnectionFactoryInterface> factory(
+ rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
factoryFromJava(native_factory));
- talk_base::scoped_refptr<VideoTrackInterface> track(
+ rtc::scoped_refptr<VideoTrackInterface> track(
factory->CreateVideoTrack(
JavaToStdString(jni, id),
reinterpret_cast<VideoSourceInterface*>(native_source)));
@@ -2533,9 +2533,9 @@
JNIEnv* jni, jclass, jlong native_factory, jobject j_constraints) {
scoped_ptr<ConstraintsWrapper> constraints(
new ConstraintsWrapper(jni, j_constraints));
- talk_base::scoped_refptr<PeerConnectionFactoryInterface> factory(
+ rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
factoryFromJava(native_factory));
- talk_base::scoped_refptr<AudioSourceInterface> source(
+ rtc::scoped_refptr<AudioSourceInterface> source(
factory->CreateAudioSource(constraints.get()));
return (jlong)source.release();
}
@@ -2543,9 +2543,9 @@
JOW(jlong, PeerConnectionFactory_nativeCreateAudioTrack)(
JNIEnv* jni, jclass, jlong native_factory, jstring id,
jlong native_source) {
- talk_base::scoped_refptr<PeerConnectionFactoryInterface> factory(
+ rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
factoryFromJava(native_factory));
- talk_base::scoped_refptr<AudioTrackInterface> track(factory->CreateAudioTrack(
+ rtc::scoped_refptr<AudioTrackInterface> track(factory->CreateAudioTrack(
JavaToStdString(jni, id),
reinterpret_cast<AudioSourceInterface*>(native_source)));
return (jlong)track.release();
@@ -2592,24 +2592,24 @@
JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)(
JNIEnv *jni, jclass, jlong factory, jobject j_ice_servers,
jobject j_constraints, jlong observer_p) {
- talk_base::scoped_refptr<PeerConnectionFactoryInterface> f(
+ rtc::scoped_refptr<PeerConnectionFactoryInterface> f(
reinterpret_cast<PeerConnectionFactoryInterface*>(
factoryFromJava(factory)));
PeerConnectionInterface::IceServers servers;
JavaIceServersToJsepIceServers(jni, j_ice_servers, &servers);
PCOJava* observer = reinterpret_cast<PCOJava*>(observer_p);
observer->SetConstraints(new ConstraintsWrapper(jni, j_constraints));
- talk_base::scoped_refptr<PeerConnectionInterface> pc(f->CreatePeerConnection(
+ rtc::scoped_refptr<PeerConnectionInterface> pc(f->CreatePeerConnection(
servers, observer->constraints(), NULL, NULL, observer));
return (jlong)pc.release();
}
-static talk_base::scoped_refptr<PeerConnectionInterface> ExtractNativePC(
+static rtc::scoped_refptr<PeerConnectionInterface> ExtractNativePC(
JNIEnv* jni, jobject j_pc) {
jfieldID native_pc_id = GetFieldID(jni,
GetObjectClass(jni, j_pc), "nativePeerConnection", "J");
jlong j_p = GetLongField(jni, j_pc, native_pc_id);
- return talk_base::scoped_refptr<PeerConnectionInterface>(
+ return rtc::scoped_refptr<PeerConnectionInterface>(
reinterpret_cast<PeerConnectionInterface*>(j_p));
}
@@ -2628,7 +2628,7 @@
JOW(jobject, PeerConnection_createDataChannel)(
JNIEnv* jni, jobject j_pc, jstring j_label, jobject j_init) {
DataChannelInit init = JavaDataChannelInitToNative(jni, j_init);
- talk_base::scoped_refptr<DataChannelInterface> channel(
+ rtc::scoped_refptr<DataChannelInterface> channel(
ExtractNativePC(jni, j_pc)->CreateDataChannel(
JavaToStdString(jni, j_label), &init));
// Mustn't pass channel.get() directly through NewObject to avoid reading its
@@ -2652,8 +2652,8 @@
JNIEnv* jni, jobject j_pc, jobject j_observer, jobject j_constraints) {
ConstraintsWrapper* constraints =
new ConstraintsWrapper(jni, j_constraints);
- talk_base::scoped_refptr<CreateSdpObserverWrapper> observer(
- new talk_base::RefCountedObject<CreateSdpObserverWrapper>(
+ rtc::scoped_refptr<CreateSdpObserverWrapper> observer(
+ new rtc::RefCountedObject<CreateSdpObserverWrapper>(
jni, j_observer, constraints));
ExtractNativePC(jni, j_pc)->CreateOffer(observer, constraints);
}
@@ -2662,8 +2662,8 @@
JNIEnv* jni, jobject j_pc, jobject j_observer, jobject j_constraints) {
ConstraintsWrapper* constraints =
new ConstraintsWrapper(jni, j_constraints);
- talk_base::scoped_refptr<CreateSdpObserverWrapper> observer(
- new talk_base::RefCountedObject<CreateSdpObserverWrapper>(
+ rtc::scoped_refptr<CreateSdpObserverWrapper> observer(
+ new rtc::RefCountedObject<CreateSdpObserverWrapper>(
jni, j_observer, constraints));
ExtractNativePC(jni, j_pc)->CreateAnswer(observer, constraints);
}
@@ -2695,8 +2695,8 @@
JOW(void, PeerConnection_setLocalDescription)(
JNIEnv* jni, jobject j_pc,
jobject j_observer, jobject j_sdp) {
- talk_base::scoped_refptr<SetSdpObserverWrapper> observer(
- new talk_base::RefCountedObject<SetSdpObserverWrapper>(
+ rtc::scoped_refptr<SetSdpObserverWrapper> observer(
+ new rtc::RefCountedObject<SetSdpObserverWrapper>(
jni, j_observer, reinterpret_cast<ConstraintsWrapper*>(NULL)));
ExtractNativePC(jni, j_pc)->SetLocalDescription(
observer, JavaSdpToNativeSdp(jni, j_sdp));
@@ -2705,8 +2705,8 @@
JOW(void, PeerConnection_setRemoteDescription)(
JNIEnv* jni, jobject j_pc,
jobject j_observer, jobject j_sdp) {
- talk_base::scoped_refptr<SetSdpObserverWrapper> observer(
- new talk_base::RefCountedObject<SetSdpObserverWrapper>(
+ rtc::scoped_refptr<SetSdpObserverWrapper> observer(
+ new rtc::RefCountedObject<SetSdpObserverWrapper>(
jni, j_observer, reinterpret_cast<ConstraintsWrapper*>(NULL)));
ExtractNativePC(jni, j_pc)->SetRemoteDescription(
observer, JavaSdpToNativeSdp(jni, j_sdp));
@@ -2748,8 +2748,8 @@
JOW(bool, PeerConnection_nativeGetStats)(
JNIEnv* jni, jobject j_pc, jobject j_observer, jlong native_track) {
- talk_base::scoped_refptr<StatsObserverWrapper> observer(
- new talk_base::RefCountedObject<StatsObserverWrapper>(jni, j_observer));
+ rtc::scoped_refptr<StatsObserverWrapper> observer(
+ new rtc::RefCountedObject<StatsObserverWrapper>(jni, j_observer));
return ExtractNativePC(jni, j_pc)->GetStats(
observer,
reinterpret_cast<MediaStreamTrackInterface*>(native_track),
@@ -2780,7 +2780,7 @@
}
JOW(jobject, MediaSource_nativeState)(JNIEnv* jni, jclass, jlong j_p) {
- talk_base::scoped_refptr<MediaSourceInterface> p(
+ rtc::scoped_refptr<MediaSourceInterface> p(
reinterpret_cast<MediaSourceInterface*>(j_p));
return JavaEnumFromIndex(jni, "MediaSource$State", p->state());
}
diff --git a/talk/app/webrtc/java/src/org/webrtc/Logging.java b/talk/app/webrtc/java/src/org/webrtc/Logging.java
index 8b23daf..b8d6c6e 100644
--- a/talk/app/webrtc/java/src/org/webrtc/Logging.java
+++ b/talk/app/webrtc/java/src/org/webrtc/Logging.java
@@ -59,7 +59,7 @@
}
};
- // Keep in sync with talk/base/logging.h:LoggingSeverity.
+ // Keep in sync with webrtc/base/logging.h:LoggingSeverity.
public enum Severity {
LS_SENSITIVE, LS_VERBOSE, LS_INFO, LS_WARNING, LS_ERROR,
};
diff --git a/talk/app/webrtc/jsep.h b/talk/app/webrtc/jsep.h
index 5f28fc8..e748da1 100644
--- a/talk/app/webrtc/jsep.h
+++ b/talk/app/webrtc/jsep.h
@@ -33,8 +33,8 @@
#include <string>
#include <vector>
-#include "talk/base/basictypes.h"
-#include "talk/base/refcount.h"
+#include "webrtc/base/basictypes.h"
+#include "webrtc/base/refcount.h"
namespace cricket {
class SessionDescription;
@@ -138,7 +138,7 @@
SdpParseError* error);
// Jsep CreateOffer and CreateAnswer callback interface.
-class CreateSessionDescriptionObserver : public talk_base::RefCountInterface {
+class CreateSessionDescriptionObserver : public rtc::RefCountInterface {
public:
// The implementation of the CreateSessionDescriptionObserver takes
// the ownership of the |desc|.
@@ -150,7 +150,7 @@
};
// Jsep SetLocalDescription and SetRemoteDescription callback interface.
-class SetSessionDescriptionObserver : public talk_base::RefCountInterface {
+class SetSessionDescriptionObserver : public rtc::RefCountInterface {
public:
virtual void OnSuccess() = 0;
virtual void OnFailure(const std::string& error) = 0;
diff --git a/talk/app/webrtc/jsepicecandidate.cc b/talk/app/webrtc/jsepicecandidate.cc
index 13cc812..755403e 100644
--- a/talk/app/webrtc/jsepicecandidate.cc
+++ b/talk/app/webrtc/jsepicecandidate.cc
@@ -30,7 +30,7 @@
#include <vector>
#include "talk/app/webrtc/webrtcsdp.h"
-#include "talk/base/stringencode.h"
+#include "webrtc/base/stringencode.h"
namespace webrtc {
diff --git a/talk/app/webrtc/jsepicecandidate.h b/talk/app/webrtc/jsepicecandidate.h
index 54de950..3463c82 100644
--- a/talk/app/webrtc/jsepicecandidate.h
+++ b/talk/app/webrtc/jsepicecandidate.h
@@ -33,7 +33,7 @@
#include <string>
#include "talk/app/webrtc/jsep.h"
-#include "talk/base/constructormagic.h"
+#include "webrtc/base/constructormagic.h"
#include "talk/p2p/base/candidate.h"
namespace webrtc {
diff --git a/talk/app/webrtc/jsepsessiondescription.cc b/talk/app/webrtc/jsepsessiondescription.cc
index 13604b4..eb42392 100644
--- a/talk/app/webrtc/jsepsessiondescription.cc
+++ b/talk/app/webrtc/jsepsessiondescription.cc
@@ -27,10 +27,10 @@
#include "talk/app/webrtc/jsepsessiondescription.h"
#include "talk/app/webrtc/webrtcsdp.h"
-#include "talk/base/stringencode.h"
+#include "webrtc/base/stringencode.h"
#include "talk/session/media/mediasession.h"
-using talk_base::scoped_ptr;
+using rtc::scoped_ptr;
using cricket::SessionDescription;
namespace webrtc {
diff --git a/talk/app/webrtc/jsepsessiondescription.h b/talk/app/webrtc/jsepsessiondescription.h
index 7ca7a22..07d13a3 100644
--- a/talk/app/webrtc/jsepsessiondescription.h
+++ b/talk/app/webrtc/jsepsessiondescription.h
@@ -35,7 +35,7 @@
#include "talk/app/webrtc/jsep.h"
#include "talk/app/webrtc/jsepicecandidate.h"
-#include "talk/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
namespace cricket {
class SessionDescription;
@@ -89,7 +89,7 @@
static const int kDefaultVideoCodecPreference;
private:
- talk_base::scoped_ptr<cricket::SessionDescription> description_;
+ rtc::scoped_ptr<cricket::SessionDescription> description_;
std::string session_id_;
std::string session_version_;
std::string type_;
diff --git a/talk/app/webrtc/jsepsessiondescription_unittest.cc b/talk/app/webrtc/jsepsessiondescription_unittest.cc
index 55eb3d5..12db9d4 100644
--- a/talk/app/webrtc/jsepsessiondescription_unittest.cc
+++ b/talk/app/webrtc/jsepsessiondescription_unittest.cc
@@ -29,11 +29,11 @@
#include "talk/app/webrtc/jsepicecandidate.h"
#include "talk/app/webrtc/jsepsessiondescription.h"
-#include "talk/base/gunit.h"
-#include "talk/base/helpers.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/ssladapter.h"
-#include "talk/base/stringencode.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/helpers.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/ssladapter.h"
+#include "webrtc/base/stringencode.h"
#include "talk/p2p/base/candidate.h"
#include "talk/p2p/base/constants.h"
#include "talk/p2p/base/sessiondescription.h"
@@ -44,7 +44,7 @@
using webrtc::JsepIceCandidate;
using webrtc::JsepSessionDescription;
using webrtc::SessionDescriptionInterface;
-using talk_base::scoped_ptr;
+using rtc::scoped_ptr;
static const char kCandidateUfrag[] = "ufrag";
static const char kCandidatePwd[] = "pwd";
@@ -98,24 +98,24 @@
class JsepSessionDescriptionTest : public testing::Test {
protected:
static void SetUpTestCase() {
- talk_base::InitializeSSL();
+ rtc::InitializeSSL();
}
static void TearDownTestCase() {
- talk_base::CleanupSSL();
+ rtc::CleanupSSL();
}
virtual void SetUp() {
int port = 1234;
- talk_base::SocketAddress address("127.0.0.1", port++);
+ rtc::SocketAddress address("127.0.0.1", port++);
cricket::Candidate candidate("rtp", cricket::ICE_CANDIDATE_COMPONENT_RTP,
"udp", address, 1, "",
"", "local", "eth0", 0, "1");
candidate_ = candidate;
const std::string session_id =
- talk_base::ToString(talk_base::CreateRandomId64());
+ rtc::ToString(rtc::CreateRandomId64());
const std::string session_version =
- talk_base::ToString(talk_base::CreateRandomId());
+ rtc::ToString(rtc::CreateRandomId());
jsep_desc_.reset(new JsepSessionDescription("dummy"));
ASSERT_TRUE(jsep_desc_->Initialize(CreateCricketSessionDescription(),
session_id, session_version));
@@ -135,7 +135,7 @@
}
cricket::Candidate candidate_;
- talk_base::scoped_ptr<JsepSessionDescription> jsep_desc_;
+ rtc::scoped_ptr<JsepSessionDescription> jsep_desc_;
};
// Test that number_of_mediasections() returns the number of media contents in
diff --git a/talk/app/webrtc/localaudiosource.cc b/talk/app/webrtc/localaudiosource.cc
index ab9ae4f..9a37112 100644
--- a/talk/app/webrtc/localaudiosource.cc
+++ b/talk/app/webrtc/localaudiosource.cc
@@ -53,7 +53,7 @@
for (iter = constraints.begin(); iter != constraints.end(); ++iter) {
bool value = false;
- if (!talk_base::FromString(iter->value, &value)) {
+ if (!rtc::FromString(iter->value, &value)) {
success = false;
continue;
}
@@ -87,11 +87,11 @@
} // namespace
-talk_base::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
+rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
const PeerConnectionFactoryInterface::Options& options,
const MediaConstraintsInterface* constraints) {
- talk_base::scoped_refptr<LocalAudioSource> source(
- new talk_base::RefCountedObject<LocalAudioSource>());
+ rtc::scoped_refptr<LocalAudioSource> source(
+ new rtc::RefCountedObject<LocalAudioSource>());
source->Initialize(options, constraints);
return source;
}
diff --git a/talk/app/webrtc/localaudiosource.h b/talk/app/webrtc/localaudiosource.h
index fb769ed..84fa763 100644
--- a/talk/app/webrtc/localaudiosource.h
+++ b/talk/app/webrtc/localaudiosource.h
@@ -31,7 +31,7 @@
#include "talk/app/webrtc/mediastreaminterface.h"
#include "talk/app/webrtc/notifier.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
#include "talk/media/base/mediachannel.h"
// LocalAudioSource implements AudioSourceInterface.
@@ -44,7 +44,7 @@
class LocalAudioSource : public Notifier<AudioSourceInterface> {
public:
// Creates an instance of LocalAudioSource.
- static talk_base::scoped_refptr<LocalAudioSource> Create(
+ static rtc::scoped_refptr<LocalAudioSource> Create(
const PeerConnectionFactoryInterface::Options& options,
const MediaConstraintsInterface* constraints);
diff --git a/talk/app/webrtc/localaudiosource_unittest.cc b/talk/app/webrtc/localaudiosource_unittest.cc
index f8880e0..3a14bec 100644
--- a/talk/app/webrtc/localaudiosource_unittest.cc
+++ b/talk/app/webrtc/localaudiosource_unittest.cc
@@ -31,7 +31,7 @@
#include <vector>
#include "talk/app/webrtc/test/fakeconstraints.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/gunit.h"
#include "talk/media/base/fakemediaengine.h"
#include "talk/media/base/fakevideorenderer.h"
#include "talk/media/devices/fakedevicemanager.h"
@@ -52,7 +52,7 @@
constraints.AddMandatory(MediaConstraintsInterface::kNoiseSuppression, false);
constraints.AddOptional(MediaConstraintsInterface::kHighpassFilter, true);
- talk_base::scoped_refptr<LocalAudioSource> source =
+ rtc::scoped_refptr<LocalAudioSource> source =
LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
&constraints);
@@ -73,7 +73,7 @@
TEST(LocalAudioSourceTest, OptionNotSet) {
webrtc::FakeConstraints constraints;
- talk_base::scoped_refptr<LocalAudioSource> source =
+ rtc::scoped_refptr<LocalAudioSource> source =
LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
&constraints);
bool value;
@@ -85,7 +85,7 @@
constraints.AddMandatory(MediaConstraintsInterface::kEchoCancellation, false);
constraints.AddOptional(MediaConstraintsInterface::kEchoCancellation, true);
- talk_base::scoped_refptr<LocalAudioSource> source =
+ rtc::scoped_refptr<LocalAudioSource> source =
LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
&constraints);
@@ -99,7 +99,7 @@
constraints.AddOptional(MediaConstraintsInterface::kHighpassFilter, false);
constraints.AddOptional("invalidKey", false);
- talk_base::scoped_refptr<LocalAudioSource> source =
+ rtc::scoped_refptr<LocalAudioSource> source =
LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
&constraints);
@@ -114,7 +114,7 @@
constraints.AddMandatory(MediaConstraintsInterface::kHighpassFilter, false);
constraints.AddMandatory("invalidKey", false);
- talk_base::scoped_refptr<LocalAudioSource> source =
+ rtc::scoped_refptr<LocalAudioSource> source =
LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
&constraints);
diff --git a/talk/app/webrtc/mediaconstraintsinterface.cc b/talk/app/webrtc/mediaconstraintsinterface.cc
index c383695..874ce64 100644
--- a/talk/app/webrtc/mediaconstraintsinterface.cc
+++ b/talk/app/webrtc/mediaconstraintsinterface.cc
@@ -27,7 +27,7 @@
#include "talk/app/webrtc/mediaconstraintsinterface.h"
-#include "talk/base/stringencode.h"
+#include "webrtc/base/stringencode.h"
namespace webrtc {
@@ -153,10 +153,10 @@
if (constraints->GetMandatory().FindFirst(key, &string_value)) {
if (mandatory_constraints)
++*mandatory_constraints;
- return talk_base::FromString(string_value, value);
+ return rtc::FromString(string_value, value);
}
if (constraints->GetOptional().FindFirst(key, &string_value)) {
- return talk_base::FromString(string_value, value);
+ return rtc::FromString(string_value, value);
}
return false;
}
diff --git a/talk/app/webrtc/mediastream.cc b/talk/app/webrtc/mediastream.cc
index aad8e85..2bd5b53 100644
--- a/talk/app/webrtc/mediastream.cc
+++ b/talk/app/webrtc/mediastream.cc
@@ -26,7 +26,7 @@
*/
#include "talk/app/webrtc/mediastream.h"
-#include "talk/base/logging.h"
+#include "webrtc/base/logging.h"
namespace webrtc {
@@ -42,10 +42,10 @@
return it;
};
-talk_base::scoped_refptr<MediaStream> MediaStream::Create(
+rtc::scoped_refptr<MediaStream> MediaStream::Create(
const std::string& label) {
- talk_base::RefCountedObject<MediaStream>* stream =
- new talk_base::RefCountedObject<MediaStream>(label);
+ rtc::RefCountedObject<MediaStream>* stream =
+ new rtc::RefCountedObject<MediaStream>(label);
return stream;
}
@@ -69,7 +69,7 @@
return RemoveTrack<VideoTrackVector>(&video_tracks_, track);
}
-talk_base::scoped_refptr<AudioTrackInterface>
+rtc::scoped_refptr<AudioTrackInterface>
MediaStream::FindAudioTrack(const std::string& track_id) {
AudioTrackVector::iterator it = FindTrack(&audio_tracks_, track_id);
if (it == audio_tracks_.end())
@@ -77,7 +77,7 @@
return *it;
}
-talk_base::scoped_refptr<VideoTrackInterface>
+rtc::scoped_refptr<VideoTrackInterface>
MediaStream::FindVideoTrack(const std::string& track_id) {
VideoTrackVector::iterator it = FindTrack(&video_tracks_, track_id);
if (it == video_tracks_.end())
diff --git a/talk/app/webrtc/mediastream.h b/talk/app/webrtc/mediastream.h
index e5ac6eb..c8e0bcc 100644
--- a/talk/app/webrtc/mediastream.h
+++ b/talk/app/webrtc/mediastream.h
@@ -40,7 +40,7 @@
class MediaStream : public Notifier<MediaStreamInterface> {
public:
- static talk_base::scoped_refptr<MediaStream> Create(const std::string& label);
+ static rtc::scoped_refptr<MediaStream> Create(const std::string& label);
virtual std::string label() const OVERRIDE { return label_; }
@@ -48,9 +48,9 @@
virtual bool AddTrack(VideoTrackInterface* track) OVERRIDE;
virtual bool RemoveTrack(AudioTrackInterface* track) OVERRIDE;
virtual bool RemoveTrack(VideoTrackInterface* track) OVERRIDE;
- virtual talk_base::scoped_refptr<AudioTrackInterface>
+ virtual rtc::scoped_refptr<AudioTrackInterface>
FindAudioTrack(const std::string& track_id);
- virtual talk_base::scoped_refptr<VideoTrackInterface>
+ virtual rtc::scoped_refptr<VideoTrackInterface>
FindVideoTrack(const std::string& track_id);
virtual AudioTrackVector GetAudioTracks() OVERRIDE { return audio_tracks_; }
diff --git a/talk/app/webrtc/mediastream_unittest.cc b/talk/app/webrtc/mediastream_unittest.cc
index 113242f..4711e9c 100644
--- a/talk/app/webrtc/mediastream_unittest.cc
+++ b/talk/app/webrtc/mediastream_unittest.cc
@@ -30,9 +30,9 @@
#include "talk/app/webrtc/audiotrack.h"
#include "talk/app/webrtc/mediastream.h"
#include "talk/app/webrtc/videotrack.h"
-#include "talk/base/refcount.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/refcount.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/gunit.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -40,7 +40,7 @@
static const char kVideoTrackId[] = "dummy_video_cam_1";
static const char kAudioTrackId[] = "dummy_microphone_1";
-using talk_base::scoped_refptr;
+using rtc::scoped_refptr;
using ::testing::Exactly;
namespace webrtc {
diff --git a/talk/app/webrtc/mediastreamhandler.cc b/talk/app/webrtc/mediastreamhandler.cc
index ca28cf4..57aa4f5 100644
--- a/talk/app/webrtc/mediastreamhandler.cc
+++ b/talk/app/webrtc/mediastreamhandler.cc
@@ -59,7 +59,7 @@
LocalAudioSinkAdapter::LocalAudioSinkAdapter() : sink_(NULL) {}
LocalAudioSinkAdapter::~LocalAudioSinkAdapter() {
- talk_base::CritScope lock(&lock_);
+ rtc::CritScope lock(&lock_);
if (sink_)
sink_->OnClose();
}
@@ -69,7 +69,7 @@
int sample_rate,
int number_of_channels,
int number_of_frames) {
- talk_base::CritScope lock(&lock_);
+ rtc::CritScope lock(&lock_);
if (sink_) {
sink_->OnData(audio_data, bits_per_sample, sample_rate,
number_of_channels, number_of_frames);
@@ -77,7 +77,7 @@
}
void LocalAudioSinkAdapter::SetSink(cricket::AudioRenderer::Sink* sink) {
- talk_base::CritScope lock(&lock_);
+ rtc::CritScope lock(&lock_);
ASSERT(!sink || !sink_);
sink_ = sink;
}
diff --git a/talk/app/webrtc/mediastreamhandler.h b/talk/app/webrtc/mediastreamhandler.h
index 53afd55..63864ce 100644
--- a/talk/app/webrtc/mediastreamhandler.h
+++ b/talk/app/webrtc/mediastreamhandler.h
@@ -39,7 +39,7 @@
#include "talk/app/webrtc/mediastreaminterface.h"
#include "talk/app/webrtc/mediastreamprovider.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/thread.h"
#include "talk/media/base/audiorenderer.h"
namespace webrtc {
@@ -62,7 +62,7 @@
virtual void OnEnabledChanged() = 0;
private:
- talk_base::scoped_refptr<MediaStreamTrackInterface> track_;
+ rtc::scoped_refptr<MediaStreamTrackInterface> track_;
uint32 ssrc_;
MediaStreamTrackInterface::TrackState state_;
bool enabled_;
@@ -87,7 +87,7 @@
cricket::AudioRenderer::Sink* sink_;
// Critical section protecting |sink_|.
- talk_base::CriticalSection lock_;
+ rtc::CriticalSection lock_;
};
// LocalAudioTrackHandler listen to events on a local AudioTrack instance
@@ -112,7 +112,7 @@
// Used to pass the data callback from the |audio_track_| to the other
// end of cricket::AudioRenderer.
- talk_base::scoped_ptr<LocalAudioSinkAdapter> sink_adapter_;
+ rtc::scoped_ptr<LocalAudioSinkAdapter> sink_adapter_;
};
// RemoteAudioTrackHandler listen to events on a remote AudioTrack instance
@@ -196,7 +196,7 @@
protected:
TrackHandler* FindTrackHandler(MediaStreamTrackInterface* track);
- talk_base::scoped_refptr<MediaStreamInterface> stream_;
+ rtc::scoped_refptr<MediaStreamInterface> stream_;
AudioProviderInterface* audio_provider_;
VideoProviderInterface* video_provider_;
typedef std::vector<TrackHandler*> TrackHandlers;
diff --git a/talk/app/webrtc/mediastreamhandler_unittest.cc b/talk/app/webrtc/mediastreamhandler_unittest.cc
index 9a53f35..7727086 100644
--- a/talk/app/webrtc/mediastreamhandler_unittest.cc
+++ b/talk/app/webrtc/mediastreamhandler_unittest.cc
@@ -35,7 +35,7 @@
#include "talk/app/webrtc/streamcollection.h"
#include "talk/app/webrtc/videosource.h"
#include "talk/app/webrtc/videotrack.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/gunit.h"
#include "talk/media/base/fakevideocapturer.h"
#include "talk/media/base/mediachannel.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -79,8 +79,8 @@
class FakeVideoSource : public Notifier<VideoSourceInterface> {
public:
- static talk_base::scoped_refptr<FakeVideoSource> Create() {
- return new talk_base::RefCountedObject<FakeVideoSource>();
+ static rtc::scoped_refptr<FakeVideoSource> Create() {
+ return new rtc::RefCountedObject<FakeVideoSource>();
}
virtual cricket::VideoCapturer* GetVideoCapturer() {
return &fake_capturer_;
@@ -109,7 +109,7 @@
virtual void SetUp() {
stream_ = MediaStream::Create(kStreamLabel1);
- talk_base::scoped_refptr<VideoSourceInterface> source(
+ rtc::scoped_refptr<VideoSourceInterface> source(
FakeVideoSource::Create());
video_track_ = VideoTrack::Create(kVideoTrackId, source);
EXPECT_TRUE(stream_->AddTrack(video_track_));
@@ -175,9 +175,9 @@
MockAudioProvider audio_provider_;
MockVideoProvider video_provider_;
MediaStreamHandlerContainer handlers_;
- talk_base::scoped_refptr<MediaStreamInterface> stream_;
- talk_base::scoped_refptr<VideoTrackInterface> video_track_;
- talk_base::scoped_refptr<AudioTrackInterface> audio_track_;
+ rtc::scoped_refptr<MediaStreamInterface> stream_;
+ rtc::scoped_refptr<VideoTrackInterface> video_track_;
+ rtc::scoped_refptr<AudioTrackInterface> audio_track_;
};
// Test that |audio_provider_| is notified when an audio track is associated
diff --git a/talk/app/webrtc/mediastreaminterface.h b/talk/app/webrtc/mediastreaminterface.h
index a3439c5..5d6c659 100644
--- a/talk/app/webrtc/mediastreaminterface.h
+++ b/talk/app/webrtc/mediastreaminterface.h
@@ -37,9 +37,9 @@
#include <string>
#include <vector>
-#include "talk/base/basictypes.h"
-#include "talk/base/refcount.h"
-#include "talk/base/scoped_ref_ptr.h"
+#include "webrtc/base/basictypes.h"
+#include "webrtc/base/refcount.h"
+#include "webrtc/base/scoped_ref_ptr.h"
namespace cricket {
@@ -73,7 +73,7 @@
// provide media. A source can be shared with multiple tracks.
// TODO(perkj): Implement sources for local and remote audio tracks and
// remote video tracks.
-class MediaSourceInterface : public talk_base::RefCountInterface,
+class MediaSourceInterface : public rtc::RefCountInterface,
public NotifierInterface {
public:
enum SourceState {
@@ -90,7 +90,7 @@
};
// Information about a track.
-class MediaStreamTrackInterface : public talk_base::RefCountInterface,
+class MediaStreamTrackInterface : public rtc::RefCountInterface,
public NotifierInterface {
public:
enum TrackState {
@@ -176,7 +176,7 @@
// Interface of the audio processor used by the audio track to collect
// statistics.
-class AudioProcessorInterface : public talk_base::RefCountInterface {
+class AudioProcessorInterface : public rtc::RefCountInterface {
public:
struct AudioProcessorStats {
AudioProcessorStats() : typing_noise_detected(false),
@@ -220,7 +220,7 @@
// Get the audio processor used by the audio track. Return NULL if the track
// does not have any processor.
// TODO(xians): Make the interface pure virtual.
- virtual talk_base::scoped_refptr<AudioProcessorInterface>
+ virtual rtc::scoped_refptr<AudioProcessorInterface>
GetAudioProcessor() { return NULL; }
// Get a pointer to the audio renderer of this AudioTrack.
@@ -233,21 +233,21 @@
virtual ~AudioTrackInterface() {}
};
-typedef std::vector<talk_base::scoped_refptr<AudioTrackInterface> >
+typedef std::vector<rtc::scoped_refptr<AudioTrackInterface> >
AudioTrackVector;
-typedef std::vector<talk_base::scoped_refptr<VideoTrackInterface> >
+typedef std::vector<rtc::scoped_refptr<VideoTrackInterface> >
VideoTrackVector;
-class MediaStreamInterface : public talk_base::RefCountInterface,
+class MediaStreamInterface : public rtc::RefCountInterface,
public NotifierInterface {
public:
virtual std::string label() const = 0;
virtual AudioTrackVector GetAudioTracks() = 0;
virtual VideoTrackVector GetVideoTracks() = 0;
- virtual talk_base::scoped_refptr<AudioTrackInterface>
+ virtual rtc::scoped_refptr<AudioTrackInterface>
FindAudioTrack(const std::string& track_id) = 0;
- virtual talk_base::scoped_refptr<VideoTrackInterface>
+ virtual rtc::scoped_refptr<VideoTrackInterface>
FindVideoTrack(const std::string& track_id) = 0;
virtual bool AddTrack(AudioTrackInterface* track) = 0;
diff --git a/talk/app/webrtc/mediastreamproxy.h b/talk/app/webrtc/mediastreamproxy.h
index 7d018d5..484690e 100644
--- a/talk/app/webrtc/mediastreamproxy.h
+++ b/talk/app/webrtc/mediastreamproxy.h
@@ -37,9 +37,9 @@
PROXY_CONSTMETHOD0(std::string, label)
PROXY_METHOD0(AudioTrackVector, GetAudioTracks)
PROXY_METHOD0(VideoTrackVector, GetVideoTracks)
- PROXY_METHOD1(talk_base::scoped_refptr<AudioTrackInterface>,
+ PROXY_METHOD1(rtc::scoped_refptr<AudioTrackInterface>,
FindAudioTrack, const std::string&)
- PROXY_METHOD1(talk_base::scoped_refptr<VideoTrackInterface>,
+ PROXY_METHOD1(rtc::scoped_refptr<VideoTrackInterface>,
FindVideoTrack, const std::string&)
PROXY_METHOD1(bool, AddTrack, AudioTrackInterface*)
PROXY_METHOD1(bool, AddTrack, VideoTrackInterface*)
diff --git a/talk/app/webrtc/mediastreamsignaling.cc b/talk/app/webrtc/mediastreamsignaling.cc
index ad3c01a..2d30cc2 100644
--- a/talk/app/webrtc/mediastreamsignaling.cc
+++ b/talk/app/webrtc/mediastreamsignaling.cc
@@ -38,8 +38,8 @@
#include "talk/app/webrtc/sctputils.h"
#include "talk/app/webrtc/videosource.h"
#include "talk/app/webrtc/videotrack.h"
-#include "talk/base/bytebuffer.h"
-#include "talk/base/stringutils.h"
+#include "webrtc/base/bytebuffer.h"
+#include "webrtc/base/stringutils.h"
#include "talk/media/sctp/sctpdataengine.h"
static const char kDefaultStreamLabel[] = "default";
@@ -48,8 +48,8 @@
namespace webrtc {
-using talk_base::scoped_ptr;
-using talk_base::scoped_refptr;
+using rtc::scoped_ptr;
+using rtc::scoped_refptr;
static bool ParseConstraints(
const MediaConstraintsInterface* constraints,
@@ -130,13 +130,13 @@
// Factory class for creating remote MediaStreams and MediaStreamTracks.
class RemoteMediaStreamFactory {
public:
- explicit RemoteMediaStreamFactory(talk_base::Thread* signaling_thread,
+ explicit RemoteMediaStreamFactory(rtc::Thread* signaling_thread,
cricket::ChannelManager* channel_manager)
: signaling_thread_(signaling_thread),
channel_manager_(channel_manager) {
}
- talk_base::scoped_refptr<MediaStreamInterface> CreateMediaStream(
+ rtc::scoped_refptr<MediaStreamInterface> CreateMediaStream(
const std::string& stream_label) {
return MediaStreamProxy::Create(
signaling_thread_, MediaStream::Create(stream_label));
@@ -160,7 +160,7 @@
template <typename TI, typename T, typename TP, typename S>
TI* AddTrack(MediaStreamInterface* stream, const std::string& track_id,
S* source) {
- talk_base::scoped_refptr<TI> track(
+ rtc::scoped_refptr<TI> track(
TP::Create(signaling_thread_, T::Create(track_id, source)));
track->set_state(webrtc::MediaStreamTrackInterface::kLive);
if (stream->AddTrack(track)) {
@@ -169,12 +169,12 @@
return NULL;
}
- talk_base::Thread* signaling_thread_;
+ rtc::Thread* signaling_thread_;
cricket::ChannelManager* channel_manager_;
};
MediaStreamSignaling::MediaStreamSignaling(
- talk_base::Thread* signaling_thread,
+ rtc::Thread* signaling_thread,
MediaStreamSignalingObserver* stream_observer,
cricket::ChannelManager* channel_manager)
: signaling_thread_(signaling_thread),
@@ -210,8 +210,8 @@
// SSL_CLIENT, the allocated id starts from 0 and takes even numbers; otherwise,
// the id starts from 1 and takes odd numbers. Returns false if no id can be
// allocated.
-bool MediaStreamSignaling::AllocateSctpSid(talk_base::SSLRole role, int* sid) {
- int& last_id = (role == talk_base::SSL_CLIENT) ?
+bool MediaStreamSignaling::AllocateSctpSid(rtc::SSLRole role, int* sid) {
+ int& last_id = (role == rtc::SSL_CLIENT) ?
last_allocated_sctp_even_sid_ : last_allocated_sctp_odd_sid_;
do {
@@ -250,7 +250,7 @@
bool MediaStreamSignaling::AddDataChannelFromOpenMessage(
const cricket::ReceiveDataParams& params,
- const talk_base::Buffer& payload) {
+ const rtc::Buffer& payload) {
if (!data_channel_factory_) {
LOG(LS_WARNING) << "Remote peer requested a DataChannel but DataChannels "
<< "are not supported.";
@@ -285,9 +285,9 @@
if ((*iter)->id() == sid) {
sctp_data_channels_.erase(iter);
- if (talk_base::IsEven(sid) && sid <= last_allocated_sctp_even_sid_) {
+ if (rtc::IsEven(sid) && sid <= last_allocated_sctp_even_sid_) {
last_allocated_sctp_even_sid_ = sid - 2;
- } else if (talk_base::IsOdd(sid) && sid <= last_allocated_sctp_odd_sid_) {
+ } else if (rtc::IsOdd(sid) && sid <= last_allocated_sctp_odd_sid_) {
last_allocated_sctp_odd_sid_ = sid - 2;
}
return;
@@ -398,7 +398,7 @@
void MediaStreamSignaling::OnRemoteDescriptionChanged(
const SessionDescriptionInterface* desc) {
const cricket::SessionDescription* remote_desc = desc->description();
- talk_base::scoped_refptr<StreamCollection> new_streams(
+ rtc::scoped_refptr<StreamCollection> new_streams(
StreamCollection::Create());
// Find all audio rtp streams and create corresponding remote AudioTracks
@@ -433,7 +433,7 @@
const cricket::DataContentDescription* data_desc =
static_cast<const cricket::DataContentDescription*>(
data_content->description);
- if (talk_base::starts_with(
+ if (rtc::starts_with(
data_desc->protocol().data(), cricket::kMediaProtocolRtpPrefix)) {
UpdateRemoteRtpDataChannels(data_desc->streams());
}
@@ -488,7 +488,7 @@
const cricket::DataContentDescription* data_desc =
static_cast<const cricket::DataContentDescription*>(
data_content->description);
- if (talk_base::starts_with(
+ if (rtc::starts_with(
data_desc->protocol().data(), cricket::kMediaProtocolRtpPrefix)) {
UpdateLocalRtpDataChannels(data_desc->streams());
}
@@ -599,7 +599,7 @@
const std::string& track_id = it->id;
uint32 ssrc = it->first_ssrc();
- talk_base::scoped_refptr<MediaStreamInterface> stream =
+ rtc::scoped_refptr<MediaStreamInterface> stream =
remote_streams_->find(stream_label);
if (!stream) {
// This is a new MediaStream. Create a new remote MediaStream.
@@ -643,7 +643,7 @@
MediaStreamInterface* stream = remote_streams_->find(stream_label);
if (media_type == cricket::MEDIA_TYPE_AUDIO) {
- talk_base::scoped_refptr<AudioTrackInterface> audio_track =
+ rtc::scoped_refptr<AudioTrackInterface> audio_track =
stream->FindAudioTrack(track_id);
if (audio_track) {
audio_track->set_state(webrtc::MediaStreamTrackInterface::kEnded);
@@ -651,7 +651,7 @@
stream_observer_->OnRemoveRemoteAudioTrack(stream, audio_track);
}
} else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
- talk_base::scoped_refptr<VideoTrackInterface> video_track =
+ rtc::scoped_refptr<VideoTrackInterface> video_track =
stream->FindVideoTrack(track_id);
if (video_track) {
video_track->set_state(webrtc::MediaStreamTrackInterface::kEnded);
@@ -898,7 +898,7 @@
// The data channel label is either the mslabel or the SSRC if the mslabel
// does not exist. Ex a=ssrc:444330170 mslabel:test1.
std::string label = it->sync_label.empty() ?
- talk_base::ToString(it->first_ssrc()) : it->sync_label;
+ rtc::ToString(it->first_ssrc()) : it->sync_label;
RtpDataChannels::iterator data_channel_it =
rtp_data_channels_.find(label);
if (data_channel_it == rtp_data_channels_.end()) {
@@ -963,7 +963,7 @@
}
}
-void MediaStreamSignaling::OnDtlsRoleReadyForSctp(talk_base::SSLRole role) {
+void MediaStreamSignaling::OnDtlsRoleReadyForSctp(rtc::SSLRole role) {
SctpDataChannels::iterator it = sctp_data_channels_.begin();
for (; it != sctp_data_channels_.end(); ++it) {
if ((*it)->id() < 0) {
diff --git a/talk/app/webrtc/mediastreamsignaling.h b/talk/app/webrtc/mediastreamsignaling.h
index 7378166..ac8a02a 100644
--- a/talk/app/webrtc/mediastreamsignaling.h
+++ b/talk/app/webrtc/mediastreamsignaling.h
@@ -36,13 +36,13 @@
#include "talk/app/webrtc/mediastream.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "talk/app/webrtc/streamcollection.h"
-#include "talk/base/scoped_ref_ptr.h"
-#include "talk/base/sigslot.h"
+#include "webrtc/base/scoped_ref_ptr.h"
+#include "webrtc/base/sigslot.h"
#include "talk/session/media/mediasession.h"
-namespace talk_base {
+namespace rtc {
class Thread;
-} // namespace talk_base
+} // namespace rtc
namespace webrtc {
@@ -160,7 +160,7 @@
class MediaStreamSignaling : public sigslot::has_slots<> {
public:
- MediaStreamSignaling(talk_base::Thread* signaling_thread,
+ MediaStreamSignaling(rtc::Thread* signaling_thread,
MediaStreamSignalingObserver* stream_observer,
cricket::ChannelManager* channel_manager);
virtual ~MediaStreamSignaling();
@@ -180,7 +180,7 @@
// Gets the first available SCTP id that is not assigned to any existing
// data channels.
- bool AllocateSctpSid(talk_base::SSLRole role, int* sid);
+ bool AllocateSctpSid(rtc::SSLRole role, int* sid);
// Adds |local_stream| to the collection of known MediaStreams that will be
// offered in a SessionDescription.
@@ -197,7 +197,7 @@
bool AddDataChannel(DataChannel* data_channel);
// After we receive an OPEN message, create a data channel and add it.
bool AddDataChannelFromOpenMessage(const cricket::ReceiveDataParams& params,
- const talk_base::Buffer& payload);
+ const rtc::Buffer& payload);
void RemoveSctpDataChannel(int sid);
// Returns a MediaSessionOptions struct with options decided by |constraints|,
@@ -249,7 +249,7 @@
return remote_streams_.get();
}
void OnDataTransportCreatedForSctp();
- void OnDtlsRoleReadyForSctp(talk_base::SSLRole role);
+ void OnDtlsRoleReadyForSctp(rtc::SSLRole role);
void OnRemoteSctpDataChannelClosed(uint32 sid);
private:
@@ -376,13 +376,13 @@
int FindDataChannelBySid(int sid) const;
RemotePeerInfo remote_info_;
- talk_base::Thread* signaling_thread_;
+ rtc::Thread* signaling_thread_;
DataChannelFactory* data_channel_factory_;
cricket::MediaSessionOptions options_;
MediaStreamSignalingObserver* stream_observer_;
- talk_base::scoped_refptr<StreamCollection> local_streams_;
- talk_base::scoped_refptr<StreamCollection> remote_streams_;
- talk_base::scoped_ptr<RemoteMediaStreamFactory> remote_stream_factory_;
+ rtc::scoped_refptr<StreamCollection> local_streams_;
+ rtc::scoped_refptr<StreamCollection> remote_streams_;
+ rtc::scoped_ptr<RemoteMediaStreamFactory> remote_stream_factory_;
TrackInfos remote_audio_tracks_;
TrackInfos remote_video_tracks_;
@@ -392,9 +392,9 @@
int last_allocated_sctp_even_sid_;
int last_allocated_sctp_odd_sid_;
- typedef std::map<std::string, talk_base::scoped_refptr<DataChannel> >
+ typedef std::map<std::string, rtc::scoped_refptr<DataChannel> >
RtpDataChannels;
- typedef std::vector<talk_base::scoped_refptr<DataChannel> > SctpDataChannels;
+ typedef std::vector<rtc::scoped_refptr<DataChannel> > SctpDataChannels;
RtpDataChannels rtp_data_channels_;
SctpDataChannels sctp_data_channels_;
diff --git a/talk/app/webrtc/mediastreamsignaling_unittest.cc b/talk/app/webrtc/mediastreamsignaling_unittest.cc
index 47034f6..259f4c0 100644
--- a/talk/app/webrtc/mediastreamsignaling_unittest.cc
+++ b/talk/app/webrtc/mediastreamsignaling_unittest.cc
@@ -36,10 +36,10 @@
#include "talk/app/webrtc/test/fakeconstraints.h"
#include "talk/app/webrtc/test/fakedatachannelprovider.h"
#include "talk/app/webrtc/videotrack.h"
-#include "talk/base/gunit.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/stringutils.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/stringutils.h"
+#include "webrtc/base/thread.h"
#include "talk/media/base/fakemediaengine.h"
#include "talk/media/devices/fakedevicemanager.h"
#include "talk/p2p/base/constants.h"
@@ -261,7 +261,7 @@
cricket::DataChannelType dct)
: provider_(provider), type_(dct) {}
- virtual talk_base::scoped_refptr<webrtc::DataChannel> CreateDataChannel(
+ virtual rtc::scoped_refptr<webrtc::DataChannel> CreateDataChannel(
const std::string& label,
const webrtc::InternalDataChannelInit* config) {
last_init_ = *config;
@@ -449,14 +449,14 @@
TrackInfos local_audio_tracks_;
TrackInfos local_video_tracks_;
- talk_base::scoped_refptr<StreamCollection> remote_media_streams_;
+ rtc::scoped_refptr<StreamCollection> remote_media_streams_;
};
class MediaStreamSignalingForTest : public webrtc::MediaStreamSignaling {
public:
MediaStreamSignalingForTest(MockSignalingObserver* observer,
cricket::ChannelManager* channel_manager)
- : webrtc::MediaStreamSignaling(talk_base::Thread::Current(), observer,
+ : webrtc::MediaStreamSignaling(rtc::Thread::Current(), observer,
channel_manager) {
};
@@ -473,7 +473,7 @@
channel_manager_.reset(
new cricket::ChannelManager(new cricket::FakeMediaEngine(),
new cricket::FakeDeviceManager(),
- talk_base::Thread::Current()));
+ rtc::Thread::Current()));
signaling_.reset(new MediaStreamSignalingForTest(observer_.get(),
channel_manager_.get()));
data_channel_provider_.reset(new FakeDataChannelProvider());
@@ -483,22 +483,22 @@
// CreateStreamCollection(1) creates a collection that
// correspond to kSdpString1.
// CreateStreamCollection(2) correspond to kSdpString2.
- talk_base::scoped_refptr<StreamCollection>
+ rtc::scoped_refptr<StreamCollection>
CreateStreamCollection(int number_of_streams) {
- talk_base::scoped_refptr<StreamCollection> local_collection(
+ rtc::scoped_refptr<StreamCollection> local_collection(
StreamCollection::Create());
for (int i = 0; i < number_of_streams; ++i) {
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream(
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> stream(
webrtc::MediaStream::Create(kStreams[i]));
// Add a local audio track.
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
webrtc::AudioTrack::Create(kAudioTracks[i], NULL));
stream->AddTrack(audio_track);
// Add a local video track.
- talk_base::scoped_refptr<webrtc::VideoTrackInterface> video_track(
+ rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
webrtc::VideoTrack::Create(kVideoTracks[i], NULL));
stream->AddTrack(video_track);
@@ -525,7 +525,7 @@
std::string mediastream_label = kStreams[0];
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream(
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> stream(
webrtc::MediaStream::Create(mediastream_label));
reference_collection_->AddStream(stream);
@@ -555,23 +555,23 @@
void AddAudioTrack(const std::string& track_id,
MediaStreamInterface* stream) {
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
webrtc::AudioTrack::Create(track_id, NULL));
ASSERT_TRUE(stream->AddTrack(audio_track));
}
void AddVideoTrack(const std::string& track_id,
MediaStreamInterface* stream) {
- talk_base::scoped_refptr<webrtc::VideoTrackInterface> video_track(
+ rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
webrtc::VideoTrack::Create(track_id, NULL));
ASSERT_TRUE(stream->AddTrack(video_track));
}
- talk_base::scoped_refptr<webrtc::DataChannel> AddDataChannel(
+ rtc::scoped_refptr<webrtc::DataChannel> AddDataChannel(
cricket::DataChannelType type, const std::string& label, int id) {
webrtc::InternalDataChannelInit config;
config.id = id;
- talk_base::scoped_refptr<webrtc::DataChannel> data_channel(
+ rtc::scoped_refptr<webrtc::DataChannel> data_channel(
webrtc::DataChannel::Create(
data_channel_provider_.get(), type, label, config));
EXPECT_TRUE(data_channel.get() != NULL);
@@ -581,11 +581,11 @@
// ChannelManager is used by VideoSource, so it should be released after all
// the video tracks. Put it as the first private variable should ensure that.
- talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
- talk_base::scoped_refptr<StreamCollection> reference_collection_;
- talk_base::scoped_ptr<MockSignalingObserver> observer_;
- talk_base::scoped_ptr<MediaStreamSignalingForTest> signaling_;
- talk_base::scoped_ptr<FakeDataChannelProvider> data_channel_provider_;
+ rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
+ rtc::scoped_refptr<StreamCollection> reference_collection_;
+ rtc::scoped_ptr<MockSignalingObserver> observer_;
+ rtc::scoped_ptr<MediaStreamSignalingForTest> signaling_;
+ rtc::scoped_ptr<FakeDataChannelProvider> data_channel_provider_;
};
// Test that a MediaSessionOptions is created for an offer if
@@ -686,7 +686,7 @@
// a MediaStream is sent and later updated with a new track.
// MediaConstraints are not used.
TEST_F(MediaStreamSignalingTest, AddTrackToLocalMediaStream) {
- talk_base::scoped_refptr<StreamCollection> local_streams(
+ rtc::scoped_refptr<StreamCollection> local_streams(
CreateStreamCollection(1));
MediaStreamInterface* local_stream = local_streams->at(0);
EXPECT_TRUE(signaling_->AddLocalStream(local_stream));
@@ -758,13 +758,13 @@
// SDP string is created. In this test the two separate MediaStreams are
// signaled.
TEST_F(MediaStreamSignalingTest, UpdateRemoteStreams) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithStream1, NULL));
EXPECT_TRUE(desc != NULL);
signaling_->OnRemoteDescriptionChanged(desc.get());
- talk_base::scoped_refptr<StreamCollection> reference(
+ rtc::scoped_refptr<StreamCollection> reference(
CreateStreamCollection(1));
EXPECT_TRUE(CompareStreamCollections(signaling_->remote_streams(),
reference.get()));
@@ -780,13 +780,13 @@
// Create a session description based on another SDP with another
// MediaStream.
- talk_base::scoped_ptr<SessionDescriptionInterface> update_desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> update_desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWith2Stream, NULL));
EXPECT_TRUE(update_desc != NULL);
signaling_->OnRemoteDescriptionChanged(update_desc.get());
- talk_base::scoped_refptr<StreamCollection> reference2(
+ rtc::scoped_refptr<StreamCollection> reference2(
CreateStreamCollection(2));
EXPECT_TRUE(CompareStreamCollections(signaling_->remote_streams(),
reference2.get()));
@@ -805,14 +805,14 @@
// SDP string is created. In this test the same remote MediaStream is signaled
// but MediaStream tracks are added and removed.
TEST_F(MediaStreamSignalingTest, AddRemoveTrackFromExistingRemoteMediaStream) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_ms1;
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_ms1;
CreateSessionDescriptionAndReference(1, 1, desc_ms1.use());
signaling_->OnRemoteDescriptionChanged(desc_ms1.get());
EXPECT_TRUE(CompareStreamCollections(signaling_->remote_streams(),
reference_collection_));
// Add extra audio and video tracks to the same MediaStream.
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_ms1_two_tracks;
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_ms1_two_tracks;
CreateSessionDescriptionAndReference(2, 2, desc_ms1_two_tracks.use());
signaling_->OnRemoteDescriptionChanged(desc_ms1_two_tracks.get());
EXPECT_TRUE(CompareStreamCollections(signaling_->remote_streams(),
@@ -821,7 +821,7 @@
reference_collection_));
// Remove the extra audio and video tracks again.
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_ms2;
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_ms2;
CreateSessionDescriptionAndReference(1, 1, desc_ms2.use());
signaling_->OnRemoteDescriptionChanged(desc_ms2.get());
EXPECT_TRUE(CompareStreamCollections(signaling_->remote_streams(),
@@ -833,7 +833,7 @@
// This test that remote tracks are ended if a
// local session description is set that rejects the media content type.
TEST_F(MediaStreamSignalingTest, RejectMediaContent) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithStream1, NULL));
EXPECT_TRUE(desc != NULL);
@@ -844,10 +844,10 @@
ASSERT_EQ(1u, remote_stream->GetVideoTracks().size());
ASSERT_EQ(1u, remote_stream->GetAudioTracks().size());
- talk_base::scoped_refptr<webrtc::VideoTrackInterface> remote_video =
+ rtc::scoped_refptr<webrtc::VideoTrackInterface> remote_video =
remote_stream->GetVideoTracks()[0];
EXPECT_EQ(webrtc::MediaStreamTrackInterface::kLive, remote_video->state());
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> remote_audio =
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> remote_audio =
remote_stream->GetAudioTracks()[0];
EXPECT_EQ(webrtc::MediaStreamTrackInterface::kLive, remote_audio->state());
@@ -871,7 +871,7 @@
// of MediaStreamSignaling and then MediaStreamSignaling tries to reject
// this track.
TEST_F(MediaStreamSignalingTest, RemoveTrackThenRejectMediaContent) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithStream1, NULL));
EXPECT_TRUE(desc != NULL);
@@ -899,7 +899,7 @@
// It also tests that the default stream is updated if a video m-line is added
// in a subsequent session description.
TEST_F(MediaStreamSignalingTest, SdpWithoutMsidCreatesDefaultStream) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_audio_only(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_audio_only(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithoutStreamsAudioOnly,
NULL));
@@ -914,7 +914,7 @@
EXPECT_EQ(0u, remote_stream->GetVideoTracks().size());
EXPECT_EQ("default", remote_stream->label());
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithoutStreams, NULL));
ASSERT_TRUE(desc != NULL);
@@ -931,7 +931,7 @@
// This tests that a default MediaStream is created if a remote session
// description doesn't contain any streams and media direction is send only.
TEST_F(MediaStreamSignalingTest, RecvOnlySdpWithoutMsidCreatesDefaultStream) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringSendOnlyWithWithoutStreams,
NULL));
@@ -950,7 +950,7 @@
// This tests that it won't crash when MediaStreamSignaling tries to remove
// a remote track that as already been removed from the mediastream.
TEST_F(MediaStreamSignalingTest, RemoveAlreadyGoneRemoteStream) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_audio_only(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_audio_only(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithoutStreams,
NULL));
@@ -960,7 +960,7 @@
remote_stream->RemoveTrack(remote_stream->GetAudioTracks()[0]);
remote_stream->RemoveTrack(remote_stream->GetVideoTracks()[0]);
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithoutStreams, NULL));
ASSERT_TRUE(desc != NULL);
@@ -974,7 +974,7 @@
// MSID is supported.
TEST_F(MediaStreamSignalingTest,
SdpWithoutMsidAndStreamsCreatesDefaultStream) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithoutStreams,
NULL));
@@ -990,7 +990,7 @@
// This tests that a default MediaStream is not created if the remote session
// description doesn't contain any streams but does support MSID.
TEST_F(MediaStreamSignalingTest, SdpWitMsidDontCreatesDefaultStream) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_msid_without_streams(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_msid_without_streams(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithMsidWithoutStreams,
NULL));
@@ -1001,18 +1001,18 @@
// This test that a default MediaStream is not created if a remote session
// description is updated to not have any MediaStreams.
TEST_F(MediaStreamSignalingTest, VerifyDefaultStreamIsNotCreated) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithStream1,
NULL));
ASSERT_TRUE(desc != NULL);
signaling_->OnRemoteDescriptionChanged(desc.get());
- talk_base::scoped_refptr<StreamCollection> reference(
+ rtc::scoped_refptr<StreamCollection> reference(
CreateStreamCollection(1));
EXPECT_TRUE(CompareStreamCollections(observer_->remote_streams(),
reference.get()));
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_without_streams(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_without_streams(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
kSdpStringWithoutStreams,
NULL));
@@ -1024,7 +1024,7 @@
// when MediaStreamSignaling::OnLocalDescriptionChanged is called with an
// updated local session description.
TEST_F(MediaStreamSignalingTest, LocalDescriptionChanged) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_1;
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_1;
CreateSessionDescriptionAndReference(2, 2, desc_1.use());
signaling_->AddLocalStream(reference_collection_->at(0));
@@ -1037,7 +1037,7 @@
observer_->VerifyLocalVideoTrack(kStreams[0], kVideoTracks[1], 4);
// Remove an audio and video track.
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_2;
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_2;
CreateSessionDescriptionAndReference(1, 1, desc_2.use());
signaling_->OnLocalDescriptionChanged(desc_2.get());
EXPECT_EQ(1u, observer_->NumberOfLocalAudioTracks());
@@ -1050,7 +1050,7 @@
// when MediaStreamSignaling::AddLocalStream is called after
// MediaStreamSignaling::OnLocalDescriptionChanged is called.
TEST_F(MediaStreamSignalingTest, AddLocalStreamAfterLocalDescriptionChanged) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_1;
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_1;
CreateSessionDescriptionAndReference(2, 2, desc_1.use());
signaling_->OnLocalDescriptionChanged(desc_1.get());
@@ -1070,7 +1070,7 @@
// if the ssrc on a local track is changed when
// MediaStreamSignaling::OnLocalDescriptionChanged is called.
TEST_F(MediaStreamSignalingTest, ChangeSsrcOnTrackInLocalSessionDescription) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc;
+ rtc::scoped_ptr<SessionDescriptionInterface> desc;
CreateSessionDescriptionAndReference(1, 1, desc.use());
signaling_->AddLocalStream(reference_collection_->at(0));
@@ -1085,15 +1085,15 @@
desc->ToString(&sdp);
std::string ssrc_org = "a=ssrc:1";
std::string ssrc_to = "a=ssrc:97";
- talk_base::replace_substrs(ssrc_org.c_str(), ssrc_org.length(),
+ rtc::replace_substrs(ssrc_org.c_str(), ssrc_org.length(),
ssrc_to.c_str(), ssrc_to.length(),
&sdp);
ssrc_org = "a=ssrc:2";
ssrc_to = "a=ssrc:98";
- talk_base::replace_substrs(ssrc_org.c_str(), ssrc_org.length(),
+ rtc::replace_substrs(ssrc_org.c_str(), ssrc_org.length(),
ssrc_to.c_str(), ssrc_to.length(),
&sdp);
- talk_base::scoped_ptr<SessionDescriptionInterface> updated_desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> updated_desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
sdp, NULL));
@@ -1108,7 +1108,7 @@
// if a new session description is set with the same tracks but they are now
// sent on a another MediaStream.
TEST_F(MediaStreamSignalingTest, SignalSameTracksInSeparateMediaStream) {
- talk_base::scoped_ptr<SessionDescriptionInterface> desc;
+ rtc::scoped_ptr<SessionDescriptionInterface> desc;
CreateSessionDescriptionAndReference(1, 1, desc.use());
signaling_->AddLocalStream(reference_collection_->at(0));
@@ -1122,7 +1122,7 @@
// Add a new MediaStream but with the same tracks as in the first stream.
std::string stream_label_1 = kStreams[1];
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream_1(
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> stream_1(
webrtc::MediaStream::Create(kStreams[1]));
stream_1->AddTrack(reference_collection_->at(0)->GetVideoTracks()[0]);
stream_1->AddTrack(reference_collection_->at(0)->GetAudioTracks()[0]);
@@ -1131,10 +1131,10 @@
// Replace msid in the original SDP.
std::string sdp;
desc->ToString(&sdp);
- talk_base::replace_substrs(
+ rtc::replace_substrs(
kStreams[0], strlen(kStreams[0]), kStreams[1], strlen(kStreams[1]), &sdp);
- talk_base::scoped_ptr<SessionDescriptionInterface> updated_desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> updated_desc(
webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
sdp, NULL));
@@ -1149,13 +1149,13 @@
// SSL_SERVER.
TEST_F(MediaStreamSignalingTest, SctpIdAllocationBasedOnRole) {
int id;
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_SERVER, &id));
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_SERVER, &id));
EXPECT_EQ(1, id);
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_CLIENT, &id));
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_CLIENT, &id));
EXPECT_EQ(0, id);
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_SERVER, &id));
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_SERVER, &id));
EXPECT_EQ(3, id);
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_CLIENT, &id));
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_CLIENT, &id));
EXPECT_EQ(2, id);
}
@@ -1165,13 +1165,13 @@
AddDataChannel(cricket::DCT_SCTP, "a", old_id);
int new_id;
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_SERVER, &new_id));
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_SERVER, &new_id));
EXPECT_NE(old_id, new_id);
// Creates a DataChannel with id 0.
old_id = 0;
AddDataChannel(cricket::DCT_SCTP, "a", old_id);
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_CLIENT, &new_id));
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_CLIENT, &new_id));
EXPECT_NE(old_id, new_id);
}
@@ -1183,12 +1183,12 @@
AddDataChannel(cricket::DCT_SCTP, "a", even_id);
int allocated_id = -1;
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_SERVER,
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_SERVER,
&allocated_id));
EXPECT_EQ(odd_id + 2, allocated_id);
AddDataChannel(cricket::DCT_SCTP, "a", allocated_id);
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_CLIENT,
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_CLIENT,
&allocated_id));
EXPECT_EQ(even_id + 2, allocated_id);
AddDataChannel(cricket::DCT_SCTP, "a", allocated_id);
@@ -1197,20 +1197,20 @@
signaling_->RemoveSctpDataChannel(even_id);
// Verifies that removed DataChannel ids are reused.
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_SERVER,
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_SERVER,
&allocated_id));
EXPECT_EQ(odd_id, allocated_id);
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_CLIENT,
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_CLIENT,
&allocated_id));
EXPECT_EQ(even_id, allocated_id);
// Verifies that used higher DataChannel ids are not reused.
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_SERVER,
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_SERVER,
&allocated_id));
EXPECT_NE(odd_id + 2, allocated_id);
- ASSERT_TRUE(signaling_->AllocateSctpSid(talk_base::SSL_CLIENT,
+ ASSERT_TRUE(signaling_->AllocateSctpSid(rtc::SSL_CLIENT,
&allocated_id));
EXPECT_NE(even_id + 2, allocated_id);
@@ -1221,7 +1221,7 @@
AddDataChannel(cricket::DCT_RTP, "a", -1);
webrtc::InternalDataChannelInit config;
- talk_base::scoped_refptr<webrtc::DataChannel> data_channel =
+ rtc::scoped_refptr<webrtc::DataChannel> data_channel =
webrtc::DataChannel::Create(
data_channel_provider_.get(), cricket::DCT_RTP, "a", config);
ASSERT_TRUE(data_channel.get() != NULL);
@@ -1242,7 +1242,7 @@
signaling_->SetDataChannelFactory(&fake_factory);
webrtc::DataChannelInit config;
config.id = 1;
- talk_base::Buffer payload;
+ rtc::Buffer payload;
webrtc::WriteDataChannelOpenMessage("a", config, &payload);
cricket::ReceiveDataParams params;
params.ssrc = config.id;
@@ -1262,7 +1262,7 @@
signaling_->SetDataChannelFactory(&fake_factory);
webrtc::DataChannelInit config;
config.id = 0;
- talk_base::Buffer payload;
+ rtc::Buffer payload;
webrtc::WriteDataChannelOpenMessage("a", config, &payload);
cricket::ReceiveDataParams params;
params.ssrc = config.id;
@@ -1275,7 +1275,7 @@
webrtc::InternalDataChannelInit config;
config.id = 0;
- talk_base::scoped_refptr<webrtc::DataChannel> data_channel =
+ rtc::scoped_refptr<webrtc::DataChannel> data_channel =
webrtc::DataChannel::Create(
data_channel_provider_.get(), cricket::DCT_SCTP, "a", config);
ASSERT_TRUE(data_channel.get() != NULL);
diff --git a/talk/app/webrtc/mediastreamtrackproxy.h b/talk/app/webrtc/mediastreamtrackproxy.h
index 19750b0..56ad1e3 100644
--- a/talk/app/webrtc/mediastreamtrackproxy.h
+++ b/talk/app/webrtc/mediastreamtrackproxy.h
@@ -45,7 +45,7 @@
PROXY_METHOD1(void, AddSink, AudioTrackSinkInterface*)
PROXY_METHOD1(void, RemoveSink, AudioTrackSinkInterface*)
PROXY_METHOD1(bool, GetSignalLevel, int*)
- PROXY_METHOD0(talk_base::scoped_refptr<AudioProcessorInterface>,
+ PROXY_METHOD0(rtc::scoped_refptr<AudioProcessorInterface>,
GetAudioProcessor)
PROXY_METHOD0(cricket::AudioRenderer*, GetRenderer)
diff --git a/talk/app/webrtc/notifier.h b/talk/app/webrtc/notifier.h
index eaa0063..0237ecf 100644
--- a/talk/app/webrtc/notifier.h
+++ b/talk/app/webrtc/notifier.h
@@ -30,7 +30,7 @@
#include <list>
-#include "talk/base/common.h"
+#include "webrtc/base/common.h"
#include "talk/app/webrtc/mediastreaminterface.h"
namespace webrtc {
diff --git a/talk/app/webrtc/objc/RTCAudioTrack+Internal.h b/talk/app/webrtc/objc/RTCAudioTrack+Internal.h
index 17d2723..60e40bf 100644
--- a/talk/app/webrtc/objc/RTCAudioTrack+Internal.h
+++ b/talk/app/webrtc/objc/RTCAudioTrack+Internal.h
@@ -32,6 +32,6 @@
@interface RTCAudioTrack (Internal)
@property(nonatomic, assign, readonly)
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> audioTrack;
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> audioTrack;
@end
diff --git a/talk/app/webrtc/objc/RTCAudioTrack.mm b/talk/app/webrtc/objc/RTCAudioTrack.mm
index 2364c29..bdc89b5 100644
--- a/talk/app/webrtc/objc/RTCAudioTrack.mm
+++ b/talk/app/webrtc/objc/RTCAudioTrack.mm
@@ -38,7 +38,7 @@
@implementation RTCAudioTrack (Internal)
-- (talk_base::scoped_refptr<webrtc::AudioTrackInterface>)audioTrack {
+- (rtc::scoped_refptr<webrtc::AudioTrackInterface>)audioTrack {
return static_cast<webrtc::AudioTrackInterface*>(self.mediaTrack.get());
}
diff --git a/talk/app/webrtc/objc/RTCDataChannel+Internal.h b/talk/app/webrtc/objc/RTCDataChannel+Internal.h
index a550891..0a8079b 100644
--- a/talk/app/webrtc/objc/RTCDataChannel+Internal.h
+++ b/talk/app/webrtc/objc/RTCDataChannel+Internal.h
@@ -28,7 +28,7 @@
#import "RTCDataChannel.h"
#include "talk/app/webrtc/datachannelinterface.h"
-#include "talk/base/scoped_ref_ptr.h"
+#include "webrtc/base/scoped_ref_ptr.h"
@interface RTCDataBuffer (Internal)
@@ -47,9 +47,9 @@
@interface RTCDataChannel (Internal)
@property(nonatomic, readonly)
- talk_base::scoped_refptr<webrtc::DataChannelInterface> dataChannel;
+ rtc::scoped_refptr<webrtc::DataChannelInterface> dataChannel;
- (instancetype)initWithDataChannel:
- (talk_base::scoped_refptr<webrtc::DataChannelInterface>)dataChannel;
+ (rtc::scoped_refptr<webrtc::DataChannelInterface>)dataChannel;
@end
diff --git a/talk/app/webrtc/objc/RTCDataChannel.mm b/talk/app/webrtc/objc/RTCDataChannel.mm
index 0837940..2cf8bf8 100644
--- a/talk/app/webrtc/objc/RTCDataChannel.mm
+++ b/talk/app/webrtc/objc/RTCDataChannel.mm
@@ -135,13 +135,13 @@
@end
@implementation RTCDataBuffer {
- talk_base::scoped_ptr<webrtc::DataBuffer> _dataBuffer;
+ rtc::scoped_ptr<webrtc::DataBuffer> _dataBuffer;
}
- (instancetype)initWithData:(NSData*)data isBinary:(BOOL)isBinary {
NSAssert(data, @"data cannot be nil");
if (self = [super init]) {
- talk_base::Buffer buffer([data bytes], [data length]);
+ rtc::Buffer buffer([data bytes], [data length]);
_dataBuffer.reset(new webrtc::DataBuffer(buffer, isBinary));
}
return self;
@@ -174,8 +174,8 @@
@end
@implementation RTCDataChannel {
- talk_base::scoped_refptr<webrtc::DataChannelInterface> _dataChannel;
- talk_base::scoped_ptr<webrtc::RTCDataChannelObserver> _observer;
+ rtc::scoped_refptr<webrtc::DataChannelInterface> _dataChannel;
+ rtc::scoped_ptr<webrtc::RTCDataChannelObserver> _observer;
BOOL _isObserverRegistered;
}
@@ -256,7 +256,7 @@
@implementation RTCDataChannel (Internal)
- (instancetype)initWithDataChannel:
- (talk_base::scoped_refptr<webrtc::DataChannelInterface>)
+ (rtc::scoped_refptr<webrtc::DataChannelInterface>)
dataChannel {
NSAssert(dataChannel != NULL, @"dataChannel cannot be NULL");
if (self = [super init]) {
@@ -266,7 +266,7 @@
return self;
}
-- (talk_base::scoped_refptr<webrtc::DataChannelInterface>)dataChannel {
+- (rtc::scoped_refptr<webrtc::DataChannelInterface>)dataChannel {
return _dataChannel;
}
diff --git a/talk/app/webrtc/objc/RTCI420Frame.mm b/talk/app/webrtc/objc/RTCI420Frame.mm
index eff3102..61903bc 100644
--- a/talk/app/webrtc/objc/RTCI420Frame.mm
+++ b/talk/app/webrtc/objc/RTCI420Frame.mm
@@ -27,11 +27,11 @@
#import "RTCI420Frame.h"
-#include "talk/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
#include "talk/media/base/videoframe.h"
@implementation RTCI420Frame {
- talk_base::scoped_ptr<cricket::VideoFrame> _videoFrame;
+ rtc::scoped_ptr<cricket::VideoFrame> _videoFrame;
}
- (NSUInteger)width {
diff --git a/talk/app/webrtc/objc/RTCMediaConstraints.mm b/talk/app/webrtc/objc/RTCMediaConstraints.mm
index a1cc5a5..e44dd59 100644
--- a/talk/app/webrtc/objc/RTCMediaConstraints.mm
+++ b/talk/app/webrtc/objc/RTCMediaConstraints.mm
@@ -33,13 +33,13 @@
#import "RTCPair.h"
-#include "talk/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
// TODO(hughv): Add accessors for mandatory and optional constraints.
// TODO(hughv): Add description.
@implementation RTCMediaConstraints {
- talk_base::scoped_ptr<webrtc::RTCMediaConstraintsNative> _constraints;
+ rtc::scoped_ptr<webrtc::RTCMediaConstraintsNative> _constraints;
webrtc::MediaConstraintsInterface::Constraints _mandatory;
webrtc::MediaConstraintsInterface::Constraints _optional;
}
diff --git a/talk/app/webrtc/objc/RTCMediaSource+Internal.h b/talk/app/webrtc/objc/RTCMediaSource+Internal.h
index 98f8e9c..96341f2 100644
--- a/talk/app/webrtc/objc/RTCMediaSource+Internal.h
+++ b/talk/app/webrtc/objc/RTCMediaSource+Internal.h
@@ -32,9 +32,9 @@
@interface RTCMediaSource (Internal)
@property(nonatomic, assign, readonly)
- talk_base::scoped_refptr<webrtc::MediaSourceInterface> mediaSource;
+ rtc::scoped_refptr<webrtc::MediaSourceInterface> mediaSource;
- (id)initWithMediaSource:
- (talk_base::scoped_refptr<webrtc::MediaSourceInterface>)mediaSource;
+ (rtc::scoped_refptr<webrtc::MediaSourceInterface>)mediaSource;
@end
diff --git a/talk/app/webrtc/objc/RTCMediaSource.mm b/talk/app/webrtc/objc/RTCMediaSource.mm
index 28af3ad..b94bf05 100644
--- a/talk/app/webrtc/objc/RTCMediaSource.mm
+++ b/talk/app/webrtc/objc/RTCMediaSource.mm
@@ -34,7 +34,7 @@
#import "RTCEnumConverter.h"
@implementation RTCMediaSource {
- talk_base::scoped_refptr<webrtc::MediaSourceInterface> _mediaSource;
+ rtc::scoped_refptr<webrtc::MediaSourceInterface> _mediaSource;
}
- (RTCSourceState)state {
@@ -46,7 +46,7 @@
@implementation RTCMediaSource (Internal)
- (id)initWithMediaSource:
- (talk_base::scoped_refptr<webrtc::MediaSourceInterface>)mediaSource {
+ (rtc::scoped_refptr<webrtc::MediaSourceInterface>)mediaSource {
if (!mediaSource) {
NSAssert(NO, @"nil arguments not allowed");
self = nil;
@@ -58,7 +58,7 @@
return self;
}
-- (talk_base::scoped_refptr<webrtc::MediaSourceInterface>)mediaSource {
+- (rtc::scoped_refptr<webrtc::MediaSourceInterface>)mediaSource {
return _mediaSource;
}
diff --git a/talk/app/webrtc/objc/RTCMediaStream+Internal.h b/talk/app/webrtc/objc/RTCMediaStream+Internal.h
index 2123c2d..bde7631 100644
--- a/talk/app/webrtc/objc/RTCMediaStream+Internal.h
+++ b/talk/app/webrtc/objc/RTCMediaStream+Internal.h
@@ -32,9 +32,9 @@
@interface RTCMediaStream (Internal)
@property(nonatomic, assign, readonly)
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> mediaStream;
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> mediaStream;
- (id)initWithMediaStream:
- (talk_base::scoped_refptr<webrtc::MediaStreamInterface>)mediaStream;
+ (rtc::scoped_refptr<webrtc::MediaStreamInterface>)mediaStream;
@end
diff --git a/talk/app/webrtc/objc/RTCMediaStream.mm b/talk/app/webrtc/objc/RTCMediaStream.mm
index 94e14fc..27d20b8 100644
--- a/talk/app/webrtc/objc/RTCMediaStream.mm
+++ b/talk/app/webrtc/objc/RTCMediaStream.mm
@@ -40,7 +40,7 @@
@implementation RTCMediaStream {
NSMutableArray* _audioTracks;
NSMutableArray* _videoTracks;
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> _mediaStream;
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> _mediaStream;
}
- (NSString*)description {
@@ -105,7 +105,7 @@
@implementation RTCMediaStream (Internal)
- (id)initWithMediaStream:
- (talk_base::scoped_refptr<webrtc::MediaStreamInterface>)mediaStream {
+ (rtc::scoped_refptr<webrtc::MediaStreamInterface>)mediaStream {
if (!mediaStream) {
NSAssert(NO, @"nil arguments not allowed");
self = nil;
@@ -120,7 +120,7 @@
_mediaStream = mediaStream;
for (size_t i = 0; i < audio_tracks.size(); ++i) {
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> track =
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> track =
audio_tracks[i];
RTCAudioTrack* audioTrack =
[[RTCAudioTrack alloc] initWithMediaTrack:track];
@@ -128,7 +128,7 @@
}
for (size_t i = 0; i < video_tracks.size(); ++i) {
- talk_base::scoped_refptr<webrtc::VideoTrackInterface> track =
+ rtc::scoped_refptr<webrtc::VideoTrackInterface> track =
video_tracks[i];
RTCVideoTrack* videoTrack =
[[RTCVideoTrack alloc] initWithMediaTrack:track];
@@ -138,7 +138,7 @@
return self;
}
-- (talk_base::scoped_refptr<webrtc::MediaStreamInterface>)mediaStream {
+- (rtc::scoped_refptr<webrtc::MediaStreamInterface>)mediaStream {
return _mediaStream;
}
diff --git a/talk/app/webrtc/objc/RTCMediaStreamTrack+Internal.h b/talk/app/webrtc/objc/RTCMediaStreamTrack+Internal.h
index 9a0cab3..d815c79 100644
--- a/talk/app/webrtc/objc/RTCMediaStreamTrack+Internal.h
+++ b/talk/app/webrtc/objc/RTCMediaStreamTrack+Internal.h
@@ -32,9 +32,9 @@
@interface RTCMediaStreamTrack (Internal)
@property(nonatomic, assign, readonly)
- talk_base::scoped_refptr<webrtc::MediaStreamTrackInterface> mediaTrack;
+ rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> mediaTrack;
- (id)initWithMediaTrack:
- (talk_base::scoped_refptr<webrtc::MediaStreamTrackInterface>)mediaTrack;
+ (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)mediaTrack;
@end
diff --git a/talk/app/webrtc/objc/RTCMediaStreamTrack.mm b/talk/app/webrtc/objc/RTCMediaStreamTrack.mm
index 5931312..a821bcc 100644
--- a/talk/app/webrtc/objc/RTCMediaStreamTrack.mm
+++ b/talk/app/webrtc/objc/RTCMediaStreamTrack.mm
@@ -48,8 +48,8 @@
}
@implementation RTCMediaStreamTrack {
- talk_base::scoped_refptr<webrtc::MediaStreamTrackInterface> _mediaTrack;
- talk_base::scoped_ptr<webrtc::RTCMediaStreamTrackObserver> _observer;
+ rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> _mediaTrack;
+ rtc::scoped_ptr<webrtc::RTCMediaStreamTrackObserver> _observer;
}
@synthesize label;
@@ -100,7 +100,7 @@
@implementation RTCMediaStreamTrack (Internal)
- (id)initWithMediaTrack:
- (talk_base::scoped_refptr<webrtc::MediaStreamTrackInterface>)
+ (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)
mediaTrack {
if (!mediaTrack) {
NSAssert(NO, @"nil arguments not allowed");
@@ -120,7 +120,7 @@
_mediaTrack->UnregisterObserver(_observer.get());
}
-- (talk_base::scoped_refptr<webrtc::MediaStreamTrackInterface>)mediaTrack {
+- (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)mediaTrack {
return _mediaTrack;
}
diff --git a/talk/app/webrtc/objc/RTCPeerConnection+Internal.h b/talk/app/webrtc/objc/RTCPeerConnection+Internal.h
index ad1c334..305bd5e 100644
--- a/talk/app/webrtc/objc/RTCPeerConnection+Internal.h
+++ b/talk/app/webrtc/objc/RTCPeerConnection+Internal.h
@@ -34,7 +34,7 @@
@interface RTCPeerConnection (Internal)
@property(nonatomic, assign, readonly)
- talk_base::scoped_refptr<webrtc::PeerConnectionInterface> peerConnection;
+ rtc::scoped_refptr<webrtc::PeerConnectionInterface> peerConnection;
- (instancetype)initWithFactory:(webrtc::PeerConnectionFactoryInterface*)factory
iceServers:(const webrtc::PeerConnectionInterface::IceServers&)iceServers
diff --git a/talk/app/webrtc/objc/RTCPeerConnection.mm b/talk/app/webrtc/objc/RTCPeerConnection.mm
index 738fb31..58c1342 100644
--- a/talk/app/webrtc/objc/RTCPeerConnection.mm
+++ b/talk/app/webrtc/objc/RTCPeerConnection.mm
@@ -141,12 +141,12 @@
@implementation RTCPeerConnection {
NSMutableArray* _localStreams;
- talk_base::scoped_ptr<webrtc::RTCPeerConnectionObserver> _observer;
- talk_base::scoped_refptr<webrtc::PeerConnectionInterface> _peerConnection;
+ rtc::scoped_ptr<webrtc::RTCPeerConnectionObserver> _observer;
+ rtc::scoped_refptr<webrtc::PeerConnectionInterface> _peerConnection;
}
- (BOOL)addICECandidate:(RTCICECandidate*)candidate {
- talk_base::scoped_ptr<const webrtc::IceCandidateInterface> iceCandidate(
+ rtc::scoped_ptr<const webrtc::IceCandidateInterface> iceCandidate(
candidate.candidate);
return self.peerConnection->AddIceCandidate(iceCandidate.get());
}
@@ -165,7 +165,7 @@
- (RTCDataChannel*)createDataChannelWithLabel:(NSString*)label
config:(RTCDataChannelInit*)config {
std::string labelString([label UTF8String]);
- talk_base::scoped_refptr<webrtc::DataChannelInterface> dataChannel =
+ rtc::scoped_refptr<webrtc::DataChannelInterface> dataChannel =
self.peerConnection->CreateDataChannel(labelString,
config.dataChannelInit);
return [[RTCDataChannel alloc] initWithDataChannel:dataChannel];
@@ -173,16 +173,16 @@
- (void)createAnswerWithDelegate:(id<RTCSessionDescriptionDelegate>)delegate
constraints:(RTCMediaConstraints*)constraints {
- talk_base::scoped_refptr<webrtc::RTCCreateSessionDescriptionObserver>
- observer(new talk_base::RefCountedObject<
+ rtc::scoped_refptr<webrtc::RTCCreateSessionDescriptionObserver>
+ observer(new rtc::RefCountedObject<
webrtc::RTCCreateSessionDescriptionObserver>(delegate, self));
self.peerConnection->CreateAnswer(observer, constraints.constraints);
}
- (void)createOfferWithDelegate:(id<RTCSessionDescriptionDelegate>)delegate
constraints:(RTCMediaConstraints*)constraints {
- talk_base::scoped_refptr<webrtc::RTCCreateSessionDescriptionObserver>
- observer(new talk_base::RefCountedObject<
+ rtc::scoped_refptr<webrtc::RTCCreateSessionDescriptionObserver>
+ observer(new rtc::RefCountedObject<
webrtc::RTCCreateSessionDescriptionObserver>(delegate, self));
self.peerConnection->CreateOffer(observer, constraints.constraints);
}
@@ -195,8 +195,8 @@
- (void)setLocalDescriptionWithDelegate:
(id<RTCSessionDescriptionDelegate>)delegate
sessionDescription:(RTCSessionDescription*)sdp {
- talk_base::scoped_refptr<webrtc::RTCSetSessionDescriptionObserver> observer(
- new talk_base::RefCountedObject<webrtc::RTCSetSessionDescriptionObserver>(
+ rtc::scoped_refptr<webrtc::RTCSetSessionDescriptionObserver> observer(
+ new rtc::RefCountedObject<webrtc::RTCSetSessionDescriptionObserver>(
delegate, self));
self.peerConnection->SetLocalDescription(observer, sdp.sessionDescription);
}
@@ -204,8 +204,8 @@
- (void)setRemoteDescriptionWithDelegate:
(id<RTCSessionDescriptionDelegate>)delegate
sessionDescription:(RTCSessionDescription*)sdp {
- talk_base::scoped_refptr<webrtc::RTCSetSessionDescriptionObserver> observer(
- new talk_base::RefCountedObject<webrtc::RTCSetSessionDescriptionObserver>(
+ rtc::scoped_refptr<webrtc::RTCSetSessionDescriptionObserver> observer(
+ new rtc::RefCountedObject<webrtc::RTCSetSessionDescriptionObserver>(
delegate, self));
self.peerConnection->SetRemoteDescription(observer, sdp.sessionDescription);
}
@@ -261,8 +261,8 @@
- (BOOL)getStatsWithDelegate:(id<RTCStatsDelegate>)delegate
mediaStreamTrack:(RTCMediaStreamTrack*)mediaStreamTrack
statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel {
- talk_base::scoped_refptr<webrtc::RTCStatsObserver> observer(
- new talk_base::RefCountedObject<webrtc::RTCStatsObserver>(delegate,
+ rtc::scoped_refptr<webrtc::RTCStatsObserver> observer(
+ new rtc::RefCountedObject<webrtc::RTCStatsObserver>(delegate,
self));
webrtc::PeerConnectionInterface::StatsOutputLevel nativeOutputLevel =
[RTCEnumConverter convertStatsOutputLevelToNative:statsOutputLevel];
@@ -287,7 +287,7 @@
return self;
}
-- (talk_base::scoped_refptr<webrtc::PeerConnectionInterface>)peerConnection {
+- (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)peerConnection {
return _peerConnection;
}
diff --git a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
index 8ada166..b7d2ce3 100644
--- a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
+++ b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
@@ -51,12 +51,12 @@
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "talk/app/webrtc/videosourceinterface.h"
#include "talk/app/webrtc/videotrack.h"
-#include "talk/base/logging.h"
-#include "talk/base/ssladapter.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/ssladapter.h"
@interface RTCPeerConnectionFactory ()
-@property(nonatomic, assign) talk_base::scoped_refptr<
+@property(nonatomic, assign) rtc::scoped_refptr<
webrtc::PeerConnectionFactoryInterface> nativeFactory;
@end
@@ -66,12 +66,12 @@
@synthesize nativeFactory = _nativeFactory;
+ (void)initializeSSL {
- BOOL initialized = talk_base::InitializeSSL();
+ BOOL initialized = rtc::InitializeSSL();
NSAssert(initialized, @"Failed to initialize SSL library");
}
+ (void)deinitializeSSL {
- BOOL deinitialized = talk_base::CleanupSSL();
+ BOOL deinitialized = rtc::CleanupSSL();
NSAssert(deinitialized, @"Failed to deinitialize SSL library");
}
@@ -80,7 +80,7 @@
_nativeFactory = webrtc::CreatePeerConnectionFactory();
NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!");
// Uncomment to get sensitive logs emitted (to stderr or logcat).
- // talk_base::LogMessage::LogToDebug(talk_base::LS_SENSITIVE);
+ // rtc::LogMessage::LogToDebug(rtc::LS_SENSITIVE);
}
return self;
}
@@ -102,7 +102,7 @@
}
- (RTCMediaStream*)mediaStreamWithLabel:(NSString*)label {
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> nativeMediaStream =
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> nativeMediaStream =
self.nativeFactory->CreateLocalMediaStream([label UTF8String]);
return [[RTCMediaStream alloc] initWithMediaStream:nativeMediaStream];
}
@@ -112,7 +112,7 @@
if (!capturer) {
return nil;
}
- talk_base::scoped_refptr<webrtc::VideoSourceInterface> source =
+ rtc::scoped_refptr<webrtc::VideoSourceInterface> source =
self.nativeFactory->CreateVideoSource([capturer takeNativeCapturer],
constraints.constraints);
return [[RTCVideoSource alloc] initWithMediaSource:source];
@@ -120,14 +120,14 @@
- (RTCVideoTrack*)videoTrackWithID:(NSString*)videoId
source:(RTCVideoSource*)source {
- talk_base::scoped_refptr<webrtc::VideoTrackInterface> track =
+ rtc::scoped_refptr<webrtc::VideoTrackInterface> track =
self.nativeFactory->CreateVideoTrack([videoId UTF8String],
source.videoSource);
return [[RTCVideoTrack alloc] initWithMediaTrack:track];
}
- (RTCAudioTrack*)audioTrackWithID:(NSString*)audioId {
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> track =
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> track =
self.nativeFactory->CreateAudioTrack([audioId UTF8String], NULL);
return [[RTCAudioTrack alloc] initWithMediaTrack:track];
}
diff --git a/talk/app/webrtc/objc/RTCVideoCapturer.mm b/talk/app/webrtc/objc/RTCVideoCapturer.mm
index d947f02..ea8e7ad 100644
--- a/talk/app/webrtc/objc/RTCVideoCapturer.mm
+++ b/talk/app/webrtc/objc/RTCVideoCapturer.mm
@@ -35,12 +35,12 @@
#include "talk/media/devices/devicemanager.h"
@implementation RTCVideoCapturer {
- talk_base::scoped_ptr<cricket::VideoCapturer> _capturer;
+ rtc::scoped_ptr<cricket::VideoCapturer> _capturer;
}
+ (RTCVideoCapturer*)capturerWithDeviceName:(NSString*)deviceName {
const std::string& device_name = std::string([deviceName UTF8String]);
- talk_base::scoped_ptr<cricket::DeviceManagerInterface> device_manager(
+ rtc::scoped_ptr<cricket::DeviceManagerInterface> device_manager(
cricket::DeviceManagerFactory::Create());
bool initialized = device_manager->Init();
NSAssert(initialized, @"DeviceManager::Init() failed");
@@ -49,7 +49,7 @@
LOG(LS_ERROR) << "GetVideoCaptureDevice failed";
return 0;
}
- talk_base::scoped_ptr<cricket::VideoCapturer> capturer(
+ rtc::scoped_ptr<cricket::VideoCapturer> capturer(
device_manager->CreateVideoCapturer(device));
RTCVideoCapturer* rtcCapturer =
[[RTCVideoCapturer alloc] initWithCapturer:capturer.release()];
diff --git a/talk/app/webrtc/objc/RTCVideoRenderer.mm b/talk/app/webrtc/objc/RTCVideoRenderer.mm
index 0704181..de03a1e 100644
--- a/talk/app/webrtc/objc/RTCVideoRenderer.mm
+++ b/talk/app/webrtc/objc/RTCVideoRenderer.mm
@@ -61,7 +61,7 @@
}
@implementation RTCVideoRenderer {
- talk_base::scoped_ptr<webrtc::RTCVideoRendererAdapter> _adapter;
+ rtc::scoped_ptr<webrtc::RTCVideoRendererAdapter> _adapter;
#if TARGET_OS_IPHONE
RTCEAGLVideoView* _videoView;
#endif
diff --git a/talk/app/webrtc/objc/RTCVideoSource+Internal.h b/talk/app/webrtc/objc/RTCVideoSource+Internal.h
index 1d3c4c9..962fa43 100644
--- a/talk/app/webrtc/objc/RTCVideoSource+Internal.h
+++ b/talk/app/webrtc/objc/RTCVideoSource+Internal.h
@@ -32,6 +32,6 @@
@interface RTCVideoSource (Internal)
@property(nonatomic, assign, readonly)
- talk_base::scoped_refptr<webrtc::VideoSourceInterface>videoSource;
+ rtc::scoped_refptr<webrtc::VideoSourceInterface>videoSource;
@end
diff --git a/talk/app/webrtc/objc/RTCVideoSource.mm b/talk/app/webrtc/objc/RTCVideoSource.mm
index b4554e0..7ad423c 100644
--- a/talk/app/webrtc/objc/RTCVideoSource.mm
+++ b/talk/app/webrtc/objc/RTCVideoSource.mm
@@ -37,7 +37,7 @@
@implementation RTCVideoSource (Internal)
-- (talk_base::scoped_refptr<webrtc::VideoSourceInterface>)videoSource {
+- (rtc::scoped_refptr<webrtc::VideoSourceInterface>)videoSource {
return static_cast<webrtc::VideoSourceInterface*>(self.mediaSource.get());
}
diff --git a/talk/app/webrtc/objc/RTCVideoTrack+Internal.h b/talk/app/webrtc/objc/RTCVideoTrack+Internal.h
index b5da54b..03c8f95 100644
--- a/talk/app/webrtc/objc/RTCVideoTrack+Internal.h
+++ b/talk/app/webrtc/objc/RTCVideoTrack+Internal.h
@@ -35,6 +35,6 @@
@interface RTCVideoTrack (Internal)
@property(nonatomic, assign, readonly)
- talk_base::scoped_refptr<webrtc::VideoTrackInterface> videoTrack;
+ rtc::scoped_refptr<webrtc::VideoTrackInterface> videoTrack;
@end
diff --git a/talk/app/webrtc/objc/RTCVideoTrack.mm b/talk/app/webrtc/objc/RTCVideoTrack.mm
index d6c8ed8..beebde0 100644
--- a/talk/app/webrtc/objc/RTCVideoTrack.mm
+++ b/talk/app/webrtc/objc/RTCVideoTrack.mm
@@ -39,7 +39,7 @@
}
- (id)initWithMediaTrack:
- (talk_base::scoped_refptr<webrtc::MediaStreamTrackInterface>)
+ (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)
mediaTrack {
if (self = [super initWithMediaTrack:mediaTrack]) {
_rendererArray = [NSMutableArray array];
@@ -71,7 +71,7 @@
@implementation RTCVideoTrack (Internal)
-- (talk_base::scoped_refptr<webrtc::VideoTrackInterface>)videoTrack {
+- (rtc::scoped_refptr<webrtc::VideoTrackInterface>)videoTrack {
return static_cast<webrtc::VideoTrackInterface*>(self.mediaTrack.get());
}
diff --git a/talk/app/webrtc/objctests/RTCPeerConnectionTest.mm b/talk/app/webrtc/objctests/RTCPeerConnectionTest.mm
index 7a178f3..909503a 100644
--- a/talk/app/webrtc/objctests/RTCPeerConnectionTest.mm
+++ b/talk/app/webrtc/objctests/RTCPeerConnectionTest.mm
@@ -39,8 +39,8 @@
#import "RTCVideoRenderer.h"
#import "RTCVideoTrack.h"
-#include "talk/base/gunit.h"
-#include "talk/base/ssladapter.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/ssladapter.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -299,7 +299,7 @@
// a TestBase since it's not.
TEST(RTCPeerConnectionTest, SessionTest) {
@autoreleasepool {
- talk_base::InitializeSSL();
+ rtc::InitializeSSL();
// Since |factory| will own the signaling & worker threads, it's important
// that it outlive the created PeerConnections since they self-delete on the
// signaling thread, and if |factory| is freed first then a last refcount on
@@ -312,6 +312,6 @@
RTCPeerConnectionTest* pcTest = [[RTCPeerConnectionTest alloc] init];
[pcTest testCompleteSessionWithFactory:factory];
}
- talk_base::CleanupSSL();
+ rtc::CleanupSSL();
}
}
diff --git a/talk/app/webrtc/objctests/mac/main.mm b/talk/app/webrtc/objctests/mac/main.mm
index 4995b7f..7af1a2b 100644
--- a/talk/app/webrtc/objctests/mac/main.mm
+++ b/talk/app/webrtc/objctests/mac/main.mm
@@ -25,7 +25,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "talk/base/gunit.h"
+#include "webrtc/base/gunit.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
diff --git a/talk/app/webrtc/peerconnection.cc b/talk/app/webrtc/peerconnection.cc
index ec20593..089da82 100644
--- a/talk/app/webrtc/peerconnection.cc
+++ b/talk/app/webrtc/peerconnection.cc
@@ -35,8 +35,8 @@
#include "talk/app/webrtc/mediaconstraintsinterface.h"
#include "talk/app/webrtc/mediastreamhandler.h"
#include "talk/app/webrtc/streamcollection.h"
-#include "talk/base/logging.h"
-#include "talk/base/stringencode.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/stringencode.h"
#include "talk/p2p/client/basicportallocator.h"
#include "talk/session/media/channelmanager.h"
@@ -74,22 +74,22 @@
MSG_GETSTATS,
};
-struct SetSessionDescriptionMsg : public talk_base::MessageData {
+struct SetSessionDescriptionMsg : public rtc::MessageData {
explicit SetSessionDescriptionMsg(
webrtc::SetSessionDescriptionObserver* observer)
: observer(observer) {
}
- talk_base::scoped_refptr<webrtc::SetSessionDescriptionObserver> observer;
+ rtc::scoped_refptr<webrtc::SetSessionDescriptionObserver> observer;
std::string error;
};
-struct GetStatsMsg : public talk_base::MessageData {
+struct GetStatsMsg : public rtc::MessageData {
explicit GetStatsMsg(webrtc::StatsObserver* observer)
: observer(observer) {
}
webrtc::StatsReports reports;
- talk_base::scoped_refptr<webrtc::StatsObserver> observer;
+ rtc::scoped_refptr<webrtc::StatsObserver> observer;
};
// |in_str| should be of format
@@ -136,7 +136,7 @@
*host = in_str.substr(1, closebracket - 1);
std::string::size_type colonpos = in_str.find(':', closebracket);
if (std::string::npos != colonpos) {
- if (!talk_base::FromString(
+ if (!rtc::FromString(
in_str.substr(closebracket + 2, std::string::npos), port)) {
return false;
}
@@ -148,7 +148,7 @@
std::string::size_type colonpos = in_str.find(':');
if (std::string::npos != colonpos) {
*host = in_str.substr(0, colonpos);
- if (!talk_base::FromString(
+ if (!rtc::FromString(
in_str.substr(colonpos + 1, std::string::npos), port)) {
return false;
}
@@ -189,12 +189,12 @@
}
std::vector<std::string> tokens;
std::string turn_transport_type = kUdpTransportType;
- talk_base::tokenize(server.uri, '?', &tokens);
+ rtc::tokenize(server.uri, '?', &tokens);
std::string uri_without_transport = tokens[0];
// Let's look into transport= param, if it exists.
if (tokens.size() == kTurnTransportTokensNum) { // ?transport= is present.
std::string uri_transport_param = tokens[1];
- talk_base::tokenize(uri_transport_param, '=', &tokens);
+ rtc::tokenize(uri_transport_param, '=', &tokens);
if (tokens[0] == kTransport) {
// As per above grammar transport param will be consist of lower case
// letters.
@@ -218,10 +218,10 @@
// Let's break hostname.
tokens.clear();
- talk_base::tokenize(hoststring, '@', &tokens);
+ rtc::tokenize(hoststring, '@', &tokens);
hoststring = tokens[0];
if (tokens.size() == kTurnHostTokensNum) {
- server.username = talk_base::s_url_decode(tokens[0]);
+ server.username = rtc::s_url_decode(tokens[0]);
hoststring = tokens[1];
}
@@ -253,9 +253,9 @@
if (server.username.empty()) {
// Turn url example from the spec |url:"turn:user@turn.example.org"|.
std::vector<std::string> turn_tokens;
- talk_base::tokenize(address, '@', &turn_tokens);
+ rtc::tokenize(address, '@', &turn_tokens);
if (turn_tokens.size() == kTurnHostTokensNum) {
- server.username = talk_base::s_url_decode(turn_tokens[0]);
+ server.username = rtc::s_url_decode(turn_tokens[0]);
address = turn_tokens[1];
}
}
@@ -387,12 +387,12 @@
return true;
}
-talk_base::scoped_refptr<StreamCollectionInterface>
+rtc::scoped_refptr<StreamCollectionInterface>
PeerConnection::local_streams() {
return mediastream_signaling_->local_streams();
}
-talk_base::scoped_refptr<StreamCollectionInterface>
+rtc::scoped_refptr<StreamCollectionInterface>
PeerConnection::remote_streams() {
return mediastream_signaling_->remote_streams();
}
@@ -423,7 +423,7 @@
observer_->OnRenegotiationNeeded();
}
-talk_base::scoped_refptr<DtmfSenderInterface> PeerConnection::CreateDtmfSender(
+rtc::scoped_refptr<DtmfSenderInterface> PeerConnection::CreateDtmfSender(
AudioTrackInterface* track) {
if (!track) {
LOG(LS_ERROR) << "CreateDtmfSender - track is NULL.";
@@ -434,7 +434,7 @@
return NULL;
}
- talk_base::scoped_refptr<DtmfSenderInterface> sender(
+ rtc::scoped_refptr<DtmfSenderInterface> sender(
DtmfSender::Create(track, signaling_thread(), session_.get()));
if (!sender.get()) {
LOG(LS_ERROR) << "CreateDtmfSender failed on DtmfSender::Create.";
@@ -452,7 +452,7 @@
}
stats_->UpdateStats(level);
- talk_base::scoped_ptr<GetStatsMsg> msg(new GetStatsMsg(observer));
+ rtc::scoped_ptr<GetStatsMsg> msg(new GetStatsMsg(observer));
if (!stats_->GetStats(track, &(msg->reports))) {
return false;
}
@@ -478,17 +478,17 @@
return ice_gathering_state_;
}
-talk_base::scoped_refptr<DataChannelInterface>
+rtc::scoped_refptr<DataChannelInterface>
PeerConnection::CreateDataChannel(
const std::string& label,
const DataChannelInit* config) {
bool first_datachannel = !mediastream_signaling_->HasDataChannels();
- talk_base::scoped_ptr<InternalDataChannelInit> internal_config;
+ rtc::scoped_ptr<InternalDataChannelInit> internal_config;
if (config) {
internal_config.reset(new InternalDataChannelInit(*config));
}
- talk_base::scoped_refptr<DataChannelInterface> channel(
+ rtc::scoped_refptr<DataChannelInterface> channel(
session_->CreateDataChannel(label, internal_config.get()));
if (!channel.get())
return NULL;
@@ -588,13 +588,13 @@
return false;
}
- std::vector<talk_base::SocketAddress> stun_hosts;
+ std::vector<rtc::SocketAddress> stun_hosts;
typedef std::vector<StunConfiguration>::const_iterator StunIt;
for (StunIt stun_it = stuns.begin(); stun_it != stuns.end(); ++stun_it) {
stun_hosts.push_back(stun_it->server);
}
- talk_base::SocketAddress stun_addr;
+ rtc::SocketAddress stun_addr;
if (!stun_hosts.empty()) {
stun_addr = stun_hosts.front();
LOG(LS_INFO) << "UpdateIce: StunServer Address: " << stun_addr.ToString();
@@ -684,7 +684,7 @@
}
}
-void PeerConnection::OnMessage(talk_base::Message* msg) {
+void PeerConnection::OnMessage(rtc::Message* msg) {
switch (msg->message_id) {
case MSG_SET_SESSIONDESCRIPTION_SUCCESS: {
SetSessionDescriptionMsg* param =
diff --git a/talk/app/webrtc/peerconnection.h b/talk/app/webrtc/peerconnection.h
index ebb5dba..bb4e4eb 100644
--- a/talk/app/webrtc/peerconnection.h
+++ b/talk/app/webrtc/peerconnection.h
@@ -36,7 +36,7 @@
#include "talk/app/webrtc/statscollector.h"
#include "talk/app/webrtc/streamcollection.h"
#include "talk/app/webrtc/webrtcsession.h"
-#include "talk/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
namespace webrtc {
class MediaStreamHandlerContainer;
@@ -52,7 +52,7 @@
class PeerConnection : public PeerConnectionInterface,
public MediaStreamSignalingObserver,
public IceObserver,
- public talk_base::MessageHandler,
+ public rtc::MessageHandler,
public sigslot::has_slots<> {
public:
explicit PeerConnection(PeerConnectionFactory* factory);
@@ -63,16 +63,16 @@
PortAllocatorFactoryInterface* allocator_factory,
DTLSIdentityServiceInterface* dtls_identity_service,
PeerConnectionObserver* observer);
- virtual talk_base::scoped_refptr<StreamCollectionInterface> local_streams();
- virtual talk_base::scoped_refptr<StreamCollectionInterface> remote_streams();
+ virtual rtc::scoped_refptr<StreamCollectionInterface> local_streams();
+ virtual rtc::scoped_refptr<StreamCollectionInterface> remote_streams();
virtual bool AddStream(MediaStreamInterface* local_stream,
const MediaConstraintsInterface* constraints);
virtual void RemoveStream(MediaStreamInterface* local_stream);
- virtual talk_base::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
+ virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
AudioTrackInterface* track);
- virtual talk_base::scoped_refptr<DataChannelInterface> CreateDataChannel(
+ virtual rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
const std::string& label,
const DataChannelInit* config);
virtual bool GetStats(StatsObserver* observer,
@@ -114,7 +114,7 @@
private:
// Implements MessageHandler.
- virtual void OnMessage(talk_base::Message* msg);
+ virtual void OnMessage(rtc::Message* msg);
// Implements MediaStreamSignalingObserver.
virtual void OnAddRemoteStream(MediaStreamInterface* stream) OVERRIDE;
@@ -166,7 +166,7 @@
DTLSIdentityServiceInterface* dtls_identity_service,
PeerConnectionObserver* observer);
- talk_base::Thread* signaling_thread() const {
+ rtc::Thread* signaling_thread() const {
return factory_->signaling_thread();
}
@@ -183,7 +183,7 @@
// However, since the reference counting is done in the
// PeerConnectionFactoryInteface all instances created using the raw pointer
// will refer to the same reference count.
- talk_base::scoped_refptr<PeerConnectionFactory> factory_;
+ rtc::scoped_refptr<PeerConnectionFactory> factory_;
PeerConnectionObserver* observer_;
UMAObserver* uma_observer_;
SignalingState signaling_state_;
@@ -192,11 +192,11 @@
IceConnectionState ice_connection_state_;
IceGatheringState ice_gathering_state_;
- talk_base::scoped_ptr<cricket::PortAllocator> port_allocator_;
- talk_base::scoped_ptr<WebRtcSession> session_;
- talk_base::scoped_ptr<MediaStreamSignaling> mediastream_signaling_;
- talk_base::scoped_ptr<MediaStreamHandlerContainer> stream_handler_container_;
- talk_base::scoped_ptr<StatsCollector> stats_;
+ rtc::scoped_ptr<cricket::PortAllocator> port_allocator_;
+ rtc::scoped_ptr<WebRtcSession> session_;
+ rtc::scoped_ptr<MediaStreamSignaling> mediastream_signaling_;
+ rtc::scoped_ptr<MediaStreamHandlerContainer> stream_handler_container_;
+ rtc::scoped_ptr<StatsCollector> stats_;
};
} // namespace webrtc
diff --git a/talk/app/webrtc/peerconnection_unittest.cc b/talk/app/webrtc/peerconnection_unittest.cc
index 0c39297..44009c0 100644
--- a/talk/app/webrtc/peerconnection_unittest.cc
+++ b/talk/app/webrtc/peerconnection_unittest.cc
@@ -45,11 +45,11 @@
#include "talk/app/webrtc/test/fakeperiodicvideocapturer.h"
#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
#include "talk/app/webrtc/videosourceinterface.h"
-#include "talk/base/gunit.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/ssladapter.h"
-#include "talk/base/sslstreamadapter.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/ssladapter.h"
+#include "webrtc/base/sslstreamadapter.h"
+#include "webrtc/base/thread.h"
#include "talk/media/webrtc/fakewebrtcvideoengine.h"
#include "talk/p2p/base/constants.h"
#include "talk/p2p/base/sessiondescription.h"
@@ -155,9 +155,9 @@
void AddMediaStream(bool audio, bool video) {
std::string label = kStreamLabelBase +
- talk_base::ToString<int>(
+ rtc::ToString<int>(
static_cast<int>(peer_connection_->local_streams()->count()));
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream =
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> stream =
peer_connection_factory_->CreateLocalMediaStream(label);
if (audio && can_receive_audio()) {
@@ -165,11 +165,11 @@
// Disable highpass filter so that we can get all the test audio frames.
constraints.AddMandatory(
MediaConstraintsInterface::kHighpassFilter, false);
- talk_base::scoped_refptr<webrtc::AudioSourceInterface> source =
+ rtc::scoped_refptr<webrtc::AudioSourceInterface> source =
peer_connection_factory_->CreateAudioSource(&constraints);
// TODO(perkj): Test audio source when it is implemented. Currently audio
// always use the default input.
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
peer_connection_factory_->CreateAudioTrack(kAudioTrackLabelBase,
source));
stream->AddTrack(audio_track);
@@ -236,13 +236,13 @@
}
// Verify the CreateDtmfSender interface
void VerifyDtmf() {
- talk_base::scoped_ptr<DummyDtmfObserver> observer(new DummyDtmfObserver());
- talk_base::scoped_refptr<DtmfSenderInterface> dtmf_sender;
+ rtc::scoped_ptr<DummyDtmfObserver> observer(new DummyDtmfObserver());
+ rtc::scoped_refptr<DtmfSenderInterface> dtmf_sender;
// We can't create a DTMF sender with an invalid audio track or a non local
// track.
EXPECT_TRUE(peer_connection_->CreateDtmfSender(NULL) == NULL);
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> non_localtrack(
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> non_localtrack(
peer_connection_factory_->CreateAudioTrack("dummy_track",
NULL));
EXPECT_TRUE(peer_connection_->CreateDtmfSender(non_localtrack) == NULL);
@@ -333,8 +333,8 @@
}
int GetAudioOutputLevelStats(webrtc::MediaStreamTrackInterface* track) {
- talk_base::scoped_refptr<MockStatsObserver>
- observer(new talk_base::RefCountedObject<MockStatsObserver>());
+ rtc::scoped_refptr<MockStatsObserver>
+ observer(new rtc::RefCountedObject<MockStatsObserver>());
EXPECT_TRUE(peer_connection_->GetStats(
observer, track, PeerConnectionInterface::kStatsOutputLevelStandard));
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
@@ -342,8 +342,8 @@
}
int GetAudioInputLevelStats() {
- talk_base::scoped_refptr<MockStatsObserver>
- observer(new talk_base::RefCountedObject<MockStatsObserver>());
+ rtc::scoped_refptr<MockStatsObserver>
+ observer(new rtc::RefCountedObject<MockStatsObserver>());
EXPECT_TRUE(peer_connection_->GetStats(
observer, NULL, PeerConnectionInterface::kStatsOutputLevelStandard));
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
@@ -351,8 +351,8 @@
}
int GetBytesReceivedStats(webrtc::MediaStreamTrackInterface* track) {
- talk_base::scoped_refptr<MockStatsObserver>
- observer(new talk_base::RefCountedObject<MockStatsObserver>());
+ rtc::scoped_refptr<MockStatsObserver>
+ observer(new rtc::RefCountedObject<MockStatsObserver>());
EXPECT_TRUE(peer_connection_->GetStats(
observer, track, PeerConnectionInterface::kStatsOutputLevelStandard));
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
@@ -360,8 +360,8 @@
}
int GetBytesSentStats(webrtc::MediaStreamTrackInterface* track) {
- talk_base::scoped_refptr<MockStatsObserver>
- observer(new talk_base::RefCountedObject<MockStatsObserver>());
+ rtc::scoped_refptr<MockStatsObserver>
+ observer(new rtc::RefCountedObject<MockStatsObserver>());
EXPECT_TRUE(peer_connection_->GetStats(
observer, track, PeerConnectionInterface::kStatsOutputLevelStandard));
EXPECT_TRUE_WAIT(observer->called(), kMaxWaitMs);
@@ -474,7 +474,7 @@
fake_video_decoder_factory_ = new FakeWebRtcVideoDecoderFactory();
fake_video_encoder_factory_ = new FakeWebRtcVideoEncoderFactory();
peer_connection_factory_ = webrtc::CreatePeerConnectionFactory(
- talk_base::Thread::Current(), talk_base::Thread::Current(),
+ rtc::Thread::Current(), rtc::Thread::Current(),
fake_audio_capture_module_, fake_video_encoder_factory_,
fake_video_decoder_factory_);
if (!peer_connection_factory_) {
@@ -484,7 +484,7 @@
constraints);
return peer_connection_.get() != NULL;
}
- virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface>
+ virtual rtc::scoped_refptr<webrtc::PeerConnectionInterface>
CreatePeerConnection(webrtc::PortAllocatorFactoryInterface* factory,
const MediaConstraintsInterface* constraints) = 0;
MessageReceiver* signaling_message_receiver() {
@@ -523,13 +523,13 @@
std::vector<std::string> tones_;
};
- talk_base::scoped_refptr<webrtc::VideoTrackInterface>
+ rtc::scoped_refptr<webrtc::VideoTrackInterface>
CreateLocalVideoTrack(const std::string stream_label) {
// Set max frame rate to 10fps to reduce the risk of the tests to be flaky.
FakeConstraints source_constraints = video_constraints_;
source_constraints.SetMandatoryMaxFrameRate(10);
- talk_base::scoped_refptr<webrtc::VideoSourceInterface> source =
+ rtc::scoped_refptr<webrtc::VideoSourceInterface> source =
peer_connection_factory_->CreateVideoSource(
new webrtc::FakePeriodicVideoCapturer(),
&source_constraints);
@@ -543,12 +543,12 @@
// signaling time constraints and relative complexity of the audio pipeline.
// This is consistent with the video pipeline that us a a separate thread for
// encoding and decoding.
- talk_base::Thread audio_thread_;
+ rtc::Thread audio_thread_;
- talk_base::scoped_refptr<webrtc::PortAllocatorFactoryInterface>
+ rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface>
allocator_factory_;
- talk_base::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_;
- talk_base::scoped_refptr<webrtc::PeerConnectionFactoryInterface>
+ rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_;
+ rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface>
peer_connection_factory_;
typedef std::pair<std::string, std::string> IceUfragPwdPair;
@@ -556,7 +556,7 @@
bool expect_ice_restart_;
// Needed to keep track of number of frames send.
- talk_base::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_;
+ rtc::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_;
// Needed to keep track of number of frames received.
typedef std::map<std::string, webrtc::FakeVideoTrackRenderer*> RenderMap;
RenderMap fake_video_renderers_;
@@ -590,7 +590,7 @@
Negotiate(true, true);
}
virtual void Negotiate(bool audio, bool video) {
- talk_base::scoped_ptr<SessionDescriptionInterface> offer;
+ rtc::scoped_ptr<SessionDescriptionInterface> offer;
EXPECT_TRUE(DoCreateOffer(offer.use()));
if (offer->description()->GetContentByName("audio")) {
@@ -621,7 +621,7 @@
int sdp_mline_index,
const std::string& msg) {
LOG(INFO) << id() << "ReceiveIceMessage";
- talk_base::scoped_ptr<webrtc::IceCandidateInterface> candidate(
+ rtc::scoped_ptr<webrtc::IceCandidateInterface> candidate(
webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, msg, NULL));
EXPECT_TRUE(pc()->AddIceCandidate(candidate.get()));
}
@@ -723,7 +723,7 @@
remove_sdes_(false) {
}
- virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface>
+ virtual rtc::scoped_refptr<webrtc::PeerConnectionInterface>
CreatePeerConnection(webrtc::PortAllocatorFactoryInterface* factory,
const MediaConstraintsInterface* constraints) {
// CreatePeerConnection with IceServers.
@@ -733,7 +733,7 @@
ice_servers.push_back(ice_server);
FakeIdentityService* dtls_service =
- talk_base::SSLStreamAdapter::HaveDtlsSrtp() ?
+ rtc::SSLStreamAdapter::HaveDtlsSrtp() ?
new FakeIdentityService() : NULL;
return peer_connection_factory()->CreatePeerConnection(
ice_servers, constraints, factory, dtls_service, this);
@@ -745,10 +745,10 @@
// If we are not sending any streams ourselves it is time to add some.
AddMediaStream(true, true);
}
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription("offer", msg, NULL));
EXPECT_TRUE(DoSetRemoteDescription(desc.release()));
- talk_base::scoped_ptr<SessionDescriptionInterface> answer;
+ rtc::scoped_ptr<SessionDescriptionInterface> answer;
EXPECT_TRUE(DoCreateAnswer(answer.use()));
std::string sdp;
EXPECT_TRUE(answer->ToString(&sdp));
@@ -761,15 +761,15 @@
void HandleIncomingAnswer(const std::string& msg) {
LOG(INFO) << id() << "HandleIncomingAnswer";
- talk_base::scoped_ptr<SessionDescriptionInterface> desc(
+ rtc::scoped_ptr<SessionDescriptionInterface> desc(
webrtc::CreateSessionDescription("answer", msg, NULL));
EXPECT_TRUE(DoSetRemoteDescription(desc.release()));
}
bool DoCreateOfferAnswer(SessionDescriptionInterface** desc,
bool offer) {
- talk_base::scoped_refptr<MockCreateSessionDescriptionObserver>
- observer(new talk_base::RefCountedObject<
+ rtc::scoped_refptr<MockCreateSessionDescriptionObserver>
+ observer(new rtc::RefCountedObject<
MockCreateSessionDescriptionObserver>());
if (offer) {
pc()->CreateOffer(observer, &session_description_constraints_);
@@ -793,8 +793,8 @@
}
bool DoSetLocalDescription(SessionDescriptionInterface* desc) {
- talk_base::scoped_refptr<MockSetSessionDescriptionObserver>
- observer(new talk_base::RefCountedObject<
+ rtc::scoped_refptr<MockSetSessionDescriptionObserver>
+ observer(new rtc::RefCountedObject<
MockSetSessionDescriptionObserver>());
LOG(INFO) << id() << "SetLocalDescription ";
pc()->SetLocalDescription(observer, desc);
@@ -802,7 +802,7 @@
// EXPECT_TRUE_WAIT, local ice candidates might be sent to the remote peer
// before the offer which is an error.
// The reason is that EXPECT_TRUE_WAIT uses
- // talk_base::Thread::Current()->ProcessMessages(1);
+ // rtc::Thread::Current()->ProcessMessages(1);
// ProcessMessages waits at least 1ms but processes all messages before
// returning. Since this test is synchronous and send messages to the remote
// peer whenever a callback is invoked, this can lead to messages being
@@ -814,8 +814,8 @@
}
bool DoSetRemoteDescription(SessionDescriptionInterface* desc) {
- talk_base::scoped_refptr<MockSetSessionDescriptionObserver>
- observer(new talk_base::RefCountedObject<
+ rtc::scoped_refptr<MockSetSessionDescriptionObserver>
+ observer(new rtc::RefCountedObject<
MockSetSessionDescriptionObserver>());
LOG(INFO) << id() << "SetRemoteDescription ";
pc()->SetRemoteDescription(observer, desc);
@@ -847,8 +847,8 @@
bool remove_bundle_; // True if bundle should be removed in received SDP.
bool remove_sdes_; // True if a=crypto should be removed in received SDP.
- talk_base::scoped_refptr<DataChannelInterface> data_channel_;
- talk_base::scoped_ptr<MockDataChannelObserver> data_observer_;
+ rtc::scoped_refptr<DataChannelInterface> data_channel_;
+ rtc::scoped_ptr<MockDataChannelObserver> data_observer_;
};
template <typename SignalingClass>
@@ -904,7 +904,7 @@
}
P2PTestConductor() {
- talk_base::InitializeSSL(NULL);
+ rtc::InitializeSSL(NULL);
}
~P2PTestConductor() {
if (initiating_client_) {
@@ -913,7 +913,7 @@
if (receiving_client_) {
receiving_client_->set_signaling_message_receiver(NULL);
}
- talk_base::CleanupSSL();
+ rtc::CleanupSSL();
}
bool CreateTestClients() {
@@ -1023,8 +1023,8 @@
SignalingClass* receiving_client() { return receiving_client_.get(); }
private:
- talk_base::scoped_ptr<SignalingClass> initiating_client_;
- talk_base::scoped_ptr<SignalingClass> receiving_client_;
+ rtc::scoped_ptr<SignalingClass> initiating_client_;
+ rtc::scoped_ptr<SignalingClass> receiving_client_;
};
typedef P2PTestConductor<JsepTestClient> JsepPeerConnectionP2PTestClient;
@@ -1081,7 +1081,7 @@
// This test sets up a call between two endpoints that are configured to use
// DTLS key agreement. As a result, DTLS is negotiated and used for transport.
TEST_F(JsepPeerConnectionP2PTestClient, LocalP2PTestDtls) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
FakeConstraints setup_constraints;
setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp,
true);
@@ -1093,7 +1093,7 @@
// This test sets up a audio call initially and then upgrades to audio/video,
// using DTLS.
TEST_F(JsepPeerConnectionP2PTestClient, LocalP2PTestDtlsRenegotiate) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
FakeConstraints setup_constraints;
setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp,
true);
@@ -1108,7 +1108,7 @@
// DTLS key agreement. The offerer don't support SDES. As a result, DTLS is
// negotiated and used for transport.
TEST_F(JsepPeerConnectionP2PTestClient, LocalP2PTestOfferDtlsButNotSdes) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
FakeConstraints setup_constraints;
setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp,
true);
@@ -1320,7 +1320,7 @@
// Wait a while to allow the sent data to arrive before an observer is
// registered..
- talk_base::Thread::Current()->ProcessMessages(100);
+ rtc::Thread::Current()->ProcessMessages(100);
MockDataChannelObserver new_observer(receiving_client()->data_channel());
EXPECT_EQ_WAIT(data, new_observer.last_message(), kMaxWaitMs);
@@ -1367,7 +1367,7 @@
// negotiation is completed without error.
#ifdef HAVE_SCTP
TEST_F(JsepPeerConnectionP2PTestClient, CreateOfferWithSctpDataChannel) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
FakeConstraints constraints;
constraints.SetMandatory(
MediaConstraintsInterface::kEnableDtlsSrtp, true);
diff --git a/talk/app/webrtc/peerconnectionendtoend_unittest.cc b/talk/app/webrtc/peerconnectionendtoend_unittest.cc
index f701e06..8984781 100644
--- a/talk/app/webrtc/peerconnectionendtoend_unittest.cc
+++ b/talk/app/webrtc/peerconnectionendtoend_unittest.cc
@@ -27,12 +27,12 @@
#include "talk/app/webrtc/test/peerconnectiontestwrapper.h"
#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
-#include "talk/base/gunit.h"
-#include "talk/base/logging.h"
-#include "talk/base/ssladapter.h"
-#include "talk/base/sslstreamadapter.h"
-#include "talk/base/stringencode.h"
-#include "talk/base/stringutils.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/ssladapter.h"
+#include "webrtc/base/sslstreamadapter.h"
+#include "webrtc/base/stringencode.h"
+#include "webrtc/base/stringutils.h"
#define MAYBE_SKIP_TEST(feature) \
if (!(feature())) { \
@@ -68,14 +68,14 @@
const std::string& newlines,
std::string* message) {
const std::string tmp = line + newlines;
- talk_base::replace_substrs(line.c_str(), line.length(),
+ rtc::replace_substrs(line.c_str(), line.length(),
tmp.c_str(), tmp.length(), message);
}
void Replace(const std::string& line,
const std::string& newlines,
std::string* message) {
- talk_base::replace_substrs(line.c_str(), line.length(),
+ rtc::replace_substrs(line.c_str(), line.length(),
newlines.c_str(), newlines.length(), message);
}
@@ -126,15 +126,15 @@
: public sigslot::has_slots<>,
public testing::Test {
public:
- typedef std::vector<talk_base::scoped_refptr<DataChannelInterface> >
+ typedef std::vector<rtc::scoped_refptr<DataChannelInterface> >
DataChannelList;
PeerConnectionEndToEndTest()
- : caller_(new talk_base::RefCountedObject<PeerConnectionTestWrapper>(
+ : caller_(new rtc::RefCountedObject<PeerConnectionTestWrapper>(
"caller")),
- callee_(new talk_base::RefCountedObject<PeerConnectionTestWrapper>(
+ callee_(new rtc::RefCountedObject<PeerConnectionTestWrapper>(
"callee")) {
- talk_base::InitializeSSL(NULL);
+ rtc::InitializeSSL(NULL);
}
void CreatePcs() {
@@ -222,10 +222,10 @@
// Tests that |dc1| and |dc2| can send to and receive from each other.
void TestDataChannelSendAndReceive(
DataChannelInterface* dc1, DataChannelInterface* dc2) {
- talk_base::scoped_ptr<webrtc::MockDataChannelObserver> dc1_observer(
+ rtc::scoped_ptr<webrtc::MockDataChannelObserver> dc1_observer(
new webrtc::MockDataChannelObserver(dc1));
- talk_base::scoped_ptr<webrtc::MockDataChannelObserver> dc2_observer(
+ rtc::scoped_ptr<webrtc::MockDataChannelObserver> dc2_observer(
new webrtc::MockDataChannelObserver(dc2));
static const std::string kDummyData = "abcdefg";
@@ -263,12 +263,12 @@
}
~PeerConnectionEndToEndTest() {
- talk_base::CleanupSSL();
+ rtc::CleanupSSL();
}
protected:
- talk_base::scoped_refptr<PeerConnectionTestWrapper> caller_;
- talk_base::scoped_refptr<PeerConnectionTestWrapper> callee_;
+ rtc::scoped_refptr<PeerConnectionTestWrapper> caller_;
+ rtc::scoped_refptr<PeerConnectionTestWrapper> callee_;
DataChannelList caller_signaled_data_channels_;
DataChannelList callee_signaled_data_channels_;
};
@@ -300,14 +300,14 @@
// Verifies that a DataChannel created before the negotiation can transition to
// "OPEN" and transfer data.
TEST_F(PeerConnectionEndToEndTest, CreateDataChannelBeforeNegotiate) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
CreatePcs();
webrtc::DataChannelInit init;
- talk_base::scoped_refptr<DataChannelInterface> caller_dc(
+ rtc::scoped_refptr<DataChannelInterface> caller_dc(
caller_->CreateDataChannel("data", init));
- talk_base::scoped_refptr<DataChannelInterface> callee_dc(
+ rtc::scoped_refptr<DataChannelInterface> callee_dc(
callee_->CreateDataChannel("data", init));
Negotiate();
@@ -326,22 +326,22 @@
// Verifies that a DataChannel created after the negotiation can transition to
// "OPEN" and transfer data.
TEST_F(PeerConnectionEndToEndTest, CreateDataChannelAfterNegotiate) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
CreatePcs();
webrtc::DataChannelInit init;
// This DataChannel is for creating the data content in the negotiation.
- talk_base::scoped_refptr<DataChannelInterface> dummy(
+ rtc::scoped_refptr<DataChannelInterface> dummy(
caller_->CreateDataChannel("data", init));
Negotiate();
WaitForConnection();
// Creates new DataChannels after the negotiation and verifies their states.
- talk_base::scoped_refptr<DataChannelInterface> caller_dc(
+ rtc::scoped_refptr<DataChannelInterface> caller_dc(
caller_->CreateDataChannel("hello", init));
- talk_base::scoped_refptr<DataChannelInterface> callee_dc(
+ rtc::scoped_refptr<DataChannelInterface> callee_dc(
callee_->CreateDataChannel("hello", init));
WaitForDataChannelsToOpen(caller_dc, callee_signaled_data_channels_, 1);
@@ -356,14 +356,14 @@
// Verifies that DataChannel IDs are even/odd based on the DTLS roles.
TEST_F(PeerConnectionEndToEndTest, DataChannelIdAssignment) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
CreatePcs();
webrtc::DataChannelInit init;
- talk_base::scoped_refptr<DataChannelInterface> caller_dc_1(
+ rtc::scoped_refptr<DataChannelInterface> caller_dc_1(
caller_->CreateDataChannel("data", init));
- talk_base::scoped_refptr<DataChannelInterface> callee_dc_1(
+ rtc::scoped_refptr<DataChannelInterface> callee_dc_1(
callee_->CreateDataChannel("data", init));
Negotiate();
@@ -372,9 +372,9 @@
EXPECT_EQ(1U, caller_dc_1->id() % 2);
EXPECT_EQ(0U, callee_dc_1->id() % 2);
- talk_base::scoped_refptr<DataChannelInterface> caller_dc_2(
+ rtc::scoped_refptr<DataChannelInterface> caller_dc_2(
caller_->CreateDataChannel("data", init));
- talk_base::scoped_refptr<DataChannelInterface> callee_dc_2(
+ rtc::scoped_refptr<DataChannelInterface> callee_dc_2(
callee_->CreateDataChannel("data", init));
EXPECT_EQ(1U, caller_dc_2->id() % 2);
@@ -385,15 +385,15 @@
// there are multiple DataChannels.
TEST_F(PeerConnectionEndToEndTest,
MessageTransferBetweenTwoPairsOfDataChannels) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
CreatePcs();
webrtc::DataChannelInit init;
- talk_base::scoped_refptr<DataChannelInterface> caller_dc_1(
+ rtc::scoped_refptr<DataChannelInterface> caller_dc_1(
caller_->CreateDataChannel("data", init));
- talk_base::scoped_refptr<DataChannelInterface> caller_dc_2(
+ rtc::scoped_refptr<DataChannelInterface> caller_dc_2(
caller_->CreateDataChannel("data", init));
Negotiate();
@@ -401,10 +401,10 @@
WaitForDataChannelsToOpen(caller_dc_1, callee_signaled_data_channels_, 0);
WaitForDataChannelsToOpen(caller_dc_2, callee_signaled_data_channels_, 1);
- talk_base::scoped_ptr<webrtc::MockDataChannelObserver> dc_1_observer(
+ rtc::scoped_ptr<webrtc::MockDataChannelObserver> dc_1_observer(
new webrtc::MockDataChannelObserver(callee_signaled_data_channels_[0]));
- talk_base::scoped_ptr<webrtc::MockDataChannelObserver> dc_2_observer(
+ rtc::scoped_ptr<webrtc::MockDataChannelObserver> dc_2_observer(
new webrtc::MockDataChannelObserver(callee_signaled_data_channels_[1]));
const std::string message_1 = "hello 1";
diff --git a/talk/app/webrtc/peerconnectionfactory.cc b/talk/app/webrtc/peerconnectionfactory.cc
index 3628c59..81d864c 100644
--- a/talk/app/webrtc/peerconnectionfactory.cc
+++ b/talk/app/webrtc/peerconnectionfactory.cc
@@ -43,13 +43,13 @@
#include "talk/media/webrtc/webrtcvideoencoderfactory.h"
#include "webrtc/modules/audio_device/include/audio_device.h"
-using talk_base::scoped_refptr;
+using rtc::scoped_refptr;
namespace {
-typedef talk_base::TypedMessageData<bool> InitMessageData;
+typedef rtc::TypedMessageData<bool> InitMessageData;
-struct CreatePeerConnectionParams : public talk_base::MessageData {
+struct CreatePeerConnectionParams : public rtc::MessageData {
CreatePeerConnectionParams(
const webrtc::PeerConnectionInterface::RTCConfiguration& configuration,
const webrtc::MediaConstraintsInterface* constraints,
@@ -70,7 +70,7 @@
webrtc::PeerConnectionObserver* observer;
};
-struct CreateAudioSourceParams : public talk_base::MessageData {
+struct CreateAudioSourceParams : public rtc::MessageData {
explicit CreateAudioSourceParams(
const webrtc::MediaConstraintsInterface* constraints)
: constraints(constraints) {
@@ -79,7 +79,7 @@
scoped_refptr<webrtc::AudioSourceInterface> source;
};
-struct CreateVideoSourceParams : public talk_base::MessageData {
+struct CreateVideoSourceParams : public rtc::MessageData {
CreateVideoSourceParams(cricket::VideoCapturer* capturer,
const webrtc::MediaConstraintsInterface* constraints)
: capturer(capturer),
@@ -90,11 +90,11 @@
scoped_refptr<webrtc::VideoSourceInterface> source;
};
-struct StartAecDumpParams : public talk_base::MessageData {
- explicit StartAecDumpParams(talk_base::PlatformFile aec_dump_file)
+struct StartAecDumpParams : public rtc::MessageData {
+ explicit StartAecDumpParams(rtc::PlatformFile aec_dump_file)
: aec_dump_file(aec_dump_file) {
}
- talk_base::PlatformFile aec_dump_file;
+ rtc::PlatformFile aec_dump_file;
bool result;
};
@@ -111,10 +111,10 @@
namespace webrtc {
-talk_base::scoped_refptr<PeerConnectionFactoryInterface>
+rtc::scoped_refptr<PeerConnectionFactoryInterface>
CreatePeerConnectionFactory() {
- talk_base::scoped_refptr<PeerConnectionFactory> pc_factory(
- new talk_base::RefCountedObject<PeerConnectionFactory>());
+ rtc::scoped_refptr<PeerConnectionFactory> pc_factory(
+ new rtc::RefCountedObject<PeerConnectionFactory>());
if (!pc_factory->Initialize()) {
return NULL;
@@ -122,15 +122,15 @@
return pc_factory;
}
-talk_base::scoped_refptr<PeerConnectionFactoryInterface>
+rtc::scoped_refptr<PeerConnectionFactoryInterface>
CreatePeerConnectionFactory(
- talk_base::Thread* worker_thread,
- talk_base::Thread* signaling_thread,
+ rtc::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
AudioDeviceModule* default_adm,
cricket::WebRtcVideoEncoderFactory* encoder_factory,
cricket::WebRtcVideoDecoderFactory* decoder_factory) {
- talk_base::scoped_refptr<PeerConnectionFactory> pc_factory(
- new talk_base::RefCountedObject<PeerConnectionFactory>(worker_thread,
+ rtc::scoped_refptr<PeerConnectionFactory> pc_factory(
+ new rtc::RefCountedObject<PeerConnectionFactory>(worker_thread,
signaling_thread,
default_adm,
encoder_factory,
@@ -143,8 +143,8 @@
PeerConnectionFactory::PeerConnectionFactory()
: owns_ptrs_(true),
- signaling_thread_(new talk_base::Thread),
- worker_thread_(new talk_base::Thread) {
+ signaling_thread_(new rtc::Thread),
+ worker_thread_(new rtc::Thread) {
bool result = signaling_thread_->Start();
ASSERT(result);
result = worker_thread_->Start();
@@ -152,8 +152,8 @@
}
PeerConnectionFactory::PeerConnectionFactory(
- talk_base::Thread* worker_thread,
- talk_base::Thread* signaling_thread,
+ rtc::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
AudioDeviceModule* default_adm,
cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
cricket::WebRtcVideoDecoderFactory* video_decoder_factory)
@@ -185,7 +185,7 @@
return result.data();
}
-void PeerConnectionFactory::OnMessage(talk_base::Message* msg) {
+void PeerConnectionFactory::OnMessage(rtc::Message* msg) {
switch (msg->message_id) {
case MSG_INIT_FACTORY: {
InitMessageData* pdata = static_cast<InitMessageData*>(msg->pdata);
@@ -229,7 +229,7 @@
}
bool PeerConnectionFactory::Initialize_s() {
- talk_base::InitRandom(talk_base::Time());
+ rtc::InitRandom(rtc::Time());
allocator_factory_ = PortAllocatorFactory::Create(worker_thread_);
if (!allocator_factory_)
@@ -260,28 +260,28 @@
allocator_factory_ = NULL;
}
-talk_base::scoped_refptr<AudioSourceInterface>
+rtc::scoped_refptr<AudioSourceInterface>
PeerConnectionFactory::CreateAudioSource_s(
const MediaConstraintsInterface* constraints) {
- talk_base::scoped_refptr<LocalAudioSource> source(
+ rtc::scoped_refptr<LocalAudioSource> source(
LocalAudioSource::Create(options_, constraints));
return source;
}
-talk_base::scoped_refptr<VideoSourceInterface>
+rtc::scoped_refptr<VideoSourceInterface>
PeerConnectionFactory::CreateVideoSource_s(
cricket::VideoCapturer* capturer,
const MediaConstraintsInterface* constraints) {
- talk_base::scoped_refptr<VideoSource> source(
+ rtc::scoped_refptr<VideoSource> source(
VideoSource::Create(channel_manager_.get(), capturer, constraints));
return VideoSourceProxy::Create(signaling_thread_, source);
}
-bool PeerConnectionFactory::StartAecDump_s(talk_base::PlatformFile file) {
+bool PeerConnectionFactory::StartAecDump_s(rtc::PlatformFile file) {
return channel_manager_->StartAecDump(file);
}
-talk_base::scoped_refptr<PeerConnectionInterface>
+rtc::scoped_refptr<PeerConnectionInterface>
PeerConnectionFactory::CreatePeerConnection(
const PeerConnectionInterface::RTCConfiguration& configuration,
const MediaConstraintsInterface* constraints,
@@ -296,7 +296,7 @@
return params.peerconnection;
}
-talk_base::scoped_refptr<PeerConnectionInterface>
+rtc::scoped_refptr<PeerConnectionInterface>
PeerConnectionFactory::CreatePeerConnection_s(
const PeerConnectionInterface::RTCConfiguration& configuration,
const MediaConstraintsInterface* constraints,
@@ -304,8 +304,8 @@
DTLSIdentityServiceInterface* dtls_identity_service,
PeerConnectionObserver* observer) {
ASSERT(allocator_factory || allocator_factory_);
- talk_base::scoped_refptr<PeerConnection> pc(
- new talk_base::RefCountedObject<PeerConnection>(this));
+ rtc::scoped_refptr<PeerConnection> pc(
+ new rtc::RefCountedObject<PeerConnection>(this));
if (!pc->Initialize(
configuration,
constraints,
@@ -317,13 +317,13 @@
return PeerConnectionProxy::Create(signaling_thread(), pc);
}
-talk_base::scoped_refptr<MediaStreamInterface>
+rtc::scoped_refptr<MediaStreamInterface>
PeerConnectionFactory::CreateLocalMediaStream(const std::string& label) {
return MediaStreamProxy::Create(signaling_thread_,
MediaStream::Create(label));
}
-talk_base::scoped_refptr<AudioSourceInterface>
+rtc::scoped_refptr<AudioSourceInterface>
PeerConnectionFactory::CreateAudioSource(
const MediaConstraintsInterface* constraints) {
CreateAudioSourceParams params(constraints);
@@ -331,7 +331,7 @@
return params.source;
}
-talk_base::scoped_refptr<VideoSourceInterface>
+rtc::scoped_refptr<VideoSourceInterface>
PeerConnectionFactory::CreateVideoSource(
cricket::VideoCapturer* capturer,
const MediaConstraintsInterface* constraints) {
@@ -342,24 +342,24 @@
return params.source;
}
-talk_base::scoped_refptr<VideoTrackInterface>
+rtc::scoped_refptr<VideoTrackInterface>
PeerConnectionFactory::CreateVideoTrack(
const std::string& id,
VideoSourceInterface* source) {
- talk_base::scoped_refptr<VideoTrackInterface> track(
+ rtc::scoped_refptr<VideoTrackInterface> track(
VideoTrack::Create(id, source));
return VideoTrackProxy::Create(signaling_thread_, track);
}
-talk_base::scoped_refptr<AudioTrackInterface>
+rtc::scoped_refptr<AudioTrackInterface>
PeerConnectionFactory::CreateAudioTrack(const std::string& id,
AudioSourceInterface* source) {
- talk_base::scoped_refptr<AudioTrackInterface> track(
+ rtc::scoped_refptr<AudioTrackInterface> track(
AudioTrack::Create(id, source));
return AudioTrackProxy::Create(signaling_thread_, track);
}
-bool PeerConnectionFactory::StartAecDump(talk_base::PlatformFile file) {
+bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file) {
StartAecDumpParams params(file);
signaling_thread_->Send(this, MSG_START_AEC_DUMP, ¶ms);
return params.result;
@@ -369,11 +369,11 @@
return channel_manager_.get();
}
-talk_base::Thread* PeerConnectionFactory::signaling_thread() {
+rtc::Thread* PeerConnectionFactory::signaling_thread() {
return signaling_thread_;
}
-talk_base::Thread* PeerConnectionFactory::worker_thread() {
+rtc::Thread* PeerConnectionFactory::worker_thread() {
return worker_thread_;
}
diff --git a/talk/app/webrtc/peerconnectionfactory.h b/talk/app/webrtc/peerconnectionfactory.h
index 633d281..2cadaaa 100644
--- a/talk/app/webrtc/peerconnectionfactory.h
+++ b/talk/app/webrtc/peerconnectionfactory.h
@@ -31,20 +31,20 @@
#include "talk/app/webrtc/mediastreaminterface.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/thread.h"
#include "talk/session/media/channelmanager.h"
namespace webrtc {
class PeerConnectionFactory : public PeerConnectionFactoryInterface,
- public talk_base::MessageHandler {
+ public rtc::MessageHandler {
public:
virtual void SetOptions(const Options& options) {
options_ = options;
}
- virtual talk_base::scoped_refptr<PeerConnectionInterface>
+ virtual rtc::scoped_refptr<PeerConnectionInterface>
CreatePeerConnection(
const PeerConnectionInterface::RTCConfiguration& configuration,
const MediaConstraintsInterface* constraints,
@@ -54,36 +54,36 @@
bool Initialize();
- virtual talk_base::scoped_refptr<MediaStreamInterface>
+ virtual rtc::scoped_refptr<MediaStreamInterface>
CreateLocalMediaStream(const std::string& label);
- virtual talk_base::scoped_refptr<AudioSourceInterface> CreateAudioSource(
+ virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource(
const MediaConstraintsInterface* constraints);
- virtual talk_base::scoped_refptr<VideoSourceInterface> CreateVideoSource(
+ virtual rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource(
cricket::VideoCapturer* capturer,
const MediaConstraintsInterface* constraints);
- virtual talk_base::scoped_refptr<VideoTrackInterface>
+ virtual rtc::scoped_refptr<VideoTrackInterface>
CreateVideoTrack(const std::string& id,
VideoSourceInterface* video_source);
- virtual talk_base::scoped_refptr<AudioTrackInterface>
+ virtual rtc::scoped_refptr<AudioTrackInterface>
CreateAudioTrack(const std::string& id,
AudioSourceInterface* audio_source);
- virtual bool StartAecDump(talk_base::PlatformFile file);
+ virtual bool StartAecDump(rtc::PlatformFile file);
virtual cricket::ChannelManager* channel_manager();
- virtual talk_base::Thread* signaling_thread();
- virtual talk_base::Thread* worker_thread();
+ virtual rtc::Thread* signaling_thread();
+ virtual rtc::Thread* worker_thread();
const Options& options() const { return options_; }
protected:
PeerConnectionFactory();
PeerConnectionFactory(
- talk_base::Thread* worker_thread,
- talk_base::Thread* signaling_thread,
+ rtc::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
AudioDeviceModule* default_adm,
cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
cricket::WebRtcVideoDecoderFactory* video_decoder_factory);
@@ -92,39 +92,39 @@
private:
bool Initialize_s();
void Terminate_s();
- talk_base::scoped_refptr<AudioSourceInterface> CreateAudioSource_s(
+ rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource_s(
const MediaConstraintsInterface* constraints);
- talk_base::scoped_refptr<VideoSourceInterface> CreateVideoSource_s(
+ rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource_s(
cricket::VideoCapturer* capturer,
const MediaConstraintsInterface* constraints);
- talk_base::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_s(
+ rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_s(
const PeerConnectionInterface::RTCConfiguration& configuration,
const MediaConstraintsInterface* constraints,
PortAllocatorFactoryInterface* allocator_factory,
DTLSIdentityServiceInterface* dtls_identity_service,
PeerConnectionObserver* observer);
- bool StartAecDump_s(talk_base::PlatformFile file);
+ bool StartAecDump_s(rtc::PlatformFile file);
- // Implements talk_base::MessageHandler.
- void OnMessage(talk_base::Message* msg);
+ // Implements rtc::MessageHandler.
+ void OnMessage(rtc::Message* msg);
bool owns_ptrs_;
- talk_base::Thread* signaling_thread_;
- talk_base::Thread* worker_thread_;
+ rtc::Thread* signaling_thread_;
+ rtc::Thread* worker_thread_;
Options options_;
- talk_base::scoped_refptr<PortAllocatorFactoryInterface> allocator_factory_;
+ rtc::scoped_refptr<PortAllocatorFactoryInterface> allocator_factory_;
// External Audio device used for audio playback.
- talk_base::scoped_refptr<AudioDeviceModule> default_adm_;
- talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
+ rtc::scoped_refptr<AudioDeviceModule> default_adm_;
+ rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
// External Video encoder factory. This can be NULL if the client has not
// injected any. In that case, video engine will use the internal SW encoder.
- talk_base::scoped_ptr<cricket::WebRtcVideoEncoderFactory>
+ rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory>
video_encoder_factory_;
// External Video decoder factory. This can be NULL if the client has not
// injected any. In that case, video engine will use the internal SW decoder.
- talk_base::scoped_ptr<cricket::WebRtcVideoDecoderFactory>
+ rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory>
video_decoder_factory_;
};
diff --git a/talk/app/webrtc/peerconnectionfactory_unittest.cc b/talk/app/webrtc/peerconnectionfactory_unittest.cc
index 01f35d9..a18069e 100644
--- a/talk/app/webrtc/peerconnectionfactory_unittest.cc
+++ b/talk/app/webrtc/peerconnectionfactory_unittest.cc
@@ -32,9 +32,9 @@
#include "talk/app/webrtc/peerconnectionfactory.h"
#include "talk/app/webrtc/videosourceinterface.h"
#include "talk/app/webrtc/test/fakevideotrackrenderer.h"
-#include "talk/base/gunit.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/thread.h"
#include "talk/media/base/fakevideocapturer.h"
#include "talk/media/webrtc/webrtccommon.h"
#include "talk/media/webrtc/webrtcvoe.h"
@@ -102,8 +102,8 @@
class PeerConnectionFactoryTest : public testing::Test {
void SetUp() {
- factory_ = webrtc::CreatePeerConnectionFactory(talk_base::Thread::Current(),
- talk_base::Thread::Current(),
+ factory_ = webrtc::CreatePeerConnectionFactory(rtc::Thread::Current(),
+ rtc::Thread::Current(),
NULL,
NULL,
NULL);
@@ -141,21 +141,21 @@
}
}
- talk_base::scoped_refptr<PeerConnectionFactoryInterface> factory_;
+ rtc::scoped_refptr<PeerConnectionFactoryInterface> factory_;
NullPeerConnectionObserver observer_;
- talk_base::scoped_refptr<PortAllocatorFactoryInterface> allocator_factory_;
+ rtc::scoped_refptr<PortAllocatorFactoryInterface> allocator_factory_;
};
// Verify creation of PeerConnection using internal ADM, video factory and
// internal libjingle threads.
TEST(PeerConnectionFactoryTestInternal, CreatePCUsingInternalModules) {
- talk_base::scoped_refptr<PeerConnectionFactoryInterface> factory(
+ rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
webrtc::CreatePeerConnectionFactory());
NullPeerConnectionObserver observer;
webrtc::PeerConnectionInterface::IceServers servers;
- talk_base::scoped_refptr<PeerConnectionInterface> pc(
+ rtc::scoped_refptr<PeerConnectionInterface> pc(
factory->CreatePeerConnection(servers, NULL, NULL, NULL, &observer));
EXPECT_TRUE(pc.get() != NULL);
@@ -174,7 +174,7 @@
ice_server.uri = kTurnIceServerWithTransport;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- talk_base::scoped_refptr<PeerConnectionInterface> pc(
+ rtc::scoped_refptr<PeerConnectionInterface> pc(
factory_->CreatePeerConnection(config, NULL,
allocator_factory_.get(),
NULL,
@@ -210,7 +210,7 @@
ice_server.uri = kTurnIceServerWithTransport;
ice_server.password = kTurnPassword;
ice_servers.push_back(ice_server);
- talk_base::scoped_refptr<PeerConnectionInterface> pc(
+ rtc::scoped_refptr<PeerConnectionInterface> pc(
factory_->CreatePeerConnection(ice_servers, NULL,
allocator_factory_.get(),
NULL,
@@ -240,7 +240,7 @@
ice_server.username = kTurnUsername;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- talk_base::scoped_refptr<PeerConnectionInterface> pc(
+ rtc::scoped_refptr<PeerConnectionInterface> pc(
factory_->CreatePeerConnection(config, NULL,
allocator_factory_.get(),
NULL,
@@ -261,7 +261,7 @@
ice_server.uri = kTurnIceServerWithTransport;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- talk_base::scoped_refptr<PeerConnectionInterface> pc(
+ rtc::scoped_refptr<PeerConnectionInterface> pc(
factory_->CreatePeerConnection(config, NULL,
allocator_factory_.get(),
NULL,
@@ -286,7 +286,7 @@
ice_server.uri = kSecureTurnIceServerWithoutTransportAndPortParam;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- talk_base::scoped_refptr<PeerConnectionInterface> pc(
+ rtc::scoped_refptr<PeerConnectionInterface> pc(
factory_->CreatePeerConnection(config, NULL,
allocator_factory_.get(),
NULL,
@@ -323,7 +323,7 @@
ice_server.uri = kTurnIceServerWithIPv6Address;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- talk_base::scoped_refptr<PeerConnectionInterface> pc(
+ rtc::scoped_refptr<PeerConnectionInterface> pc(
factory_->CreatePeerConnection(config, NULL,
allocator_factory_.get(),
NULL,
@@ -356,10 +356,10 @@
TEST_F(PeerConnectionFactoryTest, LocalRendering) {
cricket::FakeVideoCapturer* capturer = new cricket::FakeVideoCapturer();
// The source take ownership of |capturer|.
- talk_base::scoped_refptr<VideoSourceInterface> source(
+ rtc::scoped_refptr<VideoSourceInterface> source(
factory_->CreateVideoSource(capturer, NULL));
ASSERT_TRUE(source.get() != NULL);
- talk_base::scoped_refptr<VideoTrackInterface> track(
+ rtc::scoped_refptr<VideoTrackInterface> track(
factory_->CreateVideoTrack("testlabel", source));
ASSERT_TRUE(track.get() != NULL);
FakeVideoTrackRenderer local_renderer(track);
diff --git a/talk/app/webrtc/peerconnectioninterface.h b/talk/app/webrtc/peerconnectioninterface.h
index ed4033c..5c43d3b 100644
--- a/talk/app/webrtc/peerconnectioninterface.h
+++ b/talk/app/webrtc/peerconnectioninterface.h
@@ -77,10 +77,10 @@
#include "talk/app/webrtc/mediastreaminterface.h"
#include "talk/app/webrtc/statstypes.h"
#include "talk/app/webrtc/umametrics.h"
-#include "talk/base/fileutils.h"
-#include "talk/base/socketaddress.h"
+#include "webrtc/base/fileutils.h"
+#include "webrtc/base/socketaddress.h"
-namespace talk_base {
+namespace rtc {
class Thread;
}
@@ -95,7 +95,7 @@
class MediaConstraintsInterface;
// MediaStream container interface.
-class StreamCollectionInterface : public talk_base::RefCountInterface {
+class StreamCollectionInterface : public rtc::RefCountInterface {
public:
// TODO(ronghuawu): Update the function names to c++ style, e.g. find -> Find.
virtual size_t count() = 0;
@@ -111,7 +111,7 @@
~StreamCollectionInterface() {}
};
-class StatsObserver : public talk_base::RefCountInterface {
+class StatsObserver : public rtc::RefCountInterface {
public:
virtual void OnComplete(const std::vector<StatsReport>& reports) = 0;
@@ -119,7 +119,7 @@
virtual ~StatsObserver() {}
};
-class UMAObserver : public talk_base::RefCountInterface {
+class UMAObserver : public rtc::RefCountInterface {
public:
virtual void IncrementCounter(PeerConnectionUMAMetricsCounter type) = 0;
virtual void AddHistogramSample(PeerConnectionUMAMetricsName type,
@@ -129,7 +129,7 @@
virtual ~UMAObserver() {}
};
-class PeerConnectionInterface : public talk_base::RefCountInterface {
+class PeerConnectionInterface : public rtc::RefCountInterface {
public:
// See http://dev.w3.org/2011/webrtc/editor/webrtc.html#state-definitions .
enum SignalingState {
@@ -202,11 +202,11 @@
};
// Accessor methods to active local streams.
- virtual talk_base::scoped_refptr<StreamCollectionInterface>
+ virtual rtc::scoped_refptr<StreamCollectionInterface>
local_streams() = 0;
// Accessor methods to remote streams.
- virtual talk_base::scoped_refptr<StreamCollectionInterface>
+ virtual rtc::scoped_refptr<StreamCollectionInterface>
remote_streams() = 0;
// Add a new MediaStream to be sent on this PeerConnection.
@@ -222,14 +222,14 @@
// Returns pointer to the created DtmfSender on success.
// Otherwise returns NULL.
- virtual talk_base::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
+ virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
AudioTrackInterface* track) = 0;
virtual bool GetStats(StatsObserver* observer,
MediaStreamTrackInterface* track,
StatsOutputLevel level) = 0;
- virtual talk_base::scoped_refptr<DataChannelInterface> CreateDataChannel(
+ virtual rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
const std::string& label,
const DataChannelInit* config) = 0;
@@ -340,13 +340,13 @@
// Factory class used for creating cricket::PortAllocator that is used
// for ICE negotiation.
-class PortAllocatorFactoryInterface : public talk_base::RefCountInterface {
+class PortAllocatorFactoryInterface : public rtc::RefCountInterface {
public:
struct StunConfiguration {
StunConfiguration(const std::string& address, int port)
: server(address, port) {}
// STUN server address and port.
- talk_base::SocketAddress server;
+ rtc::SocketAddress server;
};
struct TurnConfiguration {
@@ -361,7 +361,7 @@
password(password),
transport_type(transport_type),
secure(secure) {}
- talk_base::SocketAddress server;
+ rtc::SocketAddress server;
std::string username;
std::string password;
std::string transport_type;
@@ -378,7 +378,7 @@
};
// Used to receive callbacks of DTLS identity requests.
-class DTLSIdentityRequestObserver : public talk_base::RefCountInterface {
+class DTLSIdentityRequestObserver : public rtc::RefCountInterface {
public:
virtual void OnFailure(int error) = 0;
virtual void OnSuccess(const std::string& der_cert,
@@ -427,7 +427,7 @@
// CreatePeerConnectionFactory method which accepts threads as input and use the
// CreatePeerConnection version that takes a PortAllocatorFactoryInterface as
// argument.
-class PeerConnectionFactoryInterface : public talk_base::RefCountInterface {
+class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
public:
class Options {
public:
@@ -441,7 +441,7 @@
virtual void SetOptions(const Options& options) = 0;
- virtual talk_base::scoped_refptr<PeerConnectionInterface>
+ virtual rtc::scoped_refptr<PeerConnectionInterface>
CreatePeerConnection(
const PeerConnectionInterface::RTCConfiguration& configuration,
const MediaConstraintsInterface* constraints,
@@ -455,7 +455,7 @@
// and not IceServers. RTCConfiguration is made up of ice servers and
// ice transport type.
// http://dev.w3.org/2011/webrtc/editor/webrtc.html
- inline talk_base::scoped_refptr<PeerConnectionInterface>
+ inline rtc::scoped_refptr<PeerConnectionInterface>
CreatePeerConnection(
const PeerConnectionInterface::IceServers& configuration,
const MediaConstraintsInterface* constraints,
@@ -468,29 +468,29 @@
dtls_identity_service, observer);
}
- virtual talk_base::scoped_refptr<MediaStreamInterface>
+ virtual rtc::scoped_refptr<MediaStreamInterface>
CreateLocalMediaStream(const std::string& label) = 0;
// Creates a AudioSourceInterface.
// |constraints| decides audio processing settings but can be NULL.
- virtual talk_base::scoped_refptr<AudioSourceInterface> CreateAudioSource(
+ virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource(
const MediaConstraintsInterface* constraints) = 0;
// Creates a VideoSourceInterface. The new source take ownership of
// |capturer|. |constraints| decides video resolution and frame rate but can
// be NULL.
- virtual talk_base::scoped_refptr<VideoSourceInterface> CreateVideoSource(
+ virtual rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource(
cricket::VideoCapturer* capturer,
const MediaConstraintsInterface* constraints) = 0;
// Creates a new local VideoTrack. The same |source| can be used in several
// tracks.
- virtual talk_base::scoped_refptr<VideoTrackInterface>
+ virtual rtc::scoped_refptr<VideoTrackInterface>
CreateVideoTrack(const std::string& label,
VideoSourceInterface* source) = 0;
// Creates an new AudioTrack. At the moment |source| can be NULL.
- virtual talk_base::scoped_refptr<AudioTrackInterface>
+ virtual rtc::scoped_refptr<AudioTrackInterface>
CreateAudioTrack(const std::string& label,
AudioSourceInterface* source) = 0;
@@ -499,7 +499,7 @@
// the ownerhip. If the operation fails, the file will be closed.
// TODO(grunell): Remove when Chromium has started to use AEC in each source.
// http://crbug.com/264611.
- virtual bool StartAecDump(talk_base::PlatformFile file) = 0;
+ virtual bool StartAecDump(rtc::PlatformFile file) = 0;
protected:
// Dtor and ctor protected as objects shouldn't be created or deleted via
@@ -509,16 +509,16 @@
};
// Create a new instance of PeerConnectionFactoryInterface.
-talk_base::scoped_refptr<PeerConnectionFactoryInterface>
+rtc::scoped_refptr<PeerConnectionFactoryInterface>
CreatePeerConnectionFactory();
// Create a new instance of PeerConnectionFactoryInterface.
// Ownership of |factory|, |default_adm|, and optionally |encoder_factory| and
// |decoder_factory| transferred to the returned factory.
-talk_base::scoped_refptr<PeerConnectionFactoryInterface>
+rtc::scoped_refptr<PeerConnectionFactoryInterface>
CreatePeerConnectionFactory(
- talk_base::Thread* worker_thread,
- talk_base::Thread* signaling_thread,
+ rtc::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
AudioDeviceModule* default_adm,
cricket::WebRtcVideoEncoderFactory* encoder_factory,
cricket::WebRtcVideoDecoderFactory* decoder_factory);
diff --git a/talk/app/webrtc/peerconnectioninterface_unittest.cc b/talk/app/webrtc/peerconnectioninterface_unittest.cc
index 2219a06..1eef82e 100644
--- a/talk/app/webrtc/peerconnectioninterface_unittest.cc
+++ b/talk/app/webrtc/peerconnectioninterface_unittest.cc
@@ -36,12 +36,12 @@
#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
#include "talk/app/webrtc/test/testsdpstrings.h"
#include "talk/app/webrtc/videosource.h"
-#include "talk/base/gunit.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/ssladapter.h"
-#include "talk/base/sslstreamadapter.h"
-#include "talk/base/stringutils.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/ssladapter.h"
+#include "webrtc/base/sslstreamadapter.h"
+#include "webrtc/base/stringutils.h"
+#include "webrtc/base/thread.h"
#include "talk/media/base/fakevideocapturer.h"
#include "talk/media/sctp/sctpdataengine.h"
#include "talk/session/media/mediasession.h"
@@ -66,8 +66,8 @@
return; \
}
-using talk_base::scoped_ptr;
-using talk_base::scoped_refptr;
+using rtc::scoped_ptr;
+using rtc::scoped_refptr;
using webrtc::AudioSourceInterface;
using webrtc::AudioTrackInterface;
using webrtc::DataBuffer;
@@ -229,15 +229,15 @@
class PeerConnectionInterfaceTest : public testing::Test {
protected:
virtual void SetUp() {
- talk_base::InitializeSSL(NULL);
+ rtc::InitializeSSL(NULL);
pc_factory_ = webrtc::CreatePeerConnectionFactory(
- talk_base::Thread::Current(), talk_base::Thread::Current(), NULL, NULL,
+ rtc::Thread::Current(), rtc::Thread::Current(), NULL, NULL,
NULL);
ASSERT_TRUE(pc_factory_.get() != NULL);
}
virtual void TearDown() {
- talk_base::CleanupSSL();
+ rtc::CleanupSSL();
}
void CreatePeerConnection() {
@@ -361,8 +361,8 @@
}
bool DoCreateOfferAnswer(SessionDescriptionInterface** desc, bool offer) {
- talk_base::scoped_refptr<MockCreateSessionDescriptionObserver>
- observer(new talk_base::RefCountedObject<
+ rtc::scoped_refptr<MockCreateSessionDescriptionObserver>
+ observer(new rtc::RefCountedObject<
MockCreateSessionDescriptionObserver>());
if (offer) {
pc_->CreateOffer(observer, NULL);
@@ -383,8 +383,8 @@
}
bool DoSetSessionDescription(SessionDescriptionInterface* desc, bool local) {
- talk_base::scoped_refptr<MockSetSessionDescriptionObserver>
- observer(new talk_base::RefCountedObject<
+ rtc::scoped_refptr<MockSetSessionDescriptionObserver>
+ observer(new rtc::RefCountedObject<
MockSetSessionDescriptionObserver>());
if (local) {
pc_->SetLocalDescription(observer, desc);
@@ -407,8 +407,8 @@
// It does not verify the values in the StatReports since a RTCP packet might
// be required.
bool DoGetStats(MediaStreamTrackInterface* track) {
- talk_base::scoped_refptr<MockStatsObserver> observer(
- new talk_base::RefCountedObject<MockStatsObserver>());
+ rtc::scoped_refptr<MockStatsObserver> observer(
+ new rtc::RefCountedObject<MockStatsObserver>());
if (!pc_->GetStats(
observer, track, PeerConnectionInterface::kStatsOutputLevelStandard))
return false;
@@ -438,7 +438,7 @@
}
void CreateOfferAsRemoteDescription() {
- talk_base::scoped_ptr<SessionDescriptionInterface> offer;
+ rtc::scoped_ptr<SessionDescriptionInterface> offer;
EXPECT_TRUE(DoCreateOffer(offer.use()));
std::string sdp;
EXPECT_TRUE(offer->ToString(&sdp));
@@ -490,7 +490,7 @@
}
void CreateOfferAsLocalDescription() {
- talk_base::scoped_ptr<SessionDescriptionInterface> offer;
+ rtc::scoped_ptr<SessionDescriptionInterface> offer;
ASSERT_TRUE(DoCreateOffer(offer.use()));
// TODO(perkj): Currently SetLocalDescription fails if any parameters in an
// audio codec change, even if the parameter has nothing to do with
@@ -792,9 +792,9 @@
scoped_refptr<DataChannelInterface> data2 =
pc_->CreateDataChannel("test2", NULL);
ASSERT_TRUE(data1 != NULL);
- talk_base::scoped_ptr<MockDataChannelObserver> observer1(
+ rtc::scoped_ptr<MockDataChannelObserver> observer1(
new MockDataChannelObserver(data1));
- talk_base::scoped_ptr<MockDataChannelObserver> observer2(
+ rtc::scoped_ptr<MockDataChannelObserver> observer2(
new MockDataChannelObserver(data2));
EXPECT_EQ(DataChannelInterface::kConnecting, data1->state());
@@ -839,9 +839,9 @@
scoped_refptr<DataChannelInterface> data2 =
pc_->CreateDataChannel("test2", NULL);
ASSERT_TRUE(data1 != NULL);
- talk_base::scoped_ptr<MockDataChannelObserver> observer1(
+ rtc::scoped_ptr<MockDataChannelObserver> observer1(
new MockDataChannelObserver(data1));
- talk_base::scoped_ptr<MockDataChannelObserver> observer2(
+ rtc::scoped_ptr<MockDataChannelObserver> observer2(
new MockDataChannelObserver(data2));
EXPECT_EQ(DataChannelInterface::kConnecting, data1->state());
@@ -854,7 +854,7 @@
EXPECT_EQ(DataChannelInterface::kOpen, data1->state());
EXPECT_EQ(DataChannelInterface::kOpen, data2->state());
- talk_base::Buffer buffer("test", 4);
+ rtc::Buffer buffer("test", 4);
EXPECT_FALSE(data1->Send(DataBuffer(buffer, true)));
}
@@ -866,7 +866,7 @@
CreatePeerConnection(&constraints);
scoped_refptr<DataChannelInterface> data1 =
pc_->CreateDataChannel("test1", NULL);
- talk_base::scoped_ptr<MockDataChannelObserver> observer1(
+ rtc::scoped_ptr<MockDataChannelObserver> observer1(
new MockDataChannelObserver(data1));
CreateOfferReceiveAnswerWithoutSsrc();
@@ -897,7 +897,7 @@
std::string receive_label = "answer_channel";
std::string sdp;
EXPECT_TRUE(pc_->local_description()->ToString(&sdp));
- talk_base::replace_substrs(offer_label.c_str(), offer_label.length(),
+ rtc::replace_substrs(offer_label.c_str(), offer_label.length(),
receive_label.c_str(), receive_label.length(),
&sdp);
CreateAnswerAsRemoteDescription(sdp);
@@ -1048,9 +1048,9 @@
scoped_refptr<DataChannelInterface> data2 =
pc_->CreateDataChannel("test2", NULL);
ASSERT_TRUE(data1 != NULL);
- talk_base::scoped_ptr<MockDataChannelObserver> observer1(
+ rtc::scoped_ptr<MockDataChannelObserver> observer1(
new MockDataChannelObserver(data1));
- talk_base::scoped_ptr<MockDataChannelObserver> observer2(
+ rtc::scoped_ptr<MockDataChannelObserver> observer2(
new MockDataChannelObserver(data2));
CreateOfferReceiveAnswer();
@@ -1091,7 +1091,7 @@
// FireFox, use it as a remote session description, generate an answer and use
// the answer as a local description.
TEST_F(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
FakeConstraints constraints;
constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp,
true);
@@ -1188,7 +1188,7 @@
EXPECT_FALSE(pc_->AddStream(local_stream, NULL));
ASSERT_FALSE(local_stream->GetAudioTracks().empty());
- talk_base::scoped_refptr<webrtc::DtmfSenderInterface> dtmf_sender(
+ rtc::scoped_refptr<webrtc::DtmfSenderInterface> dtmf_sender(
pc_->CreateDtmfSender(local_stream->GetAudioTracks()[0]));
EXPECT_TRUE(NULL == dtmf_sender); // local stream has been removed.
@@ -1197,9 +1197,9 @@
EXPECT_TRUE(pc_->local_description() != NULL);
EXPECT_TRUE(pc_->remote_description() != NULL);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer;
+ rtc::scoped_ptr<SessionDescriptionInterface> offer;
EXPECT_TRUE(DoCreateOffer(offer.use()));
- talk_base::scoped_ptr<SessionDescriptionInterface> answer;
+ rtc::scoped_ptr<SessionDescriptionInterface> answer;
EXPECT_TRUE(DoCreateAnswer(answer.use()));
std::string sdp;
diff --git a/talk/app/webrtc/peerconnectionproxy.h b/talk/app/webrtc/peerconnectionproxy.h
index 74e5012..ed26eb8 100644
--- a/talk/app/webrtc/peerconnectionproxy.h
+++ b/talk/app/webrtc/peerconnectionproxy.h
@@ -35,19 +35,19 @@
// Define proxy for PeerConnectionInterface.
BEGIN_PROXY_MAP(PeerConnection)
- PROXY_METHOD0(talk_base::scoped_refptr<StreamCollectionInterface>,
+ PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>,
local_streams)
- PROXY_METHOD0(talk_base::scoped_refptr<StreamCollectionInterface>,
+ PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>,
remote_streams)
PROXY_METHOD2(bool, AddStream, MediaStreamInterface*,
const MediaConstraintsInterface*)
PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*)
- PROXY_METHOD1(talk_base::scoped_refptr<DtmfSenderInterface>,
+ PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>,
CreateDtmfSender, AudioTrackInterface*)
PROXY_METHOD3(bool, GetStats, StatsObserver*,
MediaStreamTrackInterface*,
StatsOutputLevel)
- PROXY_METHOD2(talk_base::scoped_refptr<DataChannelInterface>,
+ PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>,
CreateDataChannel, const std::string&, const DataChannelInit*)
PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description)
PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description)
diff --git a/talk/app/webrtc/portallocatorfactory.cc b/talk/app/webrtc/portallocatorfactory.cc
index 7263c5d..9d040f9 100644
--- a/talk/app/webrtc/portallocatorfactory.cc
+++ b/talk/app/webrtc/portallocatorfactory.cc
@@ -27,27 +27,27 @@
#include "talk/app/webrtc/portallocatorfactory.h"
-#include "talk/base/logging.h"
-#include "talk/base/network.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/network.h"
+#include "webrtc/base/thread.h"
#include "talk/p2p/base/basicpacketsocketfactory.h"
#include "talk/p2p/client/basicportallocator.h"
namespace webrtc {
-using talk_base::scoped_ptr;
+using rtc::scoped_ptr;
-talk_base::scoped_refptr<PortAllocatorFactoryInterface>
+rtc::scoped_refptr<PortAllocatorFactoryInterface>
PortAllocatorFactory::Create(
- talk_base::Thread* worker_thread) {
- talk_base::RefCountedObject<PortAllocatorFactory>* allocator =
- new talk_base::RefCountedObject<PortAllocatorFactory>(worker_thread);
+ rtc::Thread* worker_thread) {
+ rtc::RefCountedObject<PortAllocatorFactory>* allocator =
+ new rtc::RefCountedObject<PortAllocatorFactory>(worker_thread);
return allocator;
}
-PortAllocatorFactory::PortAllocatorFactory(talk_base::Thread* worker_thread)
- : network_manager_(new talk_base::BasicNetworkManager()),
- socket_factory_(new talk_base::BasicPacketSocketFactory(worker_thread)) {
+PortAllocatorFactory::PortAllocatorFactory(rtc::Thread* worker_thread)
+ : network_manager_(new rtc::BasicNetworkManager()),
+ socket_factory_(new rtc::BasicPacketSocketFactory(worker_thread)) {
}
PortAllocatorFactory::~PortAllocatorFactory() {}
diff --git a/talk/app/webrtc/portallocatorfactory.h b/talk/app/webrtc/portallocatorfactory.h
index e30024c..c8890ae 100644
--- a/talk/app/webrtc/portallocatorfactory.h
+++ b/talk/app/webrtc/portallocatorfactory.h
@@ -34,13 +34,13 @@
#define TALK_APP_WEBRTC_PORTALLOCATORFACTORY_H_
#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
namespace cricket {
class PortAllocator;
}
-namespace talk_base {
+namespace rtc {
class BasicNetworkManager;
class BasicPacketSocketFactory;
}
@@ -49,20 +49,20 @@
class PortAllocatorFactory : public PortAllocatorFactoryInterface {
public:
- static talk_base::scoped_refptr<PortAllocatorFactoryInterface> Create(
- talk_base::Thread* worker_thread);
+ static rtc::scoped_refptr<PortAllocatorFactoryInterface> Create(
+ rtc::Thread* worker_thread);
virtual cricket::PortAllocator* CreatePortAllocator(
const std::vector<StunConfiguration>& stun,
const std::vector<TurnConfiguration>& turn);
protected:
- explicit PortAllocatorFactory(talk_base::Thread* worker_thread);
+ explicit PortAllocatorFactory(rtc::Thread* worker_thread);
~PortAllocatorFactory();
private:
- talk_base::scoped_ptr<talk_base::BasicNetworkManager> network_manager_;
- talk_base::scoped_ptr<talk_base::BasicPacketSocketFactory> socket_factory_;
+ rtc::scoped_ptr<rtc::BasicNetworkManager> network_manager_;
+ rtc::scoped_ptr<rtc::BasicPacketSocketFactory> socket_factory_;
};
} // namespace webrtc
diff --git a/talk/app/webrtc/proxy.h b/talk/app/webrtc/proxy.h
index 4db4bef..0c21ef9 100644
--- a/talk/app/webrtc/proxy.h
+++ b/talk/app/webrtc/proxy.h
@@ -31,7 +31,7 @@
//
// Example usage:
//
-// class TestInterface : public talk_base::RefCountInterface {
+// class TestInterface : public rtc::RefCountInterface {
// public:
// std::string FooA() = 0;
// std::string FooB(bool arg1) const = 0;
@@ -55,7 +55,7 @@
#ifndef TALK_APP_WEBRTC_PROXY_H_
#define TALK_APP_WEBRTC_PROXY_H_
-#include "talk/base/thread.h"
+#include "webrtc/base/thread.h"
namespace webrtc {
@@ -93,19 +93,19 @@
};
template <typename C, typename R>
-class MethodCall0 : public talk_base::Message,
- public talk_base::MessageHandler {
+class MethodCall0 : public rtc::Message,
+ public rtc::MessageHandler {
public:
typedef R (C::*Method)();
MethodCall0(C* c, Method m) : c_(c), m_(m) {}
- R Marshal(talk_base::Thread* t) {
+ R Marshal(rtc::Thread* t) {
t->Send(this, 0);
return r_.value();
}
private:
- void OnMessage(talk_base::Message*) { r_.Invoke(c_, m_);}
+ void OnMessage(rtc::Message*) { r_.Invoke(c_, m_);}
C* c_;
Method m_;
@@ -113,19 +113,19 @@
};
template <typename C, typename R>
-class ConstMethodCall0 : public talk_base::Message,
- public talk_base::MessageHandler {
+class ConstMethodCall0 : public rtc::Message,
+ public rtc::MessageHandler {
public:
typedef R (C::*Method)() const;
ConstMethodCall0(C* c, Method m) : c_(c), m_(m) {}
- R Marshal(talk_base::Thread* t) {
+ R Marshal(rtc::Thread* t) {
t->Send(this, 0);
return r_.value();
}
private:
- void OnMessage(talk_base::Message*) { r_.Invoke(c_, m_); }
+ void OnMessage(rtc::Message*) { r_.Invoke(c_, m_); }
C* c_;
Method m_;
@@ -133,19 +133,19 @@
};
template <typename C, typename R, typename T1>
-class MethodCall1 : public talk_base::Message,
- public talk_base::MessageHandler {
+class MethodCall1 : public rtc::Message,
+ public rtc::MessageHandler {
public:
typedef R (C::*Method)(T1 a1);
MethodCall1(C* c, Method m, T1 a1) : c_(c), m_(m), a1_(a1) {}
- R Marshal(talk_base::Thread* t) {
+ R Marshal(rtc::Thread* t) {
t->Send(this, 0);
return r_.value();
}
private:
- void OnMessage(talk_base::Message*) { r_.Invoke(c_, m_, a1_); }
+ void OnMessage(rtc::Message*) { r_.Invoke(c_, m_, a1_); }
C* c_;
Method m_;
@@ -154,19 +154,19 @@
};
template <typename C, typename R, typename T1>
-class ConstMethodCall1 : public talk_base::Message,
- public talk_base::MessageHandler {
+class ConstMethodCall1 : public rtc::Message,
+ public rtc::MessageHandler {
public:
typedef R (C::*Method)(T1 a1) const;
ConstMethodCall1(C* c, Method m, T1 a1) : c_(c), m_(m), a1_(a1) {}
- R Marshal(talk_base::Thread* t) {
+ R Marshal(rtc::Thread* t) {
t->Send(this, 0);
return r_.value();
}
private:
- void OnMessage(talk_base::Message*) { r_.Invoke(c_, m_, a1_); }
+ void OnMessage(rtc::Message*) { r_.Invoke(c_, m_, a1_); }
C* c_;
Method m_;
@@ -175,19 +175,19 @@
};
template <typename C, typename R, typename T1, typename T2>
-class MethodCall2 : public talk_base::Message,
- public talk_base::MessageHandler {
+class MethodCall2 : public rtc::Message,
+ public rtc::MessageHandler {
public:
typedef R (C::*Method)(T1 a1, T2 a2);
MethodCall2(C* c, Method m, T1 a1, T2 a2) : c_(c), m_(m), a1_(a1), a2_(a2) {}
- R Marshal(talk_base::Thread* t) {
+ R Marshal(rtc::Thread* t) {
t->Send(this, 0);
return r_.value();
}
private:
- void OnMessage(talk_base::Message*) { r_.Invoke(c_, m_, a1_, a2_); }
+ void OnMessage(rtc::Message*) { r_.Invoke(c_, m_, a1_, a2_); }
C* c_;
Method m_;
@@ -197,20 +197,20 @@
};
template <typename C, typename R, typename T1, typename T2, typename T3>
-class MethodCall3 : public talk_base::Message,
- public talk_base::MessageHandler {
+class MethodCall3 : public rtc::Message,
+ public rtc::MessageHandler {
public:
typedef R (C::*Method)(T1 a1, T2 a2, T3 a3);
MethodCall3(C* c, Method m, T1 a1, T2 a2, T3 a3)
: c_(c), m_(m), a1_(a1), a2_(a2), a3_(a3) {}
- R Marshal(talk_base::Thread* t) {
+ R Marshal(rtc::Thread* t) {
t->Send(this, 0);
return r_.value();
}
private:
- void OnMessage(talk_base::Message*) { r_.Invoke(c_, m_, a1_, a2_, a3_); }
+ void OnMessage(rtc::Message*) { r_.Invoke(c_, m_, a1_, a2_, a3_); }
C* c_;
Method m_;
@@ -224,7 +224,7 @@
class c##Proxy : public c##Interface {\
protected:\
typedef c##Interface C;\
- c##Proxy(talk_base::Thread* thread, C* c)\
+ c##Proxy(rtc::Thread* thread, C* c)\
: owner_thread_(thread), \
c_(c) {}\
~c##Proxy() {\
@@ -232,9 +232,9 @@
call.Marshal(owner_thread_);\
}\
public:\
- static talk_base::scoped_refptr<C> Create(talk_base::Thread* thread, \
+ static rtc::scoped_refptr<C> Create(rtc::Thread* thread, \
C* c) {\
- return new talk_base::RefCountedObject<c##Proxy>(thread, c);\
+ return new rtc::RefCountedObject<c##Proxy>(thread, c);\
}\
#define PROXY_METHOD0(r, method)\
@@ -278,8 +278,8 @@
void Release_s() {\
c_ = NULL;\
}\
- mutable talk_base::Thread* owner_thread_;\
- talk_base::scoped_refptr<C> c_;\
+ mutable rtc::Thread* owner_thread_;\
+ rtc::scoped_refptr<C> c_;\
};\
} // namespace webrtc
diff --git a/talk/app/webrtc/proxy_unittest.cc b/talk/app/webrtc/proxy_unittest.cc
index 71a583c..1cab484 100644
--- a/talk/app/webrtc/proxy_unittest.cc
+++ b/talk/app/webrtc/proxy_unittest.cc
@@ -29,10 +29,10 @@
#include <string>
-#include "talk/base/refcount.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/refcount.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/thread.h"
+#include "webrtc/base/gunit.h"
#include "testing/base/public/gmock.h"
using ::testing::_;
@@ -44,7 +44,7 @@
namespace webrtc {
// Interface used for testing here.
-class FakeInterface : public talk_base::RefCountInterface {
+class FakeInterface : public rtc::RefCountInterface {
public:
virtual void VoidMethod0() = 0;
virtual std::string Method0() = 0;
@@ -70,8 +70,8 @@
// Implementation of the test interface.
class Fake : public FakeInterface {
public:
- static talk_base::scoped_refptr<Fake> Create() {
- return new talk_base::RefCountedObject<Fake>();
+ static rtc::scoped_refptr<Fake> Create() {
+ return new rtc::RefCountedObject<Fake>();
}
MOCK_METHOD0(VoidMethod0, void());
@@ -92,21 +92,21 @@
public:
// Checks that the functions is called on the |signaling_thread_|.
void CheckThread() {
- EXPECT_EQ(talk_base::Thread::Current(), signaling_thread_.get());
+ EXPECT_EQ(rtc::Thread::Current(), signaling_thread_.get());
}
protected:
virtual void SetUp() {
- signaling_thread_.reset(new talk_base::Thread());
+ signaling_thread_.reset(new rtc::Thread());
ASSERT_TRUE(signaling_thread_->Start());
fake_ = Fake::Create();
fake_proxy_ = FakeProxy::Create(signaling_thread_.get(), fake_.get());
}
protected:
- talk_base::scoped_ptr<talk_base::Thread> signaling_thread_;
- talk_base::scoped_refptr<FakeInterface> fake_proxy_;
- talk_base::scoped_refptr<Fake> fake_;
+ rtc::scoped_ptr<rtc::Thread> signaling_thread_;
+ rtc::scoped_refptr<FakeInterface> fake_proxy_;
+ rtc::scoped_refptr<Fake> fake_;
};
TEST_F(ProxyTest, VoidMethod0) {
diff --git a/talk/app/webrtc/remoteaudiosource.cc b/talk/app/webrtc/remoteaudiosource.cc
index 1c275c7..955dff0 100644
--- a/talk/app/webrtc/remoteaudiosource.cc
+++ b/talk/app/webrtc/remoteaudiosource.cc
@@ -30,12 +30,12 @@
#include <algorithm>
#include <functional>
-#include "talk/base/logging.h"
+#include "webrtc/base/logging.h"
namespace webrtc {
-talk_base::scoped_refptr<RemoteAudioSource> RemoteAudioSource::Create() {
- return new talk_base::RefCountedObject<RemoteAudioSource>();
+rtc::scoped_refptr<RemoteAudioSource> RemoteAudioSource::Create() {
+ return new rtc::RefCountedObject<RemoteAudioSource>();
}
RemoteAudioSource::RemoteAudioSource() {
diff --git a/talk/app/webrtc/remoteaudiosource.h b/talk/app/webrtc/remoteaudiosource.h
index ed24214..e805af6 100644
--- a/talk/app/webrtc/remoteaudiosource.h
+++ b/talk/app/webrtc/remoteaudiosource.h
@@ -41,7 +41,7 @@
class RemoteAudioSource : public Notifier<AudioSourceInterface> {
public:
// Creates an instance of RemoteAudioSource.
- static talk_base::scoped_refptr<RemoteAudioSource> Create();
+ static rtc::scoped_refptr<RemoteAudioSource> Create();
protected:
RemoteAudioSource();
diff --git a/talk/app/webrtc/remotevideocapturer.cc b/talk/app/webrtc/remotevideocapturer.cc
index 072c8d8..a76a530 100644
--- a/talk/app/webrtc/remotevideocapturer.cc
+++ b/talk/app/webrtc/remotevideocapturer.cc
@@ -27,7 +27,7 @@
#include "talk/app/webrtc/remotevideocapturer.h"
-#include "talk/base/logging.h"
+#include "webrtc/base/logging.h"
#include "talk/media/base/videoframe.h"
namespace webrtc {
diff --git a/talk/app/webrtc/remotevideocapturer_unittest.cc b/talk/app/webrtc/remotevideocapturer_unittest.cc
index 6813550..d66ff01 100644
--- a/talk/app/webrtc/remotevideocapturer_unittest.cc
+++ b/talk/app/webrtc/remotevideocapturer_unittest.cc
@@ -28,7 +28,7 @@
#include <string>
#include "talk/app/webrtc/remotevideocapturer.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/gunit.h"
#include "talk/media/webrtc/webrtcvideoframe.h"
using cricket::CaptureState;
diff --git a/talk/app/webrtc/sctputils.cc b/talk/app/webrtc/sctputils.cc
index dcc6ba6..988f468 100644
--- a/talk/app/webrtc/sctputils.cc
+++ b/talk/app/webrtc/sctputils.cc
@@ -27,9 +27,9 @@
#include "talk/app/webrtc/sctputils.h"
-#include "talk/base/buffer.h"
-#include "talk/base/bytebuffer.h"
-#include "talk/base/logging.h"
+#include "webrtc/base/buffer.h"
+#include "webrtc/base/bytebuffer.h"
+#include "webrtc/base/logging.h"
namespace webrtc {
@@ -48,13 +48,13 @@
DCOMCT_UNORDERED_PARTIAL_TIME = 0x82,
};
-bool ParseDataChannelOpenMessage(const talk_base::Buffer& payload,
+bool ParseDataChannelOpenMessage(const rtc::Buffer& payload,
std::string* label,
DataChannelInit* config) {
// Format defined at
// http://tools.ietf.org/html/draft-jesup-rtcweb-data-protocol-04
- talk_base::ByteBuffer buffer(payload.data(), payload.length());
+ rtc::ByteBuffer buffer(payload.data(), payload.length());
uint8 message_type;
if (!buffer.ReadUInt8(&message_type)) {
@@ -125,8 +125,8 @@
return true;
}
-bool ParseDataChannelOpenAckMessage(const talk_base::Buffer& payload) {
- talk_base::ByteBuffer buffer(payload.data(), payload.length());
+bool ParseDataChannelOpenAckMessage(const rtc::Buffer& payload) {
+ rtc::ByteBuffer buffer(payload.data(), payload.length());
uint8 message_type;
if (!buffer.ReadUInt8(&message_type)) {
@@ -143,7 +143,7 @@
bool WriteDataChannelOpenMessage(const std::string& label,
const DataChannelInit& config,
- talk_base::Buffer* payload) {
+ rtc::Buffer* payload) {
// Format defined at
// http://tools.ietf.org/html/draft-ietf-rtcweb-data-protocol-00#section-6.1
uint8 channel_type = 0;
@@ -171,9 +171,9 @@
}
}
- talk_base::ByteBuffer buffer(
+ rtc::ByteBuffer buffer(
NULL, 20 + label.length() + config.protocol.length(),
- talk_base::ByteBuffer::ORDER_NETWORK);
+ rtc::ByteBuffer::ORDER_NETWORK);
buffer.WriteUInt8(DATA_CHANNEL_OPEN_MESSAGE_TYPE);
buffer.WriteUInt8(channel_type);
buffer.WriteUInt16(priority);
@@ -186,8 +186,8 @@
return true;
}
-void WriteDataChannelOpenAckMessage(talk_base::Buffer* payload) {
- talk_base::ByteBuffer buffer(talk_base::ByteBuffer::ORDER_NETWORK);
+void WriteDataChannelOpenAckMessage(rtc::Buffer* payload) {
+ rtc::ByteBuffer buffer(rtc::ByteBuffer::ORDER_NETWORK);
buffer.WriteUInt8(DATA_CHANNEL_OPEN_ACK_MESSAGE_TYPE);
payload->SetData(buffer.Data(), buffer.Length());
}
diff --git a/talk/app/webrtc/sctputils.h b/talk/app/webrtc/sctputils.h
index d0b4e9c..ab1818b 100644
--- a/talk/app/webrtc/sctputils.h
+++ b/talk/app/webrtc/sctputils.h
@@ -32,24 +32,24 @@
#include "talk/app/webrtc/datachannelinterface.h"
-namespace talk_base {
+namespace rtc {
class Buffer;
-} // namespace talk_base
+} // namespace rtc
namespace webrtc {
struct DataChannelInit;
-bool ParseDataChannelOpenMessage(const talk_base::Buffer& payload,
+bool ParseDataChannelOpenMessage(const rtc::Buffer& payload,
std::string* label,
DataChannelInit* config);
-bool ParseDataChannelOpenAckMessage(const talk_base::Buffer& payload);
+bool ParseDataChannelOpenAckMessage(const rtc::Buffer& payload);
bool WriteDataChannelOpenMessage(const std::string& label,
const DataChannelInit& config,
- talk_base::Buffer* payload);
+ rtc::Buffer* payload);
-void WriteDataChannelOpenAckMessage(talk_base::Buffer* payload);
+void WriteDataChannelOpenAckMessage(rtc::Buffer* payload);
} // namespace webrtc
#endif // TALK_APP_WEBRTC_SCTPUTILS_H_
diff --git a/talk/app/webrtc/sctputils_unittest.cc b/talk/app/webrtc/sctputils_unittest.cc
index 6a139a0..ec2c850 100644
--- a/talk/app/webrtc/sctputils_unittest.cc
+++ b/talk/app/webrtc/sctputils_unittest.cc
@@ -25,13 +25,13 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "talk/base/bytebuffer.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/bytebuffer.h"
+#include "webrtc/base/gunit.h"
#include "talk/app/webrtc/sctputils.h"
class SctpUtilsTest : public testing::Test {
public:
- void VerifyOpenMessageFormat(const talk_base::Buffer& packet,
+ void VerifyOpenMessageFormat(const rtc::Buffer& packet,
const std::string& label,
const webrtc::DataChannelInit& config) {
uint8 message_type;
@@ -41,7 +41,7 @@
uint16 label_length;
uint16 protocol_length;
- talk_base::ByteBuffer buffer(packet.data(), packet.length());
+ rtc::ByteBuffer buffer(packet.data(), packet.length());
ASSERT_TRUE(buffer.ReadUInt8(&message_type));
EXPECT_EQ(0x03, message_type);
@@ -84,7 +84,7 @@
std::string label = "abc";
config.protocol = "y";
- talk_base::Buffer packet;
+ rtc::Buffer packet;
ASSERT_TRUE(webrtc::WriteDataChannelOpenMessage(label, config, &packet));
VerifyOpenMessageFormat(packet, label, config);
@@ -108,7 +108,7 @@
config.maxRetransmitTime = 10;
config.protocol = "y";
- talk_base::Buffer packet;
+ rtc::Buffer packet;
ASSERT_TRUE(webrtc::WriteDataChannelOpenMessage(label, config, &packet));
VerifyOpenMessageFormat(packet, label, config);
@@ -131,7 +131,7 @@
config.maxRetransmits = 10;
config.protocol = "y";
- talk_base::Buffer packet;
+ rtc::Buffer packet;
ASSERT_TRUE(webrtc::WriteDataChannelOpenMessage(label, config, &packet));
VerifyOpenMessageFormat(packet, label, config);
@@ -149,11 +149,11 @@
}
TEST_F(SctpUtilsTest, WriteParseAckMessage) {
- talk_base::Buffer packet;
+ rtc::Buffer packet;
webrtc::WriteDataChannelOpenAckMessage(&packet);
uint8 message_type;
- talk_base::ByteBuffer buffer(packet.data(), packet.length());
+ rtc::ByteBuffer buffer(packet.data(), packet.length());
ASSERT_TRUE(buffer.ReadUInt8(&message_type));
EXPECT_EQ(0x02, message_type);
diff --git a/talk/app/webrtc/statscollector.cc b/talk/app/webrtc/statscollector.cc
index 94586fd..2b0b36a 100644
--- a/talk/app/webrtc/statscollector.cc
+++ b/talk/app/webrtc/statscollector.cc
@@ -30,9 +30,9 @@
#include <utility>
#include <vector>
-#include "talk/base/base64.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/timing.h"
+#include "webrtc/base/base64.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/timing.h"
#include "talk/session/media/channel.h"
namespace webrtc {
@@ -199,7 +199,7 @@
}
void StatsReport::AddValue(StatsReport::StatsValueName name, int64 value) {
- AddValue(name, talk_base::ToString<int64>(value));
+ AddValue(name, rtc::ToString<int64>(value));
}
template <typename T>
@@ -208,7 +208,7 @@
std::ostringstream oss;
oss << "[";
for (size_t i = 0; i < value.size(); ++i) {
- oss << talk_base::ToString<T>(value[i]);
+ oss << rtc::ToString<T>(value[i]);
if (i != value.size() - 1)
oss << ", ";
}
@@ -237,7 +237,7 @@
typedef std::map<std::string, StatsReport> StatsMap;
double GetTimeNow() {
- return talk_base::Timing::WallTimeNow() * talk_base::kNumMillisecsPerSec;
+ return rtc::Timing::WallTimeNow() * rtc::kNumMillisecsPerSec;
}
bool GetTransportIdFromProxy(const cricket::ProxyTransportMap& map,
@@ -325,7 +325,7 @@
report->AddValue(StatsReport::kStatsValueNameCurrentDelayMs,
info.delay_estimate_ms);
report->AddValue(StatsReport::kStatsValueNameExpandRate,
- talk_base::ToString<float>(info.expand_rate));
+ rtc::ToString<float>(info.expand_rate));
report->AddValue(StatsReport::kStatsValueNamePacketsReceived,
info.packets_rcvd);
report->AddValue(StatsReport::kStatsValueNamePacketsLost,
@@ -360,7 +360,7 @@
info.jitter_ms);
report->AddValue(StatsReport::kStatsValueNameRtt, info.rtt_ms);
report->AddValue(StatsReport::kStatsValueNameEchoCancellationQualityMin,
- talk_base::ToString<float>(info.aec_quality_min));
+ rtc::ToString<float>(info.aec_quality_min));
report->AddValue(StatsReport::kStatsValueNameEchoDelayMedian,
info.echo_delay_median_ms);
report->AddValue(StatsReport::kStatsValueNameEchoDelayStdDev,
@@ -671,7 +671,7 @@
uint32 ssrc,
const std::string& transport_id,
TrackDirection direction) {
- const std::string ssrc_id = talk_base::ToString<uint32>(ssrc);
+ const std::string ssrc_id = rtc::ToString<uint32>(ssrc);
StatsMap::iterator it = reports_.find(StatsId(
StatsReport::kStatsReportTypeSsrc, ssrc_id, direction));
@@ -714,7 +714,7 @@
uint32 ssrc,
const std::string& transport_id,
TrackDirection direction) {
- const std::string ssrc_id = talk_base::ToString<uint32>(ssrc);
+ const std::string ssrc_id = rtc::ToString<uint32>(ssrc);
StatsMap::iterator it = reports_.find(StatsId(
StatsReport::kStatsReportTypeRemoteSsrc, ssrc_id, direction));
@@ -751,7 +751,7 @@
}
std::string StatsCollector::AddOneCertificateReport(
- const talk_base::SSLCertificate* cert, const std::string& issuer_id) {
+ const rtc::SSLCertificate* cert, const std::string& issuer_id) {
// TODO(bemasc): Move this computation to a helper class that caches these
// values to reduce CPU use in GetStats. This will require adding a fast
// SSLCertificate::Equals() method to detect certificate changes.
@@ -760,8 +760,8 @@
if (!cert->GetSignatureDigestAlgorithm(&digest_algorithm))
return std::string();
- talk_base::scoped_ptr<talk_base::SSLFingerprint> ssl_fingerprint(
- talk_base::SSLFingerprint::Create(digest_algorithm, cert));
+ rtc::scoped_ptr<rtc::SSLFingerprint> ssl_fingerprint(
+ rtc::SSLFingerprint::Create(digest_algorithm, cert));
// SSLFingerprint::Create can fail if the algorithm returned by
// SSLCertificate::GetSignatureDigestAlgorithm is not supported by the
@@ -772,10 +772,10 @@
std::string fingerprint = ssl_fingerprint->GetRfc4572Fingerprint();
- talk_base::Buffer der_buffer;
+ rtc::Buffer der_buffer;
cert->ToDER(&der_buffer);
std::string der_base64;
- talk_base::Base64::EncodeFromArray(
+ rtc::Base64::EncodeFromArray(
der_buffer.data(), der_buffer.length(), &der_base64);
StatsReport report;
@@ -793,7 +793,7 @@
}
std::string StatsCollector::AddCertificateReports(
- const talk_base::SSLCertificate* cert) {
+ const rtc::SSLCertificate* cert) {
// Produces a chain of StatsReports representing this certificate and the rest
// of its chain, and adds those reports to |reports_|. The return value is
// the id of the leaf report. The provided cert must be non-null, so at least
@@ -802,14 +802,14 @@
ASSERT(cert != NULL);
std::string issuer_id;
- talk_base::scoped_ptr<talk_base::SSLCertChain> chain;
+ rtc::scoped_ptr<rtc::SSLCertChain> chain;
if (cert->GetChain(chain.accept())) {
// This loop runs in reverse, i.e. from root to leaf, so that each
// certificate's issuer's report ID is known before the child certificate's
// report is generated. The root certificate does not have an issuer ID
// value.
for (ptrdiff_t i = chain->GetSize() - 1; i >= 0; --i) {
- const talk_base::SSLCertificate& cert_i = chain->Get(i);
+ const rtc::SSLCertificate& cert_i = chain->Get(i);
issuer_id = AddOneCertificateReport(&cert_i, issuer_id);
}
}
@@ -849,14 +849,14 @@
cricket::Transport* transport =
session_->GetTransport(transport_iter->second.content_name);
- talk_base::scoped_ptr<talk_base::SSLIdentity> identity;
+ rtc::scoped_ptr<rtc::SSLIdentity> identity;
if (transport && transport->GetIdentity(identity.accept())) {
local_cert_report_id =
AddCertificateReports(&(identity->certificate()));
}
transport = session_->GetTransport(transport_iter->second.content_name);
- talk_base::scoped_ptr<talk_base::SSLCertificate> cert;
+ rtc::scoped_ptr<rtc::SSLCertificate> cert;
if (transport && transport->GetRemoteCertificate(cert.accept())) {
remote_cert_report_id = AddCertificateReports(cert.get());
}
@@ -1018,7 +1018,7 @@
it != local_audio_tracks_.end(); ++it) {
AudioTrackInterface* track = it->first;
uint32 ssrc = it->second;
- std::string ssrc_id = talk_base::ToString<uint32>(ssrc);
+ std::string ssrc_id = rtc::ToString<uint32>(ssrc);
StatsReport* report = GetReport(StatsReport::kStatsReportTypeSsrc,
ssrc_id,
kSending);
@@ -1051,10 +1051,10 @@
int signal_level = 0;
if (track->GetSignalLevel(&signal_level)) {
report->ReplaceValue(StatsReport::kStatsValueNameAudioInputLevel,
- talk_base::ToString<int>(signal_level));
+ rtc::ToString<int>(signal_level));
}
- talk_base::scoped_refptr<AudioProcessorInterface> audio_processor(
+ rtc::scoped_refptr<AudioProcessorInterface> audio_processor(
track->GetAudioProcessor());
if (audio_processor.get() == NULL)
return;
@@ -1064,16 +1064,16 @@
report->ReplaceValue(StatsReport::kStatsValueNameTypingNoiseState,
stats.typing_noise_detected ? "true" : "false");
report->ReplaceValue(StatsReport::kStatsValueNameEchoReturnLoss,
- talk_base::ToString<int>(stats.echo_return_loss));
+ rtc::ToString<int>(stats.echo_return_loss));
report->ReplaceValue(
StatsReport::kStatsValueNameEchoReturnLossEnhancement,
- talk_base::ToString<int>(stats.echo_return_loss_enhancement));
+ rtc::ToString<int>(stats.echo_return_loss_enhancement));
report->ReplaceValue(StatsReport::kStatsValueNameEchoDelayMedian,
- talk_base::ToString<int>(stats.echo_delay_median_ms));
+ rtc::ToString<int>(stats.echo_delay_median_ms));
report->ReplaceValue(StatsReport::kStatsValueNameEchoCancellationQualityMin,
- talk_base::ToString<float>(stats.aec_quality_min));
+ rtc::ToString<float>(stats.aec_quality_min));
report->ReplaceValue(StatsReport::kStatsValueNameEchoDelayStdDev,
- talk_base::ToString<int>(stats.echo_delay_std_ms));
+ rtc::ToString<int>(stats.echo_delay_std_ms));
}
bool StatsCollector::GetTrackIdBySsrc(uint32 ssrc, std::string* track_id,
diff --git a/talk/app/webrtc/statscollector.h b/talk/app/webrtc/statscollector.h
index a444da4..a039813 100644
--- a/talk/app/webrtc/statscollector.h
+++ b/talk/app/webrtc/statscollector.h
@@ -93,11 +93,11 @@
// Helper method for AddCertificateReports.
std::string AddOneCertificateReport(
- const talk_base::SSLCertificate* cert, const std::string& issuer_id);
+ const rtc::SSLCertificate* cert, const std::string& issuer_id);
// Adds a report for this certificate and every certificate in its chain, and
// returns the leaf certificate's report's ID.
- std::string AddCertificateReports(const talk_base::SSLCertificate* cert);
+ std::string AddCertificateReports(const rtc::SSLCertificate* cert);
void ExtractSessionInfo();
void ExtractVoiceInfo();
diff --git a/talk/app/webrtc/statscollector_unittest.cc b/talk/app/webrtc/statscollector_unittest.cc
index 72ba111..9441e2d 100644
--- a/talk/app/webrtc/statscollector_unittest.cc
+++ b/talk/app/webrtc/statscollector_unittest.cc
@@ -33,9 +33,9 @@
#include "talk/app/webrtc/mediastreaminterface.h"
#include "talk/app/webrtc/mediastreamtrack.h"
#include "talk/app/webrtc/videotrack.h"
-#include "talk/base/base64.h"
-#include "talk/base/fakesslidentity.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/base64.h"
+#include "webrtc/base/fakesslidentity.h"
+#include "webrtc/base/gunit.h"
#include "talk/media/base/fakemediaengine.h"
#include "talk/media/devices/fakedevicemanager.h"
#include "talk/p2p/base/fakesession.h"
@@ -75,8 +75,8 @@
class MockWebRtcSession : public webrtc::WebRtcSession {
public:
explicit MockWebRtcSession(cricket::ChannelManager* channel_manager)
- : WebRtcSession(channel_manager, talk_base::Thread::Current(),
- talk_base::Thread::Current(), NULL, NULL) {
+ : WebRtcSession(channel_manager, rtc::Thread::Current(),
+ rtc::Thread::Current(), NULL, NULL) {
}
MOCK_METHOD0(voice_channel, cricket::VoiceChannel*());
MOCK_METHOD0(video_channel, cricket::VideoChannel*());
@@ -126,7 +126,7 @@
public:
explicit FakeAudioTrack(const std::string& id)
: webrtc::MediaStreamTrack<webrtc::AudioTrackInterface>(id),
- processor_(new talk_base::RefCountedObject<FakeAudioProcessor>()) {}
+ processor_(new rtc::RefCountedObject<FakeAudioProcessor>()) {}
std::string kind() const OVERRIDE {
return "audio";
}
@@ -139,13 +139,13 @@
*level = 1;
return true;
}
- virtual talk_base::scoped_refptr<webrtc::AudioProcessorInterface>
+ virtual rtc::scoped_refptr<webrtc::AudioProcessorInterface>
GetAudioProcessor() OVERRIDE {
return processor_;
}
private:
- talk_base::scoped_refptr<FakeAudioProcessor> processor_;
+ rtc::scoped_refptr<FakeAudioProcessor> processor_;
};
bool GetValue(const StatsReport* report,
@@ -216,8 +216,8 @@
}
std::string DerToPem(const std::string& der) {
- return talk_base::SSLIdentity::DerToPem(
- talk_base::kPemTypeCertificate,
+ return rtc::SSLIdentity::DerToPem(
+ rtc::kPemTypeCertificate,
reinterpret_cast<const unsigned char*>(der.c_str()),
der.length());
}
@@ -241,8 +241,8 @@
std::string der_base64;
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameDer, &der_base64));
- std::string der = talk_base::Base64::Decode(der_base64,
- talk_base::Base64::DO_STRICT);
+ std::string der = rtc::Base64::Decode(der_base64,
+ rtc::Base64::DO_STRICT);
EXPECT_EQ(ders[i], der);
std::string fingerprint_algorithm;
@@ -251,7 +251,7 @@
StatsReport::kStatsValueNameFingerprintAlgorithm,
&fingerprint_algorithm));
// The digest algorithm for a FakeSSLCertificate is always SHA-1.
- std::string sha_1_str = talk_base::DIGEST_SHA_1;
+ std::string sha_1_str = rtc::DIGEST_SHA_1;
EXPECT_EQ(sha_1_str, fingerprint_algorithm);
std::string dummy_fingerprint; // Value is not checked.
@@ -274,50 +274,50 @@
std::string value_in_report;
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameAudioOutputLevel, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.audio_level), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(info.audio_level), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameBytesReceived, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int64>(info.bytes_rcvd), value_in_report);
+ EXPECT_EQ(rtc::ToString<int64>(info.bytes_rcvd), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameJitterReceived, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.jitter_ms), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(info.jitter_ms), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameJitterBufferMs, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.jitter_buffer_ms), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(info.jitter_buffer_ms), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNamePreferredJitterBufferMs,
&value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.jitter_buffer_preferred_ms),
+ EXPECT_EQ(rtc::ToString<int>(info.jitter_buffer_preferred_ms),
value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameCurrentDelayMs, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.delay_estimate_ms), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(info.delay_estimate_ms), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameExpandRate, &value_in_report));
- EXPECT_EQ(talk_base::ToString<float>(info.expand_rate), value_in_report);
+ EXPECT_EQ(rtc::ToString<float>(info.expand_rate), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNamePacketsReceived, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.packets_rcvd), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(info.packets_rcvd), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameDecodingCTSG, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.decoding_calls_to_silence_generator),
+ EXPECT_EQ(rtc::ToString<int>(info.decoding_calls_to_silence_generator),
value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameDecodingCTN, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.decoding_calls_to_neteq),
+ EXPECT_EQ(rtc::ToString<int>(info.decoding_calls_to_neteq),
value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameDecodingNormal, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.decoding_normal), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(info.decoding_normal), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameDecodingPLC, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.decoding_plc), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(info.decoding_plc), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameDecodingCNG, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.decoding_cng), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(info.decoding_cng), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameDecodingPLCCNG, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(info.decoding_plc_cng), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(info.decoding_plc_cng), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameCodecName, &value_in_report));
}
@@ -331,46 +331,46 @@
EXPECT_EQ(sinfo.codec_name, value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameBytesSent, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int64>(sinfo.bytes_sent), value_in_report);
+ EXPECT_EQ(rtc::ToString<int64>(sinfo.bytes_sent), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNamePacketsSent, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.packets_sent), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(sinfo.packets_sent), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNamePacketsLost, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.packets_lost), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(sinfo.packets_lost), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameRtt, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.rtt_ms), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(sinfo.rtt_ms), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameRtt, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.rtt_ms), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(sinfo.rtt_ms), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameJitterReceived, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.jitter_ms), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(sinfo.jitter_ms), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameEchoCancellationQualityMin,
&value_in_report));
- EXPECT_EQ(talk_base::ToString<float>(sinfo.aec_quality_min), value_in_report);
+ EXPECT_EQ(rtc::ToString<float>(sinfo.aec_quality_min), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameEchoDelayMedian, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.echo_delay_median_ms),
+ EXPECT_EQ(rtc::ToString<int>(sinfo.echo_delay_median_ms),
value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameEchoDelayStdDev, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.echo_delay_std_ms),
+ EXPECT_EQ(rtc::ToString<int>(sinfo.echo_delay_std_ms),
value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameEchoReturnLoss, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.echo_return_loss),
+ EXPECT_EQ(rtc::ToString<int>(sinfo.echo_return_loss),
value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameEchoReturnLossEnhancement,
&value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.echo_return_loss_enhancement),
+ EXPECT_EQ(rtc::ToString<int>(sinfo.echo_return_loss_enhancement),
value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameAudioInputLevel, &value_in_report));
- EXPECT_EQ(talk_base::ToString<int>(sinfo.audio_level), value_in_report);
+ EXPECT_EQ(rtc::ToString<int>(sinfo.audio_level), value_in_report);
EXPECT_TRUE(GetValue(
report, StatsReport::kStatsValueNameTypingNoiseState, &value_in_report));
std::string typing_detected = sinfo.typing_noise_detected ? "true" : "false";
@@ -437,7 +437,7 @@
channel_manager_(
new cricket::ChannelManager(media_engine_,
new cricket::FakeDeviceManager(),
- talk_base::Thread::Current())),
+ rtc::Thread::Current())),
session_(channel_manager_.get()) {
// By default, we ignore session GetStats calls.
EXPECT_CALL(session_, GetStats(_)).WillRepeatedly(Return(false));
@@ -481,7 +481,7 @@
if (stream_ == NULL)
stream_ = webrtc::MediaStream::Create("streamlabel");
- audio_track_ = new talk_base::RefCountedObject<FakeAudioTrack>(
+ audio_track_ = new rtc::RefCountedObject<FakeAudioTrack>(
kLocalTrackId);
stream_->AddTrack(audio_track_);
EXPECT_CALL(session_, GetLocalTrackIdBySsrc(kSsrcOfTrack, _))
@@ -493,7 +493,7 @@
if (stream_ == NULL)
stream_ = webrtc::MediaStream::Create("streamlabel");
- audio_track_ = new talk_base::RefCountedObject<FakeAudioTrack>(
+ audio_track_ = new rtc::RefCountedObject<FakeAudioTrack>(
kRemoteTrackId);
stream_->AddTrack(audio_track_);
EXPECT_CALL(session_, GetRemoteTrackIdBySsrc(kSsrcOfTrack, _))
@@ -546,7 +546,7 @@
EXPECT_EQ(audio_track->id(), track_id);
std::string ssrc_id = ExtractSsrcStatsValue(
*reports, StatsReport::kStatsValueNameSsrc);
- EXPECT_EQ(talk_base::ToString<uint32>(kSsrcOfTrack), ssrc_id);
+ EXPECT_EQ(rtc::ToString<uint32>(kSsrcOfTrack), ssrc_id);
// Verifies the values in the track report.
if (voice_sender_info) {
@@ -568,16 +568,16 @@
EXPECT_EQ(audio_track->id(), track_id);
ssrc_id = ExtractSsrcStatsValue(track_reports,
StatsReport::kStatsValueNameSsrc);
- EXPECT_EQ(talk_base::ToString<uint32>(kSsrcOfTrack), ssrc_id);
+ EXPECT_EQ(rtc::ToString<uint32>(kSsrcOfTrack), ssrc_id);
if (voice_sender_info)
VerifyVoiceSenderInfoReport(track_report, *voice_sender_info);
if (voice_receiver_info)
VerifyVoiceReceiverInfoReport(track_report, *voice_receiver_info);
}
- void TestCertificateReports(const talk_base::FakeSSLCertificate& local_cert,
+ void TestCertificateReports(const rtc::FakeSSLCertificate& local_cert,
const std::vector<std::string>& local_ders,
- const talk_base::FakeSSLCertificate& remote_cert,
+ const rtc::FakeSSLCertificate& remote_cert,
const std::vector<std::string>& remote_ders) {
webrtc::StatsCollector stats(&session_); // Implementation under test.
StatsReports reports; // returned values.
@@ -595,12 +595,12 @@
transport_stats;
// Fake certificates to report.
- talk_base::FakeSSLIdentity local_identity(local_cert);
- talk_base::scoped_ptr<talk_base::FakeSSLCertificate> remote_cert_copy(
+ rtc::FakeSSLIdentity local_identity(local_cert);
+ rtc::scoped_ptr<rtc::FakeSSLCertificate> remote_cert_copy(
remote_cert.GetReference());
// Fake transport object.
- talk_base::scoped_ptr<cricket::FakeTransport> transport(
+ rtc::scoped_ptr<cricket::FakeTransport> transport(
new cricket::FakeTransport(
session_.signaling_thread(),
session_.worker_thread(),
@@ -655,19 +655,19 @@
}
cricket::FakeMediaEngine* media_engine_;
- talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
+ rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
MockWebRtcSession session_;
cricket::SessionStats session_stats_;
- talk_base::scoped_refptr<webrtc::MediaStream> stream_;
- talk_base::scoped_refptr<webrtc::VideoTrack> track_;
- talk_base::scoped_refptr<FakeAudioTrack> audio_track_;
+ rtc::scoped_refptr<webrtc::MediaStream> stream_;
+ rtc::scoped_refptr<webrtc::VideoTrack> track_;
+ rtc::scoped_refptr<FakeAudioTrack> audio_track_;
};
// This test verifies that 64-bit counters are passed successfully.
TEST_F(StatsCollectorTest, BytesCounterHandles64Bits) {
webrtc::StatsCollector stats(&session_); // Implementation under test.
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
- cricket::VideoChannel video_channel(talk_base::Thread::Current(),
+ cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, "", false, NULL);
StatsReports reports; // returned values.
cricket::VideoSenderInfo video_sender_info;
@@ -700,7 +700,7 @@
TEST_F(StatsCollectorTest, BandwidthEstimationInfoIsReported) {
webrtc::StatsCollector stats(&session_); // Implementation under test.
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
- cricket::VideoChannel video_channel(talk_base::Thread::Current(),
+ cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, "", false, NULL);
StatsReports reports; // returned values.
cricket::VideoSenderInfo video_sender_info;
@@ -776,7 +776,7 @@
TEST_F(StatsCollectorTest, TrackObjectExistsWithoutUpdateStats) {
webrtc::StatsCollector stats(&session_); // Implementation under test.
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
- cricket::VideoChannel video_channel(talk_base::Thread::Current(),
+ cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, "", false, NULL);
AddOutgoingVideoTrackStats();
stats.AddStream(stream_);
@@ -800,7 +800,7 @@
TEST_F(StatsCollectorTest, TrackAndSsrcObjectExistAfterUpdateSsrcStats) {
webrtc::StatsCollector stats(&session_); // Implementation under test.
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
- cricket::VideoChannel video_channel(talk_base::Thread::Current(),
+ cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, "", false, NULL);
AddOutgoingVideoTrackStats();
stats.AddStream(stream_);
@@ -842,7 +842,7 @@
std::string ssrc_id = ExtractSsrcStatsValue(
reports, StatsReport::kStatsValueNameSsrc);
- EXPECT_EQ(talk_base::ToString<uint32>(kSsrcOfTrack), ssrc_id);
+ EXPECT_EQ(rtc::ToString<uint32>(kSsrcOfTrack), ssrc_id);
std::string track_id = ExtractSsrcStatsValue(
reports, StatsReport::kStatsValueNameTrackId);
@@ -859,7 +859,7 @@
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
// The content_name known by the video channel.
const std::string kVcName("vcname");
- cricket::VideoChannel video_channel(talk_base::Thread::Current(),
+ cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, kVcName, false, NULL);
AddOutgoingVideoTrackStats();
stats.AddStream(stream_);
@@ -905,7 +905,7 @@
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
// The content_name known by the video channel.
const std::string kVcName("vcname");
- cricket::VideoChannel video_channel(talk_base::Thread::Current(),
+ cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, kVcName, false, NULL);
AddOutgoingVideoTrackStats();
stats.AddStream(stream_);
@@ -931,7 +931,7 @@
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
// The content_name known by the video channel.
const std::string kVcName("vcname");
- cricket::VideoChannel video_channel(talk_base::Thread::Current(),
+ cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, kVcName, false, NULL);
AddOutgoingVideoTrackStats();
stats.AddStream(stream_);
@@ -974,7 +974,7 @@
TEST_F(StatsCollectorTest, ReportsFromRemoteTrack) {
webrtc::StatsCollector stats(&session_); // Implementation under test.
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
- cricket::VideoChannel video_channel(talk_base::Thread::Current(),
+ cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, "", false, NULL);
AddIncomingVideoTrackStats();
stats.AddStream(stream_);
@@ -1007,7 +1007,7 @@
std::string ssrc_id = ExtractSsrcStatsValue(
reports, StatsReport::kStatsValueNameSsrc);
- EXPECT_EQ(talk_base::ToString<uint32>(kSsrcOfTrack), ssrc_id);
+ EXPECT_EQ(rtc::ToString<uint32>(kSsrcOfTrack), ssrc_id);
std::string track_id = ExtractSsrcStatsValue(
reports, StatsReport::kStatsValueNameTrackId);
@@ -1024,7 +1024,7 @@
local_ders[2] = "some";
local_ders[3] = "der";
local_ders[4] = "values";
- talk_base::FakeSSLCertificate local_cert(DersToPems(local_ders));
+ rtc::FakeSSLCertificate local_cert(DersToPems(local_ders));
// Build remote certificate chain
std::vector<std::string> remote_ders(4);
@@ -1032,7 +1032,7 @@
remote_ders[1] = "non-";
remote_ders[2] = "intersecting";
remote_ders[3] = "set";
- talk_base::FakeSSLCertificate remote_cert(DersToPems(remote_ders));
+ rtc::FakeSSLCertificate remote_cert(DersToPems(remote_ders));
TestCertificateReports(local_cert, local_ders, remote_cert, remote_ders);
}
@@ -1042,11 +1042,11 @@
TEST_F(StatsCollectorTest, ChainlessCertificateReportsCreated) {
// Build local certificate.
std::string local_der = "This is the local der.";
- talk_base::FakeSSLCertificate local_cert(DerToPem(local_der));
+ rtc::FakeSSLCertificate local_cert(DerToPem(local_der));
// Build remote certificate.
std::string remote_der = "This is somebody else's der.";
- talk_base::FakeSSLCertificate remote_cert(DerToPem(remote_der));
+ rtc::FakeSSLCertificate remote_cert(DerToPem(remote_der));
TestCertificateReports(local_cert, std::vector<std::string>(1, local_der),
remote_cert, std::vector<std::string>(1, remote_der));
@@ -1117,7 +1117,7 @@
transport_stats;
// Fake transport object.
- talk_base::scoped_ptr<cricket::FakeTransport> transport(
+ rtc::scoped_ptr<cricket::FakeTransport> transport(
new cricket::FakeTransport(
session_.signaling_thread(),
session_.worker_thread(),
@@ -1155,11 +1155,11 @@
TEST_F(StatsCollectorTest, UnsupportedDigestIgnored) {
// Build a local certificate.
std::string local_der = "This is the local der.";
- talk_base::FakeSSLCertificate local_cert(DerToPem(local_der));
+ rtc::FakeSSLCertificate local_cert(DerToPem(local_der));
// Build a remote certificate with an unsupported digest algorithm.
std::string remote_der = "This is somebody else's der.";
- talk_base::FakeSSLCertificate remote_cert(DerToPem(remote_der));
+ rtc::FakeSSLCertificate remote_cert(DerToPem(remote_der));
remote_cert.set_digest_algorithm("foobar");
TestCertificateReports(local_cert, std::vector<std::string>(1, local_der),
@@ -1171,7 +1171,7 @@
TEST_F(StatsCollectorTest, StatsOutputLevelVerbose) {
webrtc::StatsCollector stats(&session_); // Implementation under test.
MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
- cricket::VideoChannel video_channel(talk_base::Thread::Current(),
+ cricket::VideoChannel video_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, "", false, NULL);
cricket::VideoMediaInfo stats_read;
@@ -1222,7 +1222,7 @@
MockVoiceMediaChannel* media_channel = new MockVoiceMediaChannel();
// The content_name known by the voice channel.
const std::string kVcName("vcname");
- cricket::VoiceChannel voice_channel(talk_base::Thread::Current(),
+ cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, kVcName, false);
AddOutgoingAudioTrackStats();
stats.AddStream(stream_);
@@ -1254,7 +1254,7 @@
MockVoiceMediaChannel* media_channel = new MockVoiceMediaChannel();
// The content_name known by the voice channel.
const std::string kVcName("vcname");
- cricket::VoiceChannel voice_channel(talk_base::Thread::Current(),
+ cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, kVcName, false);
AddIncomingAudioTrackStats();
stats.AddStream(stream_);
@@ -1280,7 +1280,7 @@
MockVoiceMediaChannel* media_channel = new MockVoiceMediaChannel();
// The content_name known by the voice channel.
const std::string kVcName("vcname");
- cricket::VoiceChannel voice_channel(talk_base::Thread::Current(),
+ cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, kVcName, false);
AddOutgoingAudioTrackStats();
stats.AddStream(stream_);
@@ -1319,7 +1319,7 @@
EXPECT_EQ(kLocalTrackId, track_id);
std::string ssrc_id = ExtractSsrcStatsValue(
reports, StatsReport::kStatsValueNameSsrc);
- EXPECT_EQ(talk_base::ToString<uint32>(kSsrcOfTrack), ssrc_id);
+ EXPECT_EQ(rtc::ToString<uint32>(kSsrcOfTrack), ssrc_id);
// Verifies the values in the track report, no value will be changed by the
// AudioTrackInterface::GetSignalValue() and
@@ -1337,7 +1337,7 @@
MockVoiceMediaChannel* media_channel = new MockVoiceMediaChannel();
// The content_name known by the voice channel.
const std::string kVcName("vcname");
- cricket::VoiceChannel voice_channel(talk_base::Thread::Current(),
+ cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, kVcName, false);
// Create a local stream with a local audio track and adds it to the stats.
@@ -1346,10 +1346,10 @@
stats.AddLocalAudioTrack(audio_track_.get(), kSsrcOfTrack);
// Create a remote stream with a remote audio track and adds it to the stats.
- talk_base::scoped_refptr<webrtc::MediaStream> remote_stream(
+ rtc::scoped_refptr<webrtc::MediaStream> remote_stream(
webrtc::MediaStream::Create("remotestreamlabel"));
- talk_base::scoped_refptr<FakeAudioTrack> remote_track(
- new talk_base::RefCountedObject<FakeAudioTrack>(kRemoteTrackId));
+ rtc::scoped_refptr<FakeAudioTrack> remote_track(
+ new rtc::RefCountedObject<FakeAudioTrack>(kRemoteTrackId));
EXPECT_CALL(session_, GetRemoteTrackIdBySsrc(kSsrcOfTrack, _))
.WillOnce(DoAll(SetArgPointee<1>(kRemoteTrackId), Return(true)));
remote_stream->AddTrack(remote_track);
@@ -1418,7 +1418,7 @@
MockVoiceMediaChannel* media_channel = new MockVoiceMediaChannel();
// The content_name known by the voice channel.
const std::string kVcName("vcname");
- cricket::VoiceChannel voice_channel(talk_base::Thread::Current(),
+ cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
media_engine_, media_channel, &session_, kVcName, false);
// Create a local stream with a local audio track and adds it to the stats.
@@ -1441,8 +1441,8 @@
// Create a new audio track and adds it to the stream and stats.
static const std::string kNewTrackId = "new_track_id";
- talk_base::scoped_refptr<FakeAudioTrack> new_audio_track(
- new talk_base::RefCountedObject<FakeAudioTrack>(kNewTrackId));
+ rtc::scoped_refptr<FakeAudioTrack> new_audio_track(
+ new rtc::RefCountedObject<FakeAudioTrack>(kNewTrackId));
EXPECT_CALL(session_, GetLocalTrackIdBySsrc(kSsrcOfTrack, _))
.WillOnce(DoAll(SetArgPointee<1>(kNewTrackId), Return(true)));
stream_->AddTrack(new_audio_track);
diff --git a/talk/app/webrtc/statstypes.h b/talk/app/webrtc/statstypes.h
index 828b9f5..2b1317a 100644
--- a/talk/app/webrtc/statstypes.h
+++ b/talk/app/webrtc/statstypes.h
@@ -34,8 +34,8 @@
#include <string>
#include <vector>
-#include "talk/base/basictypes.h"
-#include "talk/base/stringencode.h"
+#include "webrtc/base/basictypes.h"
+#include "webrtc/base/stringencode.h"
namespace webrtc {
diff --git a/talk/app/webrtc/streamcollection.h b/talk/app/webrtc/streamcollection.h
index 7796b42..0db59a3 100644
--- a/talk/app/webrtc/streamcollection.h
+++ b/talk/app/webrtc/streamcollection.h
@@ -38,16 +38,16 @@
// Implementation of StreamCollection.
class StreamCollection : public StreamCollectionInterface {
public:
- static talk_base::scoped_refptr<StreamCollection> Create() {
- talk_base::RefCountedObject<StreamCollection>* implementation =
- new talk_base::RefCountedObject<StreamCollection>();
+ static rtc::scoped_refptr<StreamCollection> Create() {
+ rtc::RefCountedObject<StreamCollection>* implementation =
+ new rtc::RefCountedObject<StreamCollection>();
return implementation;
}
- static talk_base::scoped_refptr<StreamCollection> Create(
+ static rtc::scoped_refptr<StreamCollection> Create(
StreamCollection* streams) {
- talk_base::RefCountedObject<StreamCollection>* implementation =
- new talk_base::RefCountedObject<StreamCollection>(streams);
+ rtc::RefCountedObject<StreamCollection>* implementation =
+ new rtc::RefCountedObject<StreamCollection>(streams);
return implementation;
}
@@ -115,7 +115,7 @@
explicit StreamCollection(StreamCollection* original)
: media_streams_(original->media_streams_) {
}
- typedef std::vector<talk_base::scoped_refptr<MediaStreamInterface> >
+ typedef std::vector<rtc::scoped_refptr<MediaStreamInterface> >
StreamVector;
StreamVector media_streams_;
};
diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule.cc b/talk/app/webrtc/test/fakeaudiocapturemodule.cc
index ec155cb..ff45f14 100644
--- a/talk/app/webrtc/test/fakeaudiocapturemodule.cc
+++ b/talk/app/webrtc/test/fakeaudiocapturemodule.cc
@@ -27,10 +27,10 @@
#include "talk/app/webrtc/test/fakeaudiocapturemodule.h"
-#include "talk/base/common.h"
-#include "talk/base/refcount.h"
-#include "talk/base/thread.h"
-#include "talk/base/timeutils.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/refcount.h"
+#include "webrtc/base/thread.h"
+#include "webrtc/base/timeutils.h"
// Audio sample value that is high enough that it doesn't occur naturally when
// frames are being faked. E.g. NetEq will not generate this large sample value
@@ -58,7 +58,7 @@
};
FakeAudioCaptureModule::FakeAudioCaptureModule(
- talk_base::Thread* process_thread)
+ rtc::Thread* process_thread)
: last_process_time_ms_(0),
audio_callback_(NULL),
recording_(false),
@@ -77,12 +77,12 @@
process_thread_->Send(this, MSG_STOP_PROCESS);
}
-talk_base::scoped_refptr<FakeAudioCaptureModule> FakeAudioCaptureModule::Create(
- talk_base::Thread* process_thread) {
+rtc::scoped_refptr<FakeAudioCaptureModule> FakeAudioCaptureModule::Create(
+ rtc::Thread* process_thread) {
if (process_thread == NULL) return NULL;
- talk_base::scoped_refptr<FakeAudioCaptureModule> capture_module(
- new talk_base::RefCountedObject<FakeAudioCaptureModule>(process_thread));
+ rtc::scoped_refptr<FakeAudioCaptureModule> capture_module(
+ new rtc::RefCountedObject<FakeAudioCaptureModule>(process_thread));
if (!capture_module->Initialize()) {
return NULL;
}
@@ -90,7 +90,7 @@
}
int FakeAudioCaptureModule::frames_received() const {
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
return frames_received_;
}
@@ -102,7 +102,7 @@
}
int32_t FakeAudioCaptureModule::TimeUntilNextProcess() {
- const uint32 current_time = talk_base::Time();
+ const uint32 current_time = rtc::Time();
if (current_time < last_process_time_ms_) {
// TODO: wraparound could be handled more gracefully.
return 0;
@@ -115,7 +115,7 @@
}
int32_t FakeAudioCaptureModule::Process() {
- last_process_time_ms_ = talk_base::Time();
+ last_process_time_ms_ = rtc::Time();
return 0;
}
@@ -144,7 +144,7 @@
int32_t FakeAudioCaptureModule::RegisterAudioCallback(
webrtc::AudioTransport* audio_callback) {
- talk_base::CritScope cs(&crit_callback_);
+ rtc::CritScope cs(&crit_callback_);
audio_callback_ = audio_callback;
return 0;
}
@@ -249,7 +249,7 @@
return -1;
}
{
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
playing_ = true;
}
bool start = true;
@@ -260,7 +260,7 @@
int32_t FakeAudioCaptureModule::StopPlayout() {
bool start = false;
{
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
playing_ = false;
start = ShouldStartProcessing();
}
@@ -269,7 +269,7 @@
}
bool FakeAudioCaptureModule::Playing() const {
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
return playing_;
}
@@ -278,7 +278,7 @@
return -1;
}
{
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
recording_ = true;
}
bool start = true;
@@ -289,7 +289,7 @@
int32_t FakeAudioCaptureModule::StopRecording() {
bool start = false;
{
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
recording_ = false;
start = ShouldStartProcessing();
}
@@ -298,7 +298,7 @@
}
bool FakeAudioCaptureModule::Recording() const {
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
return recording_;
}
@@ -397,13 +397,13 @@
}
int32_t FakeAudioCaptureModule::SetMicrophoneVolume(uint32_t volume) {
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
current_mic_level_ = volume;
return 0;
}
int32_t FakeAudioCaptureModule::MicrophoneVolume(uint32_t* volume) const {
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
*volume = current_mic_level_;
return 0;
}
@@ -617,7 +617,7 @@
return 0;
}
-void FakeAudioCaptureModule::OnMessage(talk_base::Message* msg) {
+void FakeAudioCaptureModule::OnMessage(rtc::Message* msg) {
switch (msg->message_id) {
case MSG_START_PROCESS:
StartProcessP();
@@ -641,7 +641,7 @@
// sent to it. Note that the audio processing pipeline will likely distort the
// original signal.
SetSendBuffer(kHighSampleValue);
- last_process_time_ms_ = talk_base::Time();
+ last_process_time_ms_ = rtc::Time();
return true;
}
@@ -681,7 +681,7 @@
}
void FakeAudioCaptureModule::StartProcessP() {
- ASSERT(talk_base::Thread::Current() == process_thread_);
+ ASSERT(rtc::Thread::Current() == process_thread_);
if (started_) {
// Already started.
return;
@@ -690,16 +690,16 @@
}
void FakeAudioCaptureModule::ProcessFrameP() {
- ASSERT(talk_base::Thread::Current() == process_thread_);
+ ASSERT(rtc::Thread::Current() == process_thread_);
if (!started_) {
- next_frame_time_ = talk_base::Time();
+ next_frame_time_ = rtc::Time();
started_ = true;
}
bool playing;
bool recording;
{
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
playing = playing_;
recording = recording_;
}
@@ -713,16 +713,16 @@
}
next_frame_time_ += kTimePerFrameMs;
- const uint32 current_time = talk_base::Time();
+ const uint32 current_time = rtc::Time();
const uint32 wait_time = (next_frame_time_ > current_time) ?
next_frame_time_ - current_time : 0;
process_thread_->PostDelayed(wait_time, this, MSG_RUN_PROCESS);
}
void FakeAudioCaptureModule::ReceiveFrameP() {
- ASSERT(talk_base::Thread::Current() == process_thread_);
+ ASSERT(rtc::Thread::Current() == process_thread_);
{
- talk_base::CritScope cs(&crit_callback_);
+ rtc::CritScope cs(&crit_callback_);
if (!audio_callback_) {
return;
}
@@ -753,14 +753,14 @@
// has been received from the remote side (i.e. faked frames are not being
// pulled).
if (CheckRecBuffer(kHighSampleValue)) {
- talk_base::CritScope cs(&crit_);
+ rtc::CritScope cs(&crit_);
++frames_received_;
}
}
void FakeAudioCaptureModule::SendFrameP() {
- ASSERT(talk_base::Thread::Current() == process_thread_);
- talk_base::CritScope cs(&crit_callback_);
+ ASSERT(rtc::Thread::Current() == process_thread_);
+ rtc::CritScope cs(&crit_callback_);
if (!audio_callback_) {
return;
}
@@ -780,7 +780,7 @@
}
void FakeAudioCaptureModule::StopProcessP() {
- ASSERT(talk_base::Thread::Current() == process_thread_);
+ ASSERT(rtc::Thread::Current() == process_thread_);
started_ = false;
process_thread_->Clear(this);
}
diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule.h b/talk/app/webrtc/test/fakeaudiocapturemodule.h
index 2267902..aec3e5e 100644
--- a/talk/app/webrtc/test/fakeaudiocapturemodule.h
+++ b/talk/app/webrtc/test/fakeaudiocapturemodule.h
@@ -37,22 +37,22 @@
#ifndef TALK_APP_WEBRTC_TEST_FAKEAUDIOCAPTUREMODULE_H_
#define TALK_APP_WEBRTC_TEST_FAKEAUDIOCAPTUREMODULE_H_
-#include "talk/base/basictypes.h"
-#include "talk/base/criticalsection.h"
-#include "talk/base/messagehandler.h"
-#include "talk/base/scoped_ref_ptr.h"
+#include "webrtc/base/basictypes.h"
+#include "webrtc/base/criticalsection.h"
+#include "webrtc/base/messagehandler.h"
+#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_device/include/audio_device.h"
-namespace talk_base {
+namespace rtc {
class Thread;
-} // namespace talk_base
+} // namespace rtc
class FakeAudioCaptureModule
: public webrtc::AudioDeviceModule,
- public talk_base::MessageHandler {
+ public rtc::MessageHandler {
public:
typedef uint16 Sample;
@@ -64,8 +64,8 @@
// Creates a FakeAudioCaptureModule or returns NULL on failure.
// |process_thread| is used to push and pull audio frames to and from the
// returned instance. Note: ownership of |process_thread| is not handed over.
- static talk_base::scoped_refptr<FakeAudioCaptureModule> Create(
- talk_base::Thread* process_thread);
+ static rtc::scoped_refptr<FakeAudioCaptureModule> Create(
+ rtc::Thread* process_thread);
// Returns the number of frames that have been successfully pulled by the
// instance. Note that correctly detecting success can only be done if the
@@ -201,8 +201,8 @@
virtual int32_t GetLoudspeakerStatus(bool* enabled) const;
// End of functions inherited from webrtc::AudioDeviceModule.
- // The following function is inherited from talk_base::MessageHandler.
- virtual void OnMessage(talk_base::Message* msg);
+ // The following function is inherited from rtc::MessageHandler.
+ virtual void OnMessage(rtc::Message* msg);
protected:
// The constructor is protected because the class needs to be created as a
@@ -210,7 +210,7 @@
// exposed in which case the burden of proper instantiation would be put on
// the creator of a FakeAudioCaptureModule instance. To create an instance of
// this class use the Create(..) API.
- explicit FakeAudioCaptureModule(talk_base::Thread* process_thread);
+ explicit FakeAudioCaptureModule(rtc::Thread* process_thread);
// The destructor is protected because it is reference counted and should not
// be deleted directly.
virtual ~FakeAudioCaptureModule();
@@ -271,7 +271,7 @@
uint32 next_frame_time_;
// User provided thread context.
- talk_base::Thread* process_thread_;
+ rtc::Thread* process_thread_;
// Buffer for storing samples received from the webrtc::AudioTransport.
char rec_buffer_[kNumberSamples * kNumberBytesPerSample];
@@ -285,10 +285,10 @@
// Protects variables that are accessed from process_thread_ and
// the main thread.
- mutable talk_base::CriticalSection crit_;
+ mutable rtc::CriticalSection crit_;
// Protects |audio_callback_| that is accessed from process_thread_ and
// the main thread.
- talk_base::CriticalSection crit_callback_;
+ rtc::CriticalSection crit_callback_;
};
#endif // TALK_APP_WEBRTC_TEST_FAKEAUDIOCAPTUREMODULE_H_
diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule_unittest.cc b/talk/app/webrtc/test/fakeaudiocapturemodule_unittest.cc
index bdd70f6..9e63c1c 100644
--- a/talk/app/webrtc/test/fakeaudiocapturemodule_unittest.cc
+++ b/talk/app/webrtc/test/fakeaudiocapturemodule_unittest.cc
@@ -29,9 +29,9 @@
#include <algorithm>
-#include "talk/base/gunit.h"
-#include "talk/base/scoped_ref_ptr.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/scoped_ref_ptr.h"
+#include "webrtc/base/thread.h"
using std::min;
@@ -49,7 +49,7 @@
virtual void SetUp() {
fake_audio_capture_module_ = FakeAudioCaptureModule::Create(
- talk_base::Thread::Current());
+ rtc::Thread::Current());
EXPECT_TRUE(fake_audio_capture_module_.get() != NULL);
}
@@ -109,7 +109,7 @@
int push_iterations() const { return push_iterations_; }
int pull_iterations() const { return pull_iterations_; }
- talk_base::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_;
+ rtc::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_;
private:
bool RecordedDataReceived() const {
diff --git a/talk/app/webrtc/test/fakeconstraints.h b/talk/app/webrtc/test/fakeconstraints.h
index b23007e..f1b7f77 100644
--- a/talk/app/webrtc/test/fakeconstraints.h
+++ b/talk/app/webrtc/test/fakeconstraints.h
@@ -32,7 +32,7 @@
#include <vector>
#include "talk/app/webrtc/mediaconstraintsinterface.h"
-#include "talk/base/stringencode.h"
+#include "webrtc/base/stringencode.h"
namespace webrtc {
@@ -51,7 +51,7 @@
template <class T>
void AddMandatory(const std::string& key, const T& value) {
- mandatory_.push_back(Constraint(key, talk_base::ToString<T>(value)));
+ mandatory_.push_back(Constraint(key, rtc::ToString<T>(value)));
}
template <class T>
@@ -66,12 +66,12 @@
}
}
}
- mandatory_.push_back(Constraint(key, talk_base::ToString<T>(value)));
+ mandatory_.push_back(Constraint(key, rtc::ToString<T>(value)));
}
template <class T>
void AddOptional(const std::string& key, const T& value) {
- optional_.push_back(Constraint(key, talk_base::ToString<T>(value)));
+ optional_.push_back(Constraint(key, rtc::ToString<T>(value)));
}
void SetMandatoryMinAspectRatio(double ratio) {
diff --git a/talk/app/webrtc/test/fakedatachannelprovider.h b/talk/app/webrtc/test/fakedatachannelprovider.h
index 5859cdb..2e71f94 100644
--- a/talk/app/webrtc/test/fakedatachannelprovider.h
+++ b/talk/app/webrtc/test/fakedatachannelprovider.h
@@ -37,7 +37,7 @@
virtual ~FakeDataChannelProvider() {}
virtual bool SendData(const cricket::SendDataParams& params,
- const talk_base::Buffer& payload,
+ const rtc::Buffer& payload,
cricket::SendDataResult* result) OVERRIDE {
ASSERT(ready_to_send_ && transport_available_);
if (send_blocked_) {
diff --git a/talk/app/webrtc/test/fakedtlsidentityservice.h b/talk/app/webrtc/test/fakedtlsidentityservice.h
index 0c1a2a0..57ffcf6 100644
--- a/talk/app/webrtc/test/fakedtlsidentityservice.h
+++ b/talk/app/webrtc/test/fakedtlsidentityservice.h
@@ -65,7 +65,7 @@
using webrtc::DTLSIdentityRequestObserver;
class FakeIdentityService : public webrtc::DTLSIdentityServiceInterface,
- public talk_base::MessageHandler {
+ public rtc::MessageHandler {
public:
struct Request {
Request(const std::string& common_name,
@@ -73,9 +73,9 @@
: common_name(common_name), observer(observer) {}
std::string common_name;
- talk_base::scoped_refptr<DTLSIdentityRequestObserver> observer;
+ rtc::scoped_refptr<DTLSIdentityRequestObserver> observer;
};
- typedef talk_base::TypedMessageData<Request> MessageData;
+ typedef rtc::TypedMessageData<Request> MessageData;
FakeIdentityService() : should_fail_(false) {}
@@ -89,9 +89,9 @@
DTLSIdentityRequestObserver* observer) {
MessageData* msg = new MessageData(Request(common_name, observer));
if (should_fail_) {
- talk_base::Thread::Current()->Post(this, MSG_FAILURE, msg);
+ rtc::Thread::Current()->Post(this, MSG_FAILURE, msg);
} else {
- talk_base::Thread::Current()->Post(this, MSG_SUCCESS, msg);
+ rtc::Thread::Current()->Post(this, MSG_SUCCESS, msg);
}
return true;
}
@@ -102,8 +102,8 @@
MSG_FAILURE,
};
- // talk_base::MessageHandler implementation.
- void OnMessage(talk_base::Message* msg) {
+ // rtc::MessageHandler implementation.
+ void OnMessage(rtc::Message* msg) {
FakeIdentityService::MessageData* message_data =
static_cast<FakeIdentityService::MessageData*>(msg->pdata);
DTLSIdentityRequestObserver* observer = message_data->data().observer.get();
@@ -125,8 +125,8 @@
const std::string& common_name,
std::string* der_cert,
std::string* der_key) {
- talk_base::SSLIdentity::PemToDer("CERTIFICATE", kCERT_PEM, der_cert);
- talk_base::SSLIdentity::PemToDer("RSA PRIVATE KEY",
+ rtc::SSLIdentity::PemToDer("CERTIFICATE", kCERT_PEM, der_cert);
+ rtc::SSLIdentity::PemToDer("RSA PRIVATE KEY",
kRSA_PRIVATE_KEY_PEM,
der_key);
}
diff --git a/talk/app/webrtc/test/fakemediastreamsignaling.h b/talk/app/webrtc/test/fakemediastreamsignaling.h
index c7b30aa..bd12549 100644
--- a/talk/app/webrtc/test/fakemediastreamsignaling.h
+++ b/talk/app/webrtc/test/fakemediastreamsignaling.h
@@ -45,7 +45,7 @@
public webrtc::MediaStreamSignalingObserver {
public:
explicit FakeMediaStreamSignaling(cricket::ChannelManager* channel_manager) :
- webrtc::MediaStreamSignaling(talk_base::Thread::Current(), this,
+ webrtc::MediaStreamSignaling(rtc::Thread::Current(), this,
channel_manager) {
}
@@ -133,21 +133,21 @@
}
private:
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> CreateStream(
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> CreateStream(
const std::string& stream_label,
const std::string& audio_track_id,
const std::string& video_track_id) {
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream(
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> stream(
webrtc::MediaStream::Create(stream_label));
if (!audio_track_id.empty()) {
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
webrtc::AudioTrack::Create(audio_track_id, NULL));
stream->AddTrack(audio_track);
}
if (!video_track_id.empty()) {
- talk_base::scoped_refptr<webrtc::VideoTrackInterface> video_track(
+ rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
webrtc::VideoTrack::Create(video_track_id, NULL));
stream->AddTrack(video_track);
}
diff --git a/talk/app/webrtc/test/fakeperiodicvideocapturer.h b/talk/app/webrtc/test/fakeperiodicvideocapturer.h
index 7f70ae2..3538840 100644
--- a/talk/app/webrtc/test/fakeperiodicvideocapturer.h
+++ b/talk/app/webrtc/test/fakeperiodicvideocapturer.h
@@ -31,7 +31,7 @@
#ifndef TALK_APP_WEBRTC_TEST_FAKEPERIODICVIDEOCAPTURER_H_
#define TALK_APP_WEBRTC_TEST_FAKEPERIODICVIDEOCAPTURER_H_
-#include "talk/base/thread.h"
+#include "webrtc/base/thread.h"
#include "talk/media/base/fakevideocapturer.h"
namespace webrtc {
@@ -56,20 +56,20 @@
virtual cricket::CaptureState Start(const cricket::VideoFormat& format) {
cricket::CaptureState state = FakeVideoCapturer::Start(format);
if (state != cricket::CS_FAILED) {
- talk_base::Thread::Current()->Post(this, MSG_CREATEFRAME);
+ rtc::Thread::Current()->Post(this, MSG_CREATEFRAME);
}
return state;
}
virtual void Stop() {
- talk_base::Thread::Current()->Clear(this);
+ rtc::Thread::Current()->Clear(this);
}
// Inherited from MesageHandler.
- virtual void OnMessage(talk_base::Message* msg) {
+ virtual void OnMessage(rtc::Message* msg) {
if (msg->message_id == MSG_CREATEFRAME) {
if (IsRunning()) {
CaptureFrame();
- talk_base::Thread::Current()->PostDelayed(static_cast<int>(
- GetCaptureFormat()->interval / talk_base::kNumNanosecsPerMillisec),
+ rtc::Thread::Current()->PostDelayed(static_cast<int>(
+ GetCaptureFormat()->interval / rtc::kNumNanosecsPerMillisec),
this, MSG_CREATEFRAME);
}
} else {
diff --git a/talk/app/webrtc/test/fakevideotrackrenderer.h b/talk/app/webrtc/test/fakevideotrackrenderer.h
index 0030a0c..5cb67a3 100644
--- a/talk/app/webrtc/test/fakevideotrackrenderer.h
+++ b/talk/app/webrtc/test/fakevideotrackrenderer.h
@@ -62,7 +62,7 @@
private:
cricket::FakeVideoRenderer fake_renderer_;
- talk_base::scoped_refptr<VideoTrackInterface> video_track_;
+ rtc::scoped_refptr<VideoTrackInterface> video_track_;
};
} // namespace webrtc
diff --git a/talk/app/webrtc/test/mockpeerconnectionobservers.h b/talk/app/webrtc/test/mockpeerconnectionobservers.h
index 3ae2162..884c7a8 100644
--- a/talk/app/webrtc/test/mockpeerconnectionobservers.h
+++ b/talk/app/webrtc/test/mockpeerconnectionobservers.h
@@ -61,7 +61,7 @@
private:
bool called_;
bool result_;
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_;
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_;
};
class MockSetSessionDescriptionObserver
@@ -109,7 +109,7 @@
size_t received_message_count() const { return received_message_count_; }
private:
- talk_base::scoped_refptr<webrtc::DataChannelInterface> channel_;
+ rtc::scoped_refptr<webrtc::DataChannelInterface> channel_;
DataChannelInterface::DataState state_;
std::string last_message_;
size_t received_message_count_;
@@ -159,7 +159,7 @@
reports_[i].values.begin();
for (; it != reports_[i].values.end(); ++it) {
if (it->name == name) {
- return talk_base::FromString<int>(it->value);
+ return rtc::FromString<int>(it->value);
}
}
}
diff --git a/talk/app/webrtc/test/peerconnectiontestwrapper.cc b/talk/app/webrtc/test/peerconnectiontestwrapper.cc
index be70969..8a4f45c 100644
--- a/talk/app/webrtc/test/peerconnectiontestwrapper.cc
+++ b/talk/app/webrtc/test/peerconnectiontestwrapper.cc
@@ -31,7 +31,7 @@
#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
#include "talk/app/webrtc/test/peerconnectiontestwrapper.h"
#include "talk/app/webrtc/videosourceinterface.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/gunit.h"
static const char kStreamLabelBase[] = "stream_label";
static const char kVideoTrackLabelBase[] = "video_track";
@@ -83,7 +83,7 @@
}
peer_connection_factory_ = webrtc::CreatePeerConnectionFactory(
- talk_base::Thread::Current(), talk_base::Thread::Current(),
+ rtc::Thread::Current(), rtc::Thread::Current(),
fake_audio_capture_module_, NULL, NULL);
if (!peer_connection_factory_) {
return false;
@@ -95,7 +95,7 @@
ice_server.uri = "stun:stun.l.google.com:19302";
ice_servers.push_back(ice_server);
FakeIdentityService* dtls_service =
- talk_base::SSLStreamAdapter::HaveDtlsSrtp() ?
+ rtc::SSLStreamAdapter::HaveDtlsSrtp() ?
new FakeIdentityService() : NULL;
peer_connection_ = peer_connection_factory_->CreatePeerConnection(
ice_servers, constraints, allocator_factory_.get(), dtls_service, this);
@@ -103,7 +103,7 @@
return peer_connection_.get() != NULL;
}
-talk_base::scoped_refptr<webrtc::DataChannelInterface>
+rtc::scoped_refptr<webrtc::DataChannelInterface>
PeerConnectionTestWrapper::CreateDataChannel(
const std::string& label,
const webrtc::DataChannelInit& init) {
@@ -136,7 +136,7 @@
void PeerConnectionTestWrapper::OnSuccess(SessionDescriptionInterface* desc) {
// This callback should take the ownership of |desc|.
- talk_base::scoped_ptr<SessionDescriptionInterface> owned_desc(desc);
+ rtc::scoped_ptr<SessionDescriptionInterface> owned_desc(desc);
std::string sdp;
EXPECT_TRUE(desc->ToString(&sdp));
@@ -179,8 +179,8 @@
LOG(LS_INFO) << "PeerConnectionTestWrapper " << name_
<< ": SetLocalDescription " << type << " " << sdp;
- talk_base::scoped_refptr<MockSetSessionDescriptionObserver>
- observer(new talk_base::RefCountedObject<
+ rtc::scoped_refptr<MockSetSessionDescriptionObserver>
+ observer(new rtc::RefCountedObject<
MockSetSessionDescriptionObserver>());
peer_connection_->SetLocalDescription(
observer, webrtc::CreateSessionDescription(type, sdp, NULL));
@@ -191,8 +191,8 @@
LOG(LS_INFO) << "PeerConnectionTestWrapper " << name_
<< ": SetRemoteDescription " << type << " " << sdp;
- talk_base::scoped_refptr<MockSetSessionDescriptionObserver>
- observer(new talk_base::RefCountedObject<
+ rtc::scoped_refptr<MockSetSessionDescriptionObserver>
+ observer(new rtc::RefCountedObject<
MockSetSessionDescriptionObserver>());
peer_connection_->SetRemoteDescription(
observer, webrtc::CreateSessionDescription(type, sdp, NULL));
@@ -201,7 +201,7 @@
void PeerConnectionTestWrapper::AddIceCandidate(const std::string& sdp_mid,
int sdp_mline_index,
const std::string& candidate) {
- talk_base::scoped_ptr<webrtc::IceCandidateInterface> owned_candidate(
+ rtc::scoped_ptr<webrtc::IceCandidateInterface> owned_candidate(
webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, candidate, NULL));
EXPECT_TRUE(peer_connection_->AddIceCandidate(owned_candidate.get()));
}
@@ -252,19 +252,19 @@
void PeerConnectionTestWrapper::GetAndAddUserMedia(
bool audio, const webrtc::FakeConstraints& audio_constraints,
bool video, const webrtc::FakeConstraints& video_constraints) {
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream =
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> stream =
GetUserMedia(audio, audio_constraints, video, video_constraints);
EXPECT_TRUE(peer_connection_->AddStream(stream, NULL));
}
-talk_base::scoped_refptr<webrtc::MediaStreamInterface>
+rtc::scoped_refptr<webrtc::MediaStreamInterface>
PeerConnectionTestWrapper::GetUserMedia(
bool audio, const webrtc::FakeConstraints& audio_constraints,
bool video, const webrtc::FakeConstraints& video_constraints) {
std::string label = kStreamLabelBase +
- talk_base::ToString<int>(
+ rtc::ToString<int>(
static_cast<int>(peer_connection_->local_streams()->count()));
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream =
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> stream =
peer_connection_factory_->CreateLocalMediaStream(label);
if (audio) {
@@ -272,9 +272,9 @@
// Disable highpass filter so that we can get all the test audio frames.
constraints.AddMandatory(
MediaConstraintsInterface::kHighpassFilter, false);
- talk_base::scoped_refptr<webrtc::AudioSourceInterface> source =
+ rtc::scoped_refptr<webrtc::AudioSourceInterface> source =
peer_connection_factory_->CreateAudioSource(&constraints);
- talk_base::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
+ rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
peer_connection_factory_->CreateAudioTrack(kAudioTrackLabelBase,
source));
stream->AddTrack(audio_track);
@@ -285,11 +285,11 @@
FakeConstraints constraints = video_constraints;
constraints.SetMandatoryMaxFrameRate(10);
- talk_base::scoped_refptr<webrtc::VideoSourceInterface> source =
+ rtc::scoped_refptr<webrtc::VideoSourceInterface> source =
peer_connection_factory_->CreateVideoSource(
new webrtc::FakePeriodicVideoCapturer(), &constraints);
std::string videotrack_label = label + kVideoTrackLabelBase;
- talk_base::scoped_refptr<webrtc::VideoTrackInterface> video_track(
+ rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
peer_connection_factory_->CreateVideoTrack(videotrack_label, source));
stream->AddTrack(video_track);
diff --git a/talk/app/webrtc/test/peerconnectiontestwrapper.h b/talk/app/webrtc/test/peerconnectiontestwrapper.h
index 05e9b62..f3477ce 100644
--- a/talk/app/webrtc/test/peerconnectiontestwrapper.h
+++ b/talk/app/webrtc/test/peerconnectiontestwrapper.h
@@ -32,8 +32,8 @@
#include "talk/app/webrtc/test/fakeaudiocapturemodule.h"
#include "talk/app/webrtc/test/fakeconstraints.h"
#include "talk/app/webrtc/test/fakevideotrackrenderer.h"
-#include "talk/base/sigslot.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/sigslot.h"
+#include "webrtc/base/thread.h"
namespace webrtc {
class PortAllocatorFactoryInterface;
@@ -52,7 +52,7 @@
bool CreatePc(const webrtc::MediaConstraintsInterface* constraints);
- talk_base::scoped_refptr<webrtc::DataChannelInterface> CreateDataChannel(
+ rtc::scoped_refptr<webrtc::DataChannelInterface> CreateDataChannel(
const std::string& label,
const webrtc::DataChannelInit& init);
@@ -106,19 +106,19 @@
bool CheckForConnection();
bool CheckForAudio();
bool CheckForVideo();
- talk_base::scoped_refptr<webrtc::MediaStreamInterface> GetUserMedia(
+ rtc::scoped_refptr<webrtc::MediaStreamInterface> GetUserMedia(
bool audio, const webrtc::FakeConstraints& audio_constraints,
bool video, const webrtc::FakeConstraints& video_constraints);
std::string name_;
- talk_base::Thread audio_thread_;
- talk_base::scoped_refptr<webrtc::PortAllocatorFactoryInterface>
+ rtc::Thread audio_thread_;
+ rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface>
allocator_factory_;
- talk_base::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_;
- talk_base::scoped_refptr<webrtc::PeerConnectionFactoryInterface>
+ rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_;
+ rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface>
peer_connection_factory_;
- talk_base::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_;
- talk_base::scoped_ptr<webrtc::FakeVideoTrackRenderer> renderer_;
+ rtc::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_;
+ rtc::scoped_ptr<webrtc::FakeVideoTrackRenderer> renderer_;
};
#endif // TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_
diff --git a/talk/app/webrtc/videosource.cc b/talk/app/webrtc/videosource.cc
index eb4ab97..8770e6d 100644
--- a/talk/app/webrtc/videosource.cc
+++ b/talk/app/webrtc/videosource.cc
@@ -93,10 +93,10 @@
const MediaConstraintsInterface::Constraint& constraint,
cricket::VideoFormat* format_upper_limit) {
if (constraint.key == MediaConstraintsInterface::kMaxWidth) {
- int value = talk_base::FromString<int>(constraint.value);
+ int value = rtc::FromString<int>(constraint.value);
SetUpperLimit(value, &(format_upper_limit->width));
} else if (constraint.key == MediaConstraintsInterface::kMaxHeight) {
- int value = talk_base::FromString<int>(constraint.value);
+ int value = rtc::FromString<int>(constraint.value);
SetUpperLimit(value, &(format_upper_limit->height));
}
}
@@ -131,22 +131,22 @@
*format_out = format_in;
if (constraint.key == MediaConstraintsInterface::kMinWidth) {
- int value = talk_base::FromString<int>(constraint.value);
+ int value = rtc::FromString<int>(constraint.value);
return (value <= format_in.width);
} else if (constraint.key == MediaConstraintsInterface::kMaxWidth) {
- int value = talk_base::FromString<int>(constraint.value);
+ int value = rtc::FromString<int>(constraint.value);
return (value >= format_in.width);
} else if (constraint.key == MediaConstraintsInterface::kMinHeight) {
- int value = talk_base::FromString<int>(constraint.value);
+ int value = rtc::FromString<int>(constraint.value);
return (value <= format_in.height);
} else if (constraint.key == MediaConstraintsInterface::kMaxHeight) {
- int value = talk_base::FromString<int>(constraint.value);
+ int value = rtc::FromString<int>(constraint.value);
return (value >= format_in.height);
} else if (constraint.key == MediaConstraintsInterface::kMinFrameRate) {
- int value = talk_base::FromString<int>(constraint.value);
+ int value = rtc::FromString<int>(constraint.value);
return (value <= cricket::VideoFormat::IntervalToFps(format_in.interval));
} else if (constraint.key == MediaConstraintsInterface::kMaxFrameRate) {
- int value = talk_base::FromString<int>(constraint.value);
+ int value = rtc::FromString<int>(constraint.value);
if (value == 0) {
if (mandatory) {
// TODO(ronghuawu): Convert the constraint value to float when sub-1fps
@@ -163,7 +163,7 @@
return false;
}
} else if (constraint.key == MediaConstraintsInterface::kMinAspectRatio) {
- double value = talk_base::FromString<double>(constraint.value);
+ double value = rtc::FromString<double>(constraint.value);
// The aspect ratio in |constraint.value| has been converted to a string and
// back to a double, so it may have a rounding error.
// E.g if the value 1/3 is converted to a string, the string will not have
@@ -173,7 +173,7 @@
double ratio = static_cast<double>(format_in.width) / format_in.height;
return (value <= ratio + kRoundingTruncation);
} else if (constraint.key == MediaConstraintsInterface::kMaxAspectRatio) {
- double value = talk_base::FromString<double>(constraint.value);
+ double value = rtc::FromString<double>(constraint.value);
double ratio = static_cast<double>(format_in.width) / format_in.height;
// Subtract 0.0005 to avoid rounding problems. Same as above.
const double kRoundingTruncation = 0.0005;
@@ -337,14 +337,14 @@
namespace webrtc {
-talk_base::scoped_refptr<VideoSource> VideoSource::Create(
+rtc::scoped_refptr<VideoSource> VideoSource::Create(
cricket::ChannelManager* channel_manager,
cricket::VideoCapturer* capturer,
const webrtc::MediaConstraintsInterface* constraints) {
ASSERT(channel_manager != NULL);
ASSERT(capturer != NULL);
- talk_base::scoped_refptr<VideoSource> source(
- new talk_base::RefCountedObject<VideoSource>(channel_manager,
+ rtc::scoped_refptr<VideoSource> source(
+ new rtc::RefCountedObject<VideoSource>(channel_manager,
capturer));
source->Initialize(constraints);
return source;
diff --git a/talk/app/webrtc/videosource.h b/talk/app/webrtc/videosource.h
index f58b479..e690a5d 100644
--- a/talk/app/webrtc/videosource.h
+++ b/talk/app/webrtc/videosource.h
@@ -32,8 +32,8 @@
#include "talk/app/webrtc/notifier.h"
#include "talk/app/webrtc/videosourceinterface.h"
#include "talk/app/webrtc/videotrackrenderers.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/sigslot.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/sigslot.h"
#include "talk/media/base/videocapturer.h"
#include "talk/media/base/videocommon.h"
@@ -61,7 +61,7 @@
// VideoSource take ownership of |capturer|.
// |constraints| can be NULL and in that case the camera is opened using a
// default resolution.
- static talk_base::scoped_refptr<VideoSource> Create(
+ static rtc::scoped_refptr<VideoSource> Create(
cricket::ChannelManager* channel_manager,
cricket::VideoCapturer* capturer,
const webrtc::MediaConstraintsInterface* constraints);
@@ -90,8 +90,8 @@
void SetState(SourceState new_state);
cricket::ChannelManager* channel_manager_;
- talk_base::scoped_ptr<cricket::VideoCapturer> video_capturer_;
- talk_base::scoped_ptr<cricket::VideoRenderer> frame_input_;
+ rtc::scoped_ptr<cricket::VideoCapturer> video_capturer_;
+ rtc::scoped_ptr<cricket::VideoRenderer> frame_input_;
cricket::VideoFormat format_;
cricket::VideoOptions options_;
diff --git a/talk/app/webrtc/videosource_unittest.cc b/talk/app/webrtc/videosource_unittest.cc
index 4381176..38b4afa 100644
--- a/talk/app/webrtc/videosource_unittest.cc
+++ b/talk/app/webrtc/videosource_unittest.cc
@@ -31,7 +31,7 @@
#include "talk/app/webrtc/test/fakeconstraints.h"
#include "talk/app/webrtc/remotevideocapturer.h"
#include "talk/app/webrtc/videosource.h"
-#include "talk/base/gunit.h"
+#include "webrtc/base/gunit.h"
#include "talk/media/base/fakemediaengine.h"
#include "talk/media/base/fakevideorenderer.h"
#include "talk/media/devices/fakedevicemanager.h"
@@ -121,7 +121,7 @@
private:
MediaSourceInterface::SourceState state_;
- talk_base::scoped_refptr<VideoSourceInterface> source_;
+ rtc::scoped_refptr<VideoSourceInterface> source_;
};
class VideoSourceTest : public testing::Test {
@@ -131,7 +131,7 @@
capturer_(capturer_cleanup_.get()),
channel_manager_(new cricket::ChannelManager(
new cricket::FakeMediaEngine(),
- new cricket::FakeDeviceManager(), talk_base::Thread::Current())) {
+ new cricket::FakeDeviceManager(), rtc::Thread::Current())) {
}
void SetUp() {
@@ -157,12 +157,12 @@
source_->AddSink(&renderer_);
}
- talk_base::scoped_ptr<TestVideoCapturer> capturer_cleanup_;
+ rtc::scoped_ptr<TestVideoCapturer> capturer_cleanup_;
TestVideoCapturer* capturer_;
cricket::FakeVideoRenderer renderer_;
- talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
- talk_base::scoped_ptr<StateObserver> state_observer_;
- talk_base::scoped_refptr<VideoSource> source_;
+ rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
+ rtc::scoped_ptr<StateObserver> state_observer_;
+ rtc::scoped_refptr<VideoSource> source_;
};
diff --git a/talk/app/webrtc/videotrack.cc b/talk/app/webrtc/videotrack.cc
index 7ab7815..8c244a6 100644
--- a/talk/app/webrtc/videotrack.cc
+++ b/talk/app/webrtc/videotrack.cc
@@ -64,10 +64,10 @@
return MediaStreamTrack<VideoTrackInterface>::set_enabled(enable);
}
-talk_base::scoped_refptr<VideoTrack> VideoTrack::Create(
+rtc::scoped_refptr<VideoTrack> VideoTrack::Create(
const std::string& id, VideoSourceInterface* source) {
- talk_base::RefCountedObject<VideoTrack>* track =
- new talk_base::RefCountedObject<VideoTrack>(id, source);
+ rtc::RefCountedObject<VideoTrack>* track =
+ new rtc::RefCountedObject<VideoTrack>(id, source);
return track;
}
diff --git a/talk/app/webrtc/videotrack.h b/talk/app/webrtc/videotrack.h
index acd1b75..40a38f2 100644
--- a/talk/app/webrtc/videotrack.h
+++ b/talk/app/webrtc/videotrack.h
@@ -33,13 +33,13 @@
#include "talk/app/webrtc/mediastreamtrack.h"
#include "talk/app/webrtc/videosourceinterface.h"
#include "talk/app/webrtc/videotrackrenderers.h"
-#include "talk/base/scoped_ref_ptr.h"
+#include "webrtc/base/scoped_ref_ptr.h"
namespace webrtc {
class VideoTrack : public MediaStreamTrack<VideoTrackInterface> {
public:
- static talk_base::scoped_refptr<VideoTrack> Create(
+ static rtc::scoped_refptr<VideoTrack> Create(
const std::string& label, VideoSourceInterface* source);
virtual void AddRenderer(VideoRendererInterface* renderer);
@@ -56,7 +56,7 @@
private:
VideoTrackRenderers renderers_;
- talk_base::scoped_refptr<VideoSourceInterface> video_source_;
+ rtc::scoped_refptr<VideoSourceInterface> video_source_;
};
} // namespace webrtc
diff --git a/talk/app/webrtc/videotrack_unittest.cc b/talk/app/webrtc/videotrack_unittest.cc
index 4a30293..57b883d 100644
--- a/talk/app/webrtc/videotrack_unittest.cc
+++ b/talk/app/webrtc/videotrack_unittest.cc
@@ -31,8 +31,8 @@
#include "talk/app/webrtc/remotevideocapturer.h"
#include "talk/app/webrtc/videosource.h"
#include "talk/app/webrtc/videotrack.h"
-#include "talk/base/gunit.h"
-#include "talk/base/scoped_ptr.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/scoped_ptr.h"
#include "talk/media/base/fakemediaengine.h"
#include "talk/media/devices/fakedevicemanager.h"
#include "talk/media/webrtc/webrtcvideoframe.h"
@@ -48,19 +48,19 @@
TEST(VideoTrack, RenderVideo) {
static const char kVideoTrackId[] = "track_id";
- talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
+ rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
channel_manager_.reset(
new cricket::ChannelManager(new cricket::FakeMediaEngine(),
new cricket::FakeDeviceManager(),
- talk_base::Thread::Current()));
+ rtc::Thread::Current()));
ASSERT_TRUE(channel_manager_->Init());
- talk_base::scoped_refptr<VideoTrackInterface> video_track(
+ rtc::scoped_refptr<VideoTrackInterface> video_track(
VideoTrack::Create(kVideoTrackId,
VideoSource::Create(channel_manager_.get(),
new webrtc::RemoteVideoCapturer(),
NULL)));
// FakeVideoTrackRenderer register itself to |video_track|
- talk_base::scoped_ptr<FakeVideoTrackRenderer> renderer_1(
+ rtc::scoped_ptr<FakeVideoTrackRenderer> renderer_1(
new FakeVideoTrackRenderer(video_track.get()));
cricket::VideoRenderer* render_input = video_track->GetSource()->FrameInput();
@@ -76,7 +76,7 @@
EXPECT_EQ(123, renderer_1->height());
// FakeVideoTrackRenderer register itself to |video_track|
- talk_base::scoped_ptr<FakeVideoTrackRenderer> renderer_2(
+ rtc::scoped_ptr<FakeVideoTrackRenderer> renderer_2(
new FakeVideoTrackRenderer(video_track.get()));
render_input->RenderFrame(&frame);
diff --git a/talk/app/webrtc/videotrackrenderers.cc b/talk/app/webrtc/videotrackrenderers.cc
index b0e0c1f..75ce2be 100644
--- a/talk/app/webrtc/videotrackrenderers.cc
+++ b/talk/app/webrtc/videotrackrenderers.cc
@@ -38,7 +38,7 @@
}
void VideoTrackRenderers::AddRenderer(VideoRendererInterface* renderer) {
- talk_base::CritScope cs(&critical_section_);
+ rtc::CritScope cs(&critical_section_);
std::vector<RenderObserver>::iterator it = renderers_.begin();
for (; it != renderers_.end(); ++it) {
if (it->renderer_ == renderer)
@@ -48,7 +48,7 @@
}
void VideoTrackRenderers::RemoveRenderer(VideoRendererInterface* renderer) {
- talk_base::CritScope cs(&critical_section_);
+ rtc::CritScope cs(&critical_section_);
std::vector<RenderObserver>::iterator it = renderers_.begin();
for (; it != renderers_.end(); ++it) {
if (it->renderer_ == renderer) {
@@ -59,12 +59,12 @@
}
void VideoTrackRenderers::SetEnabled(bool enable) {
- talk_base::CritScope cs(&critical_section_);
+ rtc::CritScope cs(&critical_section_);
enabled_ = enable;
}
bool VideoTrackRenderers::SetSize(int width, int height, int reserved) {
- talk_base::CritScope cs(&critical_section_);
+ rtc::CritScope cs(&critical_section_);
width_ = width;
height_ = height;
std::vector<RenderObserver>::iterator it = renderers_.begin();
@@ -76,7 +76,7 @@
}
bool VideoTrackRenderers::RenderFrame(const cricket::VideoFrame* frame) {
- talk_base::CritScope cs(&critical_section_);
+ rtc::CritScope cs(&critical_section_);
if (!enabled_) {
return true;
}
diff --git a/talk/app/webrtc/videotrackrenderers.h b/talk/app/webrtc/videotrackrenderers.h
index 4bcf6a3..a6ba094 100644
--- a/talk/app/webrtc/videotrackrenderers.h
+++ b/talk/app/webrtc/videotrackrenderers.h
@@ -31,7 +31,7 @@
#include <vector>
#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/base/criticalsection.h"
+#include "webrtc/base/criticalsection.h"
#include "talk/media/base/videorenderer.h"
namespace webrtc {
@@ -69,7 +69,7 @@
bool enabled_;
std::vector<RenderObserver> renderers_;
- talk_base::CriticalSection critical_section_; // Protects the above variables
+ rtc::CriticalSection critical_section_; // Protects the above variables
};
} // namespace webrtc
diff --git a/talk/app/webrtc/webrtcsdp.cc b/talk/app/webrtc/webrtcsdp.cc
index 997cead..4f774a7 100644
--- a/talk/app/webrtc/webrtcsdp.cc
+++ b/talk/app/webrtc/webrtcsdp.cc
@@ -35,10 +35,10 @@
#include "talk/app/webrtc/jsepicecandidate.h"
#include "talk/app/webrtc/jsepsessiondescription.h"
-#include "talk/base/common.h"
-#include "talk/base/logging.h"
-#include "talk/base/messagedigest.h"
-#include "talk/base/stringutils.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/messagedigest.h"
+#include "webrtc/base/stringutils.h"
#include "talk/media/base/codec.h"
#include "talk/media/base/constants.h"
#include "talk/media/base/cryptoparams.h"
@@ -83,7 +83,7 @@
using cricket::TransportDescription;
using cricket::TransportInfo;
using cricket::VideoContentDescription;
-using talk_base::SocketAddress;
+using rtc::SocketAddress;
typedef std::vector<RtpHeaderExtension> RtpHeaderExtensions;
@@ -216,7 +216,7 @@
: msid_identifier(kDefaultMsid),
// TODO(ronghuawu): What should we do if the appdata doesn't appear?
// Create random string (which will be used as track label later)?
- msid_appdata(talk_base::CreateRandomString(8)) {
+ msid_appdata(rtc::CreateRandomString(8)) {
}
uint32 ssrc_id;
std::string cname;
@@ -314,7 +314,7 @@
RtpHeaderExtension* extmap,
SdpParseError* error);
static bool ParseFingerprintAttribute(const std::string& line,
- talk_base::SSLFingerprint** fingerprint,
+ rtc::SSLFingerprint** fingerprint,
SdpParseError* error);
static bool ParseDtlsSetup(const std::string& line,
cricket::ConnectionRole* role,
@@ -591,7 +591,7 @@
const std::string& s,
T* t,
SdpParseError* error) {
- if (!talk_base::FromString(s, t)) {
+ if (!rtc::FromString(s, t)) {
std::ostringstream description;
description << "Invalid value: " << s << ".";
return ParseFailed(line, description.str(), error);
@@ -719,7 +719,7 @@
// RFC 4566
// m=<media> <port> <proto> <fmt> ...
std::vector<std::string> fields;
- talk_base::split(mline, kSdpDelimiterSpace, &fields);
+ rtc::split(mline, kSdpDelimiterSpace, &fields);
if (fields.size() < 3) {
return;
}
@@ -973,7 +973,7 @@
}
std::vector<std::string> fields;
- talk_base::split(first_line.substr(start_pos),
+ rtc::split(first_line.substr(start_pos),
kSdpDelimiterSpace, &fields);
// RFC 5245
// a=candidate:<foundation> <component-id> <transport> <priority>
@@ -1085,7 +1085,7 @@
return false;
}
std::vector<std::string> fields;
- talk_base::split(ice_options, kSdpDelimiterSpace, &fields);
+ rtc::split(ice_options, kSdpDelimiterSpace, &fields);
for (size_t i = 0; i < fields.size(); ++i) {
transport_options->push_back(fields[i]);
}
@@ -1097,7 +1097,7 @@
// RFC 5285
// a=extmap:<value>["/"<direction>] <URI> <extensionattributes>
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength),
+ rtc::split(line.substr(kLinePrefixLength),
kSdpDelimiterSpace, &fields);
const size_t expected_min_fields = 2;
if (fields.size() < expected_min_fields) {
@@ -1110,7 +1110,7 @@
return false;
}
std::vector<std::string> sub_fields;
- talk_base::split(value_direction, kSdpDelimiterSlash, &sub_fields);
+ rtc::split(value_direction, kSdpDelimiterSlash, &sub_fields);
int value = 0;
if (!GetValueFromString(line, sub_fields[0], &value, error)) {
return false;
@@ -1163,7 +1163,7 @@
video_desc->codecs().begin();
it != video_desc->codecs().end(); ++it) {
fmt.append(" ");
- fmt.append(talk_base::ToString<int>(it->id));
+ fmt.append(rtc::ToString<int>(it->id));
}
} else if (media_type == cricket::MEDIA_TYPE_AUDIO) {
const AudioContentDescription* audio_desc =
@@ -1172,7 +1172,7 @@
audio_desc->codecs().begin();
it != audio_desc->codecs().end(); ++it) {
fmt.append(" ");
- fmt.append(talk_base::ToString<int>(it->id));
+ fmt.append(rtc::ToString<int>(it->id));
}
} else if (media_type == cricket::MEDIA_TYPE_DATA) {
const DataContentDescription* data_desc =
@@ -1189,13 +1189,13 @@
}
}
- fmt.append(talk_base::ToString<int>(sctp_port));
+ fmt.append(rtc::ToString<int>(sctp_port));
} else {
for (std::vector<cricket::DataCodec>::const_iterator it =
data_desc->codecs().begin();
it != data_desc->codecs().end(); ++it) {
fmt.append(" ");
- fmt.append(talk_base::ToString<int>(it->id));
+ fmt.append(rtc::ToString<int>(it->id));
}
}
}
@@ -1213,7 +1213,7 @@
const std::string port = content_info->rejected ?
kMediaPortRejected : kDefaultPort;
- talk_base::SSLFingerprint* fp = (transport_info) ?
+ rtc::SSLFingerprint* fp = (transport_info) ?
transport_info->description.identity_fingerprint.get() : NULL;
// Add the m and c lines.
@@ -1242,7 +1242,7 @@
// Add the a=rtcp line.
bool is_rtp =
media_desc->protocol().empty() ||
- talk_base::starts_with(media_desc->protocol().data(),
+ rtc::starts_with(media_desc->protocol().data(),
cricket::kMediaProtocolRtpPrefix);
if (is_rtp) {
std::string rtcp_line = GetRtcpLine(candidates);
@@ -1420,7 +1420,7 @@
std::vector<uint32>::const_iterator ssrc =
track->ssrc_groups[i].ssrcs.begin();
for (; ssrc != track->ssrc_groups[i].ssrcs.end(); ++ssrc) {
- os << kSdpDelimiterSpace << talk_base::ToString<uint32>(*ssrc);
+ os << kSdpDelimiterSpace << rtc::ToString<uint32>(*ssrc);
}
AddLine(os.str(), message);
}
@@ -1572,7 +1572,7 @@
if (found == params.end()) {
return false;
}
- if (!talk_base::FromString(found->second, value)) {
+ if (!rtc::FromString(found->second, value)) {
return false;
}
return true;
@@ -1752,7 +1752,7 @@
std::string(), error);
}
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength),
+ rtc::split(line.substr(kLinePrefixLength),
kSdpDelimiterSpace, &fields);
const size_t expected_fields = 6;
if (fields.size() != expected_fields) {
@@ -1855,7 +1855,7 @@
"Can't have multiple fingerprint attributes at the same level.",
error);
}
- talk_base::SSLFingerprint* fingerprint = NULL;
+ rtc::SSLFingerprint* fingerprint = NULL;
if (!ParseFingerprintAttribute(line, &fingerprint, error)) {
return false;
}
@@ -1890,7 +1890,7 @@
// RFC 5888 and draft-holmberg-mmusic-sdp-bundle-negotiation-00
// a=group:BUNDLE video voice
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength),
+ rtc::split(line.substr(kLinePrefixLength),
kSdpDelimiterSpace, &fields);
std::string semantics;
if (!GetValue(fields[0], kAttributeGroup, &semantics, error)) {
@@ -1905,7 +1905,7 @@
}
static bool ParseFingerprintAttribute(const std::string& line,
- talk_base::SSLFingerprint** fingerprint,
+ rtc::SSLFingerprint** fingerprint,
SdpParseError* error) {
if (!IsLineType(line, kLineTypeAttributes) ||
!HasAttribute(line, kAttributeFingerprint)) {
@@ -1914,7 +1914,7 @@
}
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength),
+ rtc::split(line.substr(kLinePrefixLength),
kSdpDelimiterSpace, &fields);
const size_t expected_fields = 2;
if (fields.size() != expected_fields) {
@@ -1933,7 +1933,7 @@
::tolower);
// The second field is the digest value. De-hexify it.
- *fingerprint = talk_base::SSLFingerprint::CreateFromRfc4572(
+ *fingerprint = rtc::SSLFingerprint::CreateFromRfc4572(
algorithm, fields[1]);
if (!*fingerprint) {
return ParseFailed(line,
@@ -1950,7 +1950,7 @@
// setup-attr = "a=setup:" role
// role = "active" / "passive" / "actpass" / "holdconn"
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength), kSdpDelimiterColon, &fields);
+ rtc::split(line.substr(kLinePrefixLength), kSdpDelimiterColon, &fields);
const size_t expected_fields = 2;
if (fields.size() != expected_fields) {
return ParseFailedExpectFieldNum(line, expected_fields, error);
@@ -2095,7 +2095,7 @@
++mline_index;
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength),
+ rtc::split(line.substr(kLinePrefixLength),
kSdpDelimiterSpace, &fields);
const size_t expected_min_fields = 4;
if (fields.size() < expected_min_fields) {
@@ -2139,7 +2139,7 @@
session_td.identity_fingerprint.get(),
Candidates());
- talk_base::scoped_ptr<MediaContentDescription> content;
+ rtc::scoped_ptr<MediaContentDescription> content;
std::string content_name;
if (HasAttribute(line, kMediaTypeVideo)) {
content.reset(ParseContentDescription<VideoContentDescription>(
@@ -2423,7 +2423,7 @@
bool is_rtp =
protocol.empty() ||
- talk_base::starts_with(protocol.data(),
+ rtc::starts_with(protocol.data(),
cricket::kMediaProtocolRtpPrefix);
// Loop until the next m line
@@ -2493,7 +2493,7 @@
return false;
}
} else if (HasAttribute(line, kAttributeFingerprint)) {
- talk_base::SSLFingerprint* fingerprint = NULL;
+ rtc::SSLFingerprint* fingerprint = NULL;
if (!ParseFingerprintAttribute(line, &fingerprint, error)) {
return false;
@@ -2706,7 +2706,7 @@
// draft-alvestrand-mmusic-msid-00
// "msid:" identifier [ " " appdata ]
std::vector<std::string> fields;
- talk_base::split(value, kSdpDelimiterSpace, &fields);
+ rtc::split(value, kSdpDelimiterSpace, &fields);
if (fields.size() < 1 || fields.size() > 2) {
return ParseFailed(line,
"Expected format \"msid:<identifier>[ <appdata>]\".",
@@ -2735,7 +2735,7 @@
// RFC 5576
// a=ssrc-group:<semantics> <ssrc-id> ...
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength),
+ rtc::split(line.substr(kLinePrefixLength),
kSdpDelimiterSpace, &fields);
const size_t expected_min_fields = 2;
if (fields.size() < expected_min_fields) {
@@ -2761,7 +2761,7 @@
MediaContentDescription* media_desc,
SdpParseError* error) {
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength),
+ rtc::split(line.substr(kLinePrefixLength),
kSdpDelimiterSpace, &fields);
// RFC 4568
// a=crypto:<tag> <crypto-suite> <key-params> [<session-params>]
@@ -2828,7 +2828,7 @@
MediaContentDescription* media_desc,
SdpParseError* error) {
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength),
+ rtc::split(line.substr(kLinePrefixLength),
kSdpDelimiterSpace, &fields);
// RFC 4566
// a=rtpmap:<payload type> <encoding name>/<clock rate>[/<encodingparameters>]
@@ -2857,7 +2857,7 @@
}
const std::string encoder = fields[1];
std::vector<std::string> codec_params;
- talk_base::split(encoder, '/', &codec_params);
+ rtc::split(encoder, '/', &codec_params);
// <encoding name>/<clock rate>[/<encodingparameters>]
// 2 mandatory fields
if (codec_params.size() < 2 || codec_params.size() > 3) {
@@ -2945,7 +2945,7 @@
return true;
}
std::vector<std::string> fields;
- talk_base::split(line.substr(kLinePrefixLength),
+ rtc::split(line.substr(kLinePrefixLength),
kSdpDelimiterSpace, &fields);
// RFC 5576
@@ -3000,7 +3000,7 @@
return true;
}
std::vector<std::string> rtcp_fb_fields;
- talk_base::split(line.c_str(), kSdpDelimiterSpace, &rtcp_fb_fields);
+ rtc::split(line.c_str(), kSdpDelimiterSpace, &rtcp_fb_fields);
if (rtcp_fb_fields.size() < 2) {
return ParseFailedGetValue(line, kAttributeRtcpFb, error);
}
diff --git a/talk/app/webrtc/webrtcsdp_unittest.cc b/talk/app/webrtc/webrtcsdp_unittest.cc
index 2d275a1..e018034 100644
--- a/talk/app/webrtc/webrtcsdp_unittest.cc
+++ b/talk/app/webrtc/webrtcsdp_unittest.cc
@@ -31,13 +31,13 @@
#include "talk/app/webrtc/jsepsessiondescription.h"
#include "talk/app/webrtc/webrtcsdp.h"
-#include "talk/base/gunit.h"
-#include "talk/base/logging.h"
-#include "talk/base/messagedigest.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/sslfingerprint.h"
-#include "talk/base/stringencode.h"
-#include "talk/base/stringutils.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/messagedigest.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/sslfingerprint.h"
+#include "webrtc/base/stringencode.h"
+#include "webrtc/base/stringutils.h"
#include "talk/media/base/constants.h"
#include "talk/p2p/base/constants.h"
#include "talk/session/media/mediasession.h"
@@ -390,14 +390,14 @@
const std::string& newlines,
std::string* message) {
const std::string tmp = line + newlines;
- talk_base::replace_substrs(line.c_str(), line.length(),
+ rtc::replace_substrs(line.c_str(), line.length(),
tmp.c_str(), tmp.length(), message);
}
static void Replace(const std::string& line,
const std::string& newlines,
std::string* message) {
- talk_base::replace_substrs(line.c_str(), line.length(),
+ rtc::replace_substrs(line.c_str(), line.length(),
newlines.c_str(), newlines.length(), message);
}
@@ -474,7 +474,7 @@
desc_.AddContent(kAudioContentName, NS_JINGLE_RTP, audio_desc_);
// VideoContentDescription
- talk_base::scoped_ptr<VideoContentDescription> video(
+ rtc::scoped_ptr<VideoContentDescription> video(
new VideoContentDescription());
video_desc_ = video.get();
StreamParams video_stream1;
@@ -526,7 +526,7 @@
// v4 host
int port = 1234;
- talk_base::SocketAddress address("192.168.1.5", port++);
+ rtc::SocketAddress address("192.168.1.5", port++);
Candidate candidate1(
"", ICE_CANDIDATE_COMPONENT_RTP, "udp", address, kCandidatePriority,
"", "", LOCAL_PORT_TYPE,
@@ -548,7 +548,7 @@
"", kCandidateGeneration, kCandidateFoundation1);
// v6 host
- talk_base::SocketAddress v6_address("::1", port++);
+ rtc::SocketAddress v6_address("::1", port++);
cricket::Candidate candidate5(
"", cricket::ICE_CANDIDATE_COMPONENT_RTP,
"udp", v6_address, kCandidatePriority,
@@ -575,8 +575,8 @@
// stun
int port_stun = 2345;
- talk_base::SocketAddress address_stun("74.125.127.126", port_stun++);
- talk_base::SocketAddress rel_address_stun("192.168.1.5", port_stun++);
+ rtc::SocketAddress address_stun("74.125.127.126", port_stun++);
+ rtc::SocketAddress rel_address_stun("192.168.1.5", port_stun++);
cricket::Candidate candidate9
("", cricket::ICE_CANDIDATE_COMPONENT_RTP,
"udp", address_stun, kCandidatePriority,
@@ -595,7 +595,7 @@
// relay
int port_relay = 3456;
- talk_base::SocketAddress address_relay("74.125.224.39", port_relay++);
+ rtc::SocketAddress address_relay("74.125.224.39", port_relay++);
cricket::Candidate candidate11(
"", cricket::ICE_CANDIDATE_COMPONENT_RTCP,
"udp", address_relay, kCandidatePriority,
@@ -865,9 +865,9 @@
const char ice_ufragx[] = "a=xice-ufrag";
const char ice_pwd[] = "a=ice-pwd";
const char ice_pwdx[] = "a=xice-pwd";
- talk_base::replace_substrs(ice_ufrag, strlen(ice_ufrag),
+ rtc::replace_substrs(ice_ufrag, strlen(ice_ufrag),
ice_ufragx, strlen(ice_ufragx), sdp);
- talk_base::replace_substrs(ice_pwd, strlen(ice_pwd),
+ rtc::replace_substrs(ice_pwd, strlen(ice_pwd),
ice_pwdx, strlen(ice_pwdx), sdp);
return true;
}
@@ -917,7 +917,7 @@
void AddFingerprint() {
desc_.RemoveTransportInfoByName(kAudioContentName);
desc_.RemoveTransportInfoByName(kVideoContentName);
- talk_base::SSLFingerprint fingerprint(talk_base::DIGEST_SHA_1,
+ rtc::SSLFingerprint fingerprint(rtc::DIGEST_SHA_1,
kIdentityDigest,
sizeof(kIdentityDigest));
EXPECT_TRUE(desc_.AddTransportInfo(
@@ -1001,7 +1001,7 @@
}
void AddSctpDataChannel() {
- talk_base::scoped_ptr<DataContentDescription> data(
+ rtc::scoped_ptr<DataContentDescription> data(
new DataContentDescription());
data_desc_ = data.get();
data_desc_->set_protocol(cricket::kMediaProtocolDtlsSctp);
@@ -1018,7 +1018,7 @@
}
void AddRtpDataChannel() {
- talk_base::scoped_ptr<DataContentDescription> data(
+ rtc::scoped_ptr<DataContentDescription> data(
new DataContentDescription());
data_desc_ = data.get();
@@ -1119,7 +1119,7 @@
const std::string& name, int expected_value) {
cricket::CodecParameterMap::const_iterator found = params.find(name);
ASSERT_TRUE(found != params.end());
- EXPECT_EQ(found->second, talk_base::ToString<int>(expected_value));
+ EXPECT_EQ(found->second, rtc::ToString<int>(expected_value));
}
void TestDeserializeCodecParams(const CodecParams& params,
@@ -1287,7 +1287,7 @@
VideoContentDescription* video_desc_;
DataContentDescription* data_desc_;
Candidates candidates_;
- talk_base::scoped_ptr<IceCandidateInterface> jcandidate_;
+ rtc::scoped_ptr<IceCandidateInterface> jcandidate_;
JsepSessionDescription jdesc_;
};
@@ -1509,10 +1509,10 @@
char default_portstr[16];
char new_portstr[16];
- talk_base::sprintfn(default_portstr, sizeof(default_portstr), "%d",
+ rtc::sprintfn(default_portstr, sizeof(default_portstr), "%d",
kDefaultSctpPort);
- talk_base::sprintfn(new_portstr, sizeof(new_portstr), "%d", kNewPort);
- talk_base::replace_substrs(default_portstr, strlen(default_portstr),
+ rtc::sprintfn(new_portstr, sizeof(new_portstr), "%d", kNewPort);
+ rtc::replace_substrs(default_portstr, strlen(default_portstr),
new_portstr, strlen(new_portstr),
&expected_sdp);
@@ -1946,9 +1946,9 @@
const uint16 kUnusualSctpPort = 9556;
char default_portstr[16];
char unusual_portstr[16];
- talk_base::sprintfn(default_portstr, sizeof(default_portstr), "%d",
+ rtc::sprintfn(default_portstr, sizeof(default_portstr), "%d",
kDefaultSctpPort);
- talk_base::sprintfn(unusual_portstr, sizeof(unusual_portstr), "%d",
+ rtc::sprintfn(unusual_portstr, sizeof(unusual_portstr), "%d",
kUnusualSctpPort);
// First setup the expected JsepSessionDescription.
@@ -1970,7 +1970,7 @@
// Then get the deserialized JsepSessionDescription.
std::string sdp_with_data = kSdpString;
sdp_with_data.append(kSdpSctpDataChannelString);
- talk_base::replace_substrs(default_portstr, strlen(default_portstr),
+ rtc::replace_substrs(default_portstr, strlen(default_portstr),
unusual_portstr, strlen(unusual_portstr),
&sdp_with_data);
JsepSessionDescription jdesc_output(kDummyString);
diff --git a/talk/app/webrtc/webrtcsession.cc b/talk/app/webrtc/webrtcsession.cc
index 6f745fc..17b05de8 100644
--- a/talk/app/webrtc/webrtcsession.cc
+++ b/talk/app/webrtc/webrtcsession.cc
@@ -38,10 +38,10 @@
#include "talk/app/webrtc/mediastreamsignaling.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "talk/app/webrtc/webrtcsessiondescriptionfactory.h"
-#include "talk/base/helpers.h"
-#include "talk/base/logging.h"
-#include "talk/base/stringencode.h"
-#include "talk/base/stringutils.h"
+#include "webrtc/base/helpers.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/stringencode.h"
+#include "webrtc/base/stringutils.h"
#include "talk/media/base/constants.h"
#include "talk/media/base/videocapturer.h"
#include "talk/session/media/channel.h"
@@ -381,7 +381,7 @@
std::string string_value;
T value;
if (constraints->GetOptional().FindFirst(key, &string_value)) {
- if (talk_base::FromString(string_value, &value)) {
+ if (rtc::FromString(string_value, &value)) {
option->Set(value);
}
}
@@ -447,12 +447,12 @@
WebRtcSession::WebRtcSession(
cricket::ChannelManager* channel_manager,
- talk_base::Thread* signaling_thread,
- talk_base::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
+ rtc::Thread* worker_thread,
cricket::PortAllocator* port_allocator,
MediaStreamSignaling* mediastream_signaling)
: cricket::BaseSession(signaling_thread, worker_thread, port_allocator,
- talk_base::ToString(talk_base::CreateRandomId64() &
+ rtc::ToString(rtc::CreateRandomId64() &
LLONG_MAX),
cricket::NS_JINGLE_RTP, false),
// RFC 3264: The numeric value of the session id and version in the
@@ -673,7 +673,7 @@
return webrtc_session_desc_factory_->SdesPolicy();
}
-bool WebRtcSession::GetSslRole(talk_base::SSLRole* role) {
+bool WebRtcSession::GetSslRole(rtc::SSLRole* role) {
if (local_description() == NULL || remote_description() == NULL) {
LOG(LS_INFO) << "Local and Remote descriptions must be applied to get "
<< "SSL Role of the session.";
@@ -706,7 +706,7 @@
bool WebRtcSession::SetLocalDescription(SessionDescriptionInterface* desc,
std::string* err_desc) {
// Takes the ownership of |desc| regardless of the result.
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_temp(desc);
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_temp(desc);
// Validate SDP.
if (!ValidateSessionDescription(desc, cricket::CS_LOCAL, err_desc)) {
@@ -751,7 +751,7 @@
// local session description.
mediastream_signaling_->OnLocalDescriptionChanged(local_desc_.get());
- talk_base::SSLRole role;
+ rtc::SSLRole role;
if (data_channel_type_ == cricket::DCT_SCTP && GetSslRole(&role)) {
mediastream_signaling_->OnDtlsRoleReadyForSctp(role);
}
@@ -764,7 +764,7 @@
bool WebRtcSession::SetRemoteDescription(SessionDescriptionInterface* desc,
std::string* err_desc) {
// Takes the ownership of |desc| regardless of the result.
- talk_base::scoped_ptr<SessionDescriptionInterface> desc_temp(desc);
+ rtc::scoped_ptr<SessionDescriptionInterface> desc_temp(desc);
// Validate SDP.
if (!ValidateSessionDescription(desc, cricket::CS_REMOTE, err_desc)) {
@@ -807,7 +807,7 @@
desc);
remote_desc_.reset(desc_temp.release());
- talk_base::SSLRole role;
+ rtc::SSLRole role;
if (data_channel_type_ == cricket::DCT_SCTP && GetSslRole(&role)) {
mediastream_signaling_->OnDtlsRoleReadyForSctp(role);
}
@@ -1082,7 +1082,7 @@
}
bool WebRtcSession::SendData(const cricket::SendDataParams& params,
- const talk_base::Buffer& payload,
+ const rtc::Buffer& payload,
cricket::SendDataResult* result) {
if (!data_channel_.get()) {
LOG(LS_ERROR) << "SendData called when data_channel_ is NULL.";
@@ -1137,7 +1137,7 @@
return data_channel_.get() && data_channel_->ready_to_send_data();
}
-talk_base::scoped_refptr<DataChannel> WebRtcSession::CreateDataChannel(
+rtc::scoped_refptr<DataChannel> WebRtcSession::CreateDataChannel(
const std::string& label,
const InternalDataChannelInit* config) {
if (state() == STATE_RECEIVEDTERMINATE) {
@@ -1151,7 +1151,7 @@
config ? (*config) : InternalDataChannelInit();
if (data_channel_type_ == cricket::DCT_SCTP) {
if (new_config.id < 0) {
- talk_base::SSLRole role;
+ rtc::SSLRole role;
if (GetSslRole(&role) &&
!mediastream_signaling_->AllocateSctpSid(role, &new_config.id)) {
LOG(LS_ERROR) << "No id can be allocated for the SCTP data channel.";
@@ -1164,7 +1164,7 @@
}
}
- talk_base::scoped_refptr<DataChannel> channel(DataChannel::Create(
+ rtc::scoped_refptr<DataChannel> channel(DataChannel::Create(
this, data_channel_type_, label, new_config));
if (channel && !mediastream_signaling_->AddDataChannel(channel))
return NULL;
@@ -1184,7 +1184,7 @@
ice_restart_latch_->Reset();
}
-void WebRtcSession::OnIdentityReady(talk_base::SSLIdentity* identity) {
+void WebRtcSession::OnIdentityReady(rtc::SSLIdentity* identity) {
SetIdentity(identity);
}
@@ -1551,7 +1551,7 @@
void WebRtcSession::OnDataChannelMessageReceived(
cricket::DataChannel* channel,
const cricket::ReceiveDataParams& params,
- const talk_base::Buffer& payload) {
+ const rtc::Buffer& payload) {
ASSERT(data_channel_type_ == cricket::DCT_SCTP);
if (params.type == cricket::DMT_CONTROL &&
mediastream_signaling_->IsSctpSidAvailable(params.ssrc)) {
diff --git a/talk/app/webrtc/webrtcsession.h b/talk/app/webrtc/webrtcsession.h
index 63e0cc4..efab75c 100644
--- a/talk/app/webrtc/webrtcsession.h
+++ b/talk/app/webrtc/webrtcsession.h
@@ -35,8 +35,8 @@
#include "talk/app/webrtc/mediastreamprovider.h"
#include "talk/app/webrtc/datachannel.h"
#include "talk/app/webrtc/statstypes.h"
-#include "talk/base/sigslot.h"
-#include "talk/base/thread.h"
+#include "webrtc/base/sigslot.h"
+#include "webrtc/base/thread.h"
#include "talk/media/base/mediachannel.h"
#include "talk/p2p/base/session.h"
#include "talk/session/media/mediasession.h"
@@ -106,8 +106,8 @@
public DataChannelProviderInterface {
public:
WebRtcSession(cricket::ChannelManager* channel_manager,
- talk_base::Thread* signaling_thread,
- talk_base::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
+ rtc::Thread* worker_thread,
cricket::PortAllocator* port_allocator,
MediaStreamSignaling* mediastream_signaling);
virtual ~WebRtcSession();
@@ -138,7 +138,7 @@
cricket::SecurePolicy SdesPolicy() const;
// Get current ssl role from transport.
- bool GetSslRole(talk_base::SSLRole* role);
+ bool GetSslRole(rtc::SSLRole* role);
// Generic error message callback from WebRtcSession.
// TODO - It may be necessary to supply error code as well.
@@ -195,7 +195,7 @@
// Implements DataChannelProviderInterface.
virtual bool SendData(const cricket::SendDataParams& params,
- const talk_base::Buffer& payload,
+ const rtc::Buffer& payload,
cricket::SendDataResult* result) OVERRIDE;
virtual bool ConnectDataChannel(DataChannel* webrtc_data_channel) OVERRIDE;
virtual void DisconnectDataChannel(DataChannel* webrtc_data_channel) OVERRIDE;
@@ -204,7 +204,7 @@
virtual bool ReadyToSendData() const OVERRIDE;
// Implements DataChannelFactory.
- talk_base::scoped_refptr<DataChannel> CreateDataChannel(
+ rtc::scoped_refptr<DataChannel> CreateDataChannel(
const std::string& label,
const InternalDataChannelInit* config) OVERRIDE;
@@ -216,7 +216,7 @@
// Called when an SSLIdentity is generated or retrieved by
// WebRTCSessionDescriptionFactory. Should happen before setLocalDescription.
- void OnIdentityReady(talk_base::SSLIdentity* identity);
+ void OnIdentityReady(rtc::SSLIdentity* identity);
// For unit test.
bool waiting_for_identity() const;
@@ -289,7 +289,7 @@
// messages.
void OnDataChannelMessageReceived(cricket::DataChannel* channel,
const cricket::ReceiveDataParams& params,
- const talk_base::Buffer& payload);
+ const rtc::Buffer& payload);
std::string BadStateErrMsg(State state);
void SetIceConnectionState(PeerConnectionInterface::IceConnectionState state);
@@ -319,15 +319,15 @@
std::string GetSessionErrorMsg();
- talk_base::scoped_ptr<cricket::VoiceChannel> voice_channel_;
- talk_base::scoped_ptr<cricket::VideoChannel> video_channel_;
- talk_base::scoped_ptr<cricket::DataChannel> data_channel_;
+ rtc::scoped_ptr<cricket::VoiceChannel> voice_channel_;
+ rtc::scoped_ptr<cricket::VideoChannel> video_channel_;
+ rtc::scoped_ptr<cricket::DataChannel> data_channel_;
cricket::ChannelManager* channel_manager_;
MediaStreamSignaling* mediastream_signaling_;
IceObserver* ice_observer_;
PeerConnectionInterface::IceConnectionState ice_connection_state_;
- talk_base::scoped_ptr<SessionDescriptionInterface> local_desc_;
- talk_base::scoped_ptr<SessionDescriptionInterface> remote_desc_;
+ rtc::scoped_ptr<SessionDescriptionInterface> local_desc_;
+ rtc::scoped_ptr<SessionDescriptionInterface> remote_desc_;
// Candidates that arrived before the remote description was set.
std::vector<IceCandidateInterface*> saved_candidates_;
// If the remote peer is using a older version of implementation.
@@ -341,9 +341,9 @@
// 2. If constraint kEnableRtpDataChannels is true, RTP is allowed (DCT_RTP);
// 3. If both 1&2 are false, data channel is not allowed (DCT_NONE).
cricket::DataChannelType data_channel_type_;
- talk_base::scoped_ptr<IceRestartAnswerLatch> ice_restart_latch_;
+ rtc::scoped_ptr<IceRestartAnswerLatch> ice_restart_latch_;
- talk_base::scoped_ptr<WebRtcSessionDescriptionFactory>
+ rtc::scoped_ptr<WebRtcSessionDescriptionFactory>
webrtc_session_desc_factory_;
sigslot::signal0<> SignalVoiceChannelDestroyed;
diff --git a/talk/app/webrtc/webrtcsession_unittest.cc b/talk/app/webrtc/webrtcsession_unittest.cc
index 460d4a4..51f0c03 100644
--- a/talk/app/webrtc/webrtcsession_unittest.cc
+++ b/talk/app/webrtc/webrtcsession_unittest.cc
@@ -36,17 +36,17 @@
#include "talk/app/webrtc/test/fakemediastreamsignaling.h"
#include "talk/app/webrtc/webrtcsession.h"
#include "talk/app/webrtc/webrtcsessiondescriptionfactory.h"
-#include "talk/base/fakenetwork.h"
-#include "talk/base/firewallsocketserver.h"
-#include "talk/base/gunit.h"
-#include "talk/base/logging.h"
-#include "talk/base/network.h"
-#include "talk/base/physicalsocketserver.h"
-#include "talk/base/ssladapter.h"
-#include "talk/base/sslstreamadapter.h"
-#include "talk/base/stringutils.h"
-#include "talk/base/thread.h"
-#include "talk/base/virtualsocketserver.h"
+#include "webrtc/base/fakenetwork.h"
+#include "webrtc/base/firewallsocketserver.h"
+#include "webrtc/base/gunit.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/network.h"
+#include "webrtc/base/physicalsocketserver.h"
+#include "webrtc/base/ssladapter.h"
+#include "webrtc/base/sslstreamadapter.h"
+#include "webrtc/base/stringutils.h"
+#include "webrtc/base/thread.h"
+#include "webrtc/base/virtualsocketserver.h"
#include "talk/media/base/fakemediaengine.h"
#include "talk/media/base/fakevideorenderer.h"
#include "talk/media/base/mediachannel.h"
@@ -71,9 +71,9 @@
using cricket::NS_GINGLE_P2P;
using cricket::NS_JINGLE_ICE_UDP;
using cricket::TransportInfo;
-using talk_base::SocketAddress;
-using talk_base::scoped_ptr;
-using talk_base::Thread;
+using rtc::SocketAddress;
+using rtc::scoped_ptr;
+using rtc::Thread;
using webrtc::CreateSessionDescription;
using webrtc::CreateSessionDescriptionObserver;
using webrtc::CreateSessionDescriptionRequest;
@@ -133,7 +133,7 @@
const std::string& newlines,
std::string* message) {
const std::string tmp = line + newlines;
- talk_base::replace_substrs(line.c_str(), line.length(),
+ rtc::replace_substrs(line.c_str(), line.length(),
tmp.c_str(), tmp.length(), message);
}
@@ -203,8 +203,8 @@
class WebRtcSessionForTest : public webrtc::WebRtcSession {
public:
WebRtcSessionForTest(cricket::ChannelManager* cmgr,
- talk_base::Thread* signaling_thread,
- talk_base::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
+ rtc::Thread* worker_thread,
cricket::PortAllocator* port_allocator,
webrtc::IceObserver* ice_observer,
webrtc::MediaStreamSignaling* mediastream_signaling)
@@ -223,7 +223,7 @@
};
class WebRtcSessionCreateSDPObserverForTest
- : public talk_base::RefCountedObject<CreateSessionDescriptionObserver> {
+ : public rtc::RefCountedObject<CreateSessionDescriptionObserver> {
public:
enum State {
kInit,
@@ -253,7 +253,7 @@
~WebRtcSessionCreateSDPObserverForTest() {}
private:
- talk_base::scoped_ptr<SessionDescriptionInterface> description_;
+ rtc::scoped_ptr<SessionDescriptionInterface> description_;
State state_;
};
@@ -294,15 +294,15 @@
device_manager_(new cricket::FakeDeviceManager()),
channel_manager_(new cricket::ChannelManager(
media_engine_, data_engine_, device_manager_,
- new cricket::CaptureManager(), talk_base::Thread::Current())),
+ new cricket::CaptureManager(), rtc::Thread::Current())),
tdesc_factory_(new cricket::TransportDescriptionFactory()),
desc_factory_(new cricket::MediaSessionDescriptionFactory(
channel_manager_.get(), tdesc_factory_.get())),
- pss_(new talk_base::PhysicalSocketServer),
- vss_(new talk_base::VirtualSocketServer(pss_.get())),
- fss_(new talk_base::FirewallSocketServer(vss_.get())),
+ pss_(new rtc::PhysicalSocketServer),
+ vss_(new rtc::VirtualSocketServer(pss_.get())),
+ fss_(new rtc::FirewallSocketServer(vss_.get())),
ss_scope_(fss_.get()),
- stun_socket_addr_(talk_base::SocketAddress(kStunAddrHost,
+ stun_socket_addr_(rtc::SocketAddress(kStunAddrHost,
cricket::STUN_SERVER_PORT)),
stun_server_(Thread::Current(), stun_socket_addr_),
turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr),
@@ -325,11 +325,11 @@
}
static void SetUpTestCase() {
- talk_base::InitializeSSL();
+ rtc::InitializeSSL();
}
static void TearDownTestCase() {
- talk_base::CleanupSSL();
+ rtc::CleanupSSL();
}
void AddInterface(const SocketAddress& addr) {
@@ -343,8 +343,8 @@
void Init(DTLSIdentityServiceInterface* identity_service) {
ASSERT_TRUE(session_.get() == NULL);
session_.reset(new WebRtcSessionForTest(
- channel_manager_.get(), talk_base::Thread::Current(),
- talk_base::Thread::Current(), allocator_.get(),
+ channel_manager_.get(), rtc::Thread::Current(),
+ rtc::Thread::Current(), allocator_.get(),
&observer_,
&mediastream_signaling_));
@@ -387,7 +387,7 @@
SessionDescriptionInterface* CreateOffer(
const webrtc::MediaConstraintsInterface* constraints) {
- talk_base::scoped_refptr<WebRtcSessionCreateSDPObserverForTest>
+ rtc::scoped_refptr<WebRtcSessionCreateSDPObserverForTest>
observer = new WebRtcSessionCreateSDPObserverForTest();
session_->CreateOffer(observer, constraints);
EXPECT_TRUE_WAIT(
@@ -398,7 +398,7 @@
SessionDescriptionInterface* CreateAnswer(
const webrtc::MediaConstraintsInterface* constraints) {
- talk_base::scoped_refptr<WebRtcSessionCreateSDPObserverForTest> observer
+ rtc::scoped_refptr<WebRtcSessionCreateSDPObserverForTest> observer
= new WebRtcSessionCreateSDPObserverForTest();
session_->CreateAnswer(observer, constraints);
EXPECT_TRUE_WAIT(
@@ -482,8 +482,8 @@
void SetFactoryDtlsSrtp() {
desc_factory_->set_secure(cricket::SEC_DISABLED);
std::string identity_name = "WebRTC" +
- talk_base::ToString(talk_base::CreateRandomId());
- identity_.reset(talk_base::SSLIdentity::Generate(identity_name));
+ rtc::ToString(rtc::CreateRandomId());
+ identity_.reset(rtc::SSLIdentity::Generate(identity_name));
tdesc_factory_->set_identity(identity_.get());
tdesc_factory_->set_secure(cricket::SEC_REQUIRED);
}
@@ -571,10 +571,10 @@
+ "\r\n";
std::string pwd_line = "a=ice-pwd:" + transport_desc->ice_pwd
+ "\r\n";
- talk_base::replace_substrs(ufrag_line.c_str(), ufrag_line.length(),
+ rtc::replace_substrs(ufrag_line.c_str(), ufrag_line.length(),
"", 0,
sdp);
- talk_base::replace_substrs(pwd_line.c_str(), pwd_line.length(),
+ rtc::replace_substrs(pwd_line.c_str(), pwd_line.length(),
"", 0,
sdp);
}
@@ -600,10 +600,10 @@
+ "\r\n";
std::string mod_ufrag = "a=ice-ufrag:" + modified_ice_ufrag + "\r\n";
std::string mod_pwd = "a=ice-pwd:" + modified_ice_pwd + "\r\n";
- talk_base::replace_substrs(ufrag_line.c_str(), ufrag_line.length(),
+ rtc::replace_substrs(ufrag_line.c_str(), ufrag_line.length(),
mod_ufrag.c_str(), mod_ufrag.length(),
sdp);
- talk_base::replace_substrs(pwd_line.c_str(), pwd_line.length(),
+ rtc::replace_substrs(pwd_line.c_str(), pwd_line.length(),
mod_pwd.c_str(), mod_pwd.length(),
sdp);
}
@@ -702,7 +702,7 @@
options.has_video = true;
options.bundle_enabled = true;
- talk_base::scoped_ptr<SessionDescriptionInterface> temp_offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> temp_offer(
CreateRemoteOffer(options, cricket::SEC_ENABLED));
*nodtls_answer =
@@ -723,7 +723,7 @@
cricket::SecurePolicy secure_policy,
const std::string& session_version,
const SessionDescriptionInterface* current_desc) {
- std::string session_id = talk_base::ToString(talk_base::CreateRandomId64());
+ std::string session_id = rtc::ToString(rtc::CreateRandomId64());
const cricket::SessionDescription* cricket_desc = NULL;
if (current_desc) {
cricket_desc = current_desc->description();
@@ -773,10 +773,10 @@
// SessionDescription from the mutated string.
const char* default_port_str = "5000";
char new_port_str[16];
- talk_base::sprintfn(new_port_str, sizeof(new_port_str), "%d", new_port);
+ rtc::sprintfn(new_port_str, sizeof(new_port_str), "%d", new_port);
std::string offer_str;
offer_basis->ToString(&offer_str);
- talk_base::replace_substrs(default_port_str, strlen(default_port_str),
+ rtc::replace_substrs(default_port_str, strlen(default_port_str),
new_port_str, strlen(new_port_str),
&offer_str);
JsepSessionDescription* offer = new JsepSessionDescription(
@@ -800,7 +800,7 @@
cricket::SecurePolicy policy) {
desc_factory_->set_secure(policy);
const std::string session_id =
- talk_base::ToString(talk_base::CreateRandomId64());
+ rtc::ToString(rtc::CreateRandomId64());
JsepSessionDescription* answer(
new JsepSessionDescription(JsepSessionDescription::kAnswer));
if (!answer->Initialize(desc_factory_->CreateAnswer(offer->description(),
@@ -830,7 +830,7 @@
}
void TestSessionCandidatesWithBundleRtcpMux(bool bundle, bool rtcp_mux) {
- AddInterface(talk_base::SocketAddress(kClientAddrHost1, kClientAddrPort));
+ AddInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
FakeConstraints constraints;
@@ -840,7 +840,7 @@
// and answer.
SetLocalDescriptionWithoutError(offer);
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateRemoteAnswer(session_->local_description()));
std::string sdp;
EXPECT_TRUE(answer->ToString(&sdp));
@@ -853,7 +853,7 @@
// Disable rtcp-mux from the answer
const std::string kRtcpMux = "a=rtcp-mux";
const std::string kXRtcpMux = "a=xrtcp-mux";
- talk_base::replace_substrs(kRtcpMux.c_str(), kRtcpMux.length(),
+ rtc::replace_substrs(kRtcpMux.c_str(), kRtcpMux.length(),
kXRtcpMux.c_str(), kXRtcpMux.length(),
&sdp);
}
@@ -902,7 +902,7 @@
// -> Failed.
// The Gathering state should go: New -> Gathering -> Completed.
void TestLoopbackCall() {
- AddInterface(talk_base::SocketAddress(kClientAddrHost1, kClientAddrPort));
+ AddInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
SessionDescriptionInterface* offer = CreateOffer(NULL);
@@ -939,9 +939,9 @@
// Adding firewall rule to block ping requests, which should cause
// transport channel failure.
fss_->AddRule(false,
- talk_base::FP_ANY,
- talk_base::FD_ANY,
- talk_base::SocketAddress(kClientAddrHost1, kClientAddrPort));
+ rtc::FP_ANY,
+ rtc::FD_ANY,
+ rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected,
observer_.ice_connection_state_,
kIceCandidatesTimeout);
@@ -960,9 +960,9 @@
// wait for the Port to timeout.
int port_timeout = 30000;
fss_->AddRule(false,
- talk_base::FP_ANY,
- talk_base::FD_ANY,
- talk_base::SocketAddress(kClientAddrHost1, kClientAddrPort));
+ rtc::FP_ANY,
+ rtc::FD_ANY,
+ rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionFailed,
observer_.ice_connection_state_,
kIceCandidatesTimeout + port_timeout);
@@ -1022,7 +1022,7 @@
}
const int kNumber = 3;
- talk_base::scoped_refptr<WebRtcSessionCreateSDPObserverForTest>
+ rtc::scoped_refptr<WebRtcSessionCreateSDPObserverForTest>
observers[kNumber];
for (int i = 0; i < kNumber; ++i) {
observers[i] = new WebRtcSessionCreateSDPObserverForTest();
@@ -1050,23 +1050,23 @@
cricket::FakeMediaEngine* media_engine_;
cricket::FakeDataEngine* data_engine_;
cricket::FakeDeviceManager* device_manager_;
- talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
- talk_base::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
- talk_base::scoped_ptr<talk_base::SSLIdentity> identity_;
- talk_base::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
- talk_base::scoped_ptr<talk_base::PhysicalSocketServer> pss_;
- talk_base::scoped_ptr<talk_base::VirtualSocketServer> vss_;
- talk_base::scoped_ptr<talk_base::FirewallSocketServer> fss_;
- talk_base::SocketServerScope ss_scope_;
- talk_base::SocketAddress stun_socket_addr_;
+ rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
+ rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
+ rtc::scoped_ptr<rtc::SSLIdentity> identity_;
+ rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
+ rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_;
+ rtc::scoped_ptr<rtc::VirtualSocketServer> vss_;
+ rtc::scoped_ptr<rtc::FirewallSocketServer> fss_;
+ rtc::SocketServerScope ss_scope_;
+ rtc::SocketAddress stun_socket_addr_;
cricket::TestStunServer stun_server_;
cricket::TestTurnServer turn_server_;
- talk_base::FakeNetworkManager network_manager_;
- talk_base::scoped_ptr<cricket::BasicPortAllocator> allocator_;
+ rtc::FakeNetworkManager network_manager_;
+ rtc::scoped_ptr<cricket::BasicPortAllocator> allocator_;
PeerConnectionFactoryInterface::Options options_;
- talk_base::scoped_ptr<FakeConstraints> constraints_;
+ rtc::scoped_ptr<FakeConstraints> constraints_;
FakeMediaStreamSignaling mediastream_signaling_;
- talk_base::scoped_ptr<WebRtcSessionForTest> session_;
+ rtc::scoped_ptr<WebRtcSessionForTest> session_;
MockIceObserver observer_;
cricket::FakeVideoMediaChannel* video_channel_;
cricket::FakeVoiceMediaChannel* voice_channel_;
@@ -1100,8 +1100,8 @@
}
TEST_F(WebRtcSessionTest, TestMultihomeCandidates) {
- AddInterface(talk_base::SocketAddress(kClientAddrHost1, kClientAddrPort));
- AddInterface(talk_base::SocketAddress(kClientAddrHost2, kClientAddrPort));
+ AddInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
+ AddInterface(rtc::SocketAddress(kClientAddrHost2, kClientAddrPort));
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
InitiateCall();
@@ -1111,12 +1111,12 @@
}
TEST_F(WebRtcSessionTest, TestStunError) {
- AddInterface(talk_base::SocketAddress(kClientAddrHost1, kClientAddrPort));
- AddInterface(talk_base::SocketAddress(kClientAddrHost2, kClientAddrPort));
+ AddInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
+ AddInterface(rtc::SocketAddress(kClientAddrHost2, kClientAddrPort));
fss_->AddRule(false,
- talk_base::FP_UDP,
- talk_base::FD_ANY,
- talk_base::SocketAddress(kClientAddrHost1, kClientAddrPort));
+ rtc::FP_UDP,
+ rtc::FD_ANY,
+ rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
InitiateCall();
@@ -1171,8 +1171,8 @@
// Verify the session id is the same and the session version is
// increased.
EXPECT_EQ(session_id_orig, offer->session_id());
- EXPECT_LT(talk_base::FromString<uint64>(session_version_orig),
- talk_base::FromString<uint64>(offer->session_version()));
+ EXPECT_LT(rtc::FromString<uint64>(session_version_orig),
+ rtc::FromString<uint64>(offer->session_version()));
SetLocalDescriptionWithoutError(offer);
@@ -1232,8 +1232,8 @@
// Verify the session id is the same and the session version is
// increased.
EXPECT_EQ(session_id_orig, answer->session_id());
- EXPECT_LT(talk_base::FromString<uint64>(session_version_orig),
- talk_base::FromString<uint64>(answer->session_version()));
+ EXPECT_LT(rtc::FromString<uint64>(session_version_orig),
+ rtc::FromString<uint64>(answer->session_version()));
SetLocalDescriptionWithoutError(answer);
ASSERT_EQ(2u, video_channel_->recv_streams().size());
@@ -1339,7 +1339,7 @@
// Test that we accept an offer with a DTLS fingerprint when DTLS is on
// and that we return an answer with a DTLS fingerprint.
TEST_F(WebRtcSessionTest, TestReceiveDtlsOfferCreateDtlsAnswer) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
mediastream_signaling_.SendAudioVideoStream1();
InitWithDtls();
SetFactoryDtlsSrtp();
@@ -1368,7 +1368,7 @@
// Test that we set a local offer with a DTLS fingerprint when DTLS is on
// and then we accept a remote answer with a DTLS fingerprint successfully.
TEST_F(WebRtcSessionTest, TestCreateDtlsOfferReceiveDtlsAnswer) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
mediastream_signaling_.SendAudioVideoStream1();
InitWithDtls();
SetFactoryDtlsSrtp();
@@ -1398,7 +1398,7 @@
// Test that if we support DTLS and the other side didn't offer a fingerprint,
// we will fail to set the remote description.
TEST_F(WebRtcSessionTest, TestReceiveNonDtlsOfferWhenDtlsOn) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
cricket::MediaSessionOptions options;
options.has_video = true;
@@ -1422,7 +1422,7 @@
// Test that we return a failure when applying a local answer that doesn't have
// a DTLS fingerprint when DTLS is required.
TEST_F(WebRtcSessionTest, TestSetLocalNonDtlsAnswerWhenDtlsOn) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
SessionDescriptionInterface* offer = NULL;
SessionDescriptionInterface* answer = NULL;
@@ -1438,7 +1438,7 @@
// Test that we return a failure when applying a remote answer that doesn't have
// a DTLS fingerprint when DTLS is required.
TEST_F(WebRtcSessionTest, TestSetRemoteNonDtlsAnswerWhenDtlsOn) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
SessionDescriptionInterface* offer = CreateOffer(NULL);
cricket::MediaSessionOptions options;
@@ -1606,7 +1606,7 @@
TEST_F(WebRtcSessionTest, TestSetLocalAnswerWithoutOffer) {
Init(NULL);
mediastream_signaling_.SendNothing();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(NULL));
SessionDescriptionInterface* answer =
CreateRemoteAnswer(offer.get());
@@ -1617,7 +1617,7 @@
TEST_F(WebRtcSessionTest, TestSetRemoteAnswerWithoutOffer) {
Init(NULL);
mediastream_signaling_.SendNothing();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(NULL));
SessionDescriptionInterface* answer =
CreateRemoteAnswer(offer.get());
@@ -1727,7 +1727,7 @@
// Test that local candidates are added to the local session description and
// that they are retained if the local session description is changed.
TEST_F(WebRtcSessionTest, TestLocalCandidatesAddedToSessionDescription) {
- AddInterface(talk_base::SocketAddress(kClientAddrHost1, kClientAddrPort));
+ AddInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
CreateAndSetRemoteOfferAndLocalAnswer();
@@ -1791,7 +1791,7 @@
// Test that offers and answers contains ice candidates when Ice candidates have
// been gathered.
TEST_F(WebRtcSessionTest, TestSetLocalAndRemoteDescriptionWithCandidates) {
- AddInterface(talk_base::SocketAddress(kClientAddrHost1, kClientAddrPort));
+ AddInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
// Ice is started but candidates are not provided until SetLocalDescription
@@ -1805,7 +1805,7 @@
EXPECT_TRUE_WAIT(0u < observer_.mline_1_candidates_.size(),
kIceCandidatesTimeout);
- talk_base::scoped_ptr<SessionDescriptionInterface> local_offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> local_offer(
CreateOffer(NULL));
ASSERT_TRUE(local_offer->candidates(kMediaContentIndex0) != NULL);
EXPECT_LT(0u, local_offer->candidates(kMediaContentIndex0)->count());
@@ -1827,7 +1827,7 @@
TEST_F(WebRtcSessionTest, TestChannelCreationsWithContentNames) {
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(NULL));
// CreateOffer creates session description with the content names "audio" and
@@ -1842,12 +1842,12 @@
const std::string kVideoMidReplaceStr = "a=mid:video_content_name";
// Replacing |audio| with |audio_content_name|.
- talk_base::replace_substrs(kAudioMid.c_str(), kAudioMid.length(),
+ rtc::replace_substrs(kAudioMid.c_str(), kAudioMid.length(),
kAudioMidReplaceStr.c_str(),
kAudioMidReplaceStr.length(),
&sdp);
// Replacing |video| with |video_content_name|.
- talk_base::replace_substrs(kVideoMid.c_str(), kVideoMid.length(),
+ rtc::replace_substrs(kVideoMid.c_str(), kVideoMid.length(),
kVideoMidReplaceStr.c_str(),
kVideoMidReplaceStr.length(),
&sdp);
@@ -1871,7 +1871,7 @@
// the send streams when no constraints have been set.
TEST_F(WebRtcSessionTest, CreateOfferWithoutConstraintsOrStreams) {
Init(NULL);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(NULL));
ASSERT_TRUE(offer != NULL);
const cricket::ContentInfo* content =
@@ -1887,7 +1887,7 @@
Init(NULL);
// Test Audio only offer.
mediastream_signaling_.UseOptionsAudioOnly();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(NULL));
const cricket::ContentInfo* content =
cricket::GetFirstAudioContent(offer->description());
@@ -1912,7 +1912,7 @@
constraints_no_receive.SetMandatoryReceiveAudio(false);
constraints_no_receive.SetMandatoryReceiveVideo(false);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(&constraints_no_receive));
ASSERT_TRUE(offer != NULL);
const cricket::ContentInfo* content =
@@ -1928,7 +1928,7 @@
Init(NULL);
webrtc::FakeConstraints constraints_audio_only;
constraints_audio_only.SetMandatoryReceiveAudio(true);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(&constraints_audio_only));
const cricket::ContentInfo* content =
@@ -1946,7 +1946,7 @@
webrtc::FakeConstraints constraints_audio_video;
constraints_audio_video.SetMandatoryReceiveAudio(true);
constraints_audio_video.SetMandatoryReceiveVideo(true);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(&constraints_audio_video));
const cricket::ContentInfo* content =
cricket::GetFirstAudioContent(offer->description());
@@ -1975,9 +1975,9 @@
TEST_F(WebRtcSessionTest, CreateAnswerWithoutConstraintsOrStreams) {
Init(NULL);
// Create a remote offer with audio and video content.
- talk_base::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
+ rtc::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
SetRemoteDescriptionWithoutError(offer.release());
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateAnswer(NULL));
const cricket::ContentInfo* content =
cricket::GetFirstAudioContent(answer->description());
@@ -1997,13 +1997,13 @@
cricket::MediaSessionOptions options;
options.has_audio = true;
options.has_video = false;
- talk_base::scoped_ptr<JsepSessionDescription> offer(
+ rtc::scoped_ptr<JsepSessionDescription> offer(
CreateRemoteOffer(options));
ASSERT_TRUE(cricket::GetFirstVideoContent(offer->description()) == NULL);
ASSERT_TRUE(cricket::GetFirstAudioContent(offer->description()) != NULL);
SetRemoteDescriptionWithoutError(offer.release());
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateAnswer(NULL));
const cricket::ContentInfo* content =
cricket::GetFirstAudioContent(answer->description());
@@ -2018,11 +2018,11 @@
TEST_F(WebRtcSessionTest, CreateAnswerWithoutConstraints) {
Init(NULL);
// Create a remote offer with audio and video content.
- talk_base::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
+ rtc::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
SetRemoteDescriptionWithoutError(offer.release());
// Test with a stream with tracks.
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateAnswer(NULL));
const cricket::ContentInfo* content =
cricket::GetFirstAudioContent(answer->description());
@@ -2039,14 +2039,14 @@
TEST_F(WebRtcSessionTest, CreateAnswerWithConstraintsWithoutStreams) {
Init(NULL);
// Create a remote offer with audio and video content.
- talk_base::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
+ rtc::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
SetRemoteDescriptionWithoutError(offer.release());
webrtc::FakeConstraints constraints_no_receive;
constraints_no_receive.SetMandatoryReceiveAudio(false);
constraints_no_receive.SetMandatoryReceiveVideo(false);
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateAnswer(&constraints_no_receive));
const cricket::ContentInfo* content =
cricket::GetFirstAudioContent(answer->description());
@@ -2063,7 +2063,7 @@
TEST_F(WebRtcSessionTest, CreateAnswerWithConstraints) {
Init(NULL);
// Create a remote offer with audio and video content.
- talk_base::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
+ rtc::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
SetRemoteDescriptionWithoutError(offer.release());
webrtc::FakeConstraints constraints_no_receive;
@@ -2072,7 +2072,7 @@
// Test with a stream with tracks.
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateAnswer(&constraints_no_receive));
// TODO(perkj): Should the direction be set to SEND_ONLY?
@@ -2092,7 +2092,7 @@
Init(NULL);
webrtc::FakeConstraints constraints;
constraints.SetOptionalVAD(false);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(&constraints));
const cricket::ContentInfo* content =
cricket::GetFirstAudioContent(offer->description());
@@ -2104,12 +2104,12 @@
AddCNCodecs();
Init(NULL);
// Create a remote offer with audio and video content.
- talk_base::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
+ rtc::scoped_ptr<JsepSessionDescription> offer(CreateRemoteOffer());
SetRemoteDescriptionWithoutError(offer.release());
webrtc::FakeConstraints constraints;
constraints.SetOptionalVAD(false);
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateAnswer(&constraints));
const cricket::ContentInfo* content =
cricket::GetFirstAudioContent(answer->description());
@@ -2265,7 +2265,7 @@
TEST_F(WebRtcSessionTest, TestSetLocalDescriptionWithoutIce) {
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
std::string sdp;
RemoveIceUfragPwdLines(offer.get(), &sdp);
SessionDescriptionInterface* modified_offer =
@@ -2277,7 +2277,7 @@
// no a=ice-ufrag and a=ice-pwd lines are present in the SDP.
TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionWithoutIce) {
Init(NULL);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer());
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer());
std::string sdp;
RemoveIceUfragPwdLines(offer.get(), &sdp);
SessionDescriptionInterface* modified_offer =
@@ -2291,7 +2291,7 @@
Init(NULL);
tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
std::string sdp;
// Modifying ice ufrag and pwd in local offer with strings smaller than the
// recommended values of 4 and 22 bytes respectively.
@@ -2315,7 +2315,7 @@
TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) {
Init(NULL);
tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer());
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer());
std::string sdp;
// Modifying ice ufrag and pwd in remote offer with strings smaller than the
// recommended values of 4 and 22 bytes respectively.
@@ -2340,7 +2340,7 @@
Init(NULL);
EXPECT_TRUE((cricket::PORTALLOCATOR_ENABLE_BUNDLE &
allocator_->flags()) == cricket::PORTALLOCATOR_ENABLE_BUNDLE);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(NULL));
cricket::SessionDescription* offer_copy =
offer->description()->Copy();
@@ -2363,7 +2363,7 @@
SessionDescriptionInterface* offer = CreateOffer(&constraints);
SetLocalDescriptionWithoutError(offer);
mediastream_signaling_.SendAudioVideoStream2();
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateRemoteAnswer(session_->local_description()));
cricket::SessionDescription* answer_copy = answer->description()->Copy();
answer_copy->RemoveGroupByName(cricket::GROUP_TYPE_BUNDLE);
@@ -2404,7 +2404,7 @@
// Disable rtcp-mux
const std::string rtcp_mux = "rtcp-mux";
const std::string xrtcp_mux = "xrtcp-mux";
- talk_base::replace_substrs(rtcp_mux.c_str(), rtcp_mux.length(),
+ rtc::replace_substrs(rtcp_mux.c_str(), rtcp_mux.length(),
xrtcp_mux.c_str(), xrtcp_mux.length(),
&offer_str);
JsepSessionDescription *local_offer =
@@ -2431,7 +2431,7 @@
EXPECT_TRUE(channel->GetOutputScaling(receive_ssrc, &left_vol, &right_vol));
EXPECT_EQ(1, left_vol);
EXPECT_EQ(1, right_vol);
- talk_base::scoped_ptr<FakeAudioRenderer> renderer(new FakeAudioRenderer());
+ rtc::scoped_ptr<FakeAudioRenderer> renderer(new FakeAudioRenderer());
session_->SetAudioPlayout(receive_ssrc, false, renderer.get());
EXPECT_TRUE(channel->GetOutputScaling(receive_ssrc, &left_vol, &right_vol));
EXPECT_EQ(0, left_vol);
@@ -2457,7 +2457,7 @@
cricket::AudioOptions options;
options.echo_cancellation.Set(true);
- talk_base::scoped_ptr<FakeAudioRenderer> renderer(new FakeAudioRenderer());
+ rtc::scoped_ptr<FakeAudioRenderer> renderer(new FakeAudioRenderer());
session_->SetAudioSend(send_ssrc, false, options, renderer.get());
EXPECT_TRUE(channel->IsStreamMuted(send_ssrc));
EXPECT_FALSE(channel->options().echo_cancellation.IsSet());
@@ -2483,7 +2483,7 @@
ASSERT_EQ(1u, channel->send_streams().size());
uint32 send_ssrc = channel->send_streams()[0].first_ssrc();
- talk_base::scoped_ptr<FakeAudioRenderer> renderer(new FakeAudioRenderer());
+ rtc::scoped_ptr<FakeAudioRenderer> renderer(new FakeAudioRenderer());
cricket::AudioOptions options;
session_->SetAudioSend(send_ssrc, true, options, renderer.get());
EXPECT_TRUE(renderer->sink() != NULL);
@@ -2595,7 +2595,7 @@
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
SessionDescriptionInterface* offer = CreateOffer(NULL);
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateRemoteAnswer(offer));
SetLocalDescriptionWithoutError(offer);
std::string sdp;
@@ -2632,7 +2632,7 @@
mediastream_signaling_.SendAudioVideoStream1();
SessionDescriptionInterface* offer = CreateOffer(NULL);
SetRemoteDescriptionWithoutError(offer);
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateAnswer(NULL));
std::string sdp;
EXPECT_TRUE(answer->ToString(&sdp));
@@ -2665,14 +2665,14 @@
TEST_F(WebRtcSessionTest, TestIceOfferGIceOnlyAnswer) {
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(NULL));
std::string offer_str;
offer->ToString(&offer_str);
// Disable google-ice
const std::string gice_option = "google-ice";
const std::string xgoogle_xice = "xgoogle-xice";
- talk_base::replace_substrs(gice_option.c_str(), gice_option.length(),
+ rtc::replace_substrs(gice_option.c_str(), gice_option.length(),
xgoogle_xice.c_str(), xgoogle_xice.length(),
&offer_str);
JsepSessionDescription *ice_only_offer =
@@ -2699,7 +2699,7 @@
mediastream_signaling_.SendAudioVideoStream1();
SessionDescriptionInterface* offer = CreateOffer(NULL);
SetLocalDescriptionWithoutError(offer);
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateRemoteAnswer(session_->local_description()));
cricket::SessionDescription* answer_copy = answer->description()->Copy();
@@ -2717,7 +2717,7 @@
EXPECT_TRUE(answer->ToString(&sdp));
const std::string kAudioMid = "a=mid:audio";
const std::string kAudioMidReplaceStr = "a=mid:audio_content_name";
- talk_base::replace_substrs(kAudioMid.c_str(), kAudioMid.length(),
+ rtc::replace_substrs(kAudioMid.c_str(), kAudioMid.length(),
kAudioMidReplaceStr.c_str(),
kAudioMidReplaceStr.length(),
&sdp);
@@ -2729,7 +2729,7 @@
EXPECT_TRUE(answer->ToString(&sdp));
const std::string kAudioMline = "m=audio";
const std::string kAudioMlineReplaceStr = "m=video";
- talk_base::replace_substrs(kAudioMline.c_str(), kAudioMline.length(),
+ rtc::replace_substrs(kAudioMline.c_str(), kAudioMline.length(),
kAudioMlineReplaceStr.c_str(),
kAudioMlineReplaceStr.length(),
&sdp);
@@ -2782,7 +2782,7 @@
ASSERT_TRUE(session_->GetTransportProxy("video") != NULL);
// Pump for 1 second and verify that no candidates are generated.
- talk_base::Thread::Current()->ProcessMessages(1000);
+ rtc::Thread::Current()->ProcessMessages(1000);
EXPECT_TRUE(observer_.mline_0_candidates_.empty());
EXPECT_TRUE(observer_.mline_1_candidates_.empty());
@@ -2798,7 +2798,7 @@
TEST_F(WebRtcSessionTest, TestCryptoAfterSetLocalDescription) {
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(NULL));
// Making sure SetLocalDescription correctly sets crypto value in
@@ -2818,7 +2818,7 @@
options_.disable_encryption = true;
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(
CreateOffer(NULL));
// Making sure SetLocalDescription correctly sets crypto value in
@@ -2840,22 +2840,22 @@
cricket::MediaSessionOptions options;
options.has_audio = true;
options.has_video = true;
- talk_base::scoped_ptr<JsepSessionDescription> offer(
+ rtc::scoped_ptr<JsepSessionDescription> offer(
CreateRemoteOffer(options));
SetRemoteDescriptionWithoutError(offer.release());
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateAnswer(NULL));
SetLocalDescriptionWithoutError(answer.release());
// Receive an offer with new ufrag and password.
options.transport_options.ice_restart = true;
- talk_base::scoped_ptr<JsepSessionDescription> updated_offer1(
+ rtc::scoped_ptr<JsepSessionDescription> updated_offer1(
CreateRemoteOffer(options, session_->remote_description()));
SetRemoteDescriptionWithoutError(updated_offer1.release());
- talk_base::scoped_ptr<SessionDescriptionInterface> updated_answer1(
+ rtc::scoped_ptr<SessionDescriptionInterface> updated_answer1(
CreateAnswer(NULL));
CompareIceUfragAndPassword(updated_answer1->description(),
@@ -2872,22 +2872,22 @@
cricket::MediaSessionOptions options;
options.has_audio = true;
options.has_video = true;
- talk_base::scoped_ptr<JsepSessionDescription> offer(
+ rtc::scoped_ptr<JsepSessionDescription> offer(
CreateRemoteOffer(options));
SetRemoteDescriptionWithoutError(offer.release());
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(
CreateAnswer(NULL));
SetLocalDescriptionWithoutError(answer.release());
// Receive an offer without changed ufrag or password.
options.transport_options.ice_restart = false;
- talk_base::scoped_ptr<JsepSessionDescription> updated_offer2(
+ rtc::scoped_ptr<JsepSessionDescription> updated_offer2(
CreateRemoteOffer(options, session_->remote_description()));
SetRemoteDescriptionWithoutError(updated_offer2.release());
- talk_base::scoped_ptr<SessionDescriptionInterface> updated_answer2(
+ rtc::scoped_ptr<SessionDescriptionInterface> updated_answer2(
CreateAnswer(NULL));
CompareIceUfragAndPassword(updated_answer2->description(),
@@ -2967,7 +2967,7 @@
}
TEST_F(WebRtcSessionTest, TestRtpDataChannelConstraintTakesPrecedence) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
constraints_.reset(new FakeConstraints());
constraints_->AddOptional(
@@ -2981,17 +2981,17 @@
}
TEST_F(WebRtcSessionTest, TestCreateOfferWithSctpEnabledWithoutStreams) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
EXPECT_TRUE(offer->description()->GetContentByName("data") == NULL);
EXPECT_TRUE(offer->description()->GetTransportInfoByName("data") == NULL);
}
TEST_F(WebRtcSessionTest, TestCreateAnswerWithSctpInOfferAndNoStreams) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
SetFactoryDtlsSrtp();
InitWithDtls();
@@ -3003,7 +3003,7 @@
SetRemoteDescriptionWithoutError(offer);
// Verifies the answer contains SCTP.
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(CreateAnswer(NULL));
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(CreateAnswer(NULL));
EXPECT_TRUE(answer != NULL);
EXPECT_TRUE(answer->description()->GetContentByName("data") != NULL);
EXPECT_TRUE(answer->description()->GetTransportInfoByName("data") != NULL);
@@ -3020,7 +3020,7 @@
}
TEST_F(WebRtcSessionTest, TestSctpDataChannelWithDtls) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
@@ -3029,7 +3029,7 @@
}
TEST_F(WebRtcSessionTest, TestDisableSctpDataChannels) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
options_.disable_sctp_data_channels = true;
InitWithDtls();
@@ -3038,7 +3038,7 @@
}
TEST_F(WebRtcSessionTest, TestSctpDataChannelSendPortParsing) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
const int new_send_port = 9998;
const int new_recv_port = 7775;
@@ -3068,7 +3068,7 @@
webrtc::InternalDataChannelInit dci;
dci.reliable = true;
EXPECT_EQ(cricket::DCT_SCTP, data_engine_->last_channel_type());
- talk_base::scoped_refptr<webrtc::DataChannel> dc =
+ rtc::scoped_refptr<webrtc::DataChannel> dc =
session_->CreateDataChannel("datachannel", &dci);
cricket::FakeDataMediaChannel* ch = data_engine_->GetChannel(0);
@@ -3094,12 +3094,12 @@
// Verifies that CreateOffer succeeds when CreateOffer is called before async
// identity generation is finished.
TEST_F(WebRtcSessionTest, TestCreateOfferBeforeIdentityRequestReturnSuccess) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
EXPECT_TRUE(session_->waiting_for_identity());
mediastream_signaling_.SendAudioVideoStream1();
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
EXPECT_TRUE(offer != NULL);
VerifyNoCryptoParams(offer->description(), true);
VerifyFingerprintStatus(offer->description(), true);
@@ -3108,7 +3108,7 @@
// Verifies that CreateAnswer succeeds when CreateOffer is called before async
// identity generation is finished.
TEST_F(WebRtcSessionTest, TestCreateAnswerBeforeIdentityRequestReturnSuccess) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
SetFactoryDtlsSrtp();
@@ -3119,7 +3119,7 @@
ASSERT_TRUE(offer.get() != NULL);
SetRemoteDescriptionWithoutError(offer.release());
- talk_base::scoped_ptr<SessionDescriptionInterface> answer(CreateAnswer(NULL));
+ rtc::scoped_ptr<SessionDescriptionInterface> answer(CreateAnswer(NULL));
EXPECT_TRUE(answer != NULL);
VerifyNoCryptoParams(answer->description(), true);
VerifyFingerprintStatus(answer->description(), true);
@@ -3128,22 +3128,22 @@
// Verifies that CreateOffer succeeds when CreateOffer is called after async
// identity generation is finished.
TEST_F(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnSuccess) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
EXPECT_TRUE_WAIT(!session_->waiting_for_identity(), 1000);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
EXPECT_TRUE(offer != NULL);
}
// Verifies that CreateOffer fails when CreateOffer is called after async
// identity generation fails.
TEST_F(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnFailure) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls(true);
EXPECT_TRUE_WAIT(!session_->waiting_for_identity(), 1000);
- talk_base::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
+ rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer(NULL));
EXPECT_TRUE(offer == NULL);
}
@@ -3151,7 +3151,7 @@
// before async identity generation is finished.
TEST_F(WebRtcSessionTest,
TestMultipleCreateOfferBeforeIdentityRequestReturnSuccess) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
VerifyMultipleAsyncCreateDescription(
true, CreateSessionDescriptionRequest::kOffer);
}
@@ -3160,7 +3160,7 @@
// before async identity generation fails.
TEST_F(WebRtcSessionTest,
TestMultipleCreateOfferBeforeIdentityRequestReturnFailure) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
VerifyMultipleAsyncCreateDescription(
false, CreateSessionDescriptionRequest::kOffer);
}
@@ -3169,7 +3169,7 @@
// before async identity generation is finished.
TEST_F(WebRtcSessionTest,
TestMultipleCreateAnswerBeforeIdentityRequestReturnSuccess) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
VerifyMultipleAsyncCreateDescription(
true, CreateSessionDescriptionRequest::kAnswer);
}
@@ -3178,7 +3178,7 @@
// before async identity generation fails.
TEST_F(WebRtcSessionTest,
TestMultipleCreateAnswerBeforeIdentityRequestReturnFailure) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
VerifyMultipleAsyncCreateDescription(
false, CreateSessionDescriptionRequest::kAnswer);
}
@@ -3198,8 +3198,8 @@
ASSERT_TRUE(audio != NULL);
ASSERT_TRUE(audio->description.identity_fingerprint.get() == NULL);
audio->description.identity_fingerprint.reset(
- talk_base::SSLFingerprint::CreateFromRfc4572(
- talk_base::DIGEST_SHA_256, kFakeDtlsFingerprint));
+ rtc::SSLFingerprint::CreateFromRfc4572(
+ rtc::DIGEST_SHA_256, kFakeDtlsFingerprint));
SetRemoteDescriptionOfferExpectError(kSdpWithoutSdesCrypto,
offer);
}
@@ -3253,7 +3253,7 @@
// Tests that we can renegotiate new media content with ICE candidates in the
// new remote SDP.
TEST_F(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesInSdp) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
SetFactoryDtlsSrtp();
@@ -3269,7 +3269,7 @@
offer = CreateRemoteOffer(options, cricket::SEC_DISABLED);
cricket::Candidate candidate1;
- candidate1.set_address(talk_base::SocketAddress("1.1.1.1", 5000));
+ candidate1.set_address(rtc::SocketAddress("1.1.1.1", 5000));
candidate1.set_component(1);
JsepIceCandidate ice_candidate(kMediaContentName1, kMediaContentIndex1,
candidate1);
@@ -3283,7 +3283,7 @@
// Tests that we can renegotiate new media content with ICE candidates separated
// from the remote SDP.
TEST_F(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesSeparated) {
- MAYBE_SKIP_TEST(talk_base::SSLStreamAdapter::HaveDtlsSrtp);
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
InitWithDtls();
SetFactoryDtlsSrtp();
@@ -3300,7 +3300,7 @@
SetRemoteDescriptionWithoutError(offer);
cricket::Candidate candidate1;
- candidate1.set_address(talk_base::SocketAddress("1.1.1.1", 5000));
+ candidate1.set_address(rtc::SocketAddress("1.1.1.1", 5000));
candidate1.set_component(1);
JsepIceCandidate ice_candidate(kMediaContentName1, kMediaContentIndex1,
candidate1);
diff --git a/talk/app/webrtc/webrtcsessiondescriptionfactory.cc b/talk/app/webrtc/webrtcsessiondescriptionfactory.cc
index 25d8fc9..3dce0d3 100644
--- a/talk/app/webrtc/webrtcsessiondescriptionfactory.cc
+++ b/talk/app/webrtc/webrtcsessiondescriptionfactory.cc
@@ -72,15 +72,15 @@
MSG_GENERATE_IDENTITY,
};
-struct CreateSessionDescriptionMsg : public talk_base::MessageData {
+struct CreateSessionDescriptionMsg : public rtc::MessageData {
explicit CreateSessionDescriptionMsg(
webrtc::CreateSessionDescriptionObserver* observer)
: observer(observer) {
}
- talk_base::scoped_refptr<webrtc::CreateSessionDescriptionObserver> observer;
+ rtc::scoped_refptr<webrtc::CreateSessionDescriptionObserver> observer;
std::string error;
- talk_base::scoped_ptr<webrtc::SessionDescriptionInterface> description;
+ rtc::scoped_ptr<webrtc::SessionDescriptionInterface> description;
};
} // namespace
@@ -104,7 +104,7 @@
}
WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory(
- talk_base::Thread* signaling_thread,
+ rtc::Thread* signaling_thread,
cricket::ChannelManager* channel_manager,
MediaStreamSignaling* mediastream_signaling,
DTLSIdentityServiceInterface* dtls_identity_service,
@@ -136,7 +136,7 @@
if (identity_service_.get()) {
identity_request_observer_ =
- new talk_base::RefCountedObject<WebRtcIdentityRequestObserver>();
+ new rtc::RefCountedObject<WebRtcIdentityRequestObserver>();
identity_request_observer_->SignalRequestFailed.connect(
this, &WebRtcSessionDescriptionFactory::OnIdentityRequestFailed);
@@ -270,7 +270,7 @@
return session_desc_factory_.secure();
}
-void WebRtcSessionDescriptionFactory::OnMessage(talk_base::Message* msg) {
+void WebRtcSessionDescriptionFactory::OnMessage(rtc::Message* msg) {
switch (msg->message_id) {
case MSG_CREATE_SESSIONDESCRIPTION_SUCCESS: {
CreateSessionDescriptionMsg* param =
@@ -288,7 +288,7 @@
}
case MSG_GENERATE_IDENTITY: {
LOG(LS_INFO) << "Generating identity.";
- SetIdentity(talk_base::SSLIdentity::Generate(kWebRTCIdentityName));
+ SetIdentity(rtc::SSLIdentity::Generate(kWebRTCIdentityName));
break;
}
default:
@@ -316,7 +316,7 @@
JsepSessionDescription* offer(new JsepSessionDescription(
JsepSessionDescription::kOffer));
if (!offer->Initialize(desc, session_id_,
- talk_base::ToString(session_version_++))) {
+ rtc::ToString(session_version_++))) {
delete offer;
PostCreateSessionDescriptionFailed(request.observer,
"Failed to initialize the offer.");
@@ -339,10 +339,10 @@
request.options.transport_options.ice_restart = session_->IceRestartPending();
// We should pass current ssl role to the transport description factory, if
// there is already an existing ongoing session.
- talk_base::SSLRole ssl_role;
+ rtc::SSLRole ssl_role;
if (session_->GetSslRole(&ssl_role)) {
request.options.transport_options.prefer_passive_role =
- (talk_base::SSL_SERVER == ssl_role);
+ (rtc::SSL_SERVER == ssl_role);
}
cricket::SessionDescription* desc(session_desc_factory_.CreateAnswer(
@@ -360,7 +360,7 @@
JsepSessionDescription* answer(new JsepSessionDescription(
JsepSessionDescription::kAnswer));
if (!answer->Initialize(desc, session_id_,
- talk_base::ToString(session_version_++))) {
+ rtc::ToString(session_version_++))) {
delete answer;
PostCreateSessionDescriptionFailed(request.observer,
"Failed to initialize the answer.");
@@ -416,22 +416,22 @@
ASSERT(signaling_thread_->IsCurrent());
LOG(LS_VERBOSE) << "Identity is successfully generated.";
- std::string pem_cert = talk_base::SSLIdentity::DerToPem(
- talk_base::kPemTypeCertificate,
+ std::string pem_cert = rtc::SSLIdentity::DerToPem(
+ rtc::kPemTypeCertificate,
reinterpret_cast<const unsigned char*>(der_cert.data()),
der_cert.length());
- std::string pem_key = talk_base::SSLIdentity::DerToPem(
- talk_base::kPemTypeRsaPrivateKey,
+ std::string pem_key = rtc::SSLIdentity::DerToPem(
+ rtc::kPemTypeRsaPrivateKey,
reinterpret_cast<const unsigned char*>(der_private_key.data()),
der_private_key.length());
- talk_base::SSLIdentity* identity =
- talk_base::SSLIdentity::FromPEMStrings(pem_key, pem_cert);
+ rtc::SSLIdentity* identity =
+ rtc::SSLIdentity::FromPEMStrings(pem_key, pem_cert);
SetIdentity(identity);
}
void WebRtcSessionDescriptionFactory::SetIdentity(
- talk_base::SSLIdentity* identity) {
+ rtc::SSLIdentity* identity) {
identity_request_state_ = IDENTITY_SUCCEEDED;
SignalIdentityReady(identity);
diff --git a/talk/app/webrtc/webrtcsessiondescriptionfactory.h b/talk/app/webrtc/webrtcsessiondescriptionfactory.h
index cad0c65..b09cfcd 100644
--- a/talk/app/webrtc/webrtcsessiondescriptionfactory.h
+++ b/talk/app/webrtc/webrtcsessiondescriptionfactory.h
@@ -29,7 +29,7 @@
#define TALK_APP_WEBRTC_WEBRTCSESSIONDESCRIPTIONFACTORY_H_
#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/base/messagehandler.h"
+#include "webrtc/base/messagehandler.h"
#include "talk/p2p/base/transportdescriptionfactory.h"
#include "talk/session/media/mediasession.h"
@@ -77,7 +77,7 @@
options(options) {}
Type type;
- talk_base::scoped_refptr<CreateSessionDescriptionObserver> observer;
+ rtc::scoped_refptr<CreateSessionDescriptionObserver> observer;
cricket::MediaSessionOptions options;
};
@@ -86,11 +86,11 @@
// It queues the create offer/answer request until the DTLS identity
// request has completed, i.e. when OnIdentityRequestFailed or OnIdentityReady
// is called.
-class WebRtcSessionDescriptionFactory : public talk_base::MessageHandler,
+class WebRtcSessionDescriptionFactory : public rtc::MessageHandler,
public sigslot::has_slots<> {
public:
WebRtcSessionDescriptionFactory(
- talk_base::Thread* signaling_thread,
+ rtc::Thread* signaling_thread,
cricket::ChannelManager* channel_manager,
MediaStreamSignaling* mediastream_signaling,
DTLSIdentityServiceInterface* dtls_identity_service,
@@ -115,7 +115,7 @@
void SetSdesPolicy(cricket::SecurePolicy secure_policy);
cricket::SecurePolicy SdesPolicy() const;
- sigslot::signal1<talk_base::SSLIdentity*> SignalIdentityReady;
+ sigslot::signal1<rtc::SSLIdentity*> SignalIdentityReady;
// For testing.
bool waiting_for_identity() const {
@@ -131,7 +131,7 @@
};
// MessageHandler implementation.
- virtual void OnMessage(talk_base::Message* msg);
+ virtual void OnMessage(rtc::Message* msg);
void InternalCreateOffer(CreateSessionDescriptionRequest request);
void InternalCreateAnswer(CreateSessionDescriptionRequest request);
@@ -145,17 +145,17 @@
void OnIdentityRequestFailed(int error);
void OnIdentityReady(const std::string& der_cert,
const std::string& der_private_key);
- void SetIdentity(talk_base::SSLIdentity* identity);
+ void SetIdentity(rtc::SSLIdentity* identity);
std::queue<CreateSessionDescriptionRequest>
create_session_description_requests_;
- talk_base::Thread* signaling_thread_;
+ rtc::Thread* signaling_thread_;
MediaStreamSignaling* mediastream_signaling_;
cricket::TransportDescriptionFactory transport_desc_factory_;
cricket::MediaSessionDescriptionFactory session_desc_factory_;
uint64 session_version_;
- talk_base::scoped_ptr<DTLSIdentityServiceInterface> identity_service_;
- talk_base::scoped_refptr<WebRtcIdentityRequestObserver>
+ rtc::scoped_ptr<DTLSIdentityServiceInterface> identity_service_;
+ rtc::scoped_refptr<WebRtcIdentityRequestObserver>
identity_request_observer_;
WebRtcSession* session_;
std::string session_id_;