Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af4fccf0 authored by Jamie Gennis's avatar Jamie Gennis
Browse files

MediaDump: use the MediaPlayer#setSurface method

This change updates the MediaDump test to use the new
MediaPlayer#setSurface method in place of MediaPlayer#setTexture, which
will be removed.

Change-Id: I33f59705c728f0884452d45cf83cb5b80f66a95a
parent fd8feeef
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import android.opengl.Matrix;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.View;
import android.widget.MediaController;
@@ -569,7 +570,9 @@ class VideoDumpView extends GLSurfaceView implements MediaPlayerControl {
            mSurface = new SurfaceTexture(mTextureID);
            mSurface.setOnFrameAvailableListener(this);

            mMediaPlayer.setTexture(mSurface);
            Surface surface = new Surface(mSurface);
            mMediaPlayer.setSurface(surface);
            surface.release();

            try {
                mMediaPlayer.prepare();