|
|
Created:
6 years, 1 month ago by Jitu( very slow this week) Modified:
6 years ago CC:
chromium-reviews, feature-media-reviews_chromium.org, avayvod+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionModified MediaCodecBridge as per android API label 21.
The following methods are deprecated in API lavel 21
1) getCodecInfoAt(int)
2) getCodecCount()
As per API lavel 21 we should use getCodecInfos() instead of above
two API.
BUG=None
Committed: https://crrev.com/d064353cd04c9d8c1148c1d15ea5b3f88628e0e9
Cr-Commit-Position: refs/heads/master@{#305404}
Committed: https://crrev.com/8a140ade89d87534a5454f9341153d42a237c0b8
Cr-Commit-Position: refs/heads/master@{#305581}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Fix comments #
Total comments: 1
Patch Set 3 : Refactor as suggested #Patch Set 4 : Rebased #
Total comments: 6
Patch Set 5 : fix comments #
Total comments: 2
Patch Set 6 : nits #Messages
Total messages: 28 (4 generated)
jitendra.ks@samsung.com changed reviewers: + aurimas@chromium.org, qinmin@chromium.org
PTAL
https://codereview.chromium.org/687683002/diff/1/media/base/android/java/src/... File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/687683002/diff/1/media/base/android/java/src/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:237: MediaCodecInfo[] codec = mediaCodecList.getCodecInfos(); getCodecInfos() call exist only for devices running 21 and above. You need to do a version check and call the appropriate method based on what version of the device you are on. See ApiCompatibilityUtils.java as an example https://code.google.com/p/chromium/codesearch#chromium/src/base/android/java/...
PTAL
On 2014/10/29 06:50:04, Jitu wrote: > PTAL showing warning for Warning: com.android.org.chromium.media.MediaCodecBridge: can't find referenced method 'MediaCodecList(int)' in library class android.media.MediaCodecList Warning: com.android.org.chromium.media.MediaCodecBridge: can't find referenced method 'android.media.MediaCodecInfo[] getCodecInfos()' in library class android.media.MediaCodecList. Any clues ?
This is a normal warning. It is Dalvik warning you that you have a function that does not link to anything on the device you are testing on. It is only a warning and not an error. We just have to make sure we never call a function that does not exist for that given OS version. Android_AOSP bot will fail this change because it hasn't been updated to Android L yet. It will get updated when Android will release L source code to AOSP. You will have to keep this patch in review until the point. Feel free to contact boliu@ for more information about that. https://codereview.chromium.org/687683002/diff/20001/media/base/android/java/... File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/687683002/diff/20001/media/base/android/java/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:243: String[] supportedTypes = codec[i].getSupportedTypes(); You have a lot or repeating code here between the if and else statements. Please refactor out the repeating bits and only keep the code to get codec list OS version specific.
jitendra.ks@samsung.com changed reviewers: + boliu@chromium.org
PTAL
Ok, L has been open sourced to aosp. Now the ball is in our court to roll the android_aosp bot. Hang tight..
lgtm
https://codereview.chromium.org/687683002/diff/60001/media/base/android/java/... File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/687683002/diff/60001/media/base/android/java/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:242: MediaCodecInfo[] codec = null; nit: s/codec/codecs/ https://codereview.chromium.org/687683002/diff/60001/media/base/android/java/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:248: codec = new MediaCodecInfo[count]; need a check for count >0 https://codereview.chromium.org/687683002/diff/60001/media/base/android/java/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:255: for (int i = 0; i < codec.length; i++) { strictly speaking, codec can be null, you need to check that
@qinmin, Addressed your comments ... PTAL Thanks https://codereview.chromium.org/687683002/diff/60001/media/base/android/java/... File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/687683002/diff/60001/media/base/android/java/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:242: MediaCodecInfo[] codec = null; On 2014/11/06 16:43:37, qinmin wrote: > nit: s/codec/codecs/ Done. https://codereview.chromium.org/687683002/diff/60001/media/base/android/java/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:255: for (int i = 0; i < codec.length; i++) { On 2014/11/06 16:43:37, qinmin wrote: > strictly speaking, codec can be null, you need to check that I have added check for count (line no 248). If count is <=0 then function return null. In case of other possible scenario as we are checking codecs.length ,it should not be null. Are you talking if codecs.length > 0, still we have changes to get a null codec ?
lgtm % nits https://codereview.chromium.org/687683002/diff/60001/media/base/android/java/... File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/687683002/diff/60001/media/base/android/java/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:255: for (int i = 0; i < codec.length; i++) { On 2014/11/07 02:14:37, Jitu wrote: > On 2014/11/06 16:43:37, qinmin wrote: > > strictly speaking, codec can be null, you need to check that > > I have added check for count (line no 248). If count is <=0 then function return > null. > In case of other possible scenario as we are checking codecs.length ,it should > not be null. > > Are you talking if codecs.length > 0, still we have changes to get a null codec > ? Since you early returned when count==0, codec will not be null here. My original comments is that if you don't early return when count ==0, but just use an if statement to skip the loop, then you will need to do a null check here. https://codereview.chromium.org/687683002/diff/80001/media/base/android/java/... File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/687683002/diff/80001/media/base/android/java/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:248: if (count <= 0) nit: {} is meeded for java for if statement https://codereview.chromium.org/687683002/diff/80001/media/base/android/java/... media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:258: if (!codecs[i].isEncoder()) nit: {} here
PTAL
On 2014/11/06 16:35:52, boliu wrote: > Ok, L has been open sourced to aosp. Now the ball is in our court to roll the > android_aosp bot. Hang tight.. Thanks Bollu, please update us when it is done.
On 2014/11/07 03:30:49, Jitu (OOO till 23 Nov) wrote: > On 2014/11/06 16:35:52, boliu wrote: > > Ok, L has been open sourced to aosp. Now the ball is in our court to roll the > > android_aosp bot. Hang tight.. > > Thanks Bollu, please update us when it is done. This is going to have to wait more :( There's a android-5.0.0_r2 tag in aosp that matches the L release. However building chromium trunk has dependencies on aosp master, and aosp master branch has not been merged with L yet. So need to wait for that to happen first
On 2014/11/10 17:59:17, boliu wrote: > On 2014/11/07 03:30:49, Jitu (OOO till 23 Nov) wrote: > > On 2014/11/06 16:35:52, boliu wrote: > > > Ok, L has been open sourced to aosp. Now the ball is in our court to roll > the > > > android_aosp bot. Hang tight.. > > > > Thanks Bollu, please update us when it is done. > > This is going to have to wait more :( > > There's a android-5.0.0_r2 tag in aosp that matches the L release. However > building chromium trunk has dependencies on aosp master, and aosp master branch > has not been merged with L yet. So need to wait for that to happen first Star crbug.com/430997 for progress. I'll stop spamming this CL.
The CQ bit was checked by jitendra.ks@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/687683002/100001
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/d064353cd04c9d8c1148c1d15ea5b3f88628e0e9 Cr-Commit-Position: refs/heads/master@{#305404}
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/753963002/ by tnagel@chromium.org. The reason for reverting is: Fails to compile on Win8 GN: http://build.chromium.org/p/chromium.win/builders/Win8%20GN/builds/686.
Message was sent while issue was closed.
On 2014/11/10 23:36:17, boliu wrote: > On 2014/11/10 17:59:17, boliu wrote: > > On 2014/11/07 03:30:49, Jitu (OOO till 23 Nov) wrote: > > > On 2014/11/06 16:35:52, boliu wrote: > > > > Ok, L has been open sourced to aosp. Now the ball is in our court to roll > > the > > > > android_aosp bot. Hang tight.. > > > > > > Thanks Bollu, please update us when it is done. > > > > This is going to have to wait more :( > > > > There's a android-5.0.0_r2 tag in aosp that matches the L release. However > > building chromium trunk has dependencies on aosp master, and aosp master > branch > > has not been merged with L yet. So need to wait for that to happen first > > Star crbug.com/430997 for progress. I'll stop spamming this CL. Dear Bollu, After your changes for Andoid AOSP ( https://codereview.chromium.org/748013002) landed, i have committed this CL. But this got reverted due to fail to compile on Win8 GN. And from log (http://build.chromium.org/p/chromium.win/builders/Win8%20GN/builds/686) , i am not able to figure out why it is failed. Please guide me in this. Thanks
Message was sent while issue was closed.
On 2014/11/24 09:46:01, Jitu wrote: > On 2014/11/10 23:36:17, boliu wrote: > > On 2014/11/10 17:59:17, boliu wrote: > > > On 2014/11/07 03:30:49, Jitu (OOO till 23 Nov) wrote: > > > > On 2014/11/06 16:35:52, boliu wrote: > > > > > Ok, L has been open sourced to aosp. Now the ball is in our court to > roll > > > the > > > > > android_aosp bot. Hang tight.. > > > > > > > > Thanks Bollu, please update us when it is done. > > > > > > This is going to have to wait more :( > > > > > > There's a android-5.0.0_r2 tag in aosp that matches the L release. However > > > building chromium trunk has dependencies on aosp master, and aosp master > > branch > > > has not been merged with L yet. So need to wait for that to happen first > > > > Star crbug.com/430997 for progress. I'll stop spamming this CL. > > Dear Bollu, > > After your changes for Andoid AOSP ( https://codereview.chromium.org/748013002) > landed, i have committed this CL. > But this got reverted due to fail to compile on Win8 GN. > > And from log > (http://build.chromium.org/p/chromium.win/builders/Win8%20GN/builds/686) , i am > not able to figure out why it is failed. > Please guide me in this. > > Thanks Just re-open and cq this again. It was a wrong revert. A java file change cannot possibly affect windows builds.
The CQ bit was checked by jitendra.ks@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/687683002/100001
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/8a140ade89d87534a5454f9341153d42a237c0b8 Cr-Commit-Position: refs/heads/master@{#305581} |