0

I'm implementing an IPTV project, So I have a TextureView that plays video. But in some cases it has no picture and only plays audio, because of some hardware accelerating window issues in set top box device.

So my question is how to find out TextureView will work on an android device?

And my another question is:

How to find out an android device will run TextureView properly?

Thanks in advance

Milad Yarmohammadi
  • 1,253
  • 2
  • 22
  • 37

2 Answers2

0

Can I suggest you to take a look at Google Exoplayer 2? I've been using it for an Android TV project among other things and it seems to be working really well. It accepts auth keys and a lot of formats like progressive HLS and so on.

Demo application here.

  • Thanks for your response, we have used `Exomedia` 4.0.2 in our project. We need to know which device is suitable for us... note that we need to minimize cost of STB device :) – Milad Yarmohammadi Jul 18 '17 at 05:40
0

This could be beneficial for novice android developers or anyone who will see this.

In my case, using this snippet in OnCreate method helped me to find out which device can use SurfaceView

    if (
            GLES20.glGetString(GLES20.GL_RENDERER) == null ||
                    GLES20.glGetString(GLES20.GL_VENDOR) == null ||
                    GLES20.glGetString(GLES20.GL_VERSION) == null ||
                    GLES20.glGetString(GLES20.GL_EXTENSIONS) == null ||
                    GLES10.glGetString(GLES10.GL_RENDERER) == null ||
                    GLES10.glGetString(GLES10.GL_VENDOR) == null ||
                    GLES10.glGetString(GLES10.GL_VERSION) == null ||
                    GLES10.glGetString(GLES10.GL_EXTENSIONS) == null) {
        // this device can not use TextureView
    } else {
        // this device can use TextureView
    }

To find out differences between SurfaceView and TextureView see this link.

Milad Yarmohammadi
  • 1,253
  • 2
  • 22
  • 37