Android Surface only shows black
jobu
jobu at adrodev.de
Thu Feb 27 09:32:11 UTC 2020
I just got it to work!
I was actually setting the buffer size of the surfacetexture and thought
that this would be enough. Now I found out that I had to set the size of the
texture in the native code for VrCinema too - and now it works :)
This solution is not related to GStreamer, but I wanted to add it here -
maybe someone who encounters the same problem finds this and can use it. The
important part is the use of nativeSetVideoSize. Also I need to call this
function after requesting WRITE_EXTERNAL_STORAGE permission.
public void prepareSurface() {
synchronized (this) {
// allocate a new external texture, and create a
// surfaceTexture with it.
movieTexture = nativePrepareNewVideo(appPtr);
if (movieTexture == null) {
Log.w(TAG, "prepareSurface - could not create movieTexture ");
return;
}
movieTexture.setDefaultBufferSize(800, 600);
movieSurface = new Surface(movieTexture);
nativeSetVideoSize(appPtr, 800, 600);
nativeSurfaceInit(movieSurface);
}
}
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list