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

Commit 9a565c52 authored by Lajos Molnar's avatar Lajos Molnar Committed by android-build-merger
Browse files

IOMX: allow configuration after going to loaded state am: c1390401

am: 99accf6c

Change-Id: I2f80600bad65948b26e839d8588b98a574ffba9b
parents 56100a30 99accf6c
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -273,8 +273,8 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) {
status_t OMXNodeInstance::sendCommand(
        OMX_COMMANDTYPE cmd, OMX_S32 param) {
    if (cmd == OMX_CommandStateSet && param != OMX_StateIdle) {
        // We do not support returning from unloaded state, so there are no configurations past
        // first StateSet command. However, OMXCodec supports meta configuration past Stateset:Idle.
        // Normally there are no configurations past first StateSet; however, OMXCodec supports
        // meta configuration past Stateset:Idle.
        mSailed = true;
    }
    const sp<GraphicBufferSource> bufferSource(getGraphicBufferSource());
@@ -591,7 +591,7 @@ status_t OMXNodeInstance::useBuffer(
                params, portIndex, false /* copyToOmx */, false /* copyFromOmx */, data);
    } else {
        buffer_meta = new BufferMeta(
                params, portIndex, false /* copyFromOmx */, false /* copyToOmx */, NULL);
                params, portIndex, false /* copyToOmx */, false /* copyFromOmx */, NULL);
    }

    OMX_BUFFERHEADERTYPE *header;
@@ -1153,6 +1153,13 @@ void OMXNodeInstance::onEvent(
            && arg2 == OMX_StateExecuting) {
        bufferSource->omxExecuting();
    }

    // allow configuration if we return to the loaded state
    if (event == OMX_EventCmdComplete
            && arg1 == OMX_CommandStateSet
            && arg2 == OMX_StateLoaded) {
        mSailed = false;
    }
}

// static