Textureview/Surface view for Camera preview - Android -


i working on developing android applications uses camera. display camera preview, observed lot of examples using surface view or texture view. why these preferred on using imageview display camera preview? have used imageview display preview , works fine.

thanks.

please not use imageview this. extremely inefficient, , i'd surprised if able produce high-resolution preview (1080p) approach.

surfaceview , textureview both directly push zero-copy buffers camera drivers hardware composer or gpu, respectively. there no buffer copies or transformations, except whatever final conversions need done @ destination. reduces memory bandwidth , cpu overhead substantially.

creating bitmaps slow, cpu-hungry, , makes several copies of each frame, wasting memory well.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -