Java android.media MediaExtractor fields, constructors, methods, implement or subclass

Example usage for Java android.media MediaExtractor fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.media MediaExtractor.

The text is from its open source code.

Implementation

android.media.MediaExtractor has the following implementations.
Click this link to see all its implementation.

Field

intSEEK_TO_CLOSEST_SYNC
If possible, seek to the sync sample closest to the specified time

Constructor

Method

booleanadvance()
Advance to the next sample.
MapgetPsshInfo()
Get the PSSH info if present.
longgetSampleTime()
Returns the current sample's presentation time in microseconds.
intgetTrackCount()
Count the number of tracks found in the data source.
MediaFormatgetTrackFormat(int index)
Get the track format at the specified index.
intreadSampleData(@NonNull ByteBuffer byteBuf, int offset)
Retrieve the current encoded sample and store it in the byte buffer starting at the given offset.
voidrelease()
Make sure you call this when you're done to free up any resources instead of relying on the garbage collector to do this for you at some point in the future.
voidseekTo(long timeUs, @SeekMode int mode)
All selected tracks seek near the requested time according to the specified mode.
voidselectTrack(int index)
Subsequent calls to #readSampleData , #getSampleTrackIndex and #getSampleTime only retrieve information for the subset of tracks selected.
voidsetDataSource(@NonNull MediaDataSource dataSource)
Sets the data source (MediaDataSource) to use.
voidsetDataSource(@NonNull String path)
Sets the data source (file-path or http URL) to use.
voidsetDataSource(@NonNull AssetFileDescriptor afd)
Sets the data source (AssetFileDescriptor) to use.
voidsetDataSource(@NonNull FileDescriptor fd)
Sets the data source (FileDescriptor) to use.
voidsetDataSource(@NonNull Context context, @NonNull Uri uri, @Nullable Map headers)
Sets the data source as a content Uri.
voidsetDataSource(@NonNull FileDescriptor fd, long offset, long length)
Sets the data source (FileDescriptor) to use.