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

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

Merge "IOMX: remove getState() and livesLocally()"

parents e90894f5 7dcc5f39
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -51,10 +51,6 @@ public:
        kFenceTimeoutMs = 1000
    };

    // Returns true iff the implementation of the OMX interface
    // lives in the same process.
    virtual bool livesLocally() = 0;

    struct ComponentInfo {
        String8 mName;
        List<String8> mRoles;
@@ -93,8 +89,6 @@ public:
    virtual status_t setConfig(
            OMX_INDEXTYPE index, const void *params, size_t size) = 0;

    virtual status_t getState(OMX_STATETYPE* state) = 0;

    // This will set *type to previous metadata buffer type on OMX error (not on binder error), and
    // new metadata buffer type on success.
    virtual status_t storeMetaDataInBuffers(
@@ -251,10 +245,6 @@ public:

class BnOMX : public BnInterface<IOMX> {
public:
    virtual bool livesLocally() {
        return true;
    }

    virtual status_t onTransact(
            uint32_t code, const Parcel &data, Parcel *reply,
            uint32_t flags = 0);
+0 −28
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ enum {
    SET_PARAMETER,
    GET_CONFIG,
    SET_CONFIG,
    GET_STATE,
    ENABLE_NATIVE_BUFFERS,
    USE_BUFFER,
    USE_GRAPHIC_BUFFER,
@@ -71,10 +70,6 @@ public:
        : BpInterface<IOMX>(impl) {
    }

    virtual bool livesLocally() {
        return false;
    }

    virtual status_t listNodes(List<ComponentInfo> *list) {
        list->clear();

@@ -236,16 +231,6 @@ public:
        return reply.readInt32();
    }

    virtual status_t getState(
            OMX_STATETYPE* state) {
        Parcel data, reply;
        data.writeInterfaceToken(IOMXNode::getInterfaceDescriptor());
        remote()->transact(GET_STATE, data, &reply);

        *state = static_cast<OMX_STATETYPE>(reply.readInt32());
        return reply.readInt32();
    }

    virtual status_t enableNativeBuffers(
            OMX_U32 port_index, OMX_BOOL graphic, OMX_BOOL enable) {
        Parcel data, reply;
@@ -820,19 +805,6 @@ status_t BnOMXNode::onTransact(
            return NO_ERROR;
        }

        case GET_STATE:
        {
            CHECK_OMX_INTERFACE(IOMXNode, data, reply);

            OMX_STATETYPE state = OMX_StateInvalid;

            status_t err = getState(&state);
            reply->writeInt32(state);
            reply->writeInt32(err);

            return NO_ERROR;
        }

        case ENABLE_NATIVE_BUFFERS:
        {
            CHECK_OMX_INTERFACE(IOMXNode, data, reply);
+0 −2
Original line number Diff line number Diff line
@@ -50,8 +50,6 @@ struct OMXNodeInstance : public BnOMXNode {
    status_t getConfig(OMX_INDEXTYPE index, void *params, size_t size);
    status_t setConfig(OMX_INDEXTYPE index, const void *params, size_t size);

    status_t getState(OMX_STATETYPE* state);

    status_t enableNativeBuffers(OMX_U32 portIndex, OMX_BOOL graphic, OMX_BOOL enable);

    status_t getGraphicBufferUsage(OMX_U32 portIndex, OMX_U32* usage);
+0 −8
Original line number Diff line number Diff line
@@ -643,14 +643,6 @@ status_t OMXNodeInstance::setConfig(
    return StatusFromOMXError(err);
}

status_t OMXNodeInstance::getState(OMX_STATETYPE* state) {
    Mutex::Autolock autoLock(mLock);

    OMX_ERRORTYPE err = OMX_GetState(mHandle, state);
    CLOG_IF_ERROR(getState, err, "");
    return StatusFromOMXError(err);
}

status_t OMXNodeInstance::enableNativeBuffers(
        OMX_U32 portIndex, OMX_BOOL graphic, OMX_BOOL enable) {
    if (portIndex >= NELEM(mSecureBufferType)) {