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

Issue 669623004: Switch to Lollipop APIs for MediaCodec (Closed)

Created:
6 years, 2 months ago by qinmin
Modified:
5 years, 7 months ago
Reviewers:
mcasas, xhwang, DaleCurtis
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, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Switch to Lollipop APIs for MediaCodec Some of the MediaCodec APIs are deprecated in L, replace them with new APIs. For WebRTC, it relies on some calls to get the output buffer count and capacities. this needs to be fixed. BUG=412185 Committed: https://crrev.com/21b94f4b7dc6f6c7855981c61183f4f4312108f4 Cr-Commit-Position: refs/heads/master@{#305486}

Patch Set 1 #

Patch Set 2 : remove getInputBufferCount() call #

Total comments: 6

Patch Set 3 : nits #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -48 lines) Patch
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M content/common/gpu/media/android_video_encode_accelerator.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaCodecBridge.java View 1 2 3 5 chunks +17 lines, -18 lines 0 comments Download
M media/base/android/media_codec_bridge.h View 1 2 3 2 chunks +2 lines, -8 lines 0 comments Download
M media/base/android/media_codec_bridge.cc View 1 2 3 3 chunks +1 line, -12 lines 0 comments Download
M media/base/android/media_codec_bridge_unittest.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M media/base/android/media_decoder_job.cc View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
qinmin
@xhwang, please revoew media/base/android/ @mcasas, please review content/common/gpu/media/. GetOutputBufferCount() and GetOutputBufferCapacity() will be deprecated for ...
6 years, 2 months ago (2014-10-21 00:38:32 UTC) #2
xhwang
media/base/android/ lgtm
6 years, 2 months ago (2014-10-22 16:19:17 UTC) #3
mcasas
LGTM. (I think you swapped the owner reviewership :) ) https://codereview.chromium.org/669623004/diff/20001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/669623004/diff/20001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java#newcode332 ...
6 years, 2 months ago (2014-10-23 07:19:28 UTC) #4
qinmin
https://codereview.chromium.org/669623004/diff/20001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/669623004/diff/20001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java#newcode332 media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:332: } MediaCodec.CodecException is a subclass of the IllegalStateException. So ...
6 years, 2 months ago (2014-10-23 22:42:53 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/669623004/40001
6 years, 2 months ago (2014-10-23 23:01:07 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/builds/27146)
6 years, 2 months ago (2014-10-23 23:42:22 UTC) #9
mcasas
On 2014/10/23 23:42:22, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 1 month ago (2014-11-24 03:44:04 UTC) #10
qinmin
+dalecurtis for content/common/gpu/media/ OWNER mcasas was removed from the OWNER file during the review of ...
6 years ago (2014-11-24 18:54:01 UTC) #11
DaleCurtis
rs lgtm
6 years ago (2014-11-24 19:21:51 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/669623004/60001
6 years ago (2014-11-24 19:31:45 UTC) #15
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years ago (2014-11-24 20:25:19 UTC) #16
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/21b94f4b7dc6f6c7855981c61183f4f4312108f4 Cr-Commit-Position: refs/heads/master@{#305486}
6 years ago (2014-11-24 20:26:53 UTC) #17
Senthil
5 years, 7 months ago (2015-04-29 00:24:43 UTC) #18
Message was sent while issue was closed.
On 2014/10/23 22:42:53, qinmin wrote:
>
https://codereview.chromium.org/669623004/diff/20001/media/base/android/java/...
> File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
> (right):
> 
>
https://codereview.chromium.org/669623004/diff/20001/media/base/android/java/...
> media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:332: }
> MediaCodec.CodecException is a subclass of the IllegalStateException.
> So if we catch the latter, we shouldn't need to catch the latter. And since
the
> latter is API 20, so we have to always include it for backward
compatibilities.
> 
> On 2014/10/23 07:19:28, mcasas wrote:
> > Shouldn't we catch MediaCodec.CodecException as well?
> > 
> >
>
http://developer.android.com/reference/android/media/MediaCodec.html#getInput...
> 
>
https://codereview.chromium.org/669623004/diff/20001/media/base/android/media...
> File media/base/android/media_codec_bridge.h (right):
> 
>
https://codereview.chromium.org/669623004/diff/20001/media/base/android/media...
> media/base/android/media_codec_bridge.h:164: // TODO(qinmin): this call is
> deprecated in Lollicap.
> On 2014/10/23 07:19:28, mcasas wrote:
> > s/Lollicap/Lollipop/
> 
> Done.
> 
>
https://codereview.chromium.org/669623004/diff/20001/media/base/android/media...
> media/base/android/media_codec_bridge.h:168: // TODO(qinmin): this call is
> deprecated in Lollicap.
> On 2014/10/23 07:19:28, mcasas wrote:
> > Idem.
> 
> Done.

Hi QinMin,
I am trying to enable hardware VP8 encoding for WebRTC for our platform. When i
enabled the encoder, i saw a crash in ChildProcessHostImpl::AllocateSharedMemory
with an invalid buffer_size of -1. This is because the GetOutputBuffersCapacity
returns -1. 

I saw your commit to update the code for changes in Android-L and the mention
that outputbuffers still need to be fixed. Can you please let me know if it is
fixed or when it will be fixed ?

thanks
Senthil

Powered by Google App Engine
This is Rietveld 408576698