summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/MediaCodec.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/stagefright/MediaCodec.h')
-rw-r--r--include/media/stagefright/MediaCodec.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h
index d448097..d055341 100644
--- a/include/media/stagefright/MediaCodec.h
+++ b/include/media/stagefright/MediaCodec.h
@@ -27,6 +27,7 @@ namespace android {
struct ABuffer;
struct AMessage;
+struct AReplyToken;
struct AString;
struct CodecBase;
struct ICrypto;
@@ -50,6 +51,7 @@ struct MediaCodec : public AHandler {
CB_OUTPUT_AVAILABLE = 2,
CB_ERROR = 3,
CB_OUTPUT_FORMAT_CHANGED = 4,
+ CB_RESOURCE_RECLAIMED = 5,
};
struct BatteryNotifier;
@@ -222,7 +224,7 @@ private:
sp<ALooper> mCodecLooper;
sp<CodecBase> mCodec;
AString mComponentName;
- uint32_t mReplyID;
+ sp<AReplyToken> mReplyID;
uint32_t mFlags;
status_t mStickyError;
sp<Surface> mNativeWindow;
@@ -249,10 +251,10 @@ private:
Vector<BufferInfo> mPortBuffers[2];
int32_t mDequeueInputTimeoutGeneration;
- uint32_t mDequeueInputReplyID;
+ sp<AReplyToken> mDequeueInputReplyID;
int32_t mDequeueOutputTimeoutGeneration;
- uint32_t mDequeueOutputReplyID;
+ sp<AReplyToken> mDequeueOutputReplyID;
sp<ICrypto> mCrypto;
@@ -267,7 +269,7 @@ private:
static status_t PostAndAwaitResponse(
const sp<AMessage> &msg, sp<AMessage> *response);
- static void PostReplyWithError(int32_t replyID, int32_t err);
+ static void PostReplyWithError(const sp<AReplyToken> &replyID, int32_t err);
status_t init(const AString &name, bool nameIsType, bool encoder);
@@ -283,8 +285,8 @@ private:
size_t portIndex, size_t index,
sp<ABuffer> *buffer, sp<AMessage> *format);
- bool handleDequeueInputBuffer(uint32_t replyID, bool newRequest = false);
- bool handleDequeueOutputBuffer(uint32_t replyID, bool newRequest = false);
+ bool handleDequeueInputBuffer(const sp<AReplyToken> &replyID, bool newRequest = false);
+ bool handleDequeueOutputBuffer(const sp<AReplyToken> &replyID, bool newRequest = false);
void cancelPendingDequeueOperations();
void extractCSD(const sp<AMessage> &format);