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"
|
||||
|
||||
namespace cricket {
|
||||
namespace {
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
FeedbackParams::FeedbackParams() = default;
|
||||
FeedbackParams::~FeedbackParams() = default;
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -201,29 +201,29 @@ 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,
|
||||
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
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user