简体   繁体   中英

Unable to find Rajawali Video Texture in the latest revision

Unable to find VideoTexture class in the latest rajawali revision(1.0.295-SNAPSHOT).
Please let me know is there any alternate for video texture? or exact repository location or url with VideoTexture file?

You can use StreamingTexture instead like this:

MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.my_video);
StreamingTexture videoTexture = new StreamingTexture("video", mediaPlayer);

To update the texture image you have to call StreamingTexture#update() :

@Override
protected void onRender(long elapsedRealTime, double deltaTime) {
    super.onRender(elapsedRealTime, deltaTime);

    if (videoTexture != null) {
        // update texture from video content
        videoTexture.update();
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM