Class ShadowMediaCodecList

java.lang.Object
org.robolectric.shadows.ShadowMediaCodecList

@Implements(android.media.MediaCodecList.class) public class ShadowMediaCodecList extends Object
Implementation of MediaCodecList.

Custom MediaCodecInfo can be created using MediaCodecInfoBuilder and added to the list of codecs via addCodec(android.media.MediaCodecInfo).

  • Constructor Details

    • ShadowMediaCodecList

      public ShadowMediaCodecList()
  • Method Details

    • addCodec

      @RequiresApi(29) public static void addCodec(MediaCodecInfo mediaCodecInfo)
      Add a MediaCodecInfo to the list of MediaCodecInfos.
      Parameters:
      mediaCodecInfo - MediaCodecInfo describing the codec. Use MediaCodecInfoBuilder to create an instance of it.
    • reset

      @Resetter public static void reset()
    • native_getCodecCount

      @Implementation protected static int native_getCodecCount()
    • getNewCodecInfoAt

      @Implementation protected static MediaCodecInfo getNewCodecInfoAt(int index)
    • native_getGlobalSettings

      @Implementation(minSdk=23) protected static Map<String,Object> native_getGlobalSettings()