Skip to content

Instantly share code, notes, and snippets.

@seventhmoon
Created May 23, 2020 13:19
Show Gist options
  • Save seventhmoon/b08870f0a7241312475777d009a4433f to your computer and use it in GitHub Desktop.
Save seventhmoon/b08870f0a7241312475777d009a4433f to your computer and use it in GitHub Desktop.
Kotlin in Kotlin
val supportedHardwareAcceleratedDecodeType = MediaCodecList(MediaCodecList.REGULAR_CODECS).codecInfos
.filter { !it.isEncoder && it.isHardwareAccelerated }
.map { it.supportedTypes.toList() }
.flatten()
.toSortedSet()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment