Format /media folder

Formatting done via:

git ls-files | grep -E '^media\/.*\.(h|cc|mm)' | xargs clang-format -i

No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I7c79f10d8ac2c2e3a9f796d2ca3c542b9826683c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373701
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43685}
This commit is contained in:
Boris Tsirkin 2025-01-07 23:37:21 -08:00 committed by WebRTC LUCI CQ
parent d4937d3336
commit 256d828aac
6 changed files with 31 additions and 40 deletions

View File

@ -35,10 +35,6 @@
#include "rtc_base/strings/string_builder.h"
namespace cricket {
namespace {
} // namespace
FeedbackParams::FeedbackParams() = default;
FeedbackParams::~FeedbackParams() = default;

View File

@ -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");

View File

@ -201,14 +201,14 @@ bool MediaChannelUtil::TransportForMediaChannels::SendRtcp(
bool MediaChannelUtil::TransportForMediaChannels::SendRtp(
rtc::ArrayView<const uint8_t> packet,
const webrtc::PacketOptions& options) {
auto send =
[this, packet_id = options.packet_id,
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 {
packet =
rtc::CopyOnWriteBuffer(packet, kMaxRtpPacketLen)]() mutable {
rtc::PacketOptions rtc_options;
rtc_options.packet_id = packet_id;
if (DscpEnabled()) {

View File

@ -230,9 +230,8 @@ bool VideoAdapter::AdaptFrameResolution(int in_width,
*cropped_height =
std::min(in_height, static_cast<int>(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,

View File

@ -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;
}

View File

@ -833,7 +833,6 @@ webrtc::AudioState* WebRtcVoiceEngine::audio_state() {
return audio_state_.get();
}
// --------------------------------- WebRtcVoiceSendChannel ------------------
class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink {
@ -2729,8 +2728,7 @@ 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) {
auto codec = absl::c_find_if(recv_codecs_, [&receiver](const Codec& c) {
return receiver.codec_payload_type &&
*receiver.codec_payload_type == c.id;
});