SurfaceTexture in GStreamer (Android) ?

Damien Dejean damien.dejean at pulse-origin.com
Mon Sep 12 14:29:56 UTC 2016


Hello,

This is probably a layout issue. Android does not know the size of the
surface texture during the mesure pass (onMeasure() method of
SurfaceTexture class) because the underlying surface property is not
published.

You have two solutions, either you extends SurfaceTexture to return a
size in the onMeasure() method, or you layout this surface in a layout
like AnimatorView that will change its properties.

Note that all those information are only deduced from my own experiment.
I'm not very clear about what's going on in such situation.

BR,

Damien.


Le 09/12/2016 à 04:13 PM, pedjaman a écrit :
> Hello everyone.
>
> I was trying to use
> https://github.com/sdroege/gst-player
> <https://github.com/sdroege/gst-player>  
> as a base for my project.
>
> If i try to set openGL surface, in following way:
>
>                 mSurface = new SurfaceTexture(mTextureID); 
>                 mSurface.setOnFrameAvailableListener(this);
>
>                 Surface surface = new Surface(mSurface);
>                 mGstMediaPlayer.setSurface(surface); // This is Player code
> from example above
>
> I hear sound, everything seems ok, but texture is black.
> Also, frame available notification is received properly.
> Method above works by simply replacing gstreamer with Android MediaPlayer or
> VLC or whatever else.
>
> Any advice?
>
> Thanks people :)
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/SurfaceTexture-in-GStreamer-Android-tp4667379p4679535.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list