Index: talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java |
diff --git a/talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java b/talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java |
index 0e6b978c9d57de37428e51eb0bd78c2337e9f6f8..2f35dc349394dd3f69fe7e0e72d4dba57f87a7fe 100644 |
--- a/talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java |
+++ b/talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java |
@@ -29,9 +29,9 @@ package org.webrtc; |
import android.hardware.Camera; |
import android.os.SystemClock; |
-import android.util.Log; |
import org.webrtc.CameraEnumerationAndroid.CaptureFormat; |
+import org.webrtc.Logging; |
import java.util.ArrayList; |
import java.util.List; |
@@ -58,16 +58,16 @@ public class CameraEnumerator implements CameraEnumerationAndroid.Enumerator { |
} |
private List<CaptureFormat> enumerateFormats(int cameraId) { |
- Log.d(TAG, "Get supported formats for camera index " + cameraId + "."); |
+ Logging.d(TAG, "Get supported formats for camera index " + cameraId + "."); |
final long startTimeMs = SystemClock.elapsedRealtime(); |
final Camera.Parameters parameters; |
Camera camera = null; |
try { |
- Log.d(TAG, "Opening camera with index " + cameraId); |
+ Logging.d(TAG, "Opening camera with index " + cameraId); |
camera = Camera.open(cameraId); |
parameters = camera.getParameters(); |
} catch (RuntimeException e) { |
- Log.e(TAG, "Open camera failed on camera index " + cameraId, e); |
+ Logging.e(TAG, "Open camera failed on camera index " + cameraId, e); |
return new ArrayList<CaptureFormat>(); |
} finally { |
if (camera != null) { |
@@ -91,11 +91,11 @@ public class CameraEnumerator implements CameraEnumerationAndroid.Enumerator { |
formatList.add(new CaptureFormat(size.width, size.height, minFps, maxFps)); |
} |
} catch (Exception e) { |
- Log.e(TAG, "getSupportedFormats() failed on camera index " + cameraId, e); |
+ Logging.e(TAG, "getSupportedFormats() failed on camera index " + cameraId, e); |
} |
final long endTimeMs = SystemClock.elapsedRealtime(); |
- Log.d(TAG, "Get supported formats for camera index " + cameraId + " done." |
+ Logging.d(TAG, "Get supported formats for camera index " + cameraId + " done." |
+ " Time spent: " + (endTimeMs - startTimeMs) + " ms."); |
return formatList; |
} |