Advertisement Jump to content
Sign in to follow this  

OpenGL ES 3.0 Playing videos on android

This topic is 574 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just found a code which uses libavcodec to decode videos and display them on screen

 Canvas canvas = surfaceHolder.lockCanvas();
 canvas.drawBitmap(mBitmap, mDrawLeft, mDrawTop,

anyway it looks like a ton of useless garbage, it first decodes then draws a bitmap, i would like to somehow transfer video data to gpu directly so i can just draw a video frame in a simple poly (made of 4 verts), however it may be undoable, anyone has any more information about it?

Share this post

Link to post
Share on other sites


From what I'm understanding, you want direct access to the pixels of a texture, then modify the pixels of that texture (by consequence removing the middle process of decoding to a pixel array in the client's memory).

You can do that with glMapBuffer/glUnmapBuffer :)

When you use `glMapBuffer()`, you will get a pointer to that (pixel) buffer on client-side. After modifying the buffer, you can use `glUnmapBuffer()` to let the graphic card know that the buffer is ready. I think this is the most "permissive" method to do that in OpenGL.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!