diff options
author | Wei Jia <wjia@google.com> | 2015-10-06 02:55:19 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-10-06 02:55:19 +0000 |
commit | b90b8291e36ae079ac0ccd029bb6e6a987036f7c (patch) | |
tree | 973ea7078c95ed0d8d029fd1dffa3ddbe6fd2528 /media/libstagefright/omx | |
parent | ee481c9b172f90f507d505c9b32620cc1d062c83 (diff) | |
parent | cb70fdbe9be14002a4303a93f07a13c508c00d89 (diff) | |
download | frameworks_av-b90b8291e36ae079ac0ccd029bb6e6a987036f7c.zip frameworks_av-b90b8291e36ae079ac0ccd029bb6e6a987036f7c.tar.gz frameworks_av-b90b8291e36ae079ac0ccd029bb6e6a987036f7c.tar.bz2 |
am cb70fdbe: Merge "OMX: allow only secure codec to remotely call allocateBuffer." into mnc-dev
* commit 'cb70fdbe9be14002a4303a93f07a13c508c00d89':
OMX: allow only secure codec to remotely call allocateBuffer.
Diffstat (limited to 'media/libstagefright/omx')
-rw-r--r-- | media/libstagefright/omx/OMX.cpp | 5 | ||||
-rw-r--r-- | media/libstagefright/omx/OMXNodeInstance.cpp | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index cb7ab5e..7f357c9 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -194,6 +194,11 @@ void OMX::binderDied(const wp<IBinder> &the_late_who) { instance->onObserverDied(mMaster); } +bool OMX::isSecure(node_id node) { + OMXNodeInstance *instance = findInstance(node); + return (instance == NULL ? false : instance->isSecure()); +} + bool OMX::livesLocally(node_id /* node */, pid_t pid) { return pid == getpid(); } diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp index 9f1c5d8..94a213a 100644 --- a/media/libstagefright/omx/OMXNodeInstance.cpp +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -203,6 +203,7 @@ OMXNodeInstance::OMXNodeInstance( mDebugLevelBumpPendingBuffers[1] = 0; mMetadataType[0] = kMetadataBufferTypeInvalid; mMetadataType[1] = kMetadataBufferTypeInvalid; + mIsSecure = AString(name).endsWith(".secure"); } OMXNodeInstance::~OMXNodeInstance() { |