Loading include/media/stagefright/HardwareAPI.h +10 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,16 @@ struct StoreMetaDataInBuffersParams { OMX_BOOL bStoreMetaData; }; // A pointer to this struct is passed to OMX_SetParameter() when the extension // index "OMX.google.android.index.enableSecureMode" // is given. // struct EnableSecureModeParams { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_BOOL bEnableSecureMode; }; // A pointer to this struct is passed to OMX_SetParameter when the extension // index for the 'OMX.google.android.index.useAndroidNativeBuffer' extension is // given. This call will only be performed if a prior call was made with the Loading include/media/stagefright/OMXCodec.h +2 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,8 @@ private: void initOutputFormat(const sp<MetaData> &inputFormat); status_t initNativeWindow(); status_t enableSecureMode(); void dumpPortStatus(OMX_U32 portIndex); status_t configureCodec(const sp<MetaData> &meta); Loading media/libstagefright/OMXCodec.cpp +23 −0 Original line number Diff line number Diff line Loading @@ -720,9 +720,32 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) { } } if (mFlags & kUseSecureInputBuffers) { (void)enableSecureMode(); } return OK; } status_t OMXCodec::enableSecureMode() { OMX_INDEXTYPE index; status_t err = mOMX->getExtensionIndex( mNode, "OMX.google.android.index.enableSecureMode", &index); if (err != OK) { return err; } EnableSecureModeParams params; InitOMXParams(¶ms); params.bEnableSecureMode = OMX_TRUE; return mOMX->setConfig(mNode, index, ¶ms, sizeof(params)); } void OMXCodec::setMinBufferSize(OMX_U32 portIndex, OMX_U32 size) { OMX_PARAM_PORTDEFINITIONTYPE def; InitOMXParams(&def); Loading Loading
include/media/stagefright/HardwareAPI.h +10 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,16 @@ struct StoreMetaDataInBuffersParams { OMX_BOOL bStoreMetaData; }; // A pointer to this struct is passed to OMX_SetParameter() when the extension // index "OMX.google.android.index.enableSecureMode" // is given. // struct EnableSecureModeParams { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; OMX_BOOL bEnableSecureMode; }; // A pointer to this struct is passed to OMX_SetParameter when the extension // index for the 'OMX.google.android.index.useAndroidNativeBuffer' extension is // given. This call will only be performed if a prior call was made with the Loading
include/media/stagefright/OMXCodec.h +2 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,8 @@ private: void initOutputFormat(const sp<MetaData> &inputFormat); status_t initNativeWindow(); status_t enableSecureMode(); void dumpPortStatus(OMX_U32 portIndex); status_t configureCodec(const sp<MetaData> &meta); Loading
media/libstagefright/OMXCodec.cpp +23 −0 Original line number Diff line number Diff line Loading @@ -720,9 +720,32 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) { } } if (mFlags & kUseSecureInputBuffers) { (void)enableSecureMode(); } return OK; } status_t OMXCodec::enableSecureMode() { OMX_INDEXTYPE index; status_t err = mOMX->getExtensionIndex( mNode, "OMX.google.android.index.enableSecureMode", &index); if (err != OK) { return err; } EnableSecureModeParams params; InitOMXParams(¶ms); params.bEnableSecureMode = OMX_TRUE; return mOMX->setConfig(mNode, index, ¶ms, sizeof(params)); } void OMXCodec::setMinBufferSize(OMX_U32 portIndex, OMX_U32 size) { OMX_PARAM_PORTDEFINITIONTYPE def; InitOMXParams(&def); Loading