Closed jltrem closed 3 years ago
Does it only fail on android? It looks like something is going wrong in the internal mediaplayer of android. Since the mesh only uses a texture that is provided by the system, I can't think of any other reason that causes the wrong size combined with distortions.
Does it have the same issue on other android devices?
Thanks, @Robbiedobbie. I've only been working with Android -- today was able to try it on a imx6 Sabre board. It runs almost perfectly on that. No distortions and width is perfectly scaled. However the vertical scaling stops at about 90%... so there is a strip of green at the bottom of each video.
Could this be a problem with the way the camera is configured? An issue with aspect ratio?
Personally I've only tested on my galaxy s4 with cyanogenmod. In there, the aspect ratio was no problem. However, I'm not sure whether some devices and/or firmwares have issues with this.
The only things not related to bugs in the mediaplayer that I can think of are:
Could you try if the issue persists with the newest snapshot?
I'm attempting to use gdx-video, with some modification, to show simultaneous videos at their true size. I've created a
VideoPlayer
for each video by providing anOrthographicCamera
andMesh
. This construction does not work with the current VideoPlayerAndroid.java'splayer.setOnPreparedListener
for a few reasons, but I've replaced the code with the following:I've loaded two videos -- 320x240 and 640x360 -- and they are rendered at the particular positions by calling
Gdx.gl.glViewport(locX, locY, videoWidth, videoHeight)
prior to rendering and then afterwards callingglViewport
to set it back to the device extents.A screenshot from a Galaxy Tab 2 7" is shown below. The correct outline of video placement is the 1px red border. I'm having trouble setting the camera and mesh so that the video is displayed in the correct proportion. Can you provide some guidance?