Remove clang:find_bad_constructs suppression from call:call.
This CL removes //build/config/clang:find_bad_constructs from the suppressed_configs list, which means that clang:find_bad_constructs is now enabled on these translation units. Bug: webrtc:9251, webrtc:163 Change-Id: I74cb86c29cebb69dd22083718f1446f18f705cd4 Reviewed-on: https://webrtc-review.googlesource.com/95883 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24483}
This commit is contained in:
parent
c7ea852189
commit
8fdcac3f06
@ -145,6 +145,7 @@ rtc_source_set("video_stream_encoder") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
"video_stream_encoder_interface.h",
|
||||
"video_stream_encoder_observer.cc",
|
||||
"video_stream_encoder_observer.h",
|
||||
"video_stream_encoder_settings.h",
|
||||
]
|
||||
|
||||
17
api/video/video_stream_encoder_observer.cc
Normal file
17
api/video/video_stream_encoder_observer.cc
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "api/video/video_stream_encoder_observer.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
VideoStreamEncoderObserver::AdaptationSteps::AdaptationSteps() = default;
|
||||
|
||||
} // namespace webrtc
|
||||
@ -37,6 +37,7 @@ class VideoStreamEncoderObserver : public CpuOveruseMetricsObserver {
|
||||
public:
|
||||
// Number of resolution and framerate reductions (unset if disabled).
|
||||
struct AdaptationSteps {
|
||||
AdaptationSteps();
|
||||
absl::optional<int> num_resolution_reductions = 0;
|
||||
absl::optional<int> num_framerate_reductions = 0;
|
||||
};
|
||||
@ -58,7 +59,7 @@ class VideoStreamEncoderObserver : public CpuOveruseMetricsObserver {
|
||||
kMediaOptimization
|
||||
};
|
||||
|
||||
virtual ~VideoStreamEncoderObserver() = default;
|
||||
~VideoStreamEncoderObserver() override = default;
|
||||
|
||||
virtual void OnIncomingFrame(int width, int height) = 0;
|
||||
|
||||
|
||||
@ -39,6 +39,15 @@ AudioState::~AudioState() {
|
||||
RTC_DCHECK(sending_streams_.empty());
|
||||
}
|
||||
|
||||
AudioProcessing* AudioState::audio_processing() {
|
||||
RTC_DCHECK(config_.audio_processing);
|
||||
return config_.audio_processing.get();
|
||||
}
|
||||
|
||||
AudioTransport* AudioState::audio_transport() {
|
||||
return &audio_transport_;
|
||||
}
|
||||
|
||||
bool AudioState::typing_noise_detected() const {
|
||||
RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
||||
return audio_transport_.typing_noise_detected();
|
||||
|
||||
@ -35,11 +35,8 @@ class AudioState final : public webrtc::AudioState {
|
||||
explicit AudioState(const AudioState::Config& config);
|
||||
~AudioState() override;
|
||||
|
||||
AudioProcessing* audio_processing() override {
|
||||
RTC_DCHECK(config_.audio_processing);
|
||||
return config_.audio_processing.get();
|
||||
}
|
||||
AudioTransport* audio_transport() override { return &audio_transport_; }
|
||||
AudioProcessing* audio_processing() override;
|
||||
AudioTransport* audio_transport() override;
|
||||
|
||||
void SetPlayout(bool enabled) override;
|
||||
void SetRecording(bool enabled) override;
|
||||
|
||||
@ -21,7 +21,7 @@ namespace internal {
|
||||
class NullAudioPoller final : public rtc::MessageHandler {
|
||||
public:
|
||||
explicit NullAudioPoller(AudioTransport* audio_transport);
|
||||
~NullAudioPoller();
|
||||
~NullAudioPoller() override;
|
||||
|
||||
protected:
|
||||
void OnMessage(rtc::Message* msg) override;
|
||||
|
||||
@ -47,6 +47,9 @@ TransportFeedbackPacketLossTracker::TransportFeedbackPacketLossTracker(
|
||||
Reset();
|
||||
}
|
||||
|
||||
TransportFeedbackPacketLossTracker::~TransportFeedbackPacketLossTracker() =
|
||||
default;
|
||||
|
||||
void TransportFeedbackPacketLossTracker::Reset() {
|
||||
acked_packets_ = 0;
|
||||
plr_state_.Reset();
|
||||
|
||||
@ -35,6 +35,7 @@ class TransportFeedbackPacketLossTracker final {
|
||||
TransportFeedbackPacketLossTracker(int64_t max_window_size_ms,
|
||||
size_t plr_min_num_acked_packets,
|
||||
size_t rplr_min_num_acked_pairs);
|
||||
~TransportFeedbackPacketLossTracker();
|
||||
|
||||
void OnPacketAdded(uint16_t seq_num, int64_t send_time_ms);
|
||||
|
||||
|
||||
@ -177,11 +177,6 @@ rtc_static_library("call") {
|
||||
"receive_time_calculator.h",
|
||||
]
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
":bitrate_allocator",
|
||||
":call_interfaces",
|
||||
|
||||
@ -170,7 +170,7 @@ class Call final : public webrtc::Call,
|
||||
public:
|
||||
Call(const Call::Config& config,
|
||||
std::unique_ptr<RtpTransportControllerSendInterface> transport_send);
|
||||
virtual ~Call();
|
||||
~Call() override;
|
||||
|
||||
// Implements webrtc::Call.
|
||||
PacketReceiver* Receiver() override;
|
||||
|
||||
@ -15,6 +15,9 @@ namespace webrtc {
|
||||
CallConfig::CallConfig(RtcEventLog* event_log) : event_log(event_log) {
|
||||
RTC_DCHECK(event_log);
|
||||
}
|
||||
|
||||
CallConfig::CallConfig(const CallConfig& config) = default;
|
||||
|
||||
CallConfig::~CallConfig() = default;
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -24,6 +24,7 @@ class RtcEventLog;
|
||||
|
||||
struct CallConfig {
|
||||
explicit CallConfig(RtcEventLog* event_log);
|
||||
CallConfig(const CallConfig&);
|
||||
~CallConfig();
|
||||
|
||||
RTC_DEPRECATED static constexpr int kDefaultStartBitrateBps = 300000;
|
||||
|
||||
@ -16,6 +16,9 @@ FlexfecReceiveStream::Config::Config(Transport* rtcp_send_transport)
|
||||
: rtcp_send_transport(rtcp_send_transport) {
|
||||
RTC_DCHECK(rtcp_send_transport);
|
||||
}
|
||||
|
||||
FlexfecReceiveStream::Config::Config(const Config& config) = default;
|
||||
|
||||
FlexfecReceiveStream::Config::~Config() = default;
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -37,6 +37,7 @@ class FlexfecReceiveStream : public RtpPacketSinkInterface {
|
||||
|
||||
struct Config {
|
||||
explicit Config(Transport* rtcp_send_transport);
|
||||
Config(const Config&);
|
||||
~Config();
|
||||
|
||||
std::string ToString() const;
|
||||
|
||||
@ -33,7 +33,7 @@ class ReceiveSideCongestionController : public CallStatsObserver,
|
||||
ReceiveSideCongestionController(const Clock* clock,
|
||||
PacketRouter* packet_router);
|
||||
|
||||
virtual ~ReceiveSideCongestionController() {}
|
||||
~ReceiveSideCongestionController() override {}
|
||||
|
||||
virtual void OnReceivedPacket(int64_t arrival_time_ms,
|
||||
size_t payload_size,
|
||||
@ -60,7 +60,7 @@ class ReceiveSideCongestionController : public CallStatsObserver,
|
||||
WrappingBitrateEstimator(RemoteBitrateObserver* observer,
|
||||
const Clock* clock);
|
||||
|
||||
virtual ~WrappingBitrateEstimator() {}
|
||||
~WrappingBitrateEstimator() override;
|
||||
|
||||
void IncomingPacket(int64_t arrival_time_ms,
|
||||
size_t payload_size,
|
||||
|
||||
@ -31,6 +31,9 @@ ReceiveSideCongestionController::WrappingBitrateEstimator::
|
||||
packets_since_absolute_send_time_(0),
|
||||
min_bitrate_bps_(congestion_controller::GetMinBitrateBps()) {}
|
||||
|
||||
ReceiveSideCongestionController::WrappingBitrateEstimator::
|
||||
~WrappingBitrateEstimator() = default;
|
||||
|
||||
void ReceiveSideCongestionController::WrappingBitrateEstimator::IncomingPacket(
|
||||
int64_t arrival_time_ms,
|
||||
size_t payload_size,
|
||||
|
||||
@ -167,4 +167,9 @@ void FecControllerDefault::UpdateWithEncodedData(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool FecControllerDefault::UseLossVectorMask() {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -26,7 +26,7 @@ class FecControllerDefault : public FecController {
|
||||
FecControllerDefault(Clock* clock,
|
||||
VCMProtectionCallback* protection_callback);
|
||||
explicit FecControllerDefault(Clock* clock);
|
||||
~FecControllerDefault();
|
||||
~FecControllerDefault() override;
|
||||
void SetProtectionCallback(
|
||||
VCMProtectionCallback* protection_callback) override;
|
||||
void SetProtectionMethod(bool enable_fec, bool enable_nack) override;
|
||||
@ -41,7 +41,7 @@ class FecControllerDefault : public FecController {
|
||||
int64_t round_trip_time_ms) override;
|
||||
void UpdateWithEncodedData(const size_t encoded_image_length,
|
||||
const FrameType encoded_image_frametype) override;
|
||||
bool UseLossVectorMask() override { return false; }
|
||||
bool UseLossVectorMask() override;
|
||||
|
||||
private:
|
||||
enum { kBitrateAverageWinMs = 1000 };
|
||||
|
||||
@ -29,6 +29,21 @@ namespace {
|
||||
const uint8_t start_code_h264[] = {0, 0, 0, 1};
|
||||
} // namespace
|
||||
|
||||
H264SpsPpsTracker::H264SpsPpsTracker() = default;
|
||||
H264SpsPpsTracker::~H264SpsPpsTracker() = default;
|
||||
|
||||
H264SpsPpsTracker::PpsInfo::PpsInfo() = default;
|
||||
H264SpsPpsTracker::PpsInfo::PpsInfo(PpsInfo&& rhs) = default;
|
||||
H264SpsPpsTracker::PpsInfo& H264SpsPpsTracker::PpsInfo::operator=(
|
||||
PpsInfo&& rhs) = default;
|
||||
H264SpsPpsTracker::PpsInfo::~PpsInfo() = default;
|
||||
|
||||
H264SpsPpsTracker::SpsInfo::SpsInfo() = default;
|
||||
H264SpsPpsTracker::SpsInfo::SpsInfo(SpsInfo&& rhs) = default;
|
||||
H264SpsPpsTracker::SpsInfo& H264SpsPpsTracker::SpsInfo::operator=(
|
||||
SpsInfo&& rhs) = default;
|
||||
H264SpsPpsTracker::SpsInfo::~SpsInfo() = default;
|
||||
|
||||
H264SpsPpsTracker::PacketAction H264SpsPpsTracker::CopyAndFixBitstream(
|
||||
VCMPacket* packet) {
|
||||
RTC_DCHECK(packet->codec == kVideoCodecH264);
|
||||
|
||||
@ -28,6 +28,9 @@ class H264SpsPpsTracker {
|
||||
public:
|
||||
enum PacketAction { kInsert, kDrop, kRequestKeyframe };
|
||||
|
||||
H264SpsPpsTracker();
|
||||
~H264SpsPpsTracker();
|
||||
|
||||
PacketAction CopyAndFixBitstream(VCMPacket* packet);
|
||||
|
||||
void InsertSpsPpsNalus(const std::vector<uint8_t>& sps,
|
||||
@ -35,12 +38,22 @@ class H264SpsPpsTracker {
|
||||
|
||||
private:
|
||||
struct PpsInfo {
|
||||
PpsInfo();
|
||||
PpsInfo(PpsInfo&& rhs);
|
||||
PpsInfo& operator=(PpsInfo&& rhs);
|
||||
~PpsInfo();
|
||||
|
||||
int sps_id = -1;
|
||||
size_t size = 0;
|
||||
std::unique_ptr<uint8_t[]> data;
|
||||
};
|
||||
|
||||
struct SpsInfo {
|
||||
SpsInfo();
|
||||
SpsInfo(SpsInfo&& rhs);
|
||||
SpsInfo& operator=(SpsInfo&& rhs);
|
||||
~SpsInfo();
|
||||
|
||||
size_t size = 0;
|
||||
int width = -1;
|
||||
int height = -1;
|
||||
|
||||
@ -31,6 +31,8 @@ RtpFrameReferenceFinder::RtpFrameReferenceFinder(
|
||||
cleared_to_seq_num_(-1),
|
||||
frame_callback_(frame_callback) {}
|
||||
|
||||
RtpFrameReferenceFinder::~RtpFrameReferenceFinder() = default;
|
||||
|
||||
void RtpFrameReferenceFinder::ManageFrame(
|
||||
std::unique_ptr<RtpFrameObject> frame) {
|
||||
rtc::CritScope lock(&crit_);
|
||||
|
||||
@ -40,6 +40,7 @@ class OnCompleteFrameCallback {
|
||||
class RtpFrameReferenceFinder {
|
||||
public:
|
||||
explicit RtpFrameReferenceFinder(OnCompleteFrameCallback* frame_callback);
|
||||
~RtpFrameReferenceFinder();
|
||||
|
||||
// Manage this frame until:
|
||||
// - We have all information needed to determine its references, after
|
||||
|
||||
@ -36,6 +36,8 @@ QualityThreshold::QualityThreshold(int low_threshold,
|
||||
RTC_CHECK_LT(low_threshold, high_threshold);
|
||||
}
|
||||
|
||||
QualityThreshold::~QualityThreshold() = default;
|
||||
|
||||
void QualityThreshold::AddMeasurement(int measurement) {
|
||||
int prev_val = until_full_ > 0 ? 0 : buffer_[next_index_];
|
||||
buffer_[next_index_] = measurement;
|
||||
|
||||
@ -25,6 +25,7 @@ class QualityThreshold {
|
||||
int high_threshold,
|
||||
float fraction,
|
||||
int max_measurements);
|
||||
~QualityThreshold();
|
||||
|
||||
void AddMeasurement(int measurement);
|
||||
absl::optional<bool> IsHigh() const;
|
||||
|
||||
@ -881,6 +881,8 @@ void ReceiveStatisticsProxy::DecoderThreadStopped() {
|
||||
ReceiveStatisticsProxy::ContentSpecificStats::ContentSpecificStats()
|
||||
: interframe_delay_percentiles(kMaxCommonInterframeDelayMs) {}
|
||||
|
||||
ReceiveStatisticsProxy::ContentSpecificStats::~ContentSpecificStats() = default;
|
||||
|
||||
void ReceiveStatisticsProxy::ContentSpecificStats::Add(
|
||||
const ContentSpecificStats& other) {
|
||||
e2e_delay_counter.Add(other.e2e_delay_counter);
|
||||
|
||||
@ -48,7 +48,7 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback,
|
||||
public:
|
||||
ReceiveStatisticsProxy(const VideoReceiveStream::Config* config,
|
||||
Clock* clock);
|
||||
virtual ~ReceiveStatisticsProxy();
|
||||
~ReceiveStatisticsProxy() override;
|
||||
|
||||
VideoReceiveStream::Stats GetStats() const;
|
||||
|
||||
@ -115,6 +115,7 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback,
|
||||
|
||||
struct ContentSpecificStats {
|
||||
ContentSpecificStats();
|
||||
~ContentSpecificStats();
|
||||
|
||||
void Add(const ContentSpecificStats& other);
|
||||
|
||||
|
||||
@ -43,6 +43,8 @@ RtpStreamsSynchronizer::RtpStreamsSynchronizer(Syncable* syncable_video)
|
||||
process_thread_checker_.DetachFromThread();
|
||||
}
|
||||
|
||||
RtpStreamsSynchronizer::~RtpStreamsSynchronizer() = default;
|
||||
|
||||
void RtpStreamsSynchronizer::ConfigureSync(Syncable* syncable_audio) {
|
||||
rtc::CritScope lock(&crit_);
|
||||
if (syncable_audio == syncable_audio_) {
|
||||
|
||||
@ -28,6 +28,7 @@ class Syncable;
|
||||
class RtpStreamsSynchronizer : public Module {
|
||||
public:
|
||||
explicit RtpStreamsSynchronizer(Syncable* syncable_video);
|
||||
~RtpStreamsSynchronizer() override;
|
||||
|
||||
void ConfigureSync(Syncable* syncable_audio);
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ class RtpVideoStreamReceiver : public RtpData,
|
||||
NackSender* nack_sender,
|
||||
KeyFrameRequestSender* keyframe_request_sender,
|
||||
video_coding::OnCompleteFrameCallback* complete_frame_callback);
|
||||
~RtpVideoStreamReceiver();
|
||||
~RtpVideoStreamReceiver() override;
|
||||
|
||||
void AddReceiveCodec(const VideoCodec& video_codec,
|
||||
const std::map<std::string, std::string>& codec_params);
|
||||
|
||||
@ -155,6 +155,8 @@ SendStatisticsProxy::~SendStatisticsProxy() {
|
||||
UpdateCodecTypeHistogram(payload_name_);
|
||||
}
|
||||
|
||||
SendStatisticsProxy::FallbackEncoderInfo::FallbackEncoderInfo() = default;
|
||||
|
||||
SendStatisticsProxy::UmaSamplesContainer::UmaSamplesContainer(
|
||||
const char* prefix,
|
||||
const VideoSendStream::Stats& stats,
|
||||
|
||||
@ -150,7 +150,7 @@ class SendStatisticsProxy : public VideoStreamEncoderObserver,
|
||||
int64_t last_ms;
|
||||
};
|
||||
struct FallbackEncoderInfo {
|
||||
FallbackEncoderInfo() = default;
|
||||
FallbackEncoderInfo();
|
||||
bool is_possible = true;
|
||||
bool is_active = false;
|
||||
int on_off_events = 0;
|
||||
|
||||
@ -20,6 +20,8 @@ TransportAdapter::TransportAdapter(Transport* transport)
|
||||
RTC_DCHECK(nullptr != transport);
|
||||
}
|
||||
|
||||
TransportAdapter::~TransportAdapter() = default;
|
||||
|
||||
bool TransportAdapter::SendRtp(const uint8_t* packet,
|
||||
size_t length,
|
||||
const PacketOptions& options) {
|
||||
|
||||
@ -21,6 +21,7 @@ namespace internal {
|
||||
class TransportAdapter : public Transport {
|
||||
public:
|
||||
explicit TransportAdapter(Transport* transport);
|
||||
~TransportAdapter() override;
|
||||
|
||||
bool SendRtp(const uint8_t* packet,
|
||||
size_t length,
|
||||
|
||||
@ -47,7 +47,7 @@ class VideoStreamDecoder : public VCMReceiveCallback,
|
||||
bool enable_fec,
|
||||
ReceiveStatisticsProxy* receive_statistics_proxy,
|
||||
rtc::VideoSinkInterface<VideoFrame>* incoming_video_stream);
|
||||
~VideoStreamDecoder();
|
||||
~VideoStreamDecoder() override;
|
||||
|
||||
// Implements VCMReceiveCallback.
|
||||
int32_t FrameToRender(VideoFrame& video_frame,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user