Enable clang::find_bad_constructs for sdk/ (part 1).

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: I6f03c46e772ccf4d15951a4b9d4e12015d539e58
Reviewed-on: https://webrtc-review.googlesource.com/90408
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24113}
This commit is contained in:
Mirko Bonadei
2018-07-26 12:20:40 +02:00
committed by Commit Bot
parent a15fd0dee6
commit 17aff35e1d
21 changed files with 97 additions and 164 deletions

View File

@ -49,7 +49,7 @@ class AudioDeviceIOS : public AudioDeviceGeneric,
public rtc::MessageHandler {
public:
AudioDeviceIOS();
~AudioDeviceIOS();
~AudioDeviceIOS() override;
void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override;
@ -65,11 +65,11 @@ class AudioDeviceIOS : public AudioDeviceGeneric,
int32_t StartPlayout() override;
int32_t StopPlayout() override;
bool Playing() const override { return playing_; }
bool Playing() const override;
int32_t StartRecording() override;
int32_t StopRecording() override;
bool Recording() const override { return recording_; }
bool Recording() const override;
// These methods returns hard-coded delay values and not dynamic delay
// estimates. The reason is that iOS supports a built-in AEC and the WebRTC

View File

@ -271,6 +271,10 @@ int32_t AudioDeviceIOS::StopPlayout() {
return 0;
}
bool AudioDeviceIOS::Playing() const {
return playing_;
}
int32_t AudioDeviceIOS::StartRecording() {
LOGI() << "StartRecording";
RTC_DCHECK_RUN_ON(&thread_checker_);
@ -305,6 +309,10 @@ int32_t AudioDeviceIOS::StopRecording() {
return 0;
}
bool AudioDeviceIOS::Recording() const {
return recording_;
}
int32_t AudioDeviceIOS::PlayoutDelay(uint16_t& delayMS) const {
delayMS = kFixedPlayoutDelayEstimate;
return 0;

View File

@ -21,7 +21,7 @@ namespace webrtc {
class ObjCVideoDecoderFactory : public VideoDecoderFactory {
public:
explicit ObjCVideoDecoderFactory(id<RTCVideoDecoderFactory>);
~ObjCVideoDecoderFactory();
~ObjCVideoDecoderFactory() override;
id<RTCVideoDecoderFactory> wrapped_decoder_factory() const;

View File

@ -22,7 +22,7 @@ namespace webrtc {
class ObjCVideoEncoderFactory : public VideoEncoderFactory {
public:
explicit ObjCVideoEncoderFactory(id<RTCVideoEncoderFactory>);
~ObjCVideoEncoderFactory();
~ObjCVideoEncoderFactory() override;
id<RTCVideoEncoderFactory> wrapped_encoder_factory() const;

View File

@ -31,16 +31,16 @@ class ObjCVideoTrackSource : public rtc::AdaptedVideoTrackSource {
// This class can not be used for implementing screen casting. Hopefully, this
// function will be removed before we add that to iOS/Mac.
bool is_screencast() const override { return false; }
bool is_screencast() const override;
// Indicates that the encoder should denoise video before encoding it.
// If it is not set, the default configuration is used which is different
// depending on video codec.
absl::optional<bool> needs_denoising() const override { return false; }
absl::optional<bool> needs_denoising() const override;
SourceState state() const override { return SourceState::kLive; }
SourceState state() const override;
bool remote() const override { return false; }
bool remote() const override;
void OnCapturedFrame(RTCVideoFrame* frame);

View File

@ -39,6 +39,22 @@ ObjCVideoTrackSource::ObjCVideoTrackSource(RTCObjCVideoSourceAdapter *adapter) :
adapter_.objCVideoTrackSource = this;
}
bool ObjCVideoTrackSource::is_screencast() const {
return false;
}
absl::optional<bool> ObjCVideoTrackSource::needs_denoising() const {
return false;
}
MediaSourceInterface::SourceState ObjCVideoTrackSource::state() const {
return SourceState::kLive;
}
bool ObjCVideoTrackSource::remote() const {
return false;
}
void ObjCVideoTrackSource::OnOutputFormatRequest(int width, int height, int fps) {
cricket::VideoFormat format(width, height, cricket::VideoFormat::FpsToInterval(fps), 0);
video_adapter()->OnOutputFormatRequest(format);