DataSourceDesc2

public abstract class DataSourceDesc2
extends Object

java.lang.Object
   ↳ androidx.media2.DataSourceDesc2


Structure for data source descriptor. Used by MediaItem2.

See also:

Summary

Nested classes

class DataSourceDesc2.Builder<T extends Builder>

Builder class for DataSourceDesc2 objects. 

Constants

long POSITION_UNKNOWN

Used when a position is unknown.

int TYPE_CALLBACK

int TYPE_FD

int TYPE_URI

Public methods

long getEndPosition()

Return the position in milliseconds at which the playback will end.

String getMediaId()

Return the media Id of data source.

long getStartPosition()

Return the position in milliseconds at which the playback will start.

abstract int getType()

Return the type of data source.

Inherited methods

Constants

POSITION_UNKNOWN

public static final long POSITION_UNKNOWN

Used when a position is unknown.

See also:

Constant Value: 576460752303423487 (0x07ffffffffffffff)

TYPE_CALLBACK

public static final int TYPE_CALLBACK

Constant Value: 1 (0x00000001)

TYPE_FD

public static final int TYPE_FD

Constant Value: 2 (0x00000002)

TYPE_URI

public static final int TYPE_URI

Constant Value: 3 (0x00000003)

Public methods

getEndPosition

public long getEndPosition ()

Return the position in milliseconds at which the playback will end. POSITION_UNKNOWN means ending at the end of source content.

Returns
long the position in milliseconds at which the playback will end

getMediaId

public String getMediaId ()

Return the media Id of data source.

Returns
String the media Id of data source

getStartPosition

public long getStartPosition ()

Return the position in milliseconds at which the playback will start.

Returns
long the position in milliseconds at which the playback will start

getType

public abstract int getType ()

Return the type of data source.

Returns
int the type of data source