Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: webrtc/pc/channel_unittest.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/pc/channel_unittest.cc
diff --git a/webrtc/pc/channel_unittest.cc b/webrtc/pc/channel_unittest.cc
index 4605ad9a08ddb3d700b5eeb4d0e256ab1e2668c5..323f50d5fc26110f139f8604c121537dd4067ca2 100644
--- a/webrtc/pc/channel_unittest.cc
+++ b/webrtc/pc/channel_unittest.cc
@@ -120,8 +120,8 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
}
void CreateChannels(int flags1, int flags2) {
- CreateChannels(new typename T::MediaChannel(NULL, typename T::Options()),
- new typename T::MediaChannel(NULL, typename T::Options()),
+ CreateChannels(new typename T::MediaChannel(nullptr, typename T::Options()),
+ new typename T::MediaChannel(nullptr, typename T::Options()),
flags1, flags2);
}
void CreateChannels(typename T::MediaChannel* ch1,
@@ -273,7 +273,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
fake_rtp_packet_transport,
fake_rtcp_packet_transport)) {
delete channel;
- channel = NULL;
+ channel = nullptr;
}
return channel;
}
@@ -302,16 +302,16 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
}
bool SendInitiate() {
- bool result = channel1_->SetLocalContent(&local_media_content1_,
- CA_OFFER, NULL);
+ bool result =
+ channel1_->SetLocalContent(&local_media_content1_, CA_OFFER, nullptr);
if (result) {
channel1_->Enable(true);
- result = channel2_->SetRemoteContent(&remote_media_content1_,
- CA_OFFER, NULL);
+ result = channel2_->SetRemoteContent(&remote_media_content1_, CA_OFFER,
+ nullptr);
if (result) {
ConnectFakeTransports();
- result = channel2_->SetLocalContent(&local_media_content2_,
- CA_ANSWER, NULL);
+ result = channel2_->SetLocalContent(&local_media_content2_, CA_ANSWER,
+ nullptr);
}
}
return result;
@@ -319,39 +319,39 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
bool SendAccept() {
channel2_->Enable(true);
- return channel1_->SetRemoteContent(&remote_media_content2_,
- CA_ANSWER, NULL);
+ return channel1_->SetRemoteContent(&remote_media_content2_, CA_ANSWER,
+ nullptr);
}
bool SendOffer() {
- bool result = channel1_->SetLocalContent(&local_media_content1_,
- CA_OFFER, NULL);
+ bool result =
+ channel1_->SetLocalContent(&local_media_content1_, CA_OFFER, nullptr);
if (result) {
channel1_->Enable(true);
- result = channel2_->SetRemoteContent(&remote_media_content1_,
- CA_OFFER, NULL);
+ result = channel2_->SetRemoteContent(&remote_media_content1_, CA_OFFER,
+ nullptr);
}
return result;
}
bool SendProvisionalAnswer() {
bool result = channel2_->SetLocalContent(&local_media_content2_,
- CA_PRANSWER, NULL);
+ CA_PRANSWER, nullptr);
if (result) {
channel2_->Enable(true);
- result = channel1_->SetRemoteContent(&remote_media_content2_,
- CA_PRANSWER, NULL);
+ result = channel1_->SetRemoteContent(&remote_media_content2_, CA_PRANSWER,
+ nullptr);
ConnectFakeTransports();
}
return result;
}
bool SendFinalAnswer() {
- bool result = channel2_->SetLocalContent(&local_media_content2_,
- CA_ANSWER, NULL);
+ bool result =
+ channel2_->SetLocalContent(&local_media_content2_, CA_ANSWER, nullptr);
if (result)
- result = channel1_->SetRemoteContent(&remote_media_content2_,
- CA_ANSWER, NULL);
+ result = channel1_->SetRemoteContent(&remote_media_content2_, CA_ANSWER,
+ nullptr);
return result;
}
@@ -587,9 +587,9 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
CreateChannels(0, 0);
typename T::Content content;
CreateContent(0, kPcmuCodec, kH264Codec, &content);
- EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, nullptr));
EXPECT_EQ(0U, media_channel1_->codecs().size());
- EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, nullptr));
ASSERT_EQ(1U, media_channel1_->codecs().size());
EXPECT_TRUE(CodecMatches(content.codecs()[0],
media_channel1_->codecs()[0]));
@@ -600,10 +600,10 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
void TestSetContentsNullOffer() {
CreateChannels(0, 0);
typename T::Content content;
- EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, nullptr));
CreateContent(0, kPcmuCodec, kH264Codec, &content);
EXPECT_EQ(0U, media_channel1_->codecs().size());
- EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, nullptr));
ASSERT_EQ(1U, media_channel1_->codecs().size());
EXPECT_TRUE(CodecMatches(content.codecs()[0],
media_channel1_->codecs()[0]));
@@ -617,12 +617,12 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
CreateContent(0, kPcmuCodec, kH264Codec, &content);
// Both sides agree on mux. Should no longer be a separate RTCP channel.
content.set_rtcp_mux(true);
- EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, NULL));
- EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, nullptr));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, nullptr));
// Only initiator supports mux. Should still have a separate RTCP channel.
- EXPECT_TRUE(channel2_->SetLocalContent(&content, CA_OFFER, NULL));
+ EXPECT_TRUE(channel2_->SetLocalContent(&content, CA_OFFER, nullptr));
content.set_rtcp_mux(false);
- EXPECT_TRUE(channel2_->SetRemoteContent(&content, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel2_->SetRemoteContent(&content, CA_ANSWER, nullptr));
}
// Test that SetLocalContent and SetRemoteContent properly set RTCP
@@ -632,17 +632,17 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
typename T::Content content;
CreateContent(0, kPcmuCodec, kH264Codec, &content);
content.set_rtcp_mux(true);
- EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, NULL));
- EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_PRANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, nullptr));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_PRANSWER, nullptr));
// Both sides agree on mux. Should signal RTCP mux as fully activated.
EXPECT_EQ(0, rtcp_mux_activated_callbacks1_);
- EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, nullptr));
EXPECT_EQ(1, rtcp_mux_activated_callbacks1_);
// Only initiator supports mux. Should still have a separate RTCP channel.
- EXPECT_TRUE(channel2_->SetLocalContent(&content, CA_OFFER, NULL));
+ EXPECT_TRUE(channel2_->SetLocalContent(&content, CA_OFFER, nullptr));
content.set_rtcp_mux(false);
- EXPECT_TRUE(channel2_->SetRemoteContent(&content, CA_PRANSWER, NULL));
- EXPECT_TRUE(channel2_->SetRemoteContent(&content, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel2_->SetRemoteContent(&content, CA_PRANSWER, nullptr));
+ EXPECT_TRUE(channel2_->SetRemoteContent(&content, CA_ANSWER, nullptr));
EXPECT_EQ(0, rtcp_mux_activated_callbacks2_);
}
@@ -652,8 +652,8 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
typename T::Content content;
CreateContent(RTCP_MUX | SECURE, kPcmuCodec, kH264Codec, &content);
EXPECT_EQ(0U, media_channel1_->codecs().size());
- EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, NULL));
- EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, nullptr));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, nullptr));
ASSERT_EQ(1U, media_channel1_->codecs().size());
EXPECT_TRUE(CodecMatches(content.codecs()[0],
media_channel1_->codecs()[0]));
@@ -662,14 +662,16 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
update_content.set_partial(true);
CreateContent(0, kIsacCodec, kH264SvcCodec,
&update_content);
- EXPECT_TRUE(channel1_->SetRemoteContent(&update_content, CA_UPDATE, NULL));
+ EXPECT_TRUE(
+ channel1_->SetRemoteContent(&update_content, CA_UPDATE, nullptr));
ASSERT_EQ(1U, media_channel1_->codecs().size());
EXPECT_TRUE(CodecMatches(update_content.codecs()[0],
media_channel1_->codecs()[0]));
// Now update without any codecs. This is ignored.
typename T::Content empty_content;
empty_content.set_partial(true);
- EXPECT_TRUE(channel1_->SetRemoteContent(&empty_content, CA_UPDATE, NULL));
+ EXPECT_TRUE(
+ channel1_->SetRemoteContent(&empty_content, CA_UPDATE, nullptr));
ASSERT_EQ(1U, media_channel1_->codecs().size());
EXPECT_TRUE(CodecMatches(update_content.codecs()[0],
media_channel1_->codecs()[0]));
@@ -715,7 +717,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
CreateContent(0, kPcmuCodec, kH264Codec, &content1);
content1.AddStream(stream1);
EXPECT_EQ(0u, media_channel1_->send_streams().size());
- EXPECT_TRUE(channel1_->SetLocalContent(&content1, CA_OFFER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content1, CA_OFFER, nullptr));
ASSERT_EQ(1u, media_channel1_->send_streams().size());
EXPECT_EQ(stream1, media_channel1_->send_streams()[0]);
@@ -726,7 +728,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
content2.AddStream(stream2);
content2.AddStream(stream3);
content2.set_partial(true);
- EXPECT_TRUE(channel1_->SetLocalContent(&content2, CA_UPDATE, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content2, CA_UPDATE, nullptr));
ASSERT_EQ(3u, media_channel1_->send_streams().size());
EXPECT_EQ(stream1, media_channel1_->send_streams()[0]);
EXPECT_EQ(stream2, media_channel1_->send_streams()[1]);
@@ -738,7 +740,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
stream1.ssrcs.clear();
content3.AddStream(stream1);
content3.set_partial(true);
- EXPECT_TRUE(channel1_->SetLocalContent(&content3, CA_UPDATE, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content3, CA_UPDATE, nullptr));
ASSERT_EQ(2u, media_channel1_->send_streams().size());
EXPECT_EQ(stream2, media_channel1_->send_streams()[0]);
EXPECT_EQ(stream3, media_channel1_->send_streams()[1]);
@@ -748,7 +750,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
typename T::Content content4;
content4.AddStream(stream2);
content4.set_partial(true);
- EXPECT_TRUE(channel1_->SetLocalContent(&content4, CA_UPDATE, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content4, CA_UPDATE, nullptr));
ASSERT_EQ(2u, media_channel1_->send_streams().size());
EXPECT_EQ(stream2, media_channel1_->send_streams()[0]);
EXPECT_EQ(stream3, media_channel1_->send_streams()[1]);
@@ -782,7 +784,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
CreateContent(0, kPcmuCodec, kH264Codec, &content1);
content1.AddStream(stream1);
EXPECT_EQ(0u, media_channel1_->recv_streams().size());
- EXPECT_TRUE(channel1_->SetRemoteContent(&content1, CA_OFFER, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content1, CA_OFFER, nullptr));
ASSERT_EQ(1u, media_channel1_->codecs().size());
ASSERT_EQ(1u, media_channel1_->recv_streams().size());
@@ -794,7 +796,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
content2.AddStream(stream2);
content2.AddStream(stream3);
content2.set_partial(true);
- EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_UPDATE, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_UPDATE, nullptr));
ASSERT_EQ(3u, media_channel1_->recv_streams().size());
EXPECT_EQ(stream1, media_channel1_->recv_streams()[0]);
EXPECT_EQ(stream2, media_channel1_->recv_streams()[1]);
@@ -806,7 +808,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
stream1.ssrcs.clear();
content3.AddStream(stream1);
content3.set_partial(true);
- EXPECT_TRUE(channel1_->SetRemoteContent(&content3, CA_UPDATE, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content3, CA_UPDATE, nullptr));
ASSERT_EQ(2u, media_channel1_->recv_streams().size());
EXPECT_EQ(stream2, media_channel1_->recv_streams()[0]);
EXPECT_EQ(stream3, media_channel1_->recv_streams()[1]);
@@ -816,7 +818,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
typename T::Content content4;
content4.AddStream(stream2);
content4.set_partial(true);
- EXPECT_TRUE(channel1_->SetRemoteContent(&content4, CA_UPDATE, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content4, CA_UPDATE, nullptr));
ASSERT_EQ(2u, media_channel1_->recv_streams().size());
EXPECT_EQ(stream2, media_channel1_->recv_streams()[0]);
EXPECT_EQ(stream3, media_channel1_->recv_streams()[1]);
@@ -843,20 +845,20 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
typename T::Content content1;
CreateContent(0, kPcmuCodec, kH264Codec, &content1);
content1.AddStream(stream1);
- EXPECT_TRUE(channel1_->SetLocalContent(&content1, CA_OFFER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content1, CA_OFFER, nullptr));
EXPECT_TRUE(channel1_->Enable(true));
EXPECT_EQ(1u, media_channel1_->send_streams().size());
- EXPECT_TRUE(channel2_->SetRemoteContent(&content1, CA_OFFER, NULL));
+ EXPECT_TRUE(channel2_->SetRemoteContent(&content1, CA_OFFER, nullptr));
EXPECT_EQ(1u, media_channel2_->recv_streams().size());
ConnectFakeTransports();
// Channel 2 do not send anything.
typename T::Content content2;
CreateContent(0, kPcmuCodec, kH264Codec, &content2);
- EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_ANSWER, nullptr));
EXPECT_EQ(0u, media_channel1_->recv_streams().size());
- EXPECT_TRUE(channel2_->SetLocalContent(&content2, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel2_->SetLocalContent(&content2, CA_ANSWER, nullptr));
EXPECT_TRUE(channel2_->Enable(true));
EXPECT_EQ(0u, media_channel2_->send_streams().size());
@@ -868,21 +870,21 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
typename T::Content content3;
CreateContent(SECURE, kPcmuCodec, kH264Codec, &content3);
content3.AddStream(stream2);
- EXPECT_TRUE(channel2_->SetLocalContent(&content3, CA_OFFER, NULL));
+ EXPECT_TRUE(channel2_->SetLocalContent(&content3, CA_OFFER, nullptr));
ASSERT_EQ(1u, media_channel2_->send_streams().size());
EXPECT_EQ(stream2, media_channel2_->send_streams()[0]);
- EXPECT_TRUE(channel1_->SetRemoteContent(&content3, CA_OFFER, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content3, CA_OFFER, nullptr));
ASSERT_EQ(1u, media_channel1_->recv_streams().size());
EXPECT_EQ(stream2, media_channel1_->recv_streams()[0]);
// Channel 1 replies but stop sending stream1.
typename T::Content content4;
CreateContent(SECURE, kPcmuCodec, kH264Codec, &content4);
- EXPECT_TRUE(channel1_->SetLocalContent(&content4, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content4, CA_ANSWER, nullptr));
EXPECT_EQ(0u, media_channel1_->send_streams().size());
- EXPECT_TRUE(channel2_->SetRemoteContent(&content4, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel2_->SetRemoteContent(&content4, CA_ANSWER, nullptr));
EXPECT_EQ(0u, media_channel2_->recv_streams().size());
EXPECT_TRUE(channel1_->secure());
@@ -908,20 +910,20 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
EXPECT_FALSE(media_channel1_->playout());
}
EXPECT_FALSE(media_channel1_->sending());
- EXPECT_TRUE(channel1_->SetLocalContent(&local_media_content1_,
- CA_OFFER, NULL));
+ EXPECT_TRUE(
+ channel1_->SetLocalContent(&local_media_content1_, CA_OFFER, nullptr));
if (verify_playout_) {
EXPECT_TRUE(media_channel1_->playout());
}
EXPECT_FALSE(media_channel1_->sending());
- EXPECT_TRUE(channel2_->SetRemoteContent(&local_media_content1_,
- CA_OFFER, NULL));
+ EXPECT_TRUE(
+ channel2_->SetRemoteContent(&local_media_content1_, CA_OFFER, nullptr));
if (verify_playout_) {
EXPECT_FALSE(media_channel2_->playout());
}
EXPECT_FALSE(media_channel2_->sending());
- EXPECT_TRUE(channel2_->SetLocalContent(&local_media_content2_,
- CA_ANSWER, NULL));
+ EXPECT_TRUE(
+ channel2_->SetLocalContent(&local_media_content2_, CA_ANSWER, nullptr));
if (verify_playout_) {
EXPECT_FALSE(media_channel2_->playout());
}
@@ -940,8 +942,8 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
EXPECT_TRUE(media_channel2_->playout());
}
EXPECT_TRUE(media_channel2_->sending());
- EXPECT_TRUE(channel1_->SetRemoteContent(&local_media_content2_,
- CA_ANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&local_media_content2_, CA_ANSWER,
+ nullptr));
if (verify_playout_) {
EXPECT_TRUE(media_channel1_->playout());
}
@@ -970,10 +972,10 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
}
EXPECT_FALSE(media_channel2_->sending());
- EXPECT_TRUE(channel1_->SetLocalContent(&content1, CA_OFFER, NULL));
- EXPECT_TRUE(channel2_->SetRemoteContent(&content1, CA_OFFER, NULL));
- EXPECT_TRUE(channel2_->SetLocalContent(&content2, CA_PRANSWER, NULL));
- EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_PRANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content1, CA_OFFER, nullptr));
+ EXPECT_TRUE(channel2_->SetRemoteContent(&content1, CA_OFFER, nullptr));
+ EXPECT_TRUE(channel2_->SetLocalContent(&content2, CA_PRANSWER, nullptr));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_PRANSWER, nullptr));
ConnectFakeTransports();
if (verify_playout_) {
@@ -987,8 +989,8 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
// Update |content2| to be RecvOnly.
content2.set_direction(cricket::MD_RECVONLY);
- EXPECT_TRUE(channel2_->SetLocalContent(&content2, CA_PRANSWER, NULL));
- EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_PRANSWER, NULL));
+ EXPECT_TRUE(channel2_->SetLocalContent(&content2, CA_PRANSWER, nullptr));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_PRANSWER, nullptr));
if (verify_playout_) {
EXPECT_TRUE(media_channel1_->playout());
@@ -1001,8 +1003,8 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
// Update |content2| to be SendRecv.
content2.set_direction(cricket::MD_SENDRECV);
- EXPECT_TRUE(channel2_->SetLocalContent(&content2, CA_ANSWER, NULL));
- EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel2_->SetLocalContent(&content2, CA_ANSWER, nullptr));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_ANSWER, nullptr));
if (verify_playout_) {
EXPECT_TRUE(media_channel1_->playout());
@@ -1091,7 +1093,8 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
void TestCallTeardownRtcpMux() {
class LastWordMediaChannel : public T::MediaChannel {
public:
- LastWordMediaChannel() : T::MediaChannel(NULL, typename T::Options()) {}
+ LastWordMediaChannel()
+ : T::MediaChannel(nullptr, typename T::Options()) {}
~LastWordMediaChannel() {
T::MediaChannel::SendRtp(kPcmuFrame, sizeof(kPcmuFrame),
rtc::PacketOptions());
@@ -1929,9 +1932,9 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
CreateContent(0, kPcmuCodec, kH264Codec, &content);
// Both sides agree on mux. Should signal that RTCP mux is fully active.
content.set_rtcp_mux(true);
- EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, NULL));
+ EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, nullptr));
EXPECT_EQ(0, rtcp_mux_activated_callbacks1_);
- EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, NULL));
+ EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, nullptr));
EXPECT_EQ(1, rtcp_mux_activated_callbacks1_);
cricket::FakeDtlsTransport* rtp = fake_rtp_dtls_transport1_.get();
EXPECT_FALSE(media_channel1_->ready_to_send());
@@ -1953,7 +1956,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
typename T::Content content;
CreateContent(0, kPcmuCodec, kH264Codec, &content);
content.set_bandwidth(remote_limit);
- return channel1_->SetRemoteContent(&content, CA_OFFER, NULL);
+ return channel1_->SetRemoteContent(&content, CA_OFFER, nullptr);
}
webrtc::RtpParameters BitrateLimitedParameters(rtc::Optional<int> limit) {
@@ -1973,7 +1976,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
void DefaultMaxBitrateIsUnlimited() {
CreateChannels(0, 0);
EXPECT_TRUE(
- channel1_->SetLocalContent(&local_media_content1_, CA_OFFER, NULL));
+ channel1_->SetLocalContent(&local_media_content1_, CA_OFFER, nullptr));
EXPECT_EQ(media_channel1_->max_bps(), -1);
VerifyMaxBitrate(media_channel1_->GetRtpSendParameters(kSsrc1),
rtc::Optional<int>());
@@ -1982,7 +1985,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
void CanChangeMaxBitrate() {
CreateChannels(0, 0);
EXPECT_TRUE(
- channel1_->SetLocalContent(&local_media_content1_, CA_OFFER, NULL));
+ channel1_->SetLocalContent(&local_media_content1_, CA_OFFER, nullptr));
EXPECT_TRUE(channel1_->SetRtpSendParameters(
kSsrc1, BitrateLimitedParameters(rtc::Optional<int>(1000))));
@@ -2108,7 +2111,7 @@ class VoiceChannelDoubleThreadTest : public ChannelTest<VoiceTraits> {
: Base(true, kPcmuFrame, kRtcpReport, NetworkIsWorker::No) {}
};
-// override to add NULL parameter
+// override to add null parameter
template <>
cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel(
rtc::Thread* worker_thread,
@@ -2133,7 +2136,7 @@ cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel(
if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport,
fake_rtp_packet_transport, fake_rtcp_packet_transport)) {
delete channel;
- channel = NULL;
+ channel = nullptr;
}
return channel;
}
@@ -3371,7 +3374,7 @@ cricket::RtpDataChannel* ChannelTest<DataTraits>::CreateChannel(
if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport,
fake_rtp_packet_transport, fake_rtcp_packet_transport)) {
delete channel;
- channel = NULL;
+ channel = nullptr;
}
return channel;
}
« webrtc/base/event.cc ('K') | « webrtc/pc/channel.cc ('k') | webrtc/pc/channelmanager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698