Note that there are some explanatory texts on larger screens.

plurals
  1. POGstreamer video to opengl texture
    primarykey
    data
    text
    <p>I'm trying to render AV frames grabbed and converted from a MPEG4 video using Gstreamer to an Android (2.2)-opengl texture. I've pretty much exhausted google and not found an answer. </p> <p>Basically, I am using Gstreamer uridecodebin to decode the frame, and then convert the frame to RGB, and then <code>glTexSubImage2D()</code> to create an openGL texture from it, but can't seem to get anything to work.The texture is getting colored when I get the decoded data (RGB) from Gstreamer.</p> <p>I am getting the video size as <code>320 * 256</code> and my Texture size is <code>512 * 256</code> &amp; I am using <code>glDrawTexiOES(0,0,videowidth,videoheight)</code>, I am not getting any errors related to opengl, but the texture is blank( different color frames), though the Audio works fine.</p> <p>Here is my code:Native OnDraw:</p> <pre><code>if (theGStPixelBuffer != 0) { glBindTexture (GL_TEXTURE_2D, s_texture); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glPixelStorei( GL_UNPACK_ALIGNMENT, 2); glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, theTexWidth, theTexHeight, GL_RGB, GL_UNSIGNED_BYTE, GST_BUFFER_DATA(theGStPixelBuffer)); check_gl_error("glTexSubImage2D"); theGStPixelBuffer = 0; } glDrawTexiOES(0, 0, 0, theTexWidth, theTexHeight); check_gl_error("glDrawTexiOES") </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload