How to make TextureView play round-angle video with bubble effect

I was able to play the video using TextureView and MediaPlayer on Android. I did it like this: I created a surface with SurfaceTexture:

    public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int w, int h)
{
    mSurface = new Surface(surfaceTexture);
    ...
    ...
}

Attach the surface to MediaPlayer:

    try
{
    mMediaPlayer.setDataSource(mPlayUrl);
    mMediaPlayer.setSurface(mSurface);
    ...
    ...
}

This is normal, but not enough for me. I expect the TextureView to be with round corners and look like a bubble (with an angle), look at the image below: the effect that I expect

I found an article ( Round videos on Android ), which is very useful, but the author chose GLSurfaceView and only implemented round corners. I believe that TextureView is also suitable for implementing my effect, SurfaceTexure processing is the key. But I am not familiar with opengl, who can give me some advice?

+3
2
0

, , mask. - , .

-1

All Articles