MediaExtractor

Class of android.media · MediaExtractor.java · Android's reference

public final class MediaExtractor

Demuxes media files. No demuxer is here: a readable source opens as a container with no tracks.

Fields

public static final int SEEK_TO_PREVIOUS_SYNC = 0 source
public static final int SEEK_TO_NEXT_SYNC = 1 source
public static final int SEEK_TO_CLOSEST_SYNC = 2 source
public static final int SAMPLE_FLAG_SYNC = 1 source
public static final int SAMPLE_FLAG_ENCRYPTED = 2 source
public static final int SAMPLE_FLAG_PARTIAL_FRAME = 4 source

Constructors

public MediaExtractor() empty body source

Methods

public void setDataSource(String path) throws IOException source
public void setDataSource(String path, Map<String, String> headers) throws IOException source
public void setDataSource(Context context, Uri uri, Map<String, String> headers) throws IOException empty body source
public void setDataSource(FileDescriptor fd) throws IOException empty body source
public void setDataSource(FileDescriptor fd, long offset, long length) throws IOException empty body source
public void setDataSource(android.content.res.AssetFileDescriptor afd) throws IOException empty body source
public int getTrackCount() source
public MediaFormat getTrackFormat(int index) source
public void selectTrack(int index) source
public void unselectTrack(int index) source
public void seekTo(long timeUs, int mode) empty body source
public boolean advance() source
public int readSampleData(ByteBuffer byteBuf, int offset) source
public int getSampleTrackIndex() source
public long getSampleTime() source
public long getSampleSize() source
public int getSampleFlags() source
public long getCachedDuration() source
public boolean hasCacheReachedEndOfStream() source
public void release() empty body source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.