mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Remove superfluous logging
PiperOrigin-RevId: 263718527
This commit is contained in:
parent
efb0549416
commit
bc655839dd
1 changed files with 13 additions and 15 deletions
|
|
@ -342,7 +342,7 @@ class JniBufferManager {
|
||||||
*fb = out_buffer->vpx_fb;
|
*fb = out_buffer->vpx_fb;
|
||||||
int retVal = 0;
|
int retVal = 0;
|
||||||
if (!out_buffer->vpx_fb.data || all_buffer_count >= MAX_FRAMES) {
|
if (!out_buffer->vpx_fb.data || all_buffer_count >= MAX_FRAMES) {
|
||||||
LOGE("ERROR: JniBufferManager get_buffer OOM.");
|
LOGE("JniBufferManager get_buffer OOM.");
|
||||||
retVal = -1;
|
retVal = -1;
|
||||||
} else {
|
} else {
|
||||||
memset(fb->data, 0, fb->size);
|
memset(fb->data, 0, fb->size);
|
||||||
|
|
@ -354,7 +354,7 @@ class JniBufferManager {
|
||||||
|
|
||||||
JniFrameBuffer* get_buffer(int id) const {
|
JniFrameBuffer* get_buffer(int id) const {
|
||||||
if (id < 0 || id >= all_buffer_count) {
|
if (id < 0 || id >= all_buffer_count) {
|
||||||
LOGE("ERROR: JniBufferManager get_buffer invalid id %d.", id);
|
LOGE("JniBufferManager get_buffer invalid id %d.", id);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return all_buffers[id];
|
return all_buffers[id];
|
||||||
|
|
@ -362,7 +362,7 @@ class JniBufferManager {
|
||||||
|
|
||||||
void add_ref(int id) {
|
void add_ref(int id) {
|
||||||
if (id < 0 || id >= all_buffer_count) {
|
if (id < 0 || id >= all_buffer_count) {
|
||||||
LOGE("ERROR: JniBufferManager add_ref invalid id %d.", id);
|
LOGE("JniBufferManager add_ref invalid id %d.", id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pthread_mutex_lock(&mutex);
|
pthread_mutex_lock(&mutex);
|
||||||
|
|
@ -372,13 +372,13 @@ class JniBufferManager {
|
||||||
|
|
||||||
int release(int id) {
|
int release(int id) {
|
||||||
if (id < 0 || id >= all_buffer_count) {
|
if (id < 0 || id >= all_buffer_count) {
|
||||||
LOGE("ERROR: JniBufferManager release invalid id %d.", id);
|
LOGE("JniBufferManager release invalid id %d.", id);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
pthread_mutex_lock(&mutex);
|
pthread_mutex_lock(&mutex);
|
||||||
JniFrameBuffer* buffer = all_buffers[id];
|
JniFrameBuffer* buffer = all_buffers[id];
|
||||||
if (!buffer->ref_count) {
|
if (!buffer->ref_count) {
|
||||||
LOGE("ERROR: JniBufferManager release, buffer already released.");
|
LOGE("JniBufferManager release, buffer already released.");
|
||||||
pthread_mutex_unlock(&mutex);
|
pthread_mutex_unlock(&mutex);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -444,7 +444,7 @@ DECODER_FUNC(jlong, vpxInit, jboolean disableLoopFilter,
|
||||||
vpx_codec_err_t err =
|
vpx_codec_err_t err =
|
||||||
vpx_codec_dec_init(context->decoder, &vpx_codec_vp9_dx_algo, &cfg, 0);
|
vpx_codec_dec_init(context->decoder, &vpx_codec_vp9_dx_algo, &cfg, 0);
|
||||||
if (err) {
|
if (err) {
|
||||||
LOGE("ERROR: Failed to initialize libvpx decoder, error = %d.", err);
|
LOGE("Failed to initialize libvpx decoder, error = %d.", err);
|
||||||
errorCode = err;
|
errorCode = err;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -452,20 +452,19 @@ DECODER_FUNC(jlong, vpxInit, jboolean disableLoopFilter,
|
||||||
err = vpx_codec_control(context->decoder, VP9D_SET_ROW_MT,
|
err = vpx_codec_control(context->decoder, VP9D_SET_ROW_MT,
|
||||||
enableRowMultiThreadMode);
|
enableRowMultiThreadMode);
|
||||||
if (err) {
|
if (err) {
|
||||||
LOGE("ERROR: Failed to enable row multi thread mode, error = %d.", err);
|
LOGE("Failed to enable row multi thread mode, error = %d.", err);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (disableLoopFilter) {
|
if (disableLoopFilter) {
|
||||||
err = vpx_codec_control(context->decoder, VP9_SET_SKIP_LOOP_FILTER, true);
|
err = vpx_codec_control(context->decoder, VP9_SET_SKIP_LOOP_FILTER, true);
|
||||||
if (err) {
|
if (err) {
|
||||||
LOGE("ERROR: Failed to shut off libvpx loop filter, error = %d.", err);
|
LOGE("Failed to shut off libvpx loop filter, error = %d.", err);
|
||||||
}
|
}
|
||||||
#ifdef VPX_CTRL_VP9_SET_LOOP_FILTER_OPT
|
#ifdef VPX_CTRL_VP9_SET_LOOP_FILTER_OPT
|
||||||
} else {
|
} else {
|
||||||
err = vpx_codec_control(context->decoder, VP9D_SET_LOOP_FILTER_OPT, true);
|
err = vpx_codec_control(context->decoder, VP9D_SET_LOOP_FILTER_OPT, true);
|
||||||
if (err) {
|
if (err) {
|
||||||
LOGE("ERROR: Failed to enable loop filter optimization, error = %d.",
|
LOGE("Failed to enable loop filter optimization, error = %d.", err);
|
||||||
err);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -473,8 +472,7 @@ DECODER_FUNC(jlong, vpxInit, jboolean disableLoopFilter,
|
||||||
context->decoder, vpx_get_frame_buffer, vpx_release_frame_buffer,
|
context->decoder, vpx_get_frame_buffer, vpx_release_frame_buffer,
|
||||||
context->buffer_manager);
|
context->buffer_manager);
|
||||||
if (err) {
|
if (err) {
|
||||||
LOGE("ERROR: Failed to set libvpx frame buffer functions, error = %d.",
|
LOGE("Failed to set libvpx frame buffer functions, error = %d.", err);
|
||||||
err);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populate JNI References.
|
// Populate JNI References.
|
||||||
|
|
@ -500,7 +498,7 @@ DECODER_FUNC(jlong, vpxDecode, jlong jContext, jobject encoded, jint len) {
|
||||||
vpx_codec_decode(context->decoder, buffer, len, NULL, 0);
|
vpx_codec_decode(context->decoder, buffer, len, NULL, 0);
|
||||||
errorCode = 0;
|
errorCode = 0;
|
||||||
if (status != VPX_CODEC_OK) {
|
if (status != VPX_CODEC_OK) {
|
||||||
LOGE("ERROR: vpx_codec_decode() failed, status= %d", status);
|
LOGE("vpx_codec_decode() failed, status= %d", status);
|
||||||
errorCode = status;
|
errorCode = status;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -597,8 +595,8 @@ DECODER_FUNC(jint, vpxGetFrame, jlong jContext, jobject jOutputBuffer) {
|
||||||
} else if (outputMode == kOutputModeSurfaceYuv) {
|
} else if (outputMode == kOutputModeSurfaceYuv) {
|
||||||
if (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
|
if (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
|
||||||
LOGE(
|
LOGE(
|
||||||
"ERROR: High bit depth output format %d not supported in surface "
|
"High bit depth output format %d not supported in surface YUV output "
|
||||||
"YUV output mode",
|
"mode",
|
||||||
img->fmt);
|
img->fmt);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue