本文整理汇总了C++中OMXNodeInstance类的典型用法代码示例。如果您正苦于以下问题:C++ OMXNodeInstance类的具体用法?C++ OMXNodeInstance怎么用?C++ OMXNodeInstance使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了OMXNodeInstance类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findInstance
status_t OMX::freeNode(node_id node) {
OMXNodeInstance *instance = findInstance(node);
{
Mutex::Autolock autoLock(mLock);
ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
if (index < 0) {
// This could conceivably happen if the observer dies at roughly the
// same time that a client attempts to free the node explicitly.
return OK;
}
mLiveNodes.removeItemsAt(index);
}
instance->observer()->asBinder()->unlinkToDeath(this);
status_t err = instance->freeNode(mMaster);
{
Mutex::Autolock autoLock(mLock);
ssize_t index = mDispatchers.indexOfKey(node);
CHECK(index >= 0);
mDispatchers.removeItemsAt(index);
}
return err;
}
示例2: OnFillBufferDone
// static
OMX_ERRORTYPE OMXNodeInstance::OnFillBufferDone(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_PTR pAppData,
OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) {
OMXNodeInstance *instance = static_cast<OMXNodeInstance *>(pAppData);
return instance->owner()->OnFillBufferDone(instance->nodeID(), pBuffer);
}
示例3: autoLock
status_t OMX::allocateNode(
const char *name, const sp<IOMXObserver> &observer, node_id *node) {
Mutex::Autolock autoLock(mLock);
*node = 0;
OMXNodeInstance *instance = new OMXNodeInstance(this, observer);
OMX_COMPONENTTYPE *handle;
OMX_ERRORTYPE err = mMaster->makeComponentInstance(
name, &OMXNodeInstance::kCallbacks,
instance, &handle);
if (err != OMX_ErrorNone) {
ALOGV("FAILED to allocate omx component '%s'", name);
instance->onGetHandleFailed();
return UNKNOWN_ERROR;
}
*node = makeNodeID(instance);
mDispatchers.add(*node, new CallbackDispatcher(instance));
instance->setHandle(*node, handle);
mLiveNodes.add(observer->asBinder(), instance);
observer->asBinder()->linkToDeath(this);
return OK;
}
示例4: LOGV
void OMX::CallbackDispatcher::dispatch(const omx_message &msg) {
OMXNodeInstance *instance = mOwner->findInstance(msg.node);
if (instance == NULL) {
LOGV("Would have dispatched a message to a node that's already gone.");
return;
}
instance->onMessage(msg);
}
示例5: findInstance
status_t OMX::freeNode(node_id node) {
OMXNodeInstance *instance = findInstance(node);
ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
CHECK(index >= 0);
mLiveNodes.removeItemsAt(index);
instance->observer()->asBinder()->unlinkToDeath(this);
return instance->freeNode(mMaster);
}
示例6: OnEvent
// static
OMX_ERRORTYPE OMXNodeInstance::OnEvent(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_PTR pAppData,
OMX_IN OMX_EVENTTYPE eEvent,
OMX_IN OMX_U32 nData1,
OMX_IN OMX_U32 nData2,
OMX_IN OMX_PTR pEventData) {
OMXNodeInstance *instance = static_cast<OMXNodeInstance *>(pAppData);
return instance->owner()->OnEvent(
instance->nodeID(), eEvent, nData1, nData2, pEventData);
}
示例7: binderDied
void OMX::binderDied(const wp<IBinder> &the_late_who) {
OMXNodeInstance *instance;
{
Mutex::Autolock autoLock(mLock);
ssize_t index = mLiveNodes.indexOfKey(the_late_who);
CHECK(index >= 0);
instance = mLiveNodes.editValueAt(index);
mLiveNodes.removeItemsAt(index);
invalidateNodeID_l(instance->nodeID());
}
instance->onObserverDied(mMaster);
}
示例8: findInstance
status_t OMX::freeNode(node_id node) {
OMXNodeInstance *instance = findInstance(node);
ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
CHECK(index >= 0);
mLiveNodes.removeItemsAt(index);
instance->observer()->asBinder()->unlinkToDeath(this);
status_t err = instance->freeNode(mMaster);
{
Mutex::Autolock autoLock(mLock);
index = mDispatchers.indexOfKey(node);
CHECK(index >= 0);
mDispatchers.removeItemsAt(index);
}
return err;
}
示例9: findInstance
bool OMX::isSecure(node_id node) {
OMXNodeInstance *instance = findInstance(node);
return (instance == NULL ? false : instance->isSecure());
}