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

Issue 1176993005: Audio and video decoders for MediaCodecPlayer (Closed)

Created:
5 years, 6 months ago by Tima Vaisburd
Modified:
5 years, 6 months ago
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@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Revert of "Audio and video decoders for MediaCodecPlayer" The original CL has been reverted in https://codereview.chromium.org/1194423008/, this is the original with the fix. Original CL: Audio and video decoders for MediaCodecPlayer This is a prerequisite for MediaCodecPlayer (to be committed later). Each decoder controls the queue of incoming access units and the Android MediaCodec object through the instance of MediaCodecBridge. The decoder owns a dedicated thread (Decoder thread) to access the MediaCodecBridge. The manipulations with MediaCodec buffers, both input and output, as well the rendering happen on this one thread. For discussion see https://codereview.chromium.org/1128383003/ BUG=407577 Committed: https://crrev.com/d472a7860ac521ef72c53c9bb04926d4747e0b01 Cr-Commit-Position: refs/heads/master@{#335618} Committed: https://crrev.com/7c32aea5c6fa487628501ac6dff4dddcce623152 Cr-Commit-Position: refs/heads/master@{#335849}

Patch Set 1 #

Patch Set 2 : Added tests for video decoder, video decoder now reports current time. #

Total comments: 10

Patch Set 3 : Rebased to include AccessUnitQueue. #

Patch Set 4 : Added kPrefetched and kError states, RequestToStop works in any state. #

Patch Set 5 : Refactored DataFactory into a separate file #

Total comments: 16

Patch Set 6 : Addressed Min's comments #

Total comments: 47

Patch Set 7 : Addressed most of wolenetz@ comments #

Patch Set 8 : Removed weak_ptr_ member variable #

Total comments: 9

Patch Set 9 : Fixed DemuxerConfigs logging functions #

Total comments: 1

Patch Set 10 : Another logging fix #

Patch Set 11 : Fixed clang compilation, removed refcounts from TestDataFactory #

Patch Set 12 : Fixed unit tests on Nexus 4 #

Patch Set 13 : A better unittest fix, increased timeout for video #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2374 lines, -0 lines) Patch
M media/base/android/BUILD.gn View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
M media/base/android/demuxer_stream_player_params.h View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M media/base/android/demuxer_stream_player_params.cc View 1 2 3 4 5 6 7 8 9 1 chunk +80 lines, -0 lines 0 comments Download
A media/base/android/media_codec_audio_decoder.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +91 lines, -0 lines 0 comments Download
A media/base/android/media_codec_audio_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +216 lines, -0 lines 0 comments Download
A media/base/android/media_codec_decoder.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +283 lines, -0 lines 0 comments Download
A media/base/android/media_codec_decoder.cc View 1 2 3 4 5 6 7 8 9 10 12 1 chunk +598 lines, -0 lines 0 comments Download
A media/base/android/media_codec_decoder_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +522 lines, -0 lines 0 comments Download
A media/base/android/media_codec_video_decoder.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +112 lines, -0 lines 0 comments Download
A media/base/android/media_codec_video_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +270 lines, -0 lines 0 comments Download
A media/base/android/test_data_factory.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +68 lines, -0 lines 0 comments Download
A media/base/android/test_data_factory.cc View 1 2 3 4 5 1 chunk +109 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
A media/test/data/h264-320x180-frame-0 View 1 Binary file 0 comments Download
A media/test/data/h264-320x180-frame-1 View 1 Binary file 0 comments Download
A media/test/data/h264-320x180-frame-2 View 1 Binary file 0 comments Download
A media/test/data/h264-320x180-frame-3 View 1 Binary file 0 comments Download

Messages

Total messages: 49 (10 generated)
Tima Vaisburd
This is the decoder split off the original MediaCodecPlayer CL. I added the beginning of ...
5 years, 6 months ago (2015-06-11 03:21:48 UTC) #2
Tima Vaisburd
5 years, 6 months ago (2015-06-11 17:23:06 UTC) #4
wolenetz
On 2015/06/11 17:23:06, Tima Vaisburd wrote: Following CR of prereq CL and a couple CRs, ...
5 years, 6 months ago (2015-06-12 00:04:26 UTC) #5
Tima Vaisburd
On 2015/06/12 00:04:26, wolenetz wrote: > On 2015/06/11 17:23:06, Tima Vaisburd wrote: > > Following ...
5 years, 6 months ago (2015-06-12 19:42:11 UTC) #6
liberato (no reviews please)
https://codereview.chromium.org/1176993005/diff/20001/media/base/android/access_unit_queue.cc File media/base/android/access_unit_queue.cc (right): https://codereview.chromium.org/1176993005/diff/20001/media/base/android/access_unit_queue.cc#newcode16 media/base/android/access_unit_queue.cc:16: AccessUnitQueue::~AccessUnitQueue() { nit: why provide an empty, non-virtual destructor? ...
5 years, 6 months ago (2015-06-12 22:24:15 UTC) #7
Tima Vaisburd
https://codereview.chromium.org/1176993005/diff/20001/media/base/android/access_unit_queue.cc File media/base/android/access_unit_queue.cc (right): https://codereview.chromium.org/1176993005/diff/20001/media/base/android/access_unit_queue.cc#newcode16 media/base/android/access_unit_queue.cc:16: AccessUnitQueue::~AccessUnitQueue() { On 2015/06/12 22:24:15, liberato wrote: > nit: ...
5 years, 6 months ago (2015-06-12 22:49:02 UTC) #8
wolenetz
On 2015/06/12 22:49:02, Tima Vaisburd wrote: > https://codereview.chromium.org/1176993005/diff/20001/media/base/android/access_unit_queue.cc > File media/base/android/access_unit_queue.cc (right): > > https://codereview.chromium.org/1176993005/diff/20001/media/base/android/access_unit_queue.cc#newcode16 ...
5 years, 6 months ago (2015-06-12 23:00:58 UTC) #9
Tima Vaisburd
On 2015/06/12 23:00:58, wolenetz wrote: > On 2015/06/12 22:49:02, Tima Vaisburd wrote: > > > ...
5 years, 6 months ago (2015-06-15 18:06:30 UTC) #10
wolenetz
On 2015/06/15 18:06:30, Tima Vaisburd wrote: > On 2015/06/12 23:00:58, wolenetz wrote: > > On ...
5 years, 6 months ago (2015-06-15 18:34:17 UTC) #11
Tima Vaisburd
On 2015/06/15 18:34:17, wolenetz wrote: > On 2015/06/15 18:06:30, Tima Vaisburd wrote: > > On ...
5 years, 6 months ago (2015-06-15 18:43:31 UTC) #12
Tima Vaisburd
https://codereview.chromium.org/1176993005/diff/20001/media/base/android/access_unit_queue.cc File media/base/android/access_unit_queue.cc (right): https://codereview.chromium.org/1176993005/diff/20001/media/base/android/access_unit_queue.cc#newcode16 media/base/android/access_unit_queue.cc:16: AccessUnitQueue::~AccessUnitQueue() { On 2015/06/12 22:49:01, Tima Vaisburd wrote: > ...
5 years, 6 months ago (2015-06-15 18:57:09 UTC) #13
wolenetz
On 2015/06/15 18:43:31, Tima Vaisburd wrote: > On 2015/06/15 18:34:17, wolenetz wrote: > > On ...
5 years, 6 months ago (2015-06-15 19:10:24 UTC) #14
Tima Vaisburd
On 2015/06/15 19:10:24, wolenetz wrote: > On 2015/06/15 18:43:31, Tima Vaisburd wrote: > > On ...
5 years, 6 months ago (2015-06-15 19:29:57 UTC) #15
Tima Vaisburd
https://codereview.chromium.org/1176993005/diff/20001/media/base/android/media_codec_video_decoder.cc File media/base/android/media_codec_video_decoder.cc (right): https://codereview.chromium.org/1176993005/diff/20001/media/base/android/media_codec_video_decoder.cc#newcode24 media/base/android/media_codec_video_decoder.cc:24: const base::Closure& error_cb, On 2015/06/12 22:24:15, liberato wrote: > ...
5 years, 6 months ago (2015-06-17 01:18:24 UTC) #16
liberato (no reviews please)
https://codereview.chromium.org/1176993005/diff/20001/media/base/android/media_codec_video_decoder.cc File media/base/android/media_codec_video_decoder.cc (right): https://codereview.chromium.org/1176993005/diff/20001/media/base/android/media_codec_video_decoder.cc#newcode24 media/base/android/media_codec_video_decoder.cc:24: const base::Closure& error_cb, On 2015/06/17 01:18:24, Tima Vaisburd wrote: ...
5 years, 6 months ago (2015-06-17 14:11:11 UTC) #17
chromium-reviews
Thank you. What else needs to be done wrt this CL? I haven't received approval ...
5 years, 6 months ago (2015-06-17 17:39:57 UTC) #18
qinmin
https://codereview.chromium.org/1176993005/diff/80001/media/base/android/media_codec_decoder.cc File media/base/android/media_codec_decoder.cc (right): https://codereview.chromium.org/1176993005/diff/80001/media/base/android/media_codec_decoder.cc#newcode132 media/base/android/media_codec_decoder.cc:132: // drm_bridge_ is not implemented add a TODO https://codereview.chromium.org/1176993005/diff/80001/media/base/android/media_codec_decoder.cc#newcode373 ...
5 years, 6 months ago (2015-06-18 00:24:41 UTC) #19
Tima Vaisburd
I also added description for the audio and video decoder constructor parameters. https://codereview.chromium.org/1176993005/diff/80001/media/base/android/media_codec_decoder.cc File media/base/android/media_codec_decoder.cc ...
5 years, 6 months ago (2015-06-18 19:34:04 UTC) #20
qinmin
lgtm % nit https://codereview.chromium.org/1176993005/diff/100001/media/base/android/media_codec_video_decoder.cc File media/base/android/media_codec_video_decoder.cc (right): https://codereview.chromium.org/1176993005/diff/100001/media/base/android/media_codec_video_decoder.cc#newcode106 media/base/android/media_codec_video_decoder.cc:106: ->IsAdaptivePlaybackSupported(next.video_size.width(), nit: fix the indent
5 years, 6 months ago (2015-06-19 06:57:40 UTC) #21
wolenetz
Some comments on PS6. I'll continue review beyond the base decoder class review, next. https://codereview.chromium.org/1176993005/diff/100001/media/base/android/demuxer_stream_player_params.cc ...
5 years, 6 months ago (2015-06-19 22:46:41 UTC) #22
wolenetz
Overall, this is looking pretty good. I especially like the breaking apart of the testfactory ...
5 years, 6 months ago (2015-06-19 23:28:42 UTC) #23
Tima Vaisburd
I hope I addressed all of Matt's comments (there are some minor questions) except checking ...
5 years, 6 months ago (2015-06-20 02:32:31 UTC) #24
Tima Vaisburd
https://codereview.chromium.org/1176993005/diff/100001/media/base/android/media_codec_decoder.h File media/base/android/media_codec_decoder.h (right): https://codereview.chromium.org/1176993005/diff/100001/media/base/android/media_codec_decoder.h#newcode264 media/base/android/media_codec_decoder.h:264: base::WeakPtr<MediaCodecDecoder> weak_this_; On 2015/06/20 02:32:31, Tima Vaisburd wrote: > ...
5 years, 6 months ago (2015-06-21 22:35:20 UTC) #25
wolenetz
Just a couple further issues (demuxer_stream_player logging stuff). Otherwise, l*tm. watk@, did you also want ...
5 years, 6 months ago (2015-06-22 21:41:22 UTC) #26
watk
On 2015/06/22 21:41:22, wolenetz wrote: > Just a couple further issues (demuxer_stream_player logging stuff). Otherwise, ...
5 years, 6 months ago (2015-06-22 21:56:42 UTC) #27
Tima Vaisburd
https://codereview.chromium.org/1176993005/diff/140001/media/base/android/demuxer_stream_player_params.cc File media/base/android/demuxer_stream_player_params.cc (right): https://codereview.chromium.org/1176993005/diff/140001/media/base/android/demuxer_stream_player_params.cc#newcode34 media/base/android/demuxer_stream_player_params.cc:34: const char* AsString(AudioCodec codec) { On 2015/06/22 21:41:22, wolenetz ...
5 years, 6 months ago (2015-06-22 22:31:52 UTC) #28
wolenetz
lgtm % nit https://codereview.chromium.org/1176993005/diff/160001/media/base/android/demuxer_stream_player_params.cc File media/base/android/demuxer_stream_player_params.cc (right): https://codereview.chromium.org/1176993005/diff/160001/media/base/android/demuxer_stream_player_params.cc#newcode87 media/base/android/demuxer_stream_player_params.cc:87: os << conf.duration; nit (sorry, didn't ...
5 years, 6 months ago (2015-06-22 22:43:47 UTC) #29
liberato (no reviews please)
lgtm
5 years, 6 months ago (2015-06-22 22:47:46 UTC) #30
liberato (no reviews please)
lgtm
5 years, 6 months ago (2015-06-22 22:47:50 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1176993005/180001
5 years, 6 months ago (2015-06-22 23:07:46 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/89476)
5 years, 6 months ago (2015-06-23 00:09:48 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1176993005/200001
5 years, 6 months ago (2015-06-23 01:53:06 UTC) #39
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 6 months ago (2015-06-23 02:58:23 UTC) #40
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/d472a7860ac521ef72c53c9bb04926d4747e0b01 Cr-Commit-Position: refs/heads/master@{#335618}
5 years, 6 months ago (2015-06-23 02:59:16 UTC) #41
Stephen Chennney
A revert of this CL (patchset #11 id:200001) has been created in https://codereview.chromium.org/1194423008/ by schenney@chromium.org. ...
5 years, 6 months ago (2015-06-23 13:27:34 UTC) #42
Tima Vaisburd
Min, could you, please, check that the revert of revert is done correctly?
5 years, 6 months ago (2015-06-23 22:20:16 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1176993005/240001
5 years, 6 months ago (2015-06-24 00:00:11 UTC) #47
commit-bot: I haz the power
Committed patchset #13 (id:240001)
5 years, 6 months ago (2015-06-24 01:40:41 UTC) #48
commit-bot: I haz the power
5 years, 6 months ago (2015-06-24 01:41:44 UTC) #49
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/7c32aea5c6fa487628501ac6dff4dddcce623152
Cr-Commit-Position: refs/heads/master@{#335849}

Powered by Google App Engine
This is Rietveld 408576698