diff options
author | Shivaprasad Hongal <shongal@codeaurora.org> | 2015-07-30 18:00:18 -0700 |
---|---|---|
committer | Satish Kamuju <skamuj@codeaurora.org> | 2015-10-06 17:37:32 +0530 |
commit | 1ee2a02ee471d8c5d7b3c3bd3ab720f3dcfea056 (patch) | |
tree | 9e6156dc3c8c52168fd56aa0f06b211c5fd36155 /media/libmedia | |
parent | bc3028750d3438ebf108298e93f12de461f56430 (diff) | |
download | frameworks_av-1ee2a02ee471d8c5d7b3c3bd3ab720f3dcfea056.zip frameworks_av-1ee2a02ee471d8c5d7b3c3bd3ab720f3dcfea056.tar.gz frameworks_av-1ee2a02ee471d8c5d7b3c3bd3ab720f3dcfea056.tar.bz2 |
Stagefright: Enable custom allocation mode.
Enable custom allocation mode
Change-Id: Idf3f6c0eb9d17d361d2e5b6c36b1fe7586236565
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/ICrypto.cpp | 5 | ||||
-rw-r--r-- | media/libmedia/IOMX.cpp | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/media/libmedia/ICrypto.cpp b/media/libmedia/ICrypto.cpp index 9f65bde..f80357f 100644 --- a/media/libmedia/ICrypto.cpp +++ b/media/libmedia/ICrypto.cpp @@ -24,6 +24,7 @@ #include <media/stagefright/MediaErrors.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AString.h> +#include <media/AVMediaExtensions.h> namespace android { @@ -136,6 +137,7 @@ struct BpCrypto : public BpInterface<ICrypto> { if (secure) { data.writeInt64(static_cast<uint64_t>(reinterpret_cast<uintptr_t>(dstPtr))); + AVMediaUtils::get()->writeCustomData(&data, dstPtr); } remote()->transact(DECRYPT, data, &reply); @@ -297,6 +299,7 @@ status_t BnCrypto::onTransact( void *secureBufferId, *dstPtr; if (secure) { secureBufferId = reinterpret_cast<void *>(static_cast<uintptr_t>(data.readInt64())); + AVMediaUtils::get()->readCustomData(&data, &secureBufferId); } else { dstPtr = malloc(totalSize); CHECK(dstPtr != NULL); @@ -332,6 +335,8 @@ status_t BnCrypto::onTransact( } free(dstPtr); dstPtr = NULL; + } else { + AVMediaUtils::get()->closeFileDescriptor(dstPtr); } delete[] subSamples; diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp index 16da65e..ac2e872 100644 --- a/media/libmedia/IOMX.cpp +++ b/media/libmedia/IOMX.cpp @@ -22,6 +22,7 @@ #include <binder/Parcel.h> #include <media/IOMX.h> #include <media/stagefright/foundation/ADebug.h> +#include <media/AVMediaExtensions.h> namespace android { @@ -472,6 +473,7 @@ public: *buffer = (buffer_id)reply.readInt32(); *buffer_data = (void *)reply.readInt64(); + AVMediaUtils::get()->readCustomData(&reply, buffer_data); return err; } @@ -974,6 +976,7 @@ status_t BnOMX::onTransact( if (err == OK) { reply->writeInt32((int32_t)buffer); reply->writeInt64((uintptr_t)buffer_data); + AVMediaUtils::get()->writeCustomData(reply, buffer_data); } return NO_ERROR; |