summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/ndk/NdkMediaCodec.h11
-rw-r--r--media/ndk/NdkMediaCodec.cpp4
2 files changed, 3 insertions, 12 deletions
diff --git a/include/ndk/NdkMediaCodec.h b/include/ndk/NdkMediaCodec.h
index 2f000d7..c07f4c9 100644
--- a/include/ndk/NdkMediaCodec.h
+++ b/include/ndk/NdkMediaCodec.h
@@ -163,17 +163,6 @@ media_status_t AMediaCodec_releaseOutputBuffer(AMediaCodec*, size_t idx, bool re
media_status_t AMediaCodec_releaseOutputBufferAtTime(
AMediaCodec *mData, size_t idx, int64_t timestampNs);
-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.
- */
-media_status_t AMediaCodec_setNotificationCallback(
- AMediaCodec*, OnCodecEvent callback, void *userdata);
-
typedef enum {
AMEDIACODECRYPTOINFO_MODE_CLEAR = 0,
diff --git a/media/ndk/NdkMediaCodec.cpp b/media/ndk/NdkMediaCodec.cpp
index bd2541f..2ac16c7 100644
--- a/media/ndk/NdkMediaCodec.cpp
+++ b/media/ndk/NdkMediaCodec.cpp
@@ -61,6 +61,8 @@ public:
virtual void onMessageReceived(const sp<AMessage> &msg);
};
+typedef void (*OnCodecEvent)(AMediaCodec *codec, void *userdata);
+
struct AMediaCodec {
sp<android::MediaCodec> mCodec;
sp<ALooper> mLooper;
@@ -347,7 +349,7 @@ media_status_t AMediaCodec_releaseOutputBufferAtTime(
return translate_error(mData->mCodec->renderOutputBufferAndRelease(idx, timestampNs));
}
-EXPORT
+//EXPORT
media_status_t AMediaCodec_setNotificationCallback(AMediaCodec *mData, OnCodecEvent callback, void *userdata) {
mData->mCallback = callback;
mData->mCallbackUserData = userdata;