Loading media/ndk/NdkMediaCodec.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -366,6 +366,13 @@ AMediaFormat* AMediaCodec_getOutputFormat(AMediaCodec *mData) { return AMediaFormat_fromMsg(&format); } EXPORT AMediaFormat* AMediaCodec_getBufferFormat(AMediaCodec *mData, size_t index) { sp<AMessage> format; mData->mCodec->getOutputFormat(index, &format); return AMediaFormat_fromMsg(&format); } EXPORT media_status_t AMediaCodec_releaseOutputBuffer(AMediaCodec *mData, size_t idx, bool render) { if (render) { Loading media/ndk/include/media/NdkMediaCodec.h +6 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,12 @@ ssize_t AMediaCodec_dequeueOutputBuffer(AMediaCodec*, AMediaCodecBufferInfo *inf int64_t timeoutUs); AMediaFormat* AMediaCodec_getOutputFormat(AMediaCodec*); /** * Get format of the buffer. The specified buffer index must have been previously obtained from * dequeueOutputBuffer. */ AMediaFormat* AMediaCodec_getBufferFormat(AMediaCodec*, size_t index); /** * If you are done with a buffer, use this call to return the buffer to * the codec. If you previously specified a surface when configuring this Loading Loading
media/ndk/NdkMediaCodec.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -366,6 +366,13 @@ AMediaFormat* AMediaCodec_getOutputFormat(AMediaCodec *mData) { return AMediaFormat_fromMsg(&format); } EXPORT AMediaFormat* AMediaCodec_getBufferFormat(AMediaCodec *mData, size_t index) { sp<AMessage> format; mData->mCodec->getOutputFormat(index, &format); return AMediaFormat_fromMsg(&format); } EXPORT media_status_t AMediaCodec_releaseOutputBuffer(AMediaCodec *mData, size_t idx, bool render) { if (render) { Loading
media/ndk/include/media/NdkMediaCodec.h +6 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,12 @@ ssize_t AMediaCodec_dequeueOutputBuffer(AMediaCodec*, AMediaCodecBufferInfo *inf int64_t timeoutUs); AMediaFormat* AMediaCodec_getOutputFormat(AMediaCodec*); /** * Get format of the buffer. The specified buffer index must have been previously obtained from * dequeueOutputBuffer. */ AMediaFormat* AMediaCodec_getBufferFormat(AMediaCodec*, size_t index); /** * If you are done with a buffer, use this call to return the buffer to * the codec. If you previously specified a surface when configuring this Loading