Android MediaCodec:eglSwapBuffers:EGL错误:0x300d
所以这个问题只发生在我第二次尝试并记录时。这意味着我第一次运行MediaCodecs和Muxer时,大部分时间都可以正常工作。但是现在我希望应用更稳定。 帮忙弄清楚什么不是被拆卸下来并正确设置。 基本上在第二轮,一切都设置很好,但是当“Renderer.drawFrame”呼吁GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);我得到的错误:I/Adreno﹕ Native window GetBuffer failed 当GLES20.glFlush();被称为错误是:I/Adreno﹕ Failed to acquire a surface 总是先于当我尝试交换缓冲区时eglSwapBuffers: EGL error: 0x300d。所以有些东西没有从第一次运行中清理干净。 清理代码: public void releaseCapture(){ if (audioCodec != null){ audioCodec.stop(); audioCodec = null; } if (videoCodec != null){ videoCodec.stop(); videoCodec = null; } if (mediaMux != null){ mediaMux.release(); mediaMux = null; } if (releaseAll) { releaseAll = false; //releaseSurfaceTexture(); mEGLWrapper.destroySurface(); } } MyMediaCodec.stop() public void stop(){ if (codec == null) return; if (!isAudioCodec) { videoCodecInputSurface.release(); } codecPrimed=false; codec.stop(); codec.release(); codec = null; codecManager.stopMuxer(isAudioCodec); } MyMediaMuxer.stop() public void stopMuxer(boolean isAudio){ if (mediaMux == null) return; if (isAudio){ audioActive = false; } else { videoActive = false; } if (!(audioActive||videoActive)){ Log.d(TAG, "Stopping Muxer now. audio frame count = " + audioFrameCount + "; video frame count = " + videoFrameCount); videoHandler.postDelayed(new Runnable(){ @Override public void run() { if (mediaMux!=null) mediaMux.stop(); // set up for next run releaseCapture(); } },frame_delay); } } mEGLWrapper.destroySurface(); public void destroySurface(){ EGL14.eglDestroySurface(mEGLDisplay,mEGLSurface); checkEglError("eglDestroySurace"); } 错误日志 05-05 17:51:43.072 27756-27913/com.harmonicprocesses.penelopefree E/OMXMaster﹕ A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one. 05-05 17:51:43.085 27756-27918/com.harmonicprocesses.penelopefree I/OMXClient﹕ Using client-side OMX mux. 05-05 17:51:43.470 27756-27756/com.harmonicprocesses.penelopefree D/penny.cam.MyMediaCodec﹕ Camera profile: Frame Rate = 30; Bit Rate = 42000000 05-05 17:51:43.470 27756-27756/com.harmonicprocesses.penelopefree D/penny.cam.MyMediaCodec﹕ ; Heighth = 2160; Width = 3840 05-05 17:51:43.472 27756-27918/com.harmonicprocesses.penelopefree E/ACodec﹕ [OMX.qcom.video.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -1010 05-05 17:51:43.474 27756-27918/com.harmonicprocesses.penelopefree W/ACodec﹕ do not know color format 0x7fa30c04 = 2141391876 05-05 17:51:43.475 27756-27918/com.harmonicprocesses.penelopefree W/ACodec﹕ do not know color format 0x7f000789 = 2130708361 05-05 17:51:43.478 27756-27918/com.harmonicprocesses.penelopefree I/ACodec﹕ setupVideoEncoder succeeded 05-05 17:51:43.478 27756-27918/com.harmonicprocesses.penelopefree W/ACodec﹕ do not know color format 0x7f000789 = 2130708361 05-05 17:52:57.317 27756-27784/com.harmonicprocesses.penelopefree I/Adreno﹕ Native window GetBuffer failed 05-05 17:55:41.518 27756-27784/com.harmonicprocesses.penelopefree I/Adreno﹕ Failed to acquire a surface 05-05 17:56:24.246 27756-27791/com.harmonicprocesses.penelopefree V/com.hpp.MyMediaMux﹕ Trying to write data before muxer started, isAudioSample = true 05-05 18:04:55.189 27756-27784/com.harmonicprocesses.penelopefree D/io.hpp.MyGLSurfaceView18﹕ eglSwapBuffers: EGL error: 0x300d 05-05 18:04:55.189 27756-27784/com.harmonicprocesses.penelopefree W/System.err﹕ java.lang.Exception 05-05 18:04:55.189 27756-27784/com.harmonicprocesses.penelopefree W/System.err﹕ at com.hpp.openGL.MyEGLWrapper.checkEglError(MyEGLWrapper.java:443) 05-05 18:04:55.190 27756-27784/com.harmonicprocesses.penelopefree W/System.err﹕ at com.hpp.openGL.MyEGLWrapper.swapBuffers(MyEGLWrapper.java:314) 05-05 18:04:55.190 27756-27784/com.harmonicprocesses.penelopefree W/System.err﹕ at com.harmonicprocesses.penelopefree.camera.CaptureManager.drawFrame(CaptureManager.java:478) 05-05 18:04:55.190 27756-27784/com.harmonicprocesses.penelopefree W/System.err﹕ at com.harmonicprocesses.penelopefree.camera.CaptureManager.drawFrameOnInputSurface(CaptureManager.java:463) 05-05 18:04:55.190 27756-27784/com.harmonicprocesses.penelopefree W/System.err﹕ at com.harmonicprocesses.penelopefree.camera.CaptureManager.videoCaptureLoop(CaptureManager.java:335) 05-05 18:04:55.190 27756-27784/com.harmonicprocesses.penelopefree W/System.err﹕ at com.harmonicprocesses.penelopefree.camera.CaptureManager$5.run(CaptureManager.java:318) 05-05 18:04:55.190 27756-27784/com.harmonicprocesses.penelopefree W/System.err﹕ at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462) 05-05 18:04:55.190 27756-27784/com.harmonicprocesses.penelopefree W/System.err﹕ at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
相关推荐
【高速互连技术】基于线性均衡的PCIe链路扩展方案:重驱动器在高损耗通道中的信号完整性优化
内容概要:本文介绍了如何利用线性均衡技术扩展PCI Express(PCIe)链路的传输距离,重点探讨了重驱动器(Re-Driver)在补偿PCB和电缆信道损耗中的作用。文章回顾了Re-Driver的发展历程,分析其性能特点,解释其在不同信道环境下的应用条件,并强调线性操作对保持信号完整性及满足PCIe规范的重要性。通过眼图分析、频率响应和Tx预设波形等手段,展示了R
谐波去噪基于随机奇异值分解和软阈值的大型数据集中的强大高效谐波去噪研究(Matlab代码实现)
内容概要:本文研究了一种基于随机奇异值分解(Randomized SVD)和软阈值(Soft Thresholding)的高效谐波去噪方法,旨在解决大型数据集中谐波干扰的抑制问题。该方法通过引入随机化技术加速传统奇异值分解过程,在保障信号主要特征完整性的同时,显著提升了高维数据处理的计算效率与实时性,适用于电力系统、通信等领域的复杂信号处理场景。文中系统阐述了算法的数学理论基础、实现步骤及在Matlab环境下的具体代码实现,并通过仿真实验验证了其在不同噪声水平下对谐波成分的有效识别与去除能力,展现出优异的鲁棒性与工程实用价值。; 适合人群:具备一定信号处理理论基础和Matlab编程能力,从事电力系统分析、通信工程、自动化控制或相关领域研究的研发人员及硕士、博士研究生。; 使用场景及目标:①应用于大规模实测信号中谐波成分的快速提取与抑制;②用于提升电能质量监测、设备故障诊断、精密仪器测量等应用中的信号信噪比;③为高维时序数据的高效去噪提供可复现、易部署的算法模板与技术参考。; 阅读建议:建议读者结合提供的Matlab代码逐模块理解算法实现细节,重点掌握随机SVD与软阈值去噪的协同机制,并尝试在实际采集数据上进行参数调优与性能测试,以深入理解其适用边界与优化潜力。
binutils-2.19.92.tar.bz2
binutils-2.19.92.tar.bz2
Agent Skills 实战速查包(Claude Code 技能体系/格式全表/加载位置/触发传参/上下文成本/打包分发/安全治理/排错)
Agent Skills 是 2025 年底以来 AI 编码工具领域事实上的新开放标准(Anthropic 开源、agentskills.io 承载规范),Claude Code、claude.ai、Claude API 及各兼容 agent 都在用;但规范页、Claude Code 文档、示例仓库三处全英文且互相引用,行为细节(比如哪些 frontmatter 字段出了 Claude Code 上传就会失败)散落各段。本包按「看懂格式 → 放对位置 → 控制触发 → 算清 token → 打包分发 → 审安全 → 排错」一条线整理:技能三层渐进加载与 CLAUDE.md/命令/MCP 的边界、7 种加载位置与同名优先级、SKILL.md 开放标准 6 字段 + Claude Code 扩展 17 字段逐条约束与跨产品红线、$ARGUMENTS/$1/命名参数两种传参、描述列表 1% 压缩预算与 skillOverrides 四状态、context:fork 子代理与动态注入的完整行为矩阵(位置规则/失败语义/权限检查)、官方写法最佳实践与对照基线的 eval 闭环、Git/插件市场/企业托管三条分发路与 marketplace.json 结构、自放行与第三方技能进场审查、YAML 解析失败静默降级与非零退出中止整个技能调用等 16 类症状反查。附 SKILL.template、marketplace.template、settings.template 三份可直接改占位的骨架与一个零依赖校验脚本(合法 exit 0、错误 exit 1 逐条打印)。本包不含任何程序本体,只整理规则与配置骨架;示例一律 YOUR_*/your-* 占位。
mongodb-org-mongos_8.0.13_arm64.deb
mongodb-org-mongos_8.0.13_arm64


其他技术讨论专区
