Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Go To ( http://adf.ly/20PrE )-)-) [android-developers] Android.How play video in OpenGL.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
AdroidDev  
View profile  
 More options Feb 20 2012, 9:41 am
From: AdroidDev <seyi...@gmail.com>
Date: Mon, 20 Feb 2012 06:41:18 -0800 (PST)
Local: Mon, Feb 20 2012 9:41 am
Subject: Go To ( http://adf.ly/20PrE )-)-) [android-developers] Android.How play video in OpenGL.
Hello All

Please help. I want to play video in OpenGL.

I create SurfaceView, MediaPlayer. In MediaPlayer i call method
setSurface which give created by me in the thread of GL surface.

    int[] textures = new int[1];
             // generate one texture pointer and bind it as an
external texture.
                GLES20.glGenTextures(1, textures, 0);

GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, textures[0]);

GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
                        GL10.GL_TEXTURE_MIN_FILTER,
                                        GL10.GL_LINEAR);

GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
                        GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);
                // Clamp to edge is only option.

GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
                        GL10.GL_TEXTURE_WRAP_S,
GL10.GL_CLAMP_TO_EDGE);

GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
                        GL10.GL_TEXTURE_WRAP_T,
GL10.GL_CLAMP_TO_EDGE);
                texture_id = textures[0];
    SurfaceTexture mTexture = new SurfaceTexture(texture_id);
    Surface mSurface = new Surface(mTexture);
    MediaPlayer mp = new MediaPlayer();
    mp.setSurface(mSurface); **Is it correct?**

SurfaceTexture has method updateTexImage()? How correct use this
method?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Go to Master Mind Home Base Income Website   :-
           http://adf.ly/20PrE
            http://adf.ly/20PrE
Unsubscribe All Group Post :-   http://j.gs/624707/unsubscribe
                                              http://q.gs/624707/unsubscribe
Subscribe All Group Post :-       http://j.gs/624707/subscribe
                                                 http://q.gs/624707/subscribe
Join Now Today (Paid Income) :-
 http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/?id=624707
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Go To ( http://adf.ly/20PrE )-)-) Re: [android-developers] Android.How play video in OpenGL." by Harri Smått
Harri Smått  
View profile  
 More options Feb 21 2012, 4:49 am
From: Harri Smått <har...@gmail.com>
Date: Tue, 21 Feb 2012 11:49:18 +0200
Local: Tues, Feb 21 2012 4:49 am
Subject: Go To ( http://adf.ly/20PrE )-)-) Re: [android-developers] Android.How play video in OpenGL.

On Feb 20, 2012, at 4:41 PM, AdroidDev wrote:

> SurfaceTexture has method updateTexImage()? How correct use this
> method?

I have no experience in SurfaceTexture but I would expect workflow goes roughly as;

1. Implement SurfaceTexture.onFrameAvailable(..).
2. Once new frame is available trigger a runnable to be ran on render thread (GLSurfaceView.queueEvent(..)).
3. On render thread runnable call SurfaceTexture.updateTexImage().

This way you should be able to update texture in a way it shouldn't harm rendering - meaning texture is not altered during rendering. But as said, I haven't tried this myself yet, will try something like this as soon as I get my hands on a device running on API 14+ though.

--
H

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Go to Master Mind Home Base Income Website   :-
           http://adf.ly/20PrE
            http://adf.ly/20PrE
Unsubscribe All Group Post :-   http://j.gs/624707/unsubscribe
                                              http://q.gs/624707/unsubscribe
Subscribe All Group Post :-       http://j.gs/624707/subscribe
                                                 http://q.gs/624707/subscribe
Join Now Today (Paid Income) :-
 http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/?id=624707
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
harism  
View profile  
 More options Feb 21 2012, 5:41 am
From: harism <har...@gmail.com>
Date: Tue, 21 Feb 2012 12:41:50 +0200
Local: Tues, Feb 21 2012 5:41 am
Subject: Go To ( http://adf.ly/20PrE )-)-) Re: [android-developers] Android.How play video in OpenGL.

Actually, after thinking about this for awhile, it may be best to call
updateTexImage in rendering method instead (Renderer.onDrawFrame). There
you know for sure underlying texture is created etc.

--
H
On Feb 21, 2012 11:49 AM, "Harri Smått" <har...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Go to Master Mind Home Base Income Website   :-
           http://adf.ly/20PrE
            http://adf.ly/20PrE
Unsubscribe All Group Post :-   http://j.gs/624707/unsubscribe
                                              http://q.gs/624707/unsubscribe
Subscribe All Group Post :-       http://j.gs/624707/subscribe
                                                 http://q.gs/624707/subscribe
Join Now Today (Paid Income) :-
 http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/?id=624707
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »