机型为魅蓝note,系统为5.1.11.0A。问题为TextureView下stopCameraPreview后再startCameraPreview有概率黑屏。nexus 5上也有同样问题
代码:
@Override
public void onWindowFocusChanged(boolean hasWindowFocus) {
super.onWindowFocusChanged(hasWindowFocus);
if (hasWindowFocus) {
mStreamer.startCameraPreview();
mStreamer.onResume();
if (mStreamer.isRecording()) {
mStreamer.setAudioOnly(false);
}
} else {
mStreamer.onPause();
mStreamer.stopCameraPreview();
if (mStreamer.isRecording()) {
mStreamer.setAudioOnly(true);
}
}
}
日志:
11-06 04:18:07.960 283-8045/? E/ImgSensorDrv: [init]Err( 515):[init]: sensorDrvInit 0: 131074
11-06 04:18:08.019 4650-4650/? E/MzWLuncherDecoder: bind to recognition service failed
11-06 04:18:08.031 4650-8049/? E/MzUpdateComponent:2.1.0: check interval interrupt
11-06 04:18:08.268 283-8046/? E/MeizuSource_Algo_Af: [createInstance()] Err: 103:, zzx:i4SensorDev: 2
11-06 04:18:08.268 283-8046/? E/af_mgr: [init()] Err: 438:, AfAlgo pointer NULL
11-06 04:18:08.275 283-2650/? E/lsc_mgr2_thread: [tsfCfgChg()] Err: 806:, [tsfCfgChg] Error(0x80000005): MTKTSF_FEATURE_GEN_CAP_TBL
11-06 04:18:09.874 283-869/? E/AudioALSAPlaybackHandlerBase: openPcmDriver(), pcm_start(0xf4078240) fail due to cannot start channel: Broken pipe
11-06 04:18:09.886 283-869/? E/AudioALSAPlaybackHandlerBase: -getHardwareBufferInfo pcm_get_htimestamp fail, ret = -1, pcm_get_error = cannot start channel: Broken pipe
11-06 04:18:09.887 283-869/? E/AudioALSAPlaybackHandlerBase: -getHardwareBufferInfo pcm_get_htimestamp fail, ret = -1, pcm_get_error = cannot start channel: Broken pipe
11-06 04:18:12.495 283-1109/? E/MZCameraService: dettach MeizuCamera
11-06 04:18:13.324 7924-7924/com.ksytest E/CameraCapture: Call start on invalid state
11-06 04:18:13.324 7924-7924/com.ksytest E/CameraCapture: Call start on invalid state
11-06 04:18:13.328 283-2651/? E/Cta5File: Cta5File::isCta5NormalFile false, bad magic:OggS
11-06 04:18:13.328 283-2651/? E/Cta5File: Cta5File::isCta5MultimediaFile false, bad magic:0��?������������
11-06 04:18:13.332 283-8068/? E/OMXNodeInstance: setParameter(144:google.vorbis.decoder, ??(0x7f000022)) ERROR: UnsupportedIndex(0x8000101a)
11-06 04:18:13.333 283-2651/? E/Cta5File: Cta5File::isCta5NormalFile false, bad magic:OggS
11-06 04:18:13.333 283-2651/? E/Cta5File: Cta5File::isCta5MultimediaFile false, bad magic:�=�
0�H
11-06 04:18:13.337 283-8072/? E/OMXNodeInstance: setParameter(145:google.vorbis.decoder, ??(0x7f000022)) ERROR: UnsupportedIndex(0x8000101a)
11-06 04:18:13.340 283-8076/? E/ImgSensorDrv: [init]Err( 515):[init]: sensorDrvInit 0: 131074
11-06 04:18:13.531 283-8079/? E/MeizuSource_Algo_Af: [createInstance()] Err: 103:, zzx:i4SensorDev: 2
11-06 04:18:13.531 283-8079/? E/af_mgr: [init()] Err: 438:, AfAlgo pointer NULL
11-06 04:18:13.537 283-1109/? E/lsc_mgr2_thread: [tsfCfgChg()] Err: 806:, [tsfCfgChg] Error(0x80000005): MTKTSF_FEATURE_GEN_CAP_TBL
11-06 04:18:17.355 283-19065/? E/MZCameraService: dettach MeizuCamera
11-06 04:18:17.936 7924-7924/com.ksytest E/CameraCapture: Call start on invalid state
11-06 04:18:17.936 7924-7924/com.ksytest E/CameraCapture: Call start on invalid state
11-06 04:18:17.940 283-2650/? E/Cta5File: Cta5File::isCta5NormalFile false, bad magic:OggS
11-06 04:18:17.940 283-2650/? E/Cta5File: Cta5File::isCta5MultimediaFile false, bad magic:0��?����������:�
11-06 04:18:17.943 283-8096/? E/OMXNodeInstance: setParameter(146:google.vorbis.decoder, ??(0x7f000022)) ERROR: UnsupportedIndex(0x8000101a)
11-06 04:18:17.944 283-2650/? E/Cta5File: Cta5File::isCta5NormalFile false, bad magic:OggS
11-06 04:18:17.944 283-2650/? E/Cta5File: Cta5File::isCta5MultimediaFile false, bad magic:�=�
0�H
11-06 04:18:17.948 283-8100/? E/OMXNodeInstance: setParameter(147:google.vorbis.decoder, ??(0x7f000022)) ERROR: UnsupportedIndex(0x8000101a)
11-06 04:18:17.952 283-8104/? E/ImgSensorDrv: [init]Err( 515):[init]: sensorDrvInit 0: 131074
11-06 04:18:18.164 283-8106/? E/MeizuSource_Algo_Af: [createInstance()] Err: 103:, zzx:i4SensorDev: 2
11-06 04:18:18.164 283-8106/? E/af_mgr: [init()] Err: 438:, AfAlgo pointer NULL
11-06 04:18:18.170 283-2650/? E/lsc_mgr2_thread: [tsfCfgChg()] Err: 806:, [tsfCfgChg] Error(0x80000005): MTKTSF_FEATURE_GEN_CAP_TBL
11-06 04:18:19.695 283-2650/? E/MZCameraService: dettach MeizuCamera
11-06 04:18:21.538 7924-7924/com.ksytest E/CameraCapture: Call start on invalid state
11-06 04:18:21.538 7924-7924/com.ksytest E/CameraCapture: Call start on invalid state
11-06 04:18:21.542 283-283/? E/Cta5File: Cta5File::isCta5NormalFile false, bad magic:OggS
11-06 04:18:21.542 283-283/? E/Cta5File: Cta5File::isCta5MultimediaFile false, bad magic:0��?��������lx��
11-06 04:18:21.547 283-8123/? E/OMXNodeInstance: setParameter(148:google.vorbis.decoder, ??(0x7f000022)) ERROR: UnsupportedIndex(0x8000101a)
11-06 04:18:21.548 283-283/? E/Cta5File: Cta5File::isCta5NormalFile false, bad magic:OggS
11-06 04:18:21.548 283-283/? E/Cta5File: Cta5File::isCta5MultimediaFile false, bad magic:�=�
0�H
11-06 04:18:21.551 283-8127/? E/OMXNodeInstance: setParameter(149:google.vorbis.decoder, ??(0x7f000022)) ERROR: UnsupportedIndex(0x8000101a)
11-06 04:18:21.555 283-8131/? E/ImgSensorDrv: [init]Err( 515):[init]: sensorDrvInit 0: 131074
11-06 04:18:21.762 283-8133/? E/MeizuSource_Algo_Af: [createInstance()] Err: 103:, zzx:i4SensorDev: 2
11-06 04:18:21.762 283-8133/? E/af_mgr: [init()] Err: 438:, AfAlgo pointer NULL
11-06 04:18:21.768 283-2651/? E/lsc_mgr2_thread: [tsfCfgChg()] Err: 806:, [tsfCfgChg] Error(0x80000005): MTKTSF_FEATURE_GEN_CAP_TBL
11-06 04:18:26.332 283-19065/? E/MZCameraService: dettach MeizuCamera
11-06 04:18:27.978 886-2633/? E/WifiStateMachine: WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=2.30 rxSuccessRate=2.42 targetRoamBSSID=any RSSI=-59
11-06 04:18:28.214 886-3312/? E/Sensors: loadAccelCalib read calibbias 0 0 0
11-06 04:18:28.327 7924-7924/com.ksytest E/CameraCapture: Call start on invalid state
11-06 04:18:28.327 7924-7924/com.ksytest E/CameraCapture: Call start on invalid state
11-06 04:18:28.334 283-1109/? E/Cta5File: Cta5File::isCta5NormalFile false, bad magic:OggS
11-06 04:18:28.334 283-1109/? E/Cta5File: Cta5File::isCta5MultimediaFile false, bad magic:0��?������������
11-06 04:18:28.338 4650-4650/? E/MzWLuncherDecoder: bind to recognition service failed
11-06 04:18:28.340 4650-8164/? E/MzUpdateComponent:2.1.0: check interval interrupt
11-06 04:18:28.341 283-8163/? E/OMXNodeInstance: setParameter(14a:google.vorbis.decoder, ??(0x7f000022)) ERROR: UnsupportedIndex(0x8000101a)
11-06 04:18:28.342 283-1109/? E/Cta5File: Cta5File::isCta5NormalFile false, bad magic:OggS
11-06 04:18:28.342 283-1109/? E/Cta5File: Cta5File::isCta5MultimediaFile false, bad magic:�=�
0�H
11-06 04:18:28.347 283-8168/? E/OMXNodeInstance: setParameter(14b:google.vorbis.decoder, ??(0x7f000022)) ERROR: UnsupportedIndex(0x8000101a)
11-06 04:18:28.357 283-8172/? E/ImgSensorDrv: [init]Err( 515):[init]: sensorDrvInit 0: 131074
11-06 04:18:28.560 283-8175/? E/MeizuSource_Algo_Af: [createInstance()] Err: 103:, zzx:i4SensorDev: 2
11-06 04:18:28.560 283-8175/? E/af_mgr: [init()] Err: 438:, AfAlgo pointer NULL
11-06 04:18:28.567 283-2650/? E/lsc_mgr2_thread: [tsfCfgChg()] Err: 806:, [tsfCfgChg] Error(0x80000005): MTKTSF_FEATURE_GEN_CAP_TBL
11-06 04:18:28.785 7924-8159/com.ksytest E/MALI: gles_state_set_error_internal:56: GLES ctx: 0xd4edd008, error code:0x501