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:
parent
d4937d3336
commit
256d828aac
@ -35,10 +35,6 @@
|
|||||||
#include "rtc_base/strings/string_builder.h"
|
#include "rtc_base/strings/string_builder.h"
|
||||||
|
|
||||||
namespace cricket {
|
namespace cricket {
|
||||||
namespace {
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
FeedbackParams::FeedbackParams() = default;
|
FeedbackParams::FeedbackParams() = default;
|
||||||
FeedbackParams::~FeedbackParams() = default;
|
FeedbackParams::~FeedbackParams() = default;
|
||||||
|
|||||||
@ -148,7 +148,6 @@ TEST(CodecTest, TestVideoCodecEqualsWithDifferentPacketization) {
|
|||||||
EXPECT_EQ(c2, c2);
|
EXPECT_EQ(c2, c2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(CodecTest, TestSetParamGetParamAndRemoveParam) {
|
TEST(CodecTest, TestSetParamGetParamAndRemoveParam) {
|
||||||
Codec codec = cricket::CreateAudioCodec(0, "foo", 22222, 2);
|
Codec codec = cricket::CreateAudioCodec(0, "foo", 22222, 2);
|
||||||
codec.SetParam("a", "1");
|
codec.SetParam("a", "1");
|
||||||
|
|||||||
@ -201,14 +201,14 @@ bool MediaChannelUtil::TransportForMediaChannels::SendRtcp(
|
|||||||
bool MediaChannelUtil::TransportForMediaChannels::SendRtp(
|
bool MediaChannelUtil::TransportForMediaChannels::SendRtp(
|
||||||
rtc::ArrayView<const uint8_t> packet,
|
rtc::ArrayView<const uint8_t> packet,
|
||||||
const webrtc::PacketOptions& options) {
|
const webrtc::PacketOptions& options) {
|
||||||
auto send =
|
auto send = [this, packet_id = options.packet_id,
|
||||||
[this, packet_id = options.packet_id,
|
|
||||||
included_in_feedback = options.included_in_feedback,
|
included_in_feedback = options.included_in_feedback,
|
||||||
included_in_allocation = options.included_in_allocation,
|
included_in_allocation = options.included_in_allocation,
|
||||||
batchable = options.batchable,
|
batchable = options.batchable,
|
||||||
last_packet_in_batch = options.last_packet_in_batch,
|
last_packet_in_batch = options.last_packet_in_batch,
|
||||||
is_media = options.is_media, ect_1 = options.send_as_ect1,
|
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::PacketOptions rtc_options;
|
||||||
rtc_options.packet_id = packet_id;
|
rtc_options.packet_id = packet_id;
|
||||||
if (DscpEnabled()) {
|
if (DscpEnabled()) {
|
||||||
|
|||||||
@ -230,9 +230,8 @@ bool VideoAdapter::AdaptFrameResolution(int in_width,
|
|||||||
*cropped_height =
|
*cropped_height =
|
||||||
std::min(in_height, static_cast<int>(in_width / requested_aspect));
|
std::min(in_height, static_cast<int>(in_width / requested_aspect));
|
||||||
}
|
}
|
||||||
const Fraction scale =
|
const Fraction scale = FindScale(*cropped_width, *cropped_height,
|
||||||
FindScale(*cropped_width, *cropped_height, target_pixel_count,
|
target_pixel_count, max_pixel_count);
|
||||||
max_pixel_count);
|
|
||||||
// Adjust cropping slightly to get correctly aligned output size and a perfect
|
// Adjust cropping slightly to get correctly aligned output size and a perfect
|
||||||
// scale factor.
|
// scale factor.
|
||||||
*cropped_width = roundUp(*cropped_width,
|
*cropped_width = roundUp(*cropped_width,
|
||||||
|
|||||||
@ -62,8 +62,7 @@ bool FakeWebRtcVideoDecoder::Configure(const Settings& /* settings */) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t FakeWebRtcVideoDecoder::Decode(const webrtc::EncodedImage&,
|
int32_t FakeWebRtcVideoDecoder::Decode(const webrtc::EncodedImage&, int64_t) {
|
||||||
int64_t) {
|
|
||||||
num_frames_received_++;
|
num_frames_received_++;
|
||||||
return WEBRTC_VIDEO_CODEC_OK;
|
return WEBRTC_VIDEO_CODEC_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -833,7 +833,6 @@ webrtc::AudioState* WebRtcVoiceEngine::audio_state() {
|
|||||||
return audio_state_.get();
|
return audio_state_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------- WebRtcVoiceSendChannel ------------------
|
// --------------------------------- WebRtcVoiceSendChannel ------------------
|
||||||
|
|
||||||
class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink {
|
class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink {
|
||||||
@ -2729,8 +2728,7 @@ bool WebRtcVoiceReceiveChannel::GetStats(VoiceMediaReceiveInfo* info,
|
|||||||
void WebRtcVoiceReceiveChannel::FillReceiveCodecStats(
|
void WebRtcVoiceReceiveChannel::FillReceiveCodecStats(
|
||||||
VoiceMediaReceiveInfo* voice_media_info) {
|
VoiceMediaReceiveInfo* voice_media_info) {
|
||||||
for (const auto& receiver : voice_media_info->receivers) {
|
for (const auto& receiver : voice_media_info->receivers) {
|
||||||
auto codec =
|
auto codec = absl::c_find_if(recv_codecs_, [&receiver](const Codec& c) {
|
||||||
absl::c_find_if(recv_codecs_, [&receiver](const Codec& c) {
|
|
||||||
return receiver.codec_payload_type &&
|
return receiver.codec_payload_type &&
|
||||||
*receiver.codec_payload_type == c.id;
|
*receiver.codec_payload_type == c.id;
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user