Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Issue 15499006: Enable seek in fullscreen mode for MSE impl on android (Closed)

Created:
7 years, 7 months ago by qinmin
Modified:
7 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Enable 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -64 lines) Patch
M content/browser/android/media_player_manager_impl.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/android/media_player_manager_impl.cc View 1 2 3 3 chunks +22 lines, -3 lines 0 comments Download
M content/common/media/media_player_messages_android.h View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_proxy_impl_android.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_proxy_impl_android.cc View 1 2 3 2 chunks +11 lines, -0 lines 0 comments Download
M media/base/android/media_player_android.h View 1 chunk +3 lines, -0 lines 0 comments Download
M media/base/android/media_player_android.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M media/base/android/media_player_manager.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M media/base/android/media_source_player.h View 1 2 3 6 chunks +22 lines, -9 lines 0 comments Download
M media/base/android/media_source_player.cc View 1 2 3 4 5 13 chunks +106 lines, -43 lines 0 comments Download
M webkit/media/android/media_source_delegate.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/media/android/media_source_delegate.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M webkit/media/android/webmediaplayer_android.h View 1 2 3 4 5 2 chunks +13 lines, -8 lines 0 comments Download
M webkit/media/android/webmediaplayer_android.cc View 1 2 3 4 5 5 chunks +32 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
qinmin
PTAL
7 years, 7 months ago (2013-05-20 23:24:40 UTC) #1
acolwell GONE FROM CHROMIUM
Looks good. Just a few questions. https://codereview.chromium.org/15499006/diff/2001/content/common/media/media_player_messages.h File content/common/media/media_player_messages.h (right): https://codereview.chromium.org/15499006/diff/2001/content/common/media/media_player_messages.h#newcode131 content/common/media/media_player_messages.h:131: #if defined(OS_ANDROID) nit: ...
7 years, 7 months ago (2013-05-21 17:49:42 UTC) #2
qinmin
https://chromiumcodereview.appspot.com/15499006/diff/2001/content/common/media/media_player_messages.h File content/common/media/media_player_messages.h (right): https://chromiumcodereview.appspot.com/15499006/diff/2001/content/common/media/media_player_messages.h#newcode131 content/common/media/media_player_messages.h:131: #if defined(OS_ANDROID) Synced to the TOT, and this should ...
7 years, 7 months ago (2013-05-21 23:04:56 UTC) #3
ycheo (away)
Hi Min, I have a question, before starting the review. When user do seeking in ...
7 years, 7 months ago (2013-05-22 06:17:00 UTC) #4
ycheo (away)
https://codereview.chromium.org/15499006/diff/7001/media/base/android/media_source_player.cc File media/base/android/media_source_player.cc (right): https://codereview.chromium.org/15499006/diff/7001/media/base/android/media_source_player.cc#newcode285 media/base/android/media_source_player.cc:285: if (!active_decoding_tasks_) This SeekTo() can be called from ContentVideoView::SeekTo() ...
7 years, 7 months ago (2013-05-22 06:59:13 UTC) #5
qinmin
I am not sure which solution is better. Hooking up something inside JS sounds ok, ...
7 years, 7 months ago (2013-05-22 07:12:54 UTC) #6
qinmin
https://codereview.chromium.org/15499006/diff/7001/media/base/android/media_source_player.cc File media/base/android/media_source_player.cc (right): https://codereview.chromium.org/15499006/diff/7001/media/base/android/media_source_player.cc#newcode285 media/base/android/media_source_player.cc:285: if (!active_decoding_tasks_) SeekTo() is always called on the browser ...
7 years, 7 months ago (2013-05-22 07:20:37 UTC) #7
ycheo (away)
lgtm
7 years, 7 months ago (2013-05-22 11:45:11 UTC) #8
qinmin
ping. Aaron, would you please take a look again? made some changes to MediaSourcePlayer, so ...
7 years, 7 months ago (2013-05-23 17:45:16 UTC) #9
Yaron
content/browser/android lgtm
7 years, 7 months ago (2013-05-23 18:14:26 UTC) #10
acolwell GONE FROM CHROMIUM
Looks good. Just one comment about fixing another seeking related issued. https://chromiumcodereview.appspot.com/15499006/diff/7001/webkit/media/android/webmediaplayer_android.cc File webkit/media/android/webmediaplayer_android.cc (right): ...
7 years, 7 months ago (2013-05-23 18:21:30 UTC) #11
qinmin
https://chromiumcodereview.appspot.com/15499006/diff/7001/webkit/media/android/webmediaplayer_android.cc File webkit/media/android/webmediaplayer_android.cc (right): https://chromiumcodereview.appspot.com/15499006/diff/7001/webkit/media/android/webmediaplayer_android.cc#newcode161 webkit/media/android/webmediaplayer_android.cc:161: #if defined(GOOGLE_TV) Done. MediaSourceDelegate::Seek() already packs in chunk_demuxer->StartWaitingForSeek(). Added ...
7 years, 7 months ago (2013-05-23 20:07:21 UTC) #12
acolwell GONE FROM CHROMIUM
lgtm. I believe there are still more issues with seeking, but I'm fine with these ...
7 years, 7 months ago (2013-05-23 20:58:27 UTC) #13
qinmin
https://chromiumcodereview.appspot.com/15499006/diff/24001/media/base/android/media_source_player.cc File media/base/android/media_source_player.cc (right): https://chromiumcodereview.appspot.com/15499006/diff/24001/media/base/android/media_source_player.cc#newcode243 media/base/android/media_source_player.cc:243: pending_event_ &= ~SURFACE_CHANGE_EVENT_PENDING; We cannot guarantee the bit is ...
7 years, 7 months ago (2013-05-23 22:03:36 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/15499006/30001
7 years, 7 months ago (2013-05-24 04:23:52 UTC) #15
commit-bot: I haz the power
Failed to apply patch for media/base/android/media_source_player.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 7 months ago (2013-05-24 09:30:26 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/15499006/46001
7 years, 7 months ago (2013-05-24 13:24:13 UTC) #17
commit-bot: I haz the power
7 years, 7 months ago (2013-05-24 16:08:43 UTC) #18
Message was sent while issue was closed.
Change committed as 202098

Powered by Google App Engine
This is Rietveld 408576698