opengl-es-2.0openmax

Which one is better, OpenGL ES 2.0 or OpenMAX?


I am making app that play H264.

I use ffMpeg decode, Converting YUV->RGB with fragmentShader, and render it.

However frameRate is not enough (about 15 ~ 20 fps).

so, I asked about it, and got answer that change way to render.

Present way is using 'glTexSubImage2D' with FBO, RBO, RTT.

Recommanded way is using eglImage.

I scratched lots of information, and I found OpenMax.

Most of hardware supports converting yuv420p. so I shouldn't use ffMpeg obstinately.

If using eglImage, How can I use 'GraphicBuffer'???????

I tried it before, I got only message 'No file or directory'
which line is '#include ui/GraphicBuffer.h' (OfCourse Added load libary in Android.mk)

this is private api in libui.so, android/frameworks/native/.


Solution

  • You can either copy the required include folders from the Android platform tree, or add the full path to /frameworks/native/ui to the LOCAL_C_INCLUDES in Android.mk:

    LOCAL_LDLIBS    := -llog -landroid -lGLESv2 -lEGL -lm -ljnigraphics -lui
    LOCAL_C_INCLUDES := C:\Android\android-ndk-r8b\platforms\android-14\include
    

    And your code should include it:

    #include <ui/GraphicBuffer.h>
    using namespace android;