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

Issue 2132653002: MediaCodecLoop unit tests (Closed)

Created:
4 years, 5 months ago by liberato (no reviews please)
Modified:
4 years, 4 months ago
Reviewers:
watk, DaleCurtis
CC:
avayvod+watch_chromium.org, chromium-reviews, feature-media-reviews_chromium.org, mlamouri+watch-media_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MediaCodecLoop unit tests. This CL adds unit tests for MediaCodecLoop that compile and run anywhere. We do this, so that we don't accidentally take any dependencies on the android runtime, e.g., BuildInfo. It does this with new build targets. For example, we know that media_codec_loop.cc does not depend on JNI to run, and doesn't care if (for example) MediaCodec is broken today on the particular device on which the tests run. Moved MediaCodecBridge and MediaCodecLoop to android/anywhere, which builds anywhere. For example, building media_unittests on linux will include tests for MediaCodecLoop. Note that building non-unittest targets on non-android platforms will not include extra code. BUG=632401 Committed: https://crrev.com/7014d6d056a3a524c123b5886065a6f1e2722c09 Cr-Commit-Position: refs/heads/master@{#411075}

Patch Set 1 #

Patch Set 2 : gn args, same dir #

Patch Set 3 : added some tests #

Total comments: 2

Patch Set 4 : actually added files #

Patch Set 5 : added test to send data to mediacodec. #

Patch Set 6 : added some utility functions. #

Patch Set 7 : added io loop test #

Patch Set 8 : rebased #

Patch Set 9 : moved :anywhere to public_deps #

Patch Set 10 : added tests, rebased #

Patch Set 11 : decoupled sdk_int, added tests for flush. #

Patch Set 12 : added OnKeyAdded test #

Patch Set 13 : TESTING -- quit using anywhere_unittests #

Patch Set 14 : made android unittests not use anywhere_unittests #

Patch Set 15 : fixed includes #

Total comments: 6

Patch Set 16 : moved subsample_entry out from decrypt_config #

Patch Set 17 : cast to int for win32 #

Patch Set 18 : updated include in mock_media_codec_bridge #

Patch Set 19 : fixed sdk/ndk_media_codec_bridge includes #

Patch Set 20 : fixed media_codec_bridge include #

Patch Set 21 : changed constexpr for windows compiler bug #

Total comments: 10

Patch Set 22 : cl feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+763 lines, -201 lines) Patch
M media/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M media/base/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +145 lines, -105 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaCodecUtil.java View 1 1 chunk +1 line, -1 line 0 comments Download
M media/base/android/media_codec_bridge.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M media/base/android/media_codec_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -12 lines 0 comments Download
A media/base/android/media_codec_direction.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +18 lines, -0 lines 0 comments Download
M media/base/android/media_codec_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +25 lines, -7 lines 0 comments Download
M media/base/android/media_codec_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 8 chunks +44 lines, -23 lines 0 comments Download
M media/base/android/media_codec_loop_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +425 lines, -3 lines 0 comments Download
M media/base/android/media_codec_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +1 line, -6 lines 0 comments Download
A media/base/android/mock_media_codec_bridge.h View 1 2 3 4 5 6 7 8 9 1 chunk +65 lines, -0 lines 0 comments Download
A media/base/android/mock_media_codec_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +23 lines, -0 lines 0 comments Download
M media/base/android/ndk_media_codec_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M media/base/android/sdk_media_codec_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M media/base/decrypt_config.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -17 lines 0 comments Download
A + media/base/subsample_entry.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -23 lines 0 comments Download
M media/filters/android/media_codec_audio_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 92 (61 generated)
liberato (no reviews please)
i tried out the idea of making media_unittests run MCL unit tests even on desktop. ...
4 years, 5 months ago (2016-07-07 16:23:10 UTC) #4
DaleCurtis
I like the idea, but would prefer to not introduce some new "anywhere" directory concept. ...
4 years, 5 months ago (2016-07-07 17:32:45 UTC) #5
liberato (no reviews please)
On 2016/07/07 17:32:45, DaleCurtis wrote: > I like the idea, but would prefer to not ...
4 years, 5 months ago (2016-07-07 17:46:23 UTC) #6
liberato (no reviews please)
same idea, this time based on dale's suggestion. -fl
4 years, 5 months ago (2016-07-07 18:36:37 UTC) #7
DaleCurtis
Approach seems clearer. My question about the media unittests running on the CQ was about ...
4 years, 5 months ago (2016-07-07 20:38:10 UTC) #8
liberato (no reviews please)
On 2016/07/07 20:38:10, DaleCurtis wrote: > Approach seems clearer. My question about the media unittests ...
4 years, 5 months ago (2016-07-07 20:57:10 UTC) #9
DaleCurtis
I worry it might have the opposite affect of making it difficult to add tests. ...
4 years, 5 months ago (2016-07-07 21:01:34 UTC) #10
liberato (no reviews please)
On 2016/07/07 21:01:34, DaleCurtis wrote: > I worry it might have the opposite affect of ...
4 years, 5 months ago (2016-07-07 21:13:19 UTC) #11
DaleCurtis
This all sounds reasonable to me and the changes are just build tweaks, so I ...
4 years, 5 months ago (2016-07-07 21:16:19 UTC) #12
liberato (no reviews please)
just wrote some more tests, and wanted to point out how cool gmock is. nothing ...
4 years, 5 months ago (2016-07-08 17:49:46 UTC) #13
DaleCurtis
Looking good! I already feel better about MCL :) Gmock can be very handy, but ...
4 years, 5 months ago (2016-07-08 18:57:06 UTC) #14
liberato (no reviews please)
i decided to decouple this from the BuildInfo mock, since there some issues there that ...
4 years, 4 months ago (2016-07-28 17:22:05 UTC) #30
DaleCurtis
Still not in love with the anywhere name, so please at least give it a ...
4 years, 4 months ago (2016-08-01 18:23:17 UTC) #52
DaleCurtis
https://codereview.chromium.org/2132653002/diff/300001/media/base/android/BUILD.gn File media/base/android/BUILD.gn (right): https://codereview.chromium.org/2132653002/diff/300001/media/base/android/BUILD.gn#newcode5 media/base/android/BUILD.gn:5: import("//build/config/android/config.gni") Is this accessible on non-android checkouts? https://codereview.chromium.org/2132653002/diff/300001/media/base/android/BUILD.gn#newcode10 media/base/android/BUILD.gn:10: ...
4 years, 4 months ago (2016-08-01 18:24:00 UTC) #53
liberato (no reviews please)
turns out that MCL tests on windows fails due to what looks like a compiler ...
4 years, 4 months ago (2016-08-08 23:54:02 UTC) #70
DaleCurtis
On 2016/08/08 at 23:54:02, liberato wrote: > turns out that MCL tests on windows fails ...
4 years, 4 months ago (2016-08-08 23:56:32 UTC) #71
liberato (no reviews please)
On 2016/08/08 23:56:32, DaleCurtis wrote: > On 2016/08/08 at 23:54:02, liberato wrote: > > turns ...
4 years, 4 months ago (2016-08-09 00:14:41 UTC) #72
DaleCurtis
cc:jyasskin for FYI on the constexpr base::Time issues (see previous message from liberato@).
4 years, 4 months ago (2016-08-09 00:19:54 UTC) #73
Jeffrey Yasskin
On 2016/08/09 00:14:41, liberato wrote: > On 2016/08/08 23:56:32, DaleCurtis wrote: > > On 2016/08/08 ...
4 years, 4 months ago (2016-08-09 00:53:16 UTC) #74
liberato (no reviews please)
On 2016/08/09 00:53:16, Jeffrey Yasskin wrote: > On 2016/08/09 00:14:41, liberato wrote: > > On ...
4 years, 4 months ago (2016-08-09 01:21:22 UTC) #75
liberato (no reviews please)
On 2016/08/09 01:21:22, liberato wrote: > On 2016/08/09 00:53:16, Jeffrey Yasskin wrote: > > On ...
4 years, 4 months ago (2016-08-09 01:33:00 UTC) #76
liberato (no reviews please)
On 2016/08/09 01:33:00, liberato wrote: > On 2016/08/09 01:21:22, liberato wrote: > > On 2016/08/09 ...
4 years, 4 months ago (2016-08-09 16:20:46 UTC) #77
liberato (no reviews please)
On 2016/08/09 16:20:46, liberato wrote: > On 2016/08/09 01:33:00, liberato wrote: > > On 2016/08/09 ...
4 years, 4 months ago (2016-08-09 17:44:22 UTC) #78
liberato (no reviews please)
On 2016/08/09 16:20:46, liberato wrote: > On 2016/08/09 01:33:00, liberato wrote: > > On 2016/08/09 ...
4 years, 4 months ago (2016-08-09 17:44:26 UTC) #79
watk
lgtm https://codereview.chromium.org/2132653002/diff/420001/media/base/android/BUILD.gn File media/base/android/BUILD.gn (right): https://codereview.chromium.org/2132653002/diff/420001/media/base/android/BUILD.gn#newcode10 media/base/android/BUILD.gn:10: #assert(is_android) delete https://codereview.chromium.org/2132653002/diff/420001/media/base/android/media_codec_direction.h File media/base/android/media_codec_direction.h (right): https://codereview.chromium.org/2132653002/diff/420001/media/base/android/media_codec_direction.h#newcode9 media/base/android/media_codec_direction.h:9: ...
4 years, 4 months ago (2016-08-09 18:32:56 UTC) #80
liberato (no reviews please)
https://codereview.chromium.org/2132653002/diff/420001/media/base/android/BUILD.gn File media/base/android/BUILD.gn (right): https://codereview.chromium.org/2132653002/diff/420001/media/base/android/BUILD.gn#newcode10 media/base/android/BUILD.gn:10: #assert(is_android) On 2016/08/09 18:32:55, watk wrote: > delete Done. ...
4 years, 4 months ago (2016-08-09 21:20:48 UTC) #81
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132653002/440001
4 years, 4 months ago (2016-08-09 21:21:49 UTC) #84
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/270407)
4 years, 4 months ago (2016-08-10 01:28:51 UTC) #86
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132653002/440001
4 years, 4 months ago (2016-08-10 15:49:48 UTC) #88
commit-bot: I haz the power
Committed patchset #22 (id:440001)
4 years, 4 months ago (2016-08-10 17:46:05 UTC) #90
commit-bot: I haz the power
4 years, 4 months ago (2016-08-10 17:50:02 UTC) #92
Message was sent while issue was closed.
Patchset 22 (id:??) landed as
https://crrev.com/7014d6d056a3a524c123b5886065a6f1e2722c09
Cr-Commit-Position: refs/heads/master@{#411075}

Powered by Google App Engine
This is Rietveld 408576698