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

Issue 1472943002: Refactor MediaCodecBridge to add support for NDK APIs (Closed)

Created:
5 years, 1 month ago by qinmin
Modified:
5 years ago
CC:
chromium-reviews, posciak+watch_chromium.org, avayvod+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, piman+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

Refactor MediaCodecBridge to add support for NDK APIs Currently MediaCodecBridge is implemented with android MediaCodec SDK API. On android-21, MediaCodec NDK APIs have been added. This CL makes MediaCodecBridge a common ancestor inherited by the SDK and NDK implementation. Some common java functions are moved to MediaCodecUtil.java. The original native MediaCodecBridge class is renamed to SdkMediaCodecBridge. The NdkMediaCodecBridge is still WIP. BUG=560451 Committed: https://crrev.com/5d52e0f8e63a294179df028a0dabc76a042cf9ec Cr-Commit-Position: refs/heads/master@{#363374} Committed: https://crrev.com/3e916b14c8494614216940c10f8be67fc668cc25 Cr-Commit-Position: refs/heads/master@{#365737}

Patch Set 1 : #

Total comments: 10

Patch Set 2 : addressing comments #

Patch Set 3 : add media_codec_util.cc(h) #

Total comments: 28

Patch Set 4 : addressing comments #

Total comments: 19

Patch Set 5 : fix presubmit warnings #

Patch Set 6 : fix crazy linker issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1807 lines, -2006 lines) Patch
M components/cdm/browser/cdm_message_filter_android.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M content/child/runtime_features.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M content/common/gpu/media/android_video_decode_accelerator.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/media/android_video_decode_accelerator_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M content/common/gpu/media/android_video_encode_accelerator.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/media/android_video_encode_accelerator.cc View 1 2 3 4 5 4 chunks +3 lines, -4 lines 0 comments Download
M content/common/gpu/media/avda_shared_state.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/webrtc/peer_connection_dependency_factory.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M media/BUILD.gn View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M media/base/android/BUILD.gn View 1 4 chunks +6 lines, -1 line 0 comments Download
M media/base/android/audio_decoder_job.cc View 1 2 3 4 5 2 chunks +7 lines, -5 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaCodecBridge.java View 6 chunks +4 lines, -140 lines 0 comments Download
A media/base/android/java/src/org/chromium/media/MediaCodecUtil.java View 1 1 chunk +231 lines, -0 lines 0 comments Download
M media/base/android/media_codec_audio_decoder.cc View 1 2 3 4 2 chunks +6 lines, -11 lines 0 comments Download
M media/base/android/media_codec_bridge.h View 1 2 3 4 5 6 chunks +48 lines, -199 lines 0 comments Download
M media/base/android/media_codec_bridge.cc View 1 2 3 4 5 4 chunks +10 lines, -836 lines 0 comments Download
D media/base/android/media_codec_bridge_unittest.cc View 1 chunk +0 lines, -319 lines 0 comments Download
M media/base/android/media_codec_decoder.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M media/base/android/media_codec_decoder_unittest.cc View 1 2 3 2 chunks +2 lines, -10 lines 0 comments Download
M media/base/android/media_codec_player_unittest.cc View 1 2 3 2 chunks +2 lines, -10 lines 0 comments Download
A media/base/android/media_codec_util.h View 1 2 3 4 1 chunk +63 lines, -0 lines 0 comments Download
A media/base/android/media_codec_util.cc View 1 2 3 4 1 chunk +225 lines, -0 lines 0 comments Download
M media/base/android/media_codec_video_decoder.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/base/android/media_decoder_job.cc View 1 2 3 4 5 1 chunk +2 lines, -6 lines 0 comments Download
M media/base/android/media_jni_registrar.cc View 1 2 3 4 2 chunks +15 lines, -19 lines 0 comments Download
M media/base/android/media_source_player_unittest.cc View 1 2 3 2 chunks +2 lines, -10 lines 0 comments Download
A media/base/android/ndk_media_codec_bridge.h View 1 2 3 4 5 1 chunk +80 lines, -0 lines 0 comments Download
A media/base/android/ndk_media_codec_bridge.cc View 1 2 3 4 5 1 chunk +238 lines, -0 lines 0 comments Download
A media/base/android/ndk_media_codec_wrapper.cc View 1 2 3 4 5 1 chunk +162 lines, -0 lines 0 comments Download
A media/base/android/sdk_media_codec_bridge.h View 1 2 3 4 5 1 chunk +198 lines, -0 lines 0 comments Download
A + media/base/android/sdk_media_codec_bridge.cc View 1 2 3 4 5 25 chunks +162 lines, -416 lines 0 comments Download
A media/base/android/sdk_media_codec_bridge_unittest.cc View 1 2 3 4 1 chunk +300 lines, -0 lines 0 comments Download
M media/base/android/video_decoder_job.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M media/media.gyp View 1 2 3 4 5 4 chunks +16 lines, -1 line 0 comments Download

Messages

Total messages: 62 (29 generated)
qinmin
PTAL
5 years, 1 month ago (2015-11-23 20:45:42 UTC) #3
DaleCurtis
Is there a performance or power improvement by switching to the NDK APIs?
5 years, 1 month ago (2015-11-23 20:48:00 UTC) #4
qinmin
On 2015/11/23 20:48:00, DaleCurtis wrote: > Is there a performance or power improvement by switching ...
5 years, 1 month ago (2015-11-23 21:03:40 UTC) #5
Tima Vaisburd
https://codereview.chromium.org/1472943002/diff/20001/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java File media/base/android/java/src/org/chromium/media/MediaCodecUtil.java (right): https://codereview.chromium.org/1472943002/diff/20001/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java#newcode29 media/base/android/java/src/org/chromium/media/MediaCodecUtil.java:29: protected static final int MEDIA_CODEC_DECODER = 0; If default ...
5 years, 1 month ago (2015-11-24 02:24:19 UTC) #6
qinmin
https://codereview.chromium.org/1472943002/diff/20001/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java File media/base/android/java/src/org/chromium/media/MediaCodecUtil.java (right): https://codereview.chromium.org/1472943002/diff/20001/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java#newcode29 media/base/android/java/src/org/chromium/media/MediaCodecUtil.java:29: protected static final int MEDIA_CODEC_DECODER = 0; On 2015/11/24 ...
5 years ago (2015-11-24 20:44:06 UTC) #7
xhwang
I am not super familiar with the NDK API so I only skimmed the implementation. ...
5 years ago (2015-11-30 23:11:50 UTC) #8
qinmin
PTAL again https://codereview.chromium.org/1472943002/diff/60001/media/base/android/media_codec_bridge.cc File media/base/android/media_codec_bridge.cc (right): https://codereview.chromium.org/1472943002/diff/60001/media/base/android/media_codec_bridge.cc#newcode27 media/base/android/media_codec_bridge.cc:27: bool MediaCodecBridge::IsKnownUnaccelerated(const std::string& mime_type, On 2015/11/30 23:11:50, ...
5 years ago (2015-12-03 22:46:24 UTC) #9
Tima Vaisburd
lgtm % nits https://codereview.chromium.org/1472943002/diff/80001/media/BUILD.gn File media/BUILD.gn (right): https://codereview.chromium.org/1472943002/diff/80001/media/BUILD.gn#newcode398 media/BUILD.gn:398: if (current_cpu == "arm64" || current_cpu ...
5 years ago (2015-12-04 02:04:48 UTC) #10
xhwang
lgtm % nits https://chromiumcodereview.appspot.com/1472943002/diff/80001/content/renderer/media/webrtc/peer_connection_dependency_factory.cc File content/renderer/media/webrtc/peer_connection_dependency_factory.cc (right): https://chromiumcodereview.appspot.com/1472943002/diff/80001/content/renderer/media/webrtc/peer_connection_dependency_factory.cc#newcode23 content/renderer/media/webrtc/peer_connection_dependency_factory.cc:23: empty line not needed? but probably ...
5 years ago (2015-12-04 18:07:58 UTC) #11
Tima Vaisburd
https://chromiumcodereview.appspot.com/1472943002/diff/80001/media/base/android/media_codec_util.h File media/base/android/media_codec_util.h (right): https://chromiumcodereview.appspot.com/1472943002/diff/80001/media/base/android/media_codec_util.h#newcode34 media/base/android/media_codec_util.h:34: class MEDIA_EXPORT MediaCodecUtil { On 2015/12/04 18:07:58, xhwang wrote: ...
5 years ago (2015-12-04 18:52:18 UTC) #12
qinmin
+sievers for content/ OWNER https://codereview.chromium.org/1472943002/diff/80001/content/renderer/media/webrtc/peer_connection_dependency_factory.cc File content/renderer/media/webrtc/peer_connection_dependency_factory.cc (right): https://codereview.chromium.org/1472943002/diff/80001/content/renderer/media/webrtc/peer_connection_dependency_factory.cc#newcode23 content/renderer/media/webrtc/peer_connection_dependency_factory.cc:23: On 2015/12/04 18:07:58, xhwang wrote: ...
5 years ago (2015-12-04 20:26:04 UTC) #14
no sievers
content lgtm
5 years ago (2015-12-04 22:14:10 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943002/80001
5 years ago (2015-12-04 22:43:23 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/125276)
5 years ago (2015-12-04 23:38:19 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943002/100001
5 years ago (2015-12-05 00:16:04 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_TIMED_OUT, no build URL) win_chromium_compile_dbg_ng on ...
5 years ago (2015-12-05 02:26:21 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943002/100001
5 years ago (2015-12-05 04:58:43 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_TIMED_OUT, no build URL) win_chromium_compile_dbg_ng on ...
5 years ago (2015-12-05 07:01:19 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943002/100001
5 years ago (2015-12-05 07:14:12 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_TIMED_OUT, no build URL) win_chromium_compile_dbg_ng on ...
5 years ago (2015-12-05 09:15:42 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943002/100001
5 years ago (2015-12-05 15:56:28 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_TIMED_OUT, no build URL) win_chromium_compile_dbg_ng on ...
5 years ago (2015-12-05 17:57:53 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943002/100001
5 years ago (2015-12-06 17:49:09 UTC) #38
commit-bot: I haz the power
Committed patchset #5 (id:100001)
5 years ago (2015-12-06 18:56:23 UTC) #39
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/5d52e0f8e63a294179df028a0dabc76a042cf9ec Cr-Commit-Position: refs/heads/master@{#363374}
5 years ago (2015-12-06 18:57:30 UTC) #41
acleung1
A revert of this CL (patchset #5 id:100001) has been created in https://codereview.chromium.org/1525003002/ by acleung@chromium.org. ...
5 years ago (2015-12-14 23:12:43 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943002/120001
5 years ago (2015-12-15 21:37:15 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/108259) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years ago (2015-12-15 21:43:34 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943002/140001
5 years ago (2015-12-15 23:00:17 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/158369)
5 years ago (2015-12-16 00:13:09 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943002/160001
5 years ago (2015-12-17 00:38:07 UTC) #58
commit-bot: I haz the power
Committed patchset #6 (id:160001)
5 years ago (2015-12-17 03:59:51 UTC) #60
commit-bot: I haz the power
5 years ago (2015-12-17 04:01:19 UTC) #62
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3e916b14c8494614216940c10f8be67fc668cc25
Cr-Commit-Position: refs/heads/master@{#365737}

Powered by Google App Engine
This is Rietveld 408576698