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

Issue 1242913004: MediaCodecPlayer implementation (stage 3 - browser seek and surface change) (Closed)

Created:
5 years, 5 months ago by Tima Vaisburd
Modified:
5 years, 4 months ago
Reviewers:
qinmin, wolenetz
CC:
chromium-reviews, posciak+watch_chromium.org, avayvod+watch_chromium.org, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, wjia+watch_chromium.org, mlamouri+watch-media_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@mtplayer-seek
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MediaCodecPlayer implementation (stage 3 - browser seek and surface change) We initiate a browser seek if at the time of video codec reconfiguration the frame that would be the first one is not a key frame. This usually happens when we replace video surface in the middle of the playback. In this implementation when the video surface is changed during the playback both audio and video streams are stopped and then both are restarted. BUG=407577 Committed: https://crrev.com/0b80663bae09866fb8a5aa5431312c957e3f0f4e Cr-Commit-Position: refs/heads/master@{#341223}

Patch Set 1 #

Patch Set 2 : Restored log verbosity level for per-frame info #

Patch Set 3 : Fixed unit tests #

Patch Set 4 : Fixed the check whether surface is empty, faster stopping after SyncStop, cleanup #

Total comments: 4

Patch Set 5 : Addressed Min comments, added unit tests. #

Total comments: 1

Patch Set 6 : Rebased, DepleteOutputBuffer() cleanup #

Patch Set 7 : Fixed SeekTo() followed by Release() and added uunit tests for this case #

Total comments: 14

Patch Set 8 : Addressed Matt's comments, do not swallow seek completed reply in the error state #

Total comments: 7

Patch Set 9 : Rebased, changed DCHECKs. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+725 lines, -232 lines) Patch
M media/base/android/media_codec_audio_decoder.cc View 1 2 3 4 5 6 7 3 chunks +9 lines, -3 lines 0 comments Download
M media/base/android/media_codec_decoder.h View 1 2 3 4 5 6 7 6 chunks +29 lines, -13 lines 0 comments Download
M media/base/android/media_codec_decoder.cc View 1 2 3 4 5 6 7 18 chunks +63 lines, -26 lines 0 comments Download
M media/base/android/media_codec_decoder_unittest.cc View 1 2 3 4 5 6 7 11 chunks +26 lines, -12 lines 0 comments Download
M media/base/android/media_codec_player.h View 1 2 3 4 5 6 7 6 chunks +20 lines, -12 lines 0 comments Download
M media/base/android/media_codec_player.cc View 1 2 3 4 5 6 7 8 25 chunks +210 lines, -114 lines 0 comments Download
M media/base/android/media_codec_player_unittest.cc View 1 2 3 4 5 6 19 chunks +344 lines, -31 lines 0 comments Download
M media/base/android/media_codec_video_decoder.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M media/base/android/media_codec_video_decoder.cc View 1 2 3 4 5 6 7 5 chunks +21 lines, -18 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 19 (4 generated)
Tima Vaisburd
Min, this is my first attempt at the browser seek and surface change. Could you, ...
5 years, 5 months ago (2015-07-20 23:13:23 UTC) #2
qinmin
https://codereview.chromium.org/1242913004/diff/60001/media/base/android/media_codec_player.cc File media/base/android/media_codec_player.cc (right): https://codereview.chromium.org/1242913004/diff/60001/media/base/android/media_codec_player.cc#newcode152 media/base/android/media_codec_player.cc:152: StopDecoders(); // synchronous stop we only need to do ...
5 years, 5 months ago (2015-07-22 17:30:33 UTC) #3
Tima Vaisburd
https://codereview.chromium.org/1242913004/diff/60001/media/base/android/media_codec_player.cc File media/base/android/media_codec_player.cc (right): https://codereview.chromium.org/1242913004/diff/60001/media/base/android/media_codec_player.cc#newcode152 media/base/android/media_codec_player.cc:152: StopDecoders(); // synchronous stop On 2015/07/22 17:30:33, qinmin wrote: ...
5 years, 5 months ago (2015-07-23 00:37:49 UTC) #4
qinmin
lgtm
5 years, 5 months ago (2015-07-24 00:02:40 UTC) #5
Tima Vaisburd
Adding Matt. This CL currently lacks the fix for Release() coming in the STATE_WAITING_FOR_SEEK.
5 years, 5 months ago (2015-07-24 23:39:44 UTC) #7
Tima Vaisburd
I modified the Release to not interfere with SeekTo processing and added corresponding unit tests. ...
5 years, 4 months ago (2015-07-28 22:56:44 UTC) #8
wolenetz
lgtm % nits https://codereview.chromium.org/1242913004/diff/120001/media/base/android/media_codec_decoder.cc File media/base/android/media_codec_decoder.cc (right): https://codereview.chromium.org/1242913004/diff/120001/media/base/android/media_codec_decoder.cc#newcode200 media/base/android/media_codec_decoder.cc:200: // Shall we move |delayed_buffers_| from ...
5 years, 4 months ago (2015-07-29 22:37:03 UTC) #9
wolenetz
lgtm % nits
5 years, 4 months ago (2015-07-29 22:37:04 UTC) #10
Tima Vaisburd
Added a fix for potential Flash() error, please take another look. https://codereview.chromium.org/1242913004/diff/120001/media/base/android/media_codec_decoder.cc File media/base/android/media_codec_decoder.cc (right): ...
5 years, 4 months ago (2015-07-30 20:28:36 UTC) #11
wolenetz
https://codereview.chromium.org/1242913004/diff/120001/media/base/android/media_codec_decoder.cc File media/base/android/media_codec_decoder.cc (right): https://codereview.chromium.org/1242913004/diff/120001/media/base/android/media_codec_decoder.cc#newcode200 media/base/android/media_codec_decoder.cc:200: // Shall we move |delayed_buffers_| from VideoDecoder to Decoder ...
5 years, 4 months ago (2015-07-30 21:10:39 UTC) #12
wolenetz
lgtm % 2 previous nits https://codereview.chromium.org/1242913004/diff/140001/media/base/android/media_codec_player.cc File media/base/android/media_codec_player.cc (right): https://codereview.chromium.org/1242913004/diff/140001/media/base/android/media_codec_player.cc#newcode437 media/base/android/media_codec_player.cc:437: if (state_ == kStateError) ...
5 years, 4 months ago (2015-07-30 21:41:10 UTC) #13
Tima Vaisburd
https://codereview.chromium.org/1242913004/diff/140001/media/base/android/media_codec_player.cc File media/base/android/media_codec_player.cc (right): https://codereview.chromium.org/1242913004/diff/140001/media/base/android/media_codec_player.cc#newcode447 media/base/android/media_codec_player.cc:447: DCHECK(state_ == kStateWaitingForSeek); On 2015/07/30 21:10:39, wolenetz wrote: > ...
5 years, 4 months ago (2015-07-30 22:25:32 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1242913004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1242913004/160001
5 years, 4 months ago (2015-07-30 22:26:03 UTC) #17
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 4 months ago (2015-07-30 23:29:53 UTC) #18
commit-bot: I haz the power
5 years, 4 months ago (2015-07-30 23:30:43 UTC) #19
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/0b80663bae09866fb8a5aa5431312c957e3f0f4e
Cr-Commit-Position: refs/heads/master@{#341223}

Powered by Google App Engine
This is Rietveld 408576698