Misc cleanups to webrtc/android code:

- Replace some deprecated calls/enums with their more modern equivalents.
- Clean up some usage of global data and/or hide it better
- Catch specific exceptions instead of Exception, and log the exception instead
  of just its message.
- Random log message cleanups
- Added a build_with_libjingle gyp variable to mimic build_with_chromium for
  when webrtc is built as part of a libjingle project but not part of chromium.

BUG=webrtc:1169
TEST=none

Review URL: https://webrtc-codereview.appspot.com/1105010

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3554 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fischman@webrtc.org 2013-02-20 23:13:46 +00:00
parent 56a9ec30e9
commit f61e02c81f
11 changed files with 152 additions and 149 deletions

View File

@ -17,11 +17,13 @@
# This will be set to zero in the supplement.gypi triggered by a # This will be set to zero in the supplement.gypi triggered by a
# gclient hook in the standalone build. # gclient hook in the standalone build.
'build_with_chromium%': 1, 'build_with_chromium%': 1,
'build_with_libjingle%': 0,
}, },
'build_with_chromium%': '<(build_with_chromium)', 'build_with_chromium%': '<(build_with_chromium)',
'build_with_libjingle%': '<(build_with_libjingle)',
'conditions': [ 'conditions': [
['build_with_chromium==1', { ['build_with_chromium==1 or build_with_libjingle==1', {
'webrtc_root%': '<(DEPTH)/third_party/webrtc', 'webrtc_root%': '<(DEPTH)/third_party/webrtc',
}, { }, {
'webrtc_root%': '<(DEPTH)/webrtc', 'webrtc_root%': '<(DEPTH)/webrtc',
@ -29,12 +31,14 @@
], ],
}, },
'build_with_chromium%': '<(build_with_chromium)', 'build_with_chromium%': '<(build_with_chromium)',
'build_with_libjingle%': '<(build_with_libjingle)',
'webrtc_root%': '<(webrtc_root)', 'webrtc_root%': '<(webrtc_root)',
'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8', 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8',
'include_opus%': 1, 'include_opus%': 1,
}, },
'build_with_chromium%': '<(build_with_chromium)', 'build_with_chromium%': '<(build_with_chromium)',
'build_with_libjingle%': '<(build_with_libjingle)',
'webrtc_root%': '<(webrtc_root)', 'webrtc_root%': '<(webrtc_root)',
'webrtc_vp8_dir%': '<(webrtc_vp8_dir)', 'webrtc_vp8_dir%': '<(webrtc_vp8_dir)',
'include_opus%': '<(include_opus)', 'include_opus%': '<(include_opus)',
@ -121,6 +125,9 @@
'build_libvpx%': 0, 'build_libvpx%': 0,
'include_tests%': 0, 'include_tests%': 0,
}], }],
['build_with_libjingle==1', {
'include_tests%': 0,
}],
['target_arch=="arm"', { ['target_arch=="arm"', {
'prefer_fixed_point%': 1, 'prefer_fixed_point%': 1,
}], }],

View File

@ -61,9 +61,9 @@ class WebRTCAudioDevice {
@SuppressWarnings("unused") @SuppressWarnings("unused")
private int InitRecording(int audioSource, int sampleRate) { private int InitRecording(int audioSource, int sampleRate) {
// get the minimum buffer size that can be used // get the minimum buffer size that can be used
int minRecBufSize = int minRecBufSize = AudioRecord.getMinBufferSize(
AudioRecord.getMinBufferSize(sampleRate, sampleRate,
AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT); AudioFormat.ENCODING_PCM_16BIT);
// DoLog("min rec buf size is " + minRecBufSize); // DoLog("min rec buf size is " + minRecBufSize);
@ -83,7 +83,7 @@ class WebRTCAudioDevice {
_audioRecord = new AudioRecord( _audioRecord = new AudioRecord(
audioSource, audioSource,
sampleRate, sampleRate,
AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT, AudioFormat.ENCODING_PCM_16BIT,
recBufSize); recBufSize);
@ -127,7 +127,7 @@ class WebRTCAudioDevice {
// get the minimum buffer size that can be used // get the minimum buffer size that can be used
int minPlayBufSize = AudioTrack.getMinBufferSize( int minPlayBufSize = AudioTrack.getMinBufferSize(
sampleRate, sampleRate,
AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.CHANNEL_OUT_MONO,
AudioFormat.ENCODING_PCM_16BIT); AudioFormat.ENCODING_PCM_16BIT);
// DoLog("min play buf size is " + minPlayBufSize); // DoLog("min play buf size is " + minPlayBufSize);
@ -149,7 +149,7 @@ class WebRTCAudioDevice {
_audioTrack = new AudioTrack( _audioTrack = new AudioTrack(
AudioManager.STREAM_VOICE_CALL, AudioManager.STREAM_VOICE_CALL,
sampleRate, sampleRate,
AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.CHANNEL_OUT_MONO,
AudioFormat.ENCODING_PCM_16BIT, AudioFormat.ENCODING_PCM_16BIT,
playBufSize, AudioTrack.MODE_STREAM); playBufSize, AudioTrack.MODE_STREAM);
} catch (Exception e) { } catch (Exception e) {
@ -388,7 +388,7 @@ class WebRTCAudioDevice {
return -1; return -1;
} }
int apiLevel = Integer.parseInt(android.os.Build.VERSION.SDK); int apiLevel = android.os.Build.VERSION.SDK_INT;
if ((3 == apiLevel) || (4 == apiLevel)) { if ((3 == apiLevel) || (4 == apiLevel)) {
// 1.5 and 1.6 devices // 1.5 and 1.6 devices
@ -464,7 +464,7 @@ class WebRTCAudioDevice {
} }
private void SetAudioMode(boolean startCall) { private void SetAudioMode(boolean startCall) {
int apiLevel = Integer.parseInt(android.os.Build.VERSION.SDK); int apiLevel = android.os.Build.VERSION.SDK_INT;
if (_audioManager == null && _context != null) { if (_audioManager == null && _context != null) {
_audioManager = (AudioManager) _audioManager = (AudioManager)

View File

@ -57,7 +57,7 @@ DllHandle InternalLoadDll(const char dll_name[]) {
#endif #endif
if (handle == kInvalidDllHandle) { if (handle == kInvalidDllHandle) {
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, -1, WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, -1,
"Can't load %s : %d", dll_name, GetDllError()); "Can't load %s : %s", dll_name, GetDllError());
} }
return handle; return handle;
} }
@ -66,7 +66,7 @@ void InternalUnloadDll(DllHandle handle) {
#ifdef WEBRTC_LINUX #ifdef WEBRTC_LINUX
if (dlclose(handle) != 0) { if (dlclose(handle) != 0) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1,
"%d", GetDllError()); "%s", GetDllError());
} }
#else #else
#error Not implemented #error Not implemented

View File

@ -22,6 +22,13 @@ namespace webrtc
namespace videocapturemodule namespace videocapturemodule
{ {
static jclass g_capabilityClass = NULL;
// static
void DeviceInfoAndroid::SetAndroidCaptureClasses(jclass capabilityClass) {
g_capabilityClass = capabilityClass;
}
VideoCaptureModule::DeviceInfo* VideoCaptureModule::DeviceInfo*
VideoCaptureImpl::CreateDeviceInfo (const WebRtc_Word32 id) { VideoCaptureImpl::CreateDeviceInfo (const WebRtc_Word32 id) {
videocapturemodule::DeviceInfoAndroid *deviceInfo = videocapturemodule::DeviceInfoAndroid *deviceInfo =
@ -172,23 +179,20 @@ WebRtc_Word32 DeviceInfoAndroid::CreateCapabilityMap(
return -1; return -1;
// Find the capability class // Find the capability class
jclass javaCapClassLocal = env->FindClass(AndroidJavaCaptureCapabilityClass); jclass javaCapClass = g_capabilityClass;
if (javaCapClassLocal == NULL) { if (javaCapClass == NULL) {
VideoCaptureAndroid::ReleaseAndroidDeviceInfoObjects(attached); VideoCaptureAndroid::ReleaseAndroidDeviceInfoObjects(attached);
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id, WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
"%s: Can't find java class VideoCaptureCapabilityAndroid.", "%s: SetAndroidCaptureClasses must be called first!",
__FUNCTION__); __FUNCTION__);
return -1; return -1;
} }
// get the method ID for the Android Java GetCapabilityArray . // get the method ID for the Android Java GetCapabilityArray .
char signature[256]; jmethodID cid = env->GetMethodID(
sprintf(signature, javaCmDevInfoClass,
"(Ljava/lang/String;)[L%s;",
AndroidJavaCaptureCapabilityClass);
jmethodID cid = env->GetMethodID(javaCmDevInfoClass,
"GetCapabilityArray", "GetCapabilityArray",
signature); "(Ljava/lang/String;)[Lorg/webrtc/videoengine/CaptureCapabilityAndroid;");
if (cid == NULL) { if (cid == NULL) {
VideoCaptureAndroid::ReleaseAndroidDeviceInfoObjects(attached); VideoCaptureAndroid::ReleaseAndroidDeviceInfoObjects(attached);
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id, WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
@ -216,9 +220,9 @@ WebRtc_Word32 DeviceInfoAndroid::CreateCapabilityMap(
return -1; return -1;
} }
jfieldID widthField = env->GetFieldID(javaCapClassLocal, "width", "I"); jfieldID widthField = env->GetFieldID(javaCapClass, "width", "I");
jfieldID heigtField = env->GetFieldID(javaCapClassLocal, "height", "I"); jfieldID heigtField = env->GetFieldID(javaCapClass, "height", "I");
jfieldID maxFpsField = env->GetFieldID(javaCapClassLocal, "maxFPS", "I"); jfieldID maxFpsField = env->GetFieldID(javaCapClass, "maxFPS", "I");
if (widthField == NULL || heigtField == NULL || maxFpsField == NULL) { if (widthField == NULL || heigtField == NULL || maxFpsField == NULL) {
VideoCaptureAndroid::ReleaseAndroidDeviceInfoObjects(attached); VideoCaptureAndroid::ReleaseAndroidDeviceInfoObjects(attached);
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id, WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
@ -240,7 +244,7 @@ WebRtc_Word32 DeviceInfoAndroid::CreateCapabilityMap(
cap->expectedCaptureDelay = _expectedCaptureDelay; cap->expectedCaptureDelay = _expectedCaptureDelay;
cap->rawType = kVideoNV21; cap->rawType = kVideoNV21;
cap->maxFPS = env->GetIntField(capabilityElement, maxFpsField); cap->maxFPS = env->GetIntField(capabilityElement, maxFpsField);
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id, WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideoCapture, _id,
"%s: Cap width %d, height %d, fps %d", __FUNCTION__, "%s: Cap width %d, height %d, fps %d", __FUNCTION__,
cap->width, cap->height, cap->maxFPS); cap->width, cap->height, cap->maxFPS);
_captureCapabilities.Insert(i, cap); _captureCapabilities.Insert(i, cap);

View File

@ -15,9 +15,6 @@
#include "../video_capture_impl.h" #include "../video_capture_impl.h"
#include "../device_info_impl.h" #include "../device_info_impl.h"
#define AndroidJavaCaptureDeviceInfoClass "org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid"
#define AndroidJavaCaptureCapabilityClass "org/webrtc/videoengine/CaptureCapabilityAndroid"
namespace webrtc namespace webrtc
{ {
namespace videocapturemodule namespace videocapturemodule
@ -32,6 +29,7 @@ namespace videocapturemodule
class DeviceInfoAndroid : public DeviceInfoImpl { class DeviceInfoAndroid : public DeviceInfoImpl {
public: public:
static void SetAndroidCaptureClasses(jclass capabilityClass);
DeviceInfoAndroid(const WebRtc_Word32 id); DeviceInfoAndroid(const WebRtc_Word32 id);
WebRtc_Word32 Init(); WebRtc_Word32 Init();
virtual ~DeviceInfoAndroid(); virtual ~DeviceInfoAndroid();

View File

@ -42,7 +42,6 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
private boolean isCaptureStarted = false; private boolean isCaptureStarted = false;
private boolean isCaptureRunning = false; private boolean isCaptureRunning = false;
private boolean isSurfaceReady = false; private boolean isSurfaceReady = false;
private SurfaceHolder surfaceHolder = null;
private final int numCaptureBuffers = 3; private final int numCaptureBuffers = 3;
private int expectedFrameSize = 0; private int expectedFrameSize = 0;
@ -61,6 +60,9 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
public static public static
void DeleteVideoCaptureAndroid(VideoCaptureAndroid captureAndroid) { void DeleteVideoCaptureAndroid(VideoCaptureAndroid captureAndroid) {
Log.d(TAG, "DeleteVideoCaptureAndroid"); Log.d(TAG, "DeleteVideoCaptureAndroid");
if (captureAndroid.camera == null) {
return;
}
captureAndroid.StopCapture(); captureAndroid.StopCapture();
captureAndroid.camera.release(); captureAndroid.camera.release();
@ -82,19 +84,16 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
return -1; return -1;
} }
Log.d(TAG, "tryStartCapture " + width + Log.d(TAG, "tryStartCapture: " + width +
" height " + height +" frame rate " + frameRate + "x" + height +", frameRate: " + frameRate +
"isCaptureRunning " + isCaptureRunning + ", isCaptureRunning: " + isCaptureRunning +
"isSurfaceReady " + isSurfaceReady + ", isSurfaceReady: " + isSurfaceReady +
"isCaptureStarted " + isCaptureStarted); ", isCaptureStarted: " + isCaptureStarted);
if (isCaptureRunning || !isSurfaceReady || !isCaptureStarted) { if (isCaptureRunning || !isCaptureStarted) {
return 0; return 0;
} }
try {
camera.setPreviewDisplay(surfaceHolder);
CaptureCapabilityAndroid currentCapability = CaptureCapabilityAndroid currentCapability =
new CaptureCapabilityAndroid(); new CaptureCapabilityAndroid();
currentCapability.width = width; currentCapability.width = width;
@ -124,12 +123,6 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
isCaptureRunning = true; isCaptureRunning = true;
previewBufferLock.unlock(); previewBufferLock.unlock();
}
catch (Exception ex) {
Log.e(TAG, "Failed to start camera");
return -1;
}
isCaptureRunning = true; isCaptureRunning = true;
return 0; return 0;
} }
@ -140,6 +133,9 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
// Get the local preview SurfaceHolder from the static render class // Get the local preview SurfaceHolder from the static render class
localPreview = ViERenderer.GetLocalRenderer(); localPreview = ViERenderer.GetLocalRenderer();
if (localPreview != null) { if (localPreview != null) {
if (localPreview.getSurface() != null) {
surfaceCreated(localPreview);
}
localPreview.addCallback(this); localPreview.addCallback(this);
} }
@ -163,9 +159,8 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
previewBufferLock.unlock(); previewBufferLock.unlock();
camera.stopPreview(); camera.stopPreview();
camera.setPreviewCallbackWithBuffer(null); camera.setPreviewCallbackWithBuffer(null);
} } catch (RuntimeException e) {
catch (Exception ex) { Log.e(TAG, "Failed to stop camera", e);
Log.e(TAG, "Failed to stop camera");
return -1; return -1;
} }
@ -237,22 +232,27 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
public void surfaceChanged(SurfaceHolder holder, public void surfaceChanged(SurfaceHolder holder,
int format, int width, int height) { int format, int width, int height) {
Log.d(TAG, "VideoCaptureAndroid::surfaceChanged"); Log.d(TAG, "VideoCaptureAndroid::surfaceChanged");
captureLock.lock();
isSurfaceReady = true;
surfaceHolder = holder;
tryStartCapture(mCaptureWidth, mCaptureHeight, mCaptureFPS);
captureLock.unlock();
return;
} }
public void surfaceCreated(SurfaceHolder holder) { public void surfaceCreated(SurfaceHolder holder) {
Log.d(TAG, "VideoCaptureAndroid::surfaceCreated"); Log.d(TAG, "VideoCaptureAndroid::surfaceCreated");
captureLock.lock();
try {
camera.setPreviewDisplay(holder);
} catch (IOException e) {
Log.e(TAG, "Failed to set preview surface!", e);
}
captureLock.unlock();
} }
public void surfaceDestroyed(SurfaceHolder holder) { public void surfaceDestroyed(SurfaceHolder holder) {
Log.d(TAG, "VideoCaptureAndroid::surfaceDestroyed"); Log.d(TAG, "VideoCaptureAndroid::surfaceDestroyed");
isSurfaceReady = false; captureLock.lock();
try {
camera.setPreviewDisplay(null);
} catch (IOException e) {
Log.e(TAG, "Failed to clear preview surface!", e);
}
captureLock.unlock();
} }
} }

View File

@ -88,7 +88,6 @@ public class VideoCaptureDeviceInfoAndroid {
private int Init() { private int Init() {
// Populate the deviceList with available cameras and their capabilities. // Populate the deviceList with available cameras and their capabilities.
Camera camera = null; Camera camera = null;
try{
if(android.os.Build.VERSION.SDK_INT > 8) { if(android.os.Build.VERSION.SDK_INT > 8) {
// From Android 2.3 and onwards // From Android 2.3 and onwards
for(int i = 0; i < Camera.getNumberOfCameras(); ++i) { for(int i = 0; i < Camera.getNumberOfCameras(); ++i) {
@ -119,12 +118,6 @@ public class VideoCaptureDeviceInfoAndroid {
deviceList.add(newDevice); deviceList.add(newDevice);
} }
} }
}
catch (Exception ex) {
Log.e(TAG, "Failed to init VideoCaptureDeviceInfo ex" +
ex.getLocalizedMessage());
return -1;
}
VerifyCapabilities(); VerifyCapabilities();
return 0; return 0;
} }
@ -149,9 +142,8 @@ public class VideoCaptureDeviceInfoAndroid {
newDevice.captureCapabilies[i].height = s.height; newDevice.captureCapabilies[i].height = s.height;
newDevice.captureCapabilies[i].width = s.width; newDevice.captureCapabilies[i].width = s.width;
newDevice.captureCapabilies[i].maxFPS = maxFPS; newDevice.captureCapabilies[i].maxFPS = maxFPS;
Log.v(TAG, Log.v(TAG, "VideoCaptureDeviceInfo " + ", maxFPS: " + maxFPS +
"VideoCaptureDeviceInfo " + "maxFPS:" + maxFPS + ", width: " + s.width + ", height: " + s.height);
" width:" + s.width + " height:" + s.height);
} }
} }
@ -187,9 +179,9 @@ public class VideoCaptureDeviceInfoAndroid {
// even though it reports that it can // even though it reports that it can
if(android.os.Build.MANUFACTURER.equals("motorola") && if(android.os.Build.MANUFACTURER.equals("motorola") &&
android.os.Build.DEVICE.equals("umts_sholes")) { android.os.Build.DEVICE.equals("umts_sholes")) {
for(AndroidVideoCaptureDevice device:deviceList) { for (AndroidVideoCaptureDevice device : deviceList) {
for(CaptureCapabilityAndroid capability:device.captureCapabilies) { for (CaptureCapabilityAndroid capability : device.captureCapabilies) {
capability.maxFPS=15; capability.maxFPS = 15;
} }
} }
} }
@ -286,10 +278,14 @@ public class VideoCaptureDeviceInfoAndroid {
Log.v(TAG, "AllocateCamera - creating VideoCaptureAndroid"); Log.v(TAG, "AllocateCamera - creating VideoCaptureAndroid");
return new VideoCaptureAndroid(id, context, camera, deviceToUse); return new VideoCaptureAndroid(id, context, camera, deviceToUse);
} catch (NoSuchMethodException e) {
}catch (Exception ex) { Log.e(TAG, "AllocateCamera Failed to open camera", e);
Log.e(TAG, "AllocateCamera Failed to open camera- ex " + } catch (ClassNotFoundException e) {
ex.getLocalizedMessage()); Log.e(TAG, "AllocateCamera Failed to open camera", e);
} catch (InvocationTargetException e) {
Log.e(TAG, "AllocateCamera Failed to open camera", e);
} catch (IllegalAccessException e) {
Log.e(TAG, "AllocateCamera Failed to open camera", e);
} }
return null; return null;
} }
@ -307,7 +303,6 @@ public class VideoCaptureDeviceInfoAndroid {
String cameraId = parameters.get("camera-id"); String cameraId = parameters.get("camera-id");
if(cameraId != null && cameraId.equals("1")) { if(cameraId != null && cameraId.equals("1")) {
// This might be a Samsung Galaxy S with a front facing camera. // This might be a Samsung Galaxy S with a front facing camera.
try {
parameters.set("camera-id", 2); parameters.set("camera-id", 2);
camera.setParameters(parameters); camera.setParameters(parameters);
parameters = camera.getParameters(); parameters = camera.getParameters();
@ -316,12 +311,6 @@ public class VideoCaptureDeviceInfoAndroid {
camera.release(); camera.release();
return parameters; return parameters;
} }
catch (Exception ex) {
// Nope - it did not work.
Log.e(TAG, "Init Failed to open front camera camera - ex " +
ex.getLocalizedMessage());
}
}
camera.release(); camera.release();
// Check for Evo front facing camera // Check for Evo front facing camera

View File

@ -112,9 +112,20 @@ WebRtc_Word32 VideoCaptureAndroid::SetAndroidObjects(void* javaVM,
return -1; return -1;
} }
jclass capabilityClassLocal = env->FindClass(
"org/webrtc/videoengine/CaptureCapabilityAndroid");
if (!capabilityClassLocal) {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, -1,
"%s: could not find java class", __FUNCTION__);
return -1;
}
jclass capabilityClassGlobal = reinterpret_cast<jclass>(env->NewGlobalRef(
capabilityClassLocal));
DeviceInfoAndroid::SetAndroidCaptureClasses(capabilityClassGlobal);
// get java capture class type (note path to class packet) // get java capture class type (note path to class packet)
jclass javaCmDevInfoClassLocal = env->FindClass( jclass javaCmDevInfoClassLocal = env->FindClass(
AndroidJavaCaptureDeviceInfoClass); "org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid");
if (!javaCmDevInfoClassLocal) { if (!javaCmDevInfoClassLocal) {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, -1, WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, -1,
"%s: could not find java class", __FUNCTION__); "%s: could not find java class", __FUNCTION__);

View File

@ -20,7 +20,7 @@ public class ViERenderer {
private static SurfaceHolder g_localRenderer; private static SurfaceHolder g_localRenderer;
public static SurfaceView CreateRenderer(Context context) { public static SurfaceView CreateRenderer(Context context) {
return CreateRenderer(context,false); return CreateRenderer(context, false);
} }
public static SurfaceView CreateRenderer(Context context, public static SurfaceView CreateRenderer(Context context,

View File

@ -15,7 +15,7 @@
#include "thread_wrapper.h" #include "thread_wrapper.h"
#include "tick_util.h" #include "tick_util.h"
#ifdef ANDROID_LOG #ifdef ANDROID
#include <stdio.h> #include <stdio.h>
#include <android/log.h> #include <android/log.h>

View File

@ -51,7 +51,6 @@ int VoEVideoSyncImpl::GetPlayoutTimestamp(int channel, unsigned int& timestamp)
{ {
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"GetPlayoutTimestamp(channel=%d, timestamp=?)", channel); "GetPlayoutTimestamp(channel=%d, timestamp=?)", channel);
ANDROID_NOT_SUPPORTED(_shared->statistics());
IPHONE_NOT_SUPPORTED(_shared->statistics()); IPHONE_NOT_SUPPORTED(_shared->statistics());
if (!_shared->statistics().Initialized()) if (!_shared->statistics().Initialized())
@ -76,7 +75,6 @@ int VoEVideoSyncImpl::SetInitTimestamp(int channel,
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"SetInitTimestamp(channel=%d, timestamp=%lu)", "SetInitTimestamp(channel=%d, timestamp=%lu)",
channel, timestamp); channel, timestamp);
ANDROID_NOT_SUPPORTED(_shared->statistics());
IPHONE_NOT_SUPPORTED(_shared->statistics()); IPHONE_NOT_SUPPORTED(_shared->statistics());
if (!_shared->statistics().Initialized()) if (!_shared->statistics().Initialized())
@ -101,7 +99,6 @@ int VoEVideoSyncImpl::SetInitSequenceNumber(int channel,
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"SetInitSequenceNumber(channel=%d, sequenceNumber=%hd)", "SetInitSequenceNumber(channel=%d, sequenceNumber=%hd)",
channel, sequenceNumber); channel, sequenceNumber);
ANDROID_NOT_SUPPORTED(_shared->statistics());
IPHONE_NOT_SUPPORTED(_shared->statistics()); IPHONE_NOT_SUPPORTED(_shared->statistics());
if (!_shared->statistics().Initialized()) if (!_shared->statistics().Initialized())
@ -125,7 +122,6 @@ int VoEVideoSyncImpl::SetMinimumPlayoutDelay(int channel,int delayMs)
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"SetMinimumPlayoutDelay(channel=%d, delayMs=%d)", "SetMinimumPlayoutDelay(channel=%d, delayMs=%d)",
channel, delayMs); channel, delayMs);
ANDROID_NOT_SUPPORTED(_shared->statistics());
IPHONE_NOT_SUPPORTED(_shared->statistics()); IPHONE_NOT_SUPPORTED(_shared->statistics());
if (!_shared->statistics().Initialized()) if (!_shared->statistics().Initialized())
@ -172,7 +168,6 @@ int VoEVideoSyncImpl::GetDelayEstimate(int channel, int& delayMs)
{ {
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"GetDelayEstimate(channel=%d, delayMs=?)", channel); "GetDelayEstimate(channel=%d, delayMs=?)", channel);
ANDROID_NOT_SUPPORTED(_shared->statistics());
IPHONE_NOT_SUPPORTED(_shared->statistics()); IPHONE_NOT_SUPPORTED(_shared->statistics());
if (!_shared->statistics().Initialized()) if (!_shared->statistics().Initialized())
@ -195,7 +190,6 @@ int VoEVideoSyncImpl::GetPlayoutBufferSize(int& bufferMs)
{ {
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"GetPlayoutBufferSize(bufferMs=?)"); "GetPlayoutBufferSize(bufferMs=?)");
ANDROID_NOT_SUPPORTED(_shared->statistics());
IPHONE_NOT_SUPPORTED(_shared->statistics()); IPHONE_NOT_SUPPORTED(_shared->statistics());
if (!_shared->statistics().Initialized()) if (!_shared->statistics().Initialized())