Skip to content
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

[Android] Change to MediaCodecList.getCodecInfos() #21421

Merged
merged 2 commits into from
May 25, 2022

Conversation

joseluismarti
Copy link
Contributor

Description

MediaCodecList object uses two static methods to get available codecs, these two methods are deprecated in API level 21.

I propose to use the non-static getCodecInfos() method instead, it returns a list of MediaCodecInfo objects.

The constructor has a parameter with two possible values:

  • ALL_CODECS: Enumerate all codecs, even ones that are not suitable for regular (buffer-to-buffer) decoding or encoding, such as secure codecs (.secure).

  • REGULAR_CODECS: Enumerate only codecs that are suitable for regular (buffer-to-buffer) decoding or encoding. These are the same codecs that are returned by the deprecated methods.

This PR depends on (xbmc/libandroidjni#34).

How has this been tested?

Runtime tested on AFTV (Android TV 9)

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@CastagnaIT CastagnaIT added Type: Improvement non-breaking change which improves existing functionality Platform: Android v20 Nexus labels May 20, 2022
@CastagnaIT CastagnaIT added this to the Nexus 20.0 Alpha 2 milestone May 20, 2022
@CastagnaIT
Copy link
Collaborator

are you able to attach a test build arm64?

@joseluismarti
Copy link
Contributor Author

Two versions to test based on the constructor's parameters:
kodiapp-arm64-v8a-PR21421_ALL_CODECS.apk
kodiapp-arm64-v8a-PR21421_REGULAR_CODECS.apk

@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label May 22, 2022
@jenkins4kodi jenkins4kodi removed the Rebase needed PR that does not apply/merge cleanly to current base branch label May 22, 2022
@CastagnaIT
Copy link
Collaborator

tested on my phone regular version works as before on android 8
more interesting would be a test on Android >= 11

@fuzzard
Copy link
Contributor

fuzzard commented May 23, 2022

I can test on android 12, whats the test cases you need looked at? hit me up on slack @CastagnaIT

@howie-f
Copy link
Contributor

howie-f commented May 25, 2022

well then let‘s go. thanks again @joseluismarti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android Type: Improvement non-breaking change which improves existing functionality v20 Nexus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Black screen with video playback by using inputstream.adaptive with LineageOS (Kodi 19.3)
6 participants