public class DashUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static double |
ceilDivide(double numerator,
double denominator) |
static com.google.android.exoplayer2.source.dash.manifest.Representation |
findRepresentationByBitrate(java.util.List<com.google.android.exoplayer2.source.dash.manifest.Representation> representationList,
int bitrate)
Finds the highest Representation bitrate up to the the bitrate provided.
|
static com.google.android.exoplayer2.source.dash.manifest.Representation |
getHighestRepresentation(com.google.android.exoplayer2.source.dash.manifest.AdaptationSet adaptationSet)
Utility method to get the highest
Representation from a DASH Adaptation Set based on the bitrate. |
static com.google.android.exoplayer2.source.dash.manifest.Representation |
getHighestRepresentation(java.util.List<com.google.android.exoplayer2.source.dash.manifest.Representation> representationList)
Utility method to get the highest
Representation from a List of Representation based on the bitrate. |
static java.lang.String |
getMediaMimeType(com.google.android.exoplayer2.Format format) |
static MediaFormat |
getTrackFormat(int adaptationSetType,
com.google.android.exoplayer2.Format format,
java.lang.String mediaMimeType,
long durationUs) |
static java.util.List<com.google.android.exoplayer2.source.dash.manifest.Representation> |
getVideoRepresentationList(android.content.Context context,
com.google.android.exoplayer2.source.dash.manifest.AdaptationSet adaptationSet) |
static void |
replaceVideoSourceUri(Video video,
java.lang.String newUrl)
Utility method to replace
Source.Fields#URL from the video source properties
with the new url provided. |
@Nullable
public static com.google.android.exoplayer2.source.dash.manifest.Representation getHighestRepresentation(@NonNull
com.google.android.exoplayer2.source.dash.manifest.AdaptationSet adaptationSet)
Representation from a DASH Adaptation Set based on the bitrate.adaptationSet - the adaptation setpublic static java.util.List<com.google.android.exoplayer2.source.dash.manifest.Representation> getVideoRepresentationList(@NonNull
android.content.Context context,
com.google.android.exoplayer2.source.dash.manifest.AdaptationSet adaptationSet)
@Nullable
public static com.google.android.exoplayer2.source.dash.manifest.Representation getHighestRepresentation(@NonNull
java.util.List<com.google.android.exoplayer2.source.dash.manifest.Representation> representationList)
Representation from a List of Representation based on the bitrate.representationList - the List of representation@Nullable
public static com.google.android.exoplayer2.source.dash.manifest.Representation findRepresentationByBitrate(@NonNull
java.util.List<com.google.android.exoplayer2.source.dash.manifest.Representation> representationList,
int bitrate)
representationList - the representation listbitrate - the bitratepublic static void replaceVideoSourceUri(@NonNull
Video video,
@NonNull
java.lang.String newUrl)
Source.Fields#URL from the video source properties
with the new url provided.video - the videonewUrl - the new url@Nullable public static MediaFormat getTrackFormat(int adaptationSetType, com.google.android.exoplayer2.Format format, java.lang.String mediaMimeType, long durationUs)
public static java.lang.String getMediaMimeType(@Nullable
com.google.android.exoplayer2.Format format)
public static double ceilDivide(double numerator,
double denominator)