gpt4 book ai didi

android - OMX.qcom编码器随机崩溃

转载 作者:太空宇宙 更新时间:2023-11-03 10:37:38 27 4
gpt4 key购买 nike

该应用基于 Grafika 的相机捕捉 Activity (https://github.com/google/grafika/tree/master/src/com/android/grafika)。用户点击一个按钮来录制视频。 Nexus 5x 发生随机崩溃。下面发布了 2 个日志,说明它何时工作,何时不工作。请告诉我这次崩溃的可能原因是什么,以及您是否需要我发布代码的任何部分。

工作:

11-21 15:55:22.301 26556-27085/com.testvideo I/OMXClient: MuxOMX ctor
11-21 15:55:22.505 26556-27085/com.testvideo E/ACodec: [OMX.qcom.video.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -1010
11-21 15:55:22.505 26556-27085/com.testvideo W/ACodec: do not know color format 0x7fa30c04 = 2141391876
11-21 15:55:22.506 26556-27085/com.testvideo W/ACodec: do not know color format 0x7f000789 = 2130708361
11-21 15:55:22.518 26556-27085/com.testvideo I/ACodec: setupAVCEncoderParameters with [profile: Baseline] [level: Level31]
11-21 15:55:22.520 26556-27085/com.testvideo I/ACodec: [OMX.qcom.video.encoder.avc] cannot encode color aspects. Ignoring.
11-21 15:55:22.520 26556-27085/com.testvideo I/ACodec: [OMX.qcom.video.encoder.avc] cannot encode HDR static metadata. Ignoring.
11-21 15:55:22.520 26556-27085/com.testvideo I/ACodec: setupVideoEncoder succeeded
11-21 15:55:22.523 26556-27085/com.testvideo W/ACodec: do not know color format 0x7f000789 = 2130708361
11-21 15:55:22.586 26556-27082/com.testvideo D/Grafika: EGLContext created, client version 3
11-21 15:55:22.632 26556-27085/com.testvideo D/ACodec: dataspace changed to 0x10c10000 (R:2(Limited), P:1(BT709_5), M:1(BT709_5), T:3(SMPTE170M)) (R:2(Limited), S:1(BT709), T:3(SMPTE_170M))
11-21 15:55:22.698 26556-27082/com.testvideo I/MPEG4Writer: limits: 4294967295/0 bytes/us, bit rate: -1 bps and the estimated moov size 3193 bytes
11-21 15:55:22.721 26556-27098/com.testvideo I/MPEG4Writer: setStartTimestampUs: 0
11-21 15:55:22.721 26556-27098/com.testvideo I/MPEG4Writer: Earliest track starting time: 0
11-21 15:55:31.394 26556-26667/com.testvideo W/OpenGLRenderer: Incorrectly called buildLayer on View: LinearLayout, destroying layer...

当崩溃发生时:

11-21 15:28:09.401 526-3443/? I/MediaPlayerService: MediaPlayerService::getOMX
11-21 15:28:09.405 26648-9812/com.testvideo I/OMXClient: MuxOMX ctor
11-21 15:28:09.408 519-15317/? I/OMXMaster: makeComponentInstance(OMX.qcom.video.encoder.avc) in mediacodec process
11-21 15:28:09.432 26648-9374/com.testvideo W/TestVideo.CSR: Waiting for movie encoder to finish before drawing frame
11-21 15:28:09.583 519-15317/? E/OMX-VENC: Setting session priority failed
11-21 15:28:09.586 537-9463/? E/mm-camera-sensor: port_sensor_handle_aec_update:443miss aec update window, skip
11-21 15:28:09.640 519-15317/? I/OMX-VENC: Component_init : OMX.qcom.video.encoder.avc : return = 0x0
11-21 15:28:09.644 519-8957/? E/OMX-VENC: set_parameter: metamode is valid for input port only
11-21 15:28:09.644 519-8957/? W/OMXNodeInstance: [207006a:qcom.encoder.avc] component does not support metadata mode; using fallback
11-21 15:28:09.644 26648-9812/com.testvideo E/ACodec: [OMX.qcom.video.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -1010
11-21 15:28:09.645 26648-9812/com.testvideo W/ACodec: do not know color format 0x7fa30c04 = 2141391876
11-21 15:28:09.645 26648-9812/com.testvideo W/ACodec: do not know color format 0x7f000789 = 2130708361
11-21 15:28:09.654 26648-9812/com.testvideo I/ACodec: setupAVCEncoderParameters with [profile: Baseline] [level: Level31]
11-21 15:28:09.655 26648-9812/com.testvideo I/ACodec: [OMX.qcom.video.encoder.avc] cannot encode color aspects. Ignoring.
11-21 15:28:09.655 26648-9812/com.testvideo I/ACodec: [OMX.qcom.video.encoder.avc] cannot encode HDR static metadata. Ignoring.
11-21 15:28:09.655 26648-9812/com.testvideo I/ACodec: setupVideoEncoder succeeded
11-21 15:28:09.658 26648-9812/com.testvideo W/ACodec: do not know color format 0x7f000789 = 2130708361
11-21 15:28:09.668 519-15317/? D/GraphicBufferSource: setting dataspace: 0x104
11-21 15:28:09.669 519-3849/? E/OMXNodeInstance: getParameter(207006a:qcom.encoder.avc, ParamConsumerUsageBits(0x6f800004)) ERROR: UnsupportedIndex(0x8000101a)
11-21 15:28:09.669 519-3674/? D/GraphicBufferSource: requesting color aspects (R:2(Limited), P:1(BT709_5), M:1(BT709_5), T:3(SMPTE170M))

最佳答案

我也遇到过类似的问题,不知道是不是一样。

运行时,应该会出来休闲日志信息。

D/ACodec: dataspace changed to 0x10c10000 (R:2(Limited), P:1(BT709_5), M:1(BT709_5), T:3(SMPTE170M)) (R:2(Limited), S:1(BT709), T:3(SMPTE_170M))

因此编码器可以在初始化阶段接收缓冲区的状态。

encoderStatus == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED

在我的程序中,OnframeAvailable函数和渲染线程已经被同时锁定,无法再在录制初始化开始时互相通知。由于OnframeAvailable函数一直卡住,无法更新buffer。结果,MeidaCodec 永远不会获得 INFO_OUTPUT_FORMAT_CHANGED 状态。

在录制开始时检查 frameAvailable() 或 frameAvailableSoon() 是否保持更新。

关于android - OMX.qcom编码器随机崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40722463/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com