Class DrmInitData.SchemeData

    • Field Detail

      • uuid

        public final UUID uuid
        The UUID of the DRM scheme, or C.UUID_NIL if the data is universal (i.e. applies to all schemes).
      • licenseServerUrl

        @Nullable
        public final String licenseServerUrl
        The URL of the server to which license requests should be made. May be null if unknown.
      • mimeType

        public final String mimeType
        The mimeType of data.
      • data

        @Nullable
        public final byte[] data
        The initialization data. May be null for scheme support checks only.
    • Constructor Detail

      • SchemeData

        public SchemeData​(UUID uuid,
                          String mimeType,
                          @Nullable
                          byte[] data)
        Parameters:
        uuid - The UUID of the DRM scheme, or C.UUID_NIL if the data is universal (i.e. applies to all schemes).
        mimeType - See mimeType.
        data - See data.
      • SchemeData

        public SchemeData​(UUID uuid,
                          @Nullable
                          String licenseServerUrl,
                          String mimeType,
                          @Nullable
                          byte[] data)
        Parameters:
        uuid - The UUID of the DRM scheme, or C.UUID_NIL if the data is universal (i.e. applies to all schemes).
        licenseServerUrl - See licenseServerUrl.
        mimeType - See mimeType.
        data - See data.
    • Method Detail

      • matches

        public boolean matches​(UUID schemeUuid)
        Returns whether this initialization data applies to the specified scheme.
        Parameters:
        schemeUuid - The scheme UUID.
        Returns:
        Whether this initialization data applies to the specified scheme.
      • hasData

        public boolean hasData()
        Returns whether data is non-null.
      • copyWithData

        @CheckResult
        public DrmInitData.SchemeData copyWithData​(@Nullable
                                                   byte[] data)
        Returns a copy of this instance with the specified data.
        Parameters:
        data - The data to include in the copy.
        Returns:
        The new instance.
      • equals

        public boolean equals​(@Nullable
                              Object obj)
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object