Package com.castlabs.android.player

## Class DefaultMediaCodecSelector

- java.lang.Object
- - com.castlabs.android.player.DefaultMediaCodecSelector

- All Implemented Interfaces:
    `com.google.android.exoplayer2.mediacodec.MediaCodecSelector`

      public class DefaultMediaCodecSelector
      extends Object
      implements com.google.android.exoplayer2.mediacodec.MediaCodecSelector

  The implementation of MediaCodecSelector allowing to find the decoder based on mimetype and secure flag as well as on codecs string.
  Since:
    4.0.3

- - ### Field Summary

    - ### Fields inherited from interface com.google.android.exoplayer2.mediacodec.MediaCodecSelector

      `DEFAULT`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultMediaCodecSelector()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `List<com.google.android.exoplayer2.mediacodec.MediaCodecInfo>` | `getDecoderInfos​(String mimeType, com.google.android.exoplayer2.Format format, boolean requiresSecureDecoder, boolean requiresTunnelingDecoder)` |
    `com.google.android.exoplayer2.mediacodec.MediaCodecInfo` | `getPassthroughDecoderInfo()` |
    `void` | `setPreferredCodecInfos​(List<MediaCodecInfo> mediaCodecInfos)` | Set or unset the specific decoder infos
    `void` | `setVideoCodecFilter​(int videoCodecFilter)` |

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultMediaCodecSelector

          public DefaultMediaCodecSelector()

  - ### Method Detail

    - #### setVideoCodecFilter

          public void setVideoCodecFilter​(int videoCodecFilter)

    - #### setPreferredCodecInfos

          public void setPreferredCodecInfos​(@NonNull
                                             List<MediaCodecInfo> mediaCodecInfos)

      Set or unset the specific decoder infos
      Parameters:
        `mediaCodecInfos` - The media ccodec infos to be set

    - #### getDecoderInfos

          @NonNull
          public List<com.google.android.exoplayer2.mediacodec.MediaCodecInfo> getDecoderInfos​(String mimeType,
                                                                                               com.google.android.exoplayer2.Format format,
                                                                                               boolean requiresSecureDecoder,
                                                                                               boolean requiresTunnelingDecoder)
                                                                                        throws com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException

      Specified by:
        `getDecoderInfos` in interface `com.google.android.exoplayer2.mediacodec.MediaCodecSelector`
      Throws:
        `com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException`

    - #### getPassthroughDecoderInfo

          @Nullable
          public com.google.android.exoplayer2.mediacodec.MediaCodecInfo getPassthroughDecoderInfo()
                                                                                            throws com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException

      Specified by:
        `getPassthroughDecoderInfo` in interface `com.google.android.exoplayer2.mediacodec.MediaCodecSelector`
      Throws:
        `com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException`