google / google/ExoPlayer

Switching Surface smoothly

Open
#677 25 comments 0 reactions 1 assignee Claimed by @andrewlewis View on GitHub
enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

This is actually more of a question rather than an issue.

Whenever you call MediaCodecVideoTrackRenderer.setSurface() with a new Surface, playback will stop until a new sync frame is received. I haven't looked too deep into the internals but I guess the buffers used by MediaCodec are obtained directly from a given surface so it needs to be reset. Is there any way of passing the current decoding state to a new MediaCodec/Surface?

The question is if it would be possible at all to avoid the playback gap at all and what modifications would it require to ExoPlayer.

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.