Chromium Code Reviews
DescriptionEnable seek in fullscreen mode for MSE impl on android
Since the actual MediaCodec instances live in browser process, we need to inform the chunk demuxer when a seek happens.
To avoid race conditions, all the operations related to seek needs to be performed on the browser thread, instead of MediaDecoderJobs' own threads. Here is the work flow of the fullscreen seek event:
1. User hit the seek bar.
2. MediaSourcePlayer waits for all the decoder tasks to finish on the browser thread.
3. MediaSourcePlayer sends MediaSeekRequest to render process.
4. Render process gets the MediaSeekRequest, sends back the ack, and ask chunk demuxer to do a seek
5. MediaSourcePlayer gets the MediaSeekRequestAck, and starts sending IPC for getting more data
For embedded video case, the workflow is:
1. user hit the seek bar
2. WebMediaPlayerAndroid sends a SeekTo message to MediaSourcePlayer.
3. MediaSourcePlayer waits for all the decoder tasks to finish, and then follows step 3-5 as shown in the fullscreen case.
This change also allows toggling from embedded mode to fullscreen mode. When that happens, we first wait for the current decoding tasks to finish. Then perform a seek and reestablish the surface.
BUG=233420
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202098
Patch Set 1 #Patch Set 2 : nits #
Total comments: 10
Patch Set 3 : addressing comments #
Total comments: 4
Patch Set 4 : add CancelPendingSeek() #
Total comments: 4
Patch Set 5 : fix comments #Patch Set 6 : rebase #Messages
Total messages: 18 (0 generated)
|