Format /api folder
At Meta, we have formatted the repo according to WebRTC .clang-format file. Currently, those changes are stored as patch and we'd like to apply them to the base WebRTC release instead. I will be submitting CLs per folder. The plan is to format all h|cc|mm|m files, while exlcuding Matlab files from the formatter as clang misinterprets them as ObjC. Formatting done via: git ls-files | grep -E '^api\/.*\.(h|cc)' | xargs clang-format -i No-Iwyu: Includes didn't change and it isn't related to formatting Bug: webrtc:42225392 Change-Id: I4d7470104983d5d32612f9347301354265fb34c8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373520 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43671}
This commit is contained in:
parent
a0743a7dac
commit
932e361a94
@ -61,13 +61,11 @@ class AudioDeviceModule : public webrtc::RefCountInterface {
|
|||||||
public:
|
public:
|
||||||
// Creates a default ADM for usage in production code.
|
// Creates a default ADM for usage in production code.
|
||||||
static rtc::scoped_refptr<AudioDeviceModule> Create(
|
static rtc::scoped_refptr<AudioDeviceModule> Create(
|
||||||
AudioLayer audio_layer,
|
AudioLayer audio_layer, TaskQueueFactory* task_queue_factory);
|
||||||
TaskQueueFactory* task_queue_factory);
|
|
||||||
// Creates an ADM with support for extra test methods. Don't use this factory
|
// Creates an ADM with support for extra test methods. Don't use this factory
|
||||||
// in production code.
|
// in production code.
|
||||||
static rtc::scoped_refptr<AudioDeviceModuleForTest> CreateForTest(
|
static rtc::scoped_refptr<AudioDeviceModuleForTest> CreateForTest(
|
||||||
AudioLayer audio_layer,
|
AudioLayer audio_layer, TaskQueueFactory* task_queue_factory);
|
||||||
TaskQueueFactory* task_queue_factory);
|
|
||||||
|
|
||||||
// Retrieve the currently utilized audio layer
|
// Retrieve the currently utilized audio layer
|
||||||
virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0;
|
virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0;
|
||||||
|
|||||||
@ -59,8 +59,7 @@ rtc::scoped_refptr<AudioDecoderFactory> CreateBuiltinAudioDecoderFactory() {
|
|||||||
AudioDecoderOpus, NotAdvertised<AudioDecoderMultiChannelOpus>,
|
AudioDecoderOpus, NotAdvertised<AudioDecoderMultiChannelOpus>,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AudioDecoderG722,
|
AudioDecoderG722, AudioDecoderG711, NotAdvertised<AudioDecoderL16>>();
|
||||||
AudioDecoderG711, NotAdvertised<AudioDecoderL16>>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
@ -66,8 +66,7 @@ rtc::scoped_refptr<AudioEncoderFactory> CreateBuiltinAudioEncoderFactory() {
|
|||||||
AudioEncoderOpus, NotAdvertised<AudioEncoderMultiChannelOpus>,
|
AudioEncoderOpus, NotAdvertised<AudioEncoderMultiChannelOpus>,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AudioEncoderG722,
|
AudioEncoderG722, AudioEncoderG711, NotAdvertised<AudioEncoderL16>>();
|
||||||
AudioEncoderG711, NotAdvertised<AudioEncoderL16>>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
#define API_AUDIO_CODECS_OPUS_AUDIO_ENCODER_MULTI_CHANNEL_OPUS_CONFIG_H_
|
#define API_AUDIO_CODECS_OPUS_AUDIO_ENCODER_MULTI_CHANNEL_OPUS_CONFIG_H_
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "rtc_base/system/rtc_export.h"
|
#include "rtc_base/system/rtc_export.h"
|
||||||
|
|||||||
@ -37,6 +37,7 @@ class VCMProtectionCallback {
|
|||||||
// 'retransmission_mode' is either a value of enum RetransmissionMode, or
|
// 'retransmission_mode' is either a value of enum RetransmissionMode, or
|
||||||
// computed with bitwise operators on values of enum RetransmissionMode.
|
// computed with bitwise operators on values of enum RetransmissionMode.
|
||||||
virtual void SetRetransmissionMode(int retransmission_mode) = 0;
|
virtual void SetRetransmissionMode(int retransmission_mode) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VCMProtectionCallback() {}
|
virtual ~VCMProtectionCallback() {}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
#ifndef API_RTC_EVENT_LOG_OUTPUT_H_
|
#ifndef API_RTC_EVENT_LOG_OUTPUT_H_
|
||||||
#define API_RTC_EVENT_LOG_OUTPUT_H_
|
#define API_RTC_EVENT_LOG_OUTPUT_H_
|
||||||
|
|
||||||
|
|
||||||
#include "absl/strings/string_view.h"
|
#include "absl/strings/string_view.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|||||||
@ -22,7 +22,7 @@ namespace webrtc {
|
|||||||
std::unique_ptr<NetworkEmulationManager> CreateNetworkEmulationManager(
|
std::unique_ptr<NetworkEmulationManager> CreateNetworkEmulationManager(
|
||||||
NetworkEmulationManagerConfig config = NetworkEmulationManagerConfig());
|
NetworkEmulationManagerConfig config = NetworkEmulationManagerConfig());
|
||||||
|
|
||||||
[[deprecated("Use version with NetworkEmulationManagerConfig)")]]
|
[[deprecated("Use version with NetworkEmulationManagerConfig)")]] //
|
||||||
std::unique_ptr<NetworkEmulationManager>
|
std::unique_ptr<NetworkEmulationManager>
|
||||||
CreateNetworkEmulationManager(
|
CreateNetworkEmulationManager(
|
||||||
TimeMode time_mode,
|
TimeMode time_mode,
|
||||||
|
|||||||
@ -45,7 +45,9 @@ class MockRtpSender : public RtpSenderInterface {
|
|||||||
track,
|
track,
|
||||||
(),
|
(),
|
||||||
(const, override));
|
(const, override));
|
||||||
MOCK_METHOD(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport, (),
|
MOCK_METHOD(rtc::scoped_refptr<DtlsTransportInterface>,
|
||||||
|
dtls_transport,
|
||||||
|
(),
|
||||||
(const, override));
|
(const, override));
|
||||||
MOCK_METHOD(uint32_t, ssrc, (), (const, override));
|
MOCK_METHOD(uint32_t, ssrc, (), (const, override));
|
||||||
MOCK_METHOD(cricket::MediaType, media_type, (), (const, override));
|
MOCK_METHOD(cricket::MediaType, media_type, (), (const, override));
|
||||||
|
|||||||
@ -33,7 +33,9 @@ class MockTransformableAudioFrame : public TransformableAudioFrameInterface {
|
|||||||
MOCK_METHOD(uint32_t, GetSsrc, (), (const, override));
|
MOCK_METHOD(uint32_t, GetSsrc, (), (const, override));
|
||||||
MOCK_METHOD(uint32_t, GetTimestamp, (), (const, override));
|
MOCK_METHOD(uint32_t, GetTimestamp, (), (const, override));
|
||||||
MOCK_METHOD(std::string, GetMimeType, (), (const, override));
|
MOCK_METHOD(std::string, GetMimeType, (), (const, override));
|
||||||
MOCK_METHOD(rtc::ArrayView<const uint32_t>, GetContributingSources, (),
|
MOCK_METHOD(rtc::ArrayView<const uint32_t>,
|
||||||
|
GetContributingSources,
|
||||||
|
(),
|
||||||
(const, override));
|
(const, override));
|
||||||
MOCK_METHOD(const std::optional<uint16_t>,
|
MOCK_METHOD(const std::optional<uint16_t>,
|
||||||
SequenceNumber,
|
SequenceNumber,
|
||||||
|
|||||||
@ -64,8 +64,7 @@ class MockVideoDecoder : public VideoDecoder {
|
|||||||
MOCK_METHOD(bool, Configure, (const Settings& settings), (override));
|
MOCK_METHOD(bool, Configure, (const Settings& settings), (override));
|
||||||
MOCK_METHOD(int32_t,
|
MOCK_METHOD(int32_t,
|
||||||
Decode,
|
Decode,
|
||||||
(const EncodedImage& input_image,
|
(const EncodedImage& input_image, int64_t render_time_ms),
|
||||||
int64_t render_time_ms),
|
|
||||||
(override));
|
(override));
|
||||||
MOCK_METHOD(int32_t,
|
MOCK_METHOD(int32_t,
|
||||||
Decode,
|
Decode,
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
#ifndef API_VIDEO_VIDEO_STREAM_ENCODER_SETTINGS_H_
|
#ifndef API_VIDEO_VIDEO_STREAM_ENCODER_SETTINGS_H_
|
||||||
#define API_VIDEO_VIDEO_STREAM_ENCODER_SETTINGS_H_
|
#define API_VIDEO_VIDEO_STREAM_ENCODER_SETTINGS_H_
|
||||||
|
|
||||||
|
|
||||||
#include "api/video/video_bitrate_allocator_factory.h"
|
#include "api/video/video_bitrate_allocator_factory.h"
|
||||||
#include "api/video_codecs/sdp_video_format.h"
|
#include "api/video_codecs/sdp_video_format.h"
|
||||||
#include "api/video_codecs/video_encoder.h"
|
#include "api/video_codecs/video_encoder.h"
|
||||||
|
|||||||
@ -47,9 +47,8 @@ std::string VideoDecoder::DecoderInfo::ToString() const {
|
|||||||
rtc::SimpleStringBuilder oss(string_buf);
|
rtc::SimpleStringBuilder oss(string_buf);
|
||||||
|
|
||||||
oss << "DecoderInfo { "
|
oss << "DecoderInfo { "
|
||||||
<< "prefers_late_decoding = "
|
<< "prefers_late_decoding = " << "implementation_name = '"
|
||||||
<< "implementation_name = '" << implementation_name << "', "
|
<< implementation_name << "', " << "is_hardware_accelerated = "
|
||||||
<< "is_hardware_accelerated = "
|
|
||||||
<< (is_hardware_accelerated ? "true" : "false") << " }";
|
<< (is_hardware_accelerated ? "true" : "false") << " }";
|
||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,4 +10,3 @@
|
|||||||
|
|
||||||
// This file verifies that all include files in this directory can be
|
// This file verifies that all include files in this directory can be
|
||||||
// compiled without errors or other required includes.
|
// compiled without errors or other required includes.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user