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

Issue 196133020: Reducing the IPC latency for MSE video decoding (Closed)

Created:
6 years, 9 months ago by qinmin
Modified:
6 years, 9 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org
Visibility:
Public.

Description

Reducing the IPC latency for MSE video decoding For MSE, we decode the data in the browser process. When all the data is decoded, we started to request data from the render process. So the decoder is idle during the IPC round trip + data copy time This may introduce some issues as this delay may impact smooth video playbacks. This change tries to solve the above problem: 1. Divide data into 2 chunks in the browser process 2. When decoding 1 chunk, check if the chunk is reaching its end. If so, request data for the current chunk, and start decoding the next chunk. 3. When new data arrives, store them in the next chunk (since the current one might still be being decoded) This change also: 1. reduced the buffered data size at the browser side 2. fixes crbug.com/306314 if there is pending data requests across release()/start() 3. fixed all the unit tests behaviors. The new approach should be well tested by all the unit tests we have. BUG=306314 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=258419

Patch Set 1 #

Total comments: 28

Patch Set 2 : addressing comments #

Total comments: 25

Patch Set 3 : addressing comments #

Total comments: 31

Patch Set 4 : nits #

Patch Set 5 : rebase #

Patch Set 6 : fix clang warning #

Unified diffs Side-by-side diffs Delta from patch set Stats (+319 lines, -149 lines) Patch
M content/renderer/media/android/media_source_delegate.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/android/demuxer_android.h View 1 1 chunk +1 line, -1 line 0 comments Download
M media/base/android/media_decoder_job.h View 1 2 3 4 10 chunks +62 lines, -15 lines 0 comments Download
M media/base/android/media_decoder_job.cc View 1 2 3 4 11 chunks +114 lines, -42 lines 0 comments Download
M media/base/android/media_player_android.h View 1 1 chunk +1 line, -1 line 0 comments Download
M media/base/android/media_player_bridge.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M media/base/android/media_player_bridge.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M media/base/android/media_source_player.h View 1 2 3 4 6 chunks +11 lines, -6 lines 0 comments Download
M media/base/android/media_source_player.cc View 1 2 3 4 16 chunks +57 lines, -13 lines 0 comments Download
M media/base/android/media_source_player_unittest.cc View 1 2 3 4 5 40 chunks +69 lines, -67 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
qinmin
PTAL
6 years, 9 months ago (2014-03-15 21:33:54 UTC) #1
wolenetz
Nice CL! Do you have any latency numbers or even empirical/anecdotal evidence of previous problem/improvement ...
6 years, 9 months ago (2014-03-17 19:51:00 UTC) #2
qinmin
https://codereview.chromium.org/196133020/diff/1/media/base/android/media_decoder_job.cc File media/base/android/media_decoder_job.cc (right): https://codereview.chromium.org/196133020/diff/1/media/base/android/media_decoder_job.cc#newcode225 media/base/android/media_decoder_job.cc:225: // When |input_eos_encountered_| is set, |access_unit| must be pointing ...
6 years, 9 months ago (2014-03-18 18:58:57 UTC) #3
wolenetz
Thanks for addressing comments. Here's my next round (mostly nits): https://codereview.chromium.org/196133020/diff/20001/content/renderer/media/android/media_source_delegate.cc File content/renderer/media/android/media_source_delegate.cc (right): https://codereview.chromium.org/196133020/diff/20001/content/renderer/media/android/media_source_delegate.cc#newcode35 ...
6 years, 9 months ago (2014-03-18 21:14:46 UTC) #4
wolenetz
On 2014/03/18 21:14:46, wolenetz wrote: > Thanks for addressing comments. Here's my next round (mostly ...
6 years, 9 months ago (2014-03-18 21:17:01 UTC) #5
qinmin
I did some experiment with the patch using http://dash-mse-test.appspot.com/dash-player.html?url=http://yt-dash-mse-test.commondatastorage.googleapis.com/media/feelings_vp9-20130806-manifest.mpd. Without the patch, the average time ...
6 years, 9 months ago (2014-03-19 02:45:21 UTC) #6
wolenetz
Thanks for updating. This round, all my comments are nits. lgtm % nits https://codereview.chromium.org/196133020/diff/20001/media/base/android/media_decoder_job.h File ...
6 years, 9 months ago (2014-03-19 17:26:05 UTC) #7
qinmin
https://codereview.chromium.org/196133020/diff/40001/media/base/android/media_decoder_job.cc File media/base/android/media_decoder_job.cc (right): https://codereview.chromium.org/196133020/diff/40001/media/base/android/media_decoder_job.cc#newcode459 media/base/android/media_decoder_job.cc:459: bool MediaDecoderJob::NoAccessUnitsRemainingInChunk(bool current_chunk) const { On 2014/03/19 17:26:05, wolenetz ...
6 years, 9 months ago (2014-03-19 19:24:54 UTC) #8
qinmin
The CQ bit was checked by qinmin@chromium.org
6 years, 9 months ago (2014-03-19 22:05:45 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/196133020/80001
6 years, 9 months ago (2014-03-19 22:07:45 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-19 22:08:07 UTC) #11
commit-bot: I haz the power
Failed to apply patch for media/base/android/media_decoder_job.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-19 22:08:07 UTC) #12
qinmin
The CQ bit was checked by qinmin@chromium.org
6 years, 9 months ago (2014-03-20 02:07:11 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/196133020/100001
6 years, 9 months ago (2014-03-20 02:07:18 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-20 02:58:41 UTC) #15
commit-bot: I haz the power
Retried try job too often on android_clang_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_clang_dbg&number=125200
6 years, 9 months ago (2014-03-20 02:58:42 UTC) #16
qinmin
The CQ bit was checked by qinmin@chromium.org
6 years, 9 months ago (2014-03-20 17:27:22 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/196133020/100001
6 years, 9 months ago (2014-03-20 17:28:42 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-20 18:23:53 UTC) #19
commit-bot: I haz the power
Retried try job too often on android_clang_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_clang_dbg&number=125405
6 years, 9 months ago (2014-03-20 18:23:53 UTC) #20
qinmin
The CQ bit was checked by qinmin@chromium.org
6 years, 9 months ago (2014-03-20 18:32:30 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/196133020/120001
6 years, 9 months ago (2014-03-20 18:36:41 UTC) #22
commit-bot: I haz the power
6 years, 9 months ago (2014-03-20 21:45:15 UTC) #23
Message was sent while issue was closed.
Change committed as 258419

Powered by Google App Engine
This is Rietveld 408576698