Drop redundant std::nullopt default initializers std::optional is constructed empty. Bug: None Change-Id: I74cec7ea2fa1db7ebac5721b6df217334b3348c5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/515060 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com> Cr-Commit-Position: refs/heads/main@{#49220}
diff --git a/api/test/network_emulation_manager.h b/api/test/network_emulation_manager.h index de5afe8..c2c66df 100644 --- a/api/test/network_emulation_manager.h +++ b/api/test/network_emulation_manager.h
@@ -68,7 +68,7 @@ enum class IpAddressFamily { kIpv4, kIpv6 }; // If specified will be used to name endpoint for logging purposes. - std::optional<std::string> name = std::nullopt; + std::optional<std::string> name; IpAddressFamily generated_ip_family = IpAddressFamily::kIpv4; // If specified will be used as IP address for endpoint node. Must be unique // among all created nodes.
diff --git a/api/test/pclf/media_configuration.h b/api/test/pclf/media_configuration.h index 8ffb24f..7202398 100644 --- a/api/test/pclf/media_configuration.h +++ b/api/test/pclf/media_configuration.h
@@ -432,7 +432,7 @@ std::string ToString() const; private: - std::optional<VideoResolution> default_resolution_ = std::nullopt; + std::optional<VideoResolution> default_resolution_; std::map<std::string, VideoResolution> peers_resolution_; };
diff --git a/api/test/video_quality_analyzer_interface.h b/api/test/video_quality_analyzer_interface.h index afa4d12..b9ffb42 100644 --- a/api/test/video_quality_analyzer_interface.h +++ b/api/test/video_quality_analyzer_interface.h
@@ -72,9 +72,9 @@ std::string decoder_name = "unknown"; // Decode time provided by decoder itself. If decoder doesn’t produce such // information can be omitted. - std::optional<int32_t> decode_time_ms = std::nullopt; + std::optional<int32_t> decode_time_ms; // Decoder quantizer value. - std::optional<uint8_t> qp = std::nullopt; + std::optional<uint8_t> qp; }; ~VideoQualityAnalyzerInterface() override = default;
diff --git a/call/call.h b/call/call.h index 01aaa4d..daa099f 100644 --- a/call/call.h +++ b/call/call.h
@@ -63,8 +63,8 @@ int recv_bandwidth_bps = 0; // Estimated available receive bandwidth. int64_t pacer_delay_ms = 0; int64_t rtt_ms = -1; - std::optional<int64_t> ccfb_messages_sent = std::nullopt; - std::optional<int64_t> ccfb_messages_received = std::nullopt; + std::optional<int64_t> ccfb_messages_sent; + std::optional<int64_t> ccfb_messages_received; flat_map<uint32_t, SentCongestionControllerFeedbackStats> sent_ccfb_stats_per_ssrc; flat_map<uint32_t, ReceivedCongestionControlFeedbackStats>
diff --git a/logging/rtc_event_log/rtc_event_log_parser.cc b/logging/rtc_event_log/rtc_event_log_parser.cc index 247d739..6874987 100644 --- a/logging/rtc_event_log/rtc_event_log_parser.cc +++ b/logging/rtc_event_log/rtc_event_log_parser.cc
@@ -441,7 +441,7 @@ } else { RTC_PARSE_CHECK_OR_RETURN(!proto.has_voice_activity()); } - std::optional<uint16_t> base_rtx_osn = std::nullopt; + std::optional<uint16_t> base_rtx_osn; if (proto.has_rtx_original_sequence_number()) { RTC_PARSE_CHECK_OR_RETURN(IsValueInRangeForNumericType<uint16_t>( proto.rtx_original_sequence_number())); @@ -687,7 +687,7 @@ RTC_PARSE_CHECK_OR_RETURN(voice_activity_values.size() <= i || !voice_activity_values[i].has_value()); } - std::optional<uint16_t> rtx_osn = std::nullopt; + std::optional<uint16_t> rtx_osn; if (rtx_osn_values.size() > i && rtx_osn_values[i].has_value()) { RTC_PARSE_CHECK_OR_RETURN( IsValueInRangeForNumericType<uint16_t>(rtx_osn_values[i].value()));
diff --git a/logging/rtc_event_log/rtc_event_log_unittest_helper.cc b/logging/rtc_event_log/rtc_event_log_unittest_helper.cc index 8e2767f..70c095a 100644 --- a/logging/rtc_event_log/rtc_event_log_unittest_helper.cc +++ b/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
@@ -607,7 +607,7 @@ RandomizeRtpPacket(payload_size, padding_size, ssrc, extension_map, &rtp_packet, all_configured_exts); - std::optional<uint16_t> rtx_osn = std::nullopt; + std::optional<uint16_t> rtx_osn; if (prng_.Rand(0, 9) == 0) { rtx_osn = prng_.Rand( 0u, static_cast<uint32_t>(std::numeric_limits<uint16_t>::max())); @@ -642,7 +642,7 @@ &rtp_packet, all_configured_exts); int probe_cluster_id = prng_.Rand(0, 100000); - std::optional<uint16_t> rtx_osn = std::nullopt; + std::optional<uint16_t> rtx_osn; if (prng_.Rand(0, 9) == 0) { rtx_osn = prng_.Rand( 0u, static_cast<uint32_t>(std::numeric_limits<uint16_t>::max()));
diff --git a/modules/audio_processing/agc/agc_manager_direct.cc b/modules/audio_processing/agc/agc_manager_direct.cc index 3d5f7fa..38931ac 100644 --- a/modules/audio_processing/agc/agc_manager_direct.cc +++ b/modules/audio_processing/agc/agc_manager_direct.cc
@@ -645,7 +645,7 @@ } const size_t num_frames_per_band = audio_buffer.num_frames_per_band(); - std::optional<int> rms_error_override = std::nullopt; + std::optional<int> rms_error_override; if (speech_probability.has_value() && speech_level_dbfs.has_value()) { rms_error_override = GetSpeechLevelErrorDb(*speech_level_dbfs, *speech_probability);
diff --git a/modules/audio_processing/agc2/input_volume_stats_reporter.h b/modules/audio_processing/agc2/input_volume_stats_reporter.h index 2f31aa0..1383d47 100644 --- a/modules/audio_processing/agc2/input_volume_stats_reporter.h +++ b/modules/audio_processing/agc2/input_volume_stats_reporter.h
@@ -84,7 +84,7 @@ const bool cannot_log_stats_; int log_volume_update_stats_counter_ = 0; - std::optional<int> previous_input_volume_ = std::nullopt; + std::optional<int> previous_input_volume_; }; // Updates the histogram that keeps track of recommended input volume changes
diff --git a/modules/video_coding/utility/av1_qp_parser.cc b/modules/video_coding/utility/av1_qp_parser.cc index bea9178..51538ed 100644 --- a/modules/video_coding/utility/av1_qp_parser.cc +++ b/modules/video_coding/utility/av1_qp_parser.cc
@@ -80,7 +80,7 @@ private: libgav1::BufferPool buffer_pool_; libgav1::DecoderState decoder_state_; - std::optional<libgav1::ObuSequenceHeader> sequence_header_ = std::nullopt; + std::optional<libgav1::ObuSequenceHeader> sequence_header_; }; class Av1QpAverageParser : public Av1QpParser {
diff --git a/modules/video_coding/utility/encoder_speed_controller_impl.cc b/modules/video_coding/utility/encoder_speed_controller_impl.cc index 2b50737..e802a3f 100644 --- a/modules/video_coding/utility/encoder_speed_controller_impl.cc +++ b/modules/video_coding/utility/encoder_speed_controller_impl.cc
@@ -82,7 +82,7 @@ return nullptr; } - std::optional<int> last_seen_qp_limit = std::nullopt; + std::optional<int> last_seen_qp_limit; for (size_t i = 0; i < config.speed_levels.size(); ++i) { const auto& speed_level = config.speed_levels[i];
diff --git a/net/dcsctp/public/dcsctp_options.h b/net/dcsctp/public/dcsctp_options.h index d87196f..1db0a55 100644 --- a/net/dcsctp/public/dcsctp_options.h +++ b/net/dcsctp/public/dcsctp_options.h
@@ -134,7 +134,7 @@ // transient network issues. Setting this value may require changing // `max_retransmissions` and `max_init_retransmits` to ensure that the // connection is not closed too quickly. - std::optional<DurationMs> max_timer_backoff_duration = std::nullopt; + std::optional<DurationMs> max_timer_backoff_duration; // Hearbeat interval (on idle connections only). Set to zero to disable. DurationMs heartbeat_interval = DurationMs(30000);
diff --git a/net/dcsctp/public/dcsctp_socket.h b/net/dcsctp/public/dcsctp_socket.h index d7d5053..9ac27b5 100644 --- a/net/dcsctp/public/dcsctp_socket.h +++ b/net/dcsctp/public/dcsctp_socket.h
@@ -50,11 +50,11 @@ // If set, will discard messages that haven't been correctly sent and // received before the lifetime has expired. This is only available if the // peer supports Partial Reliability Extension (RFC3758). - std::optional<DurationMs> lifetime = std::nullopt; + std::optional<DurationMs> lifetime; // If set, limits the number of retransmissions. This is only available // if the peer supports Partial Reliability Extension (RFC3758). - std::optional<size_t> max_retransmissions = std::nullopt; + std::optional<size_t> max_retransmissions; // If set, will generate lifecycle events for this message. See e.g. // `DcSctpSocketCallbacks::OnLifecycleMessageFullySent`. This value is decided
diff --git a/net/dcsctp/socket/transmission_control_block.h b/net/dcsctp/socket/transmission_control_block.h index 4ad6a2b..f8148dc 100644 --- a/net/dcsctp/socket/transmission_control_block.h +++ b/net/dcsctp/socket/transmission_control_block.h
@@ -198,7 +198,7 @@ // including a COOKIE ECHO). So if `cookie_echo_chunk_` is present, the // SendBufferedChunks will always only just send one packet, with this chunk // as the first chunk in the packet. - std::optional<CookieEchoChunk> cookie_echo_chunk_ = std::nullopt; + std::optional<CookieEchoChunk> cookie_echo_chunk_; }; } // namespace dcsctp
diff --git a/net/dcsctp/testing/data_generator.h b/net/dcsctp/testing/data_generator.h index 9cae14b..39aeae5 100644 --- a/net/dcsctp/testing/data_generator.h +++ b/net/dcsctp/testing/data_generator.h
@@ -23,7 +23,7 @@ struct DataGeneratorOptions { StreamID stream_id = StreamID(1); - std::optional<MID> mid = std::nullopt; + std::optional<MID> mid; PPID ppid = PPID(53); };
diff --git a/net/dcsctp/tx/retransmission_queue.h b/net/dcsctp/tx/retransmission_queue.h index 932da8e..c459309 100644 --- a/net/dcsctp/tx/retransmission_queue.h +++ b/net/dcsctp/tx/retransmission_queue.h
@@ -244,7 +244,7 @@ // If set, fast recovery is enabled until this TSN has been cumulative // acked. - std::optional<UnwrappedTSN> fast_recovery_exit_tsn_ = std::nullopt; + std::optional<UnwrappedTSN> fast_recovery_exit_tsn_; // The send queue. SendQueue& send_queue_;
diff --git a/net/dcsctp/tx/rr_send_queue.h b/net/dcsctp/tx/rr_send_queue.h index 965d7b6..806b5f0 100644 --- a/net/dcsctp/tx/rr_send_queue.h +++ b/net/dcsctp/tx/rr_send_queue.h
@@ -247,8 +247,8 @@ size_t remaining_size; // If set, an allocated Message ID and SSN. Will be allocated when the // first fragment is sent. - std::optional<MID> mid = std::nullopt; - std::optional<SSN> ssn = std::nullopt; + std::optional<MID> mid; + std::optional<SSN> ssn; // The current Fragment Sequence Number, incremented for each fragment. FSN current_fsn = FSN(0); };
diff --git a/pc/data_channel_controller.cc b/pc/data_channel_controller.cc index 8f29c14..deb9b7f 100644 --- a/pc/data_channel_controller.cc +++ b/pc/data_channel_controller.cc
@@ -430,7 +430,7 @@ RTCErrorOr<scoped_refptr<SctpDataChannel>> DataChannelController::CreateDataChannel(absl::string_view label, InternalDataChannelInit& config) { - std::optional<StreamId> sid = std::nullopt; + std::optional<StreamId> sid; if (config.id != -1) { if (config.id < 0 || config.id > kMaxSctpSid) { return RTCError(RTCErrorType::INVALID_RANGE, "StreamId out of range.");
diff --git a/pc/rtp_transceiver.h b/pc/rtp_transceiver.h index d308afa..8878339 100644 --- a/pc/rtp_transceiver.h +++ b/pc/rtp_transceiver.h
@@ -550,10 +550,9 @@ RtpTransceiverDirection direction_ = RtpTransceiverDirection::kInactive; std::optional<RtpTransceiverDirection> current_direction_; std::optional<RtpTransceiverDirection> fired_direction_; - std::optional<bool> sframe_enabled_ RTC_GUARDED_BY(thread_) = std::nullopt; + std::optional<bool> sframe_enabled_ RTC_GUARDED_BY(thread_); std::optional<std::string> mid_; - std::optional<std::string> transport_name_ RTC_GUARDED_BY(thread_) = - std::nullopt; + std::optional<std::string> transport_name_ RTC_GUARDED_BY(thread_); std::optional<size_t> mline_index_; bool created_by_addtrack_ = false; bool reused_for_addtrack_ = false;
diff --git a/pc/sctp_data_channel.h b/pc/sctp_data_channel.h index 93d6ba8..08ab041 100644 --- a/pc/sctp_data_channel.h +++ b/pc/sctp_data_channel.h
@@ -302,7 +302,7 @@ Thread* const signaling_thread_; Thread* const network_thread_; - std::optional<StreamId> id_n_ RTC_GUARDED_BY(network_thread_) = std::nullopt; + std::optional<StreamId> id_n_ RTC_GUARDED_BY(network_thread_); const int internal_id_; const std::string label_; const std::string protocol_;
diff --git a/test/jitter/delay_variation_calculator.h b/test/jitter/delay_variation_calculator.h index dcf10a2..3e4658b 100644 --- a/test/jitter/delay_variation_calculator.h +++ b/test/jitter/delay_variation_calculator.h
@@ -82,7 +82,7 @@ MetadataT BuildMetadata(const Frame& frame); RtpTimestampUnwrapper unwrapper_; - std::optional<Frame> prev_frame_ = std::nullopt; + std::optional<Frame> prev_frame_; TimeSeries time_series_; };
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc index e75f590..7b1eb8e 100644 --- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc +++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
@@ -217,7 +217,7 @@ } AnalyzerStreamState* state = &stream_states_.at(stream_index); state->PushBack(frame_id); - std::optional<TimeDelta> time_between_captured_frames = std::nullopt; + std::optional<TimeDelta> time_between_captured_frames; if (state->last_captured_frame_time().has_value()) { time_between_captured_frames = captured_time - *state->last_captured_frame_time(); @@ -355,7 +355,7 @@ } Timestamp now = Now(); AnalyzerStreamState& state = stream_states_.at(frame_in_flight.stream()); - std::optional<TimeDelta> time_between_encoded_frames = std::nullopt; + std::optional<TimeDelta> time_between_encoded_frames; if (state.last_encoded_frame_time().has_value()) { time_between_encoded_frames = now - *state.last_encoded_frame_time(); }
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frame_in_flight.h b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frame_in_flight.h index b384d0b..5fb5b93 100644 --- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frame_in_flight.h +++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frame_in_flight.h
@@ -38,20 +38,20 @@ Timestamp rendered_time = Timestamp::MinusInfinity(); // Will be set if there is frame rendered before this one. - std::optional<Timestamp> prev_frame_rendered_time = std::nullopt; - std::optional<TimeDelta> time_between_rendered_frames = std::nullopt; + std::optional<Timestamp> prev_frame_rendered_time; + std::optional<TimeDelta> time_between_rendered_frames; // Type and encoded size of received frame. VideoFrameType frame_type = VideoFrameType::kEmptyFrame; DataSize encoded_image_size = DataSize::Bytes(0); - std::optional<int> decoded_frame_width = std::nullopt; - std::optional<int> decoded_frame_height = std::nullopt; + std::optional<int> decoded_frame_width; + std::optional<int> decoded_frame_height; - std::optional<uint8_t> decoded_frame_qp = std::nullopt; + std::optional<uint8_t> decoded_frame_qp; // Can be not set if frame was dropped in the network. - std::optional<StreamCodecInfo> used_decoder = std::nullopt; + std::optional<StreamCodecInfo> used_decoder; bool dropped = false; bool decoder_failed = false; @@ -171,8 +171,8 @@ Timestamp pre_encode_time_ = Timestamp::MinusInfinity(); Timestamp encoded_time_ = Timestamp::MinusInfinity(); - std::optional<TimeDelta> time_between_captured_frames_ = std::nullopt; - std::optional<TimeDelta> time_between_encoded_frames_ = std::nullopt; + std::optional<TimeDelta> time_between_captured_frames_; + std::optional<TimeDelta> time_between_encoded_frames_; // Type and encoded size of sent frame. VideoFrameType frame_type_ = VideoFrameType::kEmptyFrame; @@ -182,7 +182,7 @@ // spatial or simulcast index is set in `EncodedImage`, 0 is used. std::map<int, SamplesStatsCounter> stream_layers_qp_; // Can be not set if frame was dropped by encoder. - std::optional<StreamCodecInfo> used_encoder_ = std::nullopt; + std::optional<StreamCodecInfo> used_encoder_; // Map from the receiver peer's index to frame stats for that peer. std::unordered_map<size_t, ReceiverFrameStats> receiver_stats_; };
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frames_comparator.cc b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frames_comparator.cc index 14fe6d8..5f70159 100644 --- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frames_comparator.cc +++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frames_comparator.cc
@@ -385,7 +385,7 @@ void DefaultVideoQualityAnalyzerFramesComparator::ProcessComparisons() { while (true) { // Try to pick next comparison to perform from the queue. - std::optional<FrameComparison> comparison = std::nullopt; + std::optional<FrameComparison> comparison; bool more_new_comparisons_expected; { MutexLock lock(&mutex_);
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frames_comparator_test.cc b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frames_comparator_test.cc index f670576..01a2150 100644 --- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frames_comparator_test.cc +++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_frames_comparator_test.cc
@@ -1640,7 +1640,7 @@ // Add 5 frames which were rendered with 30 fps (~30ms between frames) // Frame ids are in [1..5] and last frame is with 120ms offset from first. - std::optional<Timestamp> prev_frame_rendered_time = std::nullopt; + std::optional<Timestamp> prev_frame_rendered_time; for (int i = 0; i < 5; ++i) { FrameStats frame_stats = FrameStatsWith10msDeltaBetweenPhasesAnd10x10Frame( /*frame_id=*/i + 1, stream_start_time + TimeDelta::Millis(30 * i));
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_internal_shared_objects.h b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_internal_shared_objects.h index 46f5293..ce5cf2d 100644 --- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_internal_shared_objects.h +++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_internal_shared_objects.h
@@ -60,10 +60,10 @@ Timestamp rendered_time = Timestamp::MinusInfinity(); // Next timings are set if and only if previous frame exist. - std::optional<Timestamp> prev_frame_rendered_time = std::nullopt; - std::optional<TimeDelta> time_between_captured_frames = std::nullopt; - std::optional<TimeDelta> time_between_encoded_frames = std::nullopt; - std::optional<TimeDelta> time_between_rendered_frames = std::nullopt; + std::optional<Timestamp> prev_frame_rendered_time; + std::optional<TimeDelta> time_between_captured_frames; + std::optional<TimeDelta> time_between_encoded_frames; + std::optional<TimeDelta> time_between_rendered_frames; VideoFrameType encoded_frame_type = VideoFrameType::kEmptyFrame; DataSize encoded_image_size = DataSize::Bytes(0); @@ -77,15 +77,15 @@ // time index. The QP value here corresponds to one of the encoded spatial // layer's QP given in `spatial_layers_qp`, i.e. to the one that corresponds // to the rendered frame. - std::optional<uint8_t> decoded_frame_qp = std::nullopt; + std::optional<uint8_t> decoded_frame_qp; - std::optional<int> decoded_frame_width = std::nullopt; - std::optional<int> decoded_frame_height = std::nullopt; + std::optional<int> decoded_frame_width; + std::optional<int> decoded_frame_height; // Can be not set if frame was dropped by encoder. - std::optional<StreamCodecInfo> used_encoder = std::nullopt; + std::optional<StreamCodecInfo> used_encoder; // Can be not set if frame was dropped in the network. - std::optional<StreamCodecInfo> used_decoder = std::nullopt; + std::optional<StreamCodecInfo> used_decoder; bool decoder_failed = false; };
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_stream_state.h b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_stream_state.h index 882daff..57c8f71 100644 --- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer_stream_state.h +++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer_stream_state.h
@@ -115,8 +115,8 @@ // frame_id2 and consider those frames as dropped and then compare received // frame with the one from `FrameInFlight` with id frame_id3. MultiReaderQueue<uint16_t> frame_ids_; - std::optional<Timestamp> last_captured_frame_time_ = std::nullopt; - std::optional<Timestamp> last_encoded_frame_time_ = std::nullopt; + std::optional<Timestamp> last_captured_frame_time_; + std::optional<Timestamp> last_encoded_frame_time_; std::unordered_map<size_t, Timestamp> last_rendered_frame_time_; // Mapping from peer's index to pausable state for this receiver. std::unordered_map<size_t, PausableState> pausable_state_;
diff --git a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc index 28bd528..9faeb17 100644 --- a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc +++ b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc
@@ -104,7 +104,7 @@ } size_t prev_frames_size = 0; - std::optional<uint16_t> id = std::nullopt; + std::optional<uint16_t> id; bool discard = true; std::vector<ExtractionInfo> extraction_infos; for (size_t frame_size : frame_sizes) {
diff --git a/test/peer_scenario/tests/unsignaled_stream_test.cc b/test/peer_scenario/tests/unsignaled_stream_test.cc index dea206f..30344a8 100644 --- a/test/peer_scenario/tests/unsignaled_stream_test.cc +++ b/test/peer_scenario/tests/unsignaled_stream_test.cc
@@ -161,7 +161,7 @@ uint32_t first_ssrc = 0; uint32_t second_ssrc = 0; - std::optional<RtpHeaderExtensionId> mid_header_extension_id = std::nullopt; + std::optional<RtpHeaderExtensionId> mid_header_extension_id; signaling.NegotiateSdp( /* munge_sdp = */
diff --git a/test/testsupport/fixed_fps_video_frame_writer_adapter.h b/test/testsupport/fixed_fps_video_frame_writer_adapter.h index 00909a4..11733f2 100644 --- a/test/testsupport/fixed_fps_video_frame_writer_adapter.h +++ b/test/testsupport/fixed_fps_video_frame_writer_adapter.h
@@ -79,7 +79,7 @@ // Expected time slot for the last frame. Timestamp last_frame_time_ = Timestamp::MinusInfinity(); - std::optional<VideoFrame> last_frame_ = std::nullopt; + std::optional<VideoFrame> last_frame_; }; } // namespace test
diff --git a/video/send_statistics_proxy.h b/video/send_statistics_proxy.h index 198936c..836ca43 100644 --- a/video/send_statistics_proxy.h +++ b/video/send_statistics_proxy.h
@@ -250,8 +250,8 @@ RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_); struct MaskedAdaptationCounts { - std::optional<int> resolution_adaptations = std::nullopt; - std::optional<int> num_framerate_reductions = std::nullopt; + std::optional<int> resolution_adaptations; + std::optional<int> num_framerate_reductions; }; struct Adaptations {
diff --git a/video/timing/jitter_estimator.h b/video/timing/jitter_estimator.h index 98c9253..c73b7f9 100644 --- a/video/timing/jitter_estimator.h +++ b/video/timing/jitter_estimator.h
@@ -68,37 +68,37 @@ // If set, the "max" frame size is calculated as this percentile over a // window of recent frame sizes. - std::optional<double> max_frame_size_percentile = std::nullopt; + std::optional<double> max_frame_size_percentile; // The length of the percentile filters' window, in number of frames. - std::optional<int> frame_size_window = std::nullopt; + std::optional<int> frame_size_window; // The incoming frame delay variation samples are clamped to be at most // this number of standard deviations away from zero. // // Increasing this value clamps fewer samples. - std::optional<double> num_stddev_delay_clamp = std::nullopt; + std::optional<double> num_stddev_delay_clamp; // A (relative) frame delay variation sample is an outlier if its absolute // deviation from the Kalman filter model falls outside this number of // sample standard deviations. // // Increasing this value rejects fewer samples. - std::optional<double> num_stddev_delay_outlier = std::nullopt; + std::optional<double> num_stddev_delay_outlier; // An (absolute) frame size sample is an outlier if its positive deviation // from the estimated average frame size falls outside this number of sample // standard deviations. // // Increasing this value rejects fewer samples. - std::optional<double> num_stddev_size_outlier = std::nullopt; + std::optional<double> num_stddev_size_outlier; // A (relative) frame size variation sample is deemed "congested", and is // thus rejected, if its value is less than this factor times the estimated // max frame size. // // Decreasing this value rejects fewer samples. - std::optional<double> congestion_rejection_factor = std::nullopt; + std::optional<double> congestion_rejection_factor; // If true, the noise estimate will be updated for congestion rejected // frames. This is currently enabled by default, but that may not be optimal @@ -108,11 +108,11 @@ // The number of frames required to be NACKed within `nack_count_timeout` // in order for RttMult to be enabled. - std::optional<int> nack_limit = std::nullopt; + std::optional<int> nack_limit; // The time period in which `nack_limit` number of frames required to be // NACKed in order for RttMult to be enabled. - std::optional<TimeDelta> nack_count_timeout = std::nullopt; + std::optional<TimeDelta> nack_count_timeout; }; JitterEstimator(Clock* clock, const FieldTrialsView& field_trials);