Comments (7)
你好,这个BUG不是你设备的原因,是这个项目的存在BUG
This happens if stop() is called immediately after start();
这是MediaRecorder接口stop()方法的说明,如果在star()之后立刻stop()就会抛出异常,你现在看到的这份代码我的处理是如果录制视频过短,会延迟1000毫秒再去stop(),但是我没有处理频繁按住松开这部分逻辑,在我本地我已经处理了,不过逻辑有点不太清晰,等完善之后我更新上去。
from cameraview.
我找到源码是试着将 CameraInterface类中的 stopRecord方法 中 try{}catch{}里边的 IllegalStateException 改成了 Exception ,
if (mediaRecorder != null && isRecorder) {
try {
mediaRecorder.stop();
isRecorder = false;
} catch (Exception e) {
e.printStackTrace();
}
点了点暂时好像没出bug
from cameraview.
嗯,可以尝试一下,然后你最好在catch到异常后将资源全部释放掉,或者放在finily里面也可以
from cameraview.
等于就是将 stopRecord方法剩下的代码都放到了finally 里边吧
from cameraview.
嗯,就是一些状态的更改,和资源的释放
from cameraview.
谢谢大神指点,我放进去了,试着频繁操作并没有崩溃
from cameraview.
👍 我找个时间用你的方法处理一下
from cameraview.
Related Issues (20)
- 引入源码,修改vedio名字,录制视频成功后导致崩溃 HOT 3
- 能支持下,暂停/继续录制功能吗
- app:iconMargin 未生效
- 基于CameraX重写,解决已知问题
- 怎么限制视频的时长、大小?
- VIVO X21 UDA MediaRecorder: start failed: -38 HOT 6
- 请问要怎么对接美颜sdk呢 HOT 1
- 大神,请问前置摄像头录制视频出来的结果镜像问题该怎么解决? HOT 2
- 横排好像有问题
- 这个项目已经三年没有维护了,可能无法正常启动了
- 已使用CameraX重写,适配Android Q HOT 3
- startPreview failed 这个怎么解决,作者请看看,谢谢!
- 点击拍照后,图片不能放大缩小 HOT 1
- 已经重写适配android16 至 android30
- hjh
- 大佬,能否提供给出主动拍照的接口
- 能否提供切换前后置摄像头的接口?
- maven { url 'https://dl.bintray.com/cjt/maven' }过时了
- 这个库已经很久没人维护了,如果有需要可以看此库
- 111
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cameraview.