Class MediaCodecInfoBuilder


  • public class MediaCodecInfoBuilder
    extends java.lang.Object
    Builder for MediaCodecInfo.
    • Method Detail

      • setName

        public MediaCodecInfoBuilder setName​(java.lang.String name)
        Sets the codec name.
        Parameters:
        name - codec name.
        Throws:
        java.lang.NullPointerException - if name is null.
      • setIsEncoder

        public MediaCodecInfoBuilder setIsEncoder​(boolean isEncoder)
        Sets the codec role.
        Parameters:
        isEncoder - a boolean to indicate whether the codec is an encoder true or a decoder false. Default value is false.
      • setIsVendor

        public MediaCodecInfoBuilder setIsVendor​(boolean isVendor)
        Sets the codec provider.
        Parameters:
        isVendor - a boolean to indicate whether the codec is provided by the device manufacturer true or by the Android platform false. Default value is false.
      • setIsSoftwareOnly

        public MediaCodecInfoBuilder setIsSoftwareOnly​(boolean isSoftwareOnly)
        Sets whether the codec is softwrare only or not.
        Parameters:
        isSoftwareOnly - a boolean to indicate whether the codec is software only true or not false. Default value is false.
      • setIsHardwareAccelerated

        public MediaCodecInfoBuilder setIsHardwareAccelerated​(boolean isHardwareAccelerated)
        Sets whether the codec is hardware accelerated or not.
        Parameters:
        isHardwareAccelerated - a boolean to indicate whether the codec is hardware accelerated true or not false. Default value is false.
      • setCapabilities

        public MediaCodecInfoBuilder setCapabilities​(android.media.MediaCodecInfo.CodecCapabilities... capabilities)
        Sets codec capabilities.

        Use MediaCodecInfoBuilder.CodecCapabilitiesBuilder can be to create an instance of MediaCodecInfo.CodecCapabilities.

        Parameters:
        capabilities - one or multiple MediaCodecInfo.CodecCapabilities.
        Throws:
        java.lang.NullPointerException - if capabilities is null.
      • build

        public android.media.MediaCodecInfo build()