-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix VP9 on Android M and below by advertising profile level #8462
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
…xoPlayer into advertise-vp9-profile update email
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the inline comments. If these can be addressed then we will get this merged. Thanks!
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.java
Outdated
Show resolved
Hide resolved
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.java
Outdated
Show resolved
Hide resolved
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.java
Show resolved
Hide resolved
Thanks! We will get this merged in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See some more inline comments. In particular, I think the bitrate values are incorrect.
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.java
Show resolved
Hide resolved
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.java
Show resolved
Hide resolved
VideoCapabilities videoCapabilities = capabilities.getVideoCapabilities(); | ||
|
||
if (videoCapabilities == null) { | ||
return new CodecProfileLevel[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense to always assume VP9Level1
is supported.
Hi. I merged this with the bitrate adjustments and a few other tweaks. You can view and check the final version here. Please let us know if there are any issues, and thanks for your contribution! |
On Android M and below, VP9 codecCapabilities do not advertise profile level support. In this case, estimate the level from MediaCodecInfo.VideoCapabilities instead. https://developer.android.com/reference/android/media/MediaCodecInfo.CodecProfileLevel.html
This change is ported from chromium media: https://chromium.googlesource.com/chromium/src/media/+/master/base/android/java/src/org/chromium/media/MediaCodecUtil.java#296