summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/media/ICrypto.h3
-rw-r--r--include/media/stagefright/MediaCodec.h14
2 files changed, 14 insertions, 3 deletions
diff --git a/include/media/ICrypto.h b/include/media/ICrypto.h
index 07742ca..ac2b3ba 100644
--- a/include/media/ICrypto.h
+++ b/include/media/ICrypto.h
@@ -25,6 +25,7 @@
namespace android {
struct AString;
+struct IMemory;
struct ICrypto : public IInterface {
DECLARE_META_INTERFACE(Crypto);
@@ -48,7 +49,7 @@ struct ICrypto : public IInterface {
const uint8_t key[16],
const uint8_t iv[16],
CryptoPlugin::Mode mode,
- const void *srcPtr,
+ const sp<IMemory> &sharedBuffer, size_t offset,
const CryptoPlugin::SubSample *subSamples, size_t numSubSamples,
void *dstPtr,
AString *errorDetailMsg) = 0;
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h
index d055341..0786fb9 100644
--- a/include/media/stagefright/MediaCodec.h
+++ b/include/media/stagefright/MediaCodec.h
@@ -30,8 +30,10 @@ struct AMessage;
struct AReplyToken;
struct AString;
struct CodecBase;
-struct ICrypto;
struct IBatteryStats;
+struct ICrypto;
+struct IMemory;
+struct MemoryDealer;
struct SoftwareRenderer;
struct Surface;
@@ -51,7 +53,13 @@ struct MediaCodec : public AHandler {
CB_OUTPUT_AVAILABLE = 2,
CB_ERROR = 3,
CB_OUTPUT_FORMAT_CHANGED = 4,
- CB_RESOURCE_RECLAIMED = 5,
+ CB_CODEC_RELEASED = 5,
+ };
+
+ // used by CB_CODEC_RELEASED to tell the upper layer the cause of the release.
+ enum ReleaseReason {
+ REASON_UNKNOWN = 0,
+ REASON_RECLAIMED, // resources reclaimed by resource manager
};
struct BatteryNotifier;
@@ -214,6 +222,7 @@ private:
uint32_t mBufferID;
sp<ABuffer> mData;
sp<ABuffer> mEncryptedData;
+ sp<IMemory> mSharedEncryptedBuffer;
sp<AMessage> mNotify;
sp<AMessage> mFormat;
bool mOwnedByClient;
@@ -232,6 +241,7 @@ private:
sp<AMessage> mOutputFormat;
sp<AMessage> mInputFormat;
sp<AMessage> mCallback;
+ sp<MemoryDealer> mDealer;
bool mBatteryStatNotified;
bool mIsVideo;