Class SubtitleFormat
java.lang.Object
com.castlabs.sdk.base.subtitles.utilities.SubtitleFormat
- All Implemented Interfaces:
Parcelable
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe Accessibility channel, orNO_VALUEif not known or applicable.final intThe average bandwidth in bits per second, orNO_VALUEif unknown or not applicable.final StringCodecs of the SubtitleFormat as described in RFC 6381, or null if unknown or not applicable.final StringThe mime type of the container, or null if unknown or not applicable.static final Parcelable.Creator<SubtitleFormat> final DrmInitDataDRM initialization data if the stream is protected, or null otherwise.final StringAn identifier for the SubtitleFormat, or null if unknown or not applicable.final List<byte[]> Initialization data that must be provided to the decoder.final StringThe human readable label, or null if unknown or not applicable.final StringThe language as an IETF BCP 47 conformant tag, or null if unknown or not applicable.static final intA value for various fields to indicate that the field's value is unknown or not applicable.static final longA value to indicate that subsample timestamps are relative to the timestamps of their parent samples.final StringThe language as present in manifest language tag, or null if unknown or not applicable.final intTrack role flags.final StringThe mime type of the elementary stream (i.e.final intTrack selection flags.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Method Summary
Modifier and TypeMethodDescriptioncopyWithManifestSubtitleFormatInfo(SubtitleFormat manifestSubtitleFormat) copyWithManifestSubtitleFormatInfo(SubtitleFormat manifestSubtitleFormat, boolean forceInStreamDrmInitData) static SubtitleFormatcreateTextSampleSubtitleFormat(String id, String label, int selectionFlags, int roleFlags, int bitrate, String codecs, String containerMimeType, String sampleMimeType, List<byte[]> initializationData, DrmInitData drmInitData, String language, String originalLanguage, int accessibilityChannel) static SubtitleFormatcreateTextSampleSubtitleFormat(String id, String sampleMimeType, int selectionFlags, String language, List<byte[]> initializationData) static SubtitleFormatcreateTextSampleSubtitleFormat(String id, String sampleMimeType, String codecs, int bitrate, int selectionFlags, String language, int accessibilityChannel, DrmInitData drmInitData) intbooleaninthashCode()booleanReturns whether theinitializationDatas belonging to this SubtitleFormat andotherare equal.static StringtoLogString(SubtitleFormat SubtitleFormat) Returns a prettierStringthantoString(), intended for logging.toString()voidwriteToParcel(Parcel dest, int flags)
-
Field Details
-
NO_VALUE
public static final int NO_VALUEA value for various fields to indicate that the field's value is unknown or not applicable.- See Also:
-
OFFSET_SAMPLE_RELATIVE
public static final long OFFSET_SAMPLE_RELATIVEA value to indicate that subsample timestamps are relative to the timestamps of their parent samples.- See Also:
-
id
An identifier for the SubtitleFormat, or null if unknown or not applicable. -
label
The human readable label, or null if unknown or not applicable. -
selectionFlags
Track selection flags. -
roleFlags
Track role flags. -
bitrate
public final int bitrateThe average bandwidth in bits per second, orNO_VALUEif unknown or not applicable. -
codecs
Codecs of the SubtitleFormat as described in RFC 6381, or null if unknown or not applicable. -
containerMimeType
The mime type of the container, or null if unknown or not applicable. -
sampleMimeType
The mime type of the elementary stream (i.e. the individual samples), or null if unknown or not applicable. -
initializationData
Initialization data that must be provided to the decoder. Will not be null, but may be empty if initialization data is not required. -
drmInitData
DRM initialization data if the stream is protected, or null otherwise. -
language
The language as an IETF BCP 47 conformant tag, or null if unknown or not applicable. -
originalLanguage
The language as present in manifest language tag, or null if unknown or not applicable. -
accessibilityChannel
public final int accessibilityChannelThe Accessibility channel, orNO_VALUEif not known or applicable. -
CREATOR
-
-
Method Details
-
createTextSampleSubtitleFormat
public static SubtitleFormat createTextSampleSubtitleFormat(@Nullable String id, @Nullable String sampleMimeType, @SelectionFlags int selectionFlags, @Nullable String language, @Nullable List<byte[]> initializationData) -
createTextSampleSubtitleFormat
public static SubtitleFormat createTextSampleSubtitleFormat(@Nullable String id, @Nullable String sampleMimeType, @Nullable String codecs, int bitrate, @SelectionFlags int selectionFlags, @Nullable String language, int accessibilityChannel, @Nullable DrmInitData drmInitData) -
createTextSampleSubtitleFormat
public static SubtitleFormat createTextSampleSubtitleFormat(@Nullable String id, @Nullable String label, @SelectionFlags int selectionFlags, @RoleFlags int roleFlags, int bitrate, @Nullable String codecs, @Nullable String containerMimeType, @Nullable String sampleMimeType, @Nullable List<byte[]> initializationData, @Nullable DrmInitData drmInitData, @Nullable String language, @Nullable String originalLanguage, int accessibilityChannel) -
copyWithManifestSubtitleFormatInfo
-
copyWithManifestSubtitleFormatInfo
public SubtitleFormat copyWithManifestSubtitleFormatInfo(SubtitleFormat manifestSubtitleFormat, boolean forceInStreamDrmInitData) -
toString
-
hashCode
public int hashCode() -
equals
-
initializationDataEquals
Returns whether theinitializationDatas belonging to this SubtitleFormat andotherare equal.- Parameters:
other- The other SubtitleFormat whoseinitializationDatais being compared.- Returns:
- Whether the
initializationDatas belonging to this SubtitleFormat andotherare equal.
-
toLogString
Returns a prettierStringthantoString(), intended for logging. -
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceParcelable
-
writeToParcel
- Specified by:
writeToParcelin interfaceParcelable
-