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 extends Object>, Parcelable.Creator<T extends Object>
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
The Accessibility channel, orNO_VALUE
if not known or applicable.final int
The average bandwidth in bits per second, orNO_VALUE
if unknown or not applicable.final String
Codecs of the SubtitleFormat as described in RFC 6381, or null if unknown or not applicable.final String
The mime type of the container, or null if unknown or not applicable.static final Parcelable.Creator<SubtitleFormat>
final DrmInitData
DRM initialization data if the stream is protected, or null otherwise.final String
An identifier for the SubtitleFormat, or null if unknown or not applicable.final List<byte[]>
Initialization data that must be provided to the decoder.final String
The human readable label, or null if unknown or not applicable.final String
The language as an IETF BCP 47 conformant tag, or null if unknown or not applicable.static final int
A value for various fields to indicate that the field's value is unknown or not applicable.static final long
A value to indicate that subsample timestamps are relative to the timestamps of their parent samples.final String
The language as present in manifest language tag, or null if unknown or not applicable.final int
Track role flags.final String
The mime type of the elementary stream (i.e.final int
Track 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 SubtitleFormat
createTextSampleSubtitleFormat
(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 SubtitleFormat
createTextSampleSubtitleFormat
(String id, String sampleMimeType, int selectionFlags, String language, List<byte[]> initializationData) static SubtitleFormat
createTextSampleSubtitleFormat
(String id, String sampleMimeType, String codecs, int bitrate, int selectionFlags, String language, int accessibilityChannel, DrmInitData drmInitData) int
boolean
int
hashCode()
boolean
Returns whether theinitializationData
s belonging to this SubtitleFormat andother
are equal.static String
toLogString
(SubtitleFormat SubtitleFormat) Returns a prettierString
thantoString()
, intended for logging.toString()
void
writeToParcel
(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_VALUE
if 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_VALUE
if 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 theinitializationData
s belonging to this SubtitleFormat andother
are equal.- Parameters:
other
- The other SubtitleFormat whoseinitializationData
is being compared.- Returns:
- Whether the
initializationData
s belonging to this SubtitleFormat andother
are equal.
-
toLogString
Returns a prettierString
thantoString()
, intended for logging. -
describeContents
public int describeContents()- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
- Specified by:
writeToParcel
in interfaceParcelable
-