libgpac
Documentation of the core library of GPAC
dec_mediacodec.h File Reference
+ Include dependency graph for dec_mediacodec.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  AMediaCodecBufferInfo
 
struct  GF_MCDecSurfaceTexture
 

Macros

#define MEDIACODEC_EMUL_API
 
#define AMEDIA_OK   0
 
#define AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED   1
 
#define AMEDIACODEC_INFO_OUTPUT_BUFFERS_CHANGED   2
 
#define AMEDIACODEC_INFO_TRY_AGAIN_LATER   3
 
#define AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM   1
 

Typedefs

typedef void AMediaCodec
 
typedef void AMediaFormat
 
typedef void ANativeWindow
 
typedef int window
 
typedef void * jobject
 

Functions

void AMediaFormat_setString (void *, const char *, const char *)
 
void AMediaFormat_setInt32 (void *, const char *, int)
 
void AMediaFormat_setBuffer (void *, const char *, char *, int)
 
AMediaFormatAMediaFormat_new ()
 
AMediaCodecAMediaCodec_createCodecByName (char *)
 
int AMediaCodec_configure (AMediaCodec *, const AMediaFormat *format, ANativeWindow *surface, void *crypto, uint32_t flags)
 
int AMediaCodec_start (AMediaCodec *)
 
int AMediaCodec_stop (AMediaCodec *)
 
ssize_t AMediaCodec_dequeueInputBuffer (AMediaCodec *, int64_t timeoutUs)
 
int AMediaCodec_flush (AMediaCodec *)
 
char * AMediaCodec_getInputBuffer (AMediaCodec *, size_t idx, size_t *out_size)
 
int AMediaCodec_queueInputBuffer (AMediaCodec *, size_t idx, int offset, size_t size, uint64_t time, uint32_t flags)
 
int AMediaCodec_dequeueOutputBuffer (AMediaCodec *, AMediaCodecBufferInfo *info, int64_t timeoutUs)
 
char * AMediaCodec_getOutputBuffer (AMediaCodec *, size_t idx, size_t *out_size)
 
int AMediaFormat_getInt32 (AMediaFormat *, const char *name, int32_t *out)
 
int AMediaCodec_releaseOutputBuffer (AMediaCodec *, size_t idx, int render)
 
int AMediaFormat_delete (AMediaFormat *)
 
AMediaFormatAMediaCodec_getOutputFormat (AMediaCodec *)
 
int AMediaCodec_delete (AMediaCodec *)
 
void ANativeWindow_release (ANativeWindow *)
 
GF_Err mcdec_create_surface (GLuint tex_id, ANativeWindow **window, Bool *surface_rendering, GF_MCDecSurfaceTexture *surfaceTex)
 
GF_Err mcdec_delete_surface (GF_MCDecSurfaceTexture surfaceTex)
 
char * mcdec_find_decoder (const char *mime, u32 width, u32 height, Bool *is_adaptive)
 
u32 mcdec_exit_callback (void *param)
 
GF_Err mcdec_update_surface (GF_MCDecSurfaceTexture surfaceTex)
 
GF_Err mcdec_get_transform_matrix (struct __matrix *mx, GF_MCDecSurfaceTexture surfaceTex)
 

Variables

const char * AMEDIAFORMAT_KEY_AAC_PROFILE = "aac-profile"
 
const char * AMEDIAFORMAT_KEY_BIT_RATE = "bitrate"
 
const char * AMEDIAFORMAT_KEY_CHANNEL_COUNT = "channel-count"
 
const char * AMEDIAFORMAT_KEY_CHANNEL_MASK = "channel-mask"
 
const char * AMEDIAFORMAT_KEY_COLOR_FORMAT = "color-format"
 
const char * AMEDIAFORMAT_KEY_DURATION = "durationUs"
 
const char * AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL = "flac-compression-level"
 
const char * AMEDIAFORMAT_KEY_FRAME_RATE = "frame-rate"
 
const char * AMEDIAFORMAT_KEY_HEIGHT = "height"
 
const char * AMEDIAFORMAT_KEY_IS_ADTS = "is-adts"
 
const char * AMEDIAFORMAT_KEY_IS_AUTOSELECT = "is-autoselect"
 
const char * AMEDIAFORMAT_KEY_IS_DEFAULT = "is-default"
 
const char * AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE = "is-forced-subtitle"
 
const char * AMEDIAFORMAT_KEY_I_FRAME_INTERVAL = "i-frame-interval"
 
const char * AMEDIAFORMAT_KEY_LANGUAGE = "language"
 
const char * AMEDIAFORMAT_KEY_MAX_HEIGHT = "max-height"
 
const char * AMEDIAFORMAT_KEY_MAX_INPUT_SIZE = "max-input-size"
 
const char * AMEDIAFORMAT_KEY_MAX_WIDTH = "max-width"
 
const char * AMEDIAFORMAT_KEY_MIME = "mime"
 
const char * AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP = "push-blank-buffers-on-shutdown"
 
const char * AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER = "repeat-previous-frame-after"
 
const char * AMEDIAFORMAT_KEY_SAMPLE_RATE = "sample-rate"
 
const char * AMEDIAFORMAT_KEY_WIDTH = "width"
 
const char * AMEDIAFORMAT_KEY_STRIDE = "stride"
 

Data Structure Documentation

◆ AMediaCodecBufferInfo

struct AMediaCodecBufferInfo
Data Fields
u32 flags
s32 offset
s64 presentationTimeUs
s32 size

◆ GF_MCDecSurfaceTexture

struct GF_MCDecSurfaceTexture
Data Fields
jobject oSurfaceTex
int texture_id

Macro Definition Documentation

◆ MEDIACODEC_EMUL_API

#define MEDIACODEC_EMUL_API

◆ AMEDIA_OK

#define AMEDIA_OK   0

◆ AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED

#define AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED   1

◆ AMEDIACODEC_INFO_OUTPUT_BUFFERS_CHANGED

#define AMEDIACODEC_INFO_OUTPUT_BUFFERS_CHANGED   2

◆ AMEDIACODEC_INFO_TRY_AGAIN_LATER

#define AMEDIACODEC_INFO_TRY_AGAIN_LATER   3

◆ AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM

#define AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM   1

Typedef Documentation

◆ AMediaCodec

typedef void AMediaCodec

◆ AMediaFormat

typedef void AMediaFormat

◆ ANativeWindow

typedef void ANativeWindow

◆ window

typedef int window

◆ jobject

typedef void* jobject

Function Documentation

◆ AMediaFormat_setString()

void AMediaFormat_setString ( void *  ,
const char *  ,
const char *   
)

◆ AMediaFormat_setInt32()

void AMediaFormat_setInt32 ( void *  ,
const char *  ,
int   
)

◆ AMediaFormat_setBuffer()

void AMediaFormat_setBuffer ( void *  ,
const char *  ,
char *  ,
int   
)

◆ AMediaFormat_new()

AMediaFormat* AMediaFormat_new ( )

◆ AMediaCodec_createCodecByName()

AMediaCodec* AMediaCodec_createCodecByName ( char *  )

◆ AMediaCodec_configure()

int AMediaCodec_configure ( AMediaCodec ,
const AMediaFormat format,
ANativeWindow surface,
void *  crypto,
uint32_t  flags 
)

◆ AMediaCodec_start()

int AMediaCodec_start ( AMediaCodec )

◆ AMediaCodec_stop()

int AMediaCodec_stop ( AMediaCodec )

◆ AMediaCodec_dequeueInputBuffer()

ssize_t AMediaCodec_dequeueInputBuffer ( AMediaCodec ,
int64_t  timeoutUs 
)

◆ AMediaCodec_flush()

int AMediaCodec_flush ( AMediaCodec )

◆ AMediaCodec_getInputBuffer()

char* AMediaCodec_getInputBuffer ( AMediaCodec ,
size_t  idx,
size_t *  out_size 
)

◆ AMediaCodec_queueInputBuffer()

int AMediaCodec_queueInputBuffer ( AMediaCodec ,
size_t  idx,
int  offset,
size_t  size,
uint64_t  time,
uint32_t  flags 
)

◆ AMediaCodec_dequeueOutputBuffer()

int AMediaCodec_dequeueOutputBuffer ( AMediaCodec ,
AMediaCodecBufferInfo info,
int64_t  timeoutUs 
)

◆ AMediaCodec_getOutputBuffer()

char* AMediaCodec_getOutputBuffer ( AMediaCodec ,
size_t  idx,
size_t *  out_size 
)

◆ AMediaFormat_getInt32()

int AMediaFormat_getInt32 ( AMediaFormat ,
const char *  name,
int32_t out 
)

◆ AMediaCodec_releaseOutputBuffer()

int AMediaCodec_releaseOutputBuffer ( AMediaCodec ,
size_t  idx,
int  render 
)

◆ AMediaFormat_delete()

int AMediaFormat_delete ( AMediaFormat )

◆ AMediaCodec_getOutputFormat()

AMediaFormat* AMediaCodec_getOutputFormat ( AMediaCodec )

◆ AMediaCodec_delete()

int AMediaCodec_delete ( AMediaCodec )

◆ ANativeWindow_release()

void ANativeWindow_release ( ANativeWindow )

◆ mcdec_create_surface()

GF_Err mcdec_create_surface ( GLuint  tex_id,
ANativeWindow **  window,
Bool surface_rendering,
GF_MCDecSurfaceTexture surfaceTex 
)
+ Here is the call graph for this function:

◆ mcdec_delete_surface()

GF_Err mcdec_delete_surface ( GF_MCDecSurfaceTexture  surfaceTex)
+ Here is the call graph for this function:

◆ mcdec_find_decoder()

char* mcdec_find_decoder ( const char *  mime,
u32  width,
u32  height,
Bool is_adaptive 
)
+ Here is the call graph for this function:

◆ mcdec_exit_callback()

u32 mcdec_exit_callback ( void *  param)
+ Here is the call graph for this function:

◆ mcdec_update_surface()

GF_Err mcdec_update_surface ( GF_MCDecSurfaceTexture  surfaceTex)
+ Here is the call graph for this function:

◆ mcdec_get_transform_matrix()

GF_Err mcdec_get_transform_matrix ( struct __matrix *  mx,
GF_MCDecSurfaceTexture  surfaceTex 
)

Variable Documentation

◆ AMEDIAFORMAT_KEY_AAC_PROFILE

const char* AMEDIAFORMAT_KEY_AAC_PROFILE = "aac-profile"

◆ AMEDIAFORMAT_KEY_BIT_RATE

const char* AMEDIAFORMAT_KEY_BIT_RATE = "bitrate"

◆ AMEDIAFORMAT_KEY_CHANNEL_COUNT

const char* AMEDIAFORMAT_KEY_CHANNEL_COUNT = "channel-count"

◆ AMEDIAFORMAT_KEY_CHANNEL_MASK

const char* AMEDIAFORMAT_KEY_CHANNEL_MASK = "channel-mask"

◆ AMEDIAFORMAT_KEY_COLOR_FORMAT

const char* AMEDIAFORMAT_KEY_COLOR_FORMAT = "color-format"

◆ AMEDIAFORMAT_KEY_DURATION

const char* AMEDIAFORMAT_KEY_DURATION = "durationUs"

◆ AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL

const char* AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL = "flac-compression-level"

◆ AMEDIAFORMAT_KEY_FRAME_RATE

const char* AMEDIAFORMAT_KEY_FRAME_RATE = "frame-rate"

◆ AMEDIAFORMAT_KEY_HEIGHT

const char* AMEDIAFORMAT_KEY_HEIGHT = "height"

◆ AMEDIAFORMAT_KEY_IS_ADTS

const char* AMEDIAFORMAT_KEY_IS_ADTS = "is-adts"

◆ AMEDIAFORMAT_KEY_IS_AUTOSELECT

const char* AMEDIAFORMAT_KEY_IS_AUTOSELECT = "is-autoselect"

◆ AMEDIAFORMAT_KEY_IS_DEFAULT

const char* AMEDIAFORMAT_KEY_IS_DEFAULT = "is-default"

◆ AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE

const char* AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE = "is-forced-subtitle"

◆ AMEDIAFORMAT_KEY_I_FRAME_INTERVAL

const char* AMEDIAFORMAT_KEY_I_FRAME_INTERVAL = "i-frame-interval"

◆ AMEDIAFORMAT_KEY_LANGUAGE

const char* AMEDIAFORMAT_KEY_LANGUAGE = "language"

◆ AMEDIAFORMAT_KEY_MAX_HEIGHT

const char* AMEDIAFORMAT_KEY_MAX_HEIGHT = "max-height"

◆ AMEDIAFORMAT_KEY_MAX_INPUT_SIZE

const char* AMEDIAFORMAT_KEY_MAX_INPUT_SIZE = "max-input-size"

◆ AMEDIAFORMAT_KEY_MAX_WIDTH

const char* AMEDIAFORMAT_KEY_MAX_WIDTH = "max-width"

◆ AMEDIAFORMAT_KEY_MIME

const char* AMEDIAFORMAT_KEY_MIME = "mime"

◆ AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP

const char* AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP = "push-blank-buffers-on-shutdown"

◆ AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER

const char* AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER = "repeat-previous-frame-after"

◆ AMEDIAFORMAT_KEY_SAMPLE_RATE

const char* AMEDIAFORMAT_KEY_SAMPLE_RATE = "sample-rate"

◆ AMEDIAFORMAT_KEY_WIDTH

const char* AMEDIAFORMAT_KEY_WIDTH = "width"

◆ AMEDIAFORMAT_KEY_STRIDE

const char* AMEDIAFORMAT_KEY_STRIDE = "stride"