android - MediaCodec signalEndOfInputStream() error -
i'm trying use live camera recording ( opengl ) sample code grafika. every things works fine on moto g try in other device (galaxy tab 2 cyanogendmod 11) it's seems method : signalendofinputstream() not working , encoder never stop. it's there way send signal mediacodec in other way ?
sorry bad english.
you can work around it.
if @ decodeeditencodetest, can see mysterious boolean called work_around_bugs
. it's used this:
if (work_around_bugs) { // might drop frame, @ least won't crash mediaserver. try { thread.sleep(500); } catch (interruptedexception ie) {} outputdone = true; } else { encoder.signalendofinputstream(); }
this used during development of cts tests, when vendor-specific code wasn't yet working end-of-stream signal. added exercise other features while vendors worked on patches. flag disabled before tests shipped in 4.3. you're running unpatched codecs on cyanogen.
the workaround never send end-of-stream signal. instead, stop codec. there chance in-flight buffer lost , drop frame, live recording may not matter. (it's more of issue video editing.)
Comments
Post a Comment