android - MediaCodec Buffer Unavailable -


i attempting record mp4 through use of opengl surfaceview , using mediacodec encoder encode frames of video in 1 thread , in thread using audiorecord record audio samples , using seperate encoder encode audio data , mediamuxer actualy muxing.

on devices (mostly higher end devices) method using works fine , output video expected no error or that. however, on other devices isnt case.

what happens on devices, (ie moto droid turbo 2) audio encoder (which running in own thread) process few audio samples return mediacodec.info_buffer_unavailable when attempting dequeue input buffer encoder, start happening after 5 samples encoded , video encoder runs fine. on device (ie samsung galaxy alpha) opposite happens video encoder begins return mediacodec.info_buffer_unavailable status when dequeue input buffer video encoder , audio encoder runs fine.

i guess question is, , have looked on clear explanation of this, cause of buffer being unavailable? other not releasing buffer before next use, can cause this? 98% releasing buffers when need released because exact same code work on devices have tested on. (nexus 5x, nexus 6p, samsung s6, samsung edge/edge+, moto x (2014), moto x (2015), htc 1 m9, htc 1 m8, etc).

does have ideas? didnt think posting code examples necessary because know works on devices have tested question can cause mediacodec.info_buffer_unavailable returned aside not release buffer, if anything?

edit: further investigating issue , become little strange even. starting think had processing power of device, explain why higher end devices worked fine lower end did not. however, samsung note edge (which works fine) has same cpu, gpu, chipset , amount of ram moto droid turbo, encounters error dequeing audio buffers audio encoder.

edit 2: yup, entirely doing caused this. issue happening because missed release call buffer in instance muxer hadn't yet started yet. instead of releasing buffer in instance, ignore , moved caused buffer hung up. problem solved


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -