summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2014-05-08 14:46:05 -0700
committerMarco Nelissen <marcone@google.com>2014-05-09 08:25:40 -0700
commitcdb42cdc5ccb785edabe1ee6407134fbae5662a9 (patch)
tree3c3313e9c6b2ecda67fa486dd39bc5fb5285752b /include
parent86aa02ce274826dc80ffa00766b16172c47503fd (diff)
downloadframeworks_av-cdb42cdc5ccb785edabe1ee6407134fbae5662a9.zip
frameworks_av-cdb42cdc5ccb785edabe1ee6407134fbae5662a9.tar.gz
frameworks_av-cdb42cdc5ccb785edabe1ee6407134fbae5662a9.tar.bz2
Add AMediaCodec callback
Change-Id: I33b7ff3bcdcff6d3a5e1db385b900ae18b7e0f03
Diffstat (limited to 'include')
-rw-r--r--include/ndk/NdkMediaCodec.h12
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