opengl es - How to understand the underneath of setDisplay/setSurface/setPrewviewDisplay/setPreviewTexture for Android -
since android api level 1, can attach mediaplayer or camera surface setdisplay or setprewviewdisplay, image data can transfered gpu , processed faster.
after surfacetexture introduced, can create our own texture target gl_texture_external_oes , attach mediaplayer or camera opengl es.
these known, want talk underneath android graphics architecture.(android graphics architecture)
the data produced on cpu side, must transferred gpu in fast way.
why every android device transfer data fast , how make underneath?
or hardware issue has nothing android?
the data not produced on cpu side. camera , hardware video codecs store data in buffers allocated kernel gralloc mechanism (referenced native code through non-public graphicbuffer). surfaces communicate through bufferqueue objects, pass frames around handle, without copying data itself.
it's oem ensure camera, video codecs, , gpu can use common formats. yuv output video codec must gles implementation can handle external texture. why egl_recordable_android
needed when sending gles rendering mediacodec... need let egl implementation know frame it's rendering must recognizable video codec.
Comments
Post a Comment