Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72e8bfdd authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "IOMX: remove nodeBinder from allocateNode"

parents 09316fdb 1d2e9cfb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ public:

    virtual status_t allocateNode(
            const char *name, const sp<IOMXObserver> &observer,
            sp<IBinder> *nodeBinder, sp<IOMXNode> *omxNode) = 0;
            sp<IOMXNode> *omxNode) = 0;

    virtual status_t createPersistentInputSurface(
            sp<IGraphicBufferProducer> *bufferProducer,
+0 −1
Original line number Diff line number Diff line
@@ -245,7 +245,6 @@ private:
    uint32_t mQuirks;
    sp<IOMX> mOMX;
    sp<IOMXNode> mOMXNode;
    sp<IBinder> mNodeBinder;
    int32_t mNodeGeneration;
    sp<MemoryDealer> mDealer[2];

+2 −6
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ public:

    virtual status_t allocateNode(
            const char *name, const sp<IOMXObserver> &observer,
            sp<IBinder> *nodeBinder, sp<IOMXNode> *omxNode) {
            sp<IOMXNode> *omxNode) {
        Parcel data, reply;
        data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
        data.writeCString(name);
@@ -104,9 +104,6 @@ public:
        status_t err = reply.readInt32();
        if (err == OK) {
            *omxNode = IOMXNode::asInterface(reply.readStrongBinder());
            if (nodeBinder != NULL) {
                *nodeBinder = remote();
            }
        } else {
            omxNode->clear();
        }
@@ -656,8 +653,7 @@ status_t BnOMX::onTransact(

            sp<IOMXNode> omxNode;

            status_t err = allocateNode(
                    name, observer, NULL /* nodeBinder */, &omxNode);
            status_t err = allocateNode(name, observer, &omxNode);

            reply->writeInt32(err);
            if (err == OK) {
+7 −5
Original line number Diff line number Diff line
@@ -6221,7 +6221,10 @@ void ACodec::UninitializedState::stateEntered() {
    ALOGV("Now uninitialized");

    if (mDeathNotifier != NULL) {
        mCodec->mNodeBinder->unlinkToDeath(mDeathNotifier);
        if (mCodec->mOMXNode != NULL) {
            sp<IBinder> binder = IInterface::asBinder(mCodec->mOMXNode);
            binder->unlinkToDeath(mDeathNotifier);
        }
        mDeathNotifier.clear();
    }

@@ -6359,7 +6362,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
        pid_t tid = gettid();
        int prevPriority = androidGetThreadPriority(tid);
        androidSetThreadPriority(tid, ANDROID_PRIORITY_FOREGROUND);
        err = omx->allocateNode(componentName.c_str(), observer, &mCodec->mNodeBinder, &omxNode);
        err = omx->allocateNode(componentName.c_str(), observer, &omxNode);
        androidSetThreadPriority(tid, prevPriority);

        if (err == OK) {
@@ -6384,8 +6387,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
    }

    mDeathNotifier = new DeathNotifier(notify);
    if (mCodec->mNodeBinder == NULL ||
            mCodec->mNodeBinder->linkToDeath(mDeathNotifier) != OK) {
    if (IInterface::asBinder(omxNode)->linkToDeath(mDeathNotifier) != OK) {
        // This was a local binder, if it dies so do we, we won't care
        // about any notifications in the afterlife.
        mDeathNotifier.clear();
@@ -7798,7 +7800,7 @@ status_t ACodec::queryCapabilities(
    sp<CodecObserver> observer = new CodecObserver;
    sp<IOMXNode> omxNode;

    err = omx->allocateNode(name.c_str(), observer, NULL, &omxNode);
    err = omx->allocateNode(name.c_str(), observer, &omxNode);
    if (err != OK) {
        client.disconnect();
        return err;
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ public:

    virtual status_t allocateNode(
            const char *name, const sp<IOMXObserver> &observer,
            sp<IBinder> *nodeBinder, sp<IOMXNode> *omxNode);
            sp<IOMXNode> *omxNode);

    virtual status_t createPersistentInputSurface(
            sp<IGraphicBufferProducer> *bufferProducer,
Loading