diff options
author | Marco Nelissen <marcone@google.com> | 2014-05-13 14:46:11 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-13 14:46:12 +0000 |
commit | aa0315f9fdcf99e84a969a4f81192150ddaef260 (patch) | |
tree | 063cadad379f8425f2f315884b1ccf09021c94e8 /include | |
parent | 99119b4564cea78be7a94d432dd8d8a3664615b7 (diff) | |
parent | cdb42cdc5ccb785edabe1ee6407134fbae5662a9 (diff) | |
download | frameworks_av-aa0315f9fdcf99e84a969a4f81192150ddaef260.zip frameworks_av-aa0315f9fdcf99e84a969a4f81192150ddaef260.tar.gz frameworks_av-aa0315f9fdcf99e84a969a4f81192150ddaef260.tar.bz2 |
Merge "Add AMediaCodec callback"
Diffstat (limited to 'include')
-rw-r--r-- | include/ndk/NdkMediaCodec.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/ndk/NdkMediaCodec.h b/include/ndk/NdkMediaCodec.h index 2af88d0..c35c6b3 100644 --- a/include/ndk/NdkMediaCodec.h +++ b/include/ndk/NdkMediaCodec.h @@ -55,7 +55,6 @@ enum { AMEDIACODEC_INFO_TRY_AGAIN_LATER = -1 }; - /** * Create codec by name. Use this if you know the exact codec you want to use. * When configuring, you will need to specify whether to use the codec as an @@ -140,6 +139,17 @@ int AMediaCodec_releaseOutputBuffer(AMediaCodec*, size_t idx, bool render); +typedef void (*OnCodecEvent)(AMediaCodec *codec, void *userdata); + +/** + * Set a callback to be called when a new buffer is available, or there was a format + * or buffer change. + * Note that you cannot perform any operations on the mediacodec from within the callback. + * If you need to perform mediacodec operations, you must do so on a different thread. + */ +int AMediaCodec_setNotificationCallback(AMediaCodec*, OnCodecEvent callback, void *userdata); + + #ifdef __cplusplus } // extern "C" #endif |