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

Commit 7dcc5f39 authored by Chong Zhang's avatar Chong Zhang
Browse files

IOMX: remove getState() and livesLocally()

These are no longer used.

bug: 31399200

Change-Id: Ic61e8c7fa016ccd038e2b2427ccb08b78af34245
parent d59b9722
Loading
Loading
Loading
Loading
+0 −10
Original line number Original line Diff line number Diff line
@@ -51,10 +51,6 @@ public:
        kFenceTimeoutMs = 1000
        kFenceTimeoutMs = 1000
    };
    };


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

    struct ComponentInfo {
    struct ComponentInfo {
        String8 mName;
        String8 mName;
        List<String8> mRoles;
        List<String8> mRoles;
@@ -93,8 +89,6 @@ public:
    virtual status_t setConfig(
    virtual status_t setConfig(
            OMX_INDEXTYPE index, const void *params, size_t size) = 0;
            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
    // This will set *type to previous metadata buffer type on OMX error (not on binder error), and
    // new metadata buffer type on success.
    // new metadata buffer type on success.
    virtual status_t storeMetaDataInBuffers(
    virtual status_t storeMetaDataInBuffers(
@@ -251,10 +245,6 @@ public:


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

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


    virtual bool livesLocally() {
        return false;
    }

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


@@ -236,16 +231,6 @@ public:
        return reply.readInt32();
        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(
    virtual status_t enableNativeBuffers(
            OMX_U32 port_index, OMX_BOOL graphic, OMX_BOOL enable) {
            OMX_U32 port_index, OMX_BOOL graphic, OMX_BOOL enable) {
        Parcel data, reply;
        Parcel data, reply;
@@ -820,19 +805,6 @@ status_t BnOMXNode::onTransact(
            return NO_ERROR;
            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:
        case ENABLE_NATIVE_BUFFERS:
        {
        {
            CHECK_OMX_INTERFACE(IOMXNode, data, reply);
            CHECK_OMX_INTERFACE(IOMXNode, data, reply);
+0 −2
Original line number Original line 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 getConfig(OMX_INDEXTYPE index, void *params, size_t size);
    status_t setConfig(OMX_INDEXTYPE index, const 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 enableNativeBuffers(OMX_U32 portIndex, OMX_BOOL graphic, OMX_BOOL enable);


    status_t getGraphicBufferUsage(OMX_U32 portIndex, OMX_U32* usage);
    status_t getGraphicBufferUsage(OMX_U32 portIndex, OMX_U32* usage);
+0 −8
Original line number Original line Diff line number Diff line
@@ -643,14 +643,6 @@ status_t OMXNodeInstance::setConfig(
    return StatusFromOMXError(err);
    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(
status_t OMXNodeInstance::enableNativeBuffers(
        OMX_U32 portIndex, OMX_BOOL graphic, OMX_BOOL enable) {
        OMX_U32 portIndex, OMX_BOOL graphic, OMX_BOOL enable) {
    if (portIndex >= NELEM(mSecureBufferType)) {
    if (portIndex >= NELEM(mSecureBufferType)) {