Commit 4404ccef authored by Felix Abecassis's avatar Felix Abecassis

VideoPlayerActivity: do not add callbacks for local surfaces while in presentation mode

Presentation mode did not work with the full HW acceleration mode
since MediaCodec was rendering to the local surface instead of the
remote surface.
parent 7159b801
......@@ -351,13 +351,15 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
} else {
mSurfaceHolder.setFormat(PixelFormat.RGBX_8888);
}
mSurfaceHolder.addCallback(mSurfaceCallback);
mSubtitlesSurface = (SurfaceView) findViewById(R.id.subtitles_surface);
mSubtitlesSurfaceHolder = mSubtitlesSurface.getHolder();
mSubtitlesSurfaceHolder.setFormat(PixelFormat.RGBA_8888);
mSubtitlesSurface.setZOrderMediaOverlay(true);
mSubtitlesSurfaceHolder.addCallback(mSubtitlesSurfaceCallback);
if (mPresentation == null) {
mSurfaceHolder.addCallback(mSurfaceCallback);
mSubtitlesSurfaceHolder.addCallback(mSubtitlesSurfaceCallback);
}
mSeekbar = (SeekBar) findViewById(R.id.player_overlay_seekbar);
mSeekbar.setOnSeekBarChangeListener(mSeekListener);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment