Remove warning suppression flags from sdk/android.

Bug: webrtc:9251
Change-Id: Iafd10a09dd34dfdd590711bb5c6a36d08298d1e7
Reviewed-on: https://webrtc-review.googlesource.com/79882
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23513}
This commit is contained in:
Mirko Bonadei
2018-06-01 14:54:29 +02:00
committed by Commit Bot
parent 267287407a
commit ab55c34ef1
6 changed files with 12 additions and 29 deletions

View File

@ -22,18 +22,6 @@ group("android") {
} }
} }
config("libjingle_peerconnection_jni_warnings_config") {
# The warnings below are enabled by default. Since GN orders compiler flags
# for a target before flags from configs, the only way to disable such
# warnings is by having them in a separate config, loaded from the target.
if (!is_win) {
cflags = [
"-Wno-sign-compare",
"-Wno-unused-variable",
]
}
}
generate_jni("generated_base_jni") { generate_jni("generated_base_jni") {
sources = [ sources = [
"api/org/webrtc/NetworkMonitor.java", "api/org/webrtc/NetworkMonitor.java",
@ -347,8 +335,6 @@ rtc_static_library("video_jni") {
"src/jni/yuvhelper.cc", "src/jni/yuvhelper.cc",
] ]
configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
# TODO(jschuh): Bug 1348: fix this warning. # TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
@ -569,8 +555,6 @@ rtc_static_library("peerconnection_jni") {
"src/jni/pc/turncustomizer.h", "src/jni/pc/turncustomizer.h",
] ]
configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
if (is_clang) { if (is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ suppressed_configs += [
@ -645,8 +629,6 @@ rtc_static_library("libjingle_peerconnection_metrics_default_jni") {
"src/jni/androidmetrics.cc", "src/jni/androidmetrics.cc",
] ]
configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
deps = [ deps = [
":base_jni", ":base_jni",
":generated_metrics_jni", ":generated_metrics_jni",

View File

@ -24,6 +24,7 @@
#include "rtc_base/bind.h" #include "rtc_base/bind.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "rtc_base/logging.h" #include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/scoped_ref_ptr.h"
#include "rtc_base/thread.h" #include "rtc_base/thread.h"
#include "rtc_base/timeutils.h" #include "rtc_base/timeutils.h"
@ -120,7 +121,7 @@ class MediaCodecVideoDecoder : public VideoDecoder, public rtc::MessageHandler {
int current_bytes_; // Encoded bytes in the current statistics interval. int current_bytes_; // Encoded bytes in the current statistics interval.
int current_decoding_time_ms_; // Overall decoding time in the current second int current_decoding_time_ms_; // Overall decoding time in the current second
int current_delay_time_ms_; // Overall delay time in the current second. int current_delay_time_ms_; // Overall delay time in the current second.
uint32_t max_pending_frames_; // Maximum number of pending input frames. int32_t max_pending_frames_; // Maximum number of pending input frames.
H264BitstreamParser h264_bitstream_parser_; H264BitstreamParser h264_bitstream_parser_;
std::deque<rtc::Optional<uint8_t>> pending_frame_qps_; std::deque<rtc::Optional<uint8_t>> pending_frame_qps_;
@ -482,7 +483,8 @@ int32_t MediaCodecVideoDecoder::DecodeOnCodecThread(
uint8_t* buffer = uint8_t* buffer =
reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_input_buffer)); reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_input_buffer));
RTC_CHECK(buffer) << "Indirect buffer??"; RTC_CHECK(buffer) << "Indirect buffer??";
int64_t buffer_capacity = jni->GetDirectBufferCapacity(j_input_buffer); size_t buffer_capacity = rtc::dchecked_cast<size_t>(
jni->GetDirectBufferCapacity(j_input_buffer));
if (CheckException(jni) || buffer_capacity < inputImage._length) { if (CheckException(jni) || buffer_capacity < inputImage._length) {
ALOGE << "Input frame size "<< inputImage._length << ALOGE << "Input frame size "<< inputImage._length <<
" is bigger than buffer size " << buffer_capacity; " is bigger than buffer size " << buffer_capacity;

View File

@ -79,7 +79,7 @@ __android_log_print(ANDROID_LOG_VERBOSE, TAG_ENCODER, __VA_ARGS__)
namespace { namespace {
// Maximum time limit between incoming frames before requesting a key frame. // Maximum time limit between incoming frames before requesting a key frame.
const size_t kFrameDiffThresholdMs = 350; const int64_t kFrameDiffThresholdMs = 350;
const int kMinKeyFrameInterval = 6; const int kMinKeyFrameInterval = 6;
const char kCustomQPThresholdsFieldTrial[] = "WebRTC-CustomQPThresholds"; const char kCustomQPThresholdsFieldTrial[] = "WebRTC-CustomQPThresholds";
} // namespace } // namespace
@ -213,8 +213,8 @@ class MediaCodecVideoEncoder : public VideoEncoder {
bool inited_; bool inited_;
bool use_surface_; bool use_surface_;
enum libyuv::FourCC encoder_fourcc_; // Encoder color space format. enum libyuv::FourCC encoder_fourcc_; // Encoder color space format.
int last_set_bitrate_kbps_; // Last-requested bitrate in kbps. uint32_t last_set_bitrate_kbps_; // Last-requested bitrate in kbps.
int last_set_fps_; // Last-requested frame rate. uint32_t last_set_fps_; // Last-requested frame rate.
int64_t current_timestamp_us_; // Current frame timestamps in us. int64_t current_timestamp_us_; // Current frame timestamps in us.
int frames_received_; // Number of frames received by encoder. int frames_received_; // Number of frames received by encoder.
int frames_encoded_; // Number of frames encoded by encoder. int frames_encoded_; // Number of frames encoded by encoder.
@ -923,7 +923,9 @@ int32_t MediaCodecVideoEncoder::SetRateAllocation(
last_set_fps_ = frame_rate; last_set_fps_ = frame_rate;
} }
bool ret = Java_MediaCodecVideoEncoder_setRates( bool ret = Java_MediaCodecVideoEncoder_setRates(
jni, j_media_codec_video_encoder_, last_set_bitrate_kbps_, last_set_fps_); jni, j_media_codec_video_encoder_,
rtc::dchecked_cast<int>(last_set_bitrate_kbps_),
rtc::dchecked_cast<int>(last_set_fps_));
if (CheckException(jni) || !ret) { if (CheckException(jni) || !ret) {
ProcessHWError(true /* reset_if_fallback_unavailable */); ProcessHWError(true /* reset_if_fallback_unavailable */);
return sw_fallback_required_ ? WEBRTC_VIDEO_CODEC_OK return sw_fallback_required_ ? WEBRTC_VIDEO_CODEC_OK

View File

@ -159,7 +159,7 @@ void VideoDecoderWrapper::OnDecodedFrame(
const JavaRef<jobject>& j_decode_time_ms, const JavaRef<jobject>& j_decode_time_ms,
const JavaRef<jobject>& j_qp) { const JavaRef<jobject>& j_qp) {
RTC_DCHECK_RUNS_SERIALIZED(&callback_race_checker_); RTC_DCHECK_RUNS_SERIALIZED(&callback_race_checker_);
const uint64_t timestamp_ns = GetJavaVideoFrameTimestampNs(env, j_frame); const int64_t timestamp_ns = GetJavaVideoFrameTimestampNs(env, j_frame);
FrameExtraInfo frame_extra_info; FrameExtraInfo frame_extra_info;
{ {

View File

@ -70,7 +70,7 @@ class VideoEncoderWrapper : public VideoEncoder {
private: private:
struct FrameExtraInfo { struct FrameExtraInfo {
uint64_t capture_time_ns; // Used as an identifier of the frame. int64_t capture_time_ns; // Used as an identifier of the frame.
uint32_t timestamp_rtp; uint32_t timestamp_rtp;
}; };

View File

@ -200,9 +200,6 @@ void Matrix::Crop(float xFraction,
Multiply(crop_matrix, old.elem_, this->elem_); Multiply(crop_matrix, old.elem_, this->elem_);
} }
// Aligning pointer to 64 bytes for improved performance, e.g. use SIMD.
static const int kBufferAlignment = 64;
NativeHandleImpl::NativeHandleImpl(int id, const Matrix& matrix) NativeHandleImpl::NativeHandleImpl(int id, const Matrix& matrix)
: oes_texture_id(id), sampling_matrix(matrix) {} : oes_texture_id(id), sampling_matrix(matrix) {}