我们的Camera是使用OpenGL开发的滤镜相机,有滤镜、贴纸等功能,测试报了如下问题:
问题现象:使用滤镜相机录制视频,结束后视频播放显示全黑,没有画面。
查看mtklog,发现了如下log:
05-31 14:43:35.819242 27778 28253 I MPEG4Writer: Received total/0-length (0/0) buffers and encoded 0 frames. - Video
05-31 14:43:35.819443 27778 28252 I MPEG4Writer: Received total/0-length (7/0) buffers and encoded 7 frames. - Audio
这两行log虽然没有Error标志,但是仍然值得我们注意,正常情况下的MPEG4Wrier的log输出如下:
05-31 14:47:06.620068 27778 31527 I MPEG4Writer: Received total/0-length (149/0) buffers and encoded 149 frames. - Audio
05-31 14:47:06.620111 27778 31527 I MPEG4Writer: Audio track drift time: 0 us
05-31 14:47:06.620292 27778 31526 I MPEG4Writer: Received total/0-length (62/0) buffers and encoded 62 frames. - Video
第一种异常情况下,Video的编码帧只有0 frame,说明当时没有采集到视频帧数据。
第二种正常情况下,Vid