Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script: for m in PLOG \ LOG_TAG \ LOG_GLEM \ LOG_GLE_EX \ LOG_GLE \ LAST_SYSTEM_ERROR \ LOG_ERRNO_EX \ LOG_ERRNO \ LOG_ERR_EX \ LOG_ERR \ LOG_V \ LOG_F \ LOG_T_F \ LOG_E \ LOG_T \ LOG_CHECK_LEVEL_V \ LOG_CHECK_LEVEL \ LOG do git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g" done git checkout rtc_base/logging.h git cl format Bug: webrtc:8452 Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600 Reviewed-on: https://webrtc-review.googlesource.com/21325 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20617}
This commit is contained in:
committed by
Commit Bot
parent
34fa309129
commit
675513b96a
@ -75,7 +75,7 @@ static inline void AllowBlockingCalls() {
|
||||
// currently thrown exception.
|
||||
static inline bool CheckException(JNIEnv* jni) {
|
||||
if (jni->ExceptionCheck()) {
|
||||
LOG_TAG(rtc::LS_ERROR, TAG_COMMON) << "Java JNI exception.";
|
||||
RTC_LOG_TAG(rtc::LS_ERROR, TAG_COMMON) << "Java JNI exception.";
|
||||
jni->ExceptionDescribe();
|
||||
jni->ExceptionClear();
|
||||
return true;
|
||||
|
||||
@ -50,9 +50,9 @@ namespace jni {
|
||||
#else
|
||||
#define ALOGV(...)
|
||||
#endif
|
||||
#define ALOGD LOG_TAG(rtc::LS_INFO, TAG_DECODER)
|
||||
#define ALOGW LOG_TAG(rtc::LS_WARNING, TAG_DECODER)
|
||||
#define ALOGE LOG_TAG(rtc::LS_ERROR, TAG_DECODER)
|
||||
#define ALOGD RTC_LOG_TAG(rtc::LS_INFO, TAG_DECODER)
|
||||
#define ALOGW RTC_LOG_TAG(rtc::LS_WARNING, TAG_DECODER)
|
||||
#define ALOGE RTC_LOG_TAG(rtc::LS_ERROR, TAG_DECODER)
|
||||
|
||||
enum { kMaxWarningLogFrames = 2 };
|
||||
|
||||
|
||||
@ -67,20 +67,20 @@ namespace jni {
|
||||
#define TAG_ENCODER "MediaCodecVideoEncoder"
|
||||
#ifdef TRACK_BUFFER_TIMING
|
||||
#define ALOGV(...)
|
||||
__android_log_print(ANDROID_LOG_VERBOSE, TAG_ENCODER, __VA_ARGS__)
|
||||
__android_log_print(ANDROID_LOG_VERBOSE, TAG_ENCODER, __VA_ARGS__)
|
||||
#else
|
||||
#define ALOGV(...)
|
||||
#endif
|
||||
#define ALOGD LOG_TAG(rtc::LS_INFO, TAG_ENCODER)
|
||||
#define ALOGW LOG_TAG(rtc::LS_WARNING, TAG_ENCODER)
|
||||
#define ALOGE LOG_TAG(rtc::LS_ERROR, TAG_ENCODER)
|
||||
#define ALOGD RTC_LOG_TAG(rtc::LS_INFO, TAG_ENCODER)
|
||||
#define ALOGW RTC_LOG_TAG(rtc::LS_WARNING, TAG_ENCODER)
|
||||
#define ALOGE RTC_LOG_TAG(rtc::LS_ERROR, TAG_ENCODER)
|
||||
|
||||
namespace {
|
||||
// Maximum time limit between incoming frames before requesting a key frame.
|
||||
const size_t kFrameDiffThresholdMs = 350;
|
||||
const int kMinKeyFrameInterval = 6;
|
||||
const char kH264HighProfileFieldTrial[] = "WebRTC-H264HighProfile";
|
||||
const char kCustomQPThresholdsFieldTrial[] = "WebRTC-CustomQPThresholds";
|
||||
namespace {
|
||||
// Maximum time limit between incoming frames before requesting a key frame.
|
||||
const size_t kFrameDiffThresholdMs = 350;
|
||||
const int kMinKeyFrameInterval = 6;
|
||||
const char kH264HighProfileFieldTrial[] = "WebRTC-H264HighProfile";
|
||||
const char kCustomQPThresholdsFieldTrial[] = "WebRTC-CustomQPThresholds";
|
||||
} // namespace
|
||||
|
||||
// MediaCodecVideoEncoder is a VideoEncoder implementation that uses
|
||||
@ -638,7 +638,7 @@ int32_t MediaCodecVideoEncoder::InitEncodeInternal(int width,
|
||||
encoder_fourcc_ = libyuv::FOURCC_NV12;
|
||||
break;
|
||||
default:
|
||||
LOG(LS_ERROR) << "Wrong color format.";
|
||||
RTC_LOG(LS_ERROR) << "Wrong color format.";
|
||||
ProcessHWError(false /* reset_if_fallback_unavailable */);
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ AndroidVideoTrackSource::AndroidVideoTrackSource(
|
||||
j_surface_texture_helper)),
|
||||
video_buffer_factory_(jni),
|
||||
is_screencast_(is_screencast) {
|
||||
LOG(LS_INFO) << "AndroidVideoTrackSource ctor";
|
||||
RTC_LOG(LS_INFO) << "AndroidVideoTrackSource ctor";
|
||||
camera_thread_checker_.DetachFromThread();
|
||||
|
||||
jclass j_video_frame_buffer_class =
|
||||
|
||||
@ -96,7 +96,7 @@ JNI_FUNCTION_DECLARATION(void,
|
||||
jclass,
|
||||
jlong j_source,
|
||||
jboolean j_success) {
|
||||
LOG(LS_INFO) << "AndroidVideoTrackSourceObserve_nativeCapturerStarted";
|
||||
RTC_LOG(LS_INFO) << "AndroidVideoTrackSourceObserve_nativeCapturerStarted";
|
||||
AndroidVideoTrackSource* source =
|
||||
AndroidVideoTrackSourceFromJavaProxy(j_source);
|
||||
source->SetState(j_success ? AndroidVideoTrackSource::SourceState::kLive
|
||||
@ -108,7 +108,7 @@ JNI_FUNCTION_DECLARATION(void,
|
||||
JNIEnv* jni,
|
||||
jclass,
|
||||
jlong j_source) {
|
||||
LOG(LS_INFO) << "AndroidVideoTrackSourceObserve_nativeCapturerStopped";
|
||||
RTC_LOG(LS_INFO) << "AndroidVideoTrackSourceObserve_nativeCapturerStopped";
|
||||
AndroidVideoTrackSource* source =
|
||||
AndroidVideoTrackSourceFromJavaProxy(j_source);
|
||||
source->SetState(AndroidVideoTrackSource::SourceState::kEnded);
|
||||
@ -122,7 +122,7 @@ JNI_FUNCTION_DECLARATION(void,
|
||||
jint j_width,
|
||||
jint j_height,
|
||||
jint j_fps) {
|
||||
LOG(LS_INFO) << "VideoSource_nativeAdaptOutputFormat";
|
||||
RTC_LOG(LS_INFO) << "VideoSource_nativeAdaptOutputFormat";
|
||||
AndroidVideoTrackSource* source =
|
||||
AndroidVideoTrackSourceFromJavaProxy(j_source);
|
||||
source->OnOutputFormatRequest(j_width, j_height, j_fps);
|
||||
|
||||
@ -239,8 +239,9 @@ rtc::NetworkBindingResult AndroidNetworkMonitor::BindSocketToNetwork(
|
||||
CHECK_EXCEPTION(jni())
|
||||
<< "Error during NetworkMonitor.networkBindingSupported";
|
||||
if (!network_binding_supported) {
|
||||
LOG(LS_WARNING) << "BindSocketToNetwork is not supported on this platform "
|
||||
<< "(Android SDK: " << android_sdk_int_ << ")";
|
||||
RTC_LOG(LS_WARNING)
|
||||
<< "BindSocketToNetwork is not supported on this platform "
|
||||
<< "(Android SDK: " << android_sdk_int_ << ")";
|
||||
return rtc::NetworkBindingResult::NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -269,7 +270,8 @@ rtc::NetworkBindingResult AndroidNetworkMonitor::BindSocketToNetwork(
|
||||
const std::string android_native_lib_path = "libandroid.so";
|
||||
void* lib = dlopen(android_native_lib_path.c_str(), RTLD_NOW);
|
||||
if (lib == nullptr) {
|
||||
LOG(LS_ERROR) << "Library " << android_native_lib_path << " not found!";
|
||||
RTC_LOG(LS_ERROR) << "Library " << android_native_lib_path
|
||||
<< " not found!";
|
||||
return rtc::NetworkBindingResult::NOT_IMPLEMENTED;
|
||||
}
|
||||
marshmallowSetNetworkForSocket =
|
||||
@ -277,7 +279,7 @@ rtc::NetworkBindingResult AndroidNetworkMonitor::BindSocketToNetwork(
|
||||
dlsym(lib, "android_setsocknetwork"));
|
||||
}
|
||||
if (!marshmallowSetNetworkForSocket) {
|
||||
LOG(LS_ERROR) << "Symbol marshmallowSetNetworkForSocket is not found";
|
||||
RTC_LOG(LS_ERROR) << "Symbol marshmallowSetNetworkForSocket is not found";
|
||||
return rtc::NetworkBindingResult::NOT_IMPLEMENTED;
|
||||
}
|
||||
rv = marshmallowSetNetworkForSocket(network_handle, socket_fd);
|
||||
@ -298,7 +300,7 @@ rtc::NetworkBindingResult AndroidNetworkMonitor::BindSocketToNetwork(
|
||||
// avoid doing any disk IO.
|
||||
void* lib = dlopen(net_library_path.c_str(), RTLD_NOW | RTLD_NOLOAD);
|
||||
if (lib == nullptr) {
|
||||
LOG(LS_ERROR) << "Library " << net_library_path << " not found!";
|
||||
RTC_LOG(LS_ERROR) << "Library " << net_library_path << " not found!";
|
||||
return rtc::NetworkBindingResult::NOT_IMPLEMENTED;
|
||||
}
|
||||
lollipopSetNetworkForSocket =
|
||||
@ -306,7 +308,7 @@ rtc::NetworkBindingResult AndroidNetworkMonitor::BindSocketToNetwork(
|
||||
dlsym(lib, "setNetworkForSocket"));
|
||||
}
|
||||
if (!lollipopSetNetworkForSocket) {
|
||||
LOG(LS_ERROR) << "Symbol lollipopSetNetworkForSocket is not found ";
|
||||
RTC_LOG(LS_ERROR) << "Symbol lollipopSetNetworkForSocket is not found ";
|
||||
return rtc::NetworkBindingResult::NOT_IMPLEMENTED;
|
||||
}
|
||||
rv = lollipopSetNetworkForSocket(network_handle, socket_fd);
|
||||
@ -335,7 +337,7 @@ void AndroidNetworkMonitor::OnNetworkConnected(
|
||||
|
||||
void AndroidNetworkMonitor::OnNetworkConnected_w(
|
||||
const NetworkInformation& network_info) {
|
||||
LOG(LS_INFO) << "Network connected: " << network_info.ToString();
|
||||
RTC_LOG(LS_INFO) << "Network connected: " << network_info.ToString();
|
||||
adapter_type_by_name_[network_info.interface_name] =
|
||||
AdapterTypeFromNetworkType(network_info.type);
|
||||
network_info_by_handle_[network_info.handle] = network_info;
|
||||
@ -345,7 +347,7 @@ void AndroidNetworkMonitor::OnNetworkConnected_w(
|
||||
}
|
||||
|
||||
void AndroidNetworkMonitor::OnNetworkDisconnected(NetworkHandle handle) {
|
||||
LOG(LS_INFO) << "Network disconnected for handle " << handle;
|
||||
RTC_LOG(LS_INFO) << "Network disconnected for handle " << handle;
|
||||
worker_thread()->Invoke<void>(
|
||||
RTC_FROM_HERE,
|
||||
rtc::Bind(&AndroidNetworkMonitor::OnNetworkDisconnected_w, this, handle));
|
||||
@ -366,8 +368,8 @@ void AndroidNetworkMonitor::SetNetworkInfos(
|
||||
RTC_CHECK(thread_checker_.CalledOnValidThread());
|
||||
network_handle_by_address_.clear();
|
||||
network_info_by_handle_.clear();
|
||||
LOG(LS_INFO) << "Android network monitor found " << network_infos.size()
|
||||
<< " networks";
|
||||
RTC_LOG(LS_INFO) << "Android network monitor found " << network_infos.size()
|
||||
<< " networks";
|
||||
for (NetworkInformation network : network_infos) {
|
||||
OnNetworkConnected_w(network);
|
||||
}
|
||||
@ -380,7 +382,7 @@ rtc::AdapterType AndroidNetworkMonitor::GetAdapterType(
|
||||
? rtc::ADAPTER_TYPE_UNKNOWN
|
||||
: iter->second;
|
||||
if (type == rtc::ADAPTER_TYPE_UNKNOWN) {
|
||||
LOG(LS_WARNING) << "Get an unknown type for the interface " << if_name;
|
||||
RTC_LOG(LS_WARNING) << "Get an unknown type for the interface " << if_name;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ JNI_FUNCTION_DECLARATION(jlong,
|
||||
rtc::CallSessionFileRotatingLogSink* sink =
|
||||
new rtc::CallSessionFileRotatingLogSink(dir_path, j_maxFileSize);
|
||||
if (!sink->Init()) {
|
||||
LOG_V(rtc::LoggingSeverity::LS_WARNING)
|
||||
RTC_LOG_V(rtc::LoggingSeverity::LS_WARNING)
|
||||
<< "Failed to init CallSessionFileRotatingLogSink for path "
|
||||
<< dir_path;
|
||||
delete sink;
|
||||
@ -56,13 +56,13 @@ JNI_FUNCTION_DECLARATION(jbyteArray,
|
||||
std::unique_ptr<rtc::CallSessionFileRotatingStream> stream(
|
||||
new rtc::CallSessionFileRotatingStream(dir_path));
|
||||
if (!stream->Open()) {
|
||||
LOG_V(rtc::LoggingSeverity::LS_WARNING)
|
||||
RTC_LOG_V(rtc::LoggingSeverity::LS_WARNING)
|
||||
<< "Failed to open CallSessionFileRotatingStream for path " << dir_path;
|
||||
return jni->NewByteArray(0);
|
||||
}
|
||||
size_t log_size = 0;
|
||||
if (!stream->GetSize(&log_size) || log_size == 0) {
|
||||
LOG_V(rtc::LoggingSeverity::LS_WARNING)
|
||||
RTC_LOG_V(rtc::LoggingSeverity::LS_WARNING)
|
||||
<< "CallSessionFileRotatingStream returns 0 size for path " << dir_path;
|
||||
return jni->NewByteArray(0);
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ cricket::Candidate JavaToNativeCandidate(JNIEnv* jni, jobject j_candidate) {
|
||||
JavaToStdString(jni, GetStringField(jni, j_candidate, j_sdp_id));
|
||||
cricket::Candidate candidate;
|
||||
if (!SdpDeserializeCandidate(sdp_mid, sdp, &candidate, NULL)) {
|
||||
LOG(LS_ERROR) << "SdpDescrializeCandidate failed with sdp " << sdp;
|
||||
RTC_LOG(LS_ERROR) << "SdpDescrializeCandidate failed with sdp " << sdp;
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ JNI_FUNCTION_DECLARATION(void,
|
||||
jstring j_message) {
|
||||
std::string message = JavaToStdString(jni, j_message);
|
||||
std::string tag = JavaToStdString(jni, j_tag);
|
||||
LOG_TAG(static_cast<rtc::LoggingSeverity>(j_severity), tag) << message;
|
||||
RTC_LOG_TAG(static_cast<rtc::LoggingSeverity>(j_severity), tag) << message;
|
||||
}
|
||||
|
||||
} // namespace jni
|
||||
|
||||
@ -34,15 +34,15 @@ void OwnedFactoryAndThreads::JavaCallbackOnFactoryThreads() {
|
||||
jclass j_factory_class = FindClass(jni, "org/webrtc/PeerConnectionFactory");
|
||||
jmethodID m = nullptr;
|
||||
if (network_thread_->IsCurrent()) {
|
||||
LOG(LS_INFO) << "Network thread JavaCallback";
|
||||
RTC_LOG(LS_INFO) << "Network thread JavaCallback";
|
||||
m = GetStaticMethodID(jni, j_factory_class, "onNetworkThreadReady", "()V");
|
||||
}
|
||||
if (worker_thread_->IsCurrent()) {
|
||||
LOG(LS_INFO) << "Worker thread JavaCallback";
|
||||
RTC_LOG(LS_INFO) << "Worker thread JavaCallback";
|
||||
m = GetStaticMethodID(jni, j_factory_class, "onWorkerThreadReady", "()V");
|
||||
}
|
||||
if (signaling_thread_->IsCurrent()) {
|
||||
LOG(LS_INFO) << "Signaling thread JavaCallback";
|
||||
RTC_LOG(LS_INFO) << "Signaling thread JavaCallback";
|
||||
m = GetStaticMethodID(jni, j_factory_class, "onSignalingThreadReady",
|
||||
"()V");
|
||||
}
|
||||
@ -53,7 +53,7 @@ void OwnedFactoryAndThreads::JavaCallbackOnFactoryThreads() {
|
||||
}
|
||||
|
||||
void OwnedFactoryAndThreads::InvokeJavaCallbacksOnFactoryThreads() {
|
||||
LOG(LS_INFO) << "InvokeJavaCallbacksOnFactoryThreads.";
|
||||
RTC_LOG(LS_INFO) << "InvokeJavaCallbacksOnFactoryThreads.";
|
||||
network_thread_->Invoke<void>(RTC_FROM_HERE,
|
||||
[this] { JavaCallbackOnFactoryThreads(); });
|
||||
worker_thread_->Invoke<void>(RTC_FROM_HERE,
|
||||
|
||||
@ -100,7 +100,7 @@ JNI_FUNCTION_DECLARATION(jobject,
|
||||
// 32-bit parameter.
|
||||
jlong nativeChannelPtr = jlongFromPointer(channel.get());
|
||||
if (!nativeChannelPtr) {
|
||||
LOG(LS_ERROR) << "Failed to create DataChannel";
|
||||
RTC_LOG(LS_ERROR) << "Failed to create DataChannel";
|
||||
return nullptr;
|
||||
}
|
||||
jclass j_data_channel_class = FindClass(jni, "org/webrtc/DataChannel");
|
||||
|
||||
@ -84,7 +84,7 @@ JNI_FUNCTION_DECLARATION(void,
|
||||
field_trials_init_string = new char[init_string_length + 1];
|
||||
rtc::strcpyn(field_trials_init_string, init_string_length + 1, init_string);
|
||||
jni->ReleaseStringUTFChars(j_trials_init_string, init_string);
|
||||
LOG(LS_INFO) << "initializeFieldTrials: " << field_trials_init_string;
|
||||
RTC_LOG(LS_INFO) << "initializeFieldTrials: " << field_trials_init_string;
|
||||
}
|
||||
field_trial::InitFieldTrialsFromString(field_trials_init_string);
|
||||
}
|
||||
@ -115,7 +115,7 @@ JNI_FUNCTION_DECLARATION(jboolean,
|
||||
|
||||
const char* init_string =
|
||||
jni->GetStringUTFChars(j_event_tracing_filename, NULL);
|
||||
LOG(LS_INFO) << "Starting internal tracing to: " << init_string;
|
||||
RTC_LOG(LS_INFO) << "Starting internal tracing to: " << init_string;
|
||||
bool ret = rtc::tracing::StartInternalCapture(init_string);
|
||||
jni->ReleaseStringUTFChars(j_event_tracing_filename, init_string);
|
||||
return ret;
|
||||
@ -383,7 +383,8 @@ JNI_FUNCTION_DECLARATION(jlong,
|
||||
rtc::RTCCertificateGenerator::GenerateCertificate(
|
||||
rtc::KeyParams(key_type), rtc::Optional<uint64_t>());
|
||||
if (!certificate) {
|
||||
LOG(LS_ERROR) << "Failed to generate certificate. KeyType: " << key_type;
|
||||
RTC_LOG(LS_ERROR) << "Failed to generate certificate. KeyType: "
|
||||
<< key_type;
|
||||
return 0;
|
||||
}
|
||||
rtc_config.certificates.push_back(certificate);
|
||||
|
||||
@ -119,7 +119,7 @@ JNI_FUNCTION_DECLARATION(
|
||||
owned_factory->encoder_factory());
|
||||
if (use_media_codec_encoder_factory && encoder_factory &&
|
||||
jni->IsInstanceOf(local_egl_context, j_eglbase14_context_class)) {
|
||||
LOG(LS_INFO) << "Set EGL context for HW encoding.";
|
||||
RTC_LOG(LS_INFO) << "Set EGL context for HW encoding.";
|
||||
encoder_factory->SetEGLContext(jni, local_egl_context);
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ JNI_FUNCTION_DECLARATION(
|
||||
static_cast<MediaCodecVideoDecoderFactory*>(
|
||||
owned_factory->decoder_factory());
|
||||
if (use_media_codec_decoder_factory && decoder_factory) {
|
||||
LOG(LS_INFO) << "Set EGL context for HW decoding.";
|
||||
RTC_LOG(LS_INFO) << "Set EGL context for HW decoding.";
|
||||
decoder_factory->SetEGLContext(jni, remote_egl_context);
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ SurfaceTextureHelper::SurfaceTextureHelper(JNIEnv* jni,
|
||||
}
|
||||
|
||||
SurfaceTextureHelper::~SurfaceTextureHelper() {
|
||||
LOG(LS_INFO) << "SurfaceTextureHelper dtor";
|
||||
RTC_LOG(LS_INFO) << "SurfaceTextureHelper dtor";
|
||||
JNIEnv* jni = AttachCurrentThreadIfNeeded();
|
||||
jni->CallVoidMethod(
|
||||
*j_surface_texture_helper_,
|
||||
|
||||
@ -177,7 +177,7 @@ void VideoDecoderWrapper::OnDecodedFrame(JNIEnv* jni,
|
||||
FrameExtraInfo frame_extra_info;
|
||||
do {
|
||||
if (frame_extra_infos_.empty()) {
|
||||
LOG(LS_WARNING) << "Java decoder produced an unexpected frame.";
|
||||
RTC_LOG(LS_WARNING) << "Java decoder produced an unexpected frame.";
|
||||
return;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ int32_t VideoDecoderWrapper::HandleReturnCode(JNIEnv* jni, jobject code) {
|
||||
InitDecodeInternal(jni);
|
||||
}
|
||||
|
||||
LOG(LS_WARNING) << "Falling back to software decoder.";
|
||||
RTC_LOG(LS_WARNING) << "Falling back to software decoder.";
|
||||
return WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE;
|
||||
} else {
|
||||
return value;
|
||||
|
||||
@ -220,7 +220,7 @@ void VideoEncoderWrapper::OnEncodedFrame(JNIEnv* jni,
|
||||
FrameExtraInfo frame_extra_info;
|
||||
do {
|
||||
if (frame_extra_infos_.empty()) {
|
||||
LOG(LS_WARNING)
|
||||
RTC_LOG(LS_WARNING)
|
||||
<< "Java encoder produced an unexpected frame with timestamp: "
|
||||
<< capture_time_ns;
|
||||
return;
|
||||
@ -259,11 +259,11 @@ int32_t VideoEncoderWrapper::HandleReturnCode(JNIEnv* jni, jobject code) {
|
||||
// Try resetting the codec.
|
||||
if (++num_resets_ <= kMaxJavaEncoderResets &&
|
||||
Release() == WEBRTC_VIDEO_CODEC_OK) {
|
||||
LOG(LS_WARNING) << "Reset Java encoder: " << num_resets_;
|
||||
RTC_LOG(LS_WARNING) << "Reset Java encoder: " << num_resets_;
|
||||
return InitEncodeInternal(jni);
|
||||
}
|
||||
|
||||
LOG(LS_WARNING) << "Falling back to software decoder.";
|
||||
RTC_LOG(LS_WARNING) << "Falling back to software decoder.";
|
||||
return WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE;
|
||||
} else {
|
||||
return value;
|
||||
@ -280,10 +280,10 @@ RTPFragmentationHeader VideoEncoderWrapper::ParseFragmentationHeader(
|
||||
const std::vector<H264::NaluIndex> nalu_idxs =
|
||||
H264::FindNaluIndices(buffer.data(), buffer.size());
|
||||
if (nalu_idxs.empty()) {
|
||||
LOG(LS_ERROR) << "Start code is not found!";
|
||||
LOG(LS_ERROR) << "Data:" << buffer[0] << " " << buffer[1] << " "
|
||||
<< buffer[2] << " " << buffer[3] << " " << buffer[4] << " "
|
||||
<< buffer[5];
|
||||
RTC_LOG(LS_ERROR) << "Start code is not found!";
|
||||
RTC_LOG(LS_ERROR) << "Data:" << buffer[0] << " " << buffer[1] << " "
|
||||
<< buffer[2] << " " << buffer[3] << " " << buffer[4]
|
||||
<< " " << buffer[5];
|
||||
}
|
||||
header.VerifyAndAllocateFragmentationHeader(nalu_idxs.size());
|
||||
for (size_t i = 0; i < nalu_idxs.size(); i++) {
|
||||
|
||||
@ -61,7 +61,7 @@ Java_org_webrtc_VideoFileRenderer_nativeI420Scale(JNIEnv* jni,
|
||||
width, height, dst_y, dst_stride_y, dst_u, dst_stride_u, dst_v,
|
||||
dst_stride_v, dstWidth, dstHeight, libyuv::kFilterBilinear);
|
||||
if (ret) {
|
||||
LOG(LS_ERROR) << "Error scaling I420 frame: " << ret;
|
||||
RTC_LOG(LS_ERROR) << "Error scaling I420 frame: " << ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user