diff --git a/pc/channel.cc b/pc/channel.cc index 544ef4fddd..8bb37d1433 100644 --- a/pc/channel.cc +++ b/pc/channel.cc @@ -1667,7 +1667,7 @@ bool VoiceChannel::SetRemoteContent_w(const MediaContentDescription* content, RtpSendParametersFromMediaDescription(audio, rtp_header_extensions, &send_params); if (audio->agc_minus_10db()) { - send_params.options.adjust_agc_delta = rtc::Optional(kAgcMinus10db); + send_params.options.adjust_agc_delta = kAgcMinus10db; } bool parameters_applied = media_channel()->SetSendParameters(send_params); diff --git a/pc/channel_unittest.cc b/pc/channel_unittest.cc index 36a6b57d90..181356493c 100644 --- a/pc/channel_unittest.cc +++ b/pc/channel_unittest.cc @@ -1866,7 +1866,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> { channel1_->SetLocalContent(&local_media_content1_, CA_OFFER, NULL)); EXPECT_EQ(media_channel1_->max_bps(), -1); VerifyMaxBitrate(media_channel1_->GetRtpSendParameters(kSsrc1), - rtc::Optional()); + rtc::nullopt); } void CanChangeMaxBitrate() { @@ -1875,19 +1875,16 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> { channel1_->SetLocalContent(&local_media_content1_, CA_OFFER, NULL)); EXPECT_TRUE(channel1_->SetRtpSendParameters( - kSsrc1, BitrateLimitedParameters(rtc::Optional(1000)))); - VerifyMaxBitrate(channel1_->GetRtpSendParameters(kSsrc1), - rtc::Optional(1000)); - VerifyMaxBitrate(media_channel1_->GetRtpSendParameters(kSsrc1), - rtc::Optional(1000)); + kSsrc1, BitrateLimitedParameters(1000))); + VerifyMaxBitrate(channel1_->GetRtpSendParameters(kSsrc1), 1000); + VerifyMaxBitrate(media_channel1_->GetRtpSendParameters(kSsrc1), 1000); EXPECT_EQ(-1, media_channel1_->max_bps()); EXPECT_TRUE(channel1_->SetRtpSendParameters( - kSsrc1, BitrateLimitedParameters(rtc::Optional()))); - VerifyMaxBitrate(channel1_->GetRtpSendParameters(kSsrc1), - rtc::Optional()); + kSsrc1, BitrateLimitedParameters(rtc::nullopt))); + VerifyMaxBitrate(channel1_->GetRtpSendParameters(kSsrc1), rtc::nullopt); VerifyMaxBitrate(media_channel1_->GetRtpSendParameters(kSsrc1), - rtc::Optional()); + rtc::nullopt); EXPECT_EQ(-1, media_channel1_->max_bps()); } diff --git a/pc/localaudiosource_unittest.cc b/pc/localaudiosource_unittest.cc index 7b74bcedfd..bf566c627e 100644 --- a/pc/localaudiosource_unittest.cc +++ b/pc/localaudiosource_unittest.cc @@ -38,20 +38,20 @@ TEST(LocalAudioSourceTest, SetValidOptions) { rtc::scoped_refptr source = LocalAudioSource::Create(&constraints); - EXPECT_EQ(rtc::Optional(false), source->options().echo_cancellation); - EXPECT_EQ(rtc::Optional(true), source->options().extended_filter_aec); - EXPECT_EQ(rtc::Optional(true), source->options().delay_agnostic_aec); - EXPECT_EQ(rtc::Optional(true), source->options().auto_gain_control); - EXPECT_EQ(rtc::Optional(true), source->options().experimental_agc); - EXPECT_EQ(rtc::Optional(false), source->options().noise_suppression); - EXPECT_EQ(rtc::Optional(true), source->options().highpass_filter); + EXPECT_EQ(false, source->options().echo_cancellation); + EXPECT_EQ(true, source->options().extended_filter_aec); + EXPECT_EQ(true, source->options().delay_agnostic_aec); + EXPECT_EQ(true, source->options().auto_gain_control); + EXPECT_EQ(true, source->options().experimental_agc); + EXPECT_EQ(false, source->options().noise_suppression); + EXPECT_EQ(true, source->options().highpass_filter); } TEST(LocalAudioSourceTest, OptionNotSet) { webrtc::FakeConstraints constraints; rtc::scoped_refptr source = LocalAudioSource::Create(&constraints); - EXPECT_EQ(rtc::Optional(), source->options().highpass_filter); + EXPECT_EQ(rtc::nullopt, source->options().highpass_filter); } TEST(LocalAudioSourceTest, MandatoryOverridesOptional) { @@ -64,7 +64,7 @@ TEST(LocalAudioSourceTest, MandatoryOverridesOptional) { rtc::scoped_refptr source = LocalAudioSource::Create(&constraints); - EXPECT_EQ(rtc::Optional(false), source->options().echo_cancellation); + EXPECT_EQ(false, source->options().echo_cancellation); } TEST(LocalAudioSourceTest, InvalidOptional) { @@ -76,7 +76,7 @@ TEST(LocalAudioSourceTest, InvalidOptional) { LocalAudioSource::Create(&constraints); EXPECT_EQ(MediaSourceInterface::kLive, source->state()); - EXPECT_EQ(rtc::Optional(false), source->options().highpass_filter); + EXPECT_EQ(false, source->options().highpass_filter); } TEST(LocalAudioSourceTest, InvalidMandatory) { @@ -88,19 +88,19 @@ TEST(LocalAudioSourceTest, InvalidMandatory) { LocalAudioSource::Create(&constraints); EXPECT_EQ(MediaSourceInterface::kLive, source->state()); - EXPECT_EQ(rtc::Optional(false), source->options().highpass_filter); + EXPECT_EQ(false, source->options().highpass_filter); } TEST(LocalAudioSourceTest, InitWithAudioOptions) { cricket::AudioOptions audio_options; - audio_options.highpass_filter = rtc::Optional(true); + audio_options.highpass_filter = true; rtc::scoped_refptr source = LocalAudioSource::Create(&audio_options); - EXPECT_EQ(rtc::Optional(true), source->options().highpass_filter); + EXPECT_EQ(true, source->options().highpass_filter); } TEST(LocalAudioSourceTest, InitWithNoOptions) { rtc::scoped_refptr source = LocalAudioSource::Create((cricket::AudioOptions*)nullptr); - EXPECT_EQ(rtc::Optional(), source->options().highpass_filter); + EXPECT_EQ(rtc::nullopt, source->options().highpass_filter); } diff --git a/pc/mediaconstraintsinterface_unittest.cc b/pc/mediaconstraintsinterface_unittest.cc index 21c547adba..882d09748e 100644 --- a/pc/mediaconstraintsinterface_unittest.cc +++ b/pc/mediaconstraintsinterface_unittest.cc @@ -62,7 +62,7 @@ TEST(MediaConstraintsInterface, CopyConstraintsIntoRtcConfiguration) { // values that are already present. constraints = FakeConstraints(); configuration = old_configuration; - configuration.enable_dtls_srtp = rtc::Optional(true); + configuration.enable_dtls_srtp = true; configuration.audio_jitter_buffer_max_packets = 34; CopyConstraintsIntoRtcConfiguration(&constraints, &configuration); EXPECT_EQ(34, configuration.audio_jitter_buffer_max_packets); diff --git a/pc/rtpsender.cc b/pc/rtpsender.cc index 2f9bf0c3e4..f5f8a71bc9 100644 --- a/pc/rtpsender.cc +++ b/pc/rtpsender.cc @@ -452,17 +452,17 @@ void VideoRtpSender::SetVideoSend() { cricket::VideoOptions options; VideoTrackSourceInterface* source = track_->GetSource(); if (source) { - options.is_screencast = rtc::Optional(source->is_screencast()); + options.is_screencast = source->is_screencast(); options.video_noise_reduction = source->needs_denoising(); } switch (cached_track_content_hint_) { case VideoTrackInterface::ContentHint::kNone: break; case VideoTrackInterface::ContentHint::kFluid: - options.is_screencast = rtc::Optional(false); + options.is_screencast = false; break; case VideoTrackInterface::ContentHint::kDetailed: - options.is_screencast = rtc::Optional(true); + options.is_screencast = true; break; } if (!channel_->SetVideoSend(ssrc_, track_->enabled(), &options, track_)) { diff --git a/pc/rtpsenderreceiver_unittest.cc b/pc/rtpsenderreceiver_unittest.cc index 7ea4d4c712..f5b06d11cb 100644 --- a/pc/rtpsenderreceiver_unittest.cc +++ b/pc/rtpsenderreceiver_unittest.cc @@ -295,12 +295,11 @@ TEST_F(RtpSenderReceiverTest, AddAndDestroyVideoRtpReceiver) { // Test that the AudioRtpSender applies options from the local audio source. TEST_F(RtpSenderReceiverTest, LocalAudioSourceOptionsApplied) { cricket::AudioOptions options; - options.echo_cancellation = rtc::Optional(true); + options.echo_cancellation = true; auto source = LocalAudioSource::Create(&options); CreateAudioRtpSender(source.get()); - EXPECT_EQ(rtc::Optional(true), - voice_media_channel_->options().echo_cancellation); + EXPECT_EQ(true, voice_media_channel_->options().echo_cancellation); DestroyAudioRtpSender(); } @@ -569,18 +568,18 @@ TEST_F(RtpSenderReceiverTest, SetAudioMaxSendBitrate) { webrtc::RtpParameters params = audio_rtp_sender_->GetParameters(); EXPECT_EQ(1, params.encodings.size()); EXPECT_FALSE(params.encodings[0].max_bitrate_bps); - params.encodings[0].max_bitrate_bps = rtc::Optional(1000); + params.encodings[0].max_bitrate_bps = 1000; EXPECT_TRUE(audio_rtp_sender_->SetParameters(params)); // Read back the parameters and verify they have been changed. params = audio_rtp_sender_->GetParameters(); EXPECT_EQ(1, params.encodings.size()); - EXPECT_EQ(rtc::Optional(1000), params.encodings[0].max_bitrate_bps); + EXPECT_EQ(1000, params.encodings[0].max_bitrate_bps); // Verify that the audio channel received the new parameters. params = voice_media_channel_->GetRtpSendParameters(kAudioSsrc); EXPECT_EQ(1, params.encodings.size()); - EXPECT_EQ(rtc::Optional(1000), params.encodings[0].max_bitrate_bps); + EXPECT_EQ(1000, params.encodings[0].max_bitrate_bps); // Verify that the global bitrate limit has not been changed. EXPECT_EQ(-1, voice_media_channel_->max_bps()); @@ -605,18 +604,18 @@ TEST_F(RtpSenderReceiverTest, SetVideoMaxSendBitrate) { webrtc::RtpParameters params = video_rtp_sender_->GetParameters(); EXPECT_EQ(1, params.encodings.size()); EXPECT_FALSE(params.encodings[0].max_bitrate_bps); - params.encodings[0].max_bitrate_bps = rtc::Optional(1000); + params.encodings[0].max_bitrate_bps = 1000; EXPECT_TRUE(video_rtp_sender_->SetParameters(params)); // Read back the parameters and verify they have been changed. params = video_rtp_sender_->GetParameters(); EXPECT_EQ(1, params.encodings.size()); - EXPECT_EQ(rtc::Optional(1000), params.encodings[0].max_bitrate_bps); + EXPECT_EQ(1000, params.encodings[0].max_bitrate_bps); // Verify that the video channel received the new parameters. params = video_media_channel_->GetRtpSendParameters(kVideoSsrc); EXPECT_EQ(1, params.encodings.size()); - EXPECT_EQ(rtc::Optional(1000), params.encodings[0].max_bitrate_bps); + EXPECT_EQ(1000, params.encodings[0].max_bitrate_bps); // Verify that the global bitrate limit has not been changed. EXPECT_EQ(-1, video_media_channel_->max_bps()); @@ -652,24 +651,20 @@ TEST_F(RtpSenderReceiverTest, PropagatesVideoTrackContentHint) { video_track_->set_enabled(true); // |video_track_| is not screencast by default. - EXPECT_EQ(rtc::Optional(false), - video_media_channel_->options().is_screencast); + EXPECT_EQ(false, video_media_channel_->options().is_screencast); // No content hint should be set by default. EXPECT_EQ(VideoTrackInterface::ContentHint::kNone, video_track_->content_hint()); // Setting detailed should turn a non-screencast source into screencast mode. video_track_->set_content_hint(VideoTrackInterface::ContentHint::kDetailed); - EXPECT_EQ(rtc::Optional(true), - video_media_channel_->options().is_screencast); + EXPECT_EQ(true, video_media_channel_->options().is_screencast); // Removing the content hint should turn the track back into non-screencast // mode. video_track_->set_content_hint(VideoTrackInterface::ContentHint::kNone); - EXPECT_EQ(rtc::Optional(false), - video_media_channel_->options().is_screencast); + EXPECT_EQ(false, video_media_channel_->options().is_screencast); // Setting fluid should remain in non-screencast mode (its default). video_track_->set_content_hint(VideoTrackInterface::ContentHint::kFluid); - EXPECT_EQ(rtc::Optional(false), - video_media_channel_->options().is_screencast); + EXPECT_EQ(false, video_media_channel_->options().is_screencast); DestroyVideoRtpSender(); } @@ -683,23 +678,19 @@ TEST_F(RtpSenderReceiverTest, video_track_->set_enabled(true); // |video_track_| with a screencast source should be screencast by default. - EXPECT_EQ(rtc::Optional(true), - video_media_channel_->options().is_screencast); + EXPECT_EQ(true, video_media_channel_->options().is_screencast); // No content hint should be set by default. EXPECT_EQ(VideoTrackInterface::ContentHint::kNone, video_track_->content_hint()); // Setting fluid should turn a screencast source into non-screencast mode. video_track_->set_content_hint(VideoTrackInterface::ContentHint::kFluid); - EXPECT_EQ(rtc::Optional(false), - video_media_channel_->options().is_screencast); + EXPECT_EQ(false, video_media_channel_->options().is_screencast); // Removing the content hint should turn the track back into screencast mode. video_track_->set_content_hint(VideoTrackInterface::ContentHint::kNone); - EXPECT_EQ(rtc::Optional(true), - video_media_channel_->options().is_screencast); + EXPECT_EQ(true, video_media_channel_->options().is_screencast); // Setting detailed should still remain in screencast mode (its default). video_track_->set_content_hint(VideoTrackInterface::ContentHint::kDetailed); - EXPECT_EQ(rtc::Optional(true), - video_media_channel_->options().is_screencast); + EXPECT_EQ(true, video_media_channel_->options().is_screencast); DestroyVideoRtpSender(); } @@ -718,20 +709,17 @@ TEST_F(RtpSenderReceiverTest, video_track_->set_enabled(true); // Sender is not ready to send (no SSRC) so no option should have been set. - EXPECT_EQ(rtc::Optional(), - video_media_channel_->options().is_screencast); + EXPECT_EQ(rtc::nullopt, video_media_channel_->options().is_screencast); // Verify that the content hint is accounted for when video_rtp_sender_ does // get enabled. video_rtp_sender_->SetSsrc(kVideoSsrc); - EXPECT_EQ(rtc::Optional(true), - video_media_channel_->options().is_screencast); + EXPECT_EQ(true, video_media_channel_->options().is_screencast); // And removing the hint should go back to false (to verify that false was // default correctly). video_track_->set_content_hint(VideoTrackInterface::ContentHint::kNone); - EXPECT_EQ(rtc::Optional(false), - video_media_channel_->options().is_screencast); + EXPECT_EQ(false, video_media_channel_->options().is_screencast); DestroyVideoRtpSender(); } diff --git a/pc/srtpfilter.cc b/pc/srtpfilter.cc index a0dee6417e..157fdebff3 100644 --- a/pc/srtpfilter.cc +++ b/pc/srtpfilter.cc @@ -164,8 +164,8 @@ bool SrtpFilter::ResetParams() { offer_params_.clear(); applied_send_params_ = CryptoParams(); applied_recv_params_ = CryptoParams(); - send_cipher_suite_ = rtc::Optional(); - recv_cipher_suite_ = rtc::Optional(); + send_cipher_suite_ = rtc::nullopt; + recv_cipher_suite_ = rtc::nullopt; send_key_.Clear(); recv_key_.Clear(); state_ = ST_INIT; @@ -181,8 +181,7 @@ bool SrtpFilter::ApplySendParams(const CryptoParams& send_params) { return true; } - send_cipher_suite_ = rtc::Optional( - rtc::SrtpCryptoSuiteFromName(send_params.cipher_suite)); + send_cipher_suite_ = rtc::SrtpCryptoSuiteFromName(send_params.cipher_suite); if (send_cipher_suite_ == rtc::SRTP_INVALID_CRYPTO_SUITE) { RTC_LOG(LS_WARNING) << "Unknown crypto suite(s) received:" << " send cipher_suite " << send_params.cipher_suite; @@ -211,8 +210,7 @@ bool SrtpFilter::ApplyRecvParams(const CryptoParams& recv_params) { return true; } - recv_cipher_suite_ = rtc::Optional( - rtc::SrtpCryptoSuiteFromName(recv_params.cipher_suite)); + recv_cipher_suite_ = rtc::SrtpCryptoSuiteFromName(recv_params.cipher_suite); if (recv_cipher_suite_ == rtc::SRTP_INVALID_CRYPTO_SUITE) { RTC_LOG(LS_WARNING) << "Unknown crypto suite(s) received:" << " recv cipher_suite " << recv_params.cipher_suite; diff --git a/pc/statscollector_unittest.cc b/pc/statscollector_unittest.cc index d5bc0ff4a8..d65e3a61c0 100644 --- a/pc/statscollector_unittest.cc +++ b/pc/statscollector_unittest.cc @@ -512,20 +512,13 @@ void InitVoiceSenderInfo(cricket::VoiceSenderInfo* voice_sender_info) { voice_sender_info->echo_delay_std_ms = 111; voice_sender_info->aec_quality_min = 112.0f; voice_sender_info->typing_noise_detected = false; - voice_sender_info->ana_statistics.bitrate_action_counter = - rtc::Optional(113); - voice_sender_info->ana_statistics.channel_action_counter = - rtc::Optional(114); - voice_sender_info->ana_statistics.dtx_action_counter = - rtc::Optional(115); - voice_sender_info->ana_statistics.fec_action_counter = - rtc::Optional(116); - voice_sender_info->ana_statistics.frame_length_increase_counter = - rtc::Optional(117); - voice_sender_info->ana_statistics.frame_length_decrease_counter = - rtc::Optional(118); - voice_sender_info->ana_statistics.uplink_packet_loss_fraction = - rtc::Optional(119.0); + voice_sender_info->ana_statistics.bitrate_action_counter = 113; + voice_sender_info->ana_statistics.channel_action_counter = 114; + voice_sender_info->ana_statistics.dtx_action_counter = 115; + voice_sender_info->ana_statistics.fec_action_counter = 116; + voice_sender_info->ana_statistics.frame_length_increase_counter = 117; + voice_sender_info->ana_statistics.frame_length_decrease_counter = 118; + voice_sender_info->ana_statistics.uplink_packet_loss_fraction = 119.0; } void UpdateVoiceSenderInfoFromAudioTrack( @@ -2112,7 +2105,7 @@ TEST_F(StatsCollectorTest, VerifyVideoSendSsrcStats) { // Construct a stats value to read. video_sender_info.add_ssrc(1234); video_sender_info.frames_encoded = 10; - video_sender_info.qp_sum = rtc::Optional(11); + video_sender_info.qp_sum = 11; stats_read.senders.push_back(video_sender_info); EXPECT_CALL(pc_, video_channel()).WillRepeatedly(Return(&video_channel)); @@ -2159,7 +2152,7 @@ TEST_F(StatsCollectorTest, VerifyVideoReceiveSsrcStats) { // Construct a stats value to read. video_receiver_info.add_ssrc(1234); video_receiver_info.frames_decoded = 10; - video_receiver_info.qp_sum = rtc::Optional(11); + video_receiver_info.qp_sum = 11; stats_read.receivers.push_back(video_receiver_info); EXPECT_CALL(pc_, video_channel()).WillRepeatedly(Return(&video_channel)); diff --git a/pc/trackmediainfomap_unittest.cc b/pc/trackmediainfomap_unittest.cc index 9f25646556..65e75c46b6 100644 --- a/pc/trackmediainfomap_unittest.cc +++ b/pc/trackmediainfomap_unittest.cc @@ -35,7 +35,7 @@ RtpParameters CreateRtpParametersWithSsrcs( RtpParameters params; for (uint32_t ssrc : ssrcs) { RtpEncodingParameters encoding_params; - encoding_params.ssrc = rtc::Optional(ssrc); + encoding_params.ssrc = ssrc; params.encodings.push_back(encoding_params); } return params; diff --git a/pc/videocapturertracksource.cc b/pc/videocapturertracksource.cc index 93654e8b90..bbfb3348be 100644 --- a/pc/videocapturertracksource.cc +++ b/pc/videocapturertracksource.cc @@ -246,7 +246,7 @@ bool ExtractOption(const MediaConstraintsInterface* all_constraints, size_t mandatory = 0; bool value; if (FindConstraint(all_constraints, key, &value, &mandatory)) { - *option = rtc::Optional(value); + *option = value; return true; } diff --git a/pc/videocapturertracksource_unittest.cc b/pc/videocapturertracksource_unittest.cc index a49264363c..819a7224ce 100644 --- a/pc/videocapturertracksource_unittest.cc +++ b/pc/videocapturertracksource_unittest.cc @@ -312,13 +312,13 @@ TEST_F(VideoCapturerTrackSourceTest, SetValidDenoisingConstraint) { CreateVideoCapturerSource(&constraints); - EXPECT_EQ(rtc::Optional(false), source_->needs_denoising()); + EXPECT_EQ(false, source_->needs_denoising()); } TEST_F(VideoCapturerTrackSourceTest, NoiseReductionConstraintNotSet) { FakeConstraints constraints; CreateVideoCapturerSource(&constraints); - EXPECT_EQ(rtc::Optional(), source_->needs_denoising()); + EXPECT_EQ(rtc::nullopt, source_->needs_denoising()); } TEST_F(VideoCapturerTrackSourceTest, @@ -329,7 +329,7 @@ TEST_F(VideoCapturerTrackSourceTest, CreateVideoCapturerSource(&constraints); - EXPECT_EQ(rtc::Optional(false), source_->needs_denoising()); + EXPECT_EQ(false, source_->needs_denoising()); } TEST_F(VideoCapturerTrackSourceTest, NoiseReductionAndInvalidKeyOptional) { @@ -341,7 +341,7 @@ TEST_F(VideoCapturerTrackSourceTest, NoiseReductionAndInvalidKeyOptional) { EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(), kMaxWaitMs); - EXPECT_EQ(rtc::Optional(true), source_->needs_denoising()); + EXPECT_EQ(true, source_->needs_denoising()); } TEST_F(VideoCapturerTrackSourceTest, NoiseReductionAndInvalidKeyMandatory) { @@ -353,7 +353,7 @@ TEST_F(VideoCapturerTrackSourceTest, NoiseReductionAndInvalidKeyMandatory) { EXPECT_EQ_WAIT(MediaSourceInterface::kEnded, state_observer_->state(), kMaxWaitMs); - EXPECT_EQ(rtc::Optional(), source_->needs_denoising()); + EXPECT_EQ(rtc::nullopt, source_->needs_denoising()); } TEST_F(VideoCapturerTrackSourceTest, InvalidDenoisingValueOptional) { @@ -366,7 +366,7 @@ TEST_F(VideoCapturerTrackSourceTest, InvalidDenoisingValueOptional) { EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(), kMaxWaitMs); - EXPECT_EQ(rtc::Optional(), source_->needs_denoising()); + EXPECT_EQ(rtc::nullopt, source_->needs_denoising()); } TEST_F(VideoCapturerTrackSourceTest, InvalidDenoisingValueMandatory) { @@ -380,7 +380,7 @@ TEST_F(VideoCapturerTrackSourceTest, InvalidDenoisingValueMandatory) { EXPECT_EQ_WAIT(MediaSourceInterface::kEnded, state_observer_->state(), kMaxWaitMs); - EXPECT_EQ(rtc::Optional(), source_->needs_denoising()); + EXPECT_EQ(rtc::nullopt, source_->needs_denoising()); } TEST_F(VideoCapturerTrackSourceTest, MixedOptionsAndConstraints) { @@ -401,7 +401,7 @@ TEST_F(VideoCapturerTrackSourceTest, MixedOptionsAndConstraints) { EXPECT_EQ(288, format->height); EXPECT_EQ(5, format->framerate()); - EXPECT_EQ(rtc::Optional(false), source_->needs_denoising()); + EXPECT_EQ(false, source_->needs_denoising()); } // Tests that the source starts video with the default resolution for diff --git a/pc/videotracksource.h b/pc/videotracksource.h index 3ab59090ac..6dacf37e4d 100644 --- a/pc/videotracksource.h +++ b/pc/videotracksource.h @@ -33,8 +33,7 @@ class VideoTrackSource : public Notifier { bool remote() const override { return remote_; } bool is_screencast() const override { return false; } - rtc::Optional needs_denoising() const override { - return rtc::Optional(); } + rtc::Optional needs_denoising() const override { return rtc::nullopt; } bool GetStats(Stats* stats) override { return false; } diff --git a/pc/webrtcsessiondescriptionfactory.cc b/pc/webrtcsessiondescriptionfactory.cc index 8154c89b6f..18e9ba03fd 100644 --- a/pc/webrtcsessiondescriptionfactory.cc +++ b/pc/webrtcsessiondescriptionfactory.cc @@ -175,8 +175,8 @@ WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory( // Request certificate. This happens asynchronously, so that the caller gets // a chance to connect to |SignalCertificateReady|. - cert_generator_->GenerateCertificateAsync( - key_params, rtc::Optional(), callback); + cert_generator_->GenerateCertificateAsync(key_params, rtc::nullopt, + callback); } }