@Deprecated
public class DashUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double |
ceilDivide(double numerator,
double denominator)
Deprecated.
|
static com.google.android.exoplayer.dash.mpd.MediaPresentationDescription |
downloadManifest(java.lang.String manifestUriString)
Deprecated.
Helper method to download a DASH manifest.
|
static com.google.android.exoplayer.dash.mpd.Representation |
findRepresentationByBitrate(java.util.List<com.google.android.exoplayer.dash.mpd.Representation> representationList,
int bitrate)
Deprecated.
Finds the highest Representation bitrate up to the the bitrate provided.
|
static com.google.android.exoplayer.drm.DrmInitData |
getDrmInitData(com.google.android.exoplayer.dash.mpd.MediaPresentationDescription dashManifest)
Deprecated.
|
static java.lang.String |
getFullSegmentName(java.lang.String representationUrl,
java.lang.String representationId)
Deprecated.
Gets the full segment name from the representation url provided, taking into account the
asset id.
|
static com.google.android.exoplayer.dash.mpd.Representation |
getHighestRepresentation(com.google.android.exoplayer.dash.mpd.AdaptationSet adaptationSet)
Deprecated.
Utility method to get the highest
Representation from a DASH Adaptation Set based on the bitrate. |
static com.google.android.exoplayer.dash.mpd.Representation |
getHighestRepresentation(java.util.List<com.google.android.exoplayer.dash.mpd.Representation> representationList)
Deprecated.
Utility method to get the highest
Representation from a List of Representation based on the bitrate. |
static com.google.android.exoplayer.dash.mpd.Representation |
getHighestVideoRepresentationForDefaultDisplay(android.content.Context context,
com.google.android.exoplayer.dash.mpd.AdaptationSet adaptationSet)
Deprecated.
Utility method to get the highest suitable Video
Representation from a DASH Adaptation Set
based on the bitrate and the device's default display. |
static java.lang.String |
getMediaMimeType(com.google.android.exoplayer.chunk.Format format)
Deprecated.
|
static java.lang.String |
getRepresentationAbsolutePath(com.google.android.exoplayer.dash.mpd.Representation representation)
Deprecated.
Gets the absolute path from a representation,
by concatenating the baseUrl and the id.
|
static com.google.android.exoplayer.MediaFormat |
getTrackFormat(int adaptationSetType,
com.google.android.exoplayer.chunk.Format format,
java.lang.String mediaMimeType,
long durationUs)
Deprecated.
|
static java.util.List<com.google.android.exoplayer.dash.mpd.Representation> |
getVideoRepresentationList(android.content.Context context,
com.google.android.exoplayer.dash.mpd.AdaptationSet adaptationSet)
Deprecated.
|
static com.google.android.exoplayer.chunk.InitializationChunk |
loadInitializationChunk(com.google.android.exoplayer.upstream.DataSource dataSource,
com.google.android.exoplayer.dash.mpd.Representation representation)
Deprecated.
|
static com.google.android.exoplayer.chunk.ChunkExtractorWrapper |
newWrappedExtractor(com.google.android.exoplayer.chunk.Format format)
Deprecated.
|
static void |
replaceVideoSourceUri(Video video,
java.lang.String newUrl)
Deprecated.
Utility method to replace
Source.Fields#URL from the video source properties
with the new url provided. |
@NonNull public static java.lang.String getFullSegmentName(@NonNull java.lang.String representationUrl, @NonNull java.lang.String representationId)
representationUrl
- the representation urlrepresentationId
- the representation id@NonNull public static java.lang.String getRepresentationAbsolutePath(@NonNull com.google.android.exoplayer.dash.mpd.Representation representation)
representation
- the representation@Nullable public static com.google.android.exoplayer.dash.mpd.Representation getHighestRepresentation(@NonNull com.google.android.exoplayer.dash.mpd.AdaptationSet adaptationSet)
Representation
from a DASH Adaptation Set based on the bitrate.adaptationSet
- the adaptation set@Nullable public static com.google.android.exoplayer.dash.mpd.Representation getHighestVideoRepresentationForDefaultDisplay(@NonNull android.content.Context context, @NonNull com.google.android.exoplayer.dash.mpd.AdaptationSet adaptationSet)
Representation
from a DASH Adaptation Set
based on the bitrate and the device's default display.context
- the contextadaptationSet
- the adaptation setpublic static java.util.List<com.google.android.exoplayer.dash.mpd.Representation> getVideoRepresentationList(@NonNull android.content.Context context, com.google.android.exoplayer.dash.mpd.AdaptationSet adaptationSet)
@Nullable public static com.google.android.exoplayer.dash.mpd.Representation getHighestRepresentation(@NonNull java.util.List<com.google.android.exoplayer.dash.mpd.Representation> representationList)
Representation
from a List of Representation based on the bitrate.representationList
- the List of representation@Nullable public static com.google.android.exoplayer.dash.mpd.Representation findRepresentationByBitrate(@NonNull java.util.List<com.google.android.exoplayer.dash.mpd.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 urlpublic static com.google.android.exoplayer.MediaFormat getTrackFormat(int adaptationSetType, com.google.android.exoplayer.chunk.Format format, java.lang.String mediaMimeType, long durationUs)
public static java.lang.String getMediaMimeType(com.google.android.exoplayer.chunk.Format format)
public static com.google.android.exoplayer.chunk.InitializationChunk loadInitializationChunk(com.google.android.exoplayer.upstream.DataSource dataSource, com.google.android.exoplayer.dash.mpd.Representation representation) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static com.google.android.exoplayer.chunk.ChunkExtractorWrapper newWrappedExtractor(com.google.android.exoplayer.chunk.Format format)
public static com.google.android.exoplayer.dash.mpd.MediaPresentationDescription downloadManifest(java.lang.String manifestUriString) throws java.io.IOException
manifestUriString
- The URI of the manifest to be read.MediaPresentationDescription
.java.io.IOException
- If an error occurs reading data from the stream.@Nullable public static com.google.android.exoplayer.drm.DrmInitData getDrmInitData(@NonNull com.google.android.exoplayer.dash.mpd.MediaPresentationDescription dashManifest) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static double ceilDivide(double numerator, double denominator)