Skip to content

Most visited

Recently visited


NdkMediaExtractor.h File Reference

NdkMediaExtractor.h File Reference

Data Structures

struct  PsshEntry
struct  PsshInfo


typedef struct AMediaExtractor AMediaExtractor
typedef struct PsshEntry PsshEntry
typedef struct PsshInfo PsshInfo




AMediaExtractorAMediaExtractor_new ()
media_status_t AMediaExtractor_delete (AMediaExtractor *)
media_status_t AMediaExtractor_setDataSourceFd (AMediaExtractor *, int fd, off64_t offset, off64_t length)
media_status_t AMediaExtractor_setDataSource (AMediaExtractor *, const char *location)
size_t AMediaExtractor_getTrackCount (AMediaExtractor *)
AMediaFormatAMediaExtractor_getTrackFormat (AMediaExtractor *, size_t idx)
media_status_t AMediaExtractor_selectTrack (AMediaExtractor *, size_t idx)
media_status_t AMediaExtractor_unselectTrack (AMediaExtractor *, size_t idx)
ssize_t AMediaExtractor_readSampleData (AMediaExtractor *, uint8_t *buffer, size_t capacity)
uint32_t AMediaExtractor_getSampleFlags (AMediaExtractor *)
int AMediaExtractor_getSampleTrackIndex (AMediaExtractor *)
int64_t AMediaExtractor_getSampleTime (AMediaExtractor *)
bool AMediaExtractor_advance (AMediaExtractor *)
media_status_t AMediaExtractor_seekTo (AMediaExtractor *, int64_t seekPosUs, SeekMode mode)
PsshInfoAMediaExtractor_getPsshInfo (AMediaExtractor *)
AMediaCodecCryptoInfoAMediaExtractor_getSampleCryptoInfo (AMediaExtractor *)

Typedef Documentation

§ AMediaExtractor

§ PsshEntry

typedef struct PsshEntry PsshEntry

mapping of crypto scheme uuid to the scheme specific data for that scheme

§ PsshInfo

typedef struct PsshInfo PsshInfo

list of crypto schemes and their data

Enumeration Type Documentation

§ anonymous enum

anonymous enum

§ SeekMode

enum SeekMode

Function Documentation

§ AMediaExtractor_advance()

bool AMediaExtractor_advance ( AMediaExtractor )

Advance to the next sample. Returns false if no more sample data is available (end of stream).

§ AMediaExtractor_delete()

media_status_t AMediaExtractor_delete ( AMediaExtractor )

Delete a previously created media extractor

§ AMediaExtractor_getPsshInfo()

PsshInfo* AMediaExtractor_getPsshInfo ( AMediaExtractor )

Get the PSSH info if present.

§ AMediaExtractor_getSampleCryptoInfo()

AMediaCodecCryptoInfo* AMediaExtractor_getSampleCryptoInfo ( AMediaExtractor )

§ AMediaExtractor_getSampleFlags()

uint32_t AMediaExtractor_getSampleFlags ( AMediaExtractor )

Read the current sample's flags.

§ AMediaExtractor_getSampleTime()

int64_t AMediaExtractor_getSampleTime ( AMediaExtractor )

Returns the current sample's presentation time in microseconds. or -1 if no more samples are available.

§ AMediaExtractor_getSampleTrackIndex()

int AMediaExtractor_getSampleTrackIndex ( AMediaExtractor )

Returns the track index the current sample originates from (or -1 if no more samples are available)

§ AMediaExtractor_getTrackCount()

size_t AMediaExtractor_getTrackCount ( AMediaExtractor )

Return the number of tracks in the previously specified media file

§ AMediaExtractor_getTrackFormat()

AMediaFormat* AMediaExtractor_getTrackFormat ( AMediaExtractor ,
size_t  idx 

Return the format of the specified track. The caller must free the returned format

§ AMediaExtractor_new()

AMediaExtractor* AMediaExtractor_new ( )

Create new media extractor

§ AMediaExtractor_readSampleData()

ssize_t AMediaExtractor_readSampleData ( AMediaExtractor ,
uint8_t *  buffer,
size_t  capacity 

Read the current sample.

§ AMediaExtractor_seekTo()

media_status_t AMediaExtractor_seekTo ( AMediaExtractor ,
int64_t  seekPosUs,
SeekMode  mode 

§ AMediaExtractor_selectTrack()

media_status_t AMediaExtractor_selectTrack ( AMediaExtractor ,
size_t  idx 

Select the specified track. Subsequent calls to readSampleData, getSampleTrackIndex and getSampleTime only retrieve information for the subset of tracks selected. Selecting the same track multiple times has no effect, the track is only selected once.

§ AMediaExtractor_setDataSource()

media_status_t AMediaExtractor_setDataSource ( AMediaExtractor ,
const char *  location 

Set the URI from which the extractor will read.

§ AMediaExtractor_setDataSourceFd()

media_status_t AMediaExtractor_setDataSourceFd ( AMediaExtractor ,
int  fd,
off64_t  offset,
off64_t  length 

Set the file descriptor from which the extractor will read.

§ AMediaExtractor_unselectTrack()

media_status_t AMediaExtractor_unselectTrack ( AMediaExtractor ,
size_t  idx 

Unselect the specified track. Subsequent calls to readSampleData, getSampleTrackIndex and getSampleTime only retrieve information for the subset of tracks selected..

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields


Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)