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

@ -24,6 +24,7 @@
#include "rtc_base/bind.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/scoped_ref_ptr.h"
#include "rtc_base/thread.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_decoding_time_ms_; // Overall decoding 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_;
std::deque<rtc::Optional<uint8_t>> pending_frame_qps_;
@ -482,7 +483,8 @@ int32_t MediaCodecVideoDecoder::DecodeOnCodecThread(
uint8_t* buffer =
reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_input_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) {
ALOGE << "Input frame size "<< inputImage._length <<
" is bigger than buffer size " << buffer_capacity;

View File

@ -79,7 +79,7 @@ __android_log_print(ANDROID_LOG_VERBOSE, TAG_ENCODER, __VA_ARGS__)
namespace {
// 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 char kCustomQPThresholdsFieldTrial[] = "WebRTC-CustomQPThresholds";
} // namespace
@ -213,8 +213,8 @@ class MediaCodecVideoEncoder : public VideoEncoder {
bool inited_;
bool use_surface_;
enum libyuv::FourCC encoder_fourcc_; // Encoder color space format.
int last_set_bitrate_kbps_; // Last-requested bitrate in kbps.
int last_set_fps_; // Last-requested frame rate.
uint32_t last_set_bitrate_kbps_; // Last-requested bitrate in kbps.
uint32_t last_set_fps_; // Last-requested frame rate.
int64_t current_timestamp_us_; // Current frame timestamps in us.
int frames_received_; // Number of frames received by encoder.
int frames_encoded_; // Number of frames encoded by encoder.
@ -923,7 +923,9 @@ int32_t MediaCodecVideoEncoder::SetRateAllocation(
last_set_fps_ = frame_rate;
}
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) {
ProcessHWError(true /* reset_if_fallback_unavailable */);
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_qp) {
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;
{

View File

@ -70,7 +70,7 @@ class VideoEncoderWrapper : public VideoEncoder {
private:
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;
};

View File

@ -200,9 +200,6 @@ void Matrix::Crop(float xFraction,
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)
: oes_texture_id(id), sampling_matrix(matrix) {}