Skip to content

Commit 2dda977

Browse files
committed
デバッグログ出力を抑制
1 parent e3bc6ee commit 2dda977

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

app/src/main/java/com/serenegiant/widget/DistributorCameraGLSurfaceView.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class DistributorCameraGLSurfaceView @JvmOverloads constructor(
378378
return
379379
}
380380
val viewAspect = viewWidth / viewHeight.toDouble()
381-
Log.i(TAG, String.format("updateViewport:view(%d,%d)%f,video(%1.0f,%1.0f)",
381+
if (DEBUG) Log.i(TAG, String.format("updateViewport:view(%d,%d)%f,video(%1.0f,%1.0f)",
382382
viewWidth, viewHeight, viewAspect, videoWidth, videoHeight))
383383
Matrix.setIdentityM(mMvpMatrix, 0)
384384
when (val scaleMode = mCameraDelegator.scaleMode) {
@@ -404,7 +404,7 @@ class DistributorCameraGLSurfaceView @JvmOverloads constructor(
404404
y = (viewHeight - height) / 2
405405
}
406406
// set viewport to draw keeping aspect ration of camera image
407-
Log.i(TAG, String.format("updateViewport:xy(%d,%d),size(%d,%d)",
407+
if (DEBUG) Log.i(TAG, String.format("updateViewport:xy(%d,%d),size(%d,%d)",
408408
x, y, width, height))
409409
GLES20.glViewport(x, y, width, height)
410410
}
@@ -417,7 +417,7 @@ class DistributorCameraGLSurfaceView @JvmOverloads constructor(
417417
scaleX.coerceAtLeast(scaleY) else scaleX.coerceAtMost(scaleY)
418418
val width = scale * videoWidth
419419
val height = scale * videoHeight
420-
Log.i(TAG, String.format("updateViewport:size(%1.0f,%1.0f),scale(%f,%f),mat(%f,%f)",
420+
if (DEBUG) Log.i(TAG, String.format("updateViewport:size(%1.0f,%1.0f),scale(%f,%f),mat(%f,%f)",
421421
width, height, scaleX, scaleY, width / viewWidth, height / viewHeight))
422422
Matrix.scaleM(mMvpMatrix, 0,
423423
(width / viewWidth).toFloat(),

common/src/main/java/com/serenegiant/camera/Camera2Utils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public static Size chooseOptimalSize(
259259
final Size ppsfv = Collections.max(Arrays.asList(sizes), new CompareSizesByArea());
260260
// widthまたはheightが未指定名の時は最大解像度を使う・・・ここは1080pに制限しといた方が良いかもしれない
261261
if ((_width <= 0) || (_height <= 0)) {
262-
Log.d(TAG, "chooseOptimalSize:select" + ppsfv);
262+
if (DEBUG) Log.d(TAG, "chooseOptimalSize:select" + ppsfv);
263263
return ppsfv;
264264
}
265265

@@ -282,7 +282,7 @@ public static Size chooseOptimalSize(
282282
for (Size sz : sizes) {
283283
if ((sz.getWidth() == width) && (sz.getHeight() == height)) {
284284
selectedSize = sz;
285-
Log.v(TAG, "chooseOptimalSize:found(" + selectedSize + ")");
285+
if (DEBUG) Log.v(TAG, "chooseOptimalSize:found(" + selectedSize + ")");
286286
return selectedSize;
287287
}
288288
}
@@ -328,7 +328,7 @@ public static Size chooseOptimalSize(
328328
}
329329
// アスペクト比の差が+/-5%未満のがあればそれを選択する
330330
if ((selectedSize != null) && (selectedDelta < 0.05)) {
331-
Log.d(TAG, String.format("chooseOptimalSize:select(%dx%d), request(%d,%d)",
331+
if (DEBUG) Log.d(TAG, String.format("chooseOptimalSize:select(%dx%d), request(%d,%d)",
332332
selectedSize.getWidth(), selectedSize.getHeight(), width, height));
333333
return selectedSize;
334334
}
@@ -342,7 +342,7 @@ public static Size chooseOptimalSize(
342342
if (selectedSize == null) {
343343
selectedSize = ppsfv;
344344
}
345-
Log.d(TAG, "chooseOptimalSize:select(" + selectedSize + ")");
345+
if (DEBUG) Log.d(TAG, "chooseOptimalSize:select(" + selectedSize + ")");
346346
return selectedSize;
347347
}
348348

common/src/main/java/com/serenegiant/glutils/AbstractDistributeTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ private void handleRemoveAll() {
633633
if (DEBUG) Log.v(TAG, "handleRemoveAll:");
634634
synchronized (mTargets) {
635635
final int n = mTargets.size();
636-
Log.i(TAG, "handleRemoveAll:n=" + n);
636+
if (DEBUG) Log.i(TAG, "handleRemoveAll:n=" + n);
637637
for (int i = 0; i < n; i++) {
638638
final RendererTarget target = mTargets.valueAt(i);
639639
if (target != null) {

0 commit comments

Comments
 (0)