android mtk camera startpreview,stopCameraPreview再startCameraPreview后有概率黑屏-程序员宅基地

技术标签: android mtk camera startpreview  

机型为魅蓝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

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_39608132/article/details/117660748

智能推荐

调试反汇编窗口_bochs反汇编窗口-程序员宅基地

文章浏览阅读345次。_bochs反汇编窗口

ExecutorService常用方法和newFixedThreadPool创建固定大小的线程池_executors.newfixedthreadpool 和 threadpololexector-程序员宅基地

文章浏览阅读450次。1、ExecutorService:是一个接口,继承了Executor:public interface ExecutorService extends Executor {}2、Executor:而Executor亦是一个接口,该接口只包含了一个方法:void execute(Runnable command);3、Executors:该_executors.newfixedthreadpool 和 threadpololexector

梯度下降原理_最速梯度下降 原理-程序员宅基地

文章浏览阅读816次。梯度下降法是一个最优化算法,通常也称为最速下降法。最速下降法是求解无约束优化问题最简单和最古老的方法之一,虽然现在已经不具有实用性,但是许多有效算法都是以它为基础进行改进和修正而得到的。最速下降法是用负梯度方向为搜索方向的,最速下降法越接近目标值,步长越小,前进越慢。顾名思义,梯度下降法的计算过程就是沿梯度下降的方向求解极小值(也可以沿梯度上升方向求解极大值)。 其迭代公式为 ,其中 代表梯度_最速梯度下降 原理

php里echo 0,php中的echo()函数如何使用-程序员宅基地

文章浏览阅读492次。echo()函数用于输出一个或多个字符串,该函数没有返回值。需要注意的是,echo()函数实际上不是一个函数,所以不用对它使用括号。具体使用方法如:【$str = "Hello world!"; echo $str;】。函数介绍:echo() 函数输出一个或多个字符串。它没有返回值。(推荐教程:php图文教程)注意:echo() 函数实际不是一个函数,所以您不必对它使用括号。如果您想要传多于一个参..._echo0是什么意思

【故障诊断】基于金豺算法优化双向长短期记忆神经网络GJO-BILSTM-Adaboost的Adaboost实现故障诊断附matlab代码-程序员宅基地

文章浏览阅读45次。故障诊断一直是工程领域中一个重要的研究方向。随着技术的不断发展,人们对于如何准确、快速地诊断故障提出了更高的要求。近年来,机器学习和深度学习技术的出现为故障诊断带来了新的机遇和挑战。在这篇博文中,我们将介绍一种基于金豺算法优化双向长短期记忆神经网络的Adaboost实现的故障诊断算法流程。该算法被称为GJO-biLSTM-Adaboost,它结合了金豺算法、双向长短期记忆神经网络和Adaboost算法的优势,能够在故障诊断中取得较好的效果。首先,让我们来介绍一下金豺算法。

NLP基础——语言模型(LM)_..n..刂*lm-程序员宅基地

文章浏览阅读3.3k次。文章目录NLP基础:语言模型(LM)1. 模型评估(概率估计)2. 平滑方法3. LM在拼写纠正(Spell Correction)中的应用NLP基础:语言模型(LM)语言模型(LM,Language Model)就是用来判断某个句子是否语义通顺。首先对句子进行分词,句子的概率可以表示为各个词的联合概率:P(s)=P(w1,w2,...,wn)P(s)=P(w_1,w_2,...,w_n)P(s)=P(w1​,w2​,...,wn​)。根据Chain rule: P(A,B,C,D)=P(A)P(B|_..n..刂*lm

随便推点

c++多线程:原子操作_volatile c++ 原子操作 多线程-程序员宅基地

文章浏览阅读1.7k次。1、原子变量声明头文件#include <atomic> // std::atomic, std::atomic_flag, ATOMIC_FLAG_INIT原子操作:对一个变量的访问操作,原来会分为好几个指令,由于多线程程序中,可能会存在数据竞争,可能导致对变量的操作不是原子性,那么从编译实现角度,将原本几个指令的操作变成一个指令来执行,可以在无锁情况下实现原子操作,从而避免数据竞争。std::atomic::atomicdefault (1) atomic() _volatile c++ 原子操作 多线程

window下安装weditor安装报错UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xad 解决方法_error in setup command: error parsing c:\users\adm-程序员宅基地

文章浏览阅读5.3k次,点赞34次,收藏18次。window下安装weditor安装报错UnicodeDecodeError: 'gbk' codec can't decode byte 0xad 解决方法_error in setup command: error parsing c:\users\administrator\appdata\local\t

怎么做好一个深度学习调包侠_深度学习怎么调包-程序员宅基地

文章浏览阅读866次。1、到底是选择Adam还是SGD优化器 选Adam的好处Adam傻瓜式,可以无视学习率-- 收敛速度快选SGD的好处SGD适合要求高的模型-- 精度高-- 一般从一个较大的学习率进行训练最优选择:Adam+SGD-- 可以先用Adam粗调,然后使用SGD精调2、Momentum优化器也有很大作用 面对小而连续的梯度但是含有很多噪声的时候,最先使用这个-..._深度学习怎么调包

在Android studio中生成release版本,并导出为apk,安装到手机上_android studio release-程序员宅基地

文章浏览阅读1.7w次,点赞15次,收藏61次。Android studio 中如何生成release发行版本,并导出为apk格式    1. 打开电脑,在左下角菜单里找到命令提示符,并以管理员身份运行。    2.在命令行中输入以下命令:keytool -genkey -alias huaming -keypass 123456 -keyalg RSA -keysize 2048 -validity 36500 -keystore E:\key\key.keystore -storepass 123456 _android studio release

论文笔记 | code pretraining(代码预训练系列)_intellicode compose: code generation using transfo-程序员宅基地

文章浏览阅读4.2k次,点赞5次,收藏38次。文章目录Pre-trained contextual embedding of source codeCodeBERT: A Pre-trained model for programming and natural languagesGraphCodeBert: Pre-training code representations with data flowContrastive code representation learningInferCode: Self-Supervised Learning_intellicode compose: code generation using transformer

CodeForces 50 A.Domino piling(水~)_codeforces domino filing-程序员宅基地

文章浏览阅读716次。Description给出一个m∗nm*n的区域,问最多可以放多少个2∗12*1的砖Input两个整数m,n(1≤m,n≤16)m,n(1\le m,n\le 16)Output输出最多可以放多少块砖Sample Input2 4Sample Output4Solutionn,mn,m有一个为偶数,显然可以铺满,ans=nm2ans=\frac{nm}{2}n,mn,m均为奇数,显然前n−1n-1列_codeforces domino filing