diff --git a/media/base/codec.cc b/media/base/codec.cc index dfff5176fb..212447b45e 100644 --- a/media/base/codec.cc +++ b/media/base/codec.cc @@ -35,10 +35,6 @@ #include "rtc_base/strings/string_builder.h" namespace cricket { -namespace { - - -} // namespace FeedbackParams::FeedbackParams() = default; FeedbackParams::~FeedbackParams() = default; diff --git a/media/base/codec_unittest.cc b/media/base/codec_unittest.cc index 1c91288a1c..4cb78fa086 100644 --- a/media/base/codec_unittest.cc +++ b/media/base/codec_unittest.cc @@ -148,7 +148,6 @@ TEST(CodecTest, TestVideoCodecEqualsWithDifferentPacketization) { EXPECT_EQ(c2, c2); } - TEST(CodecTest, TestSetParamGetParamAndRemoveParam) { Codec codec = cricket::CreateAudioCodec(0, "foo", 22222, 2); codec.SetParam("a", "1"); diff --git a/media/base/media_channel_impl.cc b/media/base/media_channel_impl.cc index 9a2d22f986..d41c9f9c0f 100644 --- a/media/base/media_channel_impl.cc +++ b/media/base/media_channel_impl.cc @@ -201,29 +201,29 @@ bool MediaChannelUtil::TransportForMediaChannels::SendRtcp( bool MediaChannelUtil::TransportForMediaChannels::SendRtp( rtc::ArrayView packet, const webrtc::PacketOptions& options) { - auto send = - [this, packet_id = options.packet_id, - included_in_feedback = options.included_in_feedback, - included_in_allocation = options.included_in_allocation, - batchable = options.batchable, - last_packet_in_batch = options.last_packet_in_batch, - is_media = options.is_media, ect_1 = options.send_as_ect1, - packet = rtc::CopyOnWriteBuffer(packet, kMaxRtpPacketLen)]() mutable { - rtc::PacketOptions rtc_options; - rtc_options.packet_id = packet_id; - if (DscpEnabled()) { - rtc_options.dscp = PreferredDscp(); - } - rtc_options.info_signaled_after_sent.included_in_feedback = - included_in_feedback; - rtc_options.info_signaled_after_sent.included_in_allocation = - included_in_allocation; - rtc_options.info_signaled_after_sent.is_media = is_media; - rtc_options.ecn_1 = ect_1; - rtc_options.batchable = batchable; - rtc_options.last_packet_in_batch = last_packet_in_batch; - DoSendPacket(&packet, false, rtc_options); - }; + auto send = [this, packet_id = options.packet_id, + included_in_feedback = options.included_in_feedback, + included_in_allocation = options.included_in_allocation, + batchable = options.batchable, + last_packet_in_batch = options.last_packet_in_batch, + is_media = options.is_media, ect_1 = options.send_as_ect1, + packet = + rtc::CopyOnWriteBuffer(packet, kMaxRtpPacketLen)]() mutable { + rtc::PacketOptions rtc_options; + rtc_options.packet_id = packet_id; + if (DscpEnabled()) { + rtc_options.dscp = PreferredDscp(); + } + rtc_options.info_signaled_after_sent.included_in_feedback = + included_in_feedback; + rtc_options.info_signaled_after_sent.included_in_allocation = + included_in_allocation; + rtc_options.info_signaled_after_sent.is_media = is_media; + rtc_options.ecn_1 = ect_1; + rtc_options.batchable = batchable; + rtc_options.last_packet_in_batch = last_packet_in_batch; + DoSendPacket(&packet, false, rtc_options); + }; // TODO(bugs.webrtc.org/11993): ModuleRtpRtcpImpl2 and related classes (e.g. // RTCPSender) aren't aware of the network thread and may trigger calls to diff --git a/media/base/video_adapter.cc b/media/base/video_adapter.cc index 086970afd6..b58f2e8f74 100644 --- a/media/base/video_adapter.cc +++ b/media/base/video_adapter.cc @@ -230,9 +230,8 @@ bool VideoAdapter::AdaptFrameResolution(int in_width, *cropped_height = std::min(in_height, static_cast(in_width / requested_aspect)); } - const Fraction scale = - FindScale(*cropped_width, *cropped_height, target_pixel_count, - max_pixel_count); + const Fraction scale = FindScale(*cropped_width, *cropped_height, + target_pixel_count, max_pixel_count); // Adjust cropping slightly to get correctly aligned output size and a perfect // scale factor. *cropped_width = roundUp(*cropped_width, diff --git a/media/engine/fake_webrtc_video_engine.cc b/media/engine/fake_webrtc_video_engine.cc index d13155ffdf..ac47cc6a3c 100644 --- a/media/engine/fake_webrtc_video_engine.cc +++ b/media/engine/fake_webrtc_video_engine.cc @@ -62,8 +62,7 @@ bool FakeWebRtcVideoDecoder::Configure(const Settings& /* settings */) { return true; } -int32_t FakeWebRtcVideoDecoder::Decode(const webrtc::EncodedImage&, - int64_t) { +int32_t FakeWebRtcVideoDecoder::Decode(const webrtc::EncodedImage&, int64_t) { num_frames_received_++; return WEBRTC_VIDEO_CODEC_OK; } diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc index ecc2225417..a7568696db 100644 --- a/media/engine/webrtc_voice_engine.cc +++ b/media/engine/webrtc_voice_engine.cc @@ -833,7 +833,6 @@ webrtc::AudioState* WebRtcVoiceEngine::audio_state() { return audio_state_.get(); } - // --------------------------------- WebRtcVoiceSendChannel ------------------ class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink { @@ -1931,7 +1930,7 @@ webrtc::RTCError WebRtcVoiceSendChannel::SetRtpSendParameters( if (parameters.encodings[0].codec && send_codec && !send_codec->MatchesRtpCodec(*parameters.encodings[0].codec)) { RTC_LOG(LS_VERBOSE) << "Trying to change codec to " - << parameters.encodings[0].codec->name; + << parameters.encodings[0].codec->name; auto matched_codec = absl::c_find_if(send_codecs_, [&](auto negotiated_codec) { return negotiated_codec.MatchesRtpCodec( @@ -2729,11 +2728,10 @@ bool WebRtcVoiceReceiveChannel::GetStats(VoiceMediaReceiveInfo* info, void WebRtcVoiceReceiveChannel::FillReceiveCodecStats( VoiceMediaReceiveInfo* voice_media_info) { for (const auto& receiver : voice_media_info->receivers) { - auto codec = - absl::c_find_if(recv_codecs_, [&receiver](const Codec& c) { - return receiver.codec_payload_type && - *receiver.codec_payload_type == c.id; - }); + auto codec = absl::c_find_if(recv_codecs_, [&receiver](const Codec& c) { + return receiver.codec_payload_type && + *receiver.codec_payload_type == c.id; + }); if (codec != recv_codecs_.end()) { voice_media_info->receive_codecs.insert( std::make_pair(codec->id, codec->ToCodecParameters()));