Loading include/ndk/NdkMediaCodec.h +17 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,23 @@ media_status_t AMediaCodec_setInputSurface( media_status_t AMediaCodec_setParameters( AMediaCodec *mData, const AMediaFormat* params); /** * Signals end-of-stream on input. Equivalent to submitting an empty buffer with * AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM set. * * Returns AMEDIA_ERROR_INVALID_OPERATION when used with an encoder not in executing state * or not receiving input from a Surface created by AMediaCodec_createInputSurface or * AMediaCodec_createPersistentInputSurface. * * Returns the previous codec error if one exists. * * Returns AMEDIA_OK when completed succesfully. * * For more details, see the Java documentation for MediaCodec.signalEndOfInputStream. */ media_status_t AMediaCodec_signalEndOfInputStream(AMediaCodec *mData); typedef enum { AMEDIACODECRYPTOINFO_MODE_CLEAR = 0, Loading include/ndk/NdkMediaError.h +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ typedef enum { AMEDIA_ERROR_UNSUPPORTED = AMEDIA_ERROR_BASE - 2, AMEDIA_ERROR_INVALID_OBJECT = AMEDIA_ERROR_BASE - 3, AMEDIA_ERROR_INVALID_PARAMETER = AMEDIA_ERROR_BASE - 4, AMEDIA_ERROR_INVALID_OPERATION = AMEDIA_ERROR_BASE - 5, AMEDIA_DRM_ERROR_BASE = -20000, AMEDIA_DRM_NOT_PROVISIONED = AMEDIA_DRM_ERROR_BASE - 1, Loading media/ndk/NdkMediaCodec.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -463,6 +463,22 @@ media_status_t AMediaCodec_setParameters( return translate_error(mData->mCodec->setParameters(nativeParams)); } EXPORT media_status_t AMediaCodec_signalEndOfInputStream(AMediaCodec *mData) { if (mData == NULL) { return AMEDIA_ERROR_INVALID_PARAMETER; } status_t err = mData->mCodec->signalEndOfInputStream(); if (err == INVALID_OPERATION) { return AMEDIA_ERROR_INVALID_OPERATION; } return translate_error(err); } //EXPORT media_status_t AMediaCodec_setNotificationCallback(AMediaCodec *mData, OnCodecEvent callback, void *userdata) { Loading Loading
include/ndk/NdkMediaCodec.h +17 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,23 @@ media_status_t AMediaCodec_setInputSurface( media_status_t AMediaCodec_setParameters( AMediaCodec *mData, const AMediaFormat* params); /** * Signals end-of-stream on input. Equivalent to submitting an empty buffer with * AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM set. * * Returns AMEDIA_ERROR_INVALID_OPERATION when used with an encoder not in executing state * or not receiving input from a Surface created by AMediaCodec_createInputSurface or * AMediaCodec_createPersistentInputSurface. * * Returns the previous codec error if one exists. * * Returns AMEDIA_OK when completed succesfully. * * For more details, see the Java documentation for MediaCodec.signalEndOfInputStream. */ media_status_t AMediaCodec_signalEndOfInputStream(AMediaCodec *mData); typedef enum { AMEDIACODECRYPTOINFO_MODE_CLEAR = 0, Loading
include/ndk/NdkMediaError.h +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ typedef enum { AMEDIA_ERROR_UNSUPPORTED = AMEDIA_ERROR_BASE - 2, AMEDIA_ERROR_INVALID_OBJECT = AMEDIA_ERROR_BASE - 3, AMEDIA_ERROR_INVALID_PARAMETER = AMEDIA_ERROR_BASE - 4, AMEDIA_ERROR_INVALID_OPERATION = AMEDIA_ERROR_BASE - 5, AMEDIA_DRM_ERROR_BASE = -20000, AMEDIA_DRM_NOT_PROVISIONED = AMEDIA_DRM_ERROR_BASE - 1, Loading
media/ndk/NdkMediaCodec.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -463,6 +463,22 @@ media_status_t AMediaCodec_setParameters( return translate_error(mData->mCodec->setParameters(nativeParams)); } EXPORT media_status_t AMediaCodec_signalEndOfInputStream(AMediaCodec *mData) { if (mData == NULL) { return AMEDIA_ERROR_INVALID_PARAMETER; } status_t err = mData->mCodec->signalEndOfInputStream(); if (err == INVALID_OPERATION) { return AMEDIA_ERROR_INVALID_OPERATION; } return translate_error(err); } //EXPORT media_status_t AMediaCodec_setNotificationCallback(AMediaCodec *mData, OnCodecEvent callback, void *userdata) { Loading