com.adobe.mediacore.qos
Class LoadInfo

java.lang.Object
  extended by com.adobe.mediacore.qos.LoadInfo

public final class LoadInfo
extends Object

Class containing various QoS information about loading process for various resources ( files, manifest or playlist, tracks etc).


Nested Class Summary
static class LoadInfo.Type
          The type of the resource.
 
Constructor Summary
LoadInfo(LoadInfo.Type type, String url, int periodIndex, long resourceSize, long mediaDuration, long downloadDuration, String trackName, String trackType, int trackIndex)
          Default constructor.
 
Method Summary
static LoadInfo createFragmentLoadInformation(String url, int periodIndex, long resourceSize, long mediaDuration, long downloadDuration)
           
static LoadInfo createManifestLoadInformation(String url)
           
static LoadInfo createTrackLoadInformation(String url, int periodIndex, long resourceSize, long mediaDuration, long downloadDuration, String trackName, String trackType, int trackIndex)
           
 long getDownloadDuration()
           
 long getFragmentSize()
          Deprecated. 
 String getFragmentUrl()
          Deprecated. 
 long getMediaDuration()
           
 int getPeriodIndex()
           
 long getSize()
           
 int getTrackIndex()
           
 String getTrackName()
           
 String getTrackType()
           
 LoadInfo.Type getType()
           
 String getUrl()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadInfo

public LoadInfo(LoadInfo.Type type,
                String url,
                int periodIndex,
                long resourceSize,
                long mediaDuration,
                long downloadDuration,
                String trackName,
                String trackType,
                int trackIndex)
Default constructor.

Parameters:
type - Type of resource.
url - The url pointing to the resource.
periodIndex - The timeline period index associated with this resource.
resourceSize - The size of resource in bytes.
mediaDuration - The media duration in milliseconds.
downloadDuration - Tha total download time in milliseconds.
trackName - Track name if the resource was an alternate track.
trackType - Track type if the resource was an alternate track.
trackIndex - Track index if the resource was an alternate track.
Method Detail

createManifestLoadInformation

public static LoadInfo createManifestLoadInformation(String url)

createFragmentLoadInformation

public static LoadInfo createFragmentLoadInformation(String url,
                                                     int periodIndex,
                                                     long resourceSize,
                                                     long mediaDuration,
                                                     long downloadDuration)

createTrackLoadInformation

public static LoadInfo createTrackLoadInformation(String url,
                                                  int periodIndex,
                                                  long resourceSize,
                                                  long mediaDuration,
                                                  long downloadDuration,
                                                  String trackName,
                                                  String trackType,
                                                  int trackIndex)

getType

public final LoadInfo.Type getType()
Returns:
The the type of the downloaded resource.

getUrl

public final String getUrl()
Returns:
The url pointing to the downloaded resource.

getPeriodIndex

public int getPeriodIndex()
Returns:
The timeline period index associated with the downloaded resource.

getSize

public long getSize()
Returns:
The size of the downloaded resource, in bytes.

getDownloadDuration

public long getDownloadDuration()
Returns:
The total duration for file download, in milliseconds.

getMediaDuration

public long getMediaDuration()
Returns:
The media duration, in milliseconds.

getTrackName

public String getTrackName()
Returns:
The corresponding track name if known, otherwise null.

getTrackType

public String getTrackType()
Returns:
The corresponding track type if known, otherwise null.

getTrackIndex

public int getTrackIndex()
Returns:
The corresponding track index if know, otherwise 0.

getFragmentUrl

@Deprecated
public String getFragmentUrl()
Deprecated. 

This method is deprecated. Use getUrl() instead.

Returns:
The url pointing to the downloaded fragment.

getFragmentSize

@Deprecated
public long getFragmentSize()
Deprecated. 

This method is deprecated. Use getSize() instead.

Returns:
The size of the downloaded fragment, in bytes.