当前位置: 首页>>代码示例>>C++>>正文


C++ OMXNodeInstance类代码示例

本文整理汇总了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;
}
开发者ID:3dsfr3ak,项目名称:android_frameworks_av,代码行数:27,代码来源:OMX.cpp

示例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);
}
开发者ID:RealVNC,项目名称:AndroidFrameworksBase,代码行数:8,代码来源:OMXNodeInstance.cpp

示例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;
}
开发者ID:3dsfr3ak,项目名称:android_frameworks_av,代码行数:31,代码来源:OMX.cpp

示例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);
}
开发者ID:Andproject,项目名称:platform_frameworks_base,代码行数:8,代码来源:OMX.cpp

示例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);
}
开发者ID:Andproject,项目名称:platform_frameworks_base,代码行数:10,代码来源:OMX.cpp

示例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);
}
开发者ID:RealVNC,项目名称:AndroidFrameworksBase,代码行数:12,代码来源:OMXNodeInstance.cpp

示例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);
}
开发者ID:Andproject,项目名称:platform_frameworks_base,代码行数:17,代码来源:OMX.cpp

示例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;
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:20,代码来源:OMX.cpp

示例9: findInstance

bool OMX::isSecure(node_id node) {
    OMXNodeInstance *instance = findInstance(node);
    return (instance == NULL ? false : instance->isSecure());
}
开发者ID:TeamEOS,项目名称:frameworks_av,代码行数:4,代码来源:OMX.cpp


注:本文中的OMXNodeInstance类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。