FileMediaItem
public
class
FileMediaItem
extends MediaItem
| java.lang.Object | ||
| ↳ | androidx.media2.MediaItem | |
| ↳ | androidx.media2.FileMediaItem | |
Structure for media item for a file.
Users should use FileMediaItem.Builder to create FileMediaItem.
You cannot directly send this object across the process through ParcelUtils. See
MediaItem for detail.
See also:
Summary
Nested classes | |
|---|---|
class |
FileMediaItem.Builder
This Builder class simplifies the creation of a |
Constants | |
|---|---|
long |
FD_LENGTH_UNKNOWN
Used when the length of file descriptor is unknown. |
Inherited constants |
|---|
Public methods | |
|---|---|
FileDescriptor
|
getFileDescriptor()
Return the FileDescriptor of this media item. |
long
|
getFileDescriptorLength()
Return the content length associated with the FileDescriptor of this media item. |
long
|
getFileDescriptorOffset()
Return the offset associated with the FileDescriptor of this media item. |
Inherited methods | |
|---|---|
Constants
FD_LENGTH_UNKNOWN
public static final long FD_LENGTH_UNKNOWN
Used when the length of file descriptor is unknown.
See also:
Constant Value: 576460752303423487 (0x07ffffffffffffff)
Public methods
getFileDescriptor
public FileDescriptor getFileDescriptor ()
Return the FileDescriptor of this media item.
| Returns | |
|---|---|
FileDescriptor |
the FileDescriptor of this media item |
getFileDescriptorLength
public long getFileDescriptorLength ()
Return the content length associated with the FileDescriptor of this media item.
FD_LENGTH_UNKNOWN means same as the length of source content.
| Returns | |
|---|---|
long |
the content length associated with the FileDescriptor of this media item |
getFileDescriptorOffset
public long getFileDescriptorOffset ()
Return the offset associated with the FileDescriptor of this media item.
It's meaningful only when it has been set by the MediaItem.Builder.
| Returns | |
|---|---|
long |
the offset associated with the FileDescriptor of this media item |
Interfaces
Classes
- CallbackMediaItem
- CallbackMediaItem.Builder
- DataSourceCallback
- FileMediaItem
- FileMediaItem.Builder
- HeartRating
- MediaBrowser
- MediaBrowser.BrowserCallback
- MediaBrowser.BrowserResult
- MediaController
- MediaController.ControllerCallback
- MediaController.ControllerResult
- MediaController.PlaybackInfo
- MediaItem
- MediaItem.Builder
- MediaLibraryService
- MediaLibraryService.LibraryParams
- MediaLibraryService.LibraryParams.Builder
- MediaLibraryService.LibraryResult
- MediaLibraryService.MediaLibrarySession
- MediaLibraryService.MediaLibrarySession.Builder
- MediaLibraryService.MediaLibrarySession.MediaLibrarySessionCallback
- MediaMetadata
- MediaMetadata.Builder
- MediaPlayer
- MediaPlayer.PlayerCallback
- MediaPlayer.TrackInfo
- MediaSession
- MediaSession.Builder
- MediaSession.CommandButton
- MediaSession.CommandButton.Builder
- MediaSession.ControllerInfo
- MediaSession.SessionCallback
- MediaSession.SessionResult
- MediaSessionManager
- MediaSessionService
- MediaSessionService.MediaNotification
- MediaTimestamp
- PercentageRating
- PlaybackParams
- PlaybackParams.Builder
- SessionCommand
- SessionCommandGroup
- SessionCommandGroup.Builder
- SessionPlayer
- SessionPlayer.PlayerCallback
- SessionPlayer.PlayerResult
- SessionToken
- StarRating
- SubtitleData
- ThumbRating
- TimedMetaData
- UriMediaItem
- UriMediaItem.Builder
- VideoSize
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.